/* ==========================================================================
   UI2.CSS: PaceToWin visual system v2 (Sprint RD4; spec section 2 and 5; matrix V1-V7, U2)
   ==========================================================================
   Loaded ONLY by generation-2 pages (the /v2/ preview tree and race.php ?ui=2), AFTER
   css/design-system.css and css/unified-styles.css, which v2 pages keep loading because
   their content is still the v1 markup until RD5-RD7. design-system.css is never edited
   while v1 and v2 coexist (spec section 9). Section 10 is the team page (RD5), section 11
   the race and standings pages (RD6).

   How it coexists with v1:
   - Every rule is scoped to html[data-ui="2"] (set by ptw_ui2_shell()) or to a u2- class
     that only the v2 shell prints. Loaded on a v1 page by mistake, this file does nothing.
   - Section 2 (the bridge) re-points design-system.css's semantic tokens (--bg-page,
     --text-secondary, ...) at the v2 tokens, so the v1 content inside the shell follows
     the v2 palette, light mode included. :root[data-ui="2"] (0,2,0) outranks
     design-system's :root (0,1,0) whatever the load order.
   - Dark is the default. Light comes from prefers-color-scheme: light, or from
     data-theme="light" on <html> (the ptw:theme choice, set before first paint by the
     head snippet; data/ui2.js toggles it). data-theme="dark" forces dark.
   - Contrast: every text token reaches 4.5:1 on every surface of its theme
     (tools/tests/ui2-contrast.test.php computes each pair from the blocks below).
   - Motion is declared only inside prefers-reduced-motion: no-preference.
   - No !important (house rule from design-system.css).

   The three token blocks carry marker comments (@tokens dark | light | light-auto) that
   ptw_ui2_css_tokens() (api/lib/ui.php) reads; light and light-auto must stay identical.
   ========================================================================== */

/* 0. Font: Archivo variable, self-hosted (the same file design-system.css declares; the
   browser fetches it once). Declared here too so this sheet stands alone after RD10. */
@font-face {
    font-family: 'Archivo';
    src: url('/fonts/archivo-variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root[data-ui="2"] {
    --u2-font: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --u2-font-num: 'Archivo', Arial, sans-serif;
    --u2-num-stretch: 75%;

    --u2-fs-xs: 0.75rem;
    --u2-fs-sm: 0.875rem;
    --u2-fs-base: 1rem;
    --u2-fs-lg: 1.125rem;
    --u2-fs-xl: 1.25rem;
    --u2-fs-2xl: 1.5rem;
    --u2-fs-display: clamp(2rem, 5vw, 3rem);
    --u2-fs-hero-num: clamp(3rem, 8vw, 5.5rem);

    --u2-s1: 0.25rem;
    --u2-s2: 0.5rem;
    --u2-s3: 0.75rem;
    --u2-s4: 1rem;
    --u2-s6: 1.5rem;
    --u2-s8: 2rem;
    --u2-s12: 3rem;

    --u2-r-sm: 8px;
    --u2-r-md: 12px;
    --u2-r-lg: 16px;
    --u2-r-xl: 24px;
    --u2-r-pill: 9999px;

    --u2-motion-fast: 120ms;
    --u2-motion-base: 200ms;
    --u2-motion-slow: 320ms;
    --u2-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    --u2-top-h: 56px;
    --u2-tabbar-h: 60px;
}

/* @tokens dark */
:root[data-ui="2"], [data-ui="2"] [data-theme="dark"] {
    color-scheme: dark;
    --u2-bg: #0A0E14;
    --u2-sunken: #0F141C;
    --u2-surface: #10151E;
    --u2-raised: #161C26;
    --u2-line: #1F2733;
    --u2-line-2: #2A3340;
    --u2-line-3: #3A4553;
    --u2-text: #F4F6F8;
    --u2-text-2: #A6B0BE;
    --u2-caption: #8A95A5;
    --u2-action: #FB7328;
    --u2-action-hover: #E85D04;
    --u2-action-text: #FF8A4C;
    --u2-on-action: #0A0E14;
    --u2-data: #22D3EE;
    --u2-link: #22D3EE;
    --u2-up: #67E8F9;
    --u2-down: #FDA4AF;
    --u2-positive: #34D399;
    --u2-negative: #FB7185;
    --u2-warning: #FBBF24;
    --u2-expected: #A78BFA;
    --u2-focus: #22D3EE;
    --u2-bar: #0A0E14;
    --u2-tabbar: #0A0E14;
    --u2-mark-1: #3A4553;
    --u2-mark-2: #6B7686;
    --u2-mark-3: #A6B0BE;
    --u2-shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 1px 2px rgba(0, 0, 0, 0.35);
    --u2-shadow-2: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 6px 16px rgba(0, 0, 0, 0.35);
    --u2-shadow-3: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 16px 40px rgba(0, 0, 0, 0.45);
    --team-accent-safe: var(--u2-team-ink-d, var(--u2-text));
}

@media (prefers-color-scheme: light) {
    /* @tokens light-auto */
    :root[data-ui="2"]:not([data-theme="dark"]) {
        color-scheme: light;
        --u2-bg: #EEF2F6;
        --u2-sunken: #F6F8FA;
        --u2-surface: #FFFFFF;
        --u2-raised: #F6F8FA;
        --u2-line: #D9E0E8;
        --u2-line-2: #C3CCD7;
        --u2-line-3: #8A95A5;
        --u2-text: #0E141C;
        --u2-text-2: #475467;
        --u2-caption: #5B6676;
        --u2-action: #FB7328;
        --u2-action-hover: #E85D04;
        --u2-action-text: #C2410C;
        --u2-on-action: #0A0E14;
        --u2-data: #155E75;
        --u2-link: #0E7490;
        --u2-up: #155E75;
        --u2-down: #9F1239;
        --u2-positive: #065F46;
        --u2-negative: #9F1239;
        --u2-warning: #92400E;
        --u2-expected: #7C3AED;
        --u2-focus: #0E7490;
        --u2-bar: #FFFFFF;
        --u2-tabbar: #FFFFFF;
        --u2-mark-1: #C3CCD7;
        --u2-mark-2: #8A95A5;
        --u2-mark-3: #475467;
        --u2-shadow-1: 0 1px 2px rgba(14, 20, 28, 0.08);
        --u2-shadow-2: 0 6px 16px rgba(14, 20, 28, 0.10);
        --u2-shadow-3: 0 16px 40px rgba(14, 20, 28, 0.16);
        --team-accent-safe: var(--u2-team-ink-l, var(--u2-text));
    }
}

/* @tokens light */
:root[data-ui="2"][data-theme="light"], [data-ui="2"] [data-theme="light"] {
    color-scheme: light;
    --u2-bg: #EEF2F6;
    --u2-sunken: #F6F8FA;
    --u2-surface: #FFFFFF;
    --u2-raised: #F6F8FA;
    --u2-line: #D9E0E8;
    --u2-line-2: #C3CCD7;
    --u2-line-3: #8A95A5;
    --u2-text: #0E141C;
    --u2-text-2: #475467;
    --u2-caption: #5B6676;
    --u2-action: #FB7328;
    --u2-action-hover: #E85D04;
    --u2-action-text: #C2410C;
    --u2-on-action: #0A0E14;
    --u2-data: #155E75;
    --u2-link: #0E7490;
    --u2-up: #155E75;
    --u2-down: #9F1239;
    --u2-positive: #065F46;
    --u2-negative: #9F1239;
    --u2-warning: #92400E;
    --u2-expected: #7C3AED;
    --u2-focus: #0E7490;
    --u2-bar: #FFFFFF;
    --u2-tabbar: #FFFFFF;
    --u2-mark-1: #C3CCD7;
    --u2-mark-2: #8A95A5;
    --u2-mark-3: #475467;
    --u2-shadow-1: 0 1px 2px rgba(14, 20, 28, 0.08);
    --u2-shadow-2: 0 6px 16px rgba(14, 20, 28, 0.10);
    --u2-shadow-3: 0 16px 40px rgba(14, 20, 28, 0.16);
    --team-accent-safe: var(--u2-team-ink-l, var(--u2-text));
}

/* --------------------------------------------------------------------------
   2. BRIDGE: design-system.css's semantic tokens follow the v2 palette, so the
   v1 content inside the shell is legible in both themes. Re-declared on every
   [data-theme] panel because a var() resolves where it is declared.
   -------------------------------------------------------------------------- */
:root[data-ui="2"], [data-ui="2"] [data-theme] {
    --bg-page: var(--u2-bg);
    --bg-sunken: var(--u2-sunken);
    --surface: var(--u2-surface);
    --surface-raised: var(--u2-raised);
    --border: var(--u2-line-2);
    --border-strong: var(--u2-line-3);
    --text-primary: var(--u2-text);
    --text-secondary: var(--u2-text-2);
    --text-tertiary: var(--u2-caption);
    --accent: var(--u2-action);
    --accent-hover: var(--u2-action-hover);
    --accent-text: var(--u2-action-text);
    --live: var(--u2-data);
    --link: var(--u2-link);
    --info: var(--u2-data);
    --expected: var(--u2-expected);
    --positive: var(--u2-positive);
    --negative: var(--u2-negative);
    --warning: var(--u2-warning);
    --focus-ring-color: color-mix(in srgb, var(--u2-focus) 55%, transparent);
    --elev-1: var(--u2-shadow-1);
    --elev-2: var(--u2-shadow-2);
    --elev-3: var(--u2-shadow-3);
    /* V3: tables used --font-mono (Consolas on Windows); numbers are Archivo with tnum. */
    --font-mono: var(--u2-font-num);
}

/* --------------------------------------------------------------------------
   3. BASE
   -------------------------------------------------------------------------- */
html[data-ui="2"] {
    background: var(--u2-bg);
    font-variant-numeric: tabular-nums;          /* V3: every number lines up */
    scroll-padding-top: calc(var(--u2-top-h) + 8px);   /* WCAG 2.4.11: the sticky bar never hides focus */
}
html[data-ui="2"] body {
    background: var(--u2-bg);
    color: var(--u2-text);
    font-family: var(--u2-font);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
[data-ui="2"] :focus-visible {
    outline: 2px solid var(--u2-focus);
    outline-offset: 2px;
}
[data-ui="2"] .u2-start { height: 0; }
[data-ui="2"] .u2-start:focus { outline: none; }
.u2-vh {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[data-ui="2"] .u2-logo-missing { visibility: hidden; }   /* V5: a logo that failed keeps its box, never a blank chip */

/* Skip link (V4): first focusable element, visible on focus. */
.u2-skip {
    position: absolute; left: 12px; top: -200px; z-index: 3000;
    padding: 12px 16px; border-radius: var(--u2-r-md);
    background: var(--u2-action); color: var(--u2-on-action);
    font-weight: 750; text-decoration: none;
}
.u2-skip:focus { top: calc(12px + env(safe-area-inset-top)); }

/* --------------------------------------------------------------------------
   4. APP SHELL: top bar (U2)
   -------------------------------------------------------------------------- */
.u2-top {
    position: sticky; top: 0; z-index: 1000;
    background: var(--u2-bar);
    border-bottom: 1px solid var(--u2-line);
    padding-top: env(safe-area-inset-top);
}
.u2-top__in {
    display: flex; align-items: center; gap: var(--u2-s2);
    max-width: 1400px; margin-inline: auto;
    min-height: var(--u2-top-h); padding: 0 12px 0 16px;
}
.u2-brand {
    display: flex; align-items: center; gap: var(--u2-s2); min-height: 44px;
    color: var(--u2-text); text-decoration: none;
    font-weight: 800; font-size: 17px; letter-spacing: -0.01em;
}
.u2-brand__word b { color: var(--u2-action-text); font-weight: inherit; }
.u2-mark__b1 { fill: var(--u2-mark-1); }
.u2-mark__b2 { fill: var(--u2-mark-2); }
.u2-mark__b3 { fill: var(--u2-mark-3); }
.u2-mark__b4 { fill: var(--u2-action); }
.u2-seg, .u2-top__sections { display: none; }
.u2-top__grow { flex: 1 1 auto; }
.u2-search, .u2-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--u2-line-2); border-radius: var(--u2-r-md);
    background: var(--u2-surface); color: var(--u2-text);
    font: inherit; text-decoration: none; cursor: pointer;
}
.u2-iconbtn[hidden] { display: none; }
.u2-search__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.u2-ic { flex: none; }
.u2-ic__accent { stroke: var(--u2-action); }
/* The theme button shows the mode it switches TO: a sun on dark, a moon on light. */
.u2-theme .u2-ic--moon { display: none; }
:root[data-ui="2"][data-theme="light"] .u2-theme .u2-ic--sun { display: none; }
:root[data-ui="2"][data-theme="light"] .u2-theme .u2-ic--moon { display: block; }
@media (prefers-color-scheme: light) {
    :root[data-ui="2"]:not([data-theme="dark"]) .u2-theme .u2-ic--sun { display: none; }
    :root[data-ui="2"]:not([data-theme="dark"]) .u2-theme .u2-ic--moon { display: block; }
}

@media (min-width: 641px) {
    .u2-top__in { gap: var(--u2-s4); min-height: 64px; padding: 0 24px; }
    .u2-seg {
        display: flex; gap: 2px; padding: 4px;
        border: 1px solid var(--u2-line); border-radius: var(--u2-r-md); background: var(--u2-surface);
    }
    .u2-seg__item, .u2-top__link {
        display: flex; align-items: center; min-height: 36px; padding: 0 12px;
        border-radius: 9px; color: var(--u2-text-2);
        font-size: 15px; font-weight: 650; text-decoration: none;
    }
    .u2-seg__item:hover, .u2-top__link:hover { color: var(--u2-text); }
    .u2-seg__item[aria-current] { background: var(--u2-line); color: var(--u2-text); }
    .u2-top__sections { display: flex; gap: 2px; }
    .u2-top__link { min-height: 40px; }
    .u2-top__link[aria-current] { color: var(--u2-text); box-shadow: inset 0 -2px 0 var(--u2-action); border-radius: 0; }
}
@media (min-width: 1100px) {
    .u2-top__in { padding: 0 40px; min-height: 68px; }
    .u2-brand { font-size: 19px; }
    .u2-search {
        width: 260px; justify-content: flex-start; gap: 10px; padding: 0 12px;
        color: var(--u2-caption); font-size: var(--u2-fs-sm);
    }
    .u2-search__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* Breadcrumbs (U2): mirror the page's BreadcrumbList item for item. */
.u2-crumbs { max-width: 1400px; margin-inline: auto; padding: 0 16px; }
.u2-crumbs__list {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px;
    margin: 0; padding: 8px 0; list-style: none;
    font-size: 13px; color: var(--u2-caption);
}
.u2-crumbs__item + .u2-crumbs__item::before {
    content: "/";
    content: "/" / "";
    margin-right: 6px; color: var(--u2-caption);
}
.u2-crumbs__link {
    display: inline-flex; align-items: center; min-height: 24px;
    color: var(--u2-link); text-decoration: none;
}
.u2-crumbs__link:hover { text-decoration: underline; }
.u2-crumbs__link[aria-current="page"] { color: var(--u2-text-2); }
@media (min-width: 641px) { .u2-crumbs { padding: 0 32px; } }

/* Footer (V4) */
.u2-footer { margin-top: var(--u2-s12); border-top: 1px solid var(--u2-line); background: var(--u2-sunken); }
.u2-footer__in {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--u2-s2) var(--u2-s6);
    max-width: 1400px; margin-inline: auto; padding: var(--u2-s6) 16px;
}
.u2-footer__line { flex: 1 1 200px; margin: 0; color: var(--u2-caption); font-size: var(--u2-fs-sm); }
.u2-footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--u2-s4); }
.u2-footer__links a {
    display: inline-flex; align-items: center; min-height: 44px;
    color: var(--u2-text-2); font-size: var(--u2-fs-sm);
    text-decoration: underline; text-underline-offset: 3px;
}
@media (min-width: 641px) { .u2-footer__in { padding: var(--u2-s6) 32px; } }

/* --------------------------------------------------------------------------
   5. PHONE TAB BAR (U2): <= 640 px. Fixed to the bottom above the home
   indicator (safe area). One fixed bottom layer at a time: while the cookie
   banner (z-index 2000, a sibling before the bar) is showing, the bar steps
   aside, so neither covers the other and focus is never hidden behind both.
   -------------------------------------------------------------------------- */
.u2-tabbar { display: none; }
@media (max-width: 640px) {
    .u2-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
        display: flex; justify-content: space-around;
        padding: 4px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
        background: var(--u2-tabbar); border-top: 1px solid var(--u2-line);
    }
    #cookieBanner:not([hidden]) ~ .u2-tabbar { display: none; }
    html[data-ui="2"] { scroll-padding-bottom: calc(var(--u2-tabbar-h) + env(safe-area-inset-bottom) + 16px); }
    html[data-ui="2"] body { padding-bottom: calc(var(--u2-tabbar-h) + env(safe-area-inset-bottom)); }
}
.u2-tab {
    position: relative; flex: 1 1 0; min-width: 44px; min-height: 52px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--u2-text-2); font-size: 11px; font-weight: 600; text-decoration: none;
}
.u2-tab[aria-current] { color: var(--u2-action-text); font-weight: 750; }
.u2-tab[aria-current]::before {
    content: ""; position: absolute; top: -4px; left: 32%; right: 32%; height: 3px;
    border-radius: 0 0 3px 3px; background: var(--u2-action);
}
html[data-ui="2"]:has(#cookieBanner:not([hidden])) { scroll-padding-bottom: 200px; }
[data-ui="2"] .cookie-banner { padding-bottom: calc(var(--space-4, 1rem) + env(safe-area-inset-bottom)); }

/* --------------------------------------------------------------------------
   6. COMPONENTS
   -------------------------------------------------------------------------- */
/* Type */
.u2-display { margin: 0; font-size: var(--u2-fs-display); font-weight: 800; font-stretch: 85%; line-height: 1.05; letter-spacing: -0.01em; }
.u2-hero-num { font-size: var(--u2-fs-hero-num); font-weight: 850; font-stretch: 62%; line-height: 0.86; letter-spacing: -0.03em; }
.u2-h2 { margin: 0; font-size: var(--u2-fs-xl); font-weight: 750; }
.u2-caption { font-size: var(--u2-fs-xs); color: var(--u2-caption); }
.u2-num { font-family: var(--u2-font-num); font-stretch: var(--u2-num-stretch); font-variant-numeric: tabular-nums; }

/* Card */
.u2-card {
    background: var(--u2-surface); color: var(--u2-text);
    border: 1px solid var(--u2-line); border-radius: var(--u2-r-lg);
    padding: var(--u2-s4);
}
.u2-card--hero { border-radius: var(--u2-r-xl); border-top: 4px solid var(--team-primary, var(--u2-action)); padding: 20px 18px; }
.u2-card__title { margin: 0 0 var(--u2-s2); font-size: 17px; font-weight: 750; }

/* StatStrip: <dl class="u2-stats"> with three <div class="u2-stats__item"><dt>..</dt><dd>..</dd></div> */
.u2-stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0;
    background: var(--u2-surface); border: 1px solid var(--u2-line); border-radius: var(--u2-r-lg);
}
.u2-stats__item { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; }
.u2-stats__item + .u2-stats__item { border-left: 1px solid var(--u2-line); }
.u2-stats__label { font-size: var(--u2-fs-xs); color: var(--u2-caption); }
.u2-stats__value {
    margin: 0; font-family: var(--u2-font-num); font-size: 28px; font-weight: 800;
    font-stretch: var(--u2-num-stretch); line-height: 1.1;
}

/* Buttons */
.u2-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--u2-s2);
    min-height: 48px; padding: 0 18px; border: 1px solid transparent; border-radius: 14px;
    font: inherit; font-size: var(--u2-fs-base); font-weight: 750; text-decoration: none; cursor: pointer;
}
.u2-btn--primary { background: var(--u2-action); color: var(--u2-on-action); }
.u2-btn--primary:hover { background: var(--u2-action-hover); }
.u2-btn--ghost { background: transparent; color: var(--u2-text); border-color: var(--u2-line-3); }
.u2-btn--ghost:hover { background: var(--u2-raised); }

/* StatusPill (V6): glyph + words, Sprint J vocabulary (race_state()). */
.u2-pill {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
    border-radius: var(--u2-r-pill); font-size: var(--u2-fs-xs); font-weight: 700; line-height: 1.5; white-space: nowrap;
    color: var(--u2-text-2); background: color-mix(in srgb, var(--u2-caption) 18%, transparent);
}
.u2-pill__g { font-size: 0.95em; }
.u2-pill.is-clinched, .u2-pill.is-made, .u2-pill.is-champion { background: var(--u2-positive); color: var(--u2-bg); }
.u2-pill.is-holding, .u2-pill.is-alive { background: transparent; color: var(--u2-positive); box-shadow: inset 0 0 0 1.5px var(--u2-positive); }
.u2-pill.is-playin { color: var(--u2-warning); background: color-mix(in srgb, var(--u2-warning) 20%, transparent); }
.u2-pill.is-elim, .u2-pill.is-out { color: var(--u2-negative); background: color-mix(in srgb, var(--u2-negative) 16%, transparent); }

/* MoveBadge (V6): ▲ cyan up, ▼ rose down, the glyph always. */
.u2-move {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--u2-r-md);
    font-family: var(--u2-font-num); font-size: 13px; font-weight: 700; white-space: nowrap;
    color: var(--u2-text-2); background: color-mix(in srgb, var(--u2-caption) 14%, transparent);
}
.u2-move.is-up { color: var(--u2-up); background: color-mix(in srgb, var(--u2-up) 12%, transparent); }
.u2-move.is-down { color: var(--u2-down); background: color-mix(in srgb, var(--u2-down) 12%, transparent); }

/* --------------------------------------------------------------------------
   7. V1 CONTENT INSIDE THE SHELL: only the encodings V6 asks for (colour +
   glyph + text). Layout of the v1 content is RD5-RD7's job and is not touched.
   -------------------------------------------------------------------------- */
[data-ui="2"] .rz-badge:not(.is-clinched)::before { margin-right: 0.3em; }
[data-ui="2"] .rz-badge.is-made::before { content: "✓"; content: "✓" / ""; }
[data-ui="2"] .rz-badge.is-champion::before { content: "★"; content: "★" / ""; }
[data-ui="2"] .rz-badge.is-holding::before,
[data-ui="2"] .rz-badge.is-alive::before,
[data-ui="2"] .rz-badge.is-in::before { content: "●"; content: "●" / ""; }
[data-ui="2"] .rz-badge.is-chasing::before { content: "○"; content: "○" / ""; }
[data-ui="2"] .rz-badge.is-playin::before { content: "◐"; content: "◐" / ""; }
[data-ui="2"] .rz-badge.is-elim::before,
[data-ui="2"] .rz-badge.is-out::before { content: "✕"; content: "✕" / ""; }
[data-ui="2"] .rz-badge.is-missed::before { content: "–"; content: "–" / ""; }

[data-ui="2"] .rz-mv--up,
[data-ui="2"] .rz-mover.is-up .rz-mover__delta,
[data-ui="2"] .hub-mover.is-up .hub-mover__delta { color: var(--u2-up); }
[data-ui="2"] .rz-mv--down,
[data-ui="2"] .rz-mover.is-down .rz-mover__delta,
[data-ui="2"] .hub-mover.is-down .hub-mover__delta { color: var(--u2-down); }
[data-ui="2"] .rz-mover.is-up .rz-mover__delta::before,
[data-ui="2"] .hub-mover.is-up .hub-mover__delta::before { content: "▲"; content: "▲" / ""; margin-right: 0.15em; font-size: 0.7em; vertical-align: 0.15em; }
[data-ui="2"] .rz-mover.is-down .rz-mover__delta::before,
[data-ui="2"] .hub-mover.is-down .hub-mover__delta::before { content: "▼"; content: "▼" / ""; margin-right: 0.15em; font-size: 0.7em; vertical-align: 0.15em; }

/* --------------------------------------------------------------------------
   8. STYLE GUIDE (/v2/styleguide only)
   -------------------------------------------------------------------------- */
.u2-sg { display: grid; gap: var(--u2-s4); margin: var(--u2-s4) 0; }
@media (min-width: 960px) { .u2-sg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.u2-sg__panel {
    display: flex; flex-direction: column; gap: var(--u2-s6); min-width: 0;
    padding: var(--u2-s4); border: 1px solid var(--u2-line); border-radius: var(--u2-r-xl);
    background: var(--u2-bg); color: var(--u2-text);
}
.u2-sg__h { margin: 0 0 var(--u2-s2); font-size: var(--u2-fs-sm); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--u2-caption); }
.u2-sg__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--u2-s2); }
.u2-sg__swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--u2-s2); }
.u2-sg__swatch { overflow: hidden; border: 1px solid var(--u2-line); border-radius: var(--u2-r-md); background: var(--u2-surface); font-size: var(--u2-fs-xs); }
.u2-sg__chip { height: 36px; border-bottom: 1px solid var(--u2-line); }
.u2-sg__meta { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; color: var(--u2-text-2); }
.u2-sg__meta b { color: var(--u2-text); font-weight: 650; }
.u2-sg__type > * { margin: 0 0 var(--u2-s2); }
.u2-sg .u2-tabbar--demo {
    position: static; display: flex; justify-content: space-around; padding: 4px 8px;
    border: 1px solid var(--u2-line); border-radius: var(--u2-r-lg); background: var(--u2-tabbar);
}
.u2-sg .u2-crumbs { padding: 0; margin: 0; }

/* --------------------------------------------------------------------------
   10. TEAM PAGE v2 (Sprint RD5; spec 6.1, D1): tools/templates/v2/team.php.
   Phone first (390 px): identity, the headline (H1), the big number with the
   odds and the 7-day move, Share + Follow, all above the tab bar. From 1024 px
   two columns: the story on the left, the race and the schedule on the right.
   -------------------------------------------------------------------------- */
.u2-t-main {
    display: flex; flex-direction: column; gap: 12px;
    max-width: 1240px; margin: 0 auto; padding: 4px 12px 24px;
}
.u2-t-hero {
    display: flex; flex-direction: column; gap: 12px;
    background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--team-primary, var(--u2-action)) 22%, transparent), transparent 70%), var(--u2-surface);
}
.u2-t-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.u2-t-logo {
    flex: none; width: 52px; height: 52px; padding: 6px; box-sizing: border-box;
    border-radius: 14px; background: var(--u2-raised); object-fit: contain;
}
.u2-t-id__text { min-width: 0; }
.u2-t-name { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
.u2-t-sub { margin: 2px 0 0; font-size: 14px; color: var(--u2-text-2); }
.u2-t-pill { margin: 6px 0 0; }
.u2-t-h1 {
    margin: 0; font-size: clamp(1.3rem, 5.6vw, 2.1rem); line-height: 1.2; font-weight: 750;
    letter-spacing: -0.01em; text-wrap: balance;
}
.u2-t-num { font-weight: 850; }
.u2-t-lead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; }
.u2-t-big {
    margin: 0; font-family: var(--u2-font-num); font-size: clamp(4.25rem, 27vw, 8.25rem); line-height: 0.86;
    font-weight: 850; font-stretch: 62%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.u2-t-lead[data-kind="status"] .u2-t-big, .u2-t-lead[data-kind="series"] .u2-t-big { font-size: clamp(3.5rem, 18vw, 6.5rem); }
.u2-t-lead[data-kind="round"] .u2-t-big { font-size: clamp(2rem, 10vw, 3.25rem); line-height: 1; font-stretch: 75%; }
.u2-t-lead__side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1 1 140px; min-width: 0; padding-bottom: 6px; }
.u2-t-label { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.2; }
.u2-t-odds { margin: 0; font-size: 15px; font-weight: 700; color: var(--u2-data); }
.u2-t-odds[hidden], .u2-t-move[hidden], .u2-t-line[hidden] { display: none; }
.u2-t-move { margin: 0; }
.u2-t-line { margin: 0; font-size: 15px; line-height: 1.45; color: var(--u2-text-2); }
.u2-t-actions { display: flex; gap: 10px; }
.u2-t-share { flex: 1 1 auto; }
.u2-t-share .ic { width: 18px; height: 18px; }
.u2-t-follow { flex: 0 0 auto; min-width: 124px; }
.u2-t-follow[hidden] { display: none; }
.u2-t-follow .u2-ic { width: 18px; height: 18px; }
.u2-t-follow[aria-pressed="true"] { border-color: var(--u2-action); color: var(--u2-action-text); }
.u2-t-follow[aria-pressed="true"] .u2-ic { fill: currentColor; }
.u2-t-stamp { margin: 0; }

/* TrendChart (N3): start, low, peak, now. */
.u2-t-chart { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.u2-t-chart__title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--u2-caption); }
.u2-t-chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.u2-t-chart__mid { stroke: var(--u2-line-3); stroke-dasharray: 3 4; }
.u2-t-chart__axis { fill: var(--u2-caption); font-size: 11px; font-family: var(--u2-font); }
.u2-t-chart__note { fill: var(--u2-text-2); font-size: 11px; font-weight: 600; font-family: var(--u2-font); }
.u2-t-chart__area { fill: color-mix(in srgb, var(--u2-data) 10%, transparent); }
.u2-t-chart__line { fill: none; stroke: var(--u2-data); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.u2-t-chart__dot { fill: var(--u2-surface); stroke: var(--u2-text-2); stroke-width: 2; }
.u2-t-chart__now { fill: var(--u2-data); stroke: var(--u2-surface); stroke-width: 2; }
.u2-t-chart__foot { display: flex; justify-content: space-between; margin: 0; font-size: 12px; color: var(--u2-caption); }

/* Where they stand: the StatStrip (its first label is the crawlable <h2>) and the prose. */
.u2-t-stand { display: flex; flex-direction: column; gap: 10px; }
.u2-t-stand > .u2-h2, .u2-t-prose, .u2-t-links { padding: 0 4px; }
.u2-t-stats .u2-stats__label { margin: 0; font-size: var(--u2-fs-xs); font-weight: 400; color: var(--u2-caption); }
.u2-t-prose { margin: 0; font-size: 15px; line-height: 1.6; color: var(--u2-text-2); }
.u2-t-prose a { text-decoration: underline; text-underline-offset: 3px; }   /* a link inside text is not told by colour alone (axe link-in-text-block) */
.u2-t-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.u2-t-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 650; color: var(--u2-link); text-decoration: none; }
.u2-t-more:hover { text-decoration: underline; }
.u2-t-muted { margin: 0; font-size: 14px; color: var(--u2-caption); }

/* RaceSnippet (U3): the team's table around it and the playoff line. */
.u2-t-race { padding: 8px 0 6px; }
.u2-t-race .u2-t-head { padding: 0 14px; }
.u2-t-race__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.u2-t-race__table thead th { padding: 2px 6px 6px; font-size: 12px; font-weight: 600; text-align: left; color: var(--u2-caption); }
.u2-t-race__table td, .u2-t-race__table tbody th { height: 44px; padding: 0 6px; text-align: left; font-weight: 500; }
.u2-t-race__table tr > :first-child { padding-left: 14px; }
.u2-t-race__table tr > :last-child { padding-right: 14px; }
.u2-t-race__seed { width: 22px; font-size: 13px; color: var(--u2-caption); }
.u2-t-race__team a { color: var(--u2-text); text-decoration: none; }
.u2-t-race__team a:hover { text-decoration: underline; }
.u2-t-race__rec { width: 52px; color: var(--u2-text-2); }
.u2-t-race__odds { width: 104px; white-space: nowrap; }
.u2-t-race__odds b { font-weight: 700; }
.u2-t-race__gb { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--u2-caption); }
.u2-t-bar { display: inline-block; width: 52px; height: 6px; margin-right: 8px; vertical-align: middle; overflow: hidden; border-radius: 3px; background: var(--u2-line-2); }
.u2-t-bar i { display: block; height: 6px; border-radius: 3px; background: var(--u2-data); }
.u2-t-race__row.is-out { color: var(--u2-text-2); }
.u2-t-race__row.is-out .u2-t-bar i { background: var(--u2-mark-2); }
.u2-t-race__row.is-me { background: color-mix(in srgb, var(--team-primary, var(--u2-action)) 16%, transparent); box-shadow: inset 3px 0 0 var(--team-primary, var(--u2-action)); }
.u2-t-race__row.is-me a { font-weight: 750; }
.u2-t-race__line td { height: 26px; }
.u2-t-race__line span { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--u2-action-text); }
.u2-t-race__line span::before { content: ""; flex: 1 1 auto; height: 2px; background: var(--u2-action); }
.u2-t-race__line span::after { content: ""; flex: 0 0 24px; height: 2px; background: var(--u2-action); }
.u2-t-race__gap td { height: 20px; text-align: center; color: var(--u2-caption); }
.u2-t-race__note { margin: 6px 14px 2px; }

/* NextGames (U12) and the last game. */
.u2-t-games { list-style: none; margin: 8px 0 0; padding: 0; }
.u2-t-games__item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--u2-line); }
.u2-t-games__item:first-child { border-top: 0; padding-top: 0; }
.u2-t-games__when { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; }
.u2-t-games__when span { font-size: 12px; font-weight: 400; color: var(--u2-caption); }
.u2-t-games__opp { font-size: 15px; }
.u2-t-games__opp a { color: var(--u2-text); }
.u2-t-games__rec { color: var(--u2-caption); }
.u2-t-games__round { display: block; font-size: 12px; color: var(--u2-caption); }
.u2-t-last { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.u2-t-last__h { margin: 0; font-size: 12px; font-weight: 400; color: var(--u2-caption); }
.u2-t-last__text { margin: 2px 0; font-size: 16px; font-weight: 650; }

/* FAQ: collapsed, every word in the page (FAQPage JSON-LD mirrors it). */
.u2-t-faq { padding: 14px 0 0; }
.u2-t-faq > .u2-h2 { padding: 0 16px 10px; font-size: 17px; }
.u2-t-q { border-top: 1px solid var(--u2-line); }
.u2-t-q > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; cursor: pointer; list-style: none; }
.u2-t-q > summary::-webkit-details-marker { display: none; }
.u2-t-q > summary::after { content: "+"; content: "+" / ""; flex: none; font-size: 20px; color: var(--u2-caption); }
.u2-t-q[open] > summary::after { content: "–"; content: "–" / ""; }
.u2-t-q__h { margin: 0; font-size: 15px; font-weight: 600; }
.u2-t-q__a { margin: 0; padding: 0 16px 16px; line-height: 1.6; color: var(--u2-text-2); }

/* League siblings (the v1 link list, kept for the internal-link graph). */
[data-ui="2"] .u2-t-sib .team-siblings__title { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--u2-caption); }
[data-ui="2"] .u2-t-sib .team-siblings__jump { margin: 0 0 10px; font-size: 14px; }
[data-ui="2"] .u2-t-sib .team-siblings__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; margin: 0; padding: 0; list-style: none; }
[data-ui="2"] .u2-t-sib .team-siblings__list a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; }
.u2-t-links { margin: 0; font-size: 14px; line-height: 2; color: var(--u2-caption); }

@media (min-width: 1024px) {
    .u2-t-main {
        display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px 20px; align-items: start;
        grid-template-areas: "hero race" "hero next" "hero last" "stand stand" "faq faq" "sib sib" "links links";
        padding: 8px 32px 32px;
    }
    .u2-t-hero { grid-area: hero; padding: 24px; }
    .u2-t-stand { grid-area: stand; }
    .u2-t-race { grid-area: race; }
    .u2-t-next { grid-area: next; }
    .u2-t-last { grid-area: last; }
    .u2-t-faq { grid-area: faq; }
    .u2-t-sib { grid-area: sib; }
    .u2-t-links { grid-area: links; }
    .u2-t-hero:has(.u2-t-chart) {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 24px; row-gap: 12px;
        grid-template-areas: "id id" "h1 h1" "lead chart" "line chart" "act chart" "stamp stamp";
    }
    .u2-t-hero:has(.u2-t-chart) .u2-t-id { grid-area: id; }
    .u2-t-hero:has(.u2-t-chart) .u2-t-h1 { grid-area: h1; }
    .u2-t-hero:has(.u2-t-chart) .u2-t-lead { grid-area: lead; }
    .u2-t-hero:has(.u2-t-chart) .u2-t-line { grid-area: line; }
    .u2-t-hero:has(.u2-t-chart) .u2-t-actions { grid-area: act; align-self: start; }
    .u2-t-hero:has(.u2-t-chart) .u2-t-chart { grid-area: chart; align-self: end; }
    .u2-t-hero:has(.u2-t-chart) .u2-t-stamp { grid-area: stamp; }
    .u2-t-name { font-size: 26px; }
}

/* --------------------------------------------------------------------------
   11. RACE AND STANDINGS v2 (Sprint RD6b; spec 6.2, 6.3): api/lib/race2-view.php.
   Phone first (390 px, checked at 360): the headline sentence (H1), the
   cut-line ladder with one odds dot per team on a 0-100 track, two-line
   standings rows. Nothing scrolls sideways. From 1024 px the two conferences
   sit side by side and the conference switch is not needed.
   -------------------------------------------------------------------------- */
.u2-r-main {
    display: flex; flex-direction: column; gap: 14px;
    max-width: 1240px; margin: 0 auto; padding: 4px 12px 24px;
}
.u2-r-hero { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 2px; }
.u2-r-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--u2-action-text); }
.u2-r-kicker__s { color: var(--u2-caption); }
.u2-r-h1 {
    margin: 0; font-size: clamp(1.5rem, 6.4vw, 2.5rem); line-height: 1.12; font-weight: 800;
    font-stretch: 85%; letter-spacing: -0.01em; text-wrap: balance;
}
.u2-r-dek { margin: 0; font-size: 17px; line-height: 1.4; color: var(--u2-text-2); }
.u2-r-note { margin: 0; font-size: 15px; font-weight: 650; }
.u2-r-meta { margin: 0; font-size: 13px; line-height: 1.5; color: var(--u2-caption); }
.u2-r-actions { display: flex; margin-top: 4px; }
.u2-r-share { flex: 1 1 auto; }
.u2-r-share[hidden] { display: none; }
.u2-r-share .ic { width: 18px; height: 18px; }

/* The two views, the season, the conference and grouping switches, the filter chips. */
.u2-r-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.u2-r-views, .u2-r-seg {
    display: flex; gap: 4px; padding: 4px;
    border: 1px solid var(--u2-line); border-radius: 14px; background: var(--u2-surface);
}
.u2-r-views { flex: 1 1 260px; }
.u2-r-view, .u2-r-seg__b {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
    background: transparent; color: var(--u2-text-2);
    font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.u2-r-view[aria-current="page"], .u2-r-seg__b[aria-pressed="true"] { background: var(--u2-line); color: var(--u2-text); }
.u2-r-season { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--u2-caption); }
.u2-r-select {
    min-height: 44px; padding: 0 10px; border: 1px solid var(--u2-line-2); border-radius: var(--u2-r-md);
    background: var(--u2-surface); color: var(--u2-text); font: inherit; font-size: 15px;
}
.u2-r-tools { display: flex; flex-direction: column; gap: 10px; }
.u2-r-seg[hidden], .u2-r-chips[hidden], .u2-r-empty[hidden], .u2-r-morebtn[hidden], .u2-r-std[hidden] { display: none; }
.u2-r-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.u2-r-chip {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--u2-line-2); border-radius: var(--u2-r-pill);
    background: transparent; color: var(--u2-text-2);
    font: inherit; font-size: 14px; font-weight: 650; white-space: nowrap; cursor: pointer;
}
.u2-r-chip[aria-pressed="true"] { background: var(--u2-text); border-color: var(--u2-text); color: var(--u2-bg); }
.u2-r-empty { margin: 0; padding: 0 4px; }

/* The cut-line ladder (U11): place, team, record, the odds dot; the playoff line is the anchor. */
.u2-r-ladders { display: grid; gap: 14px; }
.u2-r-conf { padding: 0; overflow: hidden; }
.u2-r-conf.is-off { display: none; }
.u2-r-conf__head { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 8px; }
.u2-r-conf__line { margin: 0; font-size: 15px; line-height: 1.4; color: var(--u2-text-2); }
.u2-r-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; }
.u2-r-table th, .u2-r-table td { padding: 0 6px; text-align: left; font-weight: 500; }
.u2-r-table tr > :first-child { padding-left: 14px; }
.u2-r-table tr > :last-child { padding-right: 14px; }
.u2-r-table thead th { height: 30px; font-size: 12px; font-weight: 600; color: var(--u2-caption); }
.u2-r-table .u2-r-pos { width: 46px; }
.u2-r-table .u2-r-rec { width: 44px; color: var(--u2-text-2); white-space: nowrap; }
.u2-r-table .u2-r-odds { width: 112px; white-space: nowrap; }
.u2-r-table thead .u2-r-odds { text-align: right; }
.u2-r-table--final .u2-r-odds { width: 46%; white-space: normal; }
.u2-r-table--final .u2-pill { white-space: normal; }
.u2-r-cap th {
    height: 30px; border-top: 1px solid var(--u2-line); background: var(--u2-sunken);
    font-size: 12px; font-weight: 600; color: var(--u2-caption);
}
.u2-r-cap__unit { font-weight: 400; }
.u2-r-row > th, .u2-r-row > td { height: 48px; border-top: 1px solid var(--u2-line); }
.u2-r-table.is-folded .u2-r-row[data-fold] { display: none; }
.u2-r-seed {
    display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
    border-radius: 7px; background: var(--u2-line); font-size: 12px; font-weight: 750;
}
.u2-r-back { display: inline-flex; justify-content: center; min-width: 24px; font-size: 13px; color: var(--u2-caption); }
.u2-r-name { overflow: hidden; }
.u2-r-team { color: var(--u2-text); font-weight: 600; text-decoration: none; }
.u2-r-team:hover { text-decoration: underline; }
.u2-r-row.is-below .u2-r-team { color: var(--u2-text-2); }
.u2-r-city { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.u2-r-sub { display: block; margin-top: 2px; overflow: hidden; font-size: 12px; color: var(--u2-caption); white-space: nowrap; text-overflow: ellipsis; }
.u2-r-track { position: relative; display: inline-block; width: 56px; height: 20px; margin-right: 6px; vertical-align: middle; }
.u2-r-track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--u2-line-2); }
.u2-r-track::after { content: ""; position: absolute; left: 50%; top: 4px; width: 1px; height: 12px; background: var(--u2-line-3); }
.u2-r-dot {
    position: absolute; top: 4px; z-index: 1; width: 12px; height: 12px; margin-left: -6px;
    border-radius: 50%; background: var(--u2-data); box-shadow: 0 0 0 2px var(--u2-surface);
}
.u2-r-dot.is-long { background: var(--u2-warning); }
.u2-r-dot.is-out { background: var(--u2-mark-2); }
.u2-r-pct { display: inline-block; min-width: 38px; font-weight: 750; text-align: right; vertical-align: middle; }
.u2-r-line td { height: 34px; }
.u2-r-line__l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--u2-action-text); }
.u2-r-line__l::before { content: ""; flex: 1 1 auto; height: 3px; border-radius: 2px; background: var(--u2-action); }
.u2-r-line__l::after { content: ""; flex: 0 0 28px; height: 3px; border-radius: 2px; background: var(--u2-action); }
.u2-r-line--playin .u2-r-line__l { font-weight: 700; color: var(--u2-caption); }
.u2-r-line--playin .u2-r-line__l::before, .u2-r-line--playin .u2-r-line__l::after { height: 2px; background: var(--u2-line-3); }
.u2-r-morebtn {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px;
    border: 0; border-top: 1px solid var(--u2-line); background: transparent; color: var(--u2-link);
    font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
}
.u2-r-conf__note { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--u2-line); }

/* "Standings and odds disagree" (U6). */
.u2-r-callout {
    margin: 0 12px 12px; padding: 14px; border-radius: var(--u2-r-lg);
    border: 1px solid color-mix(in srgb, var(--u2-warning) 40%, transparent);
    background: color-mix(in srgb, var(--u2-warning) 8%, transparent);
}
.u2-r-callout__t { margin: 0 0 6px; font-size: 16px; font-weight: 750; color: var(--u2-warning); }
.u2-r-callout__p { margin: 0; font-size: 15px; line-height: 1.5; }

/* Games to watch (N4), how the race changed (S5), biggest swings, games that moved the race. */
.u2-r-more { display: grid; gap: 22px; margin-top: 8px; }
.u2-r-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.u2-r-sec > .u2-h2, .u2-r-sec__sub, .u2-r-changed__t { margin: 0; padding: 0 4px; }
.u2-r-changed__t { font-size: 16px; line-height: 1.5; }
.u2-r-games, .u2-r-chgs, .u2-r-movedlist { margin: 0; padding: 0 14px; list-style: none; }
.u2-r-game {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
    min-height: 56px; padding: 8px 0; border-top: 1px solid var(--u2-line);
}
.u2-r-game:first-child, .u2-r-chg:first-child, .u2-r-moved__g:first-child { border-top: 0; }
.u2-r-game__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.u2-r-game__round { font-size: 12px; color: var(--u2-caption); }
.u2-r-game__label { font-size: 16px; font-weight: 700; }
.u2-r-game__note { font-size: 13px; line-height: 1.4; color: var(--u2-text-2); }
.u2-r-game__when { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--u2-text-2); white-space: nowrap; }
.u2-r-game__st { font-size: 12px; font-weight: 700; color: var(--u2-caption); }
.u2-r-chg { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--u2-line); }
.u2-r-chg__team { flex: 1 1 auto; min-width: 0; color: var(--u2-text); font-weight: 600; text-decoration: none; }
.u2-r-chg__to { font-size: 14px; color: var(--u2-text-2); white-space: nowrap; }
.u2-r-swings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.u2-r-swing {
    display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box; padding: 14px;
    border: 1px solid var(--u2-line); border-radius: var(--u2-r-lg);
    background: var(--u2-surface); color: var(--u2-text); text-decoration: none;
}
.u2-r-swing__n { font-family: var(--u2-font-num); font-size: 30px; font-weight: 850; font-stretch: 70%; line-height: 1; }
.u2-r-swing.is-up .u2-r-swing__n { color: var(--u2-up); }
.u2-r-swing.is-down .u2-r-swing__n { color: var(--u2-down); }
.u2-r-swing__n > [aria-hidden] { margin-right: 3px; font-size: 0.6em; vertical-align: 0.2em; }
.u2-r-swing__t { font-weight: 700; }
.u2-r-swing__now { font-size: 13px; color: var(--u2-text-2); }
.u2-r-moved__g { padding: 12px 0; border-top: 1px solid var(--u2-line); }
.u2-r-moved__line { margin: 0 0 8px; font-size: 15px; }
.u2-r-moved__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.u2-r-tag { font-size: 12px; color: var(--u2-caption); }

/* Standings (U8): two lines per team, the record, the odds and their bar; a tap opens the trend. */
.u2-r-std { display: grid; gap: 14px; }
.u2-r-group { padding: 0; overflow: hidden; }
.u2-r-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 16px 6px; }
.u2-r-group__t { margin: 0; font-size: 17px; font-weight: 750; }
.u2-r-magic { font-size: 13px; color: var(--u2-text-2); }
.u2-r-magic.is-clinched { font-weight: 700; color: var(--u2-positive); }
.u2-r-cols, .u2-r-sum {
    display: grid; grid-template-columns: minmax(0, 1fr) var(--u2-r-wl, 58px) 76px; align-items: center; gap: 10px;
    padding: 0 16px;
}
.u2-r-cols { padding-bottom: 6px; font-size: 12px; color: var(--u2-caption); }
.u2-r-cols > :nth-child(n+2) { text-align: right; }
.u2-r-srows { margin: 0; padding: 0; list-style: none; }
.u2-r-srow { border-top: 1px solid var(--u2-line); }
.u2-r-sum { min-height: 62px; padding-top: 8px; padding-bottom: 8px; list-style: none; }
summary.u2-r-sum { cursor: pointer; }
summary.u2-r-sum::-webkit-details-marker { display: none; }
.u2-r-s1 { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.u2-r-sname { font-size: 16px; font-weight: 700; }
.u2-r-smeta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--u2-text-2); }
.u2-r-streak { font-weight: 700; }
.u2-r-streak.is-w { color: var(--u2-up); }
.u2-r-streak.is-l { color: var(--u2-down); }
.u2-r-swl { font-family: var(--u2-font-num); font-size: 24px; font-weight: 800; font-stretch: 70%; text-align: right; white-space: nowrap; }
.u2-r.league-nhl { --u2-r-wl: 74px; }
.u2-r.league-nhl .u2-r-swl { font-size: 20px; }
.u2-r-sodds { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 0; }
.u2-r-sodds__n { font-size: 16px; font-weight: 750; }
.u2-r-bar { display: block; width: 64px; height: 5px; overflow: hidden; border-radius: 3px; background: var(--u2-line-2); }
.u2-r-bar i { display: block; height: 5px; background: var(--u2-data); }
.u2-r-bar i.is-long { background: var(--u2-warning); }
.u2-r-bar i.is-out { background: var(--u2-mark-2); }
.u2-r-std--final .u2-r-cols, .u2-r-std--final .u2-r-sum { grid-template-columns: minmax(0, 1fr) var(--u2-r-wl, 58px) minmax(96px, 40%); }
.u2-r-std--final .u2-pill { white-space: normal; text-align: right; }
.u2-r-d[open] > .u2-r-sum, .u2-r-trend { background: var(--u2-raised); }
.u2-r-trend { display: flex; align-items: center; gap: 12px; padding: 4px 16px 14px; }
.u2-r-spark { flex: none; color: var(--u2-text-2); }
.u2-r-spark.is-up { color: var(--u2-up); }
.u2-r-spark.is-down { color: var(--u2-down); }
.u2-r-trend__txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.u2-r-trend__txt p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--u2-text-2); }
.u2-r-trend__go .u2-r-team { display: inline-flex; align-items: center; min-height: 44px; color: var(--u2-link); }
.u2-r-stdnote, .u2-r-source { margin: 0; padding: 0 4px; }
.u2-r-source a { text-decoration: underline; text-underline-offset: 3px; }

/* A season that is not being played, and the status words in one place. */
.u2-r-final { display: flex; flex-direction: column; gap: 8px; }
.u2-r-final__p, .u2-r-final__now { margin: 0; font-size: 15px; line-height: 1.5; color: var(--u2-text-2); }
.u2-r-final__now { display: flex; flex-direction: column; }
.u2-r-livelink { display: block; padding: 11px 0; color: var(--u2-link); }
.u2-r-legend { display: grid; gap: 8px; margin: 0; padding: 0 4px; list-style: none; font-size: 13px; line-height: 1.6; color: var(--u2-text-2); }

@media (min-width: 641px) {
    .u2-r-main { gap: 18px; padding: 8px 24px 32px; }
    .u2-r-share { flex: 0 0 auto; }
    .u2-r-views { flex: 0 1 360px; }
    .u2-r-city { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .u2-r-swings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .u2-r-table .u2-r-odds { width: 176px; }
    .u2-r-track { width: 112px; }
    .u2-r-table .u2-r-rec { width: 56px; }
}
@media (min-width: 1024px) {
    .u2-r-main { padding: 12px 32px 40px; }
    .u2-r-hero { max-width: 900px; }
    .u2-r-ladders, .u2-r-more, .u2-r-std { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .u2-r-more { gap: 24px 20px; }
    .u2-r-std[data-u2r-mode="league"] { grid-template-columns: minmax(0, 720px); }
    .u2-r-conf.is-off { display: block; }
    .u2-r-seg--conf { display: none; }
    .u2-r-tools { flex-direction: row; align-items: center; }
    .u2-r-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   9. MOTION (V7): only when the visitor has not asked for less.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    [data-ui="2"] .u2-top { view-transition-name: u2-top; }
    [data-ui="2"] .u2-tabbar { view-transition-name: u2-tabbar; }
    ::view-transition-group(root) { animation-duration: var(--u2-motion-base); animation-timing-function: var(--u2-ease); }
    .u2-tab, .u2-seg__item, .u2-top__link, .u2-btn, .u2-iconbtn, .u2-search, .u2-crumbs__link,
    .u2-r-view, .u2-r-seg__b, .u2-r-chip {
        transition: color var(--u2-motion-fast) var(--u2-ease), background-color var(--u2-motion-fast) var(--u2-ease),
                    box-shadow var(--u2-motion-fast) var(--u2-ease);
    }
}
