@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo.woff2") format("woff2-variations"), url("/fonts/archivo.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/fonts/jetbrains-mono.woff2") format("woff2-variations"), url("/fonts/jetbrains-mono.woff2") format("woff2");
}

/* Tokens: one spot ink on triplicate copy papers. No grey anywhere. */
:root {
  color-scheme: light dark;

  --ground: oklch(0.355 0.15 266);
  --ground-text: oklch(0.975 0.01 266);
  --ground-soft: oklch(0.87 0.055 266);
  --ground-rule: oklch(0.52 0.13 266);

  --white: oklch(0.987 0.004 266);
  --canary: oklch(0.958 0.068 100);
  --pink: oklch(0.944 0.028 8);

  --ink: oklch(0.37 0.16 266);
  --ink-soft: oklch(0.47 0.12 266);
  --rule: oklch(0.37 0.16 266 / 0.32);
  --rule-strong: oklch(0.37 0.16 266);
  --entry: oklch(0.21 0.03 266);
  --hatch: oklch(0.37 0.16 266 / 0.32);
  --hatch-edge: oklch(0.37 0.16 266 / 0.55);
  --mark: oklch(0.37 0.16 266);
  --code-ground: oklch(0.37 0.16 266 / 0.12);

  --focus: oklch(0.86 0.16 96);
  --focus-on-sheet: oklch(0.37 0.16 266);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gap: clamp(16px, 2.4vw, 32px);
  --pad: clamp(14px, 1.8vw, 22px);
  --frame: 1.5px;
}

/* Below 1.5 device pixels a 1.5px border renders as 1px and the frame loses its weight over the ruling */
@media (max-resolution: 1.49dppx) {
  :root { --frame: 2px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: oklch(0.24 0.1 266);
    --ground-text: oklch(0.97 0.012 266);
    --ground-soft: oklch(0.84 0.06 266);
    --ground-rule: oklch(0.5 0.11 266);

    --white: oklch(0.18 0.035 266);
    --canary: oklch(0.2 0.032 95);
    --pink: oklch(0.195 0.026 330);

    --ink: oklch(0.84 0.078 266);
    --ink-soft: oklch(0.81 0.07 266);
    --rule: oklch(0.84 0.078 266 / 0.45);
    --rule-strong: oklch(0.84 0.078 266 / 0.85);
    --entry: oklch(0.965 0.012 266);
    --hatch: oklch(0.84 0.078 266 / 0.45);
    --hatch-edge: oklch(0.84 0.078 266 / 0.6);
    --mark: oklch(0.87 0.062 266);
    --code-ground: oklch(0.84 0.078 266 / 0.16);

    --focus: oklch(0.88 0.15 96);
    --focus-on-sheet: oklch(0.88 0.15 96);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ground-text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 420;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: oklch(0.86 0.16 96); color: oklch(0.25 0.1 266); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a, button { touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sheet :focus-visible { outline-color: var(--focus-on-sheet); }
.sheet .table-wrap:focus-visible, .sheet pre:focus-visible { outline-offset: -2px; }
.switch button:focus-visible { outline-color: currentColor; outline-offset: -5px; }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--focus); color: oklch(0.25 0.1 266);
  padding: 8px 12px; font-weight: 650; z-index: 10; text-decoration: none;
}
.skip:focus { top: 12px; }

.vh {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gap); }

/* ── Masthead strip ─────────────────────────────── */
.strip {
  border-bottom: 1px solid var(--ground-rule);
}
.strip .wrap {
  display: flex; align-items: center; gap: 20px; min-height: 52px;
}
.strip-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-stretch: 118%; letter-spacing: -0.01em; text-decoration: none;
  flex: none; min-height: 44px;
}
.strip-mark svg { width: 22px; height: 22px; flex: none; }
.strip nav { flex: 1; min-width: 0; }
.strip ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 2px; justify-content: flex-end;
}
.strip li a {
  display: block; padding: 14px 10px; white-space: nowrap;
  font-size: 0.8125rem; font-stretch: 88%; font-weight: 560; letter-spacing: 0.01em;
  color: var(--ground-soft); text-decoration: none;
  transition: color 120ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .strip li a:hover { color: var(--ground-text); text-decoration: underline; text-decoration-thickness: 1px; }
}
.strip li a:active { color: var(--ground-text); }

/* ── Opening: title block + scouting form ───────── */
.opening {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gap);
  padding-top: clamp(28px, 4.5vw, 64px);
  padding-bottom: clamp(32px, 4vw, 56px);
  align-items: start;
}

.title-block { padding-top: 6px; }
.title-block h1 {
  margin: 0;
  font-size: clamp(4rem, 7vw, 6rem);
  line-height: 0.84;
  font-weight: 860;
  font-stretch: 125%;
  letter-spacing: -0.035em;
  margin-left: -0.06em;
}
.title-block h1 span { display: block; }
.title-block h1 span + span { color: var(--ground-soft); }
.title-block .lede {
  margin: 22px 0 0;
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  line-height: 1.32;
  font-weight: 540;
  max-width: 24ch;
  text-wrap: pretty;
}
.title-block .sub {
  margin: 14px 0 0;
  color: var(--ground-soft);
  max-width: 36ch;
  text-wrap: pretty;
}

.status-box {
  margin-top: 28px;
  border: var(--frame) solid var(--ground-soft);
  display: grid; grid-template-columns: auto 1fr;
  max-width: 36ch;
}
.status-box .label {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--ground-rule);
  padding: 6px 12px;
}
.status-box .tick {
  width: 44px; display: grid; place-items: center;
  border-right: 1px solid var(--ground-rule);
}
.status-box .tick span {
  width: 18px; height: 18px; border: 1.5px solid var(--ground-text);
  display: grid; place-items: center;
}
.status-box p { margin: 0; padding: 12px 14px; font-weight: 560; text-wrap: pretty; }

.label {
  font-size: 0.75rem;
  font-weight: 640;
  font-stretch: 72%;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.3;
  color: var(--ink-soft);
}
.title-block .label { color: var(--ground-soft); }

/* ── Sheets (forms) ─────────────────────────────── */
.sheet {
  --paper: var(--white);
  position: relative;
  background: var(--paper);
  color: var(--entry);
  border: var(--frame) solid var(--rule-strong);
}
.sheet.canary { --paper: var(--canary); }
.sheet.pink { --paper: var(--pink); }

/* The copies underneath: flat overlap, no shading. */
.sheet.stacked { margin: 0 14px 14px 0; }
.sheet.stacked::before,
.sheet.stacked::after {
  content: ""; position: absolute; z-index: -1;
  border: var(--frame) solid var(--rule-strong);
  inset: 7px -8px -8px 7px;
  background: var(--canary);
}
.sheet.stacked::after { inset: 14px -15px -15px 14px; background: var(--white); z-index: -2; }
.stack-host { position: relative; z-index: 0; }

.sheet-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-bottom: var(--frame) solid var(--rule-strong);
}
.sheet-head > * { padding: 10px var(--pad); }
.sheet-head .code {
  border-right: 1px solid var(--rule);
  font-weight: 760; font-stretch: 80%; font-size: 0.875rem; letter-spacing: 0.04em;
  color: var(--ink); display: flex; align-items: center;
}
.sheet-head.return-head { border-top: 0; }
.sheet-head .head-label { display: flex; align-items: center; }
.key-goal { stroke-width: 1.5; }
.key-saved { stroke-width: 2.5; }
.key-missed { stroke-width: 1.2; }
.sheet-head h2,
.sheet-head h3 {
  margin: 0; color: var(--ink);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 760; font-stretch: 112%; letter-spacing: -0.012em; line-height: 1.2;
  display: flex; align-items: center;
  text-wrap: balance;
}
.sheet-head .meta {
  border-left: 1px solid var(--rule);
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  text-align: right;
}

.field { border-bottom: 1px solid var(--rule); padding: 12px var(--pad) 14px; }
.field:last-child { border-bottom: 0; }
.table-wrap + .field, table + .field, .shotmap + .field { border-top: 1px solid var(--rule); }
.field > .label { display: block; margin-bottom: 6px; }
.field p { margin: 0; max-width: 56ch; text-wrap: pretty; }
.field p + p { margin-top: 8px; }

.request {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.38;
  font-weight: 520;
  font-stretch: 96%;
  color: var(--entry);
}

/* Code field */
.code-field { padding: 0; }
.code-field > .label { padding: 12px var(--pad) 0; }
pre {
  margin: 6px 0 0; padding: 4px var(--pad) 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  font-family: var(--mono); font-size: 0.8125rem; line-height: 1.6; font-weight: 420;
  color: var(--entry);
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
  tab-size: 2;
}
pre .k { color: var(--ink); font-weight: 650; }
pre .s { color: var(--ink-soft); }

/* Data tables */
.table-wrap {
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums lining-nums; }
caption { text-align: left; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; text-wrap: pretty; }
th:first-child, td:first-child { padding-left: var(--pad); }
th:last-child, td:last-child { padding-right: var(--pad); }
thead th {
  font-size: 0.75rem; font-weight: 640; font-stretch: 72%;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
  border-bottom: var(--frame) solid var(--rule-strong);
  white-space: nowrap;
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.vrule { border-left: 1px solid var(--rule); }

/* Scouting answer, and the hidden-attribute table that shares its cells */
.scout td, .scout th { white-space: nowrap; }
.who { font-weight: 620; }
.who small { display: block; margin-top: 2px; font-weight: 420; font-size: 0.8125rem; color: var(--ink-soft); }
.scout .attr { text-align: center; min-width: 74px; }
.did p { font-size: 0.9375rem; color: var(--ink-soft); font-weight: 520; }

/* Attribute cell: value over a 20-step track */
.av { display: inline-grid; justify-items: center; gap: 4px; min-width: 52px; }
.av .v { font-weight: 640; line-height: 1; }
.av .track {
  position: relative; width: 52px; height: 6px;
  background:
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 100%) 0 0 / calc(100% / 4) 100%;
  border-bottom: 1px solid var(--rule);
}
.av .fill {
  position: absolute; top: 0; bottom: 0;
  left: calc((var(--lo) - 1) / 20 * 100%);
  width: calc((var(--hi) - var(--lo) + 1) / 20 * 100%);
  background: var(--mark);
}
.av.range .fill { opacity: 0.55; }
.av.range .v { font-weight: 560; }

/* Unknown: a ghost cell, drawn as deliberately as a value */
.ghost {
  display: inline-block; width: 52px; height: 26px; vertical-align: middle;
  border: 1px dashed var(--hatch-edge);
  background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 6px);
}

.lo-6 { --lo: 6; } .lo-7 { --lo: 7; } .lo-8 { --lo: 8; } .lo-9 { --lo: 9; }
.lo-10 { --lo: 10; } .lo-11 { --lo: 11; } .lo-12 { --lo: 12; } .lo-13 { --lo: 13; }
.lo-14 { --lo: 14; } .lo-15 { --lo: 15; } .lo-16 { --lo: 16; } .lo-17 { --lo: 17; }
.hi-6 { --hi: 6; } .hi-7 { --hi: 7; } .hi-8 { --hi: 8; } .hi-9 { --hi: 9; }
.hi-10 { --hi: 10; } .hi-11 { --hi: 11; } .hi-12 { --hi: 12; } .hi-13 { --hi: 13; }
.hi-14 { --hi: 14; } .hi-15 { --hi: 15; } .hi-16 { --hi: 16; } .hi-17 { --hi: 17; }
.hi-18 { --hi: 18; }

/* Potential in stars: the same track ruled into five stars, ten half-star steps */
.scout .stars { text-align: center; min-width: 84px; }
.av.st .track { background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 100%) 0 0 / calc(100% / 5) 100%; }
.av.st .fill { left: calc((var(--slo) - 1) / 10 * 100%); width: calc((var(--shi) - var(--slo) + 1) / 10 * 100%); }
.sl-6 { --slo: 6; } .sl-7 { --slo: 7; } .sl-8 { --slo: 8; } .sl-9 { --slo: 9; }
.sh-7 { --shi: 7; } .sh-8 { --shi: 8; } .sh-9 { --shi: 9; }

/* Potential ability out of 200, in Full read */
.av.pa .track { background: none; }
.av.pa .fill { left: 0; width: calc(var(--pa) / 200 * 100%); }
.pa-165 { --pa: 165; } .pa-167 { --pa: 167; } .pa-168 { --pa: 168; } .pa-169 { --pa: 169; } .pa-176 { --pa: 176; }

/* View switch */
.switch { display: inline-flex; border: 1px solid var(--rule-strong); }
.switch[hidden] { display: none; }
.switch button {
  appearance: none; border: 0; margin: 0; cursor: pointer;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 0.8125rem; font-weight: 620; font-stretch: 86%;
  padding: 6px 12px; min-height: 34px;
  -webkit-user-select: none; user-select: none;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.switch button + button { border-left: 1px solid var(--rule-strong); }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .switch button:hover:not([aria-pressed="true"]) { background: var(--code-ground); }
}
.switch button:active { transform: translateY(1px); }

[data-view="mv"] .v-full,
[data-view="full"] .v-mv { display: none; }

/* The two answers share one grid cell, so the sheet keeps its height when the view changes */
.scout .wage { min-width: 90px; }
.scout .wage .ghost { vertical-align: middle; }
#scout .did, #scout .answer { display: grid; grid-template-columns: minmax(0, 1fr); }
#scout :is(.did, .answer) > :is(.v-mv, .v-full) { grid-area: 2 / 1; }
#scout[data-view="mv"] :is(.did, .answer) > .v-full,
#scout[data-view="full"] :is(.did, .answer) > .v-mv { display: block; visibility: hidden; }

.swap-in { animation: ink-in 220ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes ink-in {
  from { opacity: 0.25; filter: blur(1.5px); }
  to { opacity: 1; filter: none; }
}

.key {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  padding: 10px var(--pad); border-top: 1px solid var(--rule);
  font-size: 0.8125rem; color: var(--ink-soft);
}
.key span { display: inline-flex; align-items: center; gap: 8px; }
.key .ghost { width: 26px; height: 14px; }
.key .av { min-width: 0; }
.key .av .track { width: 40px; }

.answer-text { font-size: 1.0625rem; line-height: 1.5; }
.answer-text b, .steps b, .log td b { font-weight: 680; color: var(--entry); }

/* The call: the assistant's one-line decision, set above its reasons */
.call {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.3;
  font-weight: 660; font-stretch: 100%; color: var(--entry);
  text-wrap: balance;
}
.field .call { max-width: 34ch; }
.field .call + .answer-text { margin-top: 10px; }

/* Numbered changes inside an answer */
.steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 26px; height: 26px;
  border: 1.5px solid var(--rule-strong); color: var(--ink);
  font-size: 0.875rem; font-weight: 760; font-stretch: 90%;
}
.steps p { font-size: 1rem; line-height: 1.5; }
.field .steps + .note, .field .answer-text + .note { margin-top: 12px; }

/* Match log: what was asked and answered as the match went on */
.log th[scope="row"] { width: 15%; white-space: nowrap; vertical-align: top; font-weight: 680; font-stretch: 96%; color: var(--ink); padding-top: 12px; padding-bottom: 12px; }
.log td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.log td.said { width: 31%; color: var(--ink-soft); font-weight: 520; }

/* Two players side by side */
.cmp th[scope="row"] { width: 24%; font-weight: 680; font-stretch: 96%; color: var(--ink); vertical-align: top; }
.cmp td { width: 38%; vertical-align: top; }
.cmp td + td, .cmp thead th + th + th { border-left: 1px solid var(--rule); }
.cmp thead th { color: var(--ink); }
.cmp td b { font-weight: 720; font-size: 1.125rem; color: var(--entry); }

/* Season record */
.season th[scope="row"] { font-weight: 680; font-stretch: 96%; color: var(--ink); white-space: nowrap; }
.season td { white-space: nowrap; }

/* Player profiles */
.profiles th[scope="row"] { width: 34%; vertical-align: top; padding-top: 12px; padding-bottom: 12px; color: var(--entry); }
.profiles td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }

/* A figure strip standing on its own in a sheet */
.sheet > .figs { border-bottom: 1px solid var(--rule); }

/* A full-width example between pairs, and a second sheet under the first in a band */
.solo { margin-top: var(--gap); }
.solo + .pair { margin-top: var(--gap); }

/* Drawing on the left, answer on the right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split > .shotmap { border-right: 1px solid var(--rule); align-content: start; }
.split > .shotmap .figs { border-top: 1px solid var(--rule); }
.split > .field { border-top: 0; }

/* Who shot, and from where */
.tally { border-top: 1px solid var(--rule); }
.tally th[scope="row"] { font-weight: 620; color: var(--entry); }
.tally td { text-align: right; width: 22%; }
.tally thead th + th { text-align: right; }

.note {
  font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.45;
}

/* ── Sections on the ground ─────────────────────── */
.band { padding: clamp(28px, 4vw, 52px) 0; }
.band + .band { padding-top: 0; }

.pair {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap); align-items: start;
}
.pair + .pair { margin-top: var(--gap); }
@media (min-width: 1101px) {
  .pair { align-items: stretch; }
  .pair > .sheet { display: flex; flex-direction: column; }
  .pair > .sheet > .field:last-child { flex: 1; }
}
@media (min-width: 1101px) and (max-width: 1280px) {
  .pair .sheet-head .meta { max-width: 9.5rem; }
}

/* What you can ask: questions ruled into cells, grouped by area */
.asks tr > * { border-bottom: var(--frame) solid var(--rule-strong); }
.asks tr:last-child > * { border-bottom: 0; }
.asks th[scope="row"] {
  width: 22%; vertical-align: top; white-space: nowrap;
  padding-top: 13px; line-height: 1.4; border-right: 1px solid var(--rule);
  font-size: 1.0625rem; font-weight: 740; font-stretch: 106%; color: var(--ink);
}
.asks td { padding: 0; }
.asks td:last-child { padding-right: 0; }
.asks ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.asks li {
  padding: 13px var(--pad) 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem; line-height: 1.4; font-weight: 500; font-stretch: 97%;
  text-wrap: pretty;
}
.asks li:nth-child(odd) { border-right: 1px solid var(--rule); }
.asks li:last-child, .asks li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

/* Two views: Manager view against Full read */
.modes th[scope="row"] { width: 22%; font-weight: 680; font-stretch: 96%; color: var(--ink); vertical-align: top; padding-top: 11px; padding-bottom: 11px; }
.modes td { width: 39%; vertical-align: top; padding-top: 11px; padding-bottom: 11px; }
.modes td + td, .modes thead th + th + th { border-left: 1px solid var(--rule); }
.modes thead th { font-size: 0.8125rem; color: var(--ink); }
.modes .lead td { font-size: 1.0625rem; font-weight: 520; line-height: 1.42; color: var(--entry); text-wrap: pretty; }
.modes .ghost { width: 26px; height: 14px; margin-right: 9px; vertical-align: -2px; }

/* How it reads: chain */
.chain {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.chain li {
  position: relative; padding: 14px var(--pad) 16px;
  border-right: 1px solid var(--rule);
}
.chain li:last-child { border-right: 0; }
.chain li:not(:last-child)::after {
  content: ""; position: absolute; right: -7px; top: 50%; translate: 0 -50%;
  width: 12px; height: 12px; background: var(--paper);
  border-top: 1.5px solid var(--rule-strong); border-right: 1.5px solid var(--rule-strong);
  rotate: 45deg; z-index: 1;
}
.chain strong { display: block; font-weight: 700; font-stretch: 104%; color: var(--entry); }
.chain span.d { display: block; font-size: 0.875rem; color: var(--ink-soft); margin-top: 4px; }

.terms th[scope="row"] {
  width: 22%; font-weight: 680; font-stretch: 96%; color: var(--ink); vertical-align: top; padding-top: 12px; padding-bottom: 12px;
}
.terms td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.terms:not(.out) td, .register td.covers, .reqs td { padding-right: max(var(--pad), calc(78% - 12px - 68ch)); }

/* Shot map */
.shotmap { display: grid; grid-template-columns: minmax(0, 1fr); }
.shotmap figure { margin: 0; padding: 14px var(--pad) 6px; border-bottom: 1px solid var(--rule); }
.shotmap svg { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; }
.pitch-line { fill: none; stroke: var(--ink); stroke-width: 2.4; opacity: 0.7; }
.shot { stroke: var(--ink); stroke-width: 3; fill: none; }
.shot.goal { fill: var(--ink); }
.shot.saved { stroke-width: 5; fill: var(--paper); }
.shot.missed { stroke-width: 2.4; fill: var(--paper); opacity: 0.85; }
.shot-label {
  fill: var(--entry); font-family: var(--sans); font-size: 30px; font-weight: 640; font-stretch: 88%;
  paint-order: stroke; stroke: var(--paper); stroke-width: 7px; stroke-linejoin: round;
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px var(--pad) 12px; font-size: 0.8125rem; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend svg { width: 16px; height: 16px; }
.figs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.figs div { padding: 10px 12px 12px; border-right: 1px solid var(--rule); display: grid; grid-template-rows: 1fr auto; }
.figs div:first-child { padding-left: var(--pad); }
.figs div:last-child { border-right: 0; }
.figs b { display: block; font-size: 1.25rem; font-weight: 720; font-stretch: 100%; color: var(--entry); margin-top: 2px; }

/* Tool register */
.register th[scope="row"] {
  font-weight: 680; font-stretch: 96%; color: var(--ink); width: 22%; vertical-align: top; white-space: nowrap;
}
.register td { vertical-align: top; }
.register th, .register td, .reqs th, .reqs td { padding-top: 12px; padding-bottom: 12px; }
.count {
  font-weight: 800; font-stretch: 110%; font-size: 1.125rem; color: var(--ink); letter-spacing: -0.01em;
}

/* A sub-form inside a sheet, ruled off from what is above it */
.sheet-head.sub-head { border-top: var(--frame) solid var(--rule-strong); }

/* Roadmap */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phases li { padding: 14px var(--pad) 18px; border-right: 1px solid var(--rule); display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; }
.phases li:last-child { border-right: 0; }
.phases h3 { margin: 0; font-size: 1.0625rem; font-weight: 740; font-stretch: 106%; color: var(--entry); line-height: 1.25; text-wrap: balance; }
.phases p { margin: 0; font-size: 0.9375rem; max-width: 56ch; text-wrap: pretty; }
.phase-status { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.box { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 560; color: var(--ink-soft); }
.box i {
  width: 15px; height: 15px; border: 1.5px solid var(--rule-strong); flex: none;
  display: grid; place-items: center; font-style: normal;
}
.box.on { color: var(--entry); font-weight: 680; }
.box.on i { background: var(--ink); }
.box.on i::after {
  content: ""; width: 7px; height: 4px; margin-top: -2px;
  border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); rotate: -45deg;
}
.box.half i { background: linear-gradient(135deg, var(--ink) 0 50%, transparent 50% 100%); }
.phases .phase-status .note { margin: 4px 0 0; font-size: 0.8125rem; text-wrap: pretty; }

/* Phase number boxed on its own line, so each title gets the column's full measure */
.phases h3 { display: grid; justify-items: start; gap: 10px; }
.ph {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border: 1.5px solid var(--rule-strong); color: var(--ink);
  font-size: 0.875rem; font-weight: 760; font-stretch: 90%;
}

/* Requirements */
.reqs th[scope="row"] { width: 22%; font-weight: 680; font-stretch: 96%; color: var(--ink); vertical-align: top; }
.reqs td { vertical-align: top; }
.reqs .refuse { display: block; font-size: 0.875rem; color: var(--ink-soft); margin-top: 2px; }
.avail { font-weight: 700; font-stretch: 104%; font-size: 1.0625rem; }
.avail .refuse { font-weight: 420; font-stretch: 100%; }

/* Footer */
.foot { border-top: 1px solid var(--ground-rule); margin-top: clamp(20px, 3vw, 40px); }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; padding-top: 22px; padding-bottom: 40px; }
.foot p { margin: 0; color: var(--ground-soft); font-size: 0.875rem; max-width: 60ch; text-wrap: pretty; }
.foot p + p { margin-top: 8px; }
.foot .mark { font-weight: 800; font-stretch: 118%; color: var(--ground-text); }

/* 404 */
.lost { padding-block: clamp(40px, 8vw, 120px); display: grid; gap: var(--gap); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.lost .big { margin: 0; font-size: clamp(4rem, 12vw, 9rem); line-height: 0.85; font-weight: 860; font-stretch: 125%; letter-spacing: -0.04em; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1300px) {
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases li:nth-child(2) { border-right: 0; }
  .phases li:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .shotmap { border-right: 0; }
  .split > .field { border-top: 1px solid var(--rule); }
  .opening { grid-template-columns: minmax(0, 1fr); }
  .title-block .lede { max-width: 40ch; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases li:nth-child(2) { border-right: 0; }
  .phases li:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 900px) {
  .asks ul { grid-template-columns: minmax(0, 1fr); }
  .asks li:nth-child(odd) { border-right: 0; }
  .asks li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 900px) {
  .strip .wrap { flex-wrap: wrap; gap: 0 10px; padding-top: 6px; }
  .strip nav { flex-basis: 100%; }
  .strip ul { flex-wrap: wrap; justify-content: flex-start; gap: 0 4px; margin-left: -8px; }
  .strip li a { padding: 12px 8px 13px; }
}

@media (pointer: coarse) {
  .switch button { min-height: 44px; }
}

@media (max-width: 760px) {
  .sheet-head { grid-template-columns: auto minmax(0, 1fr); }
  .sheet-head .meta { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); justify-content: flex-start; text-align: left; }
  .chain { grid-template-columns: minmax(0, 1fr); }
  .chain li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .chain li:last-child { border-bottom: 0; }
  .chain li:not(:last-child)::after { right: auto; left: var(--pad); top: auto; bottom: -7px; translate: none; rotate: 135deg; }
  .log thead, .cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .log, .log tbody, .cmp, .cmp tbody { display: block; }
  .log tr, .cmp tr { display: grid; border-bottom: var(--frame) solid var(--rule-strong); }
  .log tbody tr:last-child, .cmp tbody tr:last-child { border-bottom: 0; }
  .log th[scope="row"], .cmp th[scope="row"] { width: auto; border-bottom: 1px solid var(--rule); padding-right: var(--pad); }
  .log td, .log td.said, .cmp td { width: auto; padding-left: var(--pad); padding-right: var(--pad); }
  .cmp td + td { border-left: 0; }
  .log tbody tr td:last-child, .cmp tbody tr td:last-child { border-bottom: 0; }
  .log td::before, .cmp td::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font-size: 0.75rem; font-weight: 640; font-stretch: 72%;
    text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
  }
  .profiles tr { display: grid; }
  .profiles th[scope="row"] { width: auto; border-bottom: 0; padding-bottom: 0; padding-right: var(--pad); }
  .profiles td { padding-left: var(--pad); padding-top: 4px; }
  .season td, .season th[scope="row"] { white-space: normal; }
  .asks tr { display: grid; }
  .asks th[scope="row"] { width: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
  .modes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .modes, .modes tbody { display: block; }
  .modes tr { display: grid; border-bottom: var(--frame) solid var(--rule-strong); }
  .modes tbody tr:last-child { border-bottom: 0; }
  .modes th[scope="row"] { width: auto; border-bottom: 1px solid var(--rule); padding-right: var(--pad); }
  .modes td { width: auto; padding-left: var(--pad); padding-right: var(--pad); }
  .modes td + td { border-left: 0; }
  .modes tbody tr td:last-child { border-bottom: 0; }
  .modes td::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font-size: 0.75rem; font-weight: 640; font-stretch: 72%;
    text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
  }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .phases li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .phases li:last-child { border-bottom: 0; }
  .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figs div:nth-child(3) { border-right: 0; }
  .figs div:nth-child(-n + 3) { border-bottom: 1px solid var(--rule); }
  .figs div:nth-child(4) { padding-left: var(--pad); }
  .terms th[scope="row"], .reqs th[scope="row"] { width: auto; }
  .terms tr, .reqs tr { display: grid; }
  .terms th[scope="row"], .reqs th[scope="row"] { border-bottom: 0; padding-bottom: 0; padding-right: var(--pad); }
  .terms td, .reqs td { padding-left: var(--pad); padding-top: 2px; }
  .register tr { display: grid; }
  .register th[scope="row"] { width: auto; border-bottom: 0; padding-bottom: 0; }
  .register td.covers { padding-left: var(--pad); padding-top: 2px; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .lost { grid-template-columns: minmax(0, 1fr); }
  .sheet.stacked { margin: 0 12px 12px 0; }
  .sheet.stacked::before { inset: 6px -6px -6px 6px; }
  .sheet.stacked::after { inset: 12px -12px -12px 12px; }
}

@media (max-width: 600px) {
  /* Scouting answer: one block per player, all four attributes visible */
  .scout thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scout, .scout tbody { display: block; }
  .scout tbody tr {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
    border-bottom: 1px solid var(--rule); padding: 10px var(--pad) 12px; row-gap: 8px;
  }
  .scout tbody tr:last-child { border-bottom: 0; }
  .scout tbody td, .scout tbody th { border: 0; padding: 0; }
  .scout .who { grid-column: 1 / 9; white-space: normal; }
  .scout .stars { grid-column: 9 / 13; min-width: 0; display: grid; justify-items: end; gap: 5px; }
  .scout .stars::before {
    content: "Potential"; font-size: 0.75rem; font-weight: 640; font-stretch: 72%;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft);
  }
  .scout .wage { grid-column: 1 / -1; min-height: 24px; text-align: left; color: var(--ink-soft); font-size: 0.875rem; }
  .scout .wage::before { content: "Wage: "; }
  .scout .wage .ghost { width: 26px; height: 14px; }
  [data-view="full"] .scout .wage::after { content: " a week"; }
  .scout .attr { grid-column: span 4; min-width: 0; display: grid; justify-items: center; gap: 5px; }
  .scout .attr::before {
    content: attr(data-label); font-size: 0.75rem; font-weight: 640; font-stretch: 72%;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft);
  }
  .scout .vrule { border-left: 0; }
  .table-wrap { overflow-x: visible; }
}
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .swap-in { animation: none; }
  .switch button, .strip li a { transition: none; }
}

@media print {
  .strip nav, .switch, .skip { display: none !important; }
}
