/* ==========================================================================
   Programme — site styles

   The page is built from three physical areas rather than from cards:

     cover   Programme lime, the colour of the app icon's field
     paper   warm off-white, the scorebook page
     ink     near-black, used sparingly

   Each area sets the local ink, rule and fill tokens, so the components
   inside it adapt without needing a variant class.

   Values carried over from the application:
     lime          App/Programme/AppIcon.icon/icon.json
     blue accent   App/Programme/Assets.xcassets/AccentColor.colorset
     radii, semantic colour rules, section-label treatment
                   Packages/ProgrammeKit/Sources/ProgrammeUI/ProgrammeTheme.swift
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Base surfaces. These never change with the area. */
  --c-paper: #faf8f2;
  --c-paper-2: #f2efe4;
  --c-ink: #0d0e0b;
  --c-ink-2: #55564e;
  --c-ink-3: #8a8b81;
  --c-rule: rgba(13, 14, 11, 0.15);
  --c-rule-2: rgba(13, 14, 11, 0.07);
  --c-fill: rgba(13, 14, 11, 0.055);
  --c-blue: #1f3a5f;
  --c-blue-ink: #faf8f2;

  --night: #0a0b08;
  --night-fg: #f4f3ec;

  --lime: #b3f900;
  --lime-ink: #0a0b08;

  /* Semantic colour keeps the app's meanings: green confirmed, amber needs a
     look, red blocking or destructive. The brand lime is never any of these. */
  --confirmed: #1d7a33;
  --confirmed-mark: #34c759;
  --caution: #8a4b00;
  --caution-mark: #ff9500;
  --critical: #c00c00;
  --critical-mark: #ff3b30;

  /* The website and the product intentionally speak in different voices.
     Schibsted Grotesk is the editorial scorebook; system faces are reserved
     for faithful representations of Programme's native interface. */
  --editorial: "Schibsted Grotesk", "Arial Narrow", Arial, sans-serif;
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --system-rounded: ui-rounded, "SF Pro Rounded", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Geometry. Programme.Metrics: 12pt controls, 18pt large surfaces. */
  --r-ctl: 10px;
  --r-surface: 12px;
  --r-large: 18px;

  --page: 1180px;
  --side: max(20px, calc((100vw - var(--page)) / 2));

  /* Area defaults (paper) */
  --bg: var(--c-paper);
  --ink: var(--c-ink);
  --ink-2: var(--c-ink-2);
  --ink-3: var(--c-ink-3);
  --rule: var(--c-rule);
  --rule-2: var(--c-rule-2);
  --fill: var(--c-fill);
  --accent: var(--c-blue);
  --accent-ink: var(--c-blue-ink);
}

@supports (color: color(display-p3 1 1 1)) {
  :root {
    /* The icon's field is defined in Display P3 and sits outside sRGB. */
    --lime: color(display-p3 0.75919 0.96783 0.18174);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-paper: #131315;
    --c-paper-2: #1b1b1e;
    --c-ink: #f2f1ea;
    --c-ink-2: #a3a49a;
    --c-ink-3: #74756b;
    --c-rule: rgba(255, 255, 255, 0.17);
    --c-rule-2: rgba(255, 255, 255, 0.08);
    --c-fill: rgba(255, 255, 255, 0.07);
    --c-blue: #679cc7;
    --c-blue-ink: #0a0f14;

    --night: #000000;
    --night-fg: #f2f1ea;

    --confirmed: #30d158;
    --confirmed-mark: #30d158;
    --caution: #ff9f0a;
    --caution-mark: #ff9f0a;
    --critical: #ff453a;
    --critical-mark: #ff453a;
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--lime);
  color: var(--c-ink);
  font-family: var(--editorial);
  font-size: 17px;
  font-weight: 420;
  line-height: 1.58;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 760;
  line-height: 1.01;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--lime);
  color: var(--lime-ink);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 11px 16px;
  border-radius: var(--r-ctl);
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus-visible {
  top: 10px;
}

/* Website figures use the editorial face and align like a printed scorebook. */
.num {
  font-family: var(--editorial);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
}

/* Faithful Programme UI remains native-looking inside the editorial page. */
.app-ui {
  font-family: var(--system);
}

.app-ui .num {
  font-family: var(--system-rounded);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Areas
   -------------------------------------------------------------------------- */

.wrap {
  width: min(100% - 40px, var(--page));
  margin-inline: auto;
}

.band {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  padding-block: clamp(64px, 8vw, 116px);
}

.band--paper {
  --bg: var(--c-paper);
  --ink: var(--c-ink);
  --ink-2: var(--c-ink-2);
  --ink-3: var(--c-ink-3);
  --rule: var(--c-rule);
  --rule-2: var(--c-rule-2);
  --fill: var(--c-fill);
  --accent: var(--c-blue);
  --accent-ink: var(--c-blue-ink);
}

.band--ink {
  --bg: var(--night);
  --ink: var(--night-fg);
  --ink-2: #a3a49a;
  --ink-3: #74756b;
  --rule: rgba(255, 255, 255, 0.18);
  --rule-2: rgba(255, 255, 255, 0.09);
  --fill: rgba(255, 255, 255, 0.07);
  --accent: #679cc7;
  --accent-ink: #0a0f14;
  --confirmed: #30d158;
  --confirmed-mark: #30d158;
  --caution: #ff9f0a;
  --caution-mark: #ff9f0a;
  --critical: #ff453a;
  --critical-mark: #ff453a;
}

.band--lime {
  --bg: var(--lime);
  --ink: var(--lime-ink);
  --ink-2: rgba(10, 11, 8, 0.7);
  --ink-3: rgba(10, 11, 8, 0.52);
  --rule: rgba(10, 11, 8, 0.24);
  --rule-2: rgba(10, 11, 8, 0.13);
  --fill: rgba(10, 11, 8, 0.07);
  --accent: #0a0b08;
  --accent-ink: var(--lime);
}

.band--top-rule::before {
  content: "";
  position: absolute;
  inset-inline: var(--side);
  top: 0;
  height: 1px;
  background: var(--rule);
}

.band--short {
  padding-block: clamp(48px, 5.5vw, 80px);
}

/* --------------------------------------------------------------------------
   4. Typography components
   -------------------------------------------------------------------------- */

/* Programme's .programmeSectionHeader(): small, semibold, wide-tracked, quiet. */
.label {
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.label--tight {
  letter-spacing: 0.065em;
  color: var(--ink-2);
}

.col-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.col-label span {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.035em;
  text-transform: none;
  font-weight: 560;
}

.head {
  margin-bottom: clamp(36px, 4.5vw, 64px);
}

.head--split {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 48px);
  align-items: start;
}

.head--split .label {
  padding-top: 0.75em;
}

.head-copy h2 {
  max-width: 17ch;
  font-size: clamp(32px, 3.9vw, 56px);
}

.body {
  max-width: 31em;
  margin-top: 20px;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.58;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body--soft {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-3);
}

.caption {
  max-width: 50em;
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.caption--tight {
  margin-top: 14px;
}

.note-label {
  font-size: 10px;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  font-weight: 640;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 32px, var(--page));
  }

  .band {
    padding-block: clamp(56px, 16vw, 76px);
  }

  .head {
    margin-bottom: 34px;
  }

  .head--split {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .head--split .label {
    padding-top: 0;
  }

  .head-copy h2 {
    max-width: 13ch;
    font-size: clamp(32px, 10.5vw, 44px);
    line-height: 0.99;
  }

  .body {
    max-width: 33em;
    margin-top: 16px;
  }
}

/* --------------------------------------------------------------------------
   5. Controls
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font-size: 16px;
  font-weight: 630;
  letter-spacing: -0.006em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.btn-ink {
  background: var(--ink);
  color: var(--bg);
}

.btn-ink:hover {
  background: color-mix(in srgb, var(--ink) 84%, var(--bg));
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-block {
  display: flex;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  font-size: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  cursor: pointer;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

/* A Programme control rendered on the page: bordered, small radius, quiet. */
.ctl {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--r-ctl);
  background: var(--fill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.ctl--ok {
  color: var(--ink-3);
}

.ctl--review {
  background: color-mix(in srgb, var(--caution-mark) 16%, transparent);
  color: var(--caution);
}

.ctl--accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.js-only {
  display: none;
}

.js .js-only {
  display: inline-flex;
}

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--lime-ink);
  border-bottom: 1px solid transparent;
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

.nav.is-stuck {
  background: color-mix(in srgb, var(--c-paper) 82%, transparent);
  color: var(--c-ink);
  border-bottom-color: var(--c-rule-2);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 690;
  letter-spacing: -0.018em;
  text-decoration: none;
}

.nav-brand img {
  width: 26px;
  height: 26px;
}

/* On the lime cover the mark is always the ink artwork. Once the navigation
   picks up the paper material it follows the appearance. */
.nav-brand .mark-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .nav.is-stuck .mark-light {
    display: none;
  }

  .nav.is-stuck .mark-dark {
    display: block;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  font-size: 14.5px;
  font-weight: 610;
  letter-spacing: -0.005em;
  text-decoration: none;
  opacity: 0.72;
  transition: opacity 180ms ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-github {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid currentColor;
  border-radius: var(--r-ctl);
  font-size: 15px;
  font-weight: 630;
  text-decoration: none;
  white-space: nowrap;
}

.nav-github:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

@media (max-width: 800px) {
  .nav-links {
    display: none;
  }

  .nav-github {
    margin-left: auto;
  }
}

@media (max-width: 420px) {
  .nav-inner {
    width: calc(100% - 28px);
    gap: 8px;
    min-height: 62px;
  }

  .nav-brand {
    gap: 8px;
    font-size: 15px;
  }

  .nav-brand img {
    width: 24px;
    height: 24px;
  }

  .nav-github {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 14px;
  }
}

/* --------------------------------------------------------------------------
   7. Hero — the cover, opened
   -------------------------------------------------------------------------- */

.hero {
  padding: 0;
  overflow: hidden;
  min-height: min(calc(100svh - 64px), 820px);
  display: flex;
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns:
    minmax(20px, 1fr)
    minmax(0, 500px)
    clamp(24px, 3.4vw, 64px)
    minmax(0, 606px)
    minmax(20px, 1fr);
  align-items: stretch;
}

.hero-copy {
  grid-column: 2;
  align-self: center;
  padding-block: clamp(44px, 7vh, 88px);
}

.hero h1 {
  max-width: 10.2ch;
  margin-top: 18px;
  font-size: clamp(42px, 5.1vw, 74px);
  font-weight: 780;
  line-height: 0.96;
  letter-spacing: -0.043em;
}

.hero-body {
  max-width: 29em;
  margin-top: 26px;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.56;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  margin-top: 34px;
}

.hero-sheet {
  grid-column: 4 / -1;
  align-self: end;
  width: 100%;
  height: min(82vh, 740px);
  overflow: hidden;
}

/* The iPad itself, cropped by the page edges rather than floated in space.
   The device frame is part of the image, so the surface stays transparent and
   the cover colour shows through its rounded corners. */
.hero-shot {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero-shot img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 16px 34px rgba(10, 11, 8, 0.24));
}

.js .hero-shot {
  transform: translateY(24px);
  opacity: 0;
  transition: transform 640ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 500ms ease;
}

.js .hero-sheet.is-open .hero-shot {
  transform: none;
  opacity: 1;
}

.side-name {
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 620;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.side-name--away {
  color: var(--ink-2);
}

.scoreblock {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1vw, 16px);
  margin-top: clamp(14px, 1.6vw, 22px);
}

.score {
  font-size: clamp(50px, 5.6vw, 86px);
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.score-dash {
  font-size: clamp(28px, 3vw, 46px);
  color: var(--ink-3);
  font-weight: 500;
}

.period-rule {
  height: 2px;
  margin-top: 16px;
  background: var(--rule-2);
}

.period-rule i {
  display: block;
  height: 100%;
  background: var(--accent);
  opacity: 0.55;
}

/* Programme's player rows: jersey number first, sized for a glance. */
.roster li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-ctl);
  background: var(--fill);
  margin-top: 6px;
}

.roster li.is-entering {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 46%, transparent);
}

.roster li.is-entering .jersey {
  color: var(--accent);
}

.roster li.is-leaving {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink-3);
}

.jersey {
  min-width: 28px;
  text-align: right;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.who {
  font-weight: 540;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gk {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--rule-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cred {
  font-size: 11px;
  font-weight: 620;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.mins {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}

.off,
.on {
  margin-left: auto;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.off {
  color: var(--ink-3);
}

.on {
  color: var(--accent);
}

/* The action palette, as it is drawn in the app. */
.palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.pal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-surface);
  background: var(--fill);
}

.pal b {
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

.pal i {
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  color: var(--ink-3);
}

.pal--goal {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

.pal--goal i {
  color: inherit;
  opacity: 0.75;
}

.pal--caution {
  background: color-mix(in srgb, var(--caution-mark) 13%, transparent);
  border-color: color-mix(in srgb, var(--caution-mark) 45%, transparent);
  color: var(--caution);
}

.pal--more {
  background: color-mix(in srgb, var(--fill) 55%, transparent);
  color: var(--ink-2);
}

.pal--critical {
  background: color-mix(in srgb, var(--critical-mark) 12%, transparent);
  border-color: color-mix(in srgb, var(--critical-mark) 45%, transparent);
  color: var(--critical);
}

@media (max-width: 1020px) {
  .hero {
    min-height: 0;
    display: block;
  }

  .hero-grid {
    grid-template-columns: minmax(20px, 1fr) minmax(0, var(--page)) minmax(20px, 1fr);
  }

  .hero-copy {
    grid-column: 2;
    padding-block: clamp(36px, 6vw, 64px) clamp(28px, 4vw, 44px);
  }

  .hero-sheet {
    grid-column: 2 / -1;
    height: clamp(340px, 46vh, 470px);
  }

  .hero-shot img {
    height: 660px;
  }
}

@media (max-width: 620px) {
  .hero-copy {
    padding-block: 38px 28px;
  }

  .hero h1 {
    max-width: 10.4ch;
    font-size: clamp(40px, 12.6vw, 48px);
    line-height: 0.97;
  }

  .hero-body {
    max-width: 32em;
    margin-top: 24px;
  }

  .hero-sheet {
    height: 300px;
  }

  .hero-shot img {
    height: 700px;
  }
}

/* --------------------------------------------------------------------------
   8. Live scoring
   -------------------------------------------------------------------------- */

.live-comp {
  margin-top: clamp(8px, 2vw, 24px);
}

.live-comp-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}

.clock-huge {
  margin-top: 18px;
  font-family: var(--system);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(56px, 8vw, 116px);
  font-weight: 540;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.clock-huge-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tally {
  margin-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--rule);
}

.tally div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  border-bottom: 1px solid var(--rule-2);
}

.tally dt {
  font-size: 15px;
  color: var(--ink-2);
}

.tally dd {
  font-size: 22px;
  letter-spacing: -0.02em;
}

/* The palette runs past the content column and is cropped by the page edge.
   Its label stays inside the column so it is never cut. */
.live-palette {
  overflow: hidden;
}

.palette--large {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
  margin-right: calc(-1 * var(--side) - 40px);
}

.palette--large .pal {
  min-height: 82px;
  padding: 12px 14px;
  border-radius: var(--r-surface);
}

.palette--large .pal b {
  font-size: 17px;
}

.palette--large .pal i {
  font-size: 12px;
  margin-top: 3px;
}

.scoring-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(32px, 4vw, 56px);
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 66px;
}

.bar-time {
  font-size: 16px;
  font-weight: 560;
  color: var(--ink-2);
}

.bar-title {
  font-size: 17px;
  font-weight: 650;
}

.bar-detail {
  font-size: 16px;
}

.bar-detail--soft {
  color: var(--ink-2);
}

.bar-score {
  font-size: 18px;
}

.bar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 900px) {
  .live-comp-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .palette--large {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 620px) {
  .scoring-bar {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .bar-detail--soft,
  .bar-actions .ctl:nth-child(2),
  .bar-actions .ctl:nth-child(3) {
    display: none;
  }

  .bar-actions {
    flex-basis: 100%;
    margin-left: 0;
  }
}

/* --------------------------------------------------------------------------
   9. Lineups — a two-page spread
   -------------------------------------------------------------------------- */

.spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 5vw, 88px);
}

.spread::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  bottom: -10px;
  width: 1px;
  background: var(--rule);
}

.spread-page {
  min-width: 0;
  transition: transform 560ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .spread-page--left {
  transform: translateX(12px);
}

.js .spread-page--right {
  transform: translateX(-12px);
}

.js .spread.is-open .spread-page {
  transform: none;
}

.roster--bench {
  opacity: 0.92;
}

.sub-commit {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.sub-when {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.sub-hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-3);
}

@media (max-width: 760px) {
  .spread {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 34px;
  }

  .spread::before {
    left: 0;
    right: 0;
    top: auto;
    bottom: auto;
    width: auto;
    display: none;
  }

  .js .spread-page--left,
  .js .spread-page--right {
    transform: none;
  }

  .spread-page--right {
    padding-top: 30px;
    border-top: 1px solid var(--rule);
  }
}

/* --------------------------------------------------------------------------
   10. Statistics
   -------------------------------------------------------------------------- */

.derive {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: start;
}

.event-time {
  margin-top: 26px;
  font-family: var(--editorial);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 680;
  letter-spacing: -0.025em;
  color: var(--ink-2);
}

.event-kind {
  margin-top: 2px;
  font-size: clamp(38px, 4.6vw, 68px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.event-who {
  font-size: clamp(54px, 7vw, 104px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.96;
  color: var(--accent);
}

.event-sub {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-3);
}

#derive-toggle {
  margin-top: 18px;
}

.ledger {
  margin-top: 18px;
}

.ledger div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  border-bottom: 1px solid var(--rule-2);
}

.ledger dt {
  font-size: 16px;
  color: var(--ink-2);
}

.ledger dd {
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.018em;
  font-family: var(--editorial);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 720;
}

.ledger .v-from,
.ledger .v-to {
  display: inline-block;
  transition: opacity 300ms ease, transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ledger .v-to {
  display: none;
}

.js .ledger dd {
  display: inline-grid;
}

.js .ledger .v-from,
.js .ledger .v-to {
  grid-area: 1 / 1;
  text-align: right;
}

.js .ledger .v-to {
  display: inline-block;
  opacity: 0;
  transform: translateY(7px);
}

.js .is-removed .ledger .v-from {
  opacity: 0;
  transform: translateY(-7px);
}

.js .is-removed .ledger .v-to {
  opacity: 1;
  transform: none;
}

.js .is-removed .event-time,
.js .is-removed .event-kind,
.js .is-removed .event-who,
.js .is-removed .event-sub {
  opacity: 0.32;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  transition: opacity 300ms ease;
}

.caption--ink {
  color: var(--ink-3);
}

@media (max-width: 860px) {
  .derive {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }
}

/* --------------------------------------------------------------------------
   11. Shot locations
   -------------------------------------------------------------------------- */

.shots {
  padding-bottom: clamp(44px, 5vw, 72px);
}

/* The pitch runs the full width of the page and is cropped by it, the way the
   shot map is cropped by the scoring workspace. */
.pitch-bleed {
  margin-top: clamp(24px, 3.5vw, 52px);
  height: clamp(340px, 54vh, 600px);
}

.pitch-big {
  width: 100%;
  height: 100%;
}

.pitch-big .pl {
  fill: none;
  stroke: var(--lime-ink);
  stroke-opacity: 0.36;
  stroke-width: 0.2;
  vector-effect: non-scaling-stroke;
  stroke-width: 2px;
}

.pitch-big .ps {
  fill: var(--lime-ink);
  fill-opacity: 0.34;
}

.pitch-big .mk circle,
.pitch-big .mk rect {
  fill: none;
  stroke: var(--lime-ink);
  vector-effect: non-scaling-stroke;
  stroke-width: 3px;
}

.pitch-big .mk .core {
  fill: var(--lime-ink);
  stroke: none;
}

.js .pitch-big .mk {
  opacity: 0;
  transition: opacity 420ms ease;
}

.js .pitch-bleed.is-in .mk {
  opacity: 1;
}

.js .pitch-bleed.is-in .mk:nth-child(2) { transition-delay: 90ms; }
.js .pitch-bleed.is-in .mk:nth-child(3) { transition-delay: 180ms; }
.js .pitch-bleed.is-in .mk:nth-child(4) { transition-delay: 270ms; }
.js .pitch-bleed.is-in .mk:nth-child(5) { transition-delay: 360ms; }
.js .pitch-bleed.is-in .mk:nth-child(6) { transition-delay: 450ms; }
.js .pitch-bleed.is-in .mk:nth-child(7) { transition-delay: 540ms; }
.js .pitch-bleed.is-in .mk:nth-child(8) { transition-delay: 630ms; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: clamp(20px, 2.4vw, 32px);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 560;
}

.legend svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.caption--lime {
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   12. Match review
   -------------------------------------------------------------------------- */

.ledger-head {
  margin-bottom: 2px;
}

.issues li {
  display: grid;
  grid-template-columns: 14px minmax(0, 250px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-2);
}

.sev {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.sev--review {
  background: var(--caution-mark);
  transform: rotate(45deg);
}

.sev--ok {
  background: var(--confirmed-mark);
  border-radius: 50%;
}

.issue-title {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.issue-detail {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 500;
}

.issue-state {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.issue-state--review {
  color: var(--caution);
}

.issue-state--ok {
  color: var(--confirmed);
}

@media (max-width: 720px) {
  .issues li {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .issue-detail {
    grid-column: 2 / -1;
  }
}

/* --------------------------------------------------------------------------
   13. Season
   -------------------------------------------------------------------------- */

.season-head {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 64px);
  padding-bottom: clamp(24px, 3vw, 38px);
  border-bottom: 1px solid var(--rule);
}

.season-head dt {
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.season-head dd {
  margin-top: 4px;
  font-family: var(--editorial);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(32px, 3.6vw, 50px);
  font-weight: 780;
  letter-spacing: -0.028em;
  line-height: 0.96;
}

.tables {
  margin-top: clamp(30px, 3.6vw, 50px);
  display: grid;
  gap: clamp(34px, 4vw, 54px);
}

.table-block {
  min-width: 0;
}

.stat-table {
  width: 100%;
  margin-top: 4px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.stat-table th,
.stat-table td {
  padding: 12px 0;
  text-align: right;
  font-weight: 500;
  font-size: 15px;
  border-bottom: 1px solid var(--rule-2);
}

.stat-table thead th {
  padding-top: 10px;
  padding-bottom: 8px;
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom-color: var(--rule);
}

.stat-table tbody th {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-align: left;
  font-weight: 560;
  font-size: 16px;
}

.stat-table thead th:first-child {
  text-align: left;
}

.stat-table tbody th .jersey {
  min-width: 26px;
  font-size: 16px;
  color: var(--ink-3);
}

.stat-table td.num {
  font-family: var(--editorial);
  font-weight: 600;
}

.stat-table col,
.stat-table th + th,
.stat-table td {
  width: 8%;
}

@media (max-width: 720px) {
  .table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .stat-table {
    min-width: 760px;
    white-space: nowrap;
  }

  .stat-table--keepers {
    min-width: 680px;
  }

  .stat-table tbody th {
    min-width: 150px;
  }
}

/* --------------------------------------------------------------------------
   14. Tracking coverage
   -------------------------------------------------------------------------- */

.coverage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(30px, 5vw, 84px);
  align-items: start;
}

.bars {
  margin-top: 6px;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  border-bottom: 1px solid var(--rule-2);
}

.bar-name {
  font-size: 15px;
}

.bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--rule-2);
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  background: var(--lime);
  transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: left;
}

.js .bar-track i {
  transform: scaleX(0);
}

.js .coverage.is-in .bar-track i {
  transform: none;
}

.bar-count {
  font-size: 15px;
  font-weight: 560;
  color: var(--ink-2);
  white-space: nowrap;
}

.ledger--values {
  margin-top: 6px;
}

.ledger--values div {
  min-height: 52px;
}

.ledger--values dd {
  font-size: 24px;
}

.ledger--values .is-untracked dt,
.ledger--values .is-untracked dd {
  color: var(--ink-3);
}

.untracked-key {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-3);
}

.untracked-key .num {
  font-size: 18px;
}

@media (max-width: 860px) {
  .coverage {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

/* --------------------------------------------------------------------------
   15. Export
   -------------------------------------------------------------------------- */

.docs-bleed {
  margin-top: clamp(30px, 4vw, 56px);
  padding-left: var(--side);
  overflow: hidden;
}

.docs {
  display: flex;
  align-items: flex-start;
  padding-block: 18px;
}

.doc {
  position: relative;
  flex: 0 0 auto;
  width: clamp(210px, 21vw, 262px);
  min-height: 300px;
  padding: 22px;
  background: var(--c-paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-surface);
  box-shadow: -10px 0 28px -22px rgba(0, 0, 0, 0.5);
  transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.doc + .doc {
  margin-left: -34px;
}

.js .doc {
  transform: translateX(-24px);
}

.js .docs.is-in .doc {
  transform: none;
}

.js .docs.is-in .doc:nth-child(2) { transition-delay: 60ms; }
.js .docs.is-in .doc:nth-child(3) { transition-delay: 120ms; }
.js .docs.is-in .doc:nth-child(4) { transition-delay: 180ms; }
.js .docs.is-in .doc:nth-child(5) { transition-delay: 240ms; }

.doc-name {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.doc-kind {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.doc-rules {
  display: block;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.doc-rules i {
  display: block;
  height: 1px;
  margin-bottom: 11px;
  background: var(--rule-2);
}

.doc-rules i:nth-child(2) { width: 76%; }
.doc-rules i:nth-child(4) { width: 58%; }
.doc-rules i:nth-child(6) { width: 40%; }

.doc-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .docs {
    flex-wrap: wrap;
    gap: 12px;
    padding-right: 20px;
  }

  .doc {
    width: calc(50% - 6px);
    min-height: 0;
  }

  .doc + .doc {
    margin-left: 0;
  }

  .js .doc {
    transform: none;
  }
}

@media (max-width: 480px) {
  .doc {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   16. Recovery
   -------------------------------------------------------------------------- */

.recovery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}

.recovery .head {
  margin-bottom: 0;
}

.recovery .head--split {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.recovery .head--split .label {
  padding-top: 0;
}

.resume {
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r-large);
  background: var(--c-paper-2);
}

.resume-title {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.resume-meta {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

.resume-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 860px) {
  .recovery {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* --------------------------------------------------------------------------
   17. Closing and footer
   -------------------------------------------------------------------------- */

.closing {
  padding-block: clamp(80px, 11vw, 150px) 0;
  overflow: hidden;
}

.closing-inner {
  text-align: center;
}

.closing-mark {
  width: clamp(84px, 10vw, 132px);
  height: auto;
  margin: 0 auto 28px;
}

.closing-name {
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 760;
  letter-spacing: -0.042em;
  line-height: 0.98;
}

.closing-line {
  margin-top: 12px;
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--ink-2);
}

.closing-action {
  margin-top: 34px;
}

.footer {
  margin-top: clamp(64px, 9vw, 120px);
  padding-block: 22px;
  border-top: 1px solid var(--rule-2);
  font-size: 13.5px;
  color: var(--ink-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

.footer-links a:hover {
  border-bottom-color: currentColor;
}

/* --------------------------------------------------------------------------
   18. Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .js .sheet,
  .js .spread-page,
  .js .doc,
  .js .pitch-big .mk,
  .js .bar-track i {
    opacity: 1 !important;
    transform: none !important;
  }
}
