/* VOICE: a clerk's working instrument: calm, exact, nothing decorative
   IDEA: the Commons annunciator crossed with a division clock
   PICTURE: one rail for the sitting day, business as blocks, vote windows as bands, knives as red ticks, the moment of interruption dashed
   COLOUR and TYPE: Commons green field, white paper, division red accent; Public Sans throughout (self-hosted) */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/public-sans-latin.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #0c1511);
  --ink: light-dark(#10231b, #e4eee8);
  --mute: light-dark(#53665d, #9fb3a9);
  --line: light-dark(#d6e0db, #24352d);
  --panel: light-dark(#f3f7f5, #122019);
  --g: light-dark(#0d5c3f, #0f3d2b);
  --g2: light-dark(#0a4a33, #0b2f21);
  --red: light-dark(#c8281c, #ff6b5c);
  --knife: #ff7a6b;
  --ok: light-dark(#0d6b47, #5fd3a0);
  --warnbg: light-dark(#fff1ef, #2a1512);
  --onhero: #cfe5da;
}

* { box-sizing: border-box; min-width: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Public Sans", system-ui, sans-serif; overflow-x: clip; }
.band { padding: clamp(24px, 4vw, 56px) max(5vw, 16px); }
.wrap { max-width: 1240px; margin: 0 auto; }
.panel { background: var(--panel); }
.hero { background: var(--g); color: #fff; }
.top { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; }
h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; margin: 0; font-weight: 800; text-wrap: balance; }
h2 { font-size: 24px; line-height: 1.15; margin: 0 0 6px; font-weight: 800; }
h3 { font-size: 19px; line-height: 1.25; margin: 0; font-weight: 800; }
.sub { color: var(--onhero); margin: 4px 0 0; }
.clock { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.14); color: #fff; margin-left: 8px; vertical-align: middle; font-weight: 600; }
.pill.on { background: #fff; color: #0d5c3f; }
.pill.bad { background: #ffd7d2; color: #7a1209; }
.nowline { margin: 18px 0 0; color: #fff; font-weight: 600; min-height: 1.55em; }
.nowline .lbl { margin-right: 8px; }
.nowline .div { display: inline-block; background: #fff; color: #b3261e; padding: 2px 10px; border-radius: 4px; margin-right: 8px; }
.readout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; margin: 18px 0; align-items: end; }
.big { font-size: clamp(40px, 7vw, 76px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.big.words { font-size: clamp(32px, 5vw, 56px); white-space: normal; }
.big small { font-size: .42em; font-weight: 600; opacity: .8; margin: 0 .25em; }
.lbl { font-size: 14px; color: var(--onhero); font-weight: 600; }
.wins { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wins li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 12px; background: rgba(255,255,255,.08); border-radius: 6px; font-size: 15px; }
.wins li.next { background: #fff; color: #0d5c3f; font-weight: 600; }
.wins li.past { opacity: .7; }
.wins .t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fig { position: relative; min-height: 210px; background: var(--g2); border-radius: 8px; }
.fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.note { font-size: 14px; color: var(--mute); }
.hero .note { color: var(--onhero); }
.hint { font-size: 12px; color: var(--mute); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--mute); font-weight: 600; padding: 8px 6px; border-bottom: 2px solid var(--line); }
td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kind { font-size: 13px; color: var(--mute); display: block; }
.src { font-size: 12px; color: var(--mute); white-space: nowrap; }
.over { color: var(--red); font-weight: 600; }
.under { color: var(--ok); font-weight: 600; }
.mine { color: var(--ok); font-weight: 600; }

input, select, textarea, button { font: inherit; font-size: 16px; color: inherit; }
input, select { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-height: 40px; }
input[type=time] { width: 7.4em; }
input[type=number] { width: 5em; }
input.title { width: 100%; min-width: 14em; }
button { min-height: 40px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--g); background: transparent; color: var(--ink); cursor: pointer; }
button.x { border-color: var(--line); color: var(--mute); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.grid2 label { display: grid; gap: 4px; font-size: 14px; color: var(--mute); }
.warn { background: var(--warnbg); border-left: 4px solid var(--red); padding: 10px 14px; margin: 0 0 16px; border-radius: 4px; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
a { color: var(--ok); }
.scroll { overflow-x: auto; }

.item { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 16px 0; }
.item.quiet { padding: 10px 16px; }
.item .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 8px 0 4px; font-size: 15px; }
.item .meta .note { margin: 0; }
.item h3 .tag { font-size: 12px; font-weight: 600; color: var(--mute); margin-left: 8px; }
.item td .cell { flex-wrap: nowrap; }
.item td input.title { min-width: 16em; }
.foot { padding-block: 24px; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) { .readout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  table { font-size: 14px; }
  .stack thead { display: none; }
  .stack tr { display: grid; padding-block: 10px; border-bottom: 1px solid var(--line); }
  .stack td { display: flow-root; border: 0; padding: 3px 0; padding-inline-start: 8em; text-align: start; }
  .stack td::before { content: attr(data-l); float: inline-start; width: 7.5em; margin-inline-start: -8em; white-space: normal; color: var(--mute); font-size: 13px; }
  .stack td:empty { display: none; }
  .stack td.n { text-align: start; }
  input.title, .item td input.title { min-width: 0; }
  .item td .cell { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) { .nowln { transition: transform .6s ease; } }
