/*
 * Tokens first, markup second - DESIGN_SYSTEM.md.
 *
 * Every colour below was checked by WCAG contrast calculation before it was
 * written here, not chosen by eye (INVARIANTS.md #14). The ratios are recorded
 * in DESIGN_SYSTEM.md section 1 and re-derived from THIS file by a test, so the
 * documented numbers cannot drift away from the shipped ones.
 *
 * Single theme, deliberately. The session is under two minutes and almost
 * always at night before a deadline; a toggle would mean every pair computed
 * and maintained twice for a product used in one register.
 */

:root {
  --ink: #0B0E12;
  --surface: #131821;
  --line: #232B38;      /* decorative dividers ONLY - fails 3:1, never a control edge */
  --edge: #626C80;      /* every interactive boundary - passes 3:1 on both grounds */
  --ink-soft: #8B95A6;
  --paper: #EDF1F6;
  --verdict: #3DD9C4;   /* RESERVED for the one decision. A second use is a defect. */
  --good: #4ADE80;
  --warn: #F5B942;
  --bad: #F2555A;

  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  --u: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* ------------------------------------------------------ sticky header */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: calc(3 * var(--u)) calc(4 * var(--u));
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(2 * var(--u));
}
.masthead__name { font-weight: 600; font-size: 15px; }
.masthead__gw { color: var(--ink-soft); font-size: 13px; }
.countdown {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--paper);
  white-space: nowrap;
}
.countdown--urgent { color: var(--warn); }
.countdown--gone { color: var(--ink-soft); }

main { max-width: 560px; margin: 0 auto; padding: calc(4 * var(--u)); }

/* -------------------------------------------------------- verdict card */
.verdict {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--verdict);
  border-radius: 2px;
  padding: calc(5 * var(--u)) calc(4 * var(--u));
}
.verdict__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 calc(2 * var(--u));
}
.verdict__headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 calc(3 * var(--u));
  color: var(--verdict);
  text-wrap: balance;
}
.verdict__reasoning { margin: 0; padding: 0; list-style: none; }
.verdict__reasoning li {
  font-size: 15px;
  color: var(--paper);
  margin-bottom: calc(2 * var(--u));
  padding-left: calc(3 * var(--u));
  position: relative;
}
.verdict__reasoning li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: calc(1.5 * var(--u)); height: 1px;
  background: var(--edge);
}

/* The invariant-11 caveat. A separate, differently-coloured line - never
 * folded into the reasoning prose where it could be skimmed past. */
.caveat {
  display: flex; gap: calc(2 * var(--u));
  margin-top: calc(3 * var(--u));
  padding: calc(2 * var(--u)) calc(3 * var(--u));
  border: 1px solid var(--warn);
  border-radius: 2px;
  font-size: 13px;
  color: var(--warn);
}

.confidence {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: calc(3 * var(--u));
}

/* ------------------------------------------------------- the one button */
.handoff {
  display: block;
  width: 100%;
  margin-top: calc(4 * var(--u));
  padding: calc(4 * var(--u));
  background: var(--verdict);
  color: var(--ink);
  border: none;
  border-radius: 2px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.handoff:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* --------------------------------------------- confirmation (invariant 17)
 * verified and self_reported differ by COLOUR, FILL and GLYPH - never colour
 * alone, so the distinction survives colour-blindness and a quick glance. */
.confirm { margin-top: calc(3 * var(--u)); padding: calc(3 * var(--u)); border-radius: 2px; font-size: 14px; }
.confirm--unresolved { border: 1px solid var(--edge); color: var(--ink-soft); }
.confirm--verified { background: var(--good); color: var(--ink); font-weight: 600; }
.confirm--self { border: 1px solid var(--warn); color: var(--warn); background: transparent; }

/* ------------------------------------------------------------- sections */
.section { margin-top: calc(8 * var(--u)); }
.section__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: calc(2 * var(--u));
  margin-bottom: calc(3 * var(--u));
}

/* ------------------------------------------------------- squad listing */
.squad { list-style: none; margin: 0; padding: 0; }
.player {
  display: flex; align-items: center; gap: calc(3 * var(--u));
  padding: calc(2 * var(--u)) 0;
  border-bottom: 1px solid var(--line);
}
.player__pos {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--ink-soft); width: 34px; flex: none;
}
.player__name { flex: 1; font-size: 15px; }
.player__ep {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 14px; color: var(--ink-soft);
}
.badge {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  padding: 1px calc(1.5 * var(--u));
  border: 1px solid var(--edge); border-radius: 2px; color: var(--ink-soft);
}
.badge--c { border-color: var(--verdict); color: var(--verdict); }
.bench-divider {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  padding: calc(3 * var(--u)) 0 calc(1 * var(--u));
}

/* ---------------------------------------------------------- corrections */
.correction-form { display: flex; flex-direction: column; gap: calc(2 * var(--u)); }
label { font-size: 13px; color: var(--ink-soft); }
select, .btn {
  font-family: var(--body); font-size: 15px;
  background: var(--surface); color: var(--paper);
  border: 1px solid var(--edge); border-radius: 2px;
  padding: calc(3 * var(--u));
}
select:focus-visible, .btn:focus-visible { outline: 2px solid var(--verdict); outline-offset: 1px; }
.btn { cursor: pointer; font-weight: 600; }
.btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); font-weight: 400; font-size: 13px; padding: calc(2 * var(--u)); }

.note { font-size: 13px; color: var(--ink-soft); margin: calc(2 * var(--u)) 0 0; }
.note--warn { color: var(--warn); }

details > summary { cursor: pointer; color: var(--ink-soft); font-size: 14px; padding: calc(2 * var(--u)) 0; }
.other { border-left: 1px solid var(--line); padding-left: calc(3 * var(--u)); margin-top: calc(3 * var(--u)); }
.other__summary { font-size: 15px; margin: 0 0 var(--u); }

footer {
  margin-top: calc(10 * var(--u)); padding-top: calc(4 * var(--u));
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-soft); line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
