
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/static/fonts/inter-500.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/static/fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/static/fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/static/fonts/poppins-600.woff2) format('woff2'); }

:root {
  --canvas:#f7f5f2; --surface:#ffffff; --surface-raised:#ffffff; --surface-sunken:#f0ede9;
  --hairline:#e5e1db; --hairline-strong:#d2cdc5;
  --ink:#2a2724; --ink-muted:#6e6862; --ink-subtle:#7c766f; --ink-inverse:#2a2724;
  --brand:#ff9e66; --brand-hover:#f08049; --brand-press:#d9703e; --brand-soft:#fab763; --brand-tint:#fbeadf; --brand-ink:#a05430;
  --accent-gold:#ffd152; --accent-gold-ink:#7a5a00; --focus-ring:#b85a22;
  --success:#17714a; --success-tint:#eaf2ed; --warning:#8a6414; --warning-tint:#f8f0e0;
  --danger:#a8342b; --danger-tint:#f9eae8; --info:#2b52b8; --info-tint:#eaeff9; --neutral-tint:#f0ede9;
  --shadow-sm:0 1px 2px rgba(26,32,41,0.06); --shadow-md:0 4px 12px rgba(26,32,41,0.08);
  --main-bg:#f7f5f2;
  --font-display: Poppins, ui-sans-serif, system-ui, sans-serif;
  --font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --canvas:#201e1c; --surface:#262421; --surface-raised:#2e2b28; --surface-sunken:#1a1917;
  --hairline:#2c2a27; --hairline-strong:#3a3733;
  --ink:#e2dcd3; --ink-muted:#a39c93; --ink-subtle:#7e7871; --ink-inverse:#201e1c;
  --brand:#ff9e66; --brand-hover:#f08049; --brand-press:#d9703e; --brand-soft:#fab763; --brand-tint:#33251c; --brand-ink:#ff9e66;
  --accent-gold:#ffd152; --accent-gold-ink:#ffd152; --focus-ring:#ff9e66;
  --success:#7fbb9a; --success-tint:#1f2a24; --warning:#d9b478; --warning-tint:#2e2820;
  --danger:#d98b80; --danger-tint:#2e2220; --info:#93afd0; --info-tint:#1f252e; --neutral-tint:#2a2724;
  --shadow-sm:0 1px 2px rgba(0,0,0,0.40); --shadow-md:0 4px 12px rgba(0,0,0,0.45);
  --main-bg:linear-gradient(180deg, #232120 0%, #1d1b1a 100%); color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--surface-sunken); color: var(--ink); font-family: var(--font-sans);
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-ink); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; }
h1 { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0 0 4px; }
h1 .count { font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: var(--ink-muted);
  letter-spacing: 0; margin-left: 8px; }
h2 { font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); margin: 28px 0 8px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.sub { color: var(--ink-muted); margin: 0 0 16px; max-width: 70ch; }
.hint { font-size: 13px; color: var(--ink-muted); margin: 4px 0; }
code { font-family: var(--font-mono); font-size: 12.5px; background: var(--neutral-tint); padding: 1px 5px; border-radius: 4px; }

/* App shell: the product's sidebar (208px), main panel on the canvas. */
.app { min-height: 100vh; }
.side { position: fixed; top: 0; left: 0; bottom: 0; width: 208px; padding: 16px 12px; display: flex; flex-direction: column;
  gap: 2px; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 8px; padding: 4px 6px 16px; text-decoration: none; color: var(--ink); }
.logo .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #201e1c; display: flex;
  align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.logo .name { display: flex; flex-direction: column; line-height: 1.15; }
.logo .name b { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.logo .name small { font-size: 11px; color: var(--ink-muted); }
.navlabel { font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle);
  padding: 14px 10px 4px; }
.navitem { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-md);
  color: var(--ink-muted); text-decoration: none; font-size: 13px; }
.navitem svg { flex: none; }
.navitem:hover { background: var(--surface); color: var(--ink); }
.navitem.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.navitem.on::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--brand); }
.who { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 8px; }
.who .avatar { width: 26px; height: 26px; border-radius: 9999px; background: var(--neutral-tint); color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; flex: none; }
.who .wname { font-size: 12.5px; color: var(--ink-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who form { margin: 0; }
.main { margin-left: 208px; min-height: 100vh; min-width: 0; background: var(--main-bg); border-left: 1px solid var(--hairline); }
.bare .main { margin-left: 0; border-left: 0; }
.page { max-width: 880px; margin: 0 auto; padding: 28px 32px 80px; }
.bare .page { max-width: 560px; }
@media (max-width: 760px) {
  .side { position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 12px; }
  .main { margin-left: 0; }
  .logo { padding: 0 8px 0 0; } .navlabel { display: none; }
  .who { margin: 0 0 0 auto; padding: 0; border: 0; } .who .wname { display: none; }
  .main { border-left: 0; border-top: 1px solid var(--hairline); }
  .page { padding: 20px 16px 60px; }
}

/* Buttons (kb-btn): 36px, radius-md; sm 30px. One primary per view. */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink);
  font: 500 13px/20px var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease-out, border-color .2s ease-out, color .2s ease-out; }
button:hover, .btn:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--ink); }
button.primary, .btn.primary { height: 36px; padding: 0 16px; font-size: 14px; background: var(--brand); color: #201e1c; border-color: transparent; }
button.primary:hover, .btn.primary:hover { background: var(--brand-hover); color: #201e1c; }
button.primary:active { background: var(--brand-press); }
button.ghost, button.icon { background: none; border-color: transparent; color: var(--ink-muted); }
button.ghost:hover, button.icon:hover { background: var(--brand-tint); border-color: transparent; color: var(--ink); }
button.icon { height: 26px; padding: 0 8px; font-size: 12px; font-weight: 400; }
button.icon.on, button.on { color: var(--brand-ink); }
button.on { border-color: var(--brand); background: var(--brand-tint); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.actions form, .toolbar form { margin: 0; }

/* Cards (kb-card) and banners. */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 16px 20px;
  margin: 10px 0; box-shadow: var(--shadow-sm); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand-ink); text-decoration: underline; }
.card p { margin: 6px 0; }
.card .preview { margin: 8px 0 0; }
.card .matters, .matters { color: var(--ink-muted); }
.why { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 4px; }
.banner { padding: 10px 14px; border-radius: var(--radius-md); margin: 12px 0; font-size: 13.5px; }
.banner.warn { background: var(--warning-tint); color: var(--warning); }
.banner.bad { background: var(--danger-tint); color: var(--danger); }
.banner.ok { background: var(--info-tint); color: var(--info); }
.banner a { color: inherit; font-weight: 500; }
.empty { color: var(--ink-subtle); padding: 32px 0; text-align: center; }

/* Pills (kb-pill): status words, never a coloured dot alone. */
.chip, .tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 9999px;
  font-size: 11.5px; font-weight: 500; line-height: 14px; white-space: nowrap; text-decoration: none;
  background: var(--neutral-tint); color: var(--ink-muted); vertical-align: 1px; }
a.chip:hover { color: var(--ink); background: var(--brand-tint); }
.chip img.fav { width: 12px; height: 12px; border-radius: 2px; }
.chip.move { background: var(--brand-tint); color: var(--brand-ink); margin-right: 8px; }
.tag { background: var(--warning-tint); color: var(--warning); margin-right: 8px; }

/* Scores: a mono number with its meaning under it (A36). */
.scorebox { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: help; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 6px;
  border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--neutral-tint); color: var(--ink-muted); }
.score.hi { background: var(--brand); color: #201e1c; }
.score.mid { background: var(--brand-tint); color: var(--brand-ink); }
.score-label { font-size: 10.5px; line-height: 1.2; color: var(--ink-subtle); text-align: center; white-space: nowrap; }

/* Lists of rows: one card per list, rows split by hairlines (cards don't nest). */
.list { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin: 8px 0; overflow: hidden; }
.row { border-top: 1px solid var(--hairline); transition: background-color .18s ease-out; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-raised); transition-delay: .22s; }
@media (prefers-color-scheme: light) { .row:hover { background: #fcfbf9; } }
.row.read { opacity: .55; }
.row details > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px 4px; }
.row details > summary::-webkit-details-marker { display: none; }
.row .head { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row .title { font-weight: 600; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.row .line { color: var(--ink-muted); font-size: 13px; line-height: 1.45; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row details[open] .line { -webkit-line-clamp: unset; }
.row .body { padding: 4px 16px 4px 92px; font-size: 13.5px; }
.row .body p { margin: 6px 0; }
.row .body .why { margin: 8px 0 4px; }
.row .facts { margin: 6px 0; padding-left: 18px; }
.row .facts li { margin: 3px 0; }
.links { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; }
.links li { margin: 3px 0; overflow-wrap: anywhere; }
.links .src { color: var(--ink-muted); }
.row .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 12px 10px 92px; }
.row .chips, .row .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row .acts form { margin: 0; }
.row .static { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.row .static .chips { margin-top: 8px; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--brand-ink); text-decoration: underline; }
@media (max-width: 600px) { .row .body, .row .foot { padding-left: 16px; } }

/* Folding: watchlist groups in the feed, "more", the add form. */
details.problem-group { border-top: 1px solid var(--hairline); }
details.problem-group:first-child { border-top: 0; }
details.problem-group > summary { cursor: pointer; padding: 12px 16px; list-style: none; }
details.problem-group > summary::-webkit-details-marker { display: none; }
details.problem-group > summary:hover { background: var(--surface-raised); }
details.problem-group > summary .pg-title { font-weight: 600; }
details.problem-group > summary .pg-title::before, details.section > summary .sec-title::before { content: '▸'; display: inline-block;
  width: 14px; color: var(--ink-subtle); }
details.problem-group[open] > summary .pg-title::before, details.section[open] > summary .sec-title::before { content: '▾'; }
details.problem-group > summary .pg-meta { color: var(--ink-muted); font-size: 13px; }
details.problem-group > .hint { margin: 0 16px 8px 30px; }
details.problem-group > .row { border-top: 1px solid var(--hairline); background: var(--canvas); }
details.more { margin-top: 20px; }
details.more > summary { cursor: pointer; color: var(--ink-muted); font-size: 13.5px; padding: 8px 0; }
details.more > summary .hint { display: inline; }
details.add-problem { margin-top: 24px; }
details.add-problem > summary { list-style: none; display: inline-flex; }
details.add-problem > summary::-webkit-details-marker { display: none; }
details.add-problem > summary { align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md); background: var(--surface-raised); font-weight: 500; font-size: 13px; cursor: pointer; }
details.add-problem > summary:hover { background: var(--brand-tint); border-color: var(--brand); }
details.add-problem[open] > summary { margin-bottom: 8px; }

/* Tables (kb-table). */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--ink-muted); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-raised); transition: background-color .18s ease-out .22s; }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; color: var(--ink-muted); }
.status-failed, .status-partial { color: var(--danger); font-weight: 500; }
table.findings .f-title { font-weight: 600; }
table.findings .f-title a { color: var(--ink); text-decoration: none; }
table.findings .f-title a:hover { color: var(--brand-ink); text-decoration: underline; }
table.findings .f-what { color: var(--ink-muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Fields (kb-field / kb-input). */
label { display: block; font-size: 13px; color: var(--ink-muted); font-weight: 500; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: 14px/20px var(--font-sans); width: 100%; min-height: 36px; padding: 7px 12px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md); background: var(--canvas); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 0; border-color: transparent; }
textarea { min-height: 160px; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; }
textarea.tall { min-height: 460px; height: calc(100vh - 220px); }

/* Sign-in. */
.login { max-width: 380px; margin: 12vh auto; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md); }
.login .logo { padding: 0 0 18px; }
.login h1 { margin: 0 0 4px; }
.login button { width: 100%; height: 36px; margin-top: 16px; font-size: 14px; }
.login .error { color: var(--danger); font-size: 13px; min-height: 1.5em; margin-top: 10px; }
.filtered { padding-left: 0; list-style: none; }
.filtered li { margin: 6px 0; font-size: 13px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* Write-ups (A34) and the weekly page (A35). */
.pinned, .shifts { background: var(--surface); border: 1px solid var(--hairline); border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg); padding: 14px 20px; margin: 10px 0; box-shadow: var(--shadow-sm); }
.pinned .latest { margin: 0 0 10px; }
.pinned-part h3 { font-size: 14.5px; margin: 12px 0 4px; }
.pinned-part:first-child h3 { margin-top: 0; }
.sections { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
details.section { border-top: 1px solid var(--hairline); padding: 0 20px; }
details.section:first-child { border-top: 0; }
details.section > summary { cursor: pointer; padding: 12px 0; display: flex; flex-direction: column; gap: 2px; list-style: none; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary .sec-title { font-weight: 600; }
details.section > summary .sec-preview { color: var(--ink-muted); font-size: 13px; padding-left: 14px; }
details.section[open] > summary .sec-preview { display: none; }
details.section > .md { padding: 0 0 12px 14px; }
sup a.cite { font-family: var(--font-mono); font-size: 10.5px; text-decoration: none; background: var(--brand-tint); color: var(--brand-ink);
  border-radius: 4px; padding: 0 4px; margin-left: 1px; }
details.sources { margin: 12px 0; }
details.sources > summary { cursor: pointer; color: var(--ink-muted); font-size: 13.5px; padding: 6px 0; }
details.sources ol { font-size: 13px; padding-left: 28px; }
details.sources li { margin: 3px 0; overflow-wrap: anywhere; }
.shifts ul { margin: 2px 0; padding-left: 18px; }
.shifts li { margin: 6px 0; }
.shifts details.sources { margin: 6px 0 0; }
.md h3 { font-size: 15px; margin: 16px 0 6px; }
.md h4 { font-size: 13.5px; margin: 12px 0 4px; font-family: var(--font-sans); }
.md ul, .md ol { padding-left: 20px; margin: 6px 0; }
.md li { margin: 4px 0; }
.md a { overflow-wrap: anywhere; }

/* Setup pages (A43). Status pills from the fixed vocabulary, one tone each. */
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 9999px; font-size: 11.5px;
  font-weight: 500; white-space: nowrap; background: var(--neutral-tint); color: var(--ink-muted); }
.pill.success { background: var(--success-tint); color: var(--success); }
.pill.danger { background: var(--danger-tint); color: var(--danger); }
.pill.warning { background: var(--warning-tint); color: var(--warning); }
.pill.brand { background: var(--brand-tint); color: var(--brand-ink); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.big { font-size: 18px; font-weight: 500; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 8px; }
.stat { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 12px 16px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat-value.small { font-size: 15px; min-height: 33px; }
.stat-of { font-family: var(--font-sans); font-size: 12.5px; color: var(--ink-muted); font-weight: 400; margin-left: -4px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.group-hint { margin: -4px 0 8px; }
.srow { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--hairline); }
.srow:first-child { border-top: 0; }
.srow:hover { background: var(--surface-raised); transition: background-color .18s ease-out .22s; }
.srow.off .srow-main, .srow.off .srow-nums { opacity: .5; }
.srow-main { flex: 1; min-width: 0; }
.srow-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.srow-title img.fav { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.srow-what { font-size: 12.5px; color: var(--ink-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow-why { font-size: 12.5px; color: var(--danger); margin-top: 3px; }
.srow-nums { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.srow-nums .new { color: var(--success); font-weight: 600; }
.srow form { margin: 0; }
.srow .pill { min-width: 74px; justify-content: center; }
@media (max-width: 760px) { .srow { flex-wrap: wrap; } .srow-main { flex-basis: 100%; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.card-head h3 { margin: 0 0 2px; }
.card-head .hint { margin: 0; max-width: 60ch; }
.card form { margin: 0; }
textarea.prose { font-family: var(--font-sans); font-size: 14px; min-height: 110px; }
.keyline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.keyline .hint { margin: 0; }
.meter-row { margin: 0 0 8px; }
.meter-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-muted); margin-bottom: 6px; }
.meter-label .mono { color: var(--ink); }
progress { -webkit-appearance: none; appearance: none; border: 0; display: block; width: 100%; height: 8px; border-radius: 9999px;
  background: var(--neutral-tint); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--neutral-tint); border-radius: 9999px; }
progress::-webkit-progress-value { background: var(--brand); border-radius: 9999px; }
progress::-moz-progress-bar { background: var(--brand); border-radius: 9999px; }
progress.high::-webkit-progress-value { background: var(--warning); }
progress.high::-moz-progress-bar { background: var(--warning); }
.controls { margin-top: 4px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { flex: 1; }
.inline button { height: 36px; }
.actions.split { justify-content: space-between; border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 18px; }
button.danger { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.mini-head { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(70px, 160px) 1fr 64px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.bar-label { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { text-align: right; font-size: 12.5px; }
progress.bar { height: 6px; }
progress.bar.alt::-webkit-progress-value { background: var(--info); }
progress.bar.alt::-moz-progress-bar { background: var(--info); }
.spend { margin-top: 4px; }

/* What we care about (A44): the brief as headed cards, with a side panel. */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head .btn { margin-top: 2px; }
.meta { margin: -6px 0 12px; }
.outline { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.context-grid { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .context-grid { grid-template-columns: 1fr; } }
.intro { color: var(--ink-muted); font-size: 13.5px; margin: 0 0 4px; }
.intro .md p { margin: 0 0 8px; }
.ctx-section { margin: 0 0 12px; scroll-margin-top: 16px; }
.ctx-section h3 { margin: 0 0 6px; }
.ctx-section .md p { margin: 6px 0; }
.ctx-section .md ul { margin: 6px 0; }
.side-note { position: sticky; top: 16px; margin: 0; padding: 16px 18px; }
.side-note h3 { margin: 0 0 6px; font-size: 14px; }
.side-note .hint { font-size: 12.5px; }
.scale { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.scale-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.scale-row .score { min-width: 44px; height: 22px; font-size: 12px; }
.tips { margin: 6px 0 0; padding-left: 16px; font-size: 13px; color: var(--ink-muted); }
.tips li { margin: 8px 0; }
.tips strong { color: var(--ink); font-weight: 600; }

/* Research and weekly (A45). */
.pill.info { background: var(--info-tint); color: var(--info); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; }
.crumb { margin-bottom: 6px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.head-actions form { margin: 0; }
.page-head + .meta { margin-top: 10px; }
.prow { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--hairline); }
.prow:first-child { border-top: 0; }
.prow:hover { background: var(--surface-raised); transition: background-color .18s ease-out .22s; }
.prow-main { flex: 1; min-width: 0; }
.prow-title { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.prow-title:hover { color: var(--brand-ink); text-decoration: underline; }
.prow .preview { margin: 4px 0 0; color: var(--ink); font-size: 13.5px; }
.prow .preview.dim, .dim { color: var(--ink-muted); }
.prow .matters { margin: 4px 0 0; font-size: 13px; }
.prow-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--ink-muted); }
.prow .pill { flex: none; margin-top: 1px; }
blockquote.question { margin: 14px 0 0; padding: 12px 16px; border-left: 3px solid var(--hairline-strong); background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--ink); font-size: 14px; }
blockquote.question .mini-head { margin-bottom: 4px; }
td.dim-cell { color: var(--ink-muted); font-size: 13px; }
.weeknav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 13px; }
.weeknav-steps { display: flex; gap: 6px; }
.btn.disabled { opacity: .45; pointer-events: none; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); margin: 0 0 4px; }
h1.headline { font-size: 24px; line-height: 1.25; max-width: 32ch; margin-bottom: 14px; }
.wrow { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.wrow:first-child { border-top: 0; }
.wrow:hover { background: var(--surface-raised); color: var(--ink); }
.wrow-date { width: 150px; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wrow-range { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-muted); }
.wrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wrow-headline { font-weight: 600; }
.wrow-meta { font-size: 12px; color: var(--ink-muted); }
@media (max-width: 600px) { .wrow { flex-wrap: wrap; } .wrow-date { width: auto; flex-direction: row; } }
.crow { display: flex; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--hairline); align-items: flex-start; }
.crow:first-child { border-top: 0; }
.crow-name { width: 160px; flex: none; display: flex; align-items: center; gap: 8px; }
.crow-n { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); background: var(--neutral-tint); border-radius: 9999px; padding: 0 7px; }
.crow-moves { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.cmove .chip.move { margin-right: 6px; }
@media (max-width: 600px) { .crow { flex-direction: column; gap: 6px; } .crow-name { width: auto; } }

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