/* Partner's face (2026-10-12): Atkinson Hyperlegible Next — built for
   maximum legibility, which is the TV requirement. One variable file
   (latin, wght 200-800); Google Fonts, OFL. Self-hosted: no CDN. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next.woff2") format("woff2");
}

:root {
  --bg: #0a1620;        /* blue-black, hue of NYC blue */
  --panel: #13242f;
  --edge: #24405a;      /* 1px panel borders */
  --text: #f5f9fc;
  --muted: #9fb3c8;
  --orange: #f26522;    /* NYC flag orange — primary action, score */
  --blue: #236192;      /* NYC flag blue — surfaces, secondary */
  --accent: #f26522;
  --good: #3fb950;
  --bad: #f85149;
  --font: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 30px/1.45 var(--font); }
.hidden { display: none !important; }
h1 { font-size: 72px; font-weight: 800; line-height: 1.1; margin: 0 0 12px; }
.subtitle { color: var(--muted); font-size: 30px; }
.screen { max-width: 1280px; margin: 0 auto; padding: 40px; }
input[type="text"], input:not([type]) {
  font: 30px var(--font); padding: 14px 18px; width: 100%; max-width: 560px;
  background: var(--panel); color: var(--text); border: 1px solid var(--edge); border-radius: 12px;
}
input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type="radio"] { accent-color: var(--orange); width: 30px; height: 30px; }
button {
  font: 600 30px var(--font); padding: 14px 32px; border: 0; border-radius: 12px;
  background: var(--orange); color: #0a1620; cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}
button:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
button:active:not(:disabled) { filter: brightness(0.94); transform: translateY(1px); }
button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
button:disabled { background: var(--edge); color: var(--muted); cursor: not-allowed; }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-quiet { background: var(--panel); color: var(--muted); border: 1px solid var(--edge); }
.btn-quiet:hover:not(:disabled) { color: var(--text); border-color: var(--muted); filter: none; }
.btn-row { display: flex; gap: 24px; justify-content: center; margin-top: 24px; }
#team-inputs { display: grid; gap: 16px; margin: 24px 0; justify-items: center; }
.team-row { display: flex; gap: 14px; align-items: center; }
.team-row input { width: 480px; max-width: 480px; }
.team-remove { font-size: 26px; padding: 10px 24px; }
#add-team-btn { margin-top: 6px; }
#mode-pick { display: flex; gap: 48px; margin: 20px 0; font-size: 32px; justify-content: center; }
/* Setup must fit a 1280x720 TV in one screen (council Task 9): tightened
   vertical rhythm, secondary buttons share one row. */
#screen-setup { padding: 24px 40px; }
#screen-setup h1 { text-align: center; }
#screen-setup h1::after {
  content: ""; display: block; width: 120px; height: 6px; margin: 12px auto 0;
  background: var(--orange); border-radius: 3px;
}
#screen-setup .subtitle { text-align: center; margin: 4px 0 0; }
#screen-setup #start-btn { display: block; margin: 0 auto; }
/* Visually hidden but present (a display:none file input never opens the
   chooser on a programmatic click). tabindex=-1: no invisible tab stop. */
#folder-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
#screen-setup .folder-btns { display: flex; gap: 16px; justify-content: center; margin-top: 20px; }
#screen-setup .folder-btns button { font-size: 24px; padding: 10px 24px; }
#folder-msg { color: var(--muted); font-size: 24px; text-align: center; margin: 16px 0 0; }
/* About page (Task 11): static text, must fit one TV screen (council Task 9):
   24px text, two-column list. */
#screen-about { max-width: 1100px; padding: 24px 40px; font-size: 22px; }
#screen-about h1 { text-align: center; font-size: 52px; }
#screen-about p { margin: 12px 0; line-height: 1.35; }
#screen-about li { line-height: 1.35; margin: 0 0 10px; break-inside: avoid; }
#screen-about ul { padding-left: 24px; columns: 2; column-gap: 48px; }
#screen-about a { color: var(--orange); }
#screen-about a:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
#screen-about code { font-size: 0.85em; background: var(--panel); border: 1px solid var(--edge); border-radius: 6px; padding: 2px 8px; }
#about-back-btn { display: block; margin: 20px auto 0; }
#error-list { font-size: 28px; color: var(--bad); padding-left: 24px; }
.scoreboard { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-bottom: 28px; }
.score-team {
  display: flex; align-items: baseline; gap: 14px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 14px;
  padding: 12px 28px; font-size: 28px;
}
.score-points { font-weight: 800; font-size: 40px; color: var(--orange); font-variant-numeric: tabular-nums; }
.board-grid { display: grid; gap: 12px; }
.board-header {
  font-size: 32px; font-weight: 700; line-height: 1.2; text-align: center;
  padding: 18px 12px; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px;
  overflow-wrap: break-word; min-width: 0;
}
.board-header.clickable:hover { background: var(--blue); border-color: var(--blue); }
/* Row position IS difficulty: subtle 5-step ramp easy (top) to hard (bottom). */
.board-cell.tier-0 { background: #111f2a; }
.board-cell.tier-1 { background: #13242f; }
.board-cell.tier-2 { background: #162a38; }
.board-cell.tier-3 { background: #1a3242; }
.board-cell.tier-4 { background: #1f3b4e; }
.board-cell {
  font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums;
  display: grid; place-items: center; text-align: center;
  min-height: 88px; padding: 10px 8px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 14px;
}
.clickable { cursor: pointer; }
.board-cell.clickable:hover { background: var(--orange); border-color: var(--orange); color: #0a1620; }
.board-cell.used { color: var(--muted); background: transparent; border: 2px dashed var(--edge); }
.board-gap { visibility: hidden; }
/* Trivia: the header is the click target; cells are inert (Task 7.8). */
.board-grid.trivia .board-cell { opacity: 0.45; }
.board-header.dim { opacity: 0.45; }
.board-hint { color: var(--muted); font-size: 26px; margin: 0 0 18px; text-align: center; }
.question-wrap { display: grid; gap: 30px; justify-items: start; }
.question-wrap h2 { font-size: 32px; font-weight: 700; color: var(--muted); margin: 0; }
.question-text { font-size: 52px; line-height: 1.3; margin: 0; white-space: pre-line; max-width: 1080px; }
.answer-text {
  font-size: 48px; line-height: 1.25; font-weight: 800; color: var(--orange);
  margin: 0; max-width: 1080px; animation: reveal-in 240ms ease;
}
.team-btns, .controls { display: flex; gap: 24px; flex-wrap: wrap; }
/* .team-btns holds only the team mark buttons (blue fill); the controls
   row (Back/Reveal/Done/Next) keeps its own .btn-* classes. */
.team-btns button { font-size: 34px; padding: 18px 40px; background: var(--blue); color: #fff; border-radius: 14px; }
.team-btns button.marked-green { background: var(--good); color: #06130a; }
.team-btns button.marked-red { background: var(--bad); color: #160505; }
.btn-primary { background: var(--orange); color: #0a1620; }
.audio-block { display: grid; gap: 8px; }
.audio-block audio { width: 480px; height: 48px; }
.no-clip { color: var(--muted); font-style: italic; margin: 0; font-size: 28px; }
.images-block { display: flex; gap: 16px; flex-wrap: wrap; }
.images-block img {
  max-width: 640px; max-height: 480px; width: auto; height: auto;
  object-fit: contain; border-radius: 12px; border: 1px solid var(--edge); background: var(--panel);
}
.no-image { color: var(--muted); font-style: italic; margin: 0; font-size: 28px; }
.tally-row {
  display: flex; align-items: baseline; gap: 16px;
  background: var(--panel); border: 1px solid var(--edge);
  padding: 18px 36px; border-radius: 14px; font-size: 32px;
}

/* Motion: responds to action, <=240ms; off under prefers-reduced-motion. */
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes reveal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.screen:not(.hidden) { animation: screen-in 200ms ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
