/* Line Item, council view. App style: framed sheet (one tinted frame, the work on a white sheet).
   Owner's constraints win over the dealt sizes: light ground, 18px body, nothing under 16px, square corners.

   Grid at 1440: frame inset 8 + sheet padding 40 = one left edge at 48.
   Sheet content 1440 - 2 x 48 = 1344 = 12 x 90 + 11 x 24.
   Main chart 7 columns (774) + 24 + detail 5 columns (546) = 1344. Half rows 660 + 24 + 660 = 1344.
   Table 8 columns (888) + 24 + notes 4 columns (432) = 1344. */

:root {
  --paper: #ffffff;
  --tint: #f6eff3;
  --tint-2: #ecdfe7;
  --ink: #101421;
  --muted: #595666;
  --plum: #470c35;
  --plum-mid: #8a2a6b;
  --plum-soft: #dcc3d2;
  --accent: #ff488b;
  --accent-ink: #0d060b;
  --blue: #256abf;

  --font: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --fs-small: 1rem;       /* 16px, the floor */
  --fs-body: 1.125rem;    /* 18px */
  --fs-h2: 1.375rem;      /* 22px */
  --fs-h1: 2rem;          /* 32px */

  --inset: 8px;
  --pad: 2.5rem;
  --gap: 1.5rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-data: 450ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--tint); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: 1.45; letter-spacing: -0.005em; font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, ul, ol, dl, dd, dt, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; }
p, dd { text-wrap: pretty; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 50; padding: 0.75rem 1rem; background: var(--ink); color: #fff; }
.skip:focus { top: 0.5rem; }

/* ---------- frame: top bar, title and filters share the tinted ground ---------- */
.frame { padding: 0 var(--inset) var(--inset); }
.top, .title, .filters, .foot { padding-inline: var(--pad); }

.top { display: flex; align-items: center; gap: 1rem; min-height: 3.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; }
.brand-mark { display: block; flex: none; }
.brand-name { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.top-scope { color: var(--muted); font-size: var(--fs-small); }
.top-link { margin-left: auto; display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; transition: transform var(--t-press) var(--ease-out); }
.top-link:active { transform: scale(0.97); }

.title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding-block: 0.25rem 1rem; }
h1 { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -0.035em; text-wrap: balance; }
.tag { flex: none; display: inline-flex; align-items: center; min-height: 1.875rem; padding: 0 0.625rem; background: var(--plum); color: #fff; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; }
.title-sub { color: var(--muted); }

.button { flex: none; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.375rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.textbtn { align-self: flex-end; min-height: 2.75rem; padding: 0 0.25rem; font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; white-space: nowrap; transition: transform var(--t-press) var(--ease-out); }
.textbtn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: #ff6aa1; }
}

/* one filter row above everything it scopes; it stays in reach while the sheet scrolls under it */
.filters { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 2rem; margin-inline: calc(var(--inset) * -1); padding-inline: calc(var(--pad) + var(--inset)); padding-block: 0.25rem 0.875rem; background: var(--tint); }
.f-group { display: grid; gap: 0.25rem; min-width: 0; }
.f-label { font-size: var(--fs-small); color: var(--muted); }
.seg { display: flex; gap: 2px; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 0.875rem; background: var(--paper); font-size: var(--fs-small); white-space: nowrap; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.seg input:checked + span { background: var(--ink); color: #fff; font-weight: 500; }
.seg input:active + span { transform: scale(0.96); }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .seg input:not(:checked):hover + span { background: var(--tint-2); }
}
.sel { display: none; min-height: 2.75rem; min-width: 9.5rem; padding: 0 0.75rem; border: 0; border-radius: 0; background-color: var(--paper); font-size: var(--fs-small); cursor: pointer; }
.sel:active { background-color: var(--tint-2); }

/* ---------- the sheet ---------- */
.sheet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3.5rem var(--gap); align-items: start; padding: 1.75rem var(--pad) 3rem; background: var(--paper); }
.sheet:focus { outline: none; }
.noscript { grid-column: 1 / -1; padding: 1rem; background: var(--tint); }
.block { min-width: 0; }
.b-main { grid-column: span 7; }
.detail { grid-column: span 5; align-self: stretch; }
.b-swaps, .b-wards, .b-who, .b-days { grid-column: span 6; }
.b-table { grid-column: span 8; }
.b-notes { grid-column: span 4; }

.block-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.25rem 1.5rem; margin-bottom: 1rem; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.02em; }
.block-sub { grid-column: 1 / -1; color: var(--muted); max-width: 64ch; }
.b-main .block-sub { max-width: none; }
.block-foot { margin-top: 0.875rem; color: var(--muted); font-size: var(--fs-small); max-width: 66ch; }
.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: var(--fs-small); }
.legend li { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.sw { display: inline-block; flex: none; width: 0.875rem; height: 0.875rem; }
.sw-pos { background: var(--accent); }
.sw-neg { background: var(--blue); }
.sw-ans { background: var(--plum-mid); }
.sw-pop { background: var(--plum-soft); }
.flag { display: inline-block; margin-left: 0.5rem; padding: 0 0.375rem; background: var(--tint-2); font-size: var(--fs-small); font-weight: 400; white-space: nowrap; }

/* ---------- KPIs: type on the sheet, no tiles ---------- */
.kpis { grid-column: 1 / -1; margin-bottom: -1rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem var(--gap); }
.kpi { display: flex; flex-direction: column; min-width: 0; }
.kpi-n { grid-column: span 3; }
.kpi-moe { grid-column: span 3; }
.kpi-moved { grid-column: span 2; }
.kpi-swap { grid-column: span 4; }
.kpi dt { color: var(--muted); font-size: var(--fs-small); }
.kpi-value { margin-top: 0.125rem; font-size: 2rem; line-height: 1.15; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value .unit { font-size: var(--fs-body); font-weight: 400; letter-spacing: -0.005em; color: var(--muted); }
.kpi-words { font-size: 1.625rem; line-height: 1.42; white-space: normal; text-wrap: balance; }
.kpi-sub { margin-top: 0.125rem; color: var(--muted); font-size: var(--fs-small); }

/* ---------- main chart: one diverging bar per budget line ---------- */
.b-main { --name-w: 12.5rem; --val-w: 4.5rem; --col-gap: 1rem; --pad-l: 0.625rem; --pad-r: 0.75rem; --mark: 4px; }
.rows { position: relative; isolation: isolate; }
.row { position: relative; display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr) var(--val-w); column-gap: var(--col-gap); align-items: center; min-height: 2.125rem; padding: 0 var(--pad-r) 0 var(--pad-l); border-left: var(--mark) solid transparent; cursor: pointer; transition: background-color var(--t-hover) ease; }
.row input { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; }
.row-name { line-height: 1.2; }
.row-val { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.is-on { background: var(--tint); border-left-color: var(--ink); }
.row.is-on .row-name { font-weight: 500; }
.row:active { background: var(--tint-2); }
.row:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--tint); }
}

.track { position: relative; z-index: 2; height: 1.25rem; }
.track::after { content: ""; position: absolute; left: 50%; top: -0.4375rem; bottom: -0.4375rem; width: 2px; margin-left: -1px; background: var(--ink); }
.bar { position: absolute; top: 0; bottom: 0; width: 50%; transform: scaleX(0); transition: transform var(--t-data) var(--ease-out); }
.bar-pos { left: 50%; transform-origin: left center; background: var(--accent); }
.bar-neg { right: 50%; transform-origin: right center; background: var(--blue); }

.gridlines { position: absolute; z-index: 1; top: 0; bottom: 0; left: calc(var(--mark) + var(--pad-l) + var(--name-w) + var(--col-gap)); right: calc(var(--pad-r) + var(--val-w) + var(--col-gap)); pointer-events: none; }
.gridlines i { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: var(--tint-2); }
.axis { position: relative; height: 1.75rem; margin-left: calc(var(--mark) + var(--pad-l) + var(--name-w) + var(--col-gap)); margin-right: calc(var(--pad-r) + var(--val-w) + var(--col-gap)); }
.axis span { position: absolute; top: 0.375rem; transform: translateX(-50%); color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- detail: the selected line as a receipt ---------- */
.detail { padding: 1.5rem; background: var(--tint); }
.detail-label { color: var(--muted); font-size: var(--fs-small); }
.detail-name { margin-top: 0.125rem; text-wrap: balance; }
.detail-note { margin-top: 0.25rem; color: var(--muted); font-size: var(--fs-small); }
.receipt { display: grid; gap: 4px; margin-top: 1rem; }
.receipt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.625rem 0.875rem; background: var(--paper); }
.receipt-row dd { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt-total { background: var(--plum); color: #fff; }
.receipt-total dd { font-size: 1.625rem; line-height: 1.1; letter-spacing: -0.03em; }
.detail-share { margin-top: 0.75rem; }
.detail-cuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin-top: 1.25rem; }
.detail-cut h3 { font-size: var(--fs-body); }
.detail-cut h3 span { font-weight: 400; color: var(--muted); font-size: var(--fs-small); }
.minis { display: grid; margin-top: 0.375rem; }
.mini { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr) 3.25rem; column-gap: 0.5rem; align-items: center; min-height: 1.875rem; font-size: var(--fs-small); }
.mini-name { white-space: nowrap; }
.mini-val { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini.is-on .mini-name { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.mini .track { height: 0.75rem; }
.mini .track::after { top: -0.375rem; bottom: -0.375rem; }
.mini.is-void .track { visibility: hidden; }

/* ---------- the trades ---------- */
.swaps { display: grid; gap: 1.3125rem; }
.swap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.375rem 1rem; align-items: baseline; }
.swap-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; line-height: 1.3; }
.swap-end { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.swap-arrow { color: var(--muted); }
.swap-pct { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thin { grid-column: 1 / -1; height: 0.5rem; background: var(--tint); }
.thin i { display: block; height: 100%; width: calc(100% * var(--v, 0)); background: var(--plum-mid); transition: width var(--t-data) var(--ease-out); }
.swap-empty { color: var(--muted); }

/* ---------- ward by ward ---------- */
.wards { width: 100%; border-collapse: collapse; }
.wards th { padding: 0 0.75rem 0.5rem; color: var(--muted); font-size: var(--fs-small); font-weight: 400; text-align: left; white-space: nowrap; }
.wards th.num, .wards td.num { text-align: right; }
.wards td { padding: 0.75rem; vertical-align: top; border-top: 2px solid var(--tint); }
.wards th:first-child, .wards td:first-child { padding-left: 0.625rem; }
.wards td:first-child { border-left: 4px solid transparent; }
.wards .ward-name { font-weight: 500; white-space: nowrap; }
.wards tr.is-on td { background: var(--tint); border-top-color: var(--paper); }
.wards tr.is-on td:first-child { border-left-color: var(--ink); }
.wards .ward-cell { width: 34%; }
.cell-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; line-height: 1.3; }
.cell-top b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wards .thin { margin-top: 0.375rem; }
.wards tr.is-on .thin { background: var(--paper); }
.thin.gain i { background: var(--accent); }
.thin.cut i { background: var(--blue); }

/* ---------- who answered: paired bars ---------- */
.who { display: grid; gap: 0.625rem; }
.who-row { display: grid; grid-template-columns: 6rem minmax(0, 1fr); column-gap: 1rem; align-items: center; }
.who-name { font-size: var(--fs-small); white-space: nowrap; }
.who-row.is-on .who-name { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.who-bars { display: grid; gap: 2px; }
.who-line { display: flex; align-items: center; gap: 0.5rem; height: 1.3125rem; }
.who-bar { flex: none; height: 0.875rem; width: calc((100% - 3.75rem) * var(--v, 0)); transition: width var(--t-data) var(--ease-out); }
.who-bar.ans { background: var(--plum-mid); }
.who-bar.pop { background: var(--plum-soft); }
.who-num { font-size: var(--fs-small); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.who-line.is-ans .who-num { font-weight: 500; }

/* ---------- answers per day ---------- */
.days { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 0.5rem; }
.days-y { position: relative; height: var(--plot-h, 18.5rem); }
.days-y span { position: absolute; right: 0; transform: translateY(50%); color: var(--muted); font-size: var(--fs-small); line-height: 1; font-variant-numeric: tabular-nums; }
.days-plot { position: relative; height: var(--plot-h, 18.5rem); }
.days-grid i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--tint-2); } /* taste-skill-ignore: a chart gridline, not a divider */
.days-grid i:nth-child(1) { bottom: 0; border-top: 2px solid var(--ink); margin-bottom: -2px; }
.days-grid i:nth-child(2) { bottom: 25%; }
.days-grid i:nth-child(3) { bottom: 50%; }
.days-grid i:nth-child(4) { bottom: 75%; }
.days-grid i:nth-child(5) { bottom: 100%; }
.days-cols { position: absolute; inset: 0; display: flex; }
.day { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px; }
.day i { display: block; width: 100%; max-width: 1.5rem; height: 100%; background: var(--plum-mid); transform: scaleY(0); transform-origin: center bottom; transition: transform var(--t-data) var(--ease-out), background-color var(--t-hover) ease; }
.day:focus-visible { outline-offset: -3px; }
.day:focus-visible i, .day.is-hot i, .day:active i { background: var(--plum); }
.days-x { grid-column: 2; position: relative; height: 1.75rem; }
.days-x span { position: absolute; top: 0.5rem; transform: translateX(-50%); color: var(--muted); font-size: var(--fs-small); line-height: 1; white-space: nowrap; }
.days-x span:first-child { transform: none; }
.days-x span:last-child { transform: translateX(-100%); }

/* ---------- the table view ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline-offset: 4px; }
.rank { width: 100%; border-collapse: collapse; }
.rank th { padding: 0 0.75rem 0.5rem; color: var(--muted); font-size: var(--fs-small); font-weight: 400; text-align: left; vertical-align: bottom; line-height: 1.25; }
.rank td { padding: 0.5rem 0.75rem; border-top: 2px solid var(--tint); white-space: nowrap; }
.rank th:first-child, .rank td:first-child { padding-left: 0; }
.rank th:last-child, .rank td:last-child { padding-right: 0; }
.rank th.num, .rank td.num { text-align: right; }
.rank td.num { font-variant-numeric: tabular-nums; }
.rank td.strong { font-weight: 500; }
.rank tr.is-on td { background: var(--tint); }

.notes { display: grid; gap: 1rem; margin-top: 1.25rem; }
.notes dt { font-weight: 500; }
.notes dd { color: var(--muted); max-width: 46ch; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; padding-block: 1rem 0.5rem; color: var(--muted); font-size: var(--fs-small); }

/* ---------- tooltip: the one thing that floats ---------- */
.tip { position: fixed; left: 0; top: 0; z-index: 40; max-width: 17rem; padding: 0.5rem 0.75rem; background: var(--ink); color: #fff; font-size: var(--fs-small); line-height: 1.35; pointer-events: none; }
.tip b { display: block; font-weight: 500; font-variant-numeric: tabular-nums; }
.tip span { display: block; }

/* ---------- below the desktop grid: selects replace the long segmented rows, blocks stack ---------- */
@media (max-width: 74.99em) {
  .seg-wide { display: none; }
  .sel { display: block; }
  .b-main, .detail, .b-swaps, .b-wards, .b-who, .b-days, .b-table, .b-notes { grid-column: 1 / -1; }
  .sheet { row-gap: 3rem; }
  .receipt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); }
  .receipt-row { flex-direction: column; justify-content: space-between; gap: 0.25rem; }
  .detail-cuts { column-gap: 2.5rem; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
}
@media (max-width: 61.99em) {
  :root { --pad: 1.5rem; }
  .kpi-n, .kpi-moe, .kpi-moved, .kpi-swap { grid-column: span 6; }
  .b-main { --name-w: 10.5rem; }
}
@media (max-width: 37.49em) {
  :root { --pad: 1rem; --inset: 0px; --fs-h1: 1.75rem; }
  .top { min-height: 3.25rem; }
  .top-scope { display: none; }
  .title { gap: 0.625rem 1rem; padding-block: 0.25rem 0.875rem; }
  .title h1 { flex: 1 1 100%; }
  .title-sub { order: 3; flex: 1 1 100%; }
  .button { min-height: 2.75rem; padding: 0 1rem; }
  .filters { position: static; gap: 0.75rem 0.5rem; padding-bottom: 1rem; }
  .f-group { flex: 1 1 8rem; }
  .f-weight { flex-basis: 100%; }
  .f-weight .seg label { flex: 1 1 0; }
  .sel { width: 100%; min-width: 0; }
  .sheet { padding: 1.5rem var(--pad) 2.5rem; row-gap: 2.75rem; }
  /* KPIs become a list: label on the left, figure on the right */
  .kpis { gap: 0; margin-bottom: 0; }
  .kpi, .kpi-n, .kpi-moe, .kpi-moved, .kpi-swap { grid-column: 1 / -1; }
  .kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "sub value"; align-items: center; column-gap: 1rem; padding-block: 0.875rem; border-top: 2px solid var(--tint); }
  .kpi:first-child { padding-top: 0; border-top: 0; }
  .kpi dt { grid-area: label; }
  .kpi-sub { grid-area: sub; margin: 0; }
  .kpi-value { grid-area: value; margin: 0; font-size: 1.75rem; text-align: right; }
  .kpi-swap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "value" "sub"; padding-bottom: 0; }
  .kpi-swap .kpi-value { font-size: 1.375rem; text-align: left; }

  .block-head { grid-template-columns: minmax(0, 1fr); }

  /* a line's name and figure on one line, its bar across the full width under them */
  .b-main { --pad-l: 0.5rem; --pad-r: 0.5rem; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; row-gap: 0.25rem; min-height: 0; padding-block: 0.375rem 0.625rem; }
  .row-name { grid-area: name; }
  .row-val { grid-area: val; }
  .row .track { grid-area: track; height: 1rem; }
  .row .track::after { top: -0.25rem; bottom: -0.25rem; }
  .gridlines { display: none; }
  .axis { margin-left: calc(var(--mark) + var(--pad-l)); margin-right: var(--pad-r); }
  .axis span { display: none; }
  .axis span:first-child, .axis span:last-child, .axis span.is-zero { display: block; }
  .axis span:first-child { transform: none; }
  .axis span:last-child { transform: translateX(-100%); }

  .detail { padding: 1.25rem 1rem; }
  .receipt, .detail-cuts { grid-template-columns: minmax(0, 1fr); }
  .receipt-row { flex-direction: row; }

  .wards, .wards tbody { display: block; }
  .wards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .wards tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; padding: 0.75rem 0.5rem 0.875rem; border-top: 2px solid var(--tint); border-left: 4px solid transparent; }
  .wards td, .wards td:first-child { display: block; width: auto; padding: 0; border: 0; }
  .wards td.num { text-align: right; color: var(--muted); font-size: var(--fs-small); }
  .wards td.num::after { content: " answers"; }
  .wards .ward-cell { width: auto; margin-top: 0.5rem; }
  .wards tr.is-on { background: var(--tint); border-left-color: var(--ink); }
  .wards tr.is-on td { background: none; }
  .cell-top { flex-direction: column; gap: 0; }

  .who-row { grid-template-columns: 5.25rem minmax(0, 1fr); column-gap: 0.75rem; }
  .days { --plot-h: 11rem; }
  .days-x span:nth-child(even) { display: none; }

  .rank th { white-space: nowrap; }
  .rank th:first-child, .rank td:first-child { position: sticky; left: 0; z-index: 1; min-width: 9.5rem; max-width: 10.5rem; white-space: normal; line-height: 1.25; background: var(--paper); padding-right: 0.75rem; }
  .rank tr.is-on td:first-child { background: var(--tint); }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .foot { padding-block: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .button:active, .textbtn:active, .top-link:active, .seg input:active + span { transform: none; }
}
