/* ============================================================================
   DimeClip — Broadcast OS Widget Set
   Self-contained stylesheet. Vanilla CSS, no framework, no build step.
   Single electric-green accent. Blue / violet / gold are SEMANTIC only.
   Award-grade pass: layered light, crafted borders, tabular type, ≤200ms
   GPU-friendly micro-interactions, all reduced-motion safe.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:        #07090D;
  --bg2:       #0C0D10;
  --surface:   #0E1116;
  --surface2:  #14181F;
  --surface3:  #181E27;
  --border:    #1E2127;
  --border2:   #2A323E;

  /* Text */
  --text0: #FBFBF9;
  --text1: #C2C8D0;
  --text2: #9AA2AC;
  --text3: #8C95A1;
  --text4: #868F9D;

  /* Accent (the ONE accent) */
  --accent:      #2BE08C;
  --accent-hi:   #3DED9B;
  --accent-weak: #16201B;
  --accent-ring: rgba(43, 224, 140, 0.32);
  --accent-glow: rgba(43, 224, 140, 0.16);
  --on-accent:   #08140E;

  /* Semantic */
  --info:   #4DA3FF;
  --violet: #A78BFA;
  --warn:   #F5B23D;   /* alias */
  --gold:   #F5B23D;   /* player GRADE badges + MVP star ONLY */
  --gold-weak: #221C0E;
  --danger: #FF6B6B;
  --danger-weak: #241317;
  --info-weak: #0E1A28;
  --violet-weak: #1A1626;

  /* Type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Geometry */
  --radius:      16px;
  --radius-sm:   12px;
  --radius-pill: 999px;

  /* Light & depth ---------------------------------------------------------- */
  /* A crafted 1px border that reads as brushed metal: a hairline highlight on
     top blending to shadow at the base. Used via mask compositing where it
     can; falls back gracefully to plain --border elsewhere. */
  --hairline:   rgba(255, 255, 255, 0.06);
  --hairline-2: rgba(255, 255, 255, 0.10);

  /* Effects */
  --shadow: 0 1px 0 rgba(255,255,255,0.02),
            0 18px 40px -24px rgba(0, 0, 0, 0.85),
            0 2px 8px -2px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 1px 0 rgba(255,255,255,0.04),
                 0 28px 60px -28px rgba(0, 0, 0, 0.9),
                 0 6px 18px -8px rgba(0, 0, 0, 0.7);
  --glass:  inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --ring:   0 0 0 3px var(--accent-ring);

  /* Motion */
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:  120ms;
  --t-med:   180ms;
}

/* ---- Reset-ish ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(43,224,140,0.05), transparent 60%),
    radial-gradient(100% 60% at 100% 0%, rgba(77,163,255,0.025), transparent 55%),
    radial-gradient(100% 60% at 50% 110%, rgba(0,0,0,0.5), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------------------------------
   PERFECT CIRCLES (anti-oval hardening)
   Every round element shares one contract: a 1:1 box that a flex/grid parent
   can never stretch on the cross axis. aspect-ratio keeps W==H even when only
   one dimension is sized (e.g. a 1fr grid column or a stretched flex child),
   flex:none opts the element out of cross-axis stretch, and the explicit
   place-self centers it instead of letting `align-items:stretch` deform it.
   Round images additionally cover their box so the photo itself stays circular.
   -------------------------------------------------------------------------- */
.avatar,
.donut,
.ring .gauge,
.status-dot,
.sdot,
.spk-now-dot,
.pulse,
.recdot,
.syn-jersey,
.syn-more {
  aspect-ratio: 1 / 1;
  flex: none;
  place-self: center;
}
.avatar .avatar-img { object-fit: cover; }

/* ============================================================================
   CARD PRIMITIVE
   ========================================================================== */
.card {
  position: relative;
  background:
    radial-gradient(130% 90% at 50% -20%, #1A1F28, transparent 55%),
    linear-gradient(168deg, #161B22, #0C0F14 78%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glass);
  padding: 18px;
  transition: transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
/* Soft glass hairline along the very top edge — the "lit" crown of the card. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--hairline-2), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: .9;
}

/* Mono section eyebrow with a green accent tick */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text2);
}
.eyebrow::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 10px -1px var(--accent-ring);
}
.eyebrow .ghost { color: var(--text3); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-head .link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--info);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(77,163,255,.4);
  transition: color var(--t-fast) var(--ease);
}
.card-head .link:hover { color: var(--accent); }

.icon-chip {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--surface3), var(--surface2));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--hairline);
  color: var(--accent);
  flex: none;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.icon-chip svg { width: 18px; height: 18px; }
.icon-chip.tint-info   { color: var(--info);   border-color: rgba(77,163,255,.22); background: var(--info-weak); }
.icon-chip.tint-violet { color: var(--violet); border-color: rgba(167,139,250,.22); background: var(--violet-weak); }
.icon-chip.tint-accent { color: var(--accent); border-color: rgba(43,224,140,.2);  background: var(--accent-weak); }

/* ============================================================================
   1. KPI METRIC CARD
   ========================================================================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.kpi {
  padding: 16px;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  opacity: .85;
  box-shadow: 0 0 14px -2px var(--accent-ring);
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--border2);
  box-shadow: var(--shadow-lift), var(--glass);
}
.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.kpi-value {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: var(--text0);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-value .unit {
  font-size: 18px;
  font-weight: 800;
  color: var(--text3);
  margin-left: 2px;
  align-self: flex-start;
  letter-spacing: 0;
}
.kpi-sub {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text2);
}
.kpi-sub b { color: var(--text1); font-weight: 600; }

.delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 22px;
  line-height: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.delta.up   { color: var(--accent); background: var(--accent-weak); border-color: rgba(43,224,140,.22); }
.delta.down { color: var(--danger); background: var(--danger-weak); border-color: rgba(255,107,107,.22); }
.delta.flat { color: var(--text2); background: var(--surface3); border-color: var(--border2); box-shadow: inset 0 1px 0 var(--hairline); }
.delta:not(:has(svg)) { gap: 0; }
.delta svg  { width: 12px; height: 12px; }

/* ============================================================================
   2. SPARKLINE TREND CARD  (.spk-* redesign — reference band + latest emphasis)
   ========================================================================== */
.spark-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.spark-card { transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.spark-card:hover {
  transform: translateY(-2px);
  border-color: var(--border2);
  box-shadow: var(--shadow-lift), var(--glass);
}

/* Header: metric label + delta chip on the right */
.spk-card .spk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.spk-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border: 1px solid transparent;
}
.spk-chip.up   { color: var(--accent); background: var(--accent-weak);  border-color: var(--accent-ring); }
.spk-chip.down { color: var(--danger); background: var(--danger-weak);  border-color: rgba(255,107,107,0.30); }
.spk-chip.flat { color: var(--text3); background: var(--surface2);      border-color: var(--border); }
.spk-chip-cap  { font-weight: 600; opacity: 0.65; font-size: 9.5px; }

/* Big current value */
.spk-card .spk-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1;
  color: var(--text0);
  margin: 11px 0 9px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.spk-card .spk-unit {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.04em;
}

/* Chart */
.spk-plot { position: relative; }
.spk-svg  { width: 100%; height: 52px; display: block; overflow: visible; }

.spk-band { fill: var(--text4); opacity: 0.05; }
.spk-base {
  stroke: var(--text4);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.28;
  vector-effect: non-scaling-stroke;
}
/* PER-METRIC HUE: every spark card carries its own --spk / --spk-hi so color
   encodes WHICH stat it is (Points=green, Opp Points=coral, Margin=signed,
   Rebounds=blue) rather than a single decorative green. Defaults fall back to
   the up/down semantic colors when a card doesn't set a hue. The area is a
   flat low-opacity wash of the same hue (no shared gradient <defs> needed). */
/* Hue defaults live on the card so the SVG line AND the footer dot inherit one
   value; JS sets --spk / --spk-hi per metric. Direction (.spk-up/.spk-down) is
   reserved for the arrow + chip, NOT the color, so a fixed-hue metric (Points,
   Opp Points, Rebounds) keeps its identity color whichever way it trends. */
.spk-card { --spk: var(--accent); --spk-hi: var(--accent-hi); }
.spk-area { stroke: none; fill: var(--spk); opacity: 0.12; }

.spk-line {
  fill: none;
  stroke: var(--spk);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 6px color-mix(in srgb, var(--spk) 22%, transparent));
}

/* Emphasized latest point — fill-box keeps the pop centered on the dot, not
   the document origin (SVG transforms default to the user-space origin). */
.spk-end-halo, .spk-end-core { transform-box: fill-box; transform-origin: center; }
.spk-end-halo { opacity: 0.22; fill: var(--spk); }
.spk-end-core {
  stroke: var(--bg2); stroke-width: 1.25;
  fill: var(--spk-hi);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--spk) 40%, transparent));
}

/* Footer: latest callout + range legend */
.spk-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.spk-foot-now { display: inline-flex; align-items: center; gap: 5px; color: var(--text2); }
.spk-foot-now b { color: var(--text0); font-weight: 800; }
.spk-foot-now.muted { color: var(--text3); font-weight: 600; }
.spk-now-dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; flex: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.04);
  background: var(--spk-hi, var(--accent-hi));
}
.spk-now-dot.up   { background: var(--spk-hi, var(--accent-hi)); }
.spk-now-dot.down { background: var(--spk, var(--danger)); }
.spk-now-dot.flat { background: var(--text3); }
.spk-foot-rng { color: var(--text3); }
.spk-empty .spk-foot { justify-content: flex-start; }

/* Motion (reduced-motion safe) */
@media (prefers-reduced-motion: no-preference) {
  .spk-line {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: dc-draw-line .8s var(--ease-out) .1s both;
  }
  .spk-area { animation: dc-fade-in .5s var(--ease-out) both; }
  .spk-band, .spk-base { animation: dc-fade-in .5s var(--ease-out) both; }
  .spk-end-halo, .spk-end-core {
    opacity: 0;
    animation: dc-pop-dot .35s var(--ease-out) .72s both;
  }
  .spk-end-halo { animation-name: dc-pop-halo; }
}
@keyframes dc-draw-line { to { stroke-dashoffset: 0; } }
@keyframes dc-fade-in   { from { opacity: 0; } }
@keyframes dc-pop-dot   { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes dc-pop-halo  { from { opacity: 0; transform: scale(0.4); } to { opacity: 0.22; transform: scale(1); } }

/* ============================================================================
   3. WIN-RATE DONUT / GAUGE
   ========================================================================== */
/* Animatable conic angle drivers — registered so the sweep can fill on load. */
@property --pct { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --val { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes dc-fill-pct { from { --pct: 0; } }
@keyframes dc-fill-val { from { --val: 0; } }

.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
}
.donut {
  --pct: 64;
  position: relative;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg,
      var(--accent) 0,
      var(--accent-hi) calc(var(--pct) * 0.92%),
      #6BFFC0 calc(var(--pct) * 1%),
      #161B22 0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03);
  filter: drop-shadow(0 0 24px var(--accent-glow));
}
.donut::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(120% 130% at 50% -10%, #1B2230, var(--surface) 72%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--hairline);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 30px -10px var(--accent-ring);
}
.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}
.donut-center .pct {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 42px;
  line-height: 1;
  color: var(--text0);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.donut-center .cap {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 3px;
}
.donut-record {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text2);
}

/* ============================================================================
   4. SHOOTING STAT RINGS (FG / 3PT / FT / eFG)
   ========================================================================== */
.statrings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  /* Semantic per-metric hue so the four rings read as DISTINCT stats, not one
     green blur. FG%=gold (efficiency), 3PT=violet (advanced), FT=info-blue
     (secondary), eFG=accent-green (the headline rate). The unfilled remainder
     is a NEUTRAL gray track — gray = context, color = the value. */
  --rc: var(--accent); --rc-hi: var(--accent-hi); --rc-glow: var(--accent-ring);
}
.statrings .ring:nth-child(1) { --rc: var(--gold);   --rc-hi: #FFC966; --rc-glow: rgba(245,178,61,.4); }
.statrings .ring:nth-child(2) { --rc: var(--violet); --rc-hi: #C4B0FF; --rc-glow: rgba(167,139,250,.4); }
.statrings .ring:nth-child(3) { --rc: var(--info);   --rc-hi: #7CC0FF; --rc-glow: rgba(77,163,255,.4); }
.statrings .ring:nth-child(4) { --rc: var(--accent); --rc-hi: var(--accent-hi); --rc-glow: var(--accent-ring); }
.ring .gauge {
  --val: 50;
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(from -90deg,
    var(--rc) 0,
    var(--rc-hi) calc(var(--val) * 0.92%),
    var(--rc-hi) calc(var(--val) * 1%),
    #161B22 0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.03);
  transition: filter var(--t-med) var(--ease);
}
.ring:hover .gauge { filter: drop-shadow(0 0 12px var(--rc-glow)); }
.ring .gauge::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(120% 130% at 50% -10%, #1B2230, var(--surface) 72%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--hairline);
}
.ring .gauge .gv {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text0);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.ring .rlabel {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

/* Sweep the conic fill up from zero on first paint. */
@media (prefers-reduced-motion: no-preference) {
  .donut { animation: dc-fill-pct .9s var(--ease-out) both; }
  .ring .gauge {
    animation: dc-fill-val .7s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
}

/* ============================================================================
   5. LEADER / SEASON-MVP CARD  +  AVATAR SYSTEM
   ========================================================================== */
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--surface3), var(--surface2));
  border: 1px solid var(--border2);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05),
    0 2px 6px -2px rgba(0,0,0,.7),
    inset 0 1px 0 var(--hairline-2),
    inset 0 -6px 14px -8px rgba(0,0,0,.6);
  color: var(--text1);
  font-family: var(--font-display);
  font-weight: 800;
  flex: none;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.avatar.a32 { width: 32px; height: 32px; font-size: 12px; }
.avatar.a40 { width: 40px; height: 40px; font-size: 14px; }
.avatar.a48 { width: 48px; height: 48px; font-size: 16px; }
.avatar.a56 { width: 56px; height: 56px; font-size: 19px; }

/* Image covers the initials when it loads; removed on error → initials show. */
.avatar .avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
  border-radius: inherit;
  background: var(--surface2);
  z-index: 1;
}
/* Universal inset rim-light so photos don't read as flat pasted thumbnails. */
.avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  z-index: 3;
  pointer-events: none;
}
/* Initials fallback — always present underneath, crisp + slightly tinted. */
.avatar .avatar-fb {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  letter-spacing: 0.01em;
  color: var(--text1);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.04), transparent 60%);
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
  user-select: none;
}

/* Premium accent ring for the MVP / featured headshot. */
.avatar.ring-accent {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px var(--accent-weak),
    0 0 0 1px var(--accent) inset,
    0 0 18px -4px var(--accent-ring),
    inset 0 1px 0 var(--hairline-2);
}
.avatar.ring-accent::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--accent-hi), var(--accent) 40%, transparent 70%, var(--accent-hi));
  opacity: .35;
  z-index: -1;
  filter: blur(4px);
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .avatar.ring-accent::after { animation: dc-spin-ring 6s linear infinite; }
}
@keyframes dc-spin-ring { to { transform: rotate(360deg); } }
.avail-row:hover .avatar { border-color: var(--border2); }

/* Availability status dot riding the avatar's lower-right. */
.avatar .status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 30%;
  height: 30%;
  min-width: 9px;
  min-height: 9px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  z-index: 2;
  background: var(--text3);
}
.avatar .status-dot.active { background: var(--accent); box-shadow: 0 0 7px -1px var(--accent); }
.avatar .status-dot.quest,
.avatar .status-dot.questionable { background: var(--gold); box-shadow: 0 0 7px -1px var(--gold); }
.avatar .status-dot.out { background: var(--danger); box-shadow: 0 0 7px -1px var(--danger); }

.leader {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.leader-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.leader-role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
}
.leader-role.mvp { color: var(--gold); }
.leader-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text0);
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.star {
  color: var(--gold);
  width: 16px; height: 16px;
  flex: none;
  filter: drop-shadow(0 0 6px rgba(245,178,61,.45));
}
.statline {
  display: flex;
  gap: 10px;
}
.stat-pill {
  flex: 1;
  background: linear-gradient(165deg, var(--surface3), var(--surface2));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.stat-pill:hover { border-color: var(--border2); transform: translateY(-1px); }
.stat-pill .sv {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--text0);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-pill .sl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 6px;
}
.mvp-wash {
  background:
    radial-gradient(120% 90% at 0% 0%, var(--accent-weak), transparent 55%),
    radial-gradient(90% 70% at 100% 0%, rgba(245,178,61,.05), transparent 50%),
    linear-gradient(168deg, var(--surface2), var(--surface) 64%);
}

/* ============================================================================
   6. LINEUP SYNERGY — a CALM, scannable RANKED LIST (best → worst net rating)
   One organizing principle: lineups sorted top-to-bottom by net rating. No
   summary strip, no group headers — generous whitespace, readable at a glance.
   Player identity is RESPONSIVE + HONEST: a real photo (premium) takes
   precedence at every width; desktop shows a small initials circle + the full
   LAST NAME; mobile collapses to a compact 3-letter last-name code circle.
   ========================================================================== */
.synergy { display: flex; flex-direction: column; gap: 10px; }

/* --- Card header: eyebrow + explicit metric so the number has meaning ----- */
.syn-cardhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--hairline);
}
.syn-metric {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);   /* AA on the card surface */
  white-space: nowrap;
}

/* --- Row: [rank] · [players + value over a net bar]. Calm, generous, the
   whole card breathes. Best/worst get the LIGHTEST accent/danger tint. ----- */
.syn-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(168deg, rgba(255,255,255,0.015), transparent 70%);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.syn-row:hover { border-color: var(--border2); }

/* Rank chip — a quiet ordinal so the list reads as an explicit ranking. */
.syn-rank {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 var(--hairline);
}

/* Best lineup: the lightest accent wash + accent rank chip. */
.syn-row.is-best {
  border-color: rgba(43,224,140,0.26);
  background:
    radial-gradient(140% 160% at 0% 50%, rgba(43,224,140,0.06), transparent 52%),
    linear-gradient(168deg, rgba(43,224,140,0.035), transparent 64%);
}
.syn-row.is-best .syn-rank {
  color: var(--accent-hi);
  background: var(--accent-weak);
  border-color: rgba(43,224,140,0.4);
}
/* Worst lineup mirror: a soft red wash so the floor reads as clearly as the top. */
.syn-row.is-worst {
  border-color: rgba(255,107,107,0.22);
  background:
    radial-gradient(140% 160% at 0% 50%, rgba(255,107,107,0.05), transparent 52%),
    linear-gradient(168deg, rgba(255,107,107,0.03), transparent 64%);
}
.syn-row.is-worst .syn-rank {
  color: #ff9d9d;
  border-color: rgba(255,107,107,0.30);
}

.syn-body { min-width: 0; display: flex; flex-direction: column; gap: 9px; }

/* Top line: the five player identities (left) and the big +/- value (right). */
.syn-toprow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-width: 0;
}

/* --- The lineup: a readable row of players. DESKTOP = circle + full last name.
   The row wraps to a second line only on the very narrowest desktop columns. */
.syn-lineup {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 14px; min-width: 0;
}
.syn-pl {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
}
.syn-pl-face {
  position: relative; flex: none; overflow: hidden;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-family: var(--font-display); font-weight: 800;
  font-size: 10px; line-height: 1; letter-spacing: 0.01em;
  color: var(--text1);
  background: radial-gradient(120% 120% at 50% 14%, var(--surface3), var(--surface2) 78%);
  border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 var(--hairline-2);
}
.syn-pl-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; z-index: 1;
}
/* Toggle initials (desktop) vs 3-letter code (mobile); a photo overlays both. */
.syn-pl-ini  { position: relative; z-index: 0; }
.syn-pl-code { position: relative; z-index: 0; display: none; }
.syn-pl-name {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  color: var(--text1); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 16ch;
}
.syn-pl-more .syn-pl-face {
  width: auto; min-width: 26px; padding: 0 7px; border-radius: 999px;
  font-size: 11px; color: var(--text2);
}
/* Best/worst rows tint their identity circles to match the row. */
.syn-row.is-best .syn-pl-face {
  border-color: rgba(43,224,140,0.32);
  background: radial-gradient(120% 120% at 50% 14%, #16271E, #0F1D17 82%);
  color: var(--accent-hi);
}
.syn-row.is-worst .syn-pl-face { border-color: rgba(255,107,107,0.28); }

/* --- Value: big tabular +/- with a small "/100" unit -------------------- */
.syn-val {
  display: flex; align-items: baseline; gap: 3px;
  flex: none; min-width: 56px; justify-content: flex-end;
}
.syn-num {
  font-family: var(--font-display); font-weight: 800; font-size: 23px;
  line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.syn-unit {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--text3);
}
.syn-val.pos .syn-num { color: var(--accent); }
.syn-val.neg .syn-num { color: var(--danger); }

/* --- Meta line: a proportional net bar with optional Best/Worst tag + size. */
.syn-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.syn-bar { flex: 1 1 auto; min-width: 0; }
.syn-track {
  position: relative;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.55);
  overflow: hidden;
}
.syn-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  border-radius: var(--radius-pill);
  transition: width 720ms var(--ease-out);
  transition-delay: calc(var(--row, 0) * 55ms);
}
.syn-fill.pos {
  background: linear-gradient(90deg, rgba(43,224,140,.7), var(--accent-hi));
  box-shadow: 0 0 10px -3px var(--accent-ring);
}
.syn-fill.neg {
  background: linear-gradient(90deg, rgba(255,107,107,.7), #ff8d8d);
  box-shadow: 0 0 10px -3px rgba(255,107,107,.3);
}
/* Bright leading edge so the fill reads as freshly drawn. */
.syn-fill::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 5px; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45));
}

.syn-tags { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.syn-ctx {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text2);   /* AA on the card surface */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.syn-dot { color: var(--text4); margin: 0 1px; }
.syn-tag {
  flex: none;
  display: inline-flex; align-items: center;
  height: 16px; padding: 0 7px;
  border-radius: 999px;
  background: var(--accent-weak);
  border: 1px solid rgba(43,224,140,0.35);
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-hi);
}
.syn-tag.neg {
  background: var(--danger-weak);
  border-color: rgba(255,107,107,0.32);
  color: #ff9d9d;
}

/* --- RESPONSIVE IDENTITY: below 960px collapse each player to a compact
   3-letter last-name code circle and HIDE the full name; a photo still
   overlays the circle. The lineup becomes a tidy row of code circles. ------ */
@media (max-width: 960px) {
  .syn-lineup { gap: 5px; }
  .syn-pl { gap: 0; }
  .syn-pl-name { display: none; }
  .syn-pl-ini  { display: none; }
  .syn-pl-code { display: block; }
  .syn-pl-face { width: 30px; height: 30px; font-size: 10.5px; }
  .syn-pl + .syn-pl { margin-left: -4px; }
  .syn-pl-face { box-shadow: 0 0 0 2px var(--surface), inset 0 1px 0 var(--hairline-2); }
}

/* ============================================================================
   7. RECENT FORM — result + score + opponent tiles (newest-first)
   ========================================================================== */
.rf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rf-head-right { display: inline-flex; align-items: center; gap: 8px; }

.rf-streak {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.rf-streak.rf-up   { color: var(--accent); background: var(--accent-weak); border-color: rgba(43,224,140,.3); box-shadow: 0 0 12px -5px var(--accent-ring); }
.rf-streak.rf-down { color: var(--danger); background: var(--danger-weak); border-color: rgba(255,107,107,.28); }

.rf-record {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text2);
  font-variant-numeric: tabular-nums;
}

.rf-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rf-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--hairline);
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.rf-row:hover { transform: translateX(2px); border-color: var(--border2); background: var(--surface3); }

/* Accent edge keys the result; green win / red loss / neutral tie. */
.rf-edge {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.rf-row.win  .rf-edge  { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 10px -2px var(--accent-ring); }
.rf-row.loss .rf-edge  { background: linear-gradient(180deg, #ff8d8d, var(--danger)); }
.rf-row.tie  .rf-edge  { background: var(--text4); }
.rf-row.na   .rf-edge  { background: var(--border2); }

/* W / L / T badge */
.rf-badge {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  border-radius: 7px;
  border: 1px solid transparent;
}
.rf-row.win  .rf-badge { color: var(--accent); background: var(--accent-weak); border-color: rgba(43,224,140,.3); }
.rf-row.loss .rf-badge { color: var(--danger); background: var(--danger-weak); border-color: rgba(255,107,107,.28); }
.rf-row.tie  .rf-badge { color: var(--text2); background: var(--surface3); border-color: var(--border2); }
.rf-row.na   .rf-badge { color: var(--text4); background: var(--surface3); }

/* Scoreline — tabular, our score leads in white, theirs muted */
.rf-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rf-score .rf-us   { color: var(--text0); }
.rf-score .rf-them { color: var(--text3); }
.rf-score .rf-dash { color: var(--text4); margin: 0 3px; font-weight: 600; }
.rf-row.loss .rf-score .rf-us   { color: var(--text2); }
.rf-row.loss .rf-score .rf-them { color: var(--text0); }
.rf-score-na { color: var(--text4); letter-spacing: 0.1em; }

/* Opponent */
.rf-opp { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.rf-vs {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text3);   /* AA margin at 10px */
  text-transform: lowercase;
}
.rf-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--text1);
}

/* Margin chip (signed) — quiet, right-aligned */
.rf-margin {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  justify-self: end;
}
.rf-row.win  .rf-margin { color: var(--accent); }
.rf-row.loss .rf-margin { color: var(--danger); opacity: .85; }

/* "LAST" tag on the newest tile */
.rf-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text3);   /* AA margin at 9px */
  border: 1px solid var(--border2);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  justify-self: end;
}

/* Newest tile emphasis — lifted surface, brighter hairline */
.rf-row.is-new {
  background: linear-gradient(180deg, var(--surface3), var(--surface2));
  border-color: var(--border2);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hairline-2);
}
.rf-row.is-new.win  { border-color: rgba(43,224,140,.28); }
.rf-row.is-new .rf-score { font-size: 17px; }

/* When the newest tile shows LAST, hide the (redundant) margin to avoid two
   right-aligned chips fighting for the same slot. */
.rf-row.is-new .rf-margin { display: none; }

/* Focus ring (matches the rest of the kit) */
.rf-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-ring);
}

@media (prefers-reduced-motion: reduce) {
  .rf-row { transition: none; }
  .rf-row:hover { transform: none; }
}

/* ============================================================================
   8. MILESTONES — earned-achievement rows
   ========================================================================== */
.ms-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ms-row {
  --ms-tone:      var(--accent);
  --ms-tone-weak: var(--accent-weak);
  --ms-tone-ring: var(--accent-ring);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 11px 13px 11px 11px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, var(--ms-tone-weak), transparent 62%),
    linear-gradient(168deg, var(--surface3), var(--surface2));
  border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 var(--hairline);
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
/* The "earned" accent: a lit rail down the leading edge. */
.ms-row::before {
  content: "";
  position: absolute;
  left: 0; top: 14%; bottom: 14%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--ms-tone), color-mix(in srgb, var(--ms-tone) 55%, transparent));
  box-shadow: 0 0 10px -2px var(--ms-tone-ring);
}
.ms-row { position: relative; overflow: hidden; }
.ms-row:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ms-tone) 35%, var(--border2));
  box-shadow: inset 0 1px 0 var(--hairline-2), 0 10px 24px -18px #000;
}

/* Icon medallion */
.ms-medal {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  color: var(--ms-tone);
  background:
    radial-gradient(120% 120% at 30% 20%, var(--ms-tone-weak), transparent 70%),
    linear-gradient(168deg, var(--surface3), var(--surface));
  border: 1px solid color-mix(in srgb, var(--ms-tone) 26%, var(--border2));
  box-shadow: inset 0 1px 0 var(--hairline), 0 0 16px -8px var(--ms-tone-ring);
  flex: none;
}
.ms-medal svg { width: 21px; height: 21px; }

/* Player face: tint the existing avatar ring to the milestone tone */
.ms-face { display: inline-flex; flex: none; }
.ms-face .avatar {
  box-shadow:
    0 0 0 2px var(--ms-tone-weak),
    0 0 0 3px color-mix(in srgb, var(--ms-tone) 50%, transparent),
    0 4px 12px -6px #000;
}

/* Body text stack */
.ms-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ms-tone);
  line-height: 1.2;
}
.ms-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--text0);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-detail {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Trailing stat / date */
.ms-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
  flex: none;
  padding-left: 4px;
}
.ms-stat b {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 750;
  color: var(--ms-tone);
  letter-spacing: -0.02em;
}
.ms-stat small {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 3px;
}
.ms-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.02em;
  flex: none;
  white-space: nowrap;
  padding-left: 4px;
}

/* ---- Tone variants (semantic only) ------------------------------------- */
.ms-row.t-gold   { --ms-tone: var(--gold);   --ms-tone-weak: var(--gold-weak);   --ms-tone-ring: rgba(245,178,61,.30); }
.ms-row.t-green,
.ms-row.t-accent { --ms-tone: var(--accent); --ms-tone-weak: var(--accent-weak); --ms-tone-ring: var(--accent-ring); }
.ms-row.t-info   { --ms-tone: var(--info);   --ms-tone-weak: var(--info-weak);   --ms-tone-ring: rgba(77,163,255,.30); }

@media (prefers-reduced-motion: reduce) {
  .ms-row { transition: none; }
  .ms-row:hover { transform: none; }
}

/* ============================================================================
   9. AVAILABILITY LIST
   ========================================================================== */
.avail { display: flex; flex-direction: column; }
.avail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease);
}
.avail-row:last-child { border-bottom: none; }
.avail-row:hover { background: rgba(255,255,255,.022); }
.avail-name {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: var(--text1);
  font-weight: 500;
}
.sdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sdot.active { background: var(--accent); box-shadow: 0 0 8px -1px var(--accent); }
.sdot.quest  { background: var(--gold); box-shadow: 0 0 8px -1px var(--gold); }
.sdot.out    { background: var(--danger); box-shadow: 0 0 8px -1px var(--danger); }
.avail-status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.avail-status.active { color: var(--accent); }
.avail-status.quest  { color: var(--gold); }
.avail-status.out    { color: var(--danger); }

/* ============================================================================
   10. AI STORYLINE CARDS + AI SEASON NARRATIVE HERO
   ========================================================================== */
.storylines { display: flex; flex-direction: column; gap: 16px; }
.story {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.story-body .st {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 3px;
}
.story-body .sb { font-size: 13.5px; color: var(--text2); line-height: 1.45; }

.narrative-body { font-size: 14px; color: var(--text2); line-height: 1.55; margin-bottom: 18px; }
.narrative-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.premium-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  background: var(--gold-weak);
  border: 1px solid rgba(245,178,61,.3);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
}

/* ============================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              filter var(--t-fast) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 8px 20px -10px var(--accent-ring), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 26px -10px var(--accent-ring), inset 0 1px 0 rgba(255,255,255,.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); filter: brightness(1.02); }
.btn-ghost {
  background: var(--surface3);
  color: var(--text1);
  border-color: var(--border2);
  box-shadow: inset 0 1px 0 var(--hairline);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ----------------------------------------------------------------------------
   GLOBAL FOCUS VISIBILITY (WCAG 2.4.7) — every clickable/tabbable element gets
   a clear keyboard ring, not just .btn.
   -------------------------------------------------------------------------- */
:where(a, button, .chip, .pill, .clip, .rf-row, .ms-row, .avail-row, .box-table tbody tr):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-ring);
  border-radius: inherit;
}
.box-table tbody tr:focus-visible { position: relative; z-index: 2; }

/* ============================================================================
   11. INSIGHT CARDS
   ========================================================================== */
.insights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.insight-body .it {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text0);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.insight-body .ib { font-size: 13px; color: var(--text2); line-height: 1.45; }
.insight-body .im {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.insight-body .im.neg { color: var(--danger); }

/* ============================================================================
   12. SCOREBOARD HERO
   ========================================================================== */
.scoreboard {
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(43,224,140,.12), transparent 55%),
    linear-gradient(168deg, var(--surface2), var(--surface) 70%);
  border: 1px solid var(--border2);
  overflow: hidden;
}
.scoreboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 50% at 50% 120%, rgba(43,224,140,.06), transparent 60%);
  pointer-events: none;
}
.sb-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface3);
  border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 var(--hairline);
  color: var(--text2);
}
.status-pill.live { color: var(--accent); border-color: rgba(43,224,140,.3); background: var(--accent-weak); }
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-ring);
  animation: dc-pulse 1.8s ease-out infinite;
}
@keyframes dc-pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-ring); }
  70%  { box-shadow: 0 0 0 8px rgba(43,224,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,224,140,0); }
}
.clock-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--text1);
  background: var(--surface3);
  border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 var(--hairline);
  padding: 5px 11px;
  border-radius: 8px;
}
.sb-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  position: relative;
}
.sb-team { display: flex; align-items: center; gap: 14px; }
.sb-team.away { flex-direction: row-reverse; text-align: right; }
.crest {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% -20%, #1C2430, var(--surface2) 70%);
  border: 1px solid var(--border2);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    inset 0 1px 0 var(--hairline-2),
    inset 0 -8px 16px -10px rgba(0,0,0,.7),
    0 10px 22px -14px rgba(0,0,0,.85);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--text1);
  flex: none;
}
.sb-team:has(.sb-score.win) .crest,
.crest.win { border-color: rgba(43,224,140,.25); }
.sb-id .code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text0);
  line-height: 1;
}
.sb-id .full {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}
.sb-score {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 58px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.sb-score.win  { color: var(--accent); text-shadow: 0 0 30px var(--accent-ring); }
.sb-score.lose { color: var(--text2); opacity: .82; }
.sb-mid { text-align: center; }
.sb-sep {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--text3);
  margin: 0 6px;
}
.sb-result {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.sb-result.win  { color: var(--accent); background: var(--accent-weak); border: 1px solid rgba(43,224,140,.3); }
.sb-result.loss { color: var(--danger); background: var(--danger-weak); border: 1px solid rgba(255,107,107,.28); }
.sb-meta {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text3);
  position: relative;
}

/* ============================================================================
   13. BOX-SCORE TABLE
   ========================================================================== */
/* The box score is the one min-width:720 wide table. Let its card + scroll area
   SHRINK (min-width:0) so on a phone the table scrolls INSIDE .box-scroll instead
   of forcing its column wider than the screen (page-level horizontal clipping). */
.box-card { min-width: 0; max-width: 100%; }
.box-scroll {
  position: relative;
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  margin: -2px;
  padding: 2px;
  -webkit-overflow-scrolling: touch;
}
/* Right-edge fade hints there is more table to swipe on narrow screens. */
.box-scroll::after {
  content: "";
  position: absolute;
  top: 2px; right: 2px; bottom: 2px;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to left, var(--surface), transparent);
}
.box-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  min-width: 720px;
}
.box-table thead th {
  position: sticky;
  top: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  text-align: right;
  padding: 0 12px 11px;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
  background: linear-gradient(180deg, var(--surface2), var(--surface2));
}
.box-table thead th.lcol { text-align: left; }
.box-table thead th.pmh { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.box-table tbody td {
  padding: 11px 12px;
  font-size: 13.5px;
  color: var(--text1);
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease);
}
.box-table tbody tr:last-child td { border-bottom: none; }
.box-table tbody tr:hover td { background: rgba(255,255,255,.022); }
.box-table .pcol {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: linear-gradient(168deg, var(--surface2), var(--surface) 64%);
  transition: background var(--t-fast) var(--ease);
}
.box-table tbody tr:hover .pcol { background: color-mix(in srgb, var(--surface2), #fff 2.2%); }
.pcell { display: flex; align-items: center; gap: 10px; }
.pcell .pnum {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  width: 18px;
  text-align: right;
  flex: none;
}
.pcell .pname { font-weight: 600; color: var(--text0); }
.box-table td.pts {
  color: var(--accent);
  font-weight: 800;
  font-family: inherit;
}
.box-table td.pm { font-feature-settings: "tnum" 1; }
.box-table td.pm.pos { color: var(--accent); }
.box-table td.pm.neg { color: var(--danger); }
/* Made-attempt pairs: center so the dash doesn't drift row to row. */
.box-table td.pair, .box-table th.pair { text-align: center; letter-spacing: 0; }
.box-table td.pair .sep { color: var(--text3); margin: 0 1px; }
.grade-badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  padding: 2px 6px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(245,178,61,.16), var(--gold-weak));
  border: 1px solid rgba(245,178,61,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow);
}
/* Tier color so the grade itself encodes rank, not only the letter. */
.grade-badge.g-a, .grade-chip.g-a { color: var(--accent); background: linear-gradient(180deg, rgba(43,224,140,.16), var(--accent-weak)); border-color: rgba(43,224,140,.3); }
.grade-badge.g-b, .grade-chip.g-b { color: var(--gold); background: linear-gradient(180deg, rgba(245,178,61,.16), var(--gold-weak)); border-color: rgba(245,178,61,.4); }
.grade-badge.g-c, .grade-chip.g-c { color: var(--danger); background: linear-gradient(180deg, rgba(255,107,107,.14), var(--danger-weak)); border-color: rgba(255,107,107,.28); }

/* ============================================================================
   14. CLIP CARD
   ========================================================================== */
.clip-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.clip {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.clip:hover {
  transform: translateY(-3px);
  border-color: var(--border2);
  box-shadow: var(--shadow-lift);
}
.clip:hover .clip-thumb .play {
  transform: scale(1.08);
  border-color: var(--accent);
  color: var(--accent);
}
.clip:focus-visible { outline: none; box-shadow: var(--ring); }
.clip:active .clip-thumb .play { transform: scale(.96); }
.clip.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px -8px var(--accent-ring); }
.clip.selected .clip-thumb .play { border-color: var(--accent); color: var(--accent); }
.clip-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(110% 130% at 30% 0%, rgba(43,224,140,.1), transparent 55%),
    linear-gradient(150deg, var(--surface3), var(--bg2));
  display: grid;
  place-items: center;
}
.clip-thumb .play {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(8,20,14,.55);
  border: 1px solid var(--border2);
  display: grid; place-items: center;
  color: var(--text0);
  backdrop-filter: blur(2px);
  transition: transform var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease),
              background var(--t-med) var(--ease),
              color var(--t-med) var(--ease);
}
.clip:hover .clip-thumb .play { background: rgba(8,20,14,.78); }
.clip-thumb .play svg { width: 15px; height: 15px; margin-left: 2px; }
.clip-rec {
  position: absolute;
  top: 9px; left: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--danger);
  background: rgba(7,9,13,.7);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}
.clip-rec .recdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  animation: dc-blink 1.4s steps(1) infinite;
}
@keyframes dc-blink { 50% { opacity: .25; } }
.clip-dur {
  position: absolute;
  bottom: 9px; right: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text0);
  background: rgba(7,9,13,.72);
  padding: 3px 7px;
  border-radius: 6px;
}
.clip-idx {
  position: absolute;
  bottom: 9px; left: 9px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text1);
  background: rgba(7,9,13,.72);
  border: 1px solid var(--border2);
}
.clip-body { padding: 11px 12px 13px; }
.clip-title { font-size: 14px; font-weight: 600; color: var(--text0); }
.clip-tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.tag.accent { color: var(--accent); border-color: rgba(43,224,140,.25); background: var(--accent-weak); }

/* ============================================================================
   15. FILTER CHIPS + RESULT/STATUS PILLS + GRADE BADGE
   ========================================================================== */
.chip-set { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface3);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--hairline);
  color: var(--text2);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--border2); color: var(--text1); transform: translateY(-1px); }
.chip:active { transform: translateY(0) scale(.97); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip .cnt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text3);
}
.chip.active {
  color: var(--accent);
  background: var(--accent-weak);
  border-color: var(--accent);
  box-shadow: 0 0 14px -6px var(--accent-ring), inset 0 1px 0 var(--hairline);
}
.chip.active .cnt { color: var(--accent); }
.chip.disabled { color: #6C747F; opacity: 1; cursor: default; }
.chip.disabled:hover { transform: none; border-color: var(--border); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.pill.win    { color: var(--accent); background: var(--accent-weak); border-color: rgba(43,224,140,.3); }
.pill.loss   { color: var(--danger); background: var(--danger-weak); border-color: rgba(255,107,107,.28); }
.pill.review { color: var(--info);   background: var(--info-weak);   border-color: rgba(77,163,255,.28); }
.pill.live   { color: var(--accent); background: var(--accent-weak); border-color: rgba(43,224,140,.3); }
.pill.final  { color: var(--text2);  background: var(--surface3);    border-color: var(--border2); }
.pill.upcoming { color: var(--violet); background: var(--violet-weak); border-color: rgba(167,139,250,.26); }

.grade-chip {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: 5px 10px;
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(245,178,61,.16), var(--gold-weak));
  border: 1px solid rgba(245,178,61,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow);
}

/* ============================================================================
   GALLERY CHROME (page layout for widgets.html)
   ========================================================================== */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px 80px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgba(7,9,13,.78);
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-ring), transparent);
  opacity: .5;
}
.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text0);
}
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 6px 16px -8px var(--accent-ring), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand .mark svg { width: 17px; height: 17px; }
.brand .sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text3);
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid var(--border2);
}
.topbar-spacer { flex: 1; }
.topbar .status-pill { font-size: 10px; }

.section { margin-bottom: 30px; }
.section-cap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.section-cap h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text2);
}
.section-cap .n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.section-cap .desc { font-size: 12.5px; color: var(--text3); }
.swatch {
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(43,224,140,.03), transparent 40%),
    var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--glass);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------------------------
   LOADING SKELETON + EMPTY STATE
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(100deg, var(--surface2) 30%, var(--surface3) 50%, var(--surface2) 70%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: dc-shimmer 1.4s linear infinite;
}
@keyframes dc-shimmer { to { background-position: -200% 0; } }
.skeleton-kpi { height: 96px; }
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 40px 24px;
}
.empty-state .eyebrow { justify-content: center; }
.empty-state p { margin: 0; max-width: 42ch; color: var(--text2); font-size: 14px; line-height: 1.55; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .spark-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .page { padding: 0 16px 60px; }
  .topbar-inner { padding: 14px 16px; }
  .brand .sub { display: none; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .kpi { padding: 16px 16px 16px 18px; }
  .spark-row { grid-template-columns: 1fr; }
  .statrings { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .insights { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sb-score { font-size: 46px; }
  .sb-meta { font-size: 11.5px; }
  .kpi-value { font-size: 27px; }

  /* Keep the matchup side-by-side so the score stays the centerpiece. */
  .sb-grid { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .sb-team, .sb-team.away { flex-direction: column; text-align: center; gap: 6px; }
  .crest { width: 40px; height: 40px; }

  /* Lighten the nested swatch + card double-border so content keeps width. */
  .swatch { padding: 14px; }
  .card { padding: 14px; }

  /* Stack section captions instead of a ragged baseline row. */
  .section-cap { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-cap h2 { letter-spacing: 0.1em; font-size: 11px; text-wrap: balance; }
  .section-cap .desc { flex-basis: 100%; font-size: 11.5px; text-wrap: balance; }

  /* Comfortable thumb targets. */
  .chip { padding: 10px 16px; }
  .avail-row { min-height: 44px; }

  /* Synergy ranked list: tighten the row + value on phones (the identity has
     already collapsed to 3-letter code circles via the 960px breakpoint). */
  .syn-row { gap: 11px; padding: 12px 13px; }
  .syn-metric { display: none; }            /* eyebrow alone carries it on narrow */
  .syn-num { font-size: 21px; }
  .syn-val { min-width: 52px; }
}

@media (max-width: 480px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px; }
  .topbar-inner .brand { flex: 1 1 auto; }
  .topbar-spacer { display: none; }
  #mode-link { order: 2; margin-right: 0 !important; }
  #mode-badge { order: 3; flex-basis: 100%; justify-content: center; }
  /* The "Sign in" link already carries the CTA — drop the badge suffix. */
  .badge-suffix { display: none; }

  /* Synergy: on the narrowest phones the "96 poss · 7 G" size line can crowd
     the bar — keep the Best/Worst tag but drop the sample-size text so the net
     bar owns the width. The tag + row tint still key the ceiling and floor. */
  .syn-ctx { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep "live" legible without motion: static ring instead of a pulse. */
  .pulse { animation: none; box-shadow: 0 0 0 3px var(--accent-glow); }
  .clip-rec .recdot { animation: none; opacity: 1; box-shadow: 0 0 6px -1px var(--danger); }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
