/* NoticeGuard — editorial legal. Paper ground, ink type, charcoal slabs, one accent per verdict. */
@import url('/static/fonts/source-serif-4.css');

:root {
  --paper: #F3F0EA;
  --paper-2: #EBE7DF;
  --paper-3: #E2DDD3;
  --ink: #1A1917;
  --ink-2: #4A4740;
  --muted: #6B665E;
  --hair: #DAD5CC;
  --slab: #161513;
  --slab-2: #23211E;
  --cream: #F3F0EA;
  --cream-2: #B9B3A8;
  --ready: #1F6B3A;
  --ready-soft: #DCEBDF;
  --gap: #9A6200;
  --gap-soft: #F3E6C6;
  --adviser: #7A1F2B;
  --adviser-soft: #F0D9DC;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(26,25,23,.06), 0 2px 8px rgba(26,25,23,.06);
  --shadow-2: 0 6px 18px -6px rgba(26,25,23,.28), 0 2px 6px rgba(26,25,23,.08);
  --ease: cubic-bezier(.16,1,.3,1);
  --fast: 160ms; --mid: 240ms; --slow: 320ms;
  --left-w: 320px; --right-w: 420px;
  --accent: var(--ink); --accent-soft: #E8E1D2;
  color-scheme: light;
}
body[data-verdict="ready"] { --accent: var(--ready); --accent-soft: var(--ready-soft); }
body[data-verdict="gap"] { --accent: var(--gap); --accent-soft: var(--gap-soft); }
body[data-verdict="adviser"] { --accent: var(--adviser); --accent-soft: var(--adviser-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: light; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: #D8CDB8; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
h2 { font-size: 1.35rem; line-height: 1.2; }
h3 { font-size: 1.05rem; line-height: 1.25; }
p { margin: 0; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
mark { background: transparent; }
[hidden] { display: none !important; }
svg[aria-hidden] { width: 14px; height: 14px; vertical-align: -2px; flex: none; }

/* scrollbars from the palette */
* { scrollbar-width: thin; scrollbar-color: #C9C2B6 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #C9C2B6; border-radius: 10px; border: 3px solid var(--paper); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  border-radius: var(--r-pill); padding: 9px 18px; font-weight: 500; font-size: 14px; line-height: 1.2;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast), color var(--fast), border-color var(--fast);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); background: #000; }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-1); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; box-shadow: none; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: var(--ink); color: var(--cream); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn.ghost:hover { border-color: var(--ink); background: var(--paper-2); box-shadow: none; transform: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.on-dark { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn.on-dark:hover { background: #fff; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 18px; padding: 14px 28px; border-bottom: 1px solid var(--hair);
  background: var(--paper); position: sticky; top: 0; z-index: 20;
}
.wordmark { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px; }
.wordmark small { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.top .spacer { flex: 1; }
.top nav { display: flex; gap: 10px; align-items: center; }
.top nav a.link { font-size: 14px; color: var(--ink-2); padding: 8px 6px; }

/* ---------- process rail ---------- */
.rail { padding: 22px 28px 18px; border-bottom: 1px solid var(--hair); background: var(--paper); }
.rail-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.rail-track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--hair); }
.stage { position: relative; padding-top: 22px; min-width: 0; }
.stage .dot { position: absolute; top: 3px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1px solid var(--ink-2); }
.stage.past .dot { background: var(--ink-2); }
.stage.current .dot { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--ink); }
.stage .name { font-family: var(--serif); font-size: 1.15rem; line-height: 1.15; }
.stage.future .name { color: var(--ink-2); }
.stage.idle .name { color: var(--muted); }
.stage.idle .dot { border-color: var(--hair); }
.stage .here { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--cream); padding: 3px 9px; border-radius: var(--r-pill); }
.stage .risk { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.35; max-width: 28ch; }
.stage .chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.rail .deadlines { margin-top: 12px; display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.rail .deadlines .dl { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 4px 12px; background: var(--paper-2); }
.rail .deadlines .dl b { font-variant-numeric: tabular-nums; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; line-height: 1.3; border: 1px solid var(--hair); background: var(--paper); color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; flex: none; }
.chip.ready { color: var(--ready); border-color: color-mix(in srgb, var(--ready) 35%, var(--hair)); background: var(--ready-soft); }
.chip.gap { color: var(--gap); border-color: color-mix(in srgb, var(--gap) 35%, var(--hair)); background: var(--gap-soft); }
.chip.adviser { color: var(--adviser); border-color: color-mix(in srgb, var(--adviser) 35%, var(--hair)); background: var(--adviser-soft); }
.chip.neutral { color: var(--muted); }
.chip.ink { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip.stated { background: var(--paper-2); }
.chip.missing { border-style: dashed; color: var(--muted); }
.chip.conflicting { color: var(--adviser); border-color: var(--adviser); }
.chip.unavail { opacity: .6; font-style: italic; }
.chip.doc { font-family: var(--sans); background: var(--paper-2); color: var(--ink); gap: 7px; }

/* ---------- layout ---------- */
.work {
  display: grid; grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w); gap: 28px;
  padding: 26px 28px 40px; flex: 1; align-items: start;
}
.col-left, .col-right { position: sticky; top: 64px; max-height: calc(100vh - 64px - 58px); overflow: auto; padding-right: 2px; }
.col-right { border-left: 1px solid var(--hair); padding-left: 24px; }
.section { padding: 22px 0; border-top: 1px solid var(--hair); }
.section:first-child { border-top: 0; padding-top: 0; }
.section > h2 { margin-bottom: 12px; }
.section .lede { color: var(--muted); font-size: 13.5px; margin: -6px 0 12px; }

/* ---------- inputs ---------- */
.panel h2 { font-size: 1.2rem; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.field label, .field .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.field input[type=text], .field input[type=tel], .field select, .field textarea {
  border: 1px solid var(--hair); background: #FBFAF7; border-radius: var(--r-sm); padding: 8px 10px; width: 100%; transition: border-color var(--fast), box-shadow var(--fast);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9B3A8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(26,25,23,.08); }
.field textarea { min-height: 72px; resize: vertical; }
.field .caption { font-size: 12px; color: var(--muted); }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; cursor: pointer; }
.choice input { margin: 4px 0 0; accent-color: var(--ink); width: 15px; height: 15px; flex: none; }
.choice .sub { display: block; font-size: 12.5px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 3px; background: #FBFAF7; }
.seg label { padding: 5px 12px; border-radius: var(--r-pill); cursor: pointer; font-size: 13px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { background: var(--ink); color: var(--cream); }
.seg input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone {
  display: block; margin-top: 10px;
  border: 1px dashed #B9B3A8; border-radius: var(--r-md); padding: 16px; text-align: center; color: var(--muted); font-size: 13.5px;
  background: #FBFAF7; transition: border-color var(--fast), background var(--fast); cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }
.dropzone input { display: none; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 6px 8px 6px 10px; background: #FBFAF7; font-size: 13px; }
.file .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file select { border: 1px solid var(--hair); border-radius: 6px; padding: 3px 6px; font-size: 12.5px; background: var(--paper); max-width: 160px; }
.file .rm { border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 6px; color: var(--muted); line-height: 0; }
.file .rm:hover { color: var(--adviser); background: var(--adviser-soft); }
.file.failed { border-color: var(--adviser); }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.casedocs { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.casedoc { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.casedoc > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.casedoc .t { flex: none; }
.casedoc .t { color: var(--muted); font-size: 12px; }

/* ---------- verdict slab ---------- */
.slab {
  background: var(--slab); color: var(--cream); border-radius: var(--r-lg); padding: 30px 32px 28px; box-shadow: var(--shadow-2);
  position: relative; overflow: hidden;
}
.slab .headline { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.slab .glyph { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 6px; }
.slab .glyph svg { width: 22px; height: 22px; }
.slab h1 { font-size: 2.75rem; line-height: 1.08; font-weight: 500; letter-spacing: -0.015em; max-width: 24ch; }
.slab h1 em { font-style: italic; font-weight: 400; }
.slab .expl { margin-top: 18px; font-size: 17px; line-height: 1.5; color: #E4DFD5; max-width: 62ch; }
.why { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.why .sentence { display: inline; }
.slab .expl.clickable:hover { color: #fff; }
.slab .meta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--cream-2); }
.slab.ready .glyph { background: var(--ready); color: #fff; }
.slab.gap .glyph { background: var(--gap); color: #fff; }
.slab.adviser .glyph { background: var(--adviser); color: #fff; }
.slab.enter { animation: settle var(--slow) var(--ease) both; }
@keyframes settle { from { transform: scale(1.015); filter: blur(3px); opacity: .6; } to { transform: none; filter: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slab.enter { animation: none; } * { transition-duration: 0ms !important; } }

/* ---------- sentences (clickable) ---------- */
.sentence, .clickable { cursor: pointer; border-radius: 4px; transition: background var(--fast), box-shadow var(--fast); }
.sentence:hover, .clickable:hover { background: var(--paper-2); box-shadow: 0 0 0 4px var(--paper-2); }
.sentence.active, .clickable.active { background: #E8E1D2; box-shadow: 0 0 0 4px #E8E1D2; }
.prose { font-size: 15.5px; line-height: 1.6; max-width: 72ch; }
.prose .sentence { display: inline; }
.claim-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-width: 72ch; }
.claim-list li { padding-left: 18px; position: relative; }
.claim-list li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); }

/* ---------- statement ---------- */
.statement { font-family: var(--serif); font-size: 1.35rem; line-height: 1.35; font-style: italic; max-width: 60ch; padding: 4px 0 4px 18px; border-left: 1px solid var(--ink); margin: 6px 0 16px; }
.components { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.component { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: start; padding: 10px 6px; border-top: 1px solid var(--hair); }
.component:first-child { border-top: 0; }
.component .lbl { font-size: 15px; }
.component .why { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.consequence { margin-top: 16px; border: 1px solid var(--ink); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; line-height: 1.5; max-width: 72ch; background: #FBFAF7; }
.consequence h3 { margin-bottom: 4px; }

/* ---------- evidence table ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--hair); border-radius: var(--r-md); background: #FBFAF7; }
table.evidence { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.evidence th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--hair); background: var(--paper-2); position: sticky; top: 0; }
table.evidence td { padding: 8px 12px; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.evidence tr.group td { font-family: var(--serif); font-size: 15px; padding-top: 14px; background: #FBFAF7; color: var(--ink); }
table.evidence tr.row { cursor: pointer; transition: background var(--fast); }
table.evidence tr.row:hover { background: var(--paper-2); }
table.evidence tr.row.active { background: #E8E1D2; }
table.evidence td.key { color: var(--ink-2); white-space: nowrap; }
table.evidence td.val { max-width: 34ch; }
table.evidence td.src { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
table.evidence td.val .q { display: block; color: var(--muted); font-size: 12.5px; font-family: var(--serif); font-style: italic; margin-top: 2px; }
tr.row .q { display: none; }
tr.row:hover .q, tr.row.active .q { display: block; }

/* ---------- routes / gaps ---------- */
.routes { list-style: none; margin: 0; padding: 0; counter-reset: r; display: flex; flex-direction: column; gap: 10px; }
.route { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: start; border: 1px solid var(--hair); border-radius: var(--r-md); padding: 14px 16px; background: #FBFAF7; transition: border-color var(--fast), box-shadow var(--fast); }
.route:hover { border-color: var(--ink); }
.route.active { border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper-2); }
.route .n { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--ink-2); }
.route h3 { font-size: 1.1rem; }
.route p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; max-width: 70ch; }
.route .tag { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.gaps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gapfix { border-left: 1px solid var(--gap); padding: 2px 0 2px 16px; }
.gapfix .need { font-size: 15px; }
.gapfix .how { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.gapfix .types { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- draft slab ---------- */
.draft { background: var(--slab); color: var(--cream); border-radius: var(--r-lg); padding: 26px 30px; box-shadow: var(--shadow-2); }
.draft .head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.draft .hdr { font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--cream-2); max-width: 64ch; line-height: 1.45; }
.draft .body { font-family: var(--serif); font-size: 16.5px; line-height: 1.6; max-width: 70ch; display: flex; flex-direction: column; gap: 10px; }
.draft .sentence:hover { background: var(--slab-2); box-shadow: 0 0 0 4px var(--slab-2); }
.draft .sentence.active { background: #2E2B26; box-shadow: 0 0 0 4px #2E2B26; }
.cite { display: inline-block; font-family: var(--sans); font-size: 11.5px; padding: 1px 8px; border-radius: var(--r-pill); border: 1px solid #4A463F; color: var(--cream-2); margin-left: 4px; vertical-align: 2px; white-space: nowrap; }
.draft .withheld { border: 1px solid var(--adviser); border-radius: var(--r-md); padding: 12px 14px; color: #F2A3AE; }
.draft .foot { margin-top: 16px; font-size: 12.5px; color: var(--cream-2); }
.copied { color: #8FD3A5; }

/* ---------- rejected ---------- */
details.rejected { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 10px 14px; background: #FBFAF7; }
details.rejected summary { cursor: pointer; font-weight: 500; }
details.rejected ul { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
details.rejected li { margin: 4px 0; }

/* ---------- diff banner ---------- */
.diff { border: 1px solid var(--ink); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; background: #FBFAF7; animation: settle var(--slow) var(--ease) both; }
.diff h3 { margin-bottom: 6px; }
.diff .move { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: 13px; }
.diff ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }

/* ---------- chain panel ---------- */
.chain-empty { color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 34ch; }
.chain-empty h2 { margin-bottom: 8px; }
.chain { display: flex; flex-direction: column; gap: 0; animation: reveal var(--mid) var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chain .step { padding: 14px 0; border-top: 1px solid var(--hair); }
.chain .step:first-child { border-top: 0; padding-top: 0; }
.chain .step .k { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.chain .step .k::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.chain .sentence-text { font-family: var(--serif); font-size: 15.5px; line-height: 1.45; }
.docview { position: relative; border: 1px solid var(--hair); border-radius: var(--r-md); background: #FBFAF7; max-height: 300px; overflow: auto; font-size: 12.5px; line-height: 1.5; padding: 8px 0; margin-top: 8px; }
.docview .ln { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 0 10px; white-space: pre-wrap; word-break: break-word; }
.docview .ln .n { color: #B9B3A8; text-align: right; font-size: 11px; user-select: none; padding-top: 2px; }
.docview mark { background: var(--accent-soft); color: var(--ink); padding: 0 2px; border-radius: 2px; box-decoration-break: clone; box-shadow: inset 0 -1px 0 var(--accent); }
.docview mark.pulse { animation: pulse 900ms var(--ease) 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); } }
.factrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; padding: 6px 0; border-top: 1px dashed var(--hair); font-size: 13.5px; }
.factrow:first-of-type { border-top: 0; }
.factrow .fk { color: var(--muted); font-size: 12px; }
.factrow .fv { font-weight: 500; }
.rule-card { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 10px 12px; background: #FBFAF7; font-size: 13.5px; }
.rule-card .rid { font-family: var(--serif); font-size: 1.1rem; }
.rule-card .logic { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.votes { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.vote { border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12.5px; background: #FBFAF7; }
.vote .q { font-family: var(--serif); font-style: italic; color: var(--ink-2); }
.vote .runs { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.vote .runs span { padding: 1px 8px; border-radius: var(--r-pill); border: 1px solid var(--hair); font-weight: 600; font-size: 11.5px; }
.vote .runs span.yes { color: var(--ready); border-color: var(--ready); } .vote .runs span.no { color: var(--adviser); border-color: var(--adviser); } .vote .runs span.unclear { color: var(--gap); border-color: var(--gap); }
.vote .reason { color: var(--muted); margin-top: 4px; }
.chain .version { font-size: 12px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--hair); }

/* ---------- empty / loading / error ---------- */
.empty { padding: 40px 0; max-width: 60ch; }
.empty h1 { font-size: 2.2rem; line-height: 1.12; margin-bottom: 12px; }
.empty p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.empty .actions { margin-top: 20px; }
.skeleton { display: flex; flex-direction: column; gap: 14px; }
.skeleton .bar { height: 14px; border-radius: 6px; background: var(--paper-2); animation: breathe 1.2s ease-in-out infinite; }
.skeleton .bar.h { height: 120px; border-radius: var(--r-lg); }
@keyframes breathe { 50% { opacity: .55; } }
.error { border: 1px solid var(--adviser); border-radius: var(--r-md); padding: 12px 14px; background: var(--adviser-soft); color: var(--adviser); font-size: 14px; margin-bottom: 14px; }
.error b { display: block; }

/* ---------- footer ---------- */
.foot { position: sticky; bottom: 0; background: var(--slab); color: var(--cream-2); font-size: 12.5px; line-height: 1.4; padding: 10px 28px; z-index: 20; display: flex; gap: 20px; align-items: center; }
.foot .spacer { flex: 1; }
.foot a { color: var(--cream); }
.foot .more { display: none; appearance: none; background: transparent; border: 1px solid #4A463F; color: var(--cream); border-radius: var(--r-pill); padding: 2px 10px; font-size: 12px; cursor: pointer; flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1400px) { :root { --left-w: 290px; --right-w: 360px; } .slab h1 { font-size: 2.2rem; } }
@media (max-width: 1100px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .col-left, .col-centre, .col-right { min-width: 0; }
  .col-left, .col-right { position: static; max-height: none; border-left: 0; padding-left: 0; }
  .col-right { border-top: 1px solid var(--hair); padding-top: 18px; }
  .rail-track { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .rail-track::before { display: none; }
}
@media (max-width: 640px) {
  .foot .disclaimer { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .foot.open .disclaimer { -webkit-line-clamp: unset; }
  .foot #foot-meta { display: none; }
  .foot .more { display: inline-block; }
  .foot { gap: 10px; }
  .top { padding: 10px 16px; flex-wrap: wrap; } .rail, .work { padding-left: 16px; padding-right: 16px; }
  .rail-track { grid-template-columns: 1fr; }
  .slab { padding: 22px 20px; } .slab h1 { font-size: 1.8rem; }
  .component { grid-template-columns: 1fr; gap: 6px; }
  .route { grid-template-columns: 28px 1fr; } .route .chip { grid-column: 2; }
  .foot { padding: 10px 16px; flex-wrap: wrap; }
  .draft, .slab { border-radius: var(--r-md); }
}
