:root {
  color-scheme: light dark;
  font-family: system-ui, sans-serif;
  --page: #edf4f9;
  --ink: #142a43;
  --muted: #425d74;
  --sheet: #fdfefe;
  --line: #afc2d4;
  --soft: #dceaf3;
  --match: #d5f3e6;
  --mark: #164f7c;
  --button: #154d75;
  --button-ink: #fff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #101b26;
    --ink: #e5f3ff;
    --muted: #aec6d7;
    --sheet: #172837;
    --line: #526b81;
    --soft: #21394e;
    --match: #224b41;
    --mark: #a8d7fb;
    --button: #a8d7fb;
    --button-ink: #122739;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
main { width: min(calc(100% - 1.5rem), 67rem); margin-inline: auto; padding-block: clamp(1.4rem, 4vw, 3.4rem); }
a { color: var(--mark); }
h1, h2, p { margin: 0; }
h1 { font: 800 clamp(2.4rem, 6vw, 4.45rem)/1.05 system-ui, sans-serif; letter-spacing: -.055em; margin-block: .25rem .65rem; }
h2 { font-size: 1.15rem; }
p { line-height: 1.5; }
.banner { border-block-end: 3px solid var(--mark); padding-block-end: 1.35rem; margin-block-end: 1.15rem; }
.eyebrow { margin-block-start: 1.25rem; font: 700 .78rem ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--mark); }
.workbench { display: grid; gap: .8rem; align-items: start; }
.console, .records { min-width: 0; background: var(--sheet); border: 1px solid var(--line); padding: clamp(.75rem, 2vw, 1.15rem); }
.console { display: grid; gap: .7rem; }
label { display: grid; gap: .28rem; font-size: .84rem; font-weight: 700; }
[hidden] { display: none; }
select, button { width: 100%; min-height: 2.65rem; border: 1px solid var(--line); border-radius: .25rem; padding: .34rem .48rem; color: var(--ink); background: var(--sheet); font: inherit; }
button { background: var(--button); color: var(--button-ink); border-color: var(--button); font-weight: 800; cursor: pointer; }
button:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
.hint, .footnote { color: var(--muted); font-size: .86rem; }
.statement { color: var(--ink); background: var(--soft); border-inline-start: 3px solid var(--mark); padding: .52rem .65rem; overflow-wrap: anywhere; font-size: .84rem; }
.totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); }
.totals div { display: grid; gap: .2rem; padding: .5rem; border-inline-end: 1px solid var(--line); }
.totals div:last-child { border: 0; }
.totals span { font-size: .74rem; }
.totals output { font: 800 1.35rem ui-monospace, monospace; color: var(--mark); }
.table-head { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-block-end: .6rem; }
.sheet { margin-block-start: .65rem; max-height: 27rem; overflow: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .83rem; font-variant-numeric: tabular-nums; text-align: start; }
th, td { text-align: start; padding: .42rem clamp(.25rem, 1.35vw, .65rem); border-block-end: 1px solid var(--line); }
thead th { position: sticky; inset-block-start: 0; background: var(--soft); z-index: 1; }
tbody tr[data-read="true"] { background: var(--soft); }
tbody tr[data-match="true"] { background: var(--match); }
tbody td:last-child { font-size: .73rem; }
.footnote { margin-block-start: .9rem; }
@media (min-width: 48rem) {
  .workbench { grid-template-columns: minmax(16rem, .95fr) minmax(0, 1.4fr); }
}
