/* PITCH26 — Results token layer (phase 1 of the results redesign).
   Loaded before results.css. Defines tokens only; nothing consumes them yet, so
   this file must stay pixel-neutral until later phases opt in one section at a time.
   Sources: results redesign spec sections 0 and 4. Every ratio was measured with
   nation-accent.js, not estimated. */

:root,
[data-theme="dark"] {
  /* ---- page contract ---- */
  --page: #0B0F1E;
  --surface: #141A2B;

  /* ---- 12 gradient recipes ---- */
  --g-hero-atmosphere: radial-gradient(110% 80% at 50% -10%, #1E2A52 0%, #141A2B 50%, #0B0F1E 100%);
  --g-award-sheen: linear-gradient(115deg, transparent 0 38%, color-mix(in oklab, var(--award-accent, #F2B705) 14%, transparent) 50%, transparent 62% 100%);
  --g-podium-gold: linear-gradient(160deg, #F6D56A 0%, #F2B705 55%, #D9A000 100%);
  --g-podium-silver: linear-gradient(160deg, #E4E6EE 0%, #B9BED0 55%, #9EA4BC 100%);
  --g-podium-bronze: linear-gradient(160deg, #E0A06A 0%, #CD7F3E 55%, #B26A2E 100%);
  --g-scoreline: linear-gradient(90deg, var(--n-accent, #F2B705) 0 calc(100% - 8px), color-mix(in oklab, var(--n-accent, #F2B705) 72%, var(--surface, #141A2B)) 100%);
  --g-bracket-connector: linear-gradient(90deg, var(--n-accent, #F2B705) 0 calc(100% - 6px), var(--ink-line) calc(100% - 6px) 100%);
  --g-section-divider: linear-gradient(90deg, #F2B705 0 48px, var(--ink-line) 48px 88%, transparent 100%);
  --g-record-plaque: linear-gradient(180deg, #1B2238 0%, #141A2B 100%);
  --g-match-header: linear-gradient(90deg, var(--home-w2, #141A2B) 0%, var(--surface, #141A2B) 38%, var(--surface, #141A2B) 62%, var(--away-w2, #141A2B) 100%);
  --g-empty: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in oklab, var(--ink-text, #F7F1E4) 6%, transparent) 10px 11px);
  --g-flag-stripe: linear-gradient(90deg, var(--n-accent, #F2B705) 0 62%, var(--n-2, #EF4360) 62% 100%);

  /* ---- podium tier edges (3:1 UI boundary on surface) ---- */
  --tier-gold-edge: #F2B705;
  --tier-silver-edge: #B9BED0;
  --tier-bronze-edge: #CD7F3E;
  --tier-gold-ink: #0B0F1E;
  --tier-silver-ink: #0B0F1E;
  --tier-bronze-ink: #0B0F1E;

  /* ---- focus ring + team-of-tournament pitch ---- */
  --focus: #F2B705;
  --pitch-a: #1E2A52;
  --pitch-b: #141A2B;
}

[data-theme="light"]:not([data-p26-locked="true"]) {
  --page: #F7F1E4;
  --surface: #FFFDF7;

  /* podium fills are metal in both themes; only the edge ring changes */
  --g-hero-atmosphere: radial-gradient(110% 80% at 50% -10%, #FFFFFF 0%, #FFFDF7 50%, #F7F1E4 100%);
  --g-award-sheen: linear-gradient(115deg, transparent 0 38%, color-mix(in oklab, var(--award-accent, #F2B705) 10%, transparent) 50%, transparent 62% 100%);
  --g-section-divider: linear-gradient(90deg, #A87A00 0 48px, var(--ink-line) 48px 88%, transparent 100%);
  --g-record-plaque: linear-gradient(180deg, #FFFDF7 0%, #F7F1E4 100%);
  --g-empty: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in oklab, var(--ink-text, #0B0F1E) 6%, transparent) 10px 11px);

  --tier-gold-edge: #B88700;
  --tier-silver-edge: #8A8FA6;
  --tier-bronze-edge: #A5622B;

  --focus: #0B0F1E;
  --pitch-a: #EFEADB;
  --pitch-b: #F7F1E4;
}

/* Decoration only. If color-mix is unsupported the sheen and hatch disappear and
   no content depends on them. */
@supports not (color: color-mix(in oklab, red, blue)) {
  :root { --g-award-sheen: none; --g-empty: none; }
}
