/* angelcast · publish review site: the one stylesheet.
   From design/today.html (Decision 10). Fonts are loaded by the layout from
   Google Fonts: Barlow Condensed (display), Source Sans 3 (body), JetBrains
   Mono (ids, times, durations). Layout: top bar + nav, episode header, three
   chapter columns that stack on phones. */
:root {
  --bg: #f3f5f2; --panel: #ffffff; --ink: #18211c; --muted: #5d6b63; --rule: #d6ddd7;
  --accent: #1f7a4d; --accent-ink: #ffffff; --accent-soft: #e2f1e8;
  --warn: #9a5b00; --warn-soft: #fff1d6; --bad: #b3261e; --bad-soft: #fbe3e1;
  --ever: #5b4bb7; --ever-soft: #ebe8fb;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111613; --panel: #19201c; --ink: #e6ece8; --muted: #9aa8a0; --rule: #2b352f;
  --accent: #4cc38a; --accent-ink: #0d1a13; --accent-soft: #1d3328;
  --warn: #f0b75a; --warn-soft: #3a2c12; --bad: #f2867d; --bad-soft: #3d1d1b;
  --ever: #a99cf5; --ever-soft: #29243f; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #111613; --panel: #19201c; --ink: #e6ece8; --muted: #9aa8a0; --rule: #2b352f;
  --accent: #4cc38a; --accent-ink: #0d1a13; --accent-soft: #1d3328;
  --warn: #f0b75a; --warn-soft: #3a2c12; --bad: #f2867d; --bad-soft: #3d1d1b;
  --ever: #a99cf5; --ever-soft: #29243f; color-scheme: dark }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-wrap: anywhere; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; padding-inline: 16px; padding-block: 0 48px; }
.wrap { max-width: 1240px; margin: 0 auto; display: grid; gap: 20px; }
.mono { font-family: var(--mono); font-size: 0.85em; font-variant-numeric: tabular-nums; }

header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 12px; border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--display); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.brand span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav.tabs { flex: 1 1 360px; }
nav.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
nav.tabs a:hover { color: var(--ink); }
nav.tabs a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.who { color: var(--muted); font-size: 0.85rem; }

nav.strip { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; padding: 4px 4px 10px; }
nav.strip form { margin: 0; flex: none; }
.tile { flex: none; width: 120px; aspect-ratio: 54 / 70; border: 0; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; text-align: left; text-decoration: none; font: inherit; color: #fff; background: var(--tile, var(--accent)); cursor: pointer; }
.tile .tile-top, .tile .tile-bottom { font-size: 0.72rem; opacity: 0.88; text-transform: uppercase; }
.tile .tile-title { font-family: var(--display); font-size: 1.3rem; line-height: 0.95; text-transform: uppercase; overflow-wrap: anywhere; }
.tile[aria-current] { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.tile.off { opacity: 0.55; }
.tile.new { background: transparent; border: 2px dashed var(--rule); color: var(--muted); }
.tile.new:hover { color: var(--ink); border-color: var(--muted); }

.banners { display: grid; gap: 8px; }
.flow-warnings { margin-bottom: 12px; }
.banner { padding: 10px 14px; border-radius: 6px; line-height: 1.5; }
.banner a { margin-left: 6px; }
.banner.one-time code { display: block; margin-top: 6px; font-size: 1.15rem; user-select: all; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner b { font-weight: 600; }

.ep { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; }
.ep h1 { font-family: var(--display); font-size: 2.2rem; line-height: 1.05; margin: 0; text-transform: uppercase; text-wrap: balance; }
.ep .sub { color: var(--muted); margin-top: 4px; }
.status { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
/* The night's status is its own row under the title, Publish now at its right end. */
.ep .status { flex: 1 1 100%; }
.kv { display: grid; gap: 2px; }
.kv small { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 0.82rem; }
.pill.ready { background: var(--accent-soft); color: var(--accent); }
.pill.published { background: var(--accent); color: var(--accent-ink); }
.pill.generating, .pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.failed, .pill.rejected { background: var(--bad-soft); color: var(--bad); }
.pill.evergreen { background: var(--ever-soft); color: var(--ever); }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); border-radius: 6px; padding: 7px 12px; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, nav a:focus-visible, .play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: 0.5; cursor: default; }

.chapters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 16px; align-items: start; }
.ch { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; display: grid; min-width: 0; }
.ch-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--rule); display: grid; gap: 8px; }
.ch-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ch-num { font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ch h2 { font-family: var(--display); font-size: 1.45rem; line-height: 1.1; margin: 0; text-wrap: balance; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.tag.news { background: var(--accent-soft); color: var(--accent); }
.tag.ever { background: var(--ever-soft); color: var(--ever); }
.tag.rej { background: var(--bad-soft); color: var(--bad); }
.tag.ok { background: var(--accent); color: var(--accent-ink); }
.score { display: flex; gap: 10px; align-items: center; }
.meter { flex: 1; height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.reason { color: var(--muted); font-size: 0.9rem; margin: 0; }

.versions { display: grid; }
.v { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.v.live { background: var(--accent-soft); }
.play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.play svg { width: 12px; height: 12px; fill: currentColor; }
.v-mid { min-width: 0; display: grid; gap: 4px; }
.v-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.v-line b { font-weight: 600; }
.bar { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }
.flag { font-size: 0.72rem; color: var(--warn); }
.marks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: end; }
.mark { font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--rule); color: var(--muted); }
.mark.picker { border-color: var(--muted); }
.mark.chosen { border-color: var(--accent); color: var(--accent); }
.v .btn { padding: 4px 8px; font-size: 0.8rem; }

.ch-foot { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ch-meta { padding: 0 16px 14px; color: var(--muted); font-size: 0.82rem; }

.spares { background: var(--panel); border: 1px dashed var(--rule); border-radius: 8px; padding: 14px 16px; margin: 12px 0; }
.spares h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; margin: 0 0 8px; }
.spares ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.spares li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 0.9rem; }
.spares .spare-title { font-weight: 600; overflow-wrap: anywhere; }
.spares .spare-versions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.spares .v { display: inline-flex; gap: 6px; padding: 0; border: 0; }
.log { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; }
.log h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; margin: 0 0 8px; }
.log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.log li { display: grid; grid-template-columns: 11.5em 1fr; gap: 12px; font-size: 0.9rem; }
.log li .mono { color: var(--muted); }
@media (max-width: 520px) { .log li { grid-template-columns: 1fr; gap: 0; } }
/* Top right, clear of the page's text; the header is 56px tall. */
.toast { position: fixed; top: 64px; right: 16px; max-width: min(440px, calc(100vw - 32px)); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; font-weight: 600; z-index: 10; }
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }

/* Sign-out is a POST form that reads as a link in .who */
form.who { margin: 0; display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.link { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.main { display: grid; gap: 20px; min-width: 0; }
.muted { color: var(--muted); }
.page-title { font-family: var(--display); font-size: 2.2rem; line-height: 1.05; margin: 0; text-transform: uppercase; text-wrap: balance; }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel.narrow { max-width: 440px; width: 100%; margin-inline: auto; margin-top: 24px; }

/* Forms (Stage V pages) */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field > span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 10px; width: 100%; min-width: 0; }
.field textarea { min-height: 6em; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field .hint { color: var(--muted); font-size: 0.82rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 8px 12px; border-radius: 6px; margin: 0; font-weight: 600; }

/* Tables (Stage V pages): scroll inside their own box, never the page */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
table.list { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.list th { text-align: left; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.list td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list a { color: inherit; }

/* Empty states */
.empty { background: var(--panel); border: 1px dashed var(--rule); border-radius: 8px; padding: 28px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; margin: 0; color: var(--ink); }
.empty p { margin: 0; }

/* Evergreens: one section per show */
.show-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.show-section { display: grid; gap: 12px; min-width: 0; padding-top: 12px; border-top: 2px solid var(--rule); scroll-margin-top: 12px; }
.show-section.current { border-top-color: var(--ink); }
.show-heading { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; margin: 0; }
.show-section h3 { margin: 4px 0 0; }
/* Run ids are long and unbroken; let them wrap rather than widen the table. */
.run-ids .mono { overflow-wrap: anywhere; }

/* Today: the night pipeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px; }
.step { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; background: var(--panel); }
.step-label { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1rem; }
.step-detail { font-size: 0.85rem; overflow-wrap: anywhere; }
.step.done { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.step.current { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.step.failed { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.step.waiting { color: var(--muted); }
.panel-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.panel-head h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; margin: 0; }
.panel-head .mono { overflow-wrap: anywhere; }
.candidates .table-wrap { overflow-x: auto; max-width: 100%; }
.topic { margin: 0; font-size: 0.9rem; }
.mono.run { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.writing { padding: 10px 16px; border-bottom: 1px solid var(--rule); background: var(--warn-soft); color: var(--ink); display: grid; gap: 6px; }
.writing p { margin: 0; }
.ch-top { flex-wrap: wrap; }

/* Story page: script and memory span the whole version row */
.story-page h1 { font-family: var(--display); font-size: 1.8rem; line-height: 1.1; margin: 0; text-wrap: balance; }
.story-page .ch-meta { padding: 0; }
.interest { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.interest .meter { flex: 1 1 120px; max-width: 240px; }
.interest > span:last-child { flex: 1 1 100%; color: var(--muted); font-size: 0.9rem; }
.story-page .v { align-items: start; row-gap: 6px; }
.play-none { width: 34px; height: 34px; }
.v-run { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; font-size: 0.85rem; color: var(--muted); }
.v-status { font-weight: 600; }
.v-status.succeeded { color: var(--accent); }
.v-status.failed { color: var(--bad); }
.v-status.pending { color: var(--warn); }
.v-fail { color: var(--bad); font-size: 0.85rem; }
.script, .memory { grid-column: 1 / -1; min-width: 0; }
.script summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.script p { margin: 6px 0 0; max-width: 72ch; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.memory { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 0.88rem; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { min-width: 0; overflow-wrap: anywhere; }

[hidden] { display: none !important; }
/* Version rows drive their audio from the play button; other players keep their controls. */
.v audio { display: none; }
.hint { color: var(--muted); font-size: 0.8rem; }
/* The hint sits left of the button, so the button stays level with Goes out. */
.publish-now { display: flex; flex-direction: row-reverse; align-items: center; gap: 12px; margin-left: auto; }
.publish-now .hint { max-width: 18rem; text-align: right; }
.publish-confirm { max-width: min(28rem, calc(100vw - 32px)); background: var(--panel); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }
.publish-confirm::backdrop { background: rgb(0 0 0 / 0.4); }
.publish-confirm h3 { margin: 0 0 8px; }
.publish-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.publish-confirm-actions a.btn { text-decoration: none; }
details.source { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
details.source summary { cursor: pointer; }
details.source p { margin: 4px 0 0; max-width: 72ch; line-height: 1.5; color: var(--ink); }
/* Candidate tables: the topic is a clamped headline, so the number columns never squeeze. */
table.list td.topic-cell { min-width: 22ch; max-width: 52ch; }
table.list td.score-cell .mono, table.list td.run-cell { white-space: nowrap; }

/* Phone width: 16px gutter (body), nothing wider than the screen */
@media (max-width: 520px) {
  .ep h1, .page-title { font-size: 1.7rem; }
  .v { grid-template-columns: auto 1fr; }
  .v .marks { grid-column: 1 / -1; justify-content: start; }
  .story-page .v > form { grid-column: 1 / -1; }
  .status { gap: 12px; }
}

/* Today C: the night as a track list (design/Today.dc.html) */
.ep .kicker, .ep .night-name { margin: 0; color: var(--muted); }
.ep .night-name { font-weight: 600; }
.ep h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; line-height: 0.95; }
.goes-out b { font-size: 1.6rem; }
.chapters.tracks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.track { display: grid; grid-template-columns: auto minmax(15rem, 1fr) minmax(0, max-content) minmax(0, max-content); gap: 12px 18px; align-items: center; padding: 16px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--rule); }
.track.ever-track { border-color: var(--ever-soft); }
.track.writing-track { border-style: dashed; }
.track-no { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--muted); min-width: 1.2ch; text-align: center; }
.track-mid { min-width: 0; display: grid; gap: 4px; }
.track h2 { font-family: var(--body); font-size: 1.2rem; font-weight: 700; line-height: 1.25; margin: 0; text-wrap: balance; }
.track-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; }
.track-meta .score { display: inline-flex; min-width: 9rem; }
/* The title keeps 15rem; chips and actions wrap rather than crush it. */
.track .versions { display: flex; flex-wrap: wrap; gap: 6px; align-self: start; min-width: 0; }
.track .v { display: grid; grid-template-columns: auto auto; gap: 2px 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 12px; background: var(--bg); }
.track .v.live { background: var(--accent-soft); border-color: var(--accent); }
.track .v .v-mid { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 0.75rem; max-width: 16rem; }
.track .v .marks { justify-content: start; }
.vb { font: inherit; font-weight: 700; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; }
.vb:hover { border-color: var(--accent); }
.vb.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); cursor: default; }
.vb.bad { background: transparent; border-color: var(--bad); color: var(--bad); }
.vb.pending { color: var(--muted); border-style: dashed; cursor: default; }
.vb:focus-visible, .more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.track .play { width: 44px; height: 44px; }
.track-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: end; min-width: 0; }
.track-actions.stacked { flex-direction: column; align-items: end; }
.track .writing { grid-column: 1 / -1; border: 0; border-radius: 10px; padding: 10px 12px; }
/* In a card the Writing status is one quiet line; Repoll now sits in the actions column. */
.track-mid p.writing { grid-column: auto; display: block; padding: 0; background: none; border: 0; color: var(--warn); font-size: 0.85rem; }
.track-mid p.writing .spinner { display: inline-block; width: 12px; height: 12px; border-width: 2px; margin-right: 6px; vertical-align: -1px; }
.track .edit-title { grid-column: 1 / -1; }
/* Feedback row: hidden until a version of the card plays (or More feedback); without JS it always shows. */
.track .fb { grid-column: 1 / -1; display: grid; gap: 10px; border-top: 1px solid var(--rule); padding-top: 12px; }
/* Shown once a version has played here, so a paused one can still be moved. */
.seek { display: none; align-items: center; gap: 8px; }
.fb.playing .seek, .fb.heard .seek { display: flex; }
.fb-progress { flex: 1 1 auto; min-width: 0; padding: 10px 0; cursor: pointer; touch-action: none; border-radius: 4px; }
.fb-progress::before { content: ""; display: block; height: 8px; border-radius: 4px; background: var(--rule); }
.fb-progress i { display: block; height: 8px; margin-top: -8px; width: 0; border-radius: 4px; background: var(--accent); }
.fb-progress:focus-visible, .skip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { flex: none; font: inherit; font-size: 0.8rem; font-weight: 600; min-width: 44px; min-height: 36px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); cursor: pointer; }
.skip:hover { border-color: var(--accent); }
.seek-time { flex: none; color: var(--muted); }
.fb-sent { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 0.9rem; }
.fb-reply { flex: 1 1 24rem; min-width: 0; }
.fb-more { justify-self: start; }
.fb-form { display: grid; gap: 10px; }
.js .fb:not(.open) .fb-form, .js .fb.open .fb-more, .js .fb.heard [data-fb-version] { display: none; }
.js .fb:not(.open):not(:has(.fb-sent)), .fb.none { display: none; }
.fb-cancel { display: none; }
.js .fb-cancel { display: inline-block; }
.fb fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb legend { float: left; margin-right: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fb select { font: inherit; min-height: 44px; border: 1px solid var(--rule); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 0 8px; }
.mood, .chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; font-weight: 600; }
.chip { min-height: 36px; font-weight: 400; font-size: 0.9rem; }
.mood input, .chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mood:focus-within, .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mood.good:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.mood.bad:has(input:checked) { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.chip:has(input:checked) { background: var(--warn); border-color: var(--warn); color: var(--panel); font-weight: 600; }
.js .fb-tags { display: none; }
.js .fb-form:has(input[value="somethings_off"]:checked) .fb-tags { display: flex; }
.fb-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-note input { flex: 1 1 16rem; min-width: 0; min-height: 44px; box-sizing: border-box; font: inherit; border: 1px solid var(--rule); border-radius: 10px; padding: 0 12px; background: var(--bg); color: var(--ink); }
.fb-note input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fb-at { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.fb-at.live::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 999px; background: currentColor; }
.fb-now { min-height: 44px; white-space: nowrap; }
.fb-preview { margin: 0; font-size: 0.85rem; }
.js .track .edit-title:not([open]) { display: none; }
.track .ch-meta { grid-column: 1 / -1; margin: 0; padding: 0; font-size: 0.72rem; overflow-wrap: anywhere; }
.link-quiet { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 720px) {
  .track { grid-template-columns: auto minmax(0, 1fr); }
  .track .versions, .track-actions { grid-column: 1 / -1; justify-content: start; }
  .track-actions.stacked { align-items: start; }
}

/* The ⋯ popup (design/TodayMenu.dc.html) */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.more { font: inherit; font-size: 1.25rem; line-height: 1; min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.menu-items { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 16rem; display: grid; padding: 6px; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25); }
.menu-items form { margin: 0; display: grid; }
.menu-items button, .menu-items a { font: inherit; text-align: left; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; text-decoration: none; }
.menu-items button:hover, .menu-items a:hover { background: var(--accent-soft); }
.menu-items .danger { color: var(--bad); }
.menu-items hr { border: 0; border-top: 1px solid var(--rule); margin: 6px 0; width: 100%; }

/* Before any chapter: the research step stands in for the tracks */
.research { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--warn); background: var(--warn-soft); }
.research-mid { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.research-mid .mono { overflow-wrap: anywhere; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--rule); border-top-color: var(--warn); flex: none; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Today: the night switcher, how it was made, and past nights */
.night-switch { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.night-switch .sw { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 1.3rem; }
.night-switch span.sw { color: var(--muted); opacity: 0.5; }
.night-switch .other-night { flex: 1 1 100%; background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 8px; }
.how-made > summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.how-made[open] > summary { margin-bottom: 12px; }
.how-made { display: grid; gap: 16px; }
.how-made > section + section { margin-top: 16px; }
.past-nights h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; margin: 0 0 10px; }
.night-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.night-card { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; min-width: 0; }
.night-card:hover { border-color: var(--accent); }
.night-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.night-card-ch { font-size: 0.88rem; overflow-wrap: anywhere; }
.night-card.older { place-items: center; color: var(--muted); border-style: dashed; }

/* Story A: one version at a time (design/Story.dc.html) */
.story-page { display: grid; gap: 18px; min-width: 0; }
.story-page .back { color: var(--muted); }
.story-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.story-title { flex: 1 1 420px; min-width: 0; display: grid; gap: 6px; }
.story-title .kicker { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.story-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.story-actions form { margin: 0; }
.story-actions .btn, .story-actions summary.btn { min-height: 44px; }
.edit-title-head > summary { list-style: none; display: inline-flex; align-items: center; }
.edit-title-head[open] { flex: 1 1 100%; }
.box { background: var(--panel); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.box h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; margin: 0; }
.version-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.vt { font: inherit; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--muted); cursor: pointer; }
.vt[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.vt.bad { color: var(--bad); }
.story-page .v { display: grid; gap: 14px; padding: 0; border: 0; }
.story-page .v + .v { border-top: 1px solid var(--rule); padding-top: 14px; }
.js .story-page .v + .v { border-top: 0; padding-top: 0; }
.story-page .v.live { background: transparent; }
.player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.player .play { width: 52px; height: 52px; }
.v-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.v-body .script p { max-height: 22rem; overflow: auto; }
.story-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
@media (max-width: 560px) { .player { grid-template-columns: auto minmax(0, 1fr); } .v-act { grid-column: 1 / -1; } }

/* Evergreens C: one show's pool as a player deck (design/Evergreens.dc.html) */
.show-section { display: grid; gap: 22px; border-top: 0; padding-top: 0; }
.deck-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.deck-head .kicker { margin: 0; color: var(--muted); }
.deck-head h1 { font-family: var(--display); font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 0.95; margin: 0; text-transform: uppercase; }
.deck-head p { margin: 6px 0 0; max-width: 62ch; }
.figures { display: flex; flex-wrap: wrap; gap: 24px; }
.figures .kv { justify-items: end; }
.figures b { font-size: 1.8rem; }
.figures .low b { color: var(--warn); }
.add-topic { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--rule); }
.add-topic input { flex: 1 1 260px; min-width: 0; min-height: 44px; font: inherit; font-size: 1.05rem; border: 0; background: transparent; color: var(--ink); padding: 0 14px; }
.add-topic input:focus-visible { outline: 2px solid var(--accent); border-radius: 999px; }
.add-topic .btn { min-height: 44px; border-radius: 999px; padding: 0 22px; }
.lbl { font-family: var(--body); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.deck-list .tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.deck-list [data-list] { display: grid; gap: 12px; }
.ever-approve { display: contents; }
.show-section .track { grid-template-columns: minmax(15rem, 1fr) minmax(0, max-content) minmax(0, max-content); }
.show-section .track h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.show-section .track h3 a { color: inherit; }
.show-section .writing-track, .show-section .failed-track { grid-template-columns: auto minmax(15rem, 1fr) minmax(0, max-content); }
.show-section .failed-track { border-color: var(--bad); background: var(--bad-soft); }
.bang { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--bad); color: var(--bad); display: grid; place-items: center; font-weight: 700; }
.vb input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.vb { position: relative; }
label.vb:has(input:checked) { background: var(--ever); border-color: var(--ever); color: var(--panel); }
label.vb:has(input:focus-visible) { outline: 2px solid var(--ever); outline-offset: 2px; }
label.vb:has(input:disabled) { cursor: default; opacity: 0.7; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.pool-tile { display: grid; gap: 6px; align-content: space-between; min-height: 110px; padding: 14px 16px; border-radius: 14px; background: var(--ever-soft); border: 1px solid var(--ever-soft); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pool-tile .mono { color: var(--ever); }
.pool-tile .muted { font-size: 0.85rem; }
.pool-tile.low { background: transparent; border: 2px dashed var(--ever-soft); color: var(--muted); place-items: center; text-align: center; }
@media (max-width: 720px) { .show-section .track { grid-template-columns: minmax(0, 1fr); } }

/* Settings A: the night in order (design/Settings.dc.html) */
.settings { display: grid; gap: 20px; max-width: 980px; }
.settings-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.settings-head .kicker { margin: 0; color: var(--muted); }
.enabled { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.enabled input { width: 20px; height: 20px; accent-color: var(--accent); }
.night-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.night-step { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 20px; position: relative; padding-bottom: 28px; }
.night-step::before { content: ""; position: absolute; left: 35px; top: 44px; bottom: 0; width: 2px; background: var(--accent-soft); }
.night-step:last-child::before { display: none; }
.badge { justify-self: center; align-self: start; display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 999px; border: 2px solid var(--accent); color: var(--accent); background: var(--bg); font-family: var(--display); font-weight: 700; font-size: 1.2rem; position: relative; z-index: 1; }
.badge.time { border: 0; background: var(--accent); color: var(--accent-ink); font-size: 0.85rem; padding: 0 10px; }
.badge.time.dark { background: var(--ink); color: var(--bg); }
.ever-step .badge { border-color: var(--ever); color: var(--ever); }
.step-body { display: grid; gap: 12px; min-width: 0; }
.step-body h2 { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em; margin: 6px 0 0; }
.step-body > p { margin: 0; }
.step-card { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; display: flex; flex-wrap: wrap; gap: 16px; }
.step-card > .field { flex: 1 1 200px; min-width: 0; }
.step-card > .field.wide { flex-basis: 100%; }
.step-card .field input, .step-card .field select, .step-card .field textarea { min-height: 44px; }
.ever-step .step-card { background: var(--ever-soft); border-color: var(--ever-soft); }
.flow-chain { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.flow-chain .field { flex: 1 1 200px; min-width: 0; }
.flow-chain .arrow { font-size: 1.4rem; color: var(--accent); padding-bottom: 8px; }
.card-actions { align-items: center; }
.card-actions form { margin: 0; }
.icon-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.icon-slot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; border: 1px dashed var(--rule); border-radius: 10px; padding: 12px; margin: 0; }
.icon-slot .field, .icon-slot .btn { grid-column: 1 / -1; }
.icon-no { width: 32px; height: 32px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.icon-text { min-width: 0; overflow-wrap: anywhere; }
.save-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 12px; background: var(--ink); color: var(--bg); }
.save-bar .btn { min-height: 44px; padding: 0 24px; }
@media (max-width: 560px) { .night-step { grid-template-columns: 1fr; } .night-step::before { display: none; } .badge { justify-self: start; margin-bottom: 6px; } }

/* Shows A: a card wall (design/Shows.dc.html) */
.card-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 20px; align-items: start; }
.show-card { display: grid; gap: 10px; min-width: 0; }
.yoto-card { aspect-ratio: 54 / 86; max-width: 100%; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: var(--tile, var(--accent)); text-decoration: none; }
.yoto-card b { font-family: var(--display); font-size: 2rem; line-height: 0.92; text-transform: uppercase; overflow-wrap: anywhere; }
.yoto-card .mono { opacity: 0.9; }
.yoto-card.off { opacity: 0.55; }
.yoto-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.warn-line { color: var(--warn); }
.new-card { aspect-ratio: 54 / 86; max-width: 100%; border-radius: 20px; border: 2px dashed var(--accent); padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--accent-soft); margin: 0; }
.new-card b { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; }
.new-card .btn { margin-top: auto; min-height: 44px; border-radius: 999px; }

/* Stats B: chart and ranking (design/Stats.dc.html) */
.stats { display: grid; gap: 22px; }
.stats-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.stats-head .kicker { margin: 0; color: var(--muted); }
.headline-figures { display: flex; flex-wrap: wrap; gap: 28px; align-items: baseline; }
.headline-figures b { font-size: 3rem; font-weight: 500; }
.ranges { display: flex; gap: 6px; }
.rng { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); text-decoration: none; font-weight: 600; }
.rng[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.chart { position: relative; height: 220px; border-bottom: 1px solid var(--rule); }
.chart svg { width: 100%; height: 100%; display: block; }
.chart rect { fill: var(--accent); }
.chart rect:hover, .chart rect.on { fill: var(--ink); }
.chart .grid { stroke: var(--rule); stroke-dasharray: 2 2; stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.chart-tip { position: absolute; top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); font-size: 0.85rem; pointer-events: none; white-space: nowrap; }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; }
.chart-table summary { cursor: pointer; color: var(--muted); }
table.days { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.days td, table.days th { padding: 4px 10px; text-align: left; border-bottom: 1px solid var(--rule); }
table.days .num { text-align: right; }
.field > span.hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.82rem; }
/* On a phone the ⋯ sits at the left, so its popup spans the track instead. */
@media (max-width: 720px) {
  .track { position: relative; }
  .track details.menu { position: static; }
  .track .menu-items { left: 12px; right: 12px; top: auto; min-width: 0; }
}
