:root {
  --paper: #F7F2EA; --panel: #FFFDF9; --rule: #E8E0D2;
  --ink: #2A2421; --ink-mid: #5C534C; --ink-soft: #8A7E70;
  --clay: #C2410C; --clay-hover: #A8380A; --sunset: #FA551E; --orange-bright: #FF6A2C;
  --sage-deep: #3F5648; --sage-feat: #2F4339;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  color-scheme: only light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 15px/1.65 var(--sans); }
.logo { display: block; width: 120px; aspect-ratio: 753 / 479; height: auto; margin: 24px 0 0 max(16px, calc((100vw - 560px) / 2 + 16px)); }
main { max-width: 560px; margin: 0 auto; padding: 24px 16px; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); }
h1 { font-size: 2.6rem; line-height: 1.1; letter-spacing: -0.5px; margin: 0 0 12px; }
h1 em { font-style: italic; font-weight: 400; color: var(--sunset); }
h2 { font-size: 1.7rem; line-height: 1.15; margin: 24px 0 8px; }
a { color: var(--clay); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
label { display: block; margin: 12px 0 4px; color: var(--clay); font-weight: 600; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
input, textarea, select { width: 100%; padding: 12px; font: 500 16px/1.4 var(--sans); color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 0; }
select { appearance: none; cursor: pointer; padding-right: 36px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C2410C' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
select:disabled { opacity: 0.5; cursor: default; }
[hidden] { display: none !important; }
button { padding: 12px 18px; font: 600 15px/1.2 var(--sans); color: #fff; background: var(--clay); border: 1px solid var(--clay); border-radius: 0; cursor: pointer; }
button:hover:not(:disabled) { background: var(--clay-hover); border-color: var(--clay-hover); }
button:disabled { opacity: 0.5; cursor: default; }
button.secondary { background: transparent; color: var(--clay); border: 1px solid var(--clay); }
button.secondary:hover:not(:disabled) { background: transparent; color: var(--clay-hover); border-color: var(--clay-hover); }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 0; padding: 20px; }
.row { display: flex; gap: 8px; margin-top: 8px; }
.row input { flex: 1; }
.error { color: var(--clay); min-height: 1.4em; }
.hint, .muted { color: var(--ink-mid); }
.status { font-size: 1.05rem; }
.team { padding: 10px 14px; border-radius: 0; color: var(--paper); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.team[data-team="jev"] { background: var(--sage-feat); }
.team[data-team="llm"] { background: var(--ink-mid); }
.countdown { font: 400 2rem/1.3 var(--mono); font-variant-numeric: tabular-nums; }
ol.mine { padding-left: 1.2em; }
ol.mine li { margin: 8px 0; }
.answer { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.tag { font-size: 0.8rem; color: var(--ink-mid); }
table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: 8px; border-bottom: 1px solid var(--rule); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.list { padding: 0; list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); }

/* Presenter screen */
/* The page is exactly one viewport tall. The race columns scroll inside themselves; every other view is sized
   from the viewport height so it normally fits, and main scrolls only if it still does not. */
body.screen { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.screen .logo { flex: none; width: clamp(96px, 16vh, 160px); margin: clamp(12px, 2.5vh, 24px) 0 0 32px; }
body.screen main { flex: 1; min-height: 0; max-width: none; width: 100%; padding: clamp(8px, 1.6vh, 16px) 32px clamp(12px, 2.4vh, 24px); display: flex; flex-direction: column; overflow-y: auto; }
.center { text-align: center; margin: auto 0; }
body.screen .center h1 { font-size: clamp(1.5rem, 4.5vh, 2.6rem); margin: 0 0 1.5vh; }
body.screen .center h2 { font-size: clamp(1.2rem, 3.2vh, 1.8rem); margin: 2vh 0 1vh; }
body.screen .center p { margin: 1vh 0; }
.huge { font: 400 clamp(2.5rem, min(8vw, 13vh), 7rem)/1.05 var(--mono); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; margin: 0; }
h1.huge { font-family: var(--serif); letter-spacing: -1px; }
body.screen .center h1.huge { font-size: clamp(2.5rem, min(8vw, 13vh), 7rem); }
.qr svg { width: min(30vh, 360px); height: auto; background: var(--panel); padding: 8px; border-radius: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.col { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 2px solid var(--rule); border-radius: 0; overflow: hidden; }
.col[data-side="jev"] { border-color: var(--sage-feat); }
.col[data-side="llm"] { border-color: var(--ink-mid); }
.col header { padding: 16px 20px; color: var(--paper); }
.col[data-side="jev"] header { background: var(--sage-feat); }
.col[data-side="llm"] header { background: var(--ink-mid); }
.col .title { font-weight: 600; font-size: 20px; letter-spacing: 2px; color: var(--orange-bright); }
.col[data-side="llm"] .title { color: var(--paper); }
.col .meters { display: flex; justify-content: space-between; font: 400 clamp(2rem, 4vw, 3.6rem)/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.col .sub { opacity: 0.9; }
.col ol { margin: 0; padding: 8px 20px 20px 2.4em; overflow-y: auto; font-size: 1.1rem; }
.col li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.col li .answer { margin-top: 2px; }
.col li .reason { display: block; color: var(--ink-mid); font-size: 0.95rem; line-height: 1.4; }
.col li.pending { color: var(--ink-mid); }
.col li.borderline { box-shadow: inset 4px 0 0 var(--sunset); }
.results { font-size: clamp(1rem, 2.6vh, 1.4rem); margin: 0 auto; }
.results td, .results th { padding: clamp(4px, 1.3vh, 14px) 14px; }
.big { font-size: 1.6rem; font-weight: 400; }
body.screen .big { font-size: clamp(1.05rem, 2.8vh, 1.6rem); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ok { color: var(--sage-deep); }
