/* Step 07 · Real scans. Every rule is scoped under #s7. */
#s7 .s7-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
#s7 .s7-tab { font: inherit; font-size: 0.92rem; font-weight: 700; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--bg); color: var(--muted); cursor: pointer; }
#s7 .s7-tab small { font-family: var(--f-mono); font-weight: 400; font-size: 0.72rem; color: var(--muted); }
#s7 .s7-tab:hover { border-color: var(--accent); color: var(--ink); }
#s7 .s7-tab[aria-selected="true"] { background: var(--tint); border-color: var(--accent); color: var(--ink); }
#s7 .s7-tab[aria-selected="true"] small { color: var(--ink); }

/* viewer */
#s7 .s7-view { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--bg); border: 1px solid var(--rule);
  border-radius: 8px; overflow: hidden; }
#s7 .s7-view > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#s7 .s7-view > canvas:active { cursor: grabbing; }
#s7 .s7-resetview { position: absolute; top: 8px; right: 8px; z-index: 2; font: inherit; font-size: 0.78rem; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--rule); background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); cursor: pointer; }
#s7 .s7-resetview:hover { color: var(--ink); border-color: var(--accent); }
#s7 .s7-msg { margin: 8px 0 0; padding: 8px 12px; font-size: 0.86rem; line-height: 1.4; border-radius: 8px;
  background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--ink); }
#s7 .s7-msg b { color: var(--bad); }
#s7 .s7-view[hidden] { display: none; }
#s7 .s7-under { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-top: 8px; }
#s7 .s7-legend { font-size: 0.86rem; }
#s7 .s7-legend > span { white-space: nowrap; }
#s7 .s7-ring { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0.05em;
  border: 1.5px solid var(--ink); opacity: 0.7; }
#s7 .s7-rgb { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0.05em;
  background: color-mix(in srgb, var(--muted) 55%, var(--bg)); }
#s7 .s7-rgb.rim { box-shadow: 0 0 0 1.5px var(--source); }
#s7 .s7-hint { font-size: 0.78rem; color: var(--muted); }
#s7 .s7-caption-k { font-family: var(--f-mono); font-size: 0.8rem; }

/* controls */
#s7 .s7-field { display: grid; gap: 4px; font-size: 0.9rem; }
#s7 .s7-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--bg); }
#s7 .s7-seg button { font: inherit; font-size: 0.86rem; padding: 7px 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; min-width: 0; }
#s7 .s7-seg button + button { border-left: 1px solid var(--rule); }
#s7 .s7-seg button:hover { color: var(--ink); }
#s7 .s7-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
#s7 .s7-btns .btn { flex: 1 1 0; min-width: 0; }
#s7 .s7-toggles { display: grid; gap: 6px; }
#s7 .s7-toggles .tgl[hidden] { display: none; }
#s7 .s7-ro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 12px; align-items: baseline; }
#s7 .s7-ro .k { white-space: nowrap; }
#s7 .s7-ro small { color: var(--muted); font-size: 0.74rem; }
#s7 .s7-ro .s7-sub { grid-column: 1 / -1; margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--rule); color: var(--muted); font-size: 0.74rem; }
/* base .ctl puts <output> on its own row under the slider; keep the value beside its label */
#s7 .ctl .ctl-val { grid-row: 1; grid-column: 2; }
#s7 .s7-status { font-size: 0.86rem; color: var(--muted); margin: 0; min-height: 2.6em; line-height: 1.35; }
#s7 .s7-status.good { color: var(--good); } #s7 .s7-status.bad { color: var(--bad); }

/* results table */
#s7 .s7-results { margin-top: 16px; }
#s7 .s7-tblhead { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
#s7 .s7-tblhead small { font-family: var(--f-body); font-weight: 400; font-size: 0.82rem; color: var(--muted); }
#s7 .s7-tbl { margin: 0; }
#s7 .s7-cmp th:first-child { min-width: 8.5rem; }
#s7 .s7-cmp td.num { text-align: left; white-space: normal; }
#s7 .s7-cmp td.num > span { white-space: nowrap; }
#s7 .s7-cmp td small { display: block; font-family: var(--f-body); font-size: 0.76rem; color: var(--muted); }
#s7 .s7-cmp td.s7-live { color: var(--muted); font-family: var(--f-body); font-size: 0.86rem; }
#s7 .s7-cmp td.s7-live.has { font-family: var(--f-mono); font-size: 0.92rem; }
#s7 .s7-cmp td.s7-live.has { color: var(--ink); }
#s7 .s7-cmp td.s7-live small.good { color: var(--good); }
#s7 .s7-cmp tr.s7-cur td { background: var(--tint); }
#s7 .s7-cmp tr.s7-cur td:first-child { box-shadow: inset 3px 0 0 var(--source); }
#s7 .s7-tries { margin-top: 6px; }

/* TUM frames */
#s7 .s7-frames { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 16px 0 4px; }
#s7 .s7-frame { margin: 0; min-width: 0; }
#s7 .s7-frame img { display: block; width: 100%; height: auto; border-radius: 8px; border: 3px solid var(--target); background: var(--surface); }
#s7 .s7-frame.src img { border-color: var(--source); }
#s7 .s7-frame figcaption { font-size: 0.88rem; margin-top: 6px; line-height: 1.35; }
#s7 .s7-ts { display: block; font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); overflow-wrap: anywhere; }
#s7 code { font-family: var(--f-mono); font-size: 0.88em; }

@media (max-width: 640px) {
  #s7 .s7-view { aspect-ratio: 4 / 3; }
  #s7 .s7-hint { font-size: 0.74rem; }
  #s7 .s7-cmp th, #s7 .s7-cmp td { padding: 7px 7px; font-size: 0.84rem; }
  #s7 .s7-cmp th { font-size: 0.66rem; }
  #s7 .s7-cmp th:first-child { min-width: 6.5rem; }
  #s7 .s7-cmp td.num > span { display: block; }   /* angle above distance, the same in every column */
}
