/* scanner-hub public site. Same token set as the admin so the two read as one product. */
:root {
  color-scheme: light;
  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f8f9fb; --line: #e3e6ea; --line-strong: #cfd4da;
  --text: #171c23; --text-2: #525c69; --muted: #7b8594;
  --accent: #2a78d6; --accent-ink: #ffffff; --accent-soft: #e4eefb;
  --good: #1b7f3b; --good-soft: #e2f3e7; --warn: #8a5a00; --warn-soft: #fff1d6; --bad: #b3261e; --bad-soft: #fbe4e2;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08); --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111418; --surface: #191d23; --surface-2: #1f242b; --line: #2b323b; --line-strong: #3a434e;
    --text: #e7eaee; --text-2: #aeb6c1; --muted: #7f8a97;
    --accent: #3987e5; --accent-ink: #0b1220; --accent-soft: #1b2a40;
    --good: #5fd38a; --good-soft: #15301f; --warn: #ffcf7a; --warn-soft: #3a2c0d; --bad: #ff8a80; --bad-soft: #3d1a17;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111418; --surface: #191d23; --surface-2: #1f242b; --line: #2b323b; --line-strong: #3a434e;
  --text: #e7eaee; --text-2: #aeb6c1; --muted: #7f8a97;
  --accent: #3987e5; --accent-ink: #0b1220; --accent-soft: #1b2a40;
  --good: #5fd38a; --good-soft: #15301f; --warn: #ffcf7a; --warn-soft: #3a2c0d; --bad: #ff8a80; --bad-soft: #3d1a17;
  --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .in { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; height: 54px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.top nav { display: flex; gap: 4px; margin-left: 8px; }
.top nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.top nav a.active, .top nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.top form { margin-left: auto; display: flex; gap: 6px; }
.top input[type=search] { width: 240px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.head p { margin: 4px 0 0; color: var(--text-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
.card > h3 { margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.grid-2 > .card, .grid > .card { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.tile .label { font-size: 12.5px; color: var(--text-2); } .tile .value { font-size: 28px; font-weight: 600; margin-top: 2px; } .tile .sub { font-size: 12px; color: var(--muted); }
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
button, .btn { font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: 8px; padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
button.secondary, .btn.secondary { background: var(--surface); color: var(--accent); border-color: var(--accent); }
button.sm, .btn.sm { padding: 3px 10px; font-size: 12.5px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; } .filters label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; text-align: left; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; } tbody tr:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sub { font-size: 12.5px; color: var(--muted); } .muted { color: var(--muted); } .nowrap { white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .pill.on { background: var(--good-soft); color: var(--good); border-color: transparent; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
mark { background: var(--warn-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
audio { height: 30px; width: 100%; max-width: 260px; }
/* live page */
.now { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.now .big { font-size: 20px; font-weight: 600; } .now .tg { color: var(--text-2); }
.now .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.now.playing .dot { background: var(--good); box-shadow: 0 0 0 0 rgba(27,127,59,.5); animation: pulse 1.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(27,127,59,0); } 100% { box-shadow: 0 0 0 0 rgba(27,127,59,0); } }
.now .ctl { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.feed .call, .feed .feed-head { display: grid; grid-template-columns: 150px minmax(110px, 160px) minmax(90px, 170px) minmax(0, 1fr) 210px; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feed .feed-head { padding-top: 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.feed .call .sub { font-size: 12px; color: var(--muted); font-weight: 400; } .feed .call .t .sub, .feed .call .who .sub { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.feed .call audio { justify-self: end; }
.feed .call:last-child { border-bottom: 0; } .feed .call.active { background: var(--accent-soft); margin: 0 -18px; padding: 9px 18px; border-radius: 8px; }
.feed .call .t { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; white-space: nowrap; }
.feed .call .who { font-weight: 600; overflow-wrap: anywhere; } .feed .call .txt { color: var(--text); font-size: 14px; }
.feed .call .units { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
/* the columns follow the feed's own width: beside a sidebar or on a phone the units column goes, then the rows stack */
.feed { container-type: inline-size; }
@container (max-width: 940px) {
  .feed .call, .feed .feed-head { grid-template-columns: 150px minmax(90px, 150px) minmax(0, 1fr) 190px; }
  .feed .call .units, .feed .feed-head span:nth-child(3) { display: none; }
}
@container (max-width: 640px) {
  .feed .call { grid-template-columns: auto 1fr; gap: 6px 12px; } .feed .feed-head { display: none; }
  .feed .call > div:nth-child(4), .feed .call audio { grid-column: 1 / -1; max-width: none; justify-self: stretch; }
}
.tglist a { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 8px; color: var(--text); gap: 8px; }
.tglist a:hover { background: var(--surface-2); text-decoration: none; } .tglist a.on { background: var(--accent-soft); color: var(--accent); }
.tglist .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tglist h4 { margin: 10px 8px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tglist label { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.transcript p { margin: 6px 0; } .transcript .w { color: var(--muted); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.note { font-size: 12.5px; color: var(--muted); }
footer { max-width: 1180px; margin: 0 auto; padding: 0 16px 30px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; } .top input[type=search] { width: 140px; } .top nav a { padding: 6px 7px; }
}
@media (max-width: 640px) {
  .brand { white-space: nowrap; } .top nav { overflow-x: auto; scrollbar-width: none; } .top form { display: none; }   /* the Archive page has its own search box */
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.card.chips { display: block; } .card.chips h3 { margin-bottom: 8px; } .card.chips a { margin: 0 6px 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--text); background: var(--surface); }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip .n { font-size: 11px; color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 14px; } footer nav a { color: var(--muted); } footer nav a.active { color: var(--text); }
.prose { max-width: 760px; line-height: 1.65; }
.prose h2 { font-size: 17px; margin: 26px 0 8px; } .prose h3 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 22px 0 6px; }
.prose h4 { font-size: 14px; margin: 18px 0 4px; } .prose p { margin: 0 0 12px; } .prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; } .prose li { margin: 3px 0; }
.prose table.credits td { vertical-align: top; padding: 8px 10px 8px 0; } .prose table.credits td:first-child { white-space: nowrap; min-width: 170px; }

/* Listen page: chips to pick what to hear, a play button per call and the player docked at the bottom */
.listen .chips.pick { margin-top: 4px; }
.chips.pick .chip { min-height: 36px; padding: 0 14px; font-weight: 500; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); } .chip.on .n { color: inherit; opacity: .7; }
.chip.on:hover { color: var(--bg); }
.tgpick { margin-top: 10px; } .tgpick summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 500; }
.tgpick .chips { margin-top: 8px; } .tgpick .note { margin: 8px 0 0; }
.feed-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.feed-top h3 { margin: 0; }
.play { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 12px; display: inline-grid; place-items: center; cursor: pointer; }
.play:hover { border-color: var(--accent); color: var(--accent); }
.feed.player .call, .feed.player .feed-head { grid-template-columns: 36px 150px minmax(110px, 160px) minmax(90px, 170px) minmax(0, 1fr); }
.feed.player .call.active .play { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@container (max-width: 940px) {
  .feed.player .call, .feed.player .feed-head { grid-template-columns: 36px 150px minmax(90px, 150px) minmax(0, 1fr); }
}
@container (max-width: 640px) {
  .feed.player .call { grid-template-columns: 36px auto 1fr; }
  .feed.player .call > div:nth-child(5) { grid-column: 2 / -1; }
}
.wrap:has(.dock) { padding-bottom: 120px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--text); color: var(--bg); box-shadow: 0 -2px 12px rgba(16, 24, 40, .18); }
.dock .in { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.dock .play.big { width: 44px; height: 44px; font-size: 14px; background: var(--bg); color: var(--text); border: 0; flex: none; }
.dock .what { min-width: 0; flex: 1 1 220px; } .dock .big { font-weight: 600; } .dock .sub { color: inherit; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .bar { flex: 1 1 140px; height: 4px; border-radius: 99px; background: rgba(128, 128, 128, .45); min-width: 100px; overflow: hidden; }
.dock .bar div { height: 100%; width: 0; background: var(--bg); border-radius: 99px; transition: width .25s linear; }
.dock.playing .big::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 8px; vertical-align: middle; }
.dock button.ghost { background: transparent; color: inherit; border: 1px solid rgba(128, 128, 128, .6); padding: 6px 12px; }
.dock .check { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) { .dock .bar { order: 9; flex-basis: 100%; } .dock #queue:empty { display: none; } }
