/* Newsroom — a social desk for a one-person page.
   Direction: the rundown board of a digital tabloid. Newsprint white, solid
   black slug blocks, one hot red for anything urgent, and the score palette
   reserved strictly for performance. */

:root {
  --paper:   #ffffff;
  --wash:    #f4f4f2;
  --wash-2:  #ececea;
  --rule:    #e2e2df;
  --rule-2:  #d2d2ce;
  --ink:     #111113;
  --ink-2:   #55555c;
  --ink-3:   #8b8b93;

  --hot:     #e8112d;
  --hot-dim: #fdecee;

  --poor:    #e8112d;
  --average: #f2a007;
  --good:    #17a34a;
  --best:    #00b3b0;

  --display: "Haettenschweiler", "Impact", "Anton", "Arial Narrow Bold",
             system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --pad: 22px;
  --r: 4px;
  --shadow: 0 1px 2px rgba(17, 17, 19, .06), 0 4px 14px rgba(17, 17, 19, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--wash);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }

:focus-visible { outline: 2.5px solid var(--hot); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --------------------------------------------------------------- shell */

.shell { display: grid; grid-template-rows: auto auto 1fr; height: 100%; }

/* the wire bar — always says what happens next */
.wire {
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--pad);
  height: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  overflow: hidden;
}
.wire-flag {
  background: var(--hot);
  color: #fff;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px 2px;
  flex: none;
}
.wire-flag.idle { background: #3a3a40; }
.wire-text { color: #d6d6da; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wire-text b { color: #fff; font-weight: 600; }
.wire-right { margin-left: auto; display: flex; align-items: center; gap: 18px; flex: none; }
.wire-clock { color: #9b9ba3; }
.wire-clock b { color: #fff; font-weight: 600; }
.wire-last { color: #6b6b73; font-size: 11px; white-space: nowrap; }
.wire-last b { color: #9b9ba3; font-weight: 500; }

/* masthead */
.masthead {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 var(--pad);
  height: 62px;
}

.logo {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: -.01em;
  text-transform: uppercase;
  line-height: 1;
  padding-bottom: 3px;
  cursor: pointer;
  user-select: none;
}
.logo em { font-style: normal; color: var(--hot); }

.tabs { display: flex; gap: 4px; margin-left: 6px; }
.tabs button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 20px 12px 17px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .12s, border-color .12s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--hot); }
.tabs .badge {
  background: var(--hot); color: #fff; border-radius: 20px;
  padding: 1px 6px; margin-left: 6px; font-size: 10px;
}

.masthead-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }

/* live switch */
.live { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.live-text { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.live-track { width: 38px; height: 21px; border-radius: 20px; background: var(--rule-2); position: relative; transition: background .16s; }
.live-knob { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .16s; }
.live.on .live-track { background: var(--hot); }
.live.on .live-text { color: var(--hot); }
.live.on .live-knob { transform: translateX(17px); }

.main { overflow-y: auto; padding: var(--pad) var(--pad) 60px; }
.view { display: none; max-width: 1240px; margin: 0 auto; }
.view.on { display: block; }

/* --------------------------------------------------------- typography */

.slugline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.slugline h2 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  padding: 5px 10px 3px;
  margin: 0;
  font-weight: normal;
}
.slugline .count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.slugline .fill { flex: 1; height: 2px; background: var(--ink); }

.note { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

/* --------------------------------------------------------------- parts */

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.btn {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.solid:hover:not(:disabled) { background: #000; }
.btn.hot { background: var(--hot); border-color: var(--hot); color: #fff; }
.btn.hot:hover:not(:disabled) { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.quiet:hover:not(:disabled) { background: var(--wash-2); color: var(--ink); }
.btn.sm { padding: 5px 9px; font-size: 10px; }

.row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* ----------------------------------------- signature: the rundown board */

.rundown {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 4px 16px 14px;
  margin-bottom: 26px;
  overflow-x: auto;
}

.rundown-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(122px, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }

.rd-day { background: var(--paper); display: grid; grid-template-rows: auto 1fr; min-height: 190px; cursor: pointer; transition: background .1s; }
.rd-day:hover { background: var(--wash); }
.rd-day.today { background: #fffdf6; }
.rd-day.today:hover { background: #fff8e0; }
.rd-day.active { background: #eaf3ff; }
.rd-day.active .rd-dow, .rd-day.active .rd-date { color: #1a5cbf; }

.rd-head { padding: 9px 10px 8px; border-bottom: 1px solid var(--rule); }
.rd-dow { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rd-date { font-family: var(--display); font-size: 21px; line-height: 1.05; }
.rd-day.today .rd-dow, .rd-day.today .rd-date { color: var(--hot); }

.rd-slots { padding: 7px; display: grid; gap: 5px; align-content: start; }

.rd-slot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-3);
  background: var(--wash);
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, background .12s;
}
.rd-slot:hover { background: var(--wash-2); border-color: var(--ink-3); }
.rd-slot.drafted { border-left-color: var(--average); }
.rd-slot.shooting { border-left-color: #f2760a; }
.rd-slot.ready { border-left-color: var(--good); }
.rd-slot.posted { border-left-color: var(--best); background: var(--paper); }
.rd-slot.failed { border-left-color: var(--hot); background: var(--hot-dim); }

.rd-time { font-family: var(--mono); font-size: 11px; font-weight: 600; }
.rd-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rd-shots { font-family: var(--mono); font-size: 9px; color: var(--ink-3); }
.rd-thumb { width: 22px; height: 27px; object-fit: cover; border-radius: 2px; border: 1px solid var(--rule-2); }

.rd-empty { font-family: var(--mono); font-size: 10px; color: var(--ink-3); padding: 8px 7px; }

/* ---------------------------------------------------------- story cards */

.stories { display: grid; gap: 12px; }

.story {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ink-3);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 20px;
  padding: 16px 18px;
  align-items: start;
}
.story.drafted { border-left-color: var(--average); }
.story.shooting { border-left-color: #f2760a; }
.story.ready { border-left-color: var(--good); }
.story.posted { border-left-color: var(--best); }
.story.failed { border-left-color: var(--hot); }

.story-slot { display: grid; gap: 5px; }
.story-time { font-family: var(--display); font-size: 27px; line-height: 1; }
.story-date { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

.flag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  background: var(--wash-2);
  color: var(--ink-2);
  width: fit-content;
}
.flag.drafted { background: #fef3d8; color: #8a5d00; }
.flag.shooting { background: #ffe8d3; color: #9c4500; }
.flag.ready { background: #dcf5e5; color: #0d6b32; }
.flag.posted { background: #d6f5f4; color: #006b69; }
.flag.failed { background: var(--hot-dim); color: var(--hot); }

.story-body { min-width: 0; display: grid; gap: 11px; }

.story-slug { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.story-caption { font-size: 15px; line-height: 1.5; margin: 0; white-space: pre-wrap; }
.story-caption.blank { color: var(--ink-3); font-style: italic; }

.story-plan { font-size: 12px; color: var(--ink-2); font-style: italic; line-height: 1.5; margin: 0; }

.shots { display: flex; gap: 7px; flex-wrap: wrap; }
.shot { position: relative; width: 62px; }
.shot img { width: 62px; aspect-ratio: 4/5; object-fit: cover; border-radius: 3px; border: 1px solid var(--rule-2); display: block; cursor: zoom-in; }
.shot-pending {
  width: 62px; aspect-ratio: 4/5; border-radius: 3px;
  border: 1px dashed var(--rule-2); background: var(--wash);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; color: var(--ink-3); text-align: center; padding: 4px;
}
.shot-redo {
  position: absolute; right: 3px; bottom: 3px;
  background: rgba(17,17,19,.86); color: #fff; border: 0;
  border-radius: 3px; padding: 2px 5px;
  font-family: var(--mono); font-size: 9px; cursor: pointer;
  opacity: 0; transition: opacity .12s;
}
.shot:hover .shot-redo { opacity: 1; }
.shot-gen {
  background: var(--ink); color: #fff; border: 0;
  border-radius: 3px; padding: 2px 5px; margin-top: 4px;
  font-family: var(--mono); font-size: 9px; cursor: pointer;
  display: inline-block;
}

.credit-chip {
  font-family: var(--mono); font-size: 10px; color: var(--ink-2);
  background: var(--wash); border: 1px solid var(--rule);
  border-radius: 20px; padding: 3px 9px; width: fit-content;
}

.alert {
  font-size: 12.5px; line-height: 1.5;
  background: var(--hot-dim);
  border: 1px solid #f6c9ce;
  border-left: 3px solid var(--hot);
  border-radius: 3px;
  padding: 9px 11px;
  color: #8c0a1c;
}

.story-actions { display: grid; gap: 7px; }
.story-actions .btn { white-space: nowrap; }

.blank-slate {
  background: var(--paper);
  border: 1px dashed var(--rule-2);
  border-radius: var(--r);
  padding: 42px 24px;
  text-align: center;
}
.blank-slate h3 { font-family: var(--display); font-size: 20px; text-transform: uppercase; margin: 0 0 8px; }
.blank-slate p { color: var(--ink-2); font-size: 13px; margin: 0 auto 16px; max-width: 420px; line-height: 1.6; }

/* ------------------------------------------------------------ checklist */

.checklist { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin-bottom: 26px; }
.check { background: var(--paper); display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 13px 16px; }
.check-mark { width: 20px; height: 20px; border-radius: 20px; border: 2px solid var(--rule-2); display: grid; place-items: center; font-size: 12px; color: #fff; }
.check.done .check-mark { background: var(--good); border-color: var(--good); }
.check-label { font-size: 13.5px; }
.check-label small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.check.done .check-label { color: var(--ink-3); }

/* ---------------------------------------------------------------- stats */

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.tile { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); padding: 15px 17px; }
.tile-num { font-family: var(--display); font-size: 32px; line-height: 1; }
.tile-num.hot { color: var(--hot); }
.tile-num.good { color: var(--good); }
.tile-label { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 7px; }
.tile-sub { font-size: 11.5px; color: var(--ink-2); margin-top: 5px; }

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.result { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); padding: 15px; display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: start; }

.ring { width: 62px; height: 62px; flex: none; }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--rule); }
.ring .value { stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font-family: var(--display); font-size: 21px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.ring .none { fill: var(--ink-3); font-family: var(--mono); font-size: 12px; }

.result p { font-size: 13px; line-height: 1.45; margin: 0 0 9px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tally { display: flex; flex-wrap: wrap; gap: 11px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.tally b { color: var(--ink); font-weight: 600; }

.key { display: flex; gap: 15px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); flex-wrap: wrap; }
.key i { display: inline-block; width: 9px; height: 9px; border-radius: 9px; margin-right: 5px; vertical-align: -1px; }

/* ---------------------------------------------------------------- usage */

.bars { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 132px; gap: 14px; align-items: center; }
.bar-name { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.bar-track { height: 12px; background: var(--wash-2); border-radius: 20px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; background: var(--good); border-radius: 20px; transition: width .35s, background .35s; }
.bar-fill.half { background: var(--average); }
.bar-fill.high { background: #f2760a; }
.bar-fill.critical, .bar-fill.stop { background: var(--hot); }
.bar-mark { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(17,17,19,.16); }
.bar-val { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-align: right; }
.bar-val b { color: var(--ink); font-weight: 600; }
.bar-val.none { color: var(--ink-3); }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 78px; }
.spark-col { flex: 1; display: grid; align-content: end; justify-items: center; gap: 4px; min-width: 0; }
.spark-bar { width: 100%; background: var(--ink); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark-bar.today { background: var(--hot); }
.spark-day { font-family: var(--mono); font-size: 9px; color: var(--ink-3); }

table.ledger { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.ledger th {
  text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  padding: 9px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap;
}
table.ledger td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.ledger tr:hover td { background: var(--wash); }
table.ledger .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.ledger .dim { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }

.state { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.state.completed { color: var(--good); }
.state.failed, .state.nsfw { color: var(--hot); }
.state.canceled { color: var(--ink-3); }
.state.queued, .state.in_progress { color: var(--average); }

/* ------------------------------------------------------------- settings */

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; margin-bottom: 24px; }
.fields { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

input[type="text"], input[type="password"], input[type="number"],
input[type="time"], input[type="datetime-local"], select, textarea {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  padding: 10px 12px;
  width: 100%;
  transition: border-color .12s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { resize: vertical; min-height: 92px; line-height: 1.6; font-family: var(--mono); font-size: 12.5px; }

.toggle { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.toggle input { width: auto; margin-top: 2px; flex: none; }
.toggle span { font-size: 13.5px; }
.toggle small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; line-height: 1.5; }

.win-row { display: grid; grid-template-columns: 92px 1fr 26px 1fr; gap: 11px; align-items: center; margin-bottom: 9px; }
.win-row span { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* ---------------------------------------------------------------- modal */

.veil { position: fixed; inset: 0; background: rgba(17,17,19,.5); display: none; place-items: center; padding: 26px; z-index: 40; }
.veil.on { display: grid; }

.sheet {
  background: var(--paper);
  border-radius: 6px;
  width: min(760px, 100%);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: 0 20px 60px rgba(17,17,19,.28);
  overflow: hidden;
}
.sheet-head { padding: 18px 22px; border-bottom: 2px solid var(--ink); display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { font-family: var(--display); font-size: 22px; text-transform: uppercase; margin: 0; font-weight: normal; }
.sheet-body { padding: 22px; overflow-y: auto; }
.sheet-foot { padding: 15px 22px; border-top: 1px solid var(--rule); background: var(--wash); display: flex; align-items: center; gap: 10px; }
.sheet-foot .est { font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-right: auto; }
.sheet-foot .est b { color: var(--ink); }
.sheet-foot .est.over { color: var(--hot); }

.prompt-block { border: 1px solid var(--rule); border-radius: var(--r); padding: 12px; margin-bottom: 10px; background: var(--wash); }
.prompt-block .spread { margin-bottom: 8px; }
.prompt-block label { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.prompt-block textarea { background: var(--paper); min-height: 96px; }

.lightbox { position: fixed; inset: 0; background: rgba(17,17,19,.94); display: none; place-items: center; z-index: 50; cursor: zoom-out; padding: 30px; }
.lightbox.on { display: grid; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }

.log { display: grid; gap: 6px; font-family: var(--mono); font-size: 11.5px; }
.log-line { display: grid; grid-template-columns: 58px 46px 1fr; gap: 11px; color: var(--ink-2); }
.log-line time { color: var(--ink-3); }
.log-line .lv { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding-top: 1px; }
.log-line .lv.error { color: var(--hot); }
.log-line .lv.warn { color: #9c4500; }
.log-line .lv.info { color: var(--ink-3); }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(110px);
  background: var(--ink); color: #fff;
  border-radius: var(--r);
  border-left: 4px solid var(--best);
  padding: 13px 18px;
  font-size: 13px;
  z-index: 60; max-width: 520px;
  box-shadow: 0 8px 30px rgba(17,17,19,.3);
  transition: transform .22s cubic-bezier(.2,.8,.3,1);
}
.toast.on { transform: translateX(-50%) translateY(0); }
.toast.bad { border-left-color: var(--hot); }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .story { grid-template-columns: 1fr; }
  .story-actions { grid-auto-flow: column; justify-content: start; }
  .pair, .trio { grid-template-columns: 1fr; }
  .masthead { gap: 12px; overflow-x: auto; }
  .bar-row { grid-template-columns: 88px 1fr; }
  .bar-val { grid-column: 1 / -1; text-align: left; }
}

/* ------------------------------------------------------- provider dials */

.dials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }

.dial {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}
.dial.wide { grid-column: span 1; }

.dial-ring { width: 92px; height: 92px; flex: none; }
.dial-ring circle { fill: none; stroke-width: 9; }
.dial-ring .track { stroke: var(--wash-2); }
.dial-ring .value { stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .5s ease, stroke .3s; }
.dial-ring .big { font-family: var(--display); font-size: 22px; fill: var(--ink); text-anchor: middle; }
.dial-ring .small { font-family: var(--mono); font-size: 9px; fill: var(--ink-3); text-anchor: middle; letter-spacing: .06em; }

.dial-name { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.dial-lines { display: grid; gap: 4px; }
.dial-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.dial-line span:first-child { color: var(--ink-2); }
.dial-line b { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.dial-line b.hot { color: var(--hot); }

/* ---------------------------------------------------------------- posts */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.post-card:hover {
  box-shadow: 0 4px 18px rgba(17,17,19,.11), 0 14px 44px rgba(17,17,19,.09);
  transform: translateY(-3px);
}

.pc-img {
  aspect-ratio: 4/5;
  background: var(--wash-2);
  position: relative;
  overflow: hidden;
}
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-img-empty {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--ink-3); font-family: var(--mono); font-size: 11px;
}

.pc-score {
  position: absolute; bottom: 10px; right: 10px;
  color: #fff; border-radius: 20px; padding: 4px 11px 3px;
  font-family: var(--display); font-size: 18px; line-height: 1;
  background: rgba(17,17,19,.7); backdrop-filter: blur(6px);
}
.pc-score.best    { background: var(--best); }
.pc-score.good    { background: var(--good); }
.pc-score.average { background: var(--average); }
.pc-score.poor    { background: var(--poor); }

.pc-body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; gap: 13px; }

.pc-when {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.pc-dow {
  font-family: var(--display); font-size: 20px; text-transform: uppercase;
  font-weight: normal; line-height: 1; color: var(--ink);
}
.pc-date { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.pc-time {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  margin-left: auto; white-space: nowrap;
}

.pc-caption {
  font-size: 13.5px; line-height: 1.6; color: var(--ink); margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-stats { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pc-stat {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.pc-stat-icon { font-size: 13px; line-height: 1; }
.pc-no-stats { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

.pc-fb {
  align-self: flex-start; margin-top: auto;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  text-decoration: none; border: 1px solid var(--rule);
  border-radius: var(--r); padding: 6px 12px;
  transition: border-color .12s, color .12s;
}
.pc-fb:hover { border-color: var(--ink-3); color: var(--ink); }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .post-card:hover { transform: none; }
}

/* --------------------------------------------------------------- debug */

.verdict {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r);
  border: 1px solid var(--rule); background: var(--paper);
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.verdict-mark {
  width: 42px; height: 42px; border-radius: 42px; flex: none;
  display: grid; place-items: center; font-size: 20px; color: #fff;
  background: var(--ink-3);
}
.verdict.ok .verdict-mark { background: var(--good); }
.verdict.warn .verdict-mark { background: var(--average); }
.verdict.fail .verdict-mark { background: var(--hot); }
.verdict h3 { font-family: var(--display); font-size: 21px; text-transform: uppercase; margin: 0 0 3px; font-weight: normal; }
.verdict p { margin: 0; font-size: 13px; color: var(--ink-2); }
.verdict .btn { margin-left: auto; }

.checks { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.chk { background: var(--paper); display: grid; grid-template-columns: 26px 190px 1fr auto; gap: 14px; padding: 14px 16px; align-items: start; }
.chk-dot { width: 12px; height: 12px; border-radius: 12px; margin-top: 4px; background: var(--ink-3); }
.chk-dot.ok { background: var(--good); }
.chk-dot.warn { background: var(--average); }
.chk-dot.fail { background: var(--hot); }
.chk-dot.skip { background: var(--rule-2); }
.chk-what { font-size: 13.5px; font-weight: 600; }
.chk-what small { display: block; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.chk-detail { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.chk-fix { font-size: 12.5px; color: var(--ink); background: var(--wash); border-left: 3px solid var(--average); padding: 7px 10px; border-radius: 0 3px 3px 0; margin-top: 7px; }
.chk-ms { font-family: var(--mono); font-size: 10px; color: var(--ink-3); white-space: nowrap; padding-top: 3px; }

@media (max-width: 900px) {
  .dials { grid-template-columns: 1fr; }
  .chk { grid-template-columns: 20px 1fr; }
  .chk-ms { display: none; }
}

/* ----------------------------------------------------------------- login */
.login-veil {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--wash);
  display: grid; place-items: center;
}
.login-box {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: var(--shadow);
  padding: 40px 44px; width: 340px; max-width: 90vw;
  display: flex; flex-direction: column;
}
.login-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.login-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule-2);
  border-radius: var(--r); background: var(--paper); font-size: 15px;
  outline: none; transition: border-color .12s;
}
.login-input:focus { border-color: var(--ink-3); }
.login-err {
  font-family: var(--mono); font-size: 11px; color: var(--hot);
  margin-top: 12px; margin-bottom: 0; text-align: center;
}
.login-passkey {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 16px; margin-bottom: 4px;
  background: var(--ink); color: #fff; border: 0;
  border-radius: var(--r); font-size: 14px; cursor: pointer;
  transition: opacity .12s;
}
.login-passkey:hover { opacity: .85; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--ink-3); font-size: 11px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
.passkey-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--rule);
}
.passkey-id {
  font-family: var(--mono); font-size: 11px; color: var(--ink-2); flex: 1;
}
