/* Layout: a radio panel on top, the exchange log in the middle, the
   press-to-talk dock at the bottom, the notice last. */
:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #15202b;
  --muted: #5a6977;
  --line: #d6dde4;
  --accent: #0b6e99;
  --accent-ink: #ffffff;
  --ok: #217a4a;
  --bad: #b8382b;
  --note: #9a6400;
  --display-bg: #0c1013;
  --display-ink: #ffb000;
  --display-dim: #8a6a2a;
  --tx-tower: #e8f1f7;
  --tx-traffic: #eef0f2;
  --tx-you: #fbfaf5;
  --rec: #d33a2c;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418; --panel: #161d23; --ink: #e5ecf2; --muted: #96a4b1; --line: #29343e;
    --accent: #4fb0de; --accent-ink: #061018; --ok: #55c48c; --bad: #ff7d6e; --note: #e6b14d;
    --tx-tower: #14232e; --tx-traffic: #1b2228; --tx-you: #1d1f1a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
.app { max-width: 820px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 32px; display: grid; gap: 18px; }
kbd { font-family: var(--mono); font-size: .85em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--panel); }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 14px; }
button:hover { border-color: var(--accent); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; padding: 10px 18px; justify-self: start; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.brand h1 { margin: 0; font-size: 28px; letter-spacing: -.01em; }
.tagline { margin: 0; color: var(--muted); }
.radio { background: var(--display-bg); color: var(--display-ink); border-radius: 8px; padding: 8px 14px; font-family: var(--mono); display: grid; gap: 2px; min-width: 230px; box-shadow: inset 0 0 0 1px #000; }
.radio-row { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.radio-label { color: var(--display-dim); font-size: 12px; letter-spacing: .08em; align-self: center; }
.radio-value { font-size: 17px; letter-spacing: .06em; }

.intro { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: grid; gap: 12px; }
.intro p { margin: 0; max-width: 68ch; }
.how { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 68ch; }
.options { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; }
.options input { accent-color: var(--accent); }
.mode-note { color: var(--muted); font-size: 14px; }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
/* the press-to-talk dock sticks to the bottom: keep new entries above it */
.log > li { scroll-margin-bottom: 260px; }
.tx { border-radius: 10px; padding: 10px 14px; display: grid; gap: 4px; border: 1px solid var(--line); min-width: 0; }
.tx.tower, .tx.ground { background: var(--tx-tower); }
.tx.traffic { background: var(--tx-traffic); color: var(--muted); }
.tx.you { background: var(--tx-you); }
.tx-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.who { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.verdict { letter-spacing: 0; }
.tx.you.ok .verdict { color: var(--ok); }
.tx.you.ko .verdict { color: var(--bad); }
.text { overflow-wrap: anywhere; }
.text.hidden-text { filter: blur(6px); cursor: pointer; user-select: none; }
.text.hidden-text::after { content: ""; }
.replay { font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.findings { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: 15px; }
.findings li { padding-left: 22px; position: relative; }
.findings li::before { position: absolute; left: 0; font-family: var(--mono); font-weight: 700; }
.findings li.error { color: var(--bad); }
.findings li.error::before { content: "✗"; }
.findings li.note { color: var(--note); }
.findings li.note::before { content: "•"; }
.example { font-size: 14px; color: var(--muted); }
.example b { font-weight: 600; color: var(--ink); }
.summary { background: var(--panel); border: 1px solid var(--ok); border-radius: 10px; padding: 12px 14px; }

.dock { position: sticky; bottom: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
.hint { margin: 0; font-weight: 600; }
.hint .label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--accent); margin-right: 8px; }
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ptt { display: flex; align-items: center; gap: 14px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 2px solid var(--accent); background: var(--panel); touch-action: none; user-select: none; -webkit-user-select: none; }
.ptt-ring { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; position: relative; overflow: hidden; }
.ptt-level { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(255, 255, 255, .45); transition: height .06s linear; }
.ptt.rec { border-color: var(--rec); }
.ptt.rec .ptt-ring { background: var(--rec); }
.ptt.busy { opacity: .6; }
.ptt-text { font-weight: 600; }
.side { display: flex; flex-wrap: wrap; gap: 8px; }
.type-form { display: flex; gap: 8px; }
.type-form input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.status { margin: 0; min-height: 1.5em; color: var(--muted); font-size: 14px; }

.notice { color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
.notice p { margin: 0; max-width: 75ch; }

@media (max-width: 520px) {
  .radio { min-width: 0; width: 100%; }
  .ptt { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ptt-level { transition: none; } }
