/* Lifted from design/mocks/v2/Record.html and Program.html: same type, same colours, same spacing.
   The mocks are fixed at 1360px; this sheet keeps their proportions and lets the width breathe. */

:root {
  --ink: #17263A; --navy: #0B2545; --teal: #00707A; --slate: #4B5A68; --grey: #6B7280;
  --mute: #93A0AB; --faint: #A3AEB8; --rule: #EDF1F4; --edge: #E1E8ED; --paper: #FBFCFC;
  --good: #2E7D5B; --watch: #8A5200; --amber: #C9821A; --bad: #A32C2C; --off: #C3CDD6;
  --tint-edge: #D6E4E6; --tint: #F7FCFC;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: Newsreader, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 13px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.label { font-size: 10px; font-weight: 600; letter-spacing: 0.11em; color: var(--faint); text-transform: uppercase; }
.link { font-size: 12.5px; color: var(--teal); font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }
.muted { color: var(--mute); }
.btn { font-size: 12.5px; font-weight: 600; color: #fff; background: var(--navy); padding: 8px 15px; border-radius: 3px; border: 0; cursor: pointer; }
.btn.quiet { background: #fff; color: var(--navy); border: 1px solid var(--edge); }
.btn:disabled { opacity: 0.5; cursor: default; }
.chip { font-size: 11px; color: var(--slate); background: #F2F5F7; border: 1px solid var(--edge); padding: 3px 9px; border-radius: 3px; white-space: nowrap; }

.tone-good { color: var(--good); } .tone-watch { color: var(--watch); } .tone-bad { color: var(--bad); } .tone-neutral { color: var(--slate); } .tone-off { color: var(--mute); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: var(--off); }
.dot.good { background: var(--good); } .dot.watch { background: var(--amber); } .dot.bad { background: var(--bad); } .dot.neutral { background: var(--slate); } .dot.off { background: var(--off); } .dot.navy { background: var(--navy); }

/* ---- frame ---- */
.frame { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 46px; flex-shrink: 0; border-bottom: 1px solid var(--edge); background: #fff; display: flex; align-items: center; padding: 0 24px; gap: 20px; }
.topbar .brand { display: flex; align-items: center; gap: 8px; }
.topbar .brand span { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--navy); }
.topbar .sep { width: 1px; height: 18px; background: var(--edge); }
.topbar .crumb { font-size: 12.5px; color: var(--slate); }
.topbar .meta { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.topbar .grow { flex-grow: 1; }
.topbar .who { font-size: 12.5px; color: var(--grey); }
.topbar nav { display: flex; gap: 14px; }
.topbar nav a { font-size: 12.5px; color: var(--slate); }
.topbar nav a.on { color: var(--navy); font-weight: 600; }

.body { flex-grow: 1; display: flex; }
.rail { width: 300px; flex-shrink: 0; border-right: 1px solid var(--edge); background: #fff; padding: 28px 24px; }
.rail.narrow { width: 260px; padding: 24px 22px 24px 24px; }
.main { flex-grow: 1; min-width: 0; padding: 28px 36px 36px; }
.main.program { padding: 26px 32px 32px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .body { flex-direction: column; } .rail, .rail.narrow { width: auto; border-right: 0; border-bottom: 1px solid var(--edge); } .main { padding: 22px 20px; } }

/* ---- record ---- */
.person { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--navy); line-height: 1.25; }
.person-desc { font-size: 12.5px; color: var(--grey); margin-top: 6px; line-height: 1.5; }
.stats { margin-top: 22px; }
.stats .label { display: block; padding-bottom: 6px; }
.stat { border-top: 1px solid var(--rule); padding: 14px 0; }
.stat .n { font-family: var(--serif); font-size: 26px; color: var(--navy); font-weight: 500; }
.stat .t { font-size: 11.5px; color: var(--grey); margin-top: 2px; line-height: 1.45; }
.footnote { border-top: 1px solid var(--rule); margin-top: 8px; padding-top: 18px; display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px; color: var(--mute); line-height: 1.55; }
.footnote svg { flex-shrink: 0; margin-top: 2px; }

.headline-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.headline { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--navy); line-height: 1.25; }
.headline-row .grow { flex-grow: 1; }
.sub { font-size: 13px; color: var(--grey); margin-top: 8px; }

.table { margin-top: 26px; }
.thead, .row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 170px 180px; gap: 0 20px; }
.thead { padding-bottom: 8px; }
.row { padding: 14px 0; border-top: 1px solid var(--rule); align-items: start; font-size: 13px; color: var(--ink); }
.row .when { font-family: var(--mono); font-size: 11.5px; color: var(--mute); padding-top: 2px; }
.row .what { line-height: 1.5; }
.row .src { font-size: 11.5px; color: var(--mute); margin-top: 3px; line-height: 1.5; }
.row .src details { display: inline; }
.row .src summary { display: inline; cursor: pointer; list-style: none; }
.row .src summary::-webkit-details-marker { display: none; }
.row .src .excerpt { display: block; margin-top: 6px; font-family: var(--serif); font-size: 13px; color: var(--slate); font-style: italic; }
.row .status { font-size: 12px; font-weight: 500; line-height: 1.45; }
.row .status .detail { display: block; font-weight: 400; font-size: 11.5px; color: var(--mute); margin-top: 2px; }
.row .comment { font-family: var(--serif); font-size: 13.5px; color: var(--slate); line-height: 1.5; font-style: italic; }
.row .comment p { margin: 0 0 6px; }
.row .comment p:last-child { margin-bottom: 0; }
.row .actions { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--sans); font-style: normal; }
.row .actions .link { font-size: 12px; }
@media (max-width: 900px) { .thead { display: none; } .row { grid-template-columns: 1fr; gap: 6px 0; } }

.tfoot { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; align-items: center; gap: 16px; font-size: 12.5px; }
.empty { border-top: 1px solid var(--rule); padding: 28px 0; font-family: var(--serif); font-size: 16px; color: var(--slate); line-height: 1.55; }

.waiting { margin-top: 26px; border: 1px solid var(--tint-edge); background: var(--tint); border-radius: 4px; padding: 14px 20px 6px; }
.waiting .label { color: var(--teal); display: block; padding-bottom: 6px; }
.waiting .row { grid-template-columns: 96px minmax(0, 1fr) 170px 180px; }
.waiting .row:first-of-type { border-top: 0; }

.inline-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; font-family: var(--sans); font-style: normal; }
.inline-form textarea, .inline-form input { font: inherit; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--edge); border-radius: 3px; background: #fff; color: var(--ink); width: 100%; }
.inline-form textarea { min-height: 56px; resize: vertical; }
.inline-form .buttons { display: flex; gap: 10px; align-items: center; }
.notice { font-size: 12.5px; color: var(--teal); margin-top: 10px; }
.notice.error { color: var(--bad); }

/* ---- program ---- */
.panel { border: 1px solid var(--edge); background: #fff; border-radius: 4px; padding: 18px 20px; min-width: 0; }
.panel.tinted { border-color: var(--tint-edge); background: var(--tint); }
.panel .panel-head { display: flex; align-items: baseline; padding-bottom: 8px; gap: 12px; }
.panel .panel-head .grow { flex-grow: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
.line { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink); line-height: 1.45; }
.line:first-of-type { border-top: none; }
.line .s { font-size: 11.5px; color: var(--mute); margin-top: 2px; line-height: 1.5; }
.line .body { display: block; min-width: 0; }
details.fold { display: block; padding: 0; }
details.fold > summary { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .fold-title::after { content: " · show"; font-size: 11.5px; color: var(--teal); }
details.fold[open] > summary .fold-title::after { content: " · hide"; }
details.fold > .line { padding-left: 18px; }
.rail-note { font-size: 11.5px; color: var(--mute); line-height: 1.55; margin-top: 12px; }
.rail .label { display: block; padding-bottom: 10px; }
.rail .label.later { padding-top: 24px; }
.this-week .label { display: block; }
.this-week .headline { margin-top: 6px; }
.panel-foot { font-size: 12px; color: var(--grey); margin-top: 12px; line-height: 1.5; border-top: 1px solid var(--rule); padding-top: 12px; }
.panel .buttons { display: flex; gap: 14px; margin-top: 14px; align-items: center; }
.draft-text { font-family: var(--serif); font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.draft-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--slate); }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 12px; }
@media (max-width: 900px) { .bars { grid-template-columns: repeat(2, 1fr); } }
.bar .t { font-size: 12px; color: var(--ink); }
.bar .track { height: 4px; background: var(--edge); margin-top: 6px; border-radius: 2px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 2px; }
.bar .fill.good { background: var(--good); } .bar .fill.watch { background: var(--amber); } .bar .fill.bad { background: var(--bad); } .bar .fill.off { background: var(--off); }
.bar .n { font-size: 11px; margin-top: 4px; color: var(--mute); }

/* ---- lists and states ---- */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { border-top: 1px solid var(--rule); padding: 14px 0; }
.plain-list li:first-child { border-top: 0; }
.plain-list .name { font-size: 15px; color: var(--navy); font-family: var(--serif); font-weight: 500; }
.plain-list .s { font-size: 11.5px; color: var(--mute); margin-top: 3px; }
.state { padding: 60px 36px; font-family: var(--serif); font-size: 18px; color: var(--slate); line-height: 1.5; max-width: 640px; }
.state.error { color: var(--bad); }
.state .sub { font-family: var(--sans); font-size: 13px; }

.src-link { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.src-link:hover { color: var(--good); }
