/* =====================================================================
   Frank & Strong Analytics — Stylesheet
   Single source of truth for all page styles. One stylesheet, no
   per-page sheets, no inline <style> blocks.

   CSS ARCHITECTURE PRINCIPLES

   - Trace the constraint to its source instead of adding compensating
     rules. When a layout breaks, remove the rule causing the problem —
     don't add a new rule to override it.
   - Children own spacing, parents own padding. Generic classes drive
     layout, specifics only override presentation.
   - The stylesheet is a live design system, not a collection of ad-hoc
     fixes. Every rule participates in the whole.
   - Tokens, never ad-hoc literals. Use a predefined value (--s1..--s10)
     when a near match exists; ad-hoc px fragments the system.
   - Name by role, semantically. A class names a reusable role, not a
     one-off instance.

   Sections:
     1. Design tokens
     2. Base reset + element defaults
   ===================================================================== */

:root {

  /* ===================================================================
     SURFACES — the two-world rule

     The design divides into exactly two territories, and this division
     carries most of the coherence:

       STAGE      dark. Context, atmosphere, brand, team identity,
                  navigation, the hero. Photographic content lives here
                  (the stadium field image lands here later; until then
                  the stage is flat navy).
       INSTRUMENT light. Measurement only. Flat, gridded, no photography,
                  no team color.

     Grammar rule that follows from it: team identity appears only on the
     stage; the data ramp appears only on the instrument. An element that
     belongs to neither territory inherits neither territory's rules — so
     every element must be placed in one.
     =================================================================== */

  /* PAGE — the base the whole site sits on. White, not off-white.
     The site is a LIGHT site: --page is the field, and navy is scoped to
     the hero band at the top. Navy is not the background. */
  --page: var(--white);

  /* Stage — the dark world, and it is a BAND, not a field. It holds the
     hero, the nav and the stat strip, and the stadium photograph lands
     here later. All three steps sit at the navy hue (220), stepped in
     lightness only, so the photograph can drop in behind them without the
     chrome shifting hue against it. The ladder continues upward into
     --blue and --blue-mid; it is one family. */
  --stage:      var(--navy);   /* the hero band         L*6  */
  --stage-soft: #0d2a84;       /* lifted — nav bar, stat strip  L*20 */
  --stage-deep: #020819;       /* recessed              L*2  */
  /* Floating Stage furniture keeps the deep hue while allowing enough of
     the stadium through to read as glass rather than another opaque band. */
  --stage-glass: rgb(2 8 25 / .82);
  /* A diffuse edge derived from --blue-mid. It separates glass from the
     dark Stage without restoring a hard border or directional shadow. */
  --stage-halo: rgb(101 148 240 / .20);

  /* Instrument — the light world, below the band, on the page.
     --surface currently equals --page: panels separate by rule, spine and
     space rather than by a card edge, because a white card on a white page
     has no edge to give. Kept as its own token so a panel can later take a
     tint or an elevation without every white in the system moving with it.
     --surface-soft is now the only tonal variation available on a light
     page, so it does more work than it did when the page was dark.
     Consequence carried into the ramp: the ramp's neutral must stay
     tinted, never white, or a near-zero tile loses its edge against both. */
  --surface:      var(--page);
  --surface-soft: #f2f5f7;     /* inset areas, table zebra, wells */

  /* Blue washes share a hue: controls use 8%; rows and footer use 4%.
     Hover retains the control fill and changes ink; selected controls keep
     their navy treatment. The neutral --surface-soft still serves legends. */
  --surface-tint: color-mix(in srgb, var(--blue) 8%, transparent);
  --surface-tint-soft: color-mix(in srgb, var(--blue) 4%, transparent);
  --surface-control: var(--surface-tint);
  --surface-control-hover: var(--surface-tint);

  /* Ink — on the instrument. INDEPENDENT OF --navy, and that is the
     point: --ink was var(--navy), so a decision about the stage walked
     into every word on the page. When navy moved to #07194e it brought
     chroma 38 with it, and at 0.60 the body text read blue rather than
     grey. The ink now holds its own value at chroma 13, near enough to
     the blue family to belong and far enough to read as type.
     Do not re-point this at --navy. */
  --ink:      #0b1123;
  /* HEX IS THE DEFAULT, alpha is the exception. Both hexes are exactly
     what the alphas paint on the white page — what the hex buys is that
     the ink no longer shifts with whatever sits behind it. That drift is
     invisible while every consumer is on white and a silent bug the
     moment one is not; the legend already sits on --surface-soft, where
     an alpha ink ran 5/3/3 darker per channel than it did anywhere else.
       --ink       L*  5.4  C 13.3   18.77:1 on white
       --ink-mid   L* 27.6  C  9.3   10.19:1   (0.80 of the ink)
       --ink-soft  L* 47.3  C  6.6    4.94:1   (0.60)
     The soft step also has to clear on --surface-soft, which is where the
     footer and the legend sit, not only on the page white: 4.51:1 there.
     That ground is the binding one — check it, not the page.
     These are HEX SNAPSHOTS of --ink at those alphas, so they go stale
     silently the moment the ink does. Re-derive all four together.
     The -alpha pair is kept for the case the hex cannot do: ink that must
     let a backdrop through — a tint over the ramp, type over an image.
     Reach for them deliberately, never as the default. */
  --ink-mid:  #3c414f;
  --ink-soft: #6d707b;
  --ink-mid-alpha:  rgba(11, 17, 35, 0.80);
  --ink-soft-alpha: rgba(11, 17, 35, 0.60);

  /* Ink — on the stage. */
  --stage-ink:      var(--white);
  --stage-ink-mid:  rgba(255, 255, 255, 0.84);
  --stage-ink-soft: rgba(255, 255, 255, 0.66);

  /* Rules / lines — per territory. */
  --rule:       rgba(11, 17, 35, 0.14);
  --rule-soft:  color-mix(in srgb, var(--rule) 60%, transparent);
  --rule-2:     rgba(11, 17, 35, 0.26);
  --stage-rule: rgba(255, 255, 255, 0.16);


  /* ===================================================================
     BRAND — three colors, client-specified (NFL red / white / blue)

     Brand tokens NEVER carry data meaning. A brand red on a numeral
     reads as an encoding whatever it was meant to say, so brand color
     is reserved for chrome: rules, eyebrows, active markers, the
     wordmark. See the ramp reservation below.
     =================================================================== */

  --navy:     #07194e;  /* structural blue — the stage */
  --blue:     #1036a8;  /* brand blue — ink on the instrument, ramp anchor */
  --blue-mid: #6594f0;  /* bright blue — the step that survives the stage */
  --red:      #e51938;  /* brand red — rules, markers, the wordmark */
  --red-display: #d50a0a;  /* stage red — see below */
  --white:    #ffffff;  /* brand light — instrument surface, reversed type */

  /* The blue family supplies Stage and Instrument roles. Keep --blue-mid on
   dark surfaces; it does not meet small-text contrast on white. --red-display
   is for display, borders, and the wordmark, not small Stage text.
   Recheck contrast against the painted image and scrim after palette changes.
   --ink remains independent of --navy. */


  /* DATA RAMP — signed EPA, Instrument only.
   Negative values use red, positive values use green, and zero uses neutral.
   Cell figures and ranks use neutral ink; the top bar carries the EPA color.
   Do not use these tokens for navigation, branding, or team identity. */

  --ramp-neg-3: #bb2424;
  --ramp-neg-2: #dc5b61;
  --ramp-neg-1: #e6979f;
  --ramp-mid:   #c5cdd8;
  --ramp-pos-1: #92b287;
  --ramp-pos-2: #528a44;
  --ramp-pos-3: #0d6307;


  /* Team identity uses the --team-left and --team-right interfaces.
   Reference data supplies the colors for the selected teams. Keep those
   colors separate from the signed EPA ramp. */
  --team-left: #00338d;   /* Buffalo royal: initial paint before data arrives */
  --team-right: #fb4f14;  /* Denver orange: initial paint before data arrives */


  /* Font tokens follow placement: display roles use --font-display;
   headings use --font-head; prose, labels, and inline figures use --font-body.
   --font-mono aligns figures in columns. Keep the display family narrowly
   scoped and preserve decimal-separator spacing for aligned figures. */
  --font-display: 'Archivo', system-ui, sans-serif;
  /* Noto supplies section headings, prose, labels, and aligned figures.
   Archivo is reserved for the shared display and identity roles. */
  --font-head:    'Noto Serif', Georgia, serif;
  --font-body:    'Noto Sans', system-ui, sans-serif;
  --font-mono:    'Noto Sans Mono', ui-monospace, monospace;

  /* TYPE SCALE — the reference viewport is 1440 pixels.
   Type tokens share a reading scale with a separate display step. Mobile
   floors follow the available space rather than the desktop ratios.
   Keep actual font weights and widths in the loaded font URL. */
  --t-hero: clamp(38.38px, 2.9889vw + 27.623px, 74.85px);     /* PIT vs MIA */
  --t-h1: clamp(28.79px, 1.3781vw + 23.828px, 46.06px);
  --t-h2: clamp(25.56px, 0.5273vw + 23.657px, 32.99px);
  --t-h3: clamp(21.11px, 0.3601vw + 19.815px, 26.39px); /* panel title, lead prose */
  --t-body: clamp(17.78px, 0.2058vw + 17.037px, 21.11px);
  --t-small: clamp(13.89px, 0.1955vw + 13.185px, 16.89px);  /* legend, provenance */
  --t-micro: clamp(11.67px, 0.1049vw + 11.289px, 13.51px); /* tile sub-figures */

  /* HALF-STEP rung, added because the ladder had nothing between --t-small
     and --t-body and the tile label needed to sit there. 1.118 is
     sqrt(1.25) — the geometric half of a major third — so it lands
     between two rungs of the existing ladder rather than off it. Same
     device as the helmet's half-step. Resolves to 16.1px at 1440. */
  --t-label:  calc(var(--t-body) / 1.118);
  /* Action labels use 0.75 of the body size at every viewport.
   Tabs retain the label rung independently of the action treatment. */
  --t-button: calc(var(--t-body) * 0.75);

  /* Line heights — prose needs air, display needs none. */
  --lh-hero: 1.0;
  --lh-head: 1.15;
  --lh-figure: 1.2;
  --lh-body: 1.6;
  --lh-tight: 1.3;

  /* ICONS — domain and interface roles.
   Inline SVG names football concepts and inherits currentColor.
   Phosphor regular (ph) supplies interface controls as a font.
   Keep their separate sizing tokens; use only the regular interface weight. */
  --icon-sm: 16px;   /* table controls, inline with small text */
  --icon-md: 20px;   /* nav, eyebrow, panel headers, buttons */
  --icon-lg: 28px;   /* feature positions */

  /* ===================================================================
     FIGURE TYPOGRAPHY — the grid is signed decimals in columns

     The mono gives the decimal separator a full character slot and the
     number reads as two halves. The component wraps the separator and
     pulls it in; nobody authors this by hand.

     THE PULL IS DERIVED FROM THE ADVANCE, so it moves when the face does.
     Azeret ran 0.650em and was pulled 0.125em a side, leaving the point a
     0.400em slot. Noto Sans Mono measures 0.600em, so holding that same
     0.400em gives (0.600 - 0.400) / 2. The pull removes sidebearing, not
     letterform.
     =================================================================== */
  --fig-separator-pull: -0.100em;
  --fig-track-value:    -0.055em;   /* primary value in a tile */
  --fig-track-sub:      -0.03em;    /* rank / attempts line */
  --fig-track-display:  -0.05em;    /* stat-strip and hero figures */

  /* Figure weight follows --t-h3: at or above it use --fig-weight-lg;
   below it use --fig-weight-sm. Keep the two weights for different sizes. */
  --fig-weight-lg: 500;   /* >= --t-h3 : hero, stat strip */
  --fig-weight-sm: 600;   /* <  --t-h3 : tables, ranks, sub-figures. The tile
                             value left this token for a flat 700. */



  /* ===================================================================
     TRACKING — derived, not collected

     UPPERCASE. The requirement is optical: caps set solid close their
     counters and read as a bar, and the gap needed to reopen them is a
     PHYSICAL amount, not a proportional one. So tracking for caps is ONE
     absolute value, and the em figure it produces falls out of the size
     it is applied at — more em at small sizes, less at large, which is
     exactly the behaviour the eye wants and the reason a single em value
     never works across a scale.

     At the 1440 reference the one value below resolves to:
       --t-micro 11.52px  ->  .156em
       --t-small 14.40px  ->  .125em
       --t-body  18.00px  ->  .100em
       --t-h3    22.50px  ->  .080em
       --t-h2    28.13px  ->  .064em

     That ladder is not authored. It is what one number does across the
     type scale, which is what makes it a system rather than a list.

     LOWERCASE DISPLAY tightens instead, and the need IS proportional —
     the same optical gap reads wider as size grows — so it is set in em.
     One value per FAMILY, because the amount depends on the face's
     sidebearing, not on the size. Set by eye; there is no derivation
     here and none is claimed.
     =================================================================== */
  --track-caps:    1.5px;    /* every marker; see .marker */
  --track-button: calc(var(--track-caps) / 2); /* modest spacing for action caps */
  --track-head:   -.015em;   /* set against Red Hat Display; unretuned for Noto Serif */
  --track-display: -.01em;   /* Archivo — the matchup line only */

  /* The wordmark's ANALYTICS line is a LOCKUP, not text: the spacing is
     part of the mark's drawing and does not belong to the tracking
     system. It is deliberately outside the rules above. */
  /* Wordmark tracking is intentionally .385em, not the .365em that aligns
   the final letters at one viewport. The two lines use independent clamps;
   preserve their tracking instead of solving alignment at one width. */
  --track-lockup:  .385em;

  /* ===================================================================
     SPACING — 8pt scale
     Matches the design board's scale; --s3/--s4 added for the tighter
     steps the analysis cell needs.
     =================================================================== */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 40px;
  --s8: 48px;
  --s9: 64px;
  --s10: 80px;
  --s11: 96px;

  /* GRID DENSITY — passing and rushing use separate gap tokens.
   Passing uses --s4; the seven-column rushing map uses --s3.
   Preserve these gaps and the shared value/padding tokens. */
  /* TILE SURFACE — turf, and an edge that is not a spreadsheet cell.

     The grain is a 4px cycle of one light and one dark hairline, so it
     reads as blade direction rather than as a pattern. Subtle on purpose:
     stronger and the noise starts competing with the difference between
     two adjacent ramp stops, and the texture may never cost the encoding.
     Applied to ALL tiles as one material, not only the green ones — the
     field does not change with the value.

     The fill and its texture live on a pseudo-element, NOT on the tile.
     That is what lets the edge be distorted without ever touching the
     type; a filter or clip-path on the tile itself would smear the
     numbers, which the grid cannot afford.

     --tile-edge-radius is PROVISIONAL — uneven corner radii, cycled so no
     two neighbours match, to stop the grid reading as a spreadsheet.
     Agreed internally, NOT yet agreed with the client. If it is refused,
     removing it is one property; nothing else depends on it. */
  --tile-turf: repeating-linear-gradient(90deg,
                 rgb(255 255 255 / .05) 0 1px,
                 rgb(0 0 0 / .045) 1px 2px,
                 transparent 2px 4px);
  --tile-edge-radius-a: 2px 8px 3px 6px;
  --tile-edge-radius-b: 7px 2px 8px 3px;
  --tile-edge-radius-c: 4px 5px 2px 9px;

  --passing-tile-gap: var(--s4);
  --rushing-tile-gap: var(--s3);
  --section-gap: var(--s8);
  --tile-pad-y:    12px;
  --tile-pad-x:    15px;
  --tile-bar-gap:  var(--s2);
  --tile-bar-slash: calc(var(--s1) / 2);
  --tile-value-gap: 8px;   /* value to its sub-figure */
  --grid-label-gap: 14px;  /* row label to first tile */

  /* THE HASH. A sideline, not a border: a hairline with perpendicular
     ticks at a fixed pitch. The pitch is a MEASURE and is deliberately not
     tied to the tile rows — it cannot be. Passing runs four rows on a
     108.47px cycle, rushing runs one row of 145.41px, so a row-locked
     pattern would have to change per tab and would land on nothing in the
     second. Yard marks do not align to what is on the field either.
     --s9 gives eight ticks down the 550px spine and four down the 273px
     rushing one, which reads as the same measure at both lengths.

     Ticks and short marks retain their established 1.5px stroke. Vertical
     divider stems share the thinner half-stroke across plain and ticked roles. */
  --hash-track:  11px;         /* the column the spine occupies */
  --hash-line:   1.5px;        /* tick and short-mark stroke */
  --divider-line: calc(var(--hash-line) / 2); /* shared thin vertical stem */
  --hash-pitch:  var(--s9);    /* tick to tick */
  /* The tick is the ACCENT and carries its own value rather than reusing
     --rule-2, which is a general hairline weight nothing else here wants
     changed. One step past it on the same ramp: --rule .14, --rule-2 .26,
     this .36 — so the tick reads about 2.5x the hairline it crosses. */
  --hash-tick:   rgba(11, 17, 35, 0.36);

  /* WHEN A RUN SETS IN CAPS. A field LABEL is a token naming a slot —
     "EPA / dropback", "Dropbacks / Comp%", a kickoff time, a nav item — and
     caps mark it as furniture rather than reading matter. A PHRASE is
     language: "Total EPA by zone", "when Buffalo has the ball", "Passing
     zones · Total EPA". Setting language in caps makes the page shout at
     itself, and this one was shouting in thirty-five places. Labels keep
     .marker; phrases lost it. */

  /* ===================================================================
     GRID — 12 column, 1440 max (per the design board)
     =================================================================== */
  --page-max: 1440px;
  --col-count: 12;
  --col-gap: var(--s6);
  /* ===================================================================
     THE HELMET IS THE ROOT. Everything in the hero hangs off it, and
     nothing is boxed: the matchup row is the helmet's visible height, the
     flap is what its contents need, and the panel is their sum.

     Previously the panel had a fixed height and the helmet derived from
     it, which made every later decision a fight for room inside a box —
     move the flap down and the flap shrinks and the strip clips. A
     measured ratio is a CHECK, not a cage.

       --helmet-w   the canvas. content x .25, converted through the
                    measured canvas ratio, less half a major third:
                      .25    the panel share measured off concept 02
                      .70    of the square canvas is artwork (alpha)
                      1.118  sqrt(1.25), the geometric half-step
       matchup row  the helmet's visible height
       flap         its content
       panel        the sum, checked against .25 of content width

     Canvas insets: 15.2% transparent above, 14.8% below in the proof
     masters. Every production asset owns the same fixed 64-pixel outer inset
     in 1254-pixel asset space, so the interface never corrects individual
     helmets. This asset constant is independent of CSS spacing tokens.
     =================================================================== */
  --content: calc(min(100vw, var(--page-max)) - 2 * var(--page-pad));
  /* A step and a half below the panel-filling size — 1.118 three times,
     which is 1.25 x 1.118. Still every move on the same ladder. */
  --helmet-w: calc(var(--content) * 0.25 / 0.70 / 1.25 / 1.118);
  --helmet-top:  -0.152;
  /* Every asset owns the same 64px outer alpha inset. --helmet-side places
     the matching canvases; no side or team receives a compensation rule. */
  --flap-mark-at: .375;   /* where across the helmet the flap mark centres */
  --helmet-side: -0.075;

  /* One column, derived. Every horizontal measure in a composition is a
     span of these plus the gaps it crosses — never a chosen px value.
     A width that is not expressible this way is off the grid. */
  --col: calc((min(100vw, var(--page-max))
               - 2 * var(--page-pad)
               - (var(--col-count) - 1) * var(--col-gap)) / var(--col-count));
  /* Fluid page gutter: 48px at --page-max down to a 20px floor on phones. */
  --page-pad: clamp(20px, 3.33vw, 48px);
  --section-pad: var(--s9);

  /* ===================================================================
     RADII — the instrument is squarer than the chrome. Measurement reads
     as precise when its container has little softness; chrome can round.
     =================================================================== */
  --radius-tile: 2px;    /* analysis cell */
  --radius-card: 6px;    /* metric card, panel */
  --radius-surface: 12px; /* the instrument card itself */
  --radius-pill: 999px;

  /* ===================================================================
     MOTION — explicit cubic-bezier when the feel matters (standing
     preference). Entrance timing is separate from control feedback.
     =================================================================== */
  --motion-fast: 150ms;
  --motion-base: 220ms;
  --motion-enter: 900ms;
  --motion-enter-slow: 1800ms;
  --motion-step: 100ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);

  /* ===================================================================
     STACKING
     =================================================================== */
  --z-bg: -1;
  --z-content: 1;
  --z-overlay: 10;
  --z-sticky: 50;
  --z-floating: 100;
}

/* =====================================================================
   2. BASE RESET + ELEMENT DEFAULTS

   Every element that carries type is set HERE, once, against the scale.
   A new page gets correct typography with no classes on it at all, and a
   component only ever overrides what makes it that component — never the
   family, and never the size unless the role genuinely differs.

   Children own spacing, parents own padding: headings carry their own
   margins so a section does not have to know what is inside it.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
/* Hidden is a shared lifecycle state: component display rules must never
   restore its box, padding, margins, or decoration. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sheet-bound surfaces remain unavailable until one complete, validated
   source pair has rendered. A failed live request keeps the JSON result.
   A failure of both sources reveals one explicit status instead of proof
   copy that could be mistaken for governed content. */
.data-loading [data-data-surface] { visibility: hidden; }
.data-status {
  max-width: 88ch;
  margin: var(--s10) auto;
  padding: var(--s5);
}

/* Headings. Red Hat Display throughout; weight drops as size drops so
   apparent density stays even down the ladder. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: var(--lh-head);
  margin: 0 0 var(--s3);
  overflow-wrap: anywhere;
}
h1 { font-size: var(--t-h1);    font-weight: 800; letter-spacing: var(--track-head); }
h2 { font-size: var(--t-h2);    font-weight: 800; letter-spacing: var(--track-head); }
h3 { font-size: var(--t-h3);    font-weight: 700; letter-spacing: var(--track-head);
     line-height: var(--lh-tight); margin-bottom: var(--s2); }
h4 { font-size: var(--t-body);  font-weight: 700; margin-bottom: var(--s2); }
/* THE MARKER — the system's naming voice. Nav items, tabs, eyebrows, metric
   names, the venue line, the legend, the time under a matchup: text that
   NAMES a thing rather than text that is read. Nine rules each carried
   these same two declarations and were free to drift; tracking now moves
   in one place.

   Composed, not inherited: a component keeps its own size, weight and
   colour and opts in with class="eyebrow marker". Two consumers override
   the tracking on purpose — .stat-strip-label scales it to the width axis,
   and .nav-mark span is a logotype, not a marker.

   Named for what the text DOES. A name for the treatment would go stale
   the moment the treatment changed, which is exactly how --t-h3 ended up
   naming no heading. */
.marker,
h5, h6 { text-transform: uppercase; letter-spacing: var(--track-caps); }

h5, h6 {
  font-size: var(--t-micro); font-weight: 700;
  color: var(--ink-soft); margin-bottom: var(--s2);
}

p { margin: 0 0 var(--s3); max-width: 88ch; }
p:last-child { margin-bottom: 0; }

small { font-size: var(--t-small); }
strong, b { font-weight: 700; }
em { font-style: italic; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

ul, ol { margin: 0 0 var(--s3); padding-left: var(--s4); }
li { margin-bottom: var(--s1); }

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

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 700; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Every figure in the system is mono with lining, tabular digits. Set on
   the element so a number is right before any component touches it. */
.fig, [data-fig] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1;
}

/* Focus must survive on BOTH territories, so it is drawn in the brand
   red that clears 3:1 against navy and against white alike. */
:focus-visible {
  outline: 2px solid var(--focus-ink, var(--red));
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--blue-mid); color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Entrance roles reuse source readiness, never a loading timer. Backwards
   fill covers the stagger; the final frame returns to the component's own
   opacity and geometry. Completed surfaces do not replay on tab switches. */
@keyframes surface-enter {
  from { opacity: 0; translate: 0 var(--s3); }
}
@keyframes surface-fade {
  from { opacity: 0; }
}
/* These roles can describe one surface or a whole reveal scope. */
.reveal--fade { --reveal-animation: surface-fade; }
.reveal--slow { --motion-enter: var(--motion-enter-slow); }
[data-reveal-step="1"] { --reveal-step: 1; }
[data-reveal-step="2"] { --reveal-step: 2; }
[data-reveal-step="3"] { --reveal-step: 3; }
.motion-enabled img.reveal-image:not([data-image-ready]) { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.data-loading) .reveal:not(.reveal-image):not([data-revealed]),
  .reveal--shell:not([data-revealed]),
  html:not(.data-loading).motion-enabled img.reveal-image[data-image-ready]:not([data-revealed]),
  html:not(.data-loading) .reveal-values :is(.cell, .stat-card-vals, .distribution dd):not([data-revealed]) {
    animation: var(--reveal-animation, surface-enter) var(--motion-enter) var(--ease-enter)
      calc(var(--reveal-step, 0) * var(--motion-step)) backwards;
  }
}

/* =====================================================================
   3. COMPONENTS

   Written against the tokens above, never against literals. Every rule
   here belongs to one of the two territories — an element that is in
   neither inherits neither territory's rules, so it must be placed.
   ===================================================================== */

.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* ---------------------------------------------------------------------
   STAGE — the dark world. Nav, hero, team identity, atmosphere.
   Full-bleed by background, contained by .wrap inside.
   --------------------------------------------------------------------- */
/* STADIUM BACKGROUND — the image supplies the hue; a flat 0.85 scrim
   controls the contrast. Its literal RGB channels must stay in sync with
   --stage-deep. Keep the image and scrim in the same background shorthand.
   Recheck painted text contrast after changing the image or scrim. */
.stage {
  /* The scrim's literal RGB channels and --stage-deep must change together.
   The literal supplies the alpha that a hex token cannot carry. */
  background-color: var(--stage);
  background-image:
    linear-gradient(180deg,
      rgb(2 8 25 / .85) 0%,
      rgb(2 8 25 / .85) 100%),
    var(--stage-image, url("../asset/image/stadium-band.webp"));
  background-size: cover;
  /* Centred. The asset is cut at 2.4:1 and the stage is 2.4:1, so cover
     leaves almost no spare image — position has nothing to move. How much
     of the bowl reads is a SCRIM question, not a position one. */
  background-position: center;
  background-repeat: no-repeat;
  color: var(--stage-ink);
}

/* --- top navigation. Settled: top nav, never a side rail. --- */
/* Solid blue is the default navigation surface. Hero navigation declares its
   role in markup; layout and interaction remain shared sitewide. */
.nav-band {
  position: relative;
  z-index: var(--z-floating);
  background: var(--navy);
  color: var(--stage-ink);
}
.nav-band.has-hero { background: transparent; }
.nav {
  position: relative;
  z-index: var(--z-floating);
  display: flex;
  align-items: center;
  gap: var(--s6);
  /* Equal top and bottom padding keeps navigation vertically centered. */
  padding-block: var(--s4);
  /* NO bottom rule. The picker's segmented top border already draws the
     division at this point in the page — two rules a few pixels apart
     were doing one job and reading as a doubled line. */
}
.nav-context {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-right: auto;
}
.nav-mark,
.nav-mark:hover {
  text-decoration: none;
  /* The wordmark uses Archivo through the shared display rule, not
   the serif heading token. */
  font-weight: 900;
  font-size: var(--t-h3);
  letter-spacing: var(--track-head);
  line-height: 1;
  color: var(--white);
}
/* The rule under the wordmark is the one place brand red appears on the
   stage. Red never sets type here — 3.4:1 on navy — but it carries fine
   as a graphic, which clears the 3:1 bar for non-text. */
.nav-links { display: flex; gap: var(--s7); list-style: none; margin: 0; padding: 0; }
/* Links and the Teams summary share navigation type and color. The adjacent
   summary-only rule adds its layout; keep both roles together when editing. */
.nav-links > li > a,
.nav-links > li > details > summary {
  color: var(--stage-ink-mid);
  text-decoration: none;
  font-size: var(--t-small);
  font-weight: 600;
  padding-block: var(--s1);
  border-bottom: 2px solid transparent;
  transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}
.nav-links > li > details > summary { display: flex; align-items: center; gap: var(--s2); list-style: none; cursor: pointer; }
.nav-links > li > a:hover,
.nav-links > li > details > summary:hover { color: var(--white); }
/* White, not red. Red now means one thing on this page — which matchup
   you are looking at — rather than two things forty pixels apart. The
   picker is the primary selector, so the accent belongs to it. */
.nav-links > li > a[aria-current],
.nav-links > li > details > summary[aria-current] { color: var(--white); border-bottom-color: var(--white); }
.nav-links > li > details > summary::marker { content: ""; }
.nav-links > li > details > summary::-webkit-details-marker { display: none; }
.nav-links details[open] > summary .picker-chevron { transform: rotate(180deg); }

/* --- schedule-period selector. The Sheet carries season and matchup as
       explicit fields. Season is context; the period is the action. --- */
.context-picker {
  position: relative;
  padding-left: var(--s5);
  border-left: 1px solid var(--stage-rule);
}
.context-picker-trigger {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "season chevron"
    "period chevron";
  align-items: center;
  gap: var(--s1) var(--s2);
  min-width: calc(var(--col) + var(--col-gap));
  color: var(--stage-ink-mid);
  list-style: none;
  cursor: pointer;
}
.context-picker-trigger::marker { content: ""; }
.context-picker-trigger::-webkit-details-marker { display: none; }
.context-picker-caption {
  grid-area: season;
  color: var(--blue-mid);
  font-size: var(--t-micro);
  font-weight: 700;
}
.context-picker-label {
  grid-area: period;
  color: var(--white);
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: var(--track-caps);
  line-height: var(--lh-tight);
  text-transform: uppercase;
}
.context-picker-chevron {
  grid-area: chevron;
  color: var(--stage-ink-soft);
  font-size: var(--icon-sm);
  transition: transform var(--motion-base) cubic-bezier(.2,.7,.3,1),
              color var(--motion-fast) ease;
}
.context-picker-trigger:hover .context-picker-chevron,
.context-picker[open] .context-picker-chevron { color: var(--white); }
.context-picker[open] .context-picker-chevron { transform: rotate(180deg); }
.context-picker-dropdown {
  position: absolute;
  z-index: var(--z-floating);
  inset-block-start: calc(100% + var(--s3));
  inset-inline-start: 0;
  min-width: calc(var(--col) + var(--col) + var(--col) + var(--col-gap) + var(--col-gap));
  padding: var(--s4);
  color: var(--stage-ink);
  background: var(--stage-glass);
  box-shadow: 0 0 var(--s5) var(--stage-halo);
  -webkit-backdrop-filter: blur(var(--s2));
  backdrop-filter: blur(var(--s2));
}
.context-picker-group + .context-picker-group {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--stage-rule);
}
.context-picker-group-label {
  margin-bottom: var(--s2);
  color: var(--blue-mid);
  font-size: var(--t-micro);
  font-weight: 700;
}
.context-picker-list {
  display: grid;
  gap: var(--s1);
}
.picker-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s4);
  padding: var(--s2) var(--s3);
  color: var(--option-ink, var(--stage-ink-mid));
  text-decoration: none;
  transition: color var(--motion-fast) ease,
              background var(--motion-fast) ease;
}
.picker-option:hover,
.picker-option[aria-current] {
  color: var(--option-active-ink, var(--white));
  background: var(--picker-active, var(--stage-soft));
}
.picker-option-label {
  font-size: var(--t-small);
  font-weight: 700;
}
.picker-option.is-inline { grid-template-columns: auto auto minmax(0, 1fr) var(--icon-md); gap: var(--s1); line-height: var(--lh-tight); }
.picker-option > .selection-icon { font-size: var(--icon-md); visibility: hidden; }
.picker-option[aria-current] > .selection-icon { visibility: visible; }
.picker-option-count,
.picker-option-detail {
  color: var(--option-muted, var(--stage-ink-soft));
  font-size: var(--t-micro);
}

/* --- matchup selector. NOT a carousel: choosing changes the grids
       below, which makes it the page's primary selector. Bars, never
       dots — a dot says WHICH INDEX, a bar can say WHAT. --- */
/* The picker's top padding and the hero's top padding are a PAIR: the
   space between the nav and the picker, and the space between the picker
   and the matchup block. Moving the picker means trading between them,
   not adding to one — otherwise everything below moves too. */
.picker {
  --picker-columns: 5;
  --spotlight-columns: 4;
  display: grid;
  grid-template-columns: repeat(var(--picker-columns), minmax(0, 1fr));
  gap: var(--s2);
  padding-block: var(--s6) 0;
}
.picker-tabs {
  display: grid;
  grid-template-columns: repeat(var(--spotlight-columns), minmax(0, 1fr));
  grid-column: 1 / span var(--spotlight-columns);
  gap: var(--s2);
}
.picker-item {
  flex: 1;
  width: 100%;
  background: none;
  border: 0;
  border-top: 3px solid var(--stage-rule);
  padding: var(--s3) 0 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--stage-ink-soft);
  text-decoration: none;
  transition: color var(--motion-fast) ease,
              border-color var(--motion-base) cubic-bezier(.2,.7,.3,1);
}
.picker-item:hover { color: var(--stage-ink-mid); border-top-color: var(--stage-ink-soft); }
/* --red-display, matching the wordmark and the "vs". Everything red ON THE
   STAGE is now the same step; brand red stays for the instrument. */
.picker-item[aria-current="page"] { color: var(--white); border-top-color: var(--red-display); }
.picker-label {
  display: block;
  font-weight: 700;
  font-size: var(--t-small);
  letter-spacing: var(--track-caps);
}
.picker-caption {
  display: block;
  margin-top: 2px;
  font-size: var(--t-micro);
  opacity: .72;
}

/* The full-week selector stays inside the segmented picker grammar. Its
   schedule opens as a recessed part of the Stage, not as a light select or
   an unrelated floating card. It occupies one equal segment after the
   spotlight segments; the entire row redistributes when their count changes. */
.picker-menu {
  position: relative;
  grid-column: -2 / -1;
  min-width: 0;
}
.picker-menu > summary {
  display: block;
  height: 100%;
  list-style: none;
}
.picker-menu > summary::marker { content: ""; }
.picker-menu > summary::-webkit-details-marker { display: none; }
.picker-menu[open] > summary {
  color: var(--white);
  border-top-color: var(--stage-ink-soft);
}
.picker-menu--active > summary {
  color: var(--white);
  border-top-color: var(--red-display);
}
.picker-label--menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  white-space: nowrap;
}
.picker-chevron {
  flex: none;
  font-size: var(--icon-sm);
  transition: transform var(--motion-base) cubic-bezier(.2,.7,.3,1);
}
.picker-menu[open] .picker-chevron { transform: rotate(180deg); }

.picker-dropdown {
  position: absolute;
  z-index: var(--z-floating);
  inset-block-start: calc(100% + var(--s3));
  inset-inline-end: 0;
  width: calc(var(--col) + var(--col) + var(--col) + var(--col) + var(--col)
              + var(--col-gap) + var(--col-gap) + var(--col-gap) + var(--col-gap));
  max-width: calc(100vw - 2 * var(--page-pad));
  max-height: 70vh;
  overflow: auto;
  padding: var(--s4);
  color: var(--stage-ink);
  background: var(--stage-glass);
  border: 0;
  box-shadow: 0 0 var(--s5) var(--stage-halo);
  -webkit-backdrop-filter: blur(var(--s2));
  backdrop-filter: blur(var(--s2));
}
.picker-dropdown-group + .picker-dropdown-group {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--stage-rule);
}
.picker-dropdown-heading {
  margin-bottom: var(--s2);
  color: var(--blue-mid);
  font-size: var(--t-micro);
  font-weight: 700;
}
.picker-dropdown-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
}
/* The Teams menu is the same floating picker surface as the matchup and
   period menus. Its wider span and four columns belong to its 32-item set. */
.picker-dropdown--mega {
  /* Teams menu search and selection use white. Other pickers retain
   the component's default accent. */
  --focus-ink: var(--white);
  --picker-active: var(--stage-rule);
  width: calc(var(--col) * 9 + var(--col-gap) * 8);
  padding: var(--s5);
}
.picker-dropdown-list--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.search-control,
.select-control,
.search-field,
.select-field {
  --field-ink: var(--stage-ink);
  --field-muted: var(--stage-ink-soft);
  --field-border: var(--field-muted);
  --field-focus: var(--white);
  --field-selection-ink: var(--navy);
}
.search-field,
.select-field {
  padding: var(--s3) var(--s4);
  font-size: var(--t-small);
  background: transparent;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-tile);
  color: var(--field-ink);
  color-scheme: dark;
}
.search-field { width: 100%; }
.picker-dropdown .search-control { margin-bottom: var(--s3); }
.search-control, .select-control { position: relative; }
.search-control { width: 100%; }
.search-control .search-field { padding-right: calc(var(--s4) + var(--s6)); }
/* The site's icon button owns clearing; native search behavior stays intact. */
.search-control .search-field::-webkit-search-cancel-button { -webkit-appearance: none; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--s6);
  height: var(--s6);
  padding: 0;
  border: 0;
  border-radius: var(--radius-tile);
  background: transparent;
  color: var(--field-muted, var(--ink-soft));
  font-size: var(--icon-md);
  cursor: pointer;
}
.icon-button:hover { color: var(--field-focus, var(--navy)); }
.search-control .icon-button { position: absolute; right: var(--s2); top: 50%; transform: translateY(-50%); }
.select-control { display: inline-flex; }
.select-control.is-light,
.select-control.is-light .select-field {
  --field-ink: var(--ink);
  --field-muted: var(--ink-soft);
  --field-border: var(--rule-2);
  --field-focus: var(--navy);
  --field-selection-ink: var(--white);
}
.select-control.is-light .select-field { color-scheme: light; }
.select-control .select-field { appearance: none; padding-right: calc(var(--s4) + var(--icon-sm) + var(--s2)); cursor: pointer; }
.select-control > .ph { position: absolute; right: var(--s3); top: 50%; transform: translateY(-50%); font-size: var(--icon-sm); color: var(--field-muted); pointer-events: none; }
/* Persistent labels live inside the field, above its current value. */
.field-label { font-size: var(--t-micro); line-height: var(--lh-tight); font-weight: 600; color: var(--field-focus); }
.search-control.has-label > .field-label,
.select-control.has-label > .field-label { position: absolute; top: var(--s2); left: var(--s4); right: var(--s6); }
.search-control.has-label > .search-field,
.select-control.has-label > .select-field { padding-top: calc(var(--s2) + var(--t-micro) * var(--lh-tight) + var(--s1)); padding-bottom: var(--s2); }
.search-field::placeholder { color: var(--field-muted); }
/* The field's single border carries focus. Do not add a second heavy ring. */
.search-field:focus-visible,
.select-field:focus-visible { outline: none; border-color: var(--field-focus); }
.search-field::selection { background: var(--field-focus); color: var(--field-selection-ink); }
.instrument .search-control,
.instrument .select-control,
.instrument .search-field,
.instrument .select-field {
  --field-ink: var(--ink);
  --field-muted: var(--ink-soft);
  --field-border: var(--rule-2);
  --field-focus: var(--navy);
  --field-selection-ink: var(--white);
  color-scheme: light;
}
.picker-dropdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s1) var(--s3);
  width: 100%;
  padding: var(--s3);
  color: var(--stage-ink-mid);
  background: transparent;
  border: 1px solid var(--stage-rule);
  text-decoration: none;
  text-align: left;
  transition: color var(--motion-fast) ease,
              background var(--motion-fast) ease,
              border-color var(--motion-fast) ease;
}
.picker-dropdown-item:hover {
  color: var(--white);
  background: var(--stage-soft);
  border-color: var(--stage-ink-soft);
}
.picker-dropdown-item[aria-current="page"] {
  color: var(--white);
  background: var(--stage-soft);
}
.picker-dropdown-label {
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: var(--track-caps);
}
.picker-dropdown-aside {
  font-size: var(--t-micro);
  font-weight: 600;
  white-space: nowrap;
}
.picker-dropdown-detail {
  grid-column: 1 / -1;
  color: var(--stage-ink-soft);
  font-size: var(--t-micro);
}

/* --- the matchup panel -------------------------------------------------

   ONE container of a derived height, holding two rows: the matchup and
   the flap. The helmets overflow the first row and are cropped by the
   panel's floor, which is how 02 seats them.

   This replaces a version assembled by adjustment. Nothing here is a
   number that was tuned until it looked right — every length resolves
   through --helmet-w. If a value cannot be written as a token, a column
   span, or a measured asset property, it does not belong in this block.
   --------------------------------------------------------------------- */
/* The gap between the picker above and the matchup block. It sits on the
   HERO, not on the picker — the picker belongs to the nav group and
   should not carry spacing for what follows it. */
.hero { padding-block: var(--s6) 0; }

/* Context is shared by the matchup metadata and the team summary. The
   supporting modifier lowers emphasis; the stacked modifier owns layout.
   Context-row spans the full row of a paired identity composition. */
.context-row, .context {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s6);
  font-size: var(--t-small);
  font-weight: 600;
  /* --blue-mid is the ONLY blue with lift over the stage. This is the line
     that PINS that token: 16px at 600 answers to the 4.5 small-text floor,
     and it is the tightest thing --blue-mid carries. 5.60:1 on the token,
     5.47 against the brightest part of the paint behind it. --blue is
     1.68:1 here and unusable. */
  color: var(--context-ink, var(--blue-mid));
}
/* Each item pairs a DOMAIN glyph with its fact — round, date, venue are
   football concepts, so they take the commissioned pack rather than UI
   icons. The glyph replaces the pipe: the icon is the separator, because
   it already says where one item ends and the next begins. */
.context-row > span, .context > span {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.context-row svg, .context svg {
  width: var(--icon-md);
  height: var(--icon-md);
  flex: none;
  fill: currentColor;
  opacity: .75;
}
.context-row > .context-icon--alternate { display: none; }
[data-match-phase="regular"] .context-row > .context-icon--alternate { display: inline-flex; }
[data-match-phase="regular"] .context-row > .context-icon--default { display: none; }
.context-row a, .context a { color: inherit; }
.context--stacked { flex-direction: column; align-items: flex-start; gap: var(--s1); }
.context--supporting { font-weight: 400; }
.context--headline { font-size: var(--t-body); }

/* No height. The panel is the sum of its rows — see the root note. */
.panel { --panel-color: var(--navy); position: relative; min-width: 0; }

.hero-pair {
  position: relative;
  z-index: 3;                /* the helmets stand IN FRONT of the flap */
  /* The visible helmet, PLUS the gap below the block. padding-bottom does
     nothing here — min-height already exceeds the content, so the padding
     is absorbed by slack the row already had. The height itself has to
     carry the gap, and it stays derived: helmet + one named step. */
  min-height: calc(var(--helmet-w) * 0.70 + var(--s7));
  align-items: start;        /* the identity rides at the top of the row */
  display: grid;
  grid-template-columns: repeat(var(--col-count), 1fr);
  column-gap: var(--col-gap);
  align-items: center;
}

/* TOP-anchored: the canvas is placed so the ARTWORK's crown lands on the
   panel's top edge. The helmet is taller than the matchup row, so its
   base runs under the flap and the flap — which stacks above it — is
   what crops it. Bottom-anchoring instead clips the crown against the
   panel's top, which is the one part of the artwork that cannot be lost. */
.hero-art {
  position: absolute;
  /* Bottom anchoring keeps the visible helmet base seated in the flap as
   the row grows. Preserve the intentional tail offset; alpha bounds alone
   do not determine the optical placement. */
  bottom: calc(-0.18 * var(--helmet-w));
  width: var(--helmet-w);
  max-width: none;           /* the element layer caps images at 100% */
  height: auto;
  /* NO drop-shadow. It follows the whole alpha outline, so it haloes the
     sides and crown as well as the base — it cannot be bottom-only. The
     grounding is a contact shadow on the floor instead; see below. */
}
/* Contact shadow: an ellipse ON THE FLOOR beneath each helmet, not a
   silhouette cast by it. This is the only way to get shadow at the base
   alone. Sized off --helmet-w so it tracks the artwork, and sitting on
   the matchup row's floor, which is where the helmet meets the flap. */
.hero-pair::before,
.hero-pair::after {
  content: "";
  position: absolute;
  bottom: 0;
  z-index: -1;
  width:  calc(var(--helmet-w) * 0.66);
  height: calc(var(--helmet-w) * 0.085);
  translate: 0 40%;
  background: radial-gradient(ellipse at center,
              rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .28) 45%, transparent 72%);
  pointer-events: none;
}
.hero-pair::before { left:  calc(var(--helmet-w) * 0.06); }
.hero-pair::after  { right: calc(var(--helmet-w) * 0.06); }

.hero-art--left  { left:  calc(var(--helmet-side) * var(--helmet-w)); }
.hero-art--right { right: calc(var(--helmet-side) * var(--helmet-w)); }

/* Fixed raster surface for reusable share imagery. The 1200 x 630 physical
   export is an output contract, not a new site breakpoint or spacing step.
   All composition, material, type, and colors reuse the existing roles.
   Only this opt-in surface sees these rules; visitor headers are unchanged. */
.share-card, .render-preview {
  --share-width: 1200px;
  --share-height: 630px;
  /* Golden-grid construction ratio, not a spacing-scale approximation.
     The upper division is H / phi^2; the lower is H / phi. */
  --share-golden-ratio: 1.61803398875;
}
.render-preview { padding: var(--s4); }
.render-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.render-viewport { width: 100%; max-width: var(--share-width); margin-inline: auto; }
.render-viewport > iframe {
  display: block;
  border: 0;
  max-width: none;
  transform-origin: 0 0;
  transform: scale(var(--render-scale, 1));
}
.share-card {
  --helmet-w: calc(var(--share-width) / 3);
  width: var(--share-width);
  height: var(--share-height);
  position: relative;
  padding: var(--s9) var(--s8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* There is no stat flap in a share image. The complete text block owns the
   band height; both helmets share its center instead of an absent floor. */
.share-card .hero-pair { width: 100%; min-height: 0; }
.share-card .hero-art { top: 50%; bottom: auto; translate: 0 -50%; }
.share-card .nav-mark { grid-column: 1 / -1; text-align: center; }
.share-card .identity-pair {
  grid-template-columns: repeat(3, max-content);
  justify-content: center;
  margin: 0;
}
.share-card .display-separator {
  font-size: var(--t-hero);
  font-weight: 900;
  border: 0;
  padding: 0;
}
.share-card .nav-mark > span { font-size: var(--t-h2); margin-top: var(--s5); }
.share-card .nav-mark > .section-desc {
  max-width: calc(var(--col) * 5 + var(--col-gap) * 4 - var(--s4) * 2);
  padding-inline: var(--s5);
  font-family: var(--font-body);
  font-size: var(--t-h3);
  line-height: var(--lh-body);
  font-weight: 400;
  letter-spacing: normal;
  color: var(--white);
  margin: var(--s6) auto 0;
}
/* Invisible, out-of-flow QA text allows a real font-width comparison with
   serif fallback. FontFaceSet.check alone cannot establish a loaded face. */
.share-card .render-probe { position: absolute; opacity: 0; pointer-events: none; white-space: nowrap; }
.share-card .render-probe.is-fallback { font-family: serif; }

/* A single identity uses the existing illustrated Stage and Team hero roles.
   The compact publisher mark leaves the team name as the main display. */
.share-card.is-single {
  --share-focus-y: calc(var(--share-height) / var(--share-golden-ratio) / var(--share-golden-ratio));
  justify-content: flex-start;
}
.share-card.is-single .nav-mark { text-align: left; }
.share-card .nav-mark.is-compact > span { font-size: var(--t-small); margin-top: var(--s1); }
/* Center the complete Team-card identity block on the upper golden-grid
   division: 38.1966% of the full canvas, or 240.639px at 630px.
   Content grows above and below that anchor. Keep the shared s8 left inset
   and reading-column width; the publisher lockup is not the vertical anchor. */
.share-card.is-single .hero-summary {
  position: absolute;
  inset-inline: var(--s8);
  top: var(--share-focus-y);
  translate: 0 -50%;
  padding: 0;
}
.share-card.is-single .identity-block > .context { font-size: var(--t-h3); justify-content: flex-start; }
.share-card.is-single > .attribution { margin-top: auto; }

/* Identity sits on the middle third of the macro-grid, so its centre IS
   the page centre and the "vs" meets the strip's divider by construction. */
.identity-pair {
  /* Six columns, not four. At --t-hero two nicknames and the "vs" need
     more than a third of the grid, and the helmets are out of flow so
     widening this does not move them. */
  /* The identity spans the WHOLE grid. The helmets are out of flow, so
     the tracks can run to the page edges and the binding constraint
     becomes the artwork rather than a column count. */
  grid-column: 1 / -1;
  /* 1fr auto 1fr, not flex. The outer tracks stay EQUAL so the "vs" sits
     on the page centre by construction — it has to meet the strip's
     divider below it. The names inside are fit-content and hug the vs, so
     a short nickname does not reserve room it is not using and a long one
     grows OUTWARD, toward the helmet, never into the vs. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--s5);
  /* The meta line is part of this block now, on its own row above the
     names, with real air between the two. */
  row-gap: var(--s6);
  /* Air under the records before the flap's edge. The helmets are out of
     flow, so this moves the identity block WITHOUT moving them — the
     helmets keep their own relationship to the flap. */
  margin-bottom: var(--s5);
}
.context-row { grid-column: 1 / -1; }

/* EQUAL, not content-sized. justify-content centres the group, so unequal
   names push the "vs" off the page centre by half their difference — and
   the strip's divider below is on the true centre, which makes the drift
   read as a broken alignment between two components that must agree. */
.identity-side { min-width: 0; }
/* The city sits as an eyebrow above the nickname, per concept 02 — which
   is what makes --t-hero fit: "Bills" is a third the width of "Buffalo
   Bills". Stage ink, not the --blue the instrument eyebrow uses; --blue
   is 1.71:1 on navy and unusable here. */
.stage .eyebrow {
  font-size: var(--t-h3);
  font-weight: 500;
  color: var(--identity-ink, var(--stage-ink-mid));
  margin-bottom: 2px;
}

/* Names hug the "vs": home closes to the right, away opens to the left,
   so the two read toward the centre rather than as two columns. */
/* Placed by MODIFIER, not by DOM order. :first-child broke the moment the
   meta line moved into this block and became the first child — the rules
   silently bound to nothing and the names fell to the track edges. */
.identity-side--left { grid-column: 1; justify-self: end;   text-align: right; }
.identity-side--right { grid-column: 3; justify-self: start; text-align: left; }

/* THE ONE RULE that may reference --font-display. See the scoping law.
   Identity jobs: the matchup line, its "vs", the WORDMARK, the schedule
   period, the flap marks, and the team-page name.
   The stat strip left for Noto Sans Condensed and the gap map's sub
   line for Noto Sans. Adding a selector here is visible in a diff.
   That is the whole mechanism. */
.display-separator, .nav-mark, .flap-mark, .context-picker-label, .hero-title {
  font-family: var(--font-display);
}
.hero-title {
  /* NARROW, the same 70 the strip labels use. The names were set expanded
     at 105, which was what pushed the longer nickname under the helmet.
     Archivo's width axis is the room: narrowing buys size rather than
     trading it away, and it ties the hero to the tiles. */
  font-variation-settings: 'wdth' 70;
  font-weight: 800;
  font-size: var(--t-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  white-space: nowrap;
  margin: 0;
  color: var(--white);
}
.summary-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fig-weight-lg);
  font-size: var(--t-h3);
  letter-spacing: var(--fig-track-display);
  color: var(--context-ink, var(--blue-mid));
  margin: var(--s2) 0 0;
}
/* A standalone season record is a headline fact; paired matchup records
   keep the base treatment. Both use the existing type ladder. */
.summary-value--headline {
  font-size: var(--t-h1);
  font-weight: 700;
  line-height: var(--lh-figure);
  /* The independent statistics read fills one record line after editorial
     identity. Reserve that line without inventing copy or a hero height. */
  min-block-size: 1lh;
}
/* Thin red, no box. Red on navy is 3.99:1 — display only, which this is:
   it carries no information the names do not already carry. */
/* Thin red in a box. Red on navy is 3.99:1 — display only, which this
   is: it carries no information the names do not already carry. The rule
   around it is stage rule, not red, so the box reads as chrome and the
   letterform keeps the accent to itself. */
.display-separator {
  font-variation-settings: 'wdth' 100;
  font-weight: 300;
  font-size: var(--t-h2);
  color: var(--red-display);
  line-height: 1;
  border: 1px solid var(--stage-rule);
  border-radius: var(--radius-card);
  padding: var(--s2) var(--s3);
}

/* --- the flap. A white trapezoid rising out of the instrument into the
       stage, carrying the stat strip. It is the hinge between the two
       worlds: the helmets rest on its top edge, and its foot is
       continuous with the white page below, so it reads as the main
       section folded up rather than as a card floating on navy.

       The angle is what makes it read as folded. A rectangle here is just
       a panel; the taper is the whole device, and it is the same
       symmetry-break the boards carry through the rest of the page.

       drop-shadow, NOT box-shadow: box-shadow is drawn on the border box
       and the clip-path then cuts it off, so the shadow would sit in mid
       air along the diagonals. filter follows the clipped silhouette.

       KEEP IT FAINT. The flap is white and the page below it is white, so
       the two merge and the shadow is the ONLY thing marking the flap's
       bottom — at any real strength it draws a hard line straight across
       the page and the shape stops reading as a fold. It exists to hint
       the lift along the top edge and must stay under the threshold where
       the bottom edge registers at all. */
.flap {
  position: relative;
  z-index: 2;                /* the white edge is what crops the helmets */
  background: var(--white);

  /* Taper is one column. A gutter alone was too shallow to read as a
     fold; a gutter plus a column cut so far in that the top edge stopped
     being the flap's width. */
  --flap-taper: var(--col);
  /* The bottom two points sit BELOW the box on purpose. A clip edge that
     lands exactly on the border produces a semi-transparent antialiased
     row, and the navy behind shows through it as a hairline where the
     flap meets the section below. Pushing the edge past the box removes
     the seam; there is nothing to see down there anyway. */
  clip-path: polygon(var(--flap-taper) 0,
                     calc(100% - var(--flap-taper)) 0,
                     100% calc(100% + 2px), 0 calc(100% + 2px));

  display: flex;
  align-items: center;
  /* Asymmetric: more above the strip than below, so the figures sit off
     the fold rather than against it. */
  padding-block: var(--s7) var(--s3);
  /* NO shadow. The flap is white and the page below it is white, so any
     shadow at all draws its bottom edge as a line straight across the
     page — it came back at every strength that was visible at the top.
     The fold reads from the taper alone. */
}

/* Stat strip. Now on the instrument side of the divide, so it takes ink
   rather than stage ink. Figures are >= --t-h3, so --fig-weight-lg. */
/* Two GROUPS, not six cells with hand-placed columns. The offense and
   defense trios are the actual structure, the divider is a real element
   between them, and nothing depends on DOM order — the previous version
   placed cells with :nth-of-type, which counts divs, so the divider
   silently shifted every cell by one. */
.stat-strip {
  /* The strip now sits low in the flap, where the taper has nearly closed,
     so it no longer needs inset to clear the notch. This is breathing
     room, not clearance — half a column each side, which is the taper
     halved, so the inset and the angle stay related. */
  padding-inline: calc(var(--col) / 2);
  display: grid;
  /* minmax(0, 1fr), NOT 1fr. A 1fr track takes an automatic minimum of
     min-content, and these labels are white-space: nowrap, so below the
     reference width the longest label refuses to shrink and pushes the whole
     grid past the right edge — 101px past it at 1100. The page looked
     symmetric at 1440 and was broken at every width beneath it. */
  grid-template-columns: minmax(0, 1fr) var(--hash-track) minmax(0, 1fr);
  column-gap: var(--col-gap);
  align-items: stretch;
}
/* The rule between the two sides. A grid ITEM in the 1px track, so it
   needs a row to stretch in — without one it has width but no height. */
.stat-strip-split {
  /* BOTH axes placed. grid-row alone left the column to auto-placement,
     which put it in track 1 on top of the first group. */
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  /* ONE mark, at the middle. The spine's repeating hash needs length to
     read as a measure and this rule is 95px — a pitch of any kind would
     land once or twice and look like a mistake rather than a rhythm. A
     single centred tick is the same vocabulary spoken once. */
  /* --rule, matching the spine. This was --rule-2, left over from when it
     was a plain divider and nothing else looked like it. Two things broke:
     the two dividers no longer read as one component, and the tick lost
     its job — at .26 against the tick's .36 there was barely an accent,
     where the spine gives .14 against .36. The line-to-tick relationship
     has to be the same in both or the mark stops reading as a mark. */
  background-image:
    linear-gradient(180deg, var(--rule) 0 100%),
    linear-gradient(180deg, var(--hash-tick) 0 100%);
  background-size: var(--divider-line) 100%, 100% var(--hash-line);
  background-position: 50% 0, 0 50%;
  background-repeat: no-repeat, no-repeat;
}

.stat-strip-group {
  display: grid;
  /* Same automatic minimum, one level in: the three cells inside a group
     were also sized by their longest nowrap label. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--s1);
}
.stat-strip-group--right /* A value the source does not carry is shown as absent, never filled in.
   An invented figure in a stat strip is indistinguishable from a real
   one, which is the whole reason not to. */
.stat-strip-value--none {
  font-family: var(--font-body);
  font-size: var(--t-small);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
}
.stat-strip-cell { text-align: center; }
.stat-strip-value { display: block; }
/* Team identity color also labels the stat-strip halves on the light
   flap. Keep this scoped exception separate from the signed data ramp. */
.stat-strip-group .stat-strip-label,
.stat-strip-group .stat-strip-sub        { color: var(--team-left); }
.stat-strip-group--right .stat-strip-label,
.stat-strip-group--right .stat-strip-sub   { color: var(--team-right); }

/* The right-side modifier carries the right identity's color. Each side
   keeps its own three numbers
   rather than one possession's offence-against-defence slice — it sits above
   a control that switches possession, so a directional strip would contradict
   whichever side was showing. The class names position; reference tokens
   supply the identity color.

   Sub-figure. Noto Sans — this is a figure in a LINE, not a column,
   so nothing aligns and the mono buys nothing. Weight 400, not
   --fig-weight-sm: that token is for
   figures sitting ON the ramp, where they need weight to hold against a
   colour fill. These sit on white and do not. */
.stat-strip-sub {
  display: block;
  margin-top: var(--s1);
  font-family: var(--font-body);
  font-size: var(--t-small);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: var(--fig-track-sub);
  color: var(--ink-soft);
}

/* Label: narrow like the figure it names, and tight to it. The three
   parts of a tile are ONE object — label, value, sub — so the spacing
   inside it has to be closer than the spacing between tiles, or the parts
   read as separate things that happen to be stacked. */
.stat-strip-label {
  display: block;
  white-space: nowrap;     /* a two-line label makes its tile taller than
                              its neighbours and the row stops aligning */
  /* font-stretch, not font-variation-settings. Google serves Noto Sans'
     width as DISCRETE instances — condensed / semi-condensed / normal,
     one file each — so there is no axis to interpolate and a 'wdth' 70
     would silently do nothing. Archivo's continuous 62..125 is what the
     old value was written against, and Noto condensed measures 83% of its
     own normal width — Archivo at wdth 70 was narrower than that. */
  font-family: var(--font-body);
  font-stretch: condensed;
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.1;
  /* Tracking scaled to the WIDTH. --track-caps opens caps drawn at normal
     width; condensed draws them at 75%, so the gaps would stay full while
     the letters narrow and the word comes apart. 0.75 is the value the
     width derives — matching condensed — and 0.65 is where the eye landed
     from there, a shade tighter. Was 0.7 against Archivo at wdth 70. */
  letter-spacing: calc(var(--track-caps) * 0.65);
  color: var(--ink-soft);
  margin-bottom: var(--s1);
}
/* The separator pull is a MONOSPACE correction — the mono gives the
   decimal a full character slot and splits the number in two. Noto Sans
   is proportional and already tight, so the pull collides the digits
   and "+0.198" reads as "+0198". It has to be cancelled wherever the
   figures are not mono. */
.stat-strip-value .fig-sep { margin-inline: 0; }

/* Vanity-tile figures: Archivo drawn narrow, at --t-h1. The first narrow
   attempt was at --t-h2, so width and size moved together and the result
   read as squeezed — the size was doing that, not the width. */
.stat-strip-value {
  /* line-height 1. The gap between a label and its figure is LEADING, not
     margin: at 45px with the inherited 1.5 the value's own line box holds
     ~17px above the digits, so no margin change can close it. Figures
     have no descenders, so there is nothing to protect. */
  line-height: 1.15;
  font-family: var(--font-body);
  font-stretch: condensed;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--t-h1);
  letter-spacing: var(--fig-track-display);
  /* --ink-mid, not --ink. These figures are larger than the serif section
     lead and nearly as heavy, so at full ink they read as the same rank
     and the two compete. The step down settles the strip under the
     heading without touching size or weight. */
  color: var(--ink-mid);
}

/* ---------------------------------------------------------------------
   INSTRUMENT — the light world. Measurement only: flat, gridded, no
   photography, no team colour.
   --------------------------------------------------------------------- */
.instrument { padding-block: var(--s9) var(--s10); }
.instrument.is-compact { padding-block-start: var(--s7); }
/* A summary-first instrument begins close to its preceding context. */
.instrument--summary-first { padding-block-start: var(--s6); }

/* Each section owns its entry gap. Every ruled boundary has the same 32px
   on each side; unruled boundaries do not stack exit and entry padding. */
.section { padding-block: var(--section-gap) 0; }
.section:has(+ .section--divided) { padding-bottom: var(--s6); }
.section > .section-lead { max-width: 88ch; margin-inline: auto; text-align: center; }
/* The MEASURE comes from padding, not from a narrower box: the paragraph
   stays full content width and is inset symmetrically, so its line length
   lands at 88ch while the text sets left. Centred prose forces the eye to
   hunt for the start of every line, which a paragraph this wide cannot
   afford; the heading above it still centres, because one line has no
   ragged edge to align. */
.section > p:not(.status-message),
.section-desc,
.reading {
  max-width: none;
  margin-inline: 0;
  padding-inline: max(0px, calc((100% - 88ch) / 2));
  text-align: left;
  overflow-wrap: anywhere;
}

.section-desc { margin-bottom: var(--s6); }
.section-desc.is-centered { text-align: center; }
.data-value--empty { visibility: hidden; }
.reading.data-value--empty { min-block-size: 4lh; }
.section-desc > :last-child,
.reading > :last-child,
.provenance > :last-child { margin-bottom: 0; }

/* Typed media fills the section description's measure. The player owns only
   media geometry; heading and description roles own their shared styling. */
.inline-media { margin: 0 0 var(--s3); }
/* A blank authored line is a paragraph break, including at a media boundary.
   One inherited line of separation expresses that break without spacer nodes. */
.inline-media--paragraph-before { margin-block-start: 1lh; }
.inline-media--paragraph-after { margin-block-end: 1lh; }
.inline-media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.inline-media figcaption { margin-top: var(--s2); font-size: var(--t-small); }

/* The section's opening line. One major third above --t-h2 — that rung is
   real in the ladder (h1 sits a half-step above it) but had no token, and
   this is its only consumer, so it derives here instead.

   Sentence case. The uppercase rule that used to sit here is REMOVED, not
   overridden, so the line inherits h2's --track-head; caps tracking would
   be wrong on lowercase. Uppercase was bought size at the same rung — caps
   have no descenders — and the extra rung now buys it outright.

   NAVY, not --ink. The ink went grey so the body text would stop reading
   blue, and the section's opening line is the one place on the instrument
   that should still carry the brand — it is the largest thing on the light
   side and it sits directly under the stage. */
.section-lead { font-size: calc(var(--t-h2) * 1.25); margin-bottom: var(--s5);
                color: var(--navy); }
.section:first-child { padding-top: 0; }
.section--divided { padding-top: var(--s6); border-top: 1px solid var(--divider-color, var(--rule)); }

/* Eyebrow: a kicker above a heading. The one class here that earns its
   name — it is a role, not a section part, so it works above any heading
   on any page. Everything else the element layer already does. */
.eyebrow {
  font-size: var(--t-micro);
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 var(--s1);
  max-width: none;
}
/* The paragraph after a section heading gets the space, not a size. An
   earlier rule set it to --t-h3, which is also why the measures did not
   match: ch scales with the font, so 88ch at h3 is 1307px against body's
   1045px — the same character count at two different widths. */
h2 + p { margin-bottom: var(--s6); }

/* The reading note. Not decoration: on a defence grid green means the
   OPPONENT had success, and #1 inverts between offence and defence. Both
   are misreadings a confident reader makes silently, and no amount of
   colour discipline prevents either. */
.reading {
  font-size: var(--t-small);
  /* --ink at 500, not --ink-mid at 400. This is instruction the reader needs
     to read the grids correctly; at the footer's ink and weight it read as
     the same order of thing as the rights boilerplate, which is the one
     paragraph on the page nobody has to read. */
  color: var(--ink);
  font-weight: 500;
  margin-block: var(--s7) 0;
}

/* --- section tabs and the phase panels ------------------------------- */
/* Margins COLLAPSE here — the paragraph above sets --s6 below itself, so
   the painted gap is the larger of the two, not their sum. Measure it. */
.tabbar { display: flex; justify-content: center;
          margin-top: var(--s8); margin-bottom: var(--s8); }
.tabbar.is-compact { margin-top: var(--s6); }

/* The possession tabs take .button. Pills were wrong while the labels were
   bare team names — two of those side by side restated the hero's versus —
   and right once the label became a full phrase, which reads as a view of
   one game rather than a side of it. No .marker: uppercase suits PASSING
   GAME and shouts at a sentence. */

/* The panel's own heading, from the content team's page: the matchup as a
   sentence with the possession as its note. These were lost when the
   possession-button block they sat in was replaced. */
.section-lead-alt {
  font-family: var(--font-body);
  /* --t-h2, a rung ABOVE .panel-title. Both sat at --t-h3, which left the
     heading that governs two panels at the same size as the headings inside
     them — no rank, so it read as subordinate to the things it introduces.
     The ladder now steps cleanly: lead 39.06, this 31.25, title 25.00. */
  font-size: var(--t-h2);
  font-weight: 700;
  letter-spacing: var(--track-head);
  text-align: center;
  margin: 0 0 4px;
}

/* THE SUBTITLE. The quiet line under a heading, naming what the heading is
   about: "when Buffalo has the ball" under the possession, "Total EPA by
   zone" under a grid title. It was .possession-note and .panel-metric —
   two classes, identical job, differing only in the size and weight each
   happened to be given. The same mistake as .stat-card-tag: a name taken
   from the first place a thing appeared, which then cannot travel to the
   second.

   It is a marker, so it composes: class="subtitle marker". */
.subtitle {
  font-size: var(--t-micro);
  line-height: var(--lh-body);
  font-weight: 500;
  color: var(--ink-soft);
  text-align: center;
  margin: 4px 0 var(--s5);
  max-width: none;
}
/* The possession's subtitle introduces a whole block rather than one grid,
   so it takes the larger gap under it. */
.section-lead-alt + .subtitle { margin-bottom: var(--s6); }

/* THE VANITY TILES. Three cards, each a head-to-head: this possession's
   offence against the defence facing it. Deliberately QUIET — the hero
   strip carries the headline figures at --t-h1, and these ran at the same
   size, so the page had two sets of headline numbers and no hierarchy
   between them. Here the figure sits at --t-h3, roughly half.

   A fill, not a border. The content team's card carries a 1px outline and a
   shadow; three of those add twelve lines to a page that already had twelve
   in total. Tone does the separating instead. */
.stat-row {
  display: grid;
  /* Five tracks: card, rule, card, rule, card. The rules are ELEMENTS, not
     pseudo-elements on nth-child — position-bound selectors have silently
     stopped matching in this file twice. */
  grid-template-columns: 1fr max-content 1fr max-content 1fr;
  align-items: stretch;
  gap: var(--s6);
  margin-bottom: var(--s9);
}
/* A row that ends its section does not add a second section gap. The next
   section owns its entry padding; paired rows inside analysis keep theirs. */
.stat-row:last-child { margin-bottom: 0; }
/* Four peer season metrics use the same cards and hash separators. Only
   the track count changes; this remains the existing stat-row component. */
.stat-row--four { grid-template-columns: repeat(3, 1fr max-content) 1fr; }
.stat-row--headline .stat-card-value { font-size: var(--t-h1); }
.stat-card {
  /* NO surface. Three filled boxes read as dashboard cards floating on the
     page; the three-ness is real and worth keeping, but it comes from the
     separation, not from three backgrounds. */
  text-align: center;
}

/* Stat separators use unconnected hash ticks because the metrics are
   peers. They share --hash-track with the spine but have a separate pitch.
   Keep the marks transparent rather than adding a filled surface. */
.stat-rule {
  width: var(--hash-track);
  /* A WHOLE NUMBER OF TICKS, not a percentage. At 80% the pattern filled
     from the top and left a full gap at the bottom, so the run's ink centre
     sat 5px above the box's — centring the box does not centre the marks
     unless the box ends on a tick. Seven ticks at --s3 pitch:
     6 gaps + 1 tick width. */
  height: calc(6 * var(--s3) + var(--hash-line));
  align-self: center;
  background-image: repeating-linear-gradient(180deg,
    var(--hash-tick) 0 var(--hash-line),
    transparent var(--hash-line) var(--s3));
}
.stat-card-label {
  display: block;
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: var(--s2);
}
.stat-card-vals {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: var(--s3);
}
.stat-card-value {
  font-family: var(--font-body);
  /* NOT condensed. The strip is condensed because six figures share one
     flap and the width is spent; a card has its own box and nothing to
     squeeze against, so the narrow cut only made the number look pinched.
     Half a rung above --t-h3, which is the ladder's own 1.118 step — a full
     rung would land on --t-h2 and tie with the possession head above it. */
  font-size: calc(var(--t-h3) * 1.118);
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--fig-track-display);
}
/* The one "vs" that belongs on the page: these two numbers ARE a
   head-to-head. The hero's is identity; this one is arithmetic. */
.stat-card-vals .comparison-separator {
  font-size: var(--t-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--ink-soft);
}
/* Cancel the separator pull. It is a MONOSPACE correction — the mono gives
   the decimal a full character slot and the component claws it back — and
   these figures are proportional and already tight, so the pull collides the
   digits and "+0.198" reads as "+0198". The stylesheet warns that this
   cancellation travels with the rule; adding a second proportional figure
   without it reproduced the bug exactly. */
.stat-card-value .fig-sep { margin-inline: 0; }
.stat-card-value.is-left { color: var(--team-left); }
.stat-card-value.is-right { color: var(--team-right); }
/* The tag is a .cell-sub — same role, same size, same colour, sitting under
   a figure and naming it. It had its own class only because the shared one
   was called .analysis-cell-sub and could not travel here. */
.stat-card .cell-sub { margin-top: var(--s2); }
/* Equal tracks support each declared tab. With TWO COLUMNS, the gap's centre is the container's centre and the
   container is centred — which fixes the midpoint on the page. The ball
   icon only shows on the live tab, so a flex row would have grown the
   active button and shifted the pair sideways on every switch.

   Equal 1fr tracks in a shrink-to-fit box resolve both columns to the WIDER of the
   two, so the halves stay equal whichever is live. Each button then hugs
   the gap and grows outward into its own column's slack. */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; column-gap: var(--s6); }
.tabs.is-compact .button { justify-content: center; }
.tabs.is-compact .button svg { width: var(--icon-lg); height: var(--icon-lg); }
.button--left  { justify-self: end; }
.button--right { justify-self: start; }

/* The pill-control role is .button; role="tab" defines tab behavior.
   Selected styling follows aria-selected so visible and accessible state
   agree. The segmented Stage picker remains a separate component. */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--surface-control);
  /* TRANSPARENT, not none. The 1px stays in the box so the geometry does
     not shift between states, and a focus ring has somewhere to land. */
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: var(--s2) var(--s6);
  font-family: var(--font-body);
  font-size: var(--t-button);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-button);
  /* Action hover and keyboard focus use white on navy. Tabs keep their
     established ink-only hover and white-on-navy selected state. */
  color: var(--ink-mid);
  cursor: pointer;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease,
              border-color var(--motion-fast) ease;
}
/* Tabs keep their established spacing and sentence-case label treatment. */
.button[role="tab"] {
  padding-block: var(--s3);
  font-size: var(--t-label);
  text-transform: none;
  letter-spacing: normal;
}
/* Shared control icons retain their existing measure beside either label. */
.button svg { width: var(--icon-md); height: var(--icon-md); flex: none; fill: currentColor; }
.button > .ph { font-size: var(--icon-md); flex: none; }
/* The ball sits with whoever has it. Both buttons carry it so the label does
   not reflow on switch; only the live one shows it. */
.tabs .button .selection-icon { display: none; }
.tabs .button[aria-selected="true"] .selection-icon { display: block; }
/* Hover moves TONE, not a line — reinstating a border on hover would put
   the outline back one button at a time. */
.button:not([role="tab"]):not(:disabled):is(:hover, :focus-visible) {
  background: var(--navy);
  color: var(--white);
}
.button[role="tab"]:hover { background: var(--surface-control-hover); color: var(--ink); }
/* The live pill fills NAVY, not --ink. A grey-black fill read as a
   disabled state once the ink desaturated; navy ties the control to the
   stage above it and to the section lead. */
.button[aria-selected="true"] { background: var(--navy); color: var(--white); }

/* Rushing sits under passing rather than behind a second tab. They are one
   reading of one possession, so the gap between them is a paragraph break,
   not a section break. */
.mirror + .mirror { margin-top: var(--section-gap); }

/* --- the mirrored pair. THE PRODUCT: two grids in one visual language,
       so a mismatch is findable by eye. Divided by a spine rather than
       boxed as cards, because their correspondence is the thing that has
       to stay visible. --- */
.mirror {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hash-track) minmax(0, 1fr);
  /* TWO ROWS, declared. Passing and rushing are one possession, so the spine
     runs unbroken through both — and a spine spanning 1 / -1 needs an
     explicit track list to span, or -1 resolves to the end of a one-row
     explicit grid and the rule covers the first pair only. That exact
     failure is already in the protocols. */
  grid-template-rows: auto auto;
  column-gap: var(--s7);
  row-gap: var(--section-gap);
  align-items: start;
}
/* The spine, hashed. The hairline is one background layer centred in the
   track; the ticks are a second, repeating at --hash-pitch. No background
   COLOUR — a colour here would fill the whole 11px track and the ticks
   would have nothing to read against. */
/* Columns are placed by MODIFIER CLASS, not by nth-of-type. Four panels
   auto-place into rows 1 and 2 once their column is explicit, and the spine
   spans both. Position-based selectors have silently stopped matching here
   twice already. */
.panel--left  { grid-column: 1; --panel-color: var(--team-primary, var(--team-left)); }
.panel--right { grid-column: 3; --panel-color: var(--team-primary, var(--team-right)); }

/* Paired grids share title, metric, summary, legend, and data rows. Text
   keeps its natural size and wrapping; the longest header determines both
   grid starts. This applies only while the existing layout is paired. */
@media (width > 1180px) {
  .mirror--analysis { grid-template-rows: repeat(10, auto); row-gap: 0; }
  .mirror--analysis > .panel {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5;
    row-gap: 0;
    align-self: stretch;
  }
  .mirror--analysis .panel-title { grid-row: 1; }
  .mirror--analysis .panel > .subtitle { grid-row: 2; }
  .mirror--analysis .panel-overall { grid-row: 3; }
  .mirror--analysis .panel-legend { grid-row: 4; }
  .mirror--analysis .grid, .mirror--analysis .gapmap { grid-row: 5; }
  .mirror--analysis .panel:has(.gapmap) { padding-top: var(--section-gap); }
}

.mirror-spine {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: stretch;
  background-image:
    linear-gradient(180deg, var(--rule) 0 100%),
    repeating-linear-gradient(180deg,
      transparent 0 calc(var(--hash-pitch) - var(--hash-line)),
      var(--hash-tick) calc(var(--hash-pitch) - var(--hash-line)) var(--hash-pitch));
  background-size: var(--divider-line) 100%, 100% 100%;
  background-position: 50% 0, 0 0;
  background-repeat: no-repeat, repeat-y;
}

/* A plain divider separates peers, including charts and summary tables.
   The grid-position role can compose with it without carrying hash ticks. */
.divider {
  width: 0;
  height: auto;
  align-self: stretch;
  justify-self: center;
  /* Share a border stroke instead of filling fractional-width boxes.
     Chart and table tracks place this role at different fractional positions. */
  border-left: var(--divider-line) solid var(--divider-color, var(--rule));
  background: none;
}

/* Sans, against the serif section lead above it. The two headings are
   deliberately different voices: the lead introduces, the title names a
   grid. It is an h3, so this overrides --font-head on purpose. */
.panel-title { font-family: var(--font-body); margin: 0;
               text-align: center; text-transform: capitalize; }
/* A summary groups with the title and its shared metric subtitle. */
.panel > .subtitle:has(+ .panel-overall),
.panel > .section-lead-alt:has(+ .panel-overall) { margin-bottom: var(--s5); }

/* --- the analysis grid: row labels in a column, three field zones. --- */
.grid {
  display: grid;
  grid-template-columns: max-content repeat(3, 1fr);
  gap: var(--passing-tile-gap);
}
.grid-corner { grid-column: 1; }

/* The away grid is a MIRROR: its row labels sit on the right so the two
   grids face each other across the spine. The DOM order is reversed to
   match — column heads before the corner, cells before their label —
   because grid auto-placement fills row by row, and moving the label
   track alone would drop the corner and heads into the wrong columns.
   Explicit modifier, not :last-of-type: position-based selectors break
   silently when the markup changes around them. */
.grid--labels-right {
  grid-template-columns: repeat(3, 1fr) max-content;
}
/* The corner moves with the labels. .grid-corner pins column 1 globally,
   which in the mirrored grid shifted every other item one track right. */
.grid--labels-right .grid-corner { grid-column: 4; }
.grid--labels-right .grid-rowhead {
  padding-right: 0;
  padding-left: var(--grid-label-gap);
  text-align: right;
}
/* Column heads ARE row heads, on the other axis. Identical type: same
   size, same weight, same colour, no uppercase, no added tracking. The
   two axes are told apart by position, not by treatment — giving them
   different type implied a hierarchy between rows and columns that does
   not exist. Only the layout properties differ, because only the layout
   differs. */
.grid-colhead {
  font-size: var(--t-small);
  font-weight: 600;
  text-align: center;
  padding-bottom: var(--s1);
}
.grid-rowhead {
  align-self: center;
  padding-right: var(--grid-label-gap);
  line-height: var(--lh-tight);
}
.grid-rowhead b { display: block; font-size: var(--t-small); font-weight: 600; }
.grid-rowhead span { display: block; font-size: var(--t-small); color: var(--ink-soft); }

/* --- the O-line gap map. A DIFFERENT grid from the zone matrix: seven
       gaps in one row, left end to right end, laid out as the line is.
       Same cell, different geometry — which is the point of the
       cell being the atomic unit. --- */
.gapmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--rushing-tile-gap);
}
.gapmap .grid-colhead { padding-bottom: var(--s1); }
/* Seven columns in half the width, so inline padding stays at the smallest
   step. With carries and YPC hidden, added block padding restores the
   rushing row's visual weight without increasing its horizontal footprint. */
.gapmap .cell {
  padding-block: var(--s5);
  padding-inline: var(--s1);
}
/* Supporting fields stack inside a grid cell. Stat-card annotations also
   use cell-sub, but their team-name spans belong inline in one sentence. */
.cell .cell-sub span { display: block; white-space: nowrap; }

/* Cells display EPA and rank. Supporting completion, carries, and YPC
   spans remain in the markup and can be revealed through the shared rule. */
.grid .cell-sub > span:not(.rank),
.gapmap .cell-sub > span:not(.rank) { display: none; }



/* Not part of the pill. .cell-sub span is display:block, which would drop
   "/ 32" onto its own line, so this holds the rank on one line whether the
   pill is in or out. */

/* The rank denominator uses the supporting text's inline treatment.
   Keep the compact slash form so a nowrap label cannot widen a rushing
   column or create page overflow. */
.cell-sub .rank .rank-of { display: none; }
/* The rank denominator stays in the markup but is hidden by the shared
   rule. Do not replace it with inferred data. */
.cell-sub .rank::before { content: "RANK "; }
.cell .cell-sub span + span { margin-top: var(--s1); }

/* A scheduled matchup can exist before its analysis does. Keep the complete
   grid geometry, labels, and spacing, while the unavailable Buffalo-Denver
   proof values and their colour bars stay invisible. */
body[data-analysis="empty"] .stat-card-vals,
body[data-analysis="empty"] .stat-card .cell-sub:not([data-team-copy]),
body[data-analysis="empty"] .cell-value,
body[data-analysis="empty"] .cell > .cell-sub {
  visibility: hidden;
}
body[data-analysis="empty"] .cell::before { visibility: hidden; }

/* --- THE CELL. The atomic unit. The ramp and its turf grain live on a
       top-bar layer so the structural colour remains separate from type.

       Named .cell, not .analysis-cell. A name that carries its first usage
       forecloses every other one: .cell-sub could not be the tag under a
       stat card while it was called .analysis-cell-sub, so that card grew
       an ad-hoc .stat-card-tag doing the same job under a different name.
       What makes a cell an ANALYSIS cell is the grid it sits in — chain
       .grid or .gapmap to it rather than lengthening the name. --- */
.cell {
  position: relative;
  text-align: center;
  padding: calc(var(--tile-pad-y) + var(--tile-bar-gap)) var(--tile-pad-x) var(--tile-pad-y);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--s3);
  z-index: var(--z-bg);
  background-color: var(--fill);
  background-image: var(--tile-turf);
  border-radius: var(--radius-tile);
  clip-path: polygon(
    var(--tile-bar-slash) 0,
    100% 0,
    calc(100% - var(--tile-bar-slash)) 100%,
    0 100%
  );
}
.panel--right .cell::before {
  clip-path: polygon(
    0 0,
    calc(100% - var(--tile-bar-slash)) 0,
    100% 100%,
    var(--tile-bar-slash) 100%
  );
}

/* The sub's margin is --s1 here, not --tile-value-gap: the rank sits
   immediately under the figure, and the token's 8px read as a separated
   block. (.stat-card's .cell-sub keeps the token.) */
.cell > .cell-sub {
  margin-top: var(--s1);
  opacity: initial;
}

.cell-value {
  display: block;
  white-space: nowrap;     /* a figure that breaks mid-number is not a figure */
  font-size: var(--t-body);
  line-height: var(--lh-figure);
  color: var(--ink-mid);
  /* 700, not --fig-weight-sm. The figure remains the primary reading while
     the bar, rather than the type, carries the ramp colour. */
  font-weight: 700;
  letter-spacing: var(--fig-track-value);
}
/* The decimal separator. The mono gives the point a full
   character slot and the number reads as two halves with a hole between
   them. The component wraps the separator and pulls it in; nobody authors
   this by hand. It is inline-block because margin-inline does nothing to
   an inline box's own advance.

   NOTE: .stat-strip-value .fig-sep cancels this, because those figures are
   Noto Sans Condensed — proportional, already tight. That cancellation is
   meaningless
   without this rule, so the two travel together. */
.fig-sep {
  display: inline-block;
  margin-inline: var(--fig-separator-pull);
}

/* NOTO SANS, not the mono. These lines carry decimals in plain text — "5.1
   YPC" — with no separator to wrap and pull, and monospace gives the
   point a full character slot every time. Proportional removes the
   problem at the source rather than correcting it per instance.

   The value above stays mono: it is the figure that has to align down a
   column, and its separator IS wrapped. */
.cell-sub {
  display: block;
  font-style: normal;
  margin-top: var(--tile-value-gap);
  font-family: var(--font-body);
  font-size: var(--t-micro);
  font-weight: 600;
  opacity: .85;
}

/* The EPA value and rank are one visible reading in --ink-mid. The signed
   number carries direction; --fill paints the top bar and legend chip.
   Supporting evidence stays neutral if its hiding rule is lifted. */
.cell .rank { color: var(--ink-soft); }
.r-neg-3 { --fill: var(--ramp-neg-3); --ramp-color: var(--ramp-neg-3); }
.r-neg-2 { --fill: var(--ramp-neg-2); --ramp-color: var(--ramp-neg-2); }
.r-neg-1 { --fill: var(--ramp-neg-1); --ramp-color: var(--ramp-neg-1); }
.r-mid   { --fill: var(--ramp-mid);   --ramp-color: var(--ink-mid); }
.r-pos-1 { --fill: var(--ramp-pos-1); --ramp-color: var(--ramp-pos-1); }
.r-pos-2 { --fill: var(--ramp-pos-2); --ramp-color: var(--ramp-pos-2); }
.r-pos-3 { --fill: var(--ramp-pos-3); --ramp-color: var(--ramp-pos-3); }

/* --- legend. A KEY, not content — it explains the encoding rather than
       saying anything. --- */

/* THE LEGEND, PER PANEL. It lives between the subtitle and the grid —
   the exact spot where the misreading would start — matched to the
   panel's own metric. The numbers never move: −8 to +8, −15 to +15,
   negative red to positive green on every legend. What changes by panel
   is the judgement named at each end: low EPA is favourable for defence,
   while high EPA is favourable for offence. Thresholds come from the
   content team's own legend; the neutral band around zero is the one
   addition. */
.panel-legend {
  display: flex;
  justify-content: center;
  margin: var(--s1) 0 var(--s4);
}
.panel-legend:has(+ .gapmap) {
  margin-bottom: calc(var(--s4) + var(--s1));
}

/* The end words flank the chips at chip height. Both share the same
   spacing step so the ramp keeps its labels centred. The
   strip shrink-wraps the chips so the scale below positions against
   them, not against the words. */
.legend-line { display: flex; gap: var(--s2); }
.legend-strip { display: inline-grid; gap: var(--s2); justify-items: center; }
.legend-end {
  font-size: var(--t-micro);
  font-weight: var(--fig-weight-sm);
  line-height: var(--s2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}
.legend-end:first-child { color: var(--ramp-neg-3); }
.legend-end:last-child { color: var(--ramp-pos-3); }

/* The marks are SIGNED and never move: negative to positive, left to
   right, on offence and defence legends alike. They sit at the STOP
   BOUNDARIES, not under the swatches — a number under a swatch would
   name the band, and what a reader needs is where one band ends and
   the next begins. --at carries the position. */
.legend-scale {
  position: relative;
  display: block;
  width: 100%;
  height: 1.4em;
  font-size: var(--t-micro);
  font-family: var(--font-mono);
  color: var(--ink-soft);
}
.legend-scale b {
  position: absolute;
  left: var(--at);
  transform: translateX(-50%);
  font-weight: 400;
  white-space: nowrap;
}
/* The stylesheet owns legend geometry for both page shells. Markup assigns
   each tick its position role; these remain the established scale stops. */
.legend-mark-0 { --at: 14.2857%; }
.legend-mark-1 { --at: 28.5714%; }
.legend-mark-2 { --at: 50%; }
.legend-mark-3 { --at: 71.4286%; }
.legend-mark-4 { --at: 85.7143%; }
.legend-ramp { display: flex; gap: 3px; }
.legend-ramp i { width: 30px; height: var(--s2); background: var(--fill); border-radius: 1px; }

/* Provenance. Where the numbers came from, what window, and what is
   deliberately excluded — the game being previewed.

   NO COLOUR. It INHERITS, so it takes the ink of wherever it sits; in the
   footer that is --ink, matching the rights notice, because the two answer
   the same question from two sides and neither outranks the other. This
   rule already existed and a second .provenance was added below it, which
   won on the properties it declared and lost on the ones it did not — the
   doubled-rule failure this stylesheet has already recorded once. */
.provenance {
  margin: var(--s5) auto 0;
  font-size: var(--t-small);
  max-width: 88ch;
  text-align: center;
  overflow-wrap: anywhere;
}

/* --- footer / rights notice --- */
/* White for now. That puts the footer on the INSTRUMENT side of the
   two-world rule, so it takes instrument ink — --stage-ink-soft is white
   at 66% and would be invisible here. A rule above it does the separating
   that the dark ground used to do. */
/* The footer uses the same 4% wash as table rows. Its full-width
   surface supplies the boundary; the short rule remains inside. */
.site-footer {
  background: var(--surface-tint-soft);
  color: var(--ink);
  text-align: center;
  padding-block: var(--s8);
  font-size: var(--t-small);
}
/* margin-bottom on .provenance did nothing: this selector is (0,1,1) and
   beat it. Fixed where it is caused rather than by out-specifying it. */
.site-footer p { margin: 0 auto; max-width: 88ch; }

/* Both statements in one ink. They answer the same question from two sides
   — can I trust this, of the data and of the marks — so neither outranks the
   other and the rule between them does the separating. */
/* A MARK, not a rule. A full-width line separates the two statements and
   costs the page another of the twelve it already had — and the footer's own
   top border is right above it, so it read as two rules in one block. This
   is the gesture the flap's split makes: the divider vocabulary spoken once,
   short and centred. Same 1.5px, same --hash-tick, ~4% of the ink. */
.short-rule {
  display: block;
  border: 0;
  width: 2.4em;
  height: var(--hash-line);
  background: var(--short-rule-color, var(--hash-tick));
  margin: var(--short-rule-space, var(--s6)) auto;
}

/* Wordmark lockup: name over ANALYTICS in brand red, letterspaced.
   Red on navy is 3.99:1 — display only, never small copy. This sits at
   --t-micro, so it is carried at high letterspacing and bold weight as a
   graphic mark rather than as read text. */
.nav-mark span {
  display: block;
  /* --t-small, one step up from --t-micro: two major thirds below FRANK &
     STRONG rather than three. Both ends of the lockup stay on rungs. */
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: var(--track-lockup);
  text-transform: uppercase;
  /* The wordmark uses --red-display. Keep that token distinct from the
   Instrument's brand red. */
  color: var(--red-display);
  margin-top: 4px;
}


/* THE FLAP MARKS. Team abbreviations set vertically in the flap's outer margins,
   so each half of the strip is named without a header row and without a
   prefix on all six labels. It spends HORIZONTAL room the flap already has
   — half a column each side — where a header spent 32.5px of height that
   propagated to the panel and the stage.

   aria-hidden: it is a watermark restating what the helmet, the eyebrow and
   the strip's own colour already say. A screen reader does not need it a
   fourth time.

   READING DIRECTION MIRRORS — BUF bottom-to-top, DEN top-to-bottom — so
   each faces inward toward the split.

   SEATING DOES NOT. Each content-height mark shares the flap's vertical
   midpoint plus one --s3 optical step. The helmet occupies the upper flap
   space, so the offset restores visible air above the mark. Two- and
   three-letter abbreviations still share one center instead of drifting
   because one mark has less text. */
/* The strip paints OVER the marks. An absolutely-positioned element sits
   above static siblings in the same stacking context, so without this the
   watermark would print on top of the figures it sits behind. */
.flap .wrap { position: relative; z-index: 1; }

.flap-mark {
  position: absolute;
  z-index: 0;
  /* Nearly the full flap. --t-h1 x 1.25 is one major third above the ladder's
     top reading rung — no token, because this is the only thing at this size
     and it is sized to a container rather than to the scale. */
  top: calc(50% + var(--s3));
  writing-mode: vertical-rl;
  /* Archivo, via the one rule above. It is the page's display face and this
     is display type — a mark, not a label — and at watermark scale the
     Archivo/Noto contrast is the whole point of it reading as brand rather
     than as a stray caption. */
  /* One geometric half-step down from --t-h1 x 1.25 — 1.118 is the ladder's
     own half-step, so the size stays on the scale. */
  font-size: calc(var(--t-h1) * 1.118);
  font-weight: 900;
  font-variation-settings: 'wdth' 100;
  letter-spacing: var(--track-caps);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.flap-mark--left {
  /* Placed ACROSS THE HELMET, at --flap-mark-at of its width. The helmet's
     own terms, so the mark tracks the artwork if either moves. At 0.5 it
     centres under the helmet and runs behind the strip's first figure; 0.25
     keeps it outboard of the strip in the flap's own margin. */
  left: calc(var(--helmet-w) * (var(--flap-mark-at) + var(--helmet-side)));
  translate: -50% -50%;
  transform: rotate(180deg);
  color: color-mix(in srgb, var(--team-left) 15%, transparent);
}
.flap-mark--right {
  /* Same geometry from the opposite edge. Both helmet canvases now carry
     the same outer alpha inset. */
  right: calc(var(--helmet-w) * (var(--flap-mark-at) + var(--helmet-side)));
  translate: 50% -50%;
  color: color-mix(in srgb, var(--team-right) 15%, transparent);
}

/* TEAM PAGE — shared navigation, panels, grids, cells, and legends
   remain reusable. These rules add the single-team hero, distributions,
   and tables. */
/* Secondary team color applies only to plain Instrument dividers and
   section rules. Ticked separators, table rows, summaries, and the footer
   keep their own tokens. The runtime supplies the reference color. */
.has-accent-rules .instrument { --divider-color: var(--team-secondary); }
/* The one-pixel box is an accessibility technique, not a spacing decision. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.stage--illustrated {
  --context-ink: var(--white);
  --identity-ink: var(--white);
  position: relative;
  isolation: isolate;
  /* The Team illustration supplies its own lighting. Do not add the
   Matchup photograph or its scrim to this hero. */
  background-image: none;
}
.stage-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: var(--z-bg);
}
.hero-summary {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  column-gap: var(--s7);
  row-gap: var(--s4);
  /* Content determines a secondary page's height. No minimum-height stage. */
  padding-block: var(--s5) var(--s4);
}
.identity-block { max-width: calc(var(--col) * 5 + var(--col-gap) * 4); }
.identity-lockup { display: flex; align-items: center; gap: var(--s3); }
.identity-mark { width: var(--s9); height: var(--s9); object-fit: contain; }
.identity-mark--small { width: var(--s7); height: var(--s7); flex: none; }
.identity-block > .context { margin-top: var(--s4); }
.context-end {
  align-self: end;
  justify-self: end;
  text-align: right;
}
.context-end .context { justify-content: flex-end; }
.attribution { font-size: var(--t-micro); color: var(--context-ink, var(--stage-ink-mid)); text-align: right; margin: 0; }
.attribution a { color: inherit; text-decoration: underline; }
.hero-summary > .attribution { grid-column: 1 / -1; max-width: calc(var(--col) * 6 + var(--col-gap) * 5); justify-self: end; }
.panel-overall {
  --short-rule-color: var(--panel-color);
  --short-rule-space: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: var(--s3);
  color: var(--ink-mid);
  text-align: center;
  max-width: none;
  margin: 0 0 var(--s6);
}
.separator { color: var(--ink); margin-inline: var(--s1); }
.separator.is-spaced { margin-inline: var(--s3); }
.link-group > a { display: inline-block; }
.separator.is-rule { display: inline-block; width: 0; height: 1em; border-left: var(--divider-line) solid currentColor; }
.picker-option > .separator.is-rule { color: var(--option-muted, var(--stage-ink-soft)); font-size: var(--t-micro); }
/* Pipes belong between visible options, including after a search. Keep
   the shared thin separator centered in the gap, with none at row starts. */
.picker-dropdown-list.is-separated > .picker-option { position: relative; }
.picker-dropdown-list.is-separated > .picker-option > .separator.is-rule {
  position: absolute;
  height: calc(1em + var(--s1));
  inset-inline-start: calc(var(--s2) / -2);
  inset-block-start: 50%;
  margin: 0;
  transform: translateY(-50%);
  pointer-events: none;
}
.picker-dropdown-list.is-separated:not(.picker-dropdown-list--four) > .picker-option:nth-child(2n + 1 of :not([hidden])) > .separator,
.picker-dropdown-list--four.is-separated > .picker-option:nth-child(4n + 1 of :not([hidden])) > .separator { display: none; }
.distribution-block {
  /* One hue comes from shared team identity. A quarter-strength tint keeps
     small shares visible; the data layer adds ink as their share increases. */
  --distribution-tint: color-mix(in srgb, var(--team-primary, var(--navy)) 25%, var(--surface));
}
.distribution-block .subtitle { font-family: var(--font-body); margin: 0 0 var(--s3); }
.distribution-chart {
  width: 100%;
  height: var(--s5);
  border-radius: var(--radius-tile);
  overflow: hidden;
  margin-bottom: var(--s4);
}
.distribution-base { fill: var(--distribution-tint); }
.distribution-value { fill: var(--team-primary, var(--navy)); stroke: var(--surface); stroke-width: var(--hash-line); }
.distribution { display: grid; gap: var(--s2); margin: 0; }
.distribution dt { font-size: var(--t-small); font-weight: 600; }
.distribution dd { margin: 0; font-size: var(--t-small); color: var(--ink-mid); white-space: nowrap; }
.distribution dd span { color: var(--ink-soft); }
/* Count-derived tracks use the full bar width. A column gap or intrinsic
   text minimum would move the labels away from their segment centers. */
.distribution--directions { grid-template-columns: var(--distribution-columns); column-gap: 0; }
.distribution--directions > div { text-align: center; }
.distribution--directions dd { margin-top: var(--s1); }
.distribution--bars { gap: var(--s1); }
.distribution--bars > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s2); align-items: center; text-align: left; }
.distribution--bars dt, .distribution--bars dd { font-size: var(--t-micro); }
.distribution--bars dt { font-weight: 400; }
.distribution--bars dd { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: var(--s2); align-items: center; }
.distribution--bars .distribution-chart { height: var(--s4); margin: 0; }
.distribution dd .distribution-count { color: var(--ink-mid); }
.mirror--summary { grid-template-rows: auto; }
.metric-table { --table-row-line: 1px solid var(--rule-soft); --table-header-line: 1px solid var(--rule-soft); width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.metric-table th, .metric-table td { padding: var(--s2); }
.metric-table tbody th, .metric-table tbody td { border-bottom: var(--table-row-line); }
.metric-table th { text-align: left; font-weight: 600; }
.metric-table th:first-child { padding-left: 0; }
.metric-table td:last-child, .metric-table th:last-child { padding-right: 0; }
.metric-table thead th { font-size: var(--t-micro); color: var(--navy); border-bottom: var(--table-header-line); }
.metric-table td { font-family: var(--font-mono); text-align: right; white-space: nowrap; color: var(--ink-mid); }
.metric-table thead th:not(:first-child) { text-align: right; }
.metric-table th span { display: block; font-size: var(--t-micro); font-weight: 400; color: var(--ink-soft); }
.page-status { margin-block: var(--s9); }
.status-message {
  font-size: var(--t-small);
  color: var(--ink-mid);
  font-style: italic;
  text-align: center;
  max-width: none;
}

/* Data tables compose the shared metric table; the viewport owns overflow. */
.table-viewport { overflow: auto; max-width: 100%; }
.table-tools { margin-bottom: var(--s5); }
.table-count { color: var(--ink-soft); font-size: var(--t-micro); margin: 0; }
.table-controls { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s3); }
.table-controls .search-control { flex: 1; min-width: 0; }
.split-layout {
  display: grid;
  /* The detail column keeps one Teams grid's measure. Two equal columns
     share the remaining space for controls and lookup results. */
  grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr) 0 minmax(0, calc((100% - var(--hash-track) - 2 * var(--s7)) / 2));
  gap: var(--s6);
  align-items: start;
  margin-top: var(--s7);
}
.split-layout:not(:has(> :not(.divider):not([hidden]))) { display: none; }
.split-layout > * { min-width: 0; }
.filter-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.filter-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.filter-list .select-field { width: 100%; min-width: 0; }
.filter-list .select-control { min-width: 0; }
.select-control .select-field:disabled, .search-field:disabled { cursor: default; }
.lookup-results {
  --option-ink: var(--ink-mid);
  --option-muted: var(--ink-soft);
  --option-active-ink: var(--navy);
  --picker-active: var(--surface-control);
}
.lookup-list { list-style: none; padding: 0; margin: 0; }
.lookup-list > li + li { margin-top: var(--s2); }
.lookup-list .picker-option { width: 100%; border: 0; background: transparent; text-align: left; }
.lookup-list .picker-option:hover,
.lookup-list .picker-option[aria-current] { background: var(--picker-active); }
.page-size { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-small); white-space: nowrap; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: var(--s3); margin-top: var(--s5); }
/* Compact connected pagination follows the Bootstrap/DataTables pattern.
   Navigation uses native buttons because pages update this table in place. */
.page-list { display: flex; list-style: none; padding: 0; margin: 0; }
.page-list > li { display: flex; margin: 0; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-inline-size: var(--s6);
  padding: var(--s1) var(--s2);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: var(--t-small);
  cursor: pointer;
}
.page-list > li:not(:last-child) .page-link { border-right: 0; }
.page-link .ph { font-size: var(--icon-sm); flex: none; }
.page-link[data-page-previous], .page-link[data-page-next] { inline-size: calc(var(--s9) + var(--icon-sm)); }
.page-list > li:first-child .page-link { border-radius: var(--radius-tile) 0 0 var(--radius-tile); }
.page-list > li:last-child .page-link { border-radius: 0 var(--radius-tile) var(--radius-tile) 0; }
.page-link:hover { background: var(--surface-control); }
.page-link[aria-current="page"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-link:disabled, .page-link:disabled:hover, .page-gap { background: transparent; color: var(--ink-soft); cursor: default; }
.metric-table.data-table { --table-row-line: 0; --table-header-line: 1px dashed var(--rule-2); }
.metric-table.data-table tbody tr:nth-child(even) { background: var(--surface-tint-soft); }
.metric-table.data-table th { white-space: nowrap; }
.metric-table.data-table td.is-identity { padding-left: 0; font-family: var(--font-body); font-weight: 700; text-align: left; }
/* Separate the row's player identity from its statistical columns. */
.metric-table.data-table th.is-identity,
.metric-table.data-table td.is-identity { padding-right: var(--s4); border-right: 1px dashed var(--rule-2); }
.sort-control {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sort-control::after { content: ' ↕'; }
[aria-sort="ascending"] > .sort-control::after { content: ' ↑'; }
[aria-sort="descending"] > .sort-control::after { content: ' ↓'; }

/* RESPONSIVE — shared roles follow their component definitions.
   Desktop composition is the reference. Narrow screens preserve content
   and ordering rather than clipping it. */
/* Only the wide composition seats the flap under out-of-flow helmets.
   Below 900px, the venue is the final flowing row and keeps its full gap. */
@media (width > 900px) {
  .flap { margin-top: calc(var(--s3) * -1); }
}

/* Laptop labels stay on one line. Wrapping and reserved second-line
   height apply only below the stacking boundary. */
@media (max-width: 1360px) {
  .stat-strip-label { font-size: var(--t-small); }
}

/* The mirrored product retains its established 1180 stacking boundary.
   The selector and lookup need two useful columns, not three tiny ones. */
@media (max-width: 1180px) {
  .nav { flex-wrap: wrap; gap: var(--s3); }
  .nav-context { width: 100%; min-width: 0; }
  .nav-mark { white-space: nowrap; flex: none; }
  .nav-links { width: 100%; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s5); }
  .nav-links > li { margin: 0; }
  .nav-links > li > a,
  .nav-links > li > details > summary { display: inline-flex; align-items: center; padding-block: var(--s3); }
  .nav .picker-dropdown--mega { width: 100%; }
  .picker-dropdown-list--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-dropdown-list--four.is-separated > .picker-option:nth-child(2n + 1 of :not([hidden])) > .separator { display: none; }
  .stat-strip-label { font-size: var(--t-micro); white-space: normal; min-height: 2lh; }
  .context-row { flex-wrap: wrap; gap: var(--s3) var(--s5); }
  .context-row > span { min-width: 0; max-width: 100%; }
  .mirror { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: var(--s8); }
  .panel--left, .panel--right { grid-column: 1; }
  .mirror-spine { display: none; }
  .split-layout { grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr); gap: var(--s5); }
  .split-layout > .detail-panel { grid-column: 1 / -1; width: 100%; justify-self: center;
    max-width: calc((var(--page-max) - 2 * var(--s8) - var(--hash-track) - 2 * var(--s7)) / 2); }
  .split-layout > .divider--detail { grid-column: 1 / -1; width: 100%; border-left: 0;
    border-top: var(--divider-line) solid var(--divider-color, var(--rule)); }
}

/* Below 992, the flap's flex child would shrink to its content. Let its
   block wrapper fill the width before choosing smaller stat gaps and values.
   Tablet keeps horizontal trios; phone stacks them on fixed team sides. */
@media (width < 992px) {
  .flap { display: block; }
  .stat-strip { column-gap: var(--s4); }
  .stat-strip-group { column-gap: var(--s2); }
  .stat-strip-value { font-size: var(--t-h2); }
  .flap-mark { display: none; }
  .stat-row { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .stat-row > .stat-rule { display: none; }
  .stat-row--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  /* Twelve columns need smaller gaps before the derived column goes negative. */
  :root { --col-gap: var(--s4); }
  /* Helmets lead on narrow screens. The existing identity children share
     their tracks, so each city, name and record stays under its own helmet. */
  .hero-pair { min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s2); row-gap: var(--s3); padding-bottom: var(--s6); }
  .hero-pair::before, .hero-pair::after { display: none; }
  .hero-art { position: relative; inset: auto; grid-row: 1; justify-self: center;
    width: min(100%, var(--helmet-w)); margin-bottom: calc(-.148 * var(--helmet-w)); }
  .hero-art--left { grid-column: 1; }
  .hero-art--right { grid-column: 2; }
  .identity-pair { display: contents; }
  .identity-side--left, .identity-side--right { grid-row: 2; width: 100%; justify-self: center; text-align: center; }
  .identity-side--right { grid-column: 2; }
  .identity-pair .hero-title { white-space: normal; }
  .identity-pair .display-separator { grid-column: 1 / -1; grid-row: 1; justify-self: center; z-index: 1; }
  /* The grid already supplies s3 above this row. Complete s6 above, with
     the hero's s6 padding below, so the venue has equal breathing room. */
  .identity-pair .context-row { grid-row: 3; margin-top: calc(var(--s6) - var(--s3)); }
  .hero-summary { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--s5); }
  /* A portrait crop puts supporting white copy over the building. Shade the
     lower Stage only at narrow widths; the source art and desktop stay intact. */
  .stage--illustrated::after { content: ""; position: absolute; inset: 0; z-index: var(--z-bg);
    background: linear-gradient(to bottom, transparent, var(--stage-glass)); pointer-events: none; }
  .identity-block { max-width: none; min-width: 0; }
  .hero-summary .hero-title { white-space: normal; }
  .context-end { justify-self: start; text-align: left; }
  .context-end .context { justify-content: flex-start; }
  .hero-summary > .attribution { max-width: none; justify-self: start; text-align: left; }
  .tabs { column-gap: var(--s3); max-width: 100%; }
  .tabs .button { padding-inline: var(--s4); }
}

@media (max-width: 600px) {
  .stat-strip-group { grid-template-columns: minmax(0, 1fr); row-gap: var(--s5); }
  .stat-strip-label { min-height: 0; }
  /* A stacked comparison leads with the possession's offense. The paired
     desktop columns still preserve the hero's fixed left/right identities. */
  .mirror--analysis > .panel--offense:has(.grid) { grid-row: 1; }
  .mirror--analysis > .panel--defense:has(.grid) { grid-row: 2; }
  .mirror--analysis > .panel--offense:has(.gapmap) { grid-row: 3; }
  .mirror--analysis > .panel--defense:has(.gapmap) { grid-row: 4; }
  .nav { padding-block: var(--s2); gap: var(--s1); }
  /* Equal context tracks keep the brand and schedule together even at 320.
     Their existing smaller type rung fits without wrapping the lockup. */
  .nav-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .nav-mark { font-size: var(--t-small); min-width: 0; }
  .nav-mark span { font-size: var(--t-micro); }
  .nav-links { flex-wrap: nowrap; justify-content: space-between; gap: var(--s1); }
  .nav-links > li { flex: none; min-width: max-content; justify-content: center; display: flex; }
  .nav-links > li > a,
  .nav-links > li > details > summary { font-size: var(--t-micro); letter-spacing: var(--track-button);
    min-height: calc(var(--s7) + var(--s1)); padding-block: var(--s2); white-space: nowrap; }
  .nav-links > li > details > summary { gap: var(--s1); }
  .nav-links .picker-chevron { font-size: var(--t-micro); }
  .context-picker { padding-left: var(--s4); min-width: 0; margin-left: 0; }
  .context-picker-trigger { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; }
  .context-picker-label, .context-picker-caption { white-space: nowrap; }
  .context-picker-dropdown { inset-inline-start: auto; inset-inline-end: 0;
    width: min(calc(100vw - 2 * var(--page-pad)), calc(var(--s11) * 3)); min-width: 0; }
  .picker-dropdown--mega { padding: var(--s4); }
  .picker-dropdown-list, .picker-dropdown-list--four { grid-template-columns: minmax(0, 1fr); }
  .picker-dropdown-list.is-separated > .picker-option > .separator { display: none; }
  .picker { grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding-top: var(--s4); }
  .picker-tabs { grid-column: 1; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--s9) * 2)), 1fr)); gap: var(--s4); }
  .picker-menu { grid-column: 1; }
  .picker-dropdown { width: calc(100vw - 2 * var(--page-pad)); }
  .picker-label--menu { white-space: normal; }
  .hero { padding-top: var(--s5); }
  .hero-pair { --helmet-w: calc(var(--content) * .4); }
  .identity-pair .hero-title {
    font-size: clamp(var(--t-h3), calc(var(--content) / var(--col-count)), var(--t-h1));
    white-space: nowrap;
  }
  .identity-pair .eyebrow { font-size: var(--t-small); }
  .identity-pair .summary-value { font-size: var(--t-label); }
  .display-separator { padding: var(--s1) var(--s2); }
  .context-row { gap: var(--s2) var(--s4); }
  .context-row > span { justify-content: center; text-align: center; }
  .flap { padding-top: var(--s6); }
  .instrument { padding-block: var(--s6) var(--s8); }
  .instrument.is-compact { padding-top: var(--s5); }
  .instrument--summary-first { padding-top: var(--s6); }
  .tabbar, .tabbar.is-compact { margin-block: var(--s5) var(--s6); }
  .tabs { grid-auto-flow: row; grid-auto-columns: auto; width: 100%; row-gap: var(--s2); }
  .tabs .button { justify-self: stretch; justify-content: center; }
  /* Short categories center their icon-and-label group; long view labels stack. */
  .tabs.is-compact { grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr);
    column-gap: var(--s1); overflow-x: auto; }
  .tabs.is-compact .button { gap: var(--s2); padding-inline: var(--s1); font-size: var(--t-small); }
  .grid { grid-template-columns: minmax(0, var(--s10)) repeat(3, minmax(0, 1fr)); gap: var(--s2); }
  .grid--labels-right { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, var(--s10)); }
  .grid .cell { padding-inline: var(--s1); }
  .grid-rowhead { padding-right: var(--s1); overflow-wrap: anywhere; }
  .grid--labels-right .grid-rowhead { padding-left: var(--s1); }
  .grid-rowhead b, .grid-rowhead span { font-size: var(--t-micro); }
  /* Keep all seven physical gaps in order. Scroll the map, never the page. */
  .gapmap { grid-template-columns: repeat(7, minmax(var(--s9), 1fr)); overflow-x: auto;
    overscroll-behavior-x: contain; padding-bottom: var(--s3); }
  .legend-line { width: 100%; }
  .legend-strip { flex: 1; min-width: 0; }
  .legend-ramp { width: 100%; gap: calc(var(--s1) / 2); }
  .legend-ramp i { width: auto; flex: 1; }
  .table-controls { flex-wrap: wrap; }
  .table-controls .search-control { flex-basis: 100%; }
  .page-size { margin-left: auto; }
  .pagination { flex-wrap: wrap; justify-content: center; }
  .pagination > .table-count { width: 100%; text-align: center; }
  .page-list { flex-wrap: wrap; justify-content: center; gap: var(--s1); }
  /* Direction controls stay together; the bounded number window owns its row. */
  .page-list > li:first-child, .page-list > li:last-child { order: -1;
    flex: 0 0 calc(50% - var(--s1) / 2); display: flex; }
  .page-list > li:first-child { justify-content: flex-end; }
  .page-list > li:last-child { justify-content: flex-start; }
  .page-list > li:first-child .page-link, .page-list > li:last-child .page-link { border-radius: var(--radius-tile); }
  .page-list > li:not(:last-child) .page-link { border-right: 1px solid var(--rule); }
  .page-link { min-height: var(--s7); border-radius: var(--radius-tile); }
  .split-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s5); margin-top: var(--s5); }
  .filter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-list .select-field { text-overflow: ellipsis; }
  .split-layout > .divider { grid-column: 1; width: 100%; border-left: 0;
    border-top: var(--divider-line) solid var(--divider-color, var(--rule)); }
  .site-footer { padding-block: var(--s6); }
}

/* Below 360 the five uncompressed labels cannot share the content width.
   Keep the context split intact and use two compact, balanced link rows. */
@media (max-width: 359px) {
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .nav-links > li { flex: 0 0 calc((100% - 2 * var(--s1)) / 3); }
  .nav-links > li > a,
  .nav-links > li > details > summary { min-height: var(--s6); padding-block: var(--s1); }
}
