/* The scanner (scanner-view.mjs): the Listening Post on the map, and its radio in the post's Tune window. Teal is only
   yours (the needle, the hold zone, the lock); amber is the stations, the catches and the post's ping. */

/* The post on the map: a hub's diamond with an antenna; a ring pings out of it while something is on the air. */
.mnode.post .post-ping { fill: none; stroke: var(--amber); stroke-width: 1.2; animation: post-ping 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes post-ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.4); opacity: 0; } }
.mnode.post:not(.live) .hub-frame { opacity: 0.7; }
.mnode.post:not(.live) .hub-mark { opacity: 0.6; }
.hub-term .post-by { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font: var(--label); letter-spacing: var(--label-track); color: var(--muted); }
.hub-term .post-by svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* The radio, in the Tune window: the frequency and counts | the dial and the transcript | the station and the lock;
   the tape under them. */
.sc-strip { display: grid; grid-template-columns: 190px minmax(0, 1fr) 260px; border: 1px solid var(--line); border-radius: var(--r-card); background: #0a0703; }
.sc-strip > * { padding: 10px 12px; min-width: 0; }
.sc-strip .glyph, .post-win .glyph { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sc-l { display: grid; align-content: space-between; gap: 12px; border-right: 1px solid var(--line); }
.sc-freq { font: 500 22px var(--mono); color: var(--bright); letter-spacing: 0.5px; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.sc-freq small { font-size: 11px; color: var(--muted); margin-left: 3px; }
.sc-counts { display: flex; gap: 10px; }
.sc-counts button { display: inline-flex; gap: 4px; align-items: center; color: var(--amber); font: 500 11px var(--mono); padding: 1px 2px; background: none; border: 1px solid transparent; border-radius: var(--r-btn); cursor: pointer; }
.sc-counts button:hover { border-color: var(--line-strong); }
.sc-counts em { font-style: normal; color: var(--muted); }
.sc-strip .sc-counts .glyph { width: 12px; height: 12px; }

.sc-m { display: grid; align-content: start; gap: 4px; padding-top: 8px; }
.sc-dial { position: relative; height: 50px; cursor: ew-resize; touch-action: none; user-select: none; overflow: hidden; outline: none; border-radius: var(--r-tag); }
.sc-dial:focus-visible { box-shadow: inset 0 0 0 1px var(--line-strong); }
.sc-dial.fine { background: var(--amber-wash); }
.sc-band { position: absolute; top: 0; bottom: 0; left: 10px; right: 10px; }
.sc-scale { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sc-scale line { stroke: var(--amber-deep); }
.sc-scale line.big { stroke: var(--muted); }
.sc-scale text { fill: var(--dim); font: 10px var(--mono); }
.sc-glow { position: absolute; top: 3px; height: 24px; width: 56px; margin-left: -28px; background: radial-gradient(closest-side, rgba(241, 185, 47, 0.55), rgba(241, 185, 47, 0)); pointer-events: none; }
.sc-glow.old { background: radial-gradient(closest-side, rgba(185, 157, 97, 0.4), rgba(185, 157, 97, 0)); }
.sc-carrier { position: absolute; top: 2px; height: 30px; width: 2px; margin-left: -1px; background: var(--amber); box-shadow: 0 0 6px rgba(241, 185, 47, 0.9); pointer-events: none; }
.sc-zone { position: absolute; top: -2px; height: 36px; background: rgba(127, 209, 199, 0.12); border-left: 1px solid rgba(127, 209, 199, 0.45); border-right: 1px solid rgba(127, 209, 199, 0.45); pointer-events: none; }
.sc-needle { position: absolute; top: -2px; height: 36px; width: 2px; margin-left: -1px; background: var(--you); box-shadow: 0 0 6px rgba(127, 209, 199, 0.6); pointer-events: none; }
.sc-needle::before { content: ''; position: absolute; top: -2px; left: -4px; border: 5px solid transparent; border-top-color: var(--you); }
.sc-tx { font: 500 12px/1.5 var(--mono); color: var(--text); letter-spacing: 0.3px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.sc-tx.static { color: var(--gray); }
.sc-tx.tr { color: var(--muted); }

.sc-r { border-left: 1px solid var(--line); display: grid; align-content: start; gap: 10px; }
.sc-who-row { display: flex; align-items: center; gap: var(--s4); color: var(--amber); min-width: 0; }
.sc-who { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.sc-who b { font: 600 12px var(--mono); color: var(--bright); letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-who b.q { color: var(--dim); font-weight: 500; }
.sc-meter { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.sc-meter i { width: 5px; height: 10px; border: 1px solid var(--amber-deep); }
.sc-meter i.on { background: var(--amber); border-color: var(--amber); }
.sc-meter b { width: 22px; margin-left: 5px; font: 600 11px var(--mono); color: var(--muted); }
.sc-lock { height: 2px; background: rgba(127, 209, 199, 0.12); }
.sc-lock i { display: block; height: 100%; width: 0; background: var(--you); }
.sc-result { display: flex; align-items: center; gap: var(--s4); min-height: var(--h-chip); }
.sc-ok { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; color: var(--amber); font: 600 11px var(--mono); letter-spacing: 1px; }
.sc-ok .glyph { width: 13px; height: 13px; }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; height: var(--h-chip); padding: 0 7px; border: 1px solid var(--line-strong); border-radius: var(--r-btn); color: var(--amber); font: 600 11px var(--mono); white-space: nowrap; background: rgba(10, 7, 3, 0.9); }
.sc-chip small { color: var(--muted); font-weight: 400; }
.sc-chip .glyph { width: 13px; height: 13px; }

/* The tape: one row, under the radio and in Recordings */
.sc-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 8px 12px; }
.sc-tape { display: flex; align-items: center; gap: 10px; color: var(--amber); font: 500 12px var(--mono); min-height: 26px; }
.sc-tape b { color: var(--bright); font-weight: 600; letter-spacing: 0.5px; }
.sc-tape-k { font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); min-width: 64px; }
.sc-tape-f { color: var(--text); font-variant-numeric: tabular-nums; }
.sc-tape-t { color: var(--muted); }
.sc-tape .btn, .sc-tape .sc-ok { margin-left: auto; }
.sc-tape.q { color: var(--dim); }

/* The log, in its window */
.sc-logcard { display: grid; gap: 12px; }
.sc-logcard .glyph { width: 14px; height: 14px; }
.sc-sec { display: grid; gap: 5px; }
.sc-sec .lbl { display: flex; gap: 6px; align-items: center; font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--muted); }
.sc-sec .lbl em { font-style: normal; margin-left: auto; }
.sc-row-l { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; font: 500 12px var(--mono); color: var(--text); }
.sc-row-l.q { color: var(--dim); }

.hub-session.with-win:has(.post-win.tune) { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.no-motion .mnode.post .post-ping { animation: none; opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .mnode.post .post-ping { animation: none; opacity: 0.6; } }
/* A narrow screen: the three columns stack */
@media (max-width: 1100px) {
  .sc-strip { grid-template-columns: minmax(0, 1fr); }
  .sc-l { grid-auto-flow: column; justify-content: space-between; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .sc-r { border-left: 0; border-top: 1px solid var(--line); }
}
