/* Layout: a chamber. The desk (matter, seats, rules) on one page, the floor (the record) on the other.
   One emblem, the hemicycle, shows who has the floor. Speech is set like a printed record; controls stay plain. */
:root {
  --paper: #f1f4f0;        /* page ground: cool, faintly green paper */
  --sheet: #fbfcfa;        /* raised surfaces and fields */
  --well: #e7ece7;         /* recessed areas */
  --ink: #17211c;
  --ink-2: #46564d;
  --ink-3: #5f6e65;
  --rule: #d2dad3;
  --rule-2: #b7c2b9;
  --bench: #2b6650;        /* accent: the green of the benches */
  --bench-2: #204d3c;
  --on-bench: #ffffff;
  --bench-wash: #dde9e1;
  --ochre: #9a4a2a;        /* the clock, cuts and warnings */
  --ochre-wash: #f4e5dc;
  --bad: #a12f28;
  --bad-wash: #f7e3e0;
  --seat-1: oklch(0.52 0.13 255);
  --seat-2: oklch(0.54 0.15 28);
  --seat-3: oklch(0.56 0.11 85);
  --seat-4: oklch(0.50 0.14 325);
  --seat-5: oklch(0.54 0.09 205);
  --seat-6: oklch(0.50 0.13 290);
  --seat-7: oklch(0.56 0.12 130);
  --seat-8: oklch(0.52 0.10 55);
  --on-seat: #ffffff;
  --seat: var(--ink-2);
  --font-ui: "Commissioner", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-record: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 5px;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1512; --sheet: #161e1a; --well: #1d2722;
    --ink: #e3e9e4; --ink-2: #aab9af; --ink-3: #8e9e94;
    --rule: #2a362f; --rule-2: #3d4b43;
    --bench: #79c2a2; --bench-2: #93d2b5; --on-bench: #0c1410; --bench-wash: #1c2c25;
    --ochre: #e39a72; --ochre-wash: #36251c;
    --bad: #f0897e; --bad-wash: #3b201d;
    --seat-1: oklch(0.78 0.11 255); --seat-2: oklch(0.78 0.12 28); --seat-3: oklch(0.82 0.11 85); --seat-4: oklch(0.78 0.12 325);
    --seat-5: oklch(0.80 0.09 205); --seat-6: oklch(0.78 0.11 290); --seat-7: oklch(0.82 0.11 130); --seat-8: oklch(0.80 0.10 55);
    --on-seat: #0c1410;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1512; --sheet: #161e1a; --well: #1d2722;
  --ink: #e3e9e4; --ink-2: #aab9af; --ink-3: #8e9e94;
  --rule: #2a362f; --rule-2: #3d4b43;
  --bench: #79c2a2; --bench-2: #93d2b5; --on-bench: #0c1410; --bench-wash: #1c2c25;
  --ochre: #e39a72; --ochre-wash: #36251c;
  --bad: #f0897e; --bad-wash: #3b201d;
  --seat-1: oklch(0.78 0.11 255); --seat-2: oklch(0.78 0.12 28); --seat-3: oklch(0.82 0.11 85); --seat-4: oklch(0.78 0.12 325);
  --seat-5: oklch(0.80 0.09 205); --seat-6: oklch(0.78 0.11 290); --seat-7: oklch(0.82 0.11 130); --seat-8: oklch(0.80 0.10 55);
  --on-seat: #0c1410;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); padding-block: 0 56px; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--bench-2); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--bench); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Top bar ---- */
.top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 21px/1 var(--font-record); letter-spacing: -0.01em; }
.mark svg { width: 34px; height: 19px; flex: none; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { font: 500 14.5px/1.2 var(--font-ui); color: var(--ink-2); background: none; border: 0; border-radius: var(--radius); padding: 8px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { background: var(--well); color: var(--ink); }
.tab[aria-current="page"] { background: var(--bench-wash); color: var(--bench-2); }
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ochre); }
.tab .dot.is-live { background: var(--bench); animation: pulse 1.6s ease-in-out infinite; }
.tab .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.top-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.top-end select { width: auto; padding-block: 6px; }

/* ---- Controls ---- */
input[type="text"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  padding: 7px 9px; width: 100%; min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; display: block; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 0.85; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--bench); outline-offset: 0; border-color: var(--bench); }
.btn {
  font: 500 14px/1.2 var(--font-ui); color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  padding: 8px 13px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--bench); border-color: var(--bench); color: var(--on-bench); font-weight: 600; }
.btn.primary:hover { background: var(--bench-2); border-color: var(--bench-2); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); padding-inline: 8px; }
.btn.quiet:hover { background: var(--well); color: var(--ink); }
.btn.warn { color: var(--ochre); }
.btn.warn:hover { border-color: var(--ochre); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--sheet); }
.btn.big { font-size: 16px; padding: 12px 18px; width: 100%; }
.btn.small { font-size: 13px; padding: 5px 9px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex: none; }
.hint { font-size: 13px; color: var(--ink-2); }
.hint.soft { color: var(--ink-3); }
.note { font-size: 13.5px; color: var(--ink-2); background: var(--well); border-radius: 6px; padding: 10px 12px; }
.note.warn { background: var(--ochre-wash); color: var(--ink); }
.note.bad { background: var(--bad-wash); color: var(--ink); }
.note b { font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; line-height: 1.3; padding: 2px 8px; border-radius: 20px; background: var(--well); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--bench-wash); color: var(--bench-2); }
.pill.warn { background: var(--ochre-wash); color: var(--ochre); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }

.stepper { display: inline-flex; align-items: center; flex: none; }
.stepper .step { width: 32px; height: 34px; padding: 0; font: 500 17px/1 var(--font-ui); color: var(--ink-2); background: var(--sheet); border: 1px solid var(--rule-2); cursor: pointer; }
.stepper .step:first-child { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
.stepper .step.more { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.stepper .step:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-3); position: relative; }
.stepper .step:disabled { opacity: 0.45; cursor: not-allowed; }
.stepper input { width: 62px; height: 34px; text-align: center; border-radius: 0; border-inline-width: 0; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; padding-inline: 4px; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { margin-inline-start: 8px; min-width: 3.4em; font-size: 13px; color: var(--ink-2); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 36px; height: 20px; margin: 0; cursor: pointer; }
.switch .track { width: 36px; height: 20px; border-radius: 20px; background: var(--rule-2); position: relative; flex: none; transition: background 0.15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--sheet); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--bench); }
.switch input:checked + .track::after { transform: translateX(16px); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--bench); outline-offset: 2px; }

/* ---- Convene ---- */
.lede { padding-block: 30px 6px; max-width: 64ch; }
.lede h1 { font: 600 clamp(28px, 4.4vw, 42px)/1.1 var(--font-record); letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 10px; }
.lede p { font-size: 16.5px; color: var(--ink-2); text-wrap: pretty; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 384px); gap: 40px; align-items: start; padding-block: 26px 0; }
.desk-main, .desk-side { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.desk-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); }
.block { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.block-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.block h2, .kicker { font: 600 12.5px/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }
.block-head .n { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; }
#matter { font: 400 19px/1.45 var(--font-record); padding: 12px 14px; min-height: 5.2em; field-sizing: content; }

.roll { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.seat { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 14px; padding-block: 18px; border-bottom: 1px solid var(--rule); }
.plate { width: 38px; height: 34px; margin-top: 2px; }
.plate svg { width: 100%; height: 100%; display: block; }
.plate-n { font: 700 13px var(--font-ui); }
/* A seat's colour by class, for what is written into the page's HTML (see seatClass in ui/parts.js). */
.sc1 { --seat: var(--seat-1); } .sc2 { --seat: var(--seat-2); } .sc3 { --seat: var(--seat-3); } .sc4 { --seat: var(--seat-4); }
.sc5 { --seat: var(--seat-5); } .sc6 { --seat: var(--seat-6); } .sc7 { --seat: var(--seat-7); } .sc8 { --seat: var(--seat-8); }
.seat-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.seat-top { display: flex; align-items: center; gap: 8px; }
.seat-name { font: 600 18px/1.2 var(--font-ui) !important; background: transparent !important; border-color: transparent !important; padding: 4px 6px !important; margin-inline-start: -7px; flex: 1 1 120px; }
.seat-name:hover { border-color: var(--rule-2) !important; }
.seat-name:focus-visible { background: var(--sheet) !important; border-color: var(--bench) !important; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > .label, .label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.label i { font-style: normal; font-weight: 400; color: var(--ink-3); }
.account { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.account .row > input { flex: 1 1 180px; width: auto; }
.reading { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.reading-file { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.reading-title { font: 500 15.5px/1.3 var(--font-record); font-style: italic; min-width: 0; overflow-wrap: anywhere; }
.card { font: 400 15px/1.5 var(--font-record) !important; min-height: 7.5em; field-sizing: content; }
.card-live { font: 400 15px/1.5 var(--font-record); white-space: pre-wrap; background: var(--sheet); border: 1px dashed var(--rule-2); border-radius: var(--radius); padding: 8px 10px; min-height: 4.5em; }
details.adv > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); width: fit-content; }
details.adv[open] > summary { margin-bottom: 10px; }
details.adv .fields { grid-template-columns: minmax(0, 1fr); }
.mono { font-family: var(--font-mono); font-size: 12.5px !important; }
.drop { outline: 2px dashed var(--bench); outline-offset: 4px; border-radius: 6px; }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 44px; border-top: 1px solid var(--rule); }
.rules-group { display: flex; flex-direction: column; gap: 11px; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.rule { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.rule > label:first-child, .rule > .rule-name { flex: 1 1 130px; min-width: 0; }
.rule select { width: auto; max-width: 100%; }
.rule .hint { flex-basis: 100%; }
.rule.stack { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.rule.stack > label:first-child, .rule.stack > .hint, .rule.stack > .rule-name { flex: none; }

.business ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; counter-reset: item; }
.business li { counter-increment: item; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.business li::before { content: counter(item); font: 600 12.5px/1.6 var(--font-ui); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.business li b { font-weight: 600; display: block; }
.business li span { font-size: 13.5px; color: var(--ink-2); display: block; }
.business li.is-done b { color: var(--ink-3); font-weight: 500; }
.business li.is-now b { color: var(--bench-2); }
.business li.is-now::before { content: "▸"; color: var(--bench); }
[dir="rtl"] .business li.is-now::before { content: "◂"; }
.estimate { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.missing { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ochre); }
.open-box { display: flex; flex-direction: column; gap: 10px; }

/* ---- Chamber ---- */
.chamber { display: grid; grid-template-columns: minmax(270px, 336px) minmax(0, 1fr); gap: 44px; align-items: start; padding-block: 26px 0; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); display: flex; flex-direction: column; gap: 16px; min-width: 0; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; }
.rail-top, .rail-more { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rail-more { border-top: 1px solid var(--rule); padding-top: 16px; }
.hemi svg { display: block; width: 100%; max-width: 300px; height: auto; margin-inline: auto; }
.hemi .wedge { fill: var(--seat); fill-opacity: 0.2; stroke: var(--seat); stroke-width: 1.2; transition: fill-opacity 0.25s; }
.hemi .wedge.is-on { fill-opacity: 1; }
.hemi .initial { font: 700 13px var(--font-ui); fill: var(--seat); text-anchor: middle; dominant-baseline: central; }
.hemi .initial.is-on { fill: var(--on-seat); }
.hemi .chair { fill: var(--ink-2); }
.hemi .chair.is-on { fill: var(--bench); }
.hemi .chair-label { font: 600 8.5px var(--font-ui); letter-spacing: 0.12em; fill: var(--ink-3); text-anchor: middle; text-transform: uppercase; }
.status { font: 600 16.5px/1.3 var(--font-ui); text-align: center; text-wrap: balance; }
.status small { display: block; font: 400 13px/1.4 var(--font-ui); color: var(--ink-2); margin-top: 3px; }
.clocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.clock { background: var(--well); border-radius: 6px; padding: 8px 10px 9px; text-align: center; min-width: 0; }
.clock .name { font: 600 11px/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }
.clock .t { font: 600 23px/1.15 var(--font-ui); font-variant-numeric: tabular-nums; }
.clock .of { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.clock.is-late .t { color: var(--ochre); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.controls .btn { flex: 1 1 auto; }
.controls.stack { flex-direction: column; }
.controls .row { flex: 1 1 100%; }
.status .result { display: block; font: 600 20px/1.2 var(--font-record); }
.roll-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.roll-mini li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 9px; font-size: 14px; }
.roll-mini .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roll-mini .via { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.roll-mini .count { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip { width: 11px; height: 11px; border-radius: 2px; background: var(--seat); flex: none; }
.floor-box { display: flex; flex-direction: column; gap: 8px; }
.rail-sep { height: 1px; background: var(--rule); border: 0; margin: 0; }

.floor { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.matter-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.matter-head p { font: 400 clamp(18px, 2.3vw, 21px)/1.4 var(--font-record); max-width: 62ch; text-wrap: pretty; white-space: pre-wrap; overflow-wrap: anywhere; }
.record { display: flex; flex-direction: column; gap: 22px; max-width: 70ch; }
.entry { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.entry .who { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; }
.entry .name { font: 700 14px/1.3 var(--font-ui); letter-spacing: 0.015em; color: var(--seat); }
.entry .meta { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.speech { font: 400 17px/1.62 var(--font-record); overflow-wrap: anywhere; }
.speech p + p { margin-top: 0.7em; }
.speech code { font-family: var(--font-mono); font-size: 0.86em; }
.entry.is-live .speech > p:last-child::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-inline-start: 3px; vertical-align: -0.14em; background: var(--seat); animation: blink 1s steps(2, start) infinite; }
.entry.chair { flex-direction: row; align-items: center; gap: 14px; font: 600 12px/1.4 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
.entry.chair::before, .entry.chair::after { content: ""; flex: 1 1 20px; height: 1px; background: var(--rule); }
.entry.chair span { flex: 0 1 auto; text-wrap: balance; }
.entry.floor-note .name { color: var(--ink); }
.entry.passed { font-size: 13.5px; color: var(--ink-3); font-style: italic; }
.thinking { font: italic 400 16px/1.5 var(--font-record); color: var(--ink-3); }
.thinking::after { content: "…"; animation: blink 1.2s steps(2, start) infinite; }
.motion-box { border-inline-start: 3px solid var(--bench); padding-block: 4px; padding-inline-start: 16px; display: flex; flex-direction: column; gap: 4px; }
.motion-box p { font: 500 19px/1.4 var(--font-record); text-wrap: pretty; }
.vote-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.vote-line .reason { font: 400 16px/1.5 var(--font-record); flex: 1 1 240px; min-width: 0; }
.pill.vote-for { background: var(--bench); color: var(--on-bench); }
.pill.vote-against { background: var(--ochre); color: var(--sheet); }
.pill.vote-abstain, .pill.vote-unclear { background: var(--well); color: var(--ink-2); }
.role-card { background: var(--well); border-radius: 6px; padding: 12px 14px; }
.role-card .speech { font-size: 15.5px; }

.relay { border: 1.5px solid var(--seat); border-radius: 8px; background: var(--sheet); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.relay h3 { font: 600 16px/1.3 var(--font-ui); }
.relay ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.relay li { counter-increment: step; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.relay li::before { content: counter(step); width: 22px; height: 22px; border-radius: 50%; background: var(--seat); color: var(--on-seat); font: 700 12.5px/22px var(--font-ui); text-align: center; }
.relay li > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prompt { font: 12.5px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--well); border-radius: var(--radius); padding: 10px 12px; margin: 0; max-height: 170px; overflow: auto; }
.halt { border: 1.5px solid var(--bad); border-radius: 8px; background: var(--bad-wash); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.halt h3 { font: 600 15.5px/1.3 var(--font-ui); }
.halt pre { margin: 0; font: 12.5px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding-block: 56px; max-width: 46ch; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.empty h2 { font: 600 24px/1.2 var(--font-record); }

/* ---- The record of a finished session ---- */
.minutes { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: clamp(18px, 3.6vw, 34px); display: flex; flex-direction: column; gap: 20px; max-width: 76ch; }
.minutes-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.minutes-head h2 { font: 600 clamp(21px, 2.8vw, 27px)/1.25 var(--font-record); letter-spacing: -0.01em; text-wrap: balance; white-space: pre-wrap; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: 14px; margin: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.result { font: 600 15px/1.3 var(--font-ui); }
.result.for, .result.against { color: var(--bench-2); }
.result.none { color: var(--ochre); }
.result.nopoll { color: var(--ink-2); }

/* ---- The chair's final statement: agreed or not, how close, who stands where ---- */
.outcome { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.outcome-part { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.verdict { font: 600 clamp(22px, 3.2vw, 28px)/1.2 var(--font-record); letter-spacing: -0.01em; text-wrap: balance; }
.verdict.for, .verdict.against { color: var(--bench-2); }
.verdict.none { color: var(--ochre); }
.verdict.nopoll { color: var(--ink-2); }
.statement { font: 400 16.5px/1.55 var(--font-record); text-wrap: pretty; }
.measures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.measure { background: var(--well); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.measure .v { font: 600 22px/1.2 var(--font-ui); font-variant-numeric: tabular-nums; }
.measure .k { font: 500 13px/1.3 var(--font-ui); }
.measure .d { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
/* Each member's score as a dot on a line from 0 to 10; equal scores stack. */
.hint.caveat { color: var(--ink-2); border-inline-start: 2px solid var(--ochre); padding-inline-start: 10px; }
.scale { position: relative; height: calc(28px + var(--levels, 1) * 24px); margin: 2px 13px 0; }
.scale .track { position: absolute; inset-inline: 0; bottom: 21px; height: 2px; border-radius: 1px; background: var(--rule-2); }
.scale .dot { position: absolute; inset-inline-start: var(--x); bottom: calc(27px + var(--level, 0) * 24px); width: 22px; height: 22px; margin-inline-start: -11px; border-radius: 50%; background: var(--seat); color: var(--on-seat); font: 700 11.5px/22px var(--font-ui); text-align: center; }
.scale .end { position: absolute; bottom: 0; font: 500 12px/1.2 var(--font-ui); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.scale .end.lo { inset-inline-start: -4px; }
.scale .end.hi { inset-inline-end: -7px; }
.sides { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.side-head { display: flex; align-items: center; gap: 8px; }
.side-head .n { font: 600 13px/1 var(--font-ui); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pill.vote-absent { background: var(--well); color: var(--ink-2); }
/* Name and score on one line, the member's words on the next. (A grid with a spanning cell would size its columns to the whole sentence.) */
.stand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--seat); }
.stand .words { flex: 1 1 100%; min-width: 0; font: 400 16px/1.5 var(--font-record); text-wrap: pretty; overflow-wrap: anywhere; }
.stand .words.none { font: italic 400 14px/1.5 var(--font-ui); color: var(--ink-3); }
.score { font: 600 12.5px/1.3 var(--font-ui); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry.outcome-entry { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: clamp(14px, 3vw, 24px); }
.prose { font: 400 16.5px/1.62 var(--font-record); overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { font: 600 12.5px/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); margin: 1.5em 0 0.5em; }
.prose > :first-child { margin-top: 0; }
.prose p + p { margin-top: 0.7em; }
.prose ul, .prose ol { margin: 0.4em 0; padding-inline-start: 1.3em; }
.prose li + li { margin-top: 0.3em; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.full-record > summary { cursor: pointer; font: 600 12.5px/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); padding-block: 6px; }
.full-record[open] > summary { margin-bottom: 18px; }

/* ---- Records ---- */
.records { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 80ch; }
.records li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.records .what { font: 500 17px/1.35 var(--font-record); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.records .when { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.page-head { padding-block: 28px 18px; display: flex; flex-direction: column; gap: 8px; max-width: 64ch; }
.page-head h1 { font: 600 clamp(24px, 3.4vw, 32px)/1.15 var(--font-record); letter-spacing: -0.015em; }

/* ---- Footer, toast ---- */
.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.foot p { max-width: 72ch; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
/* ---- Free questions and the licence ---- */
.licence-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 13.5px; color: var(--ink-2); }
.licence-line .hint, .licence-line .key-box { flex-basis: 100%; }
.paywall { border: 1.5px solid var(--bench); border-radius: 8px; background: var(--bench-wash); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.paywall h3 { font: 600 17px/1.3 var(--font-record); text-wrap: balance; }
.paywall p { font-size: 14px; line-height: 1.5; }
.paywall .price { font: 600 15px/1.3 var(--font-ui); }
.paywall .btn.big { align-self: stretch; justify-content: center; text-decoration: none; }
.key-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.key-box label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.key-box .row { flex-wrap: nowrap; }
.key-box input { min-width: 0; }

/* ---- What the page says about itself: how it works, questions people ask ---- */
.about { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; }
.about-col { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.about-part { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.guide-links { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font: 500 15.5px/1.4 var(--font-record); }
.also { font-size: 13.5px; color: var(--ink-2); }
.about h2 { font: 600 12.5px/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; font: 400 15.5px/1.55 var(--font-record); }
.steps li::before { content: counter(step); grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--bench-wash); color: var(--bench-2); font: 700 12.5px/24px var(--font-ui); text-align: center; }
.steps li b { font: 600 15px/1.4 var(--font-ui); }
.steps li span { grid-column: 2; color: var(--ink-2); }
.faq { display: flex; flex-direction: column; gap: 18px; }
.qa { display: flex; flex-direction: column; gap: 4px; }
.qa h3 { font: 600 16px/1.35 var(--font-ui); }
.qa p { font: 400 15.5px/1.6 var(--font-record); color: var(--ink-2); max-width: 68ch; }
@media (max-width: 920px) { .about { grid-template-columns: minmax(0, 1fr); } }

/* Shown only where scripts are switched off. */
.noscript { margin: 0; padding: 10px var(--gutter); background: var(--ochre-wash); color: var(--ink); font-size: 14px; text-align: center; }

/* ---- The reading pages: the guides, their index, and "nothing here" ----
   Plain pages with no script (build.mjs writes them from content/). Same top bar and footer as the app. */
a.tab { text-decoration: none; }
.top-end a { font-size: 14px; }
.article { max-width: 70ch; padding-block: 34px 0; }
.article h1, .article .as-h1 { font: 600 clamp(28px, 4.4vw, 40px)/1.12 var(--font-record); letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 12px; }
.article .lead { font: 400 18.5px/1.5 var(--font-record); color: var(--ink-2); text-wrap: pretty; }
.article h2 { font: 600 22px/1.25 var(--font-record); letter-spacing: -0.01em; text-wrap: balance; margin: 34px 0 10px; }
.article h3 { font: 600 17px/1.3 var(--font-ui); margin: 24px 0 8px; }
.article p, .article li { font: 400 17px/1.62 var(--font-record); }
.article p + p { margin-top: 0.8em; }
.article ul, .article ol { margin: 0.6em 0; padding-inline-start: 1.3em; }
.article li + li { margin-top: 0.4em; }
.article strong { font-weight: 600; }
.article code { font-family: var(--font-mono); font-size: 0.86em; }
.article section + section { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--rule); }
.article .crumbs { font: 500 13.5px/1.3 var(--font-ui); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a::before { content: "← "; }
[dir="rtl"] .crumbs a::before { content: "→ "; }
.article .cta { margin-top: 30px; }
.cta .btn.big { width: auto; }
.more-guides { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.article .more-guides h2 { font: 600 12.5px/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; }
.article .more-guides ul { list-style: none; padding: 0; margin: 0; }
.article .more-guides li { font: 500 16px/1.4 var(--font-record); }
.article .updated { font: 400 13px/1.4 var(--font-ui); color: var(--ink-3); margin-top: 22px; }
.article .guide-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.guide-list li { padding-block: 16px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; margin: 0; }
.guide-list a { font: 600 20px/1.3 var(--font-record); text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list span { font: 400 15.5px/1.55 var(--font-record); color: var(--ink-2); }

/* The maker's line takes the whole width under the rest, so it reads as a signature. */
.foot .maker { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink-3); }
.foot .maker b { font-weight: 600; color: var(--ink-2); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--bench-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.toast { position: fixed; inset-inline: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); display: flex; justify-content: center; pointer-events: none; z-index: 10; }
.toast span { background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 22px; box-shadow: 0 6px 22px rgb(0 0 0 / 0.22); max-width: min(90vw, 520px); }

@keyframes blink { to { visibility: hidden; } }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 920px) {
  .desk { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .desk-side { position: static; }
  /* On a narrow screen the record sits between the two halves of the rail. */
  .chamber { display: flex; flex-direction: column; gap: 22px; }
  .rail { display: contents; }
  .rail-top, .rail-more { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; }
  .rail-top { order: 1; }
  .floor { order: 2; }
  .rail-more { order: 3; }
  .hemi svg { max-width: 230px; }
}
@media (max-width: 560px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .seat { grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; }
  .plate { width: 30px; height: 27px; }
  .top { gap: 8px 12px; }
  .tabs { order: 3; flex-basis: 100%; }
  .speech { font-size: 16.5px; }
  .panel { padding: 15px; }
  .measures { grid-template-columns: minmax(0, 1fr); }
  .measure { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
}

html { color-scheme: light; }
body { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
