/* SIGINT console: tactical-green accent, dense metric readouts, data tables,
   and a bearing plot. Reuses console.css for the shared chassis. */
body.sigint {
  --amber: #7de27d;       /* accent → phosphor green */
  --amber-lo: #2f6b35;
}
body.sigint .vfo { text-shadow: 0 0 14px rgba(125, 226, 125, 0.35); }
body.sigint .mode-badge { color: #04120a; }
body.sigint .nodevice { background: #070f0a; }
body.sigint { --res-glow: 125, 226, 125; }
body.sigint .btn-res { background: #0d160f; }
body.sigint .btn-res:hover, body.sigint .res-close:hover { background: #142019; }
body.sigint .res-sign { background: radial-gradient(120% 120% at 50% 0%, #0f1c12 0%, #070f0a 70%); }

.sigconsole .panelstack { overflow-y: auto; }

/* While a sweep runs, the waterfall (signal history) is useless — the tuner is
   hopping — so replace it with a live scan deck in that same space, right under
   the spectrum. You watch the channel light up above and respond below without
   moving your eyes to the rail. Reverts to the waterfall when the scan ends. */
.scandeck { display: none; min-height: 70px; flex-direction: column;
  background: #060b08; border-top: 1px solid #141c16; overflow: hidden; }
/* Three stacked displays while sweeping: spectrum (live now) on top, a smaller
   waterfall (recent history) in the middle, and the scan deck (hits + respond)
   at the bottom. The waterfall stays visible, just shorter. */
body.sigint.scanning #splitter { display: none; }
body.sigint.scanning .spec-wrap { flex: 1 1 0; min-height: 110px; }
body.sigint.scanning .wf-wrap { flex: 0 0 24%; min-height: 48px; }
body.sigint.scanning .scandeck { display: flex; flex: 1 1 0; min-height: 110px; }

.sd-head { display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  border-bottom: 1px solid #141c16; background: #0a130d; }
.sd-title { font: 600 11px var(--ui); letter-spacing: 0.14em; color: var(--amber-lo); }
.sd-status { flex: 1; font: 500 13px var(--num); color: var(--amber); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-stop { background: #2a1414; color: #ff9b9b; border-color: #512; }
.sd-stop:hover { background: #3a1a1a; }

.sd-prompt { padding: 10px 12px; background: #0c1711; border-bottom: 1px solid #16241a;
  box-shadow: inset 0 0 0 1px rgba(125,226,125,0.18); }
.sd-ptext { margin: 0 0 8px; font: 500 15px var(--num); color: #dff3df; }
.sd-ptext b { color: var(--amber); }
.sd-keys { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-keys button { flex: 1 1 110px; padding: 9px 10px; font-size: 14px; }

.sd-listwrap { flex: 1; overflow: auto; scrollbar-width: thin; }
.sd-listwrap .sigtbl { width: 100%; }
.sd-listwrap .sigtbl thead th { position: sticky; top: 0; background: #0a130d; z-index: 1; }
.scandeck .sigtbl tr.stale { opacity: 0.45; }
.scandeck .sigtbl td.f { color: var(--amber); cursor: pointer; }

/* panel accents */
.panel.sig .legend, .panel.tuning-top .legend { color: var(--amber); }
.panel.sig .legend::after, .panel.tuning-top .legend::after { background: linear-gradient(90deg, #2f6b35, transparent); }
.legend .count, .legend .devbadge { float: right; font: 500 11px var(--num); color: var(--legend); letter-spacing: 0; }

/* measurement grid */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 8px; }
.metric { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #141c16; padding: 3px 0; }
.mk { color: var(--legend); font: 500 12px var(--ui); letter-spacing: 0.03em; }
.mv { font: 400 14px var(--num); color: #d6ece0; }
.classrow { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0; }
.classval { font: 600 15px var(--ui); color: var(--amber); text-align: right; }

/* on-demand analysis */
.panel.analyze .entry { margin-bottom: 6px; }
.an-ask { background: #0d1510; border: 1px solid var(--amber-lo); border-radius: 4px; padding: 8px; margin: 6px 0; }
.an-ask .note { margin: 0 0 7px; color: #d6ece0; }
.an-ask .note b { color: var(--amber); }
.an-busy { margin: 10px 0; }
.an-bar { height: 6px; border-radius: 3px; background: #14201a; overflow: hidden; }
#anBarFill { height: 100%; width: 0; background: var(--amber); transition: width 0.1s linear; box-shadow: 0 0 8px rgba(125, 226, 125, 0.5); }
.an-busy .note { margin: 6px 0 0; text-align: center; color: var(--legend); }
#anActions { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.matches li.known { border-color: var(--amber-lo); box-shadow: 0 0 0 1px var(--amber-lo); }
.matches li.known b { color: var(--amber); }
.sigtbl tr.skipped td { color: #7a8a6a; font-style: italic; }

/* candidate matches */
.matches { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.matches li { position: relative; background: #0d1510; border: 1px solid #16211a; border-radius: 3px; padding: 5px 8px; }
.matches b { font: 600 14px var(--ui); color: #e3f3ea; letter-spacing: 0.02em; }
.matches .score { position: absolute; top: 5px; right: 8px; font: 600 12px var(--num); color: var(--amber); }
.matches small { display: block; color: var(--legend); font-size: 12px; line-height: 1.35; margin-top: 1px; padding-right: 36px; }

/* Other modulation possibilities (ranked under the primary estimate). */
.an-alts { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 8px; }
.an-alts .alt { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--legend); }
.an-alts .altc { color: #bfe8bf; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-alts .altw { text-align: right; opacity: 0.8; }

/* Neighbors in view + harmonic relationships. */
.an-sub { margin: 2px 0 8px; display: flex; flex-direction: column; gap: 2px; }
.an-subhead { font: 600 11px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-lo); margin-top: 4px; }
.nbr { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; font-size: 13px; }
.nbr .nf { color: var(--amber); font-family: var(--num); }
.nbr .nn { color: var(--legend); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbr .ns { color: #9fd49f; font-family: var(--num); }
.harm { font-size: 12.5px; color: var(--legend); padding: 2px 0; line-height: 1.3; }
.harm.confirmed { color: var(--amber); }

/* compact field grids */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-bottom: 6px; }
.grid2 .row { margin: 0; }
.row .unit { color: var(--legend); font: 400 12px var(--num); margin-left: 4px; }
label.col { display: flex; flex-direction: column; gap: 3px; margin: 4px 0; }
label.col > span { color: var(--legend); font: 500 12px var(--ui); letter-spacing: 0.03em; }
textarea { width: 100%; box-sizing: border-box; background: #0b120d; color: #d6ece0; border: 1px solid var(--plate-edge);
  border-radius: 3px; padding: 6px 8px; font: 400 13px var(--num); resize: vertical; }
textarea.report { background: #060b08; color: var(--amber); white-space: pre; overflow: auto; }

/* data tables */
.tblwrap { max-height: 230px; overflow: auto; border: 1px solid #141c16; border-radius: 3px; margin-top: 6px; scrollbar-width: thin; }
.sigtbl { width: 100%; border-collapse: collapse; font: 400 13px var(--num); }
.sigtbl th { position: sticky; top: 0; background: #0c1510; color: var(--legend); font: 600 11px var(--ui); letter-spacing: 0.05em;
  text-align: left; padding: 5px 8px; border-bottom: 1px solid #1c2820; }
.sigtbl td { padding: 4px 8px; border-bottom: 1px solid #111a14; color: #ccd7d0; }
.sigtbl td.f { color: var(--amber); }
.sigtbl td.n { text-align: right; }
.sigtbl td.dim, .sigtbl .dim { color: #566; }
.sigtbl tbody tr:hover { background: #0f1912; }

/* direction-finding plot */
.dfplot { display: block; width: 100%; max-width: 300px; margin: 2px auto 6px; background: #070f0a; border-radius: 6px; box-shadow: inset 0 0 0 1px #16211a; }

.tiny { font-size: 11px; line-height: 1.4; margin: 4px 0 0; }
.count { color: var(--legend); }

/* discovery: primary action, band chips, keep-scanning toggle */
.panel.discovery { box-shadow: inset 0 0 0 1px rgba(125, 226, 125, 0.12); }
.mini.wide { width: 100%; margin: 6px 0; padding: 8px; font-size: 15px; }
.mini.primary { background: var(--amber); color: #04120a; font-weight: 700; border-color: var(--amber); }
.mini.primary:hover { box-shadow: 0 0 12px rgba(125, 226, 125, 0.4); }
.mini.primary.on { background: #0e1711; color: var(--amber); }
details.sub { margin-top: 6px; }
details.sub > summary { cursor: pointer; color: var(--legend); font: 500 12px var(--ui); letter-spacing: 0.04em; list-style: none; padding: 4px 0; }
details.sub > summary::-webkit-details-marker { display: none; }
details.sub > summary::before { content: "▸ "; }
details.sub[open] > summary::before { content: "▾ "; }
/* The UA rule that hides a closed <details>'s content is display:none, which a
   child's own display (.chips is display:flex) outranks — so without this the
   chips stayed visible while the plain <p> collapsed. Re-hide every non-summary
   child with enough specificity to win. */
details.sub:not([open]) > *:not(summary) { display: none !important; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.chip {
  font: 500 12px var(--ui); letter-spacing: 0.02em; color: #c2c9cc;
  background: #0e1711; border: 1px solid #1a241d; border-radius: 12px; padding: 4px 10px; cursor: pointer;
}
.chip:hover { background: #142019; }
.chip.on { color: #04120a; background: var(--amber); border-color: var(--amber); }
.chk { display: flex; align-items: center; gap: 7px; margin: 6px 0 2px; color: var(--legend); font: 400 13px var(--ui); cursor: pointer; }
.chk input { accent-color: var(--amber); }
.sigtbl tr.stale td { color: #5a6460; }
.sigtbl tr.stale td.f { color: #3f6b47; }
.sigtbl tr.unconf td { font-style: italic; opacity: 0.72; }

/* advanced drawer (same affordance as digital) */
details.adv { padding: 0; }
details.adv > summary.legend { color: var(--amber); }   /* match other section headers */
details.adv > summary { cursor: pointer; padding: 8px 10px; margin: 0; list-style: none; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::after { content: "▸"; float: right; color: var(--legend); }
details.adv[open] > summary::after { content: "▾"; }
.adv-body { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 4px; }

.modes { grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 8px; }
#modeKeys button[aria-pressed="true"] { color: #04120a; background: var(--amber); box-shadow: 0 0 10px rgba(125,226,125,0.3); }
.mini.on { color: #04120a; background: var(--amber); }

@media (max-width: 900px) {
  .metrics { grid-template-columns: 1fr 1fr; }
}
