/* Tab-specific layout. One section per tab module. */
.small { font-size: 0.75rem; }
.fill > * { min-height: 0; }

/* Receiver */
.rx-main { display: flex; flex-direction: column; min-height: 520px; height: calc(100vh - var(--top-h) - var(--tick-h) - 2rem); }
[data-view="tv"] .rx-main { height: calc(95vh - var(--top-h) - var(--tick-h) - 2rem); }
.rx-controls { margin-bottom: 0.6rem; font-size: 0.8rem; }
.cad-wrap { margin-bottom: 0.5rem; }
.cadence { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.cad { font-size: 0.72rem; text-align: center; padding: 0.2rem 0; border: 1px solid var(--line); color: var(--ink-3); border-radius: var(--radius); }
.cad.on { color: var(--ink-2); }
.cad.now { border-color: var(--sig); color: var(--sig); background: var(--sig-faint); }
.cadence.small .cad { display: flex; flex-direction: column; gap: 0.1rem; }
.cadence.small .cad i { font-style: normal; font-size: 0.95rem; }
.cadence.small .cad.hit i { color: var(--sig); }
.cadence.small .cad.future { opacity: 0.45; }
.scanprog { margin-top: 4px; height: 3px; }
.spec { width: 100%; height: 80px; border: 1px solid var(--line); border-bottom: 0; background: var(--bg); }
.wf-wrap { flex: 1; min-height: 200px; border: 1px solid var(--line); background: var(--wf-0); position: relative; }
.wf { width: 100%; height: 100%; }
.wf-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.faxis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-3); padding-top: 0.3rem; }
.side { min-height: 0; }
.hits-scroll { max-height: 34vh; overflow: auto; }
.result { margin-top: 0.7rem; font-size: 0.82rem; }

/* Sky */
.sky-panel { display: flex; flex-direction: column; height: calc(100vh - var(--top-h) - var(--tick-h) - 2rem); min-height: 460px; }
.sky-wrap { position: relative; flex: 1; min-height: 300px; background: var(--bg); border: 1px solid var(--line); }
.skymap { width: 100%; height: 100%; }
.legend { font-size: 0.75rem; color: var(--ink-2); margin-top: 0.5rem; gap: 1rem; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.35rem; }
.qrow { display: grid; grid-template-columns: 1fr auto auto auto; gap: 0.5rem; align-items: center; font-size: 0.82rem; }

/* Analysis */
.testrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.runbar { animation: run 0.9s linear forwards; width: 0; }
@keyframes run { to { width: 100%; } }
.rio { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; margin-top: 0.6rem; }
.rio-cell { text-align: center; font-size: 0.7rem; padding: 0.25rem 0; border: 1px solid var(--line); color: var(--ink-3); border-radius: var(--radius); }
.rio-cell.lit { background: var(--sig-faint); color: var(--sig); border-color: var(--sig-dim); }
.rio-cell.lit.hi { background: var(--sig); color: var(--bg); }
.check { font-size: 0.8rem; color: var(--ink-2); margin: 0.25rem 0; flex-wrap: nowrap; align-items: flex-start; }
.check input { accent-color: var(--sig); margin-top: 0.2rem; }

/* Decoder */
.dec-main { display: flex; flex-direction: column; height: calc(100vh - var(--top-h) - var(--tick-h) - 2rem); min-height: 480px; }
.decgrid { flex: 1; width: 100%; min-height: 300px; }
.rawbits { display: flex; flex-wrap: wrap; gap: 1px; max-height: 220px; overflow: hidden; }
.rawbits i { width: 6px; height: 6px; background: var(--line); }
.rawbits i.b1 { background: var(--ink-2); }
.dictrow { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; font-size: 0.8rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }

/* Orders */
.order { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.7rem; margin-bottom: 0.6rem; background: var(--bg-2); }
.order.blocked { opacity: 0.5; }
.order.done { border-color: var(--ok); }
.order-task { font-size: 1rem; margin: 0.2rem 0 0.5rem; }
.rank { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 0.85rem; }
.rank.past { color: var(--ink-2); }
.rank.now { color: var(--sig); }

/* Crew */
.callsign { padding: 0.4rem 0 0.6rem; }
.op { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; display: flex; flex-direction: column; gap: 0.4rem; }
.op-name { font-family: var(--font-display); font-size: 1.35rem; }
.legacy { padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }

/* Tech */
.techgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.techcol { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.techcol.now { border-color: var(--sig-dim); }
.techhead .ph3 { margin: 0; }
.technode { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.2rem; }
.technode:hover { border-color: var(--line-strong); }
.technode.owned { border-color: var(--ok); }
.technode.avail { border-color: var(--sig-dim); }
.technode.lockd { opacity: 0.5; }
.technode.gate { border-style: double; border-width: 3px; }
.tn-name { font-size: 0.95rem; color: var(--ink); }

/* Contacts */
.traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; }
.trait { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.45rem 0.55rem; font-size: 0.85rem; background: var(--bg-2); }
.trait.unknown { color: var(--ink-3); border-style: dashed; }
.timeline { position: relative; height: 92px; margin: 0.6rem 1.5rem 0; }
.tl-line { position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: var(--line-strong); }
.tl-pt { position: absolute; top: 4px; transform: translateX(-50%); text-align: center; width: 120px; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink-3); margin: 0 auto 0.3rem; }
.tl-pt.now .tl-dot { background: var(--sig); border-color: var(--sig); }
.tl-yr { font-size: 0.85rem; }
.tl-lbl { color: var(--ink-3); }

/* Theory */
.theorygrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.7rem; align-content: start; }
.theory { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem; cursor: pointer; }
.theory:hover { border-color: var(--line-strong); }
.theory.committed { border-color: var(--sig); background: var(--sig-faint); }
.evidence { padding: 0.45rem 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }

/* Public */
.headline { font-family: var(--font-display); font-size: 1.05rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.heat { width: 100%; height: 120px; }

@media (max-width: 1100px) {
  .cols-main-side, .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .techgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
