/* Goalateral FPL hub — one stylesheet, mobile-first.
   Palette: club-neutral greys + a blue accent (no single club's colours), with
   the categorical/status steps from the validated data-viz reference palette.
   Light and dark are both designed, not inverted: see the two token blocks. */

:root {
  color-scheme: light;
  --page: #f3f3f0; --card: #fcfcfb; --card-2: #f0efeb; --ink: #0b0b0b; --ink-2: #52514e;
  --muted: #6c6a64; --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11,11,11,.10);
  --accent: #2a78d6; --accent-ink: #1c5cab; --accent-wash: rgba(42,120,214,.10);
  --good: #0ca30c; --good-ink: #006300; --bad: #d03b3b; --bad-ink: #b02a2a; --warn: #fab219;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --cosmic: #4a3aa7; --cosmic-ink: #4a3aa7; --cosmic-wash: #ebe8fb; --cosmic-page: #f1effa;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #5598e7; --seq-4: #256abf; --seq-5: #104281;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --grass-1: #4b9a5b; --grass-2: #45915a; --pitch-line: rgba(255,255,255,.42);
  /* FPL's fixture difficulty, green (easy) to red (hard); the number is always printed too */
  --fdr-1: #1b7f3b; --fdr-1-ink: #fff; --fdr-2: #9ad9ab; --fdr-2-ink: #0b0b0b; --fdr-3: #e4e3dc; --fdr-3-ink: #0b0b0b;
  --fdr-4: #f3a7a7; --fdr-4-ink: #0b0b0b; --fdr-5: #a8232d; --fdr-5-ink: #fff;
  /* Status: a differential (few here own him for what he returns). The palette's own violet:
     8.3:1 as text on a card, and clear of the accent blue for colour-blind readers (CVD ΔE 13). */
  --status-differential: #4a3aa7; --status-differential-on: #fff; --status-differential-wash: rgba(74,58,167,.09);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --card: #1a1a19; --card-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7;
    --muted: #a3a197; --grid: #2c2c2a; --axis: #45453f; --border: rgba(255,255,255,.10);
    --accent: #3987e5; --accent-ink: #86b6ef; --accent-wash: rgba(57,135,229,.16);
    --good: #0ca30c; --good-ink: #4fd14f; --bad: #e66767; --bad-ink: #ff8f8f;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --cosmic: #9085e9; --cosmic-ink: #b3abf5; --cosmic-wash: #231f3d; --cosmic-page: #0c0a17;
    --seq-1: #184f95; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #6da7ec; --seq-5: #b7d3f6;
    --shadow: none;
    --grass-1: #1f4a2b; --grass-2: #1c4428; --pitch-line: rgba(255,255,255,.2);
    --fdr-1: #1d8a41; --fdr-1-ink: #fff; --fdr-2: #24503a; --fdr-2-ink: #d9f5e2; --fdr-3: #34342f; --fdr-3-ink: #e8e7e1;
    --fdr-4: #5c2a2f; --fdr-4-ink: #ffdede; --fdr-5: #c0363f; --fdr-5-ink: #fff;
    /* the dark violet (#9085e9) is too close to the dark accent for protan readers (ΔE 1.9): its lighter lavender instead */
    --status-differential: #b3abf5; --status-differential-on: #0d0d0d; --status-differential-wash: rgba(179,171,245,.13);
  }
  :root:not([data-theme="light"]) .bdg-l { display: none; }
  :root:not([data-theme="light"]) .bdg-d { display: inline; }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --card: #1a1a19; --card-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7;
  --muted: #a3a197; --grid: #2c2c2a; --axis: #45453f; --border: rgba(255,255,255,.10);
  --accent: #3987e5; --accent-ink: #86b6ef; --accent-wash: rgba(57,135,229,.16);
  --good: #0ca30c; --good-ink: #4fd14f; --bad: #e66767; --bad-ink: #ff8f8f;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --cosmic: #9085e9; --cosmic-ink: #b3abf5; --cosmic-wash: #231f3d; --cosmic-page: #0c0a17;
  --seq-1: #184f95; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #6da7ec; --seq-5: #b7d3f6;
  --shadow: none;
  --grass-1: #1f4a2b; --grass-2: #1c4428; --pitch-line: rgba(255,255,255,.2);
  --fdr-1: #1d8a41; --fdr-1-ink: #fff; --fdr-2: #24503a; --fdr-2-ink: #d9f5e2; --fdr-3: #34342f; --fdr-3-ink: #e8e7e1;
  --fdr-4: #5c2a2f; --fdr-4-ink: #ffdede; --fdr-5: #c0363f; --fdr-5-ink: #fff;
  --status-differential: #b3abf5; --status-differential-on: #0d0d0d; --status-differential-wash: rgba(179,171,245,.13);
}
:root[data-theme="dark"] .bdg-l { display: none; }
:root[data-theme="dark"] .bdg-d { display: inline; }

/* ==== Design tokens: type, space, shape, motion ====
   Colour lives in the two palette blocks above and is deliberately untouched.
   Everything below spaces, sizes and shapes components from these steps only.
   Type: Archivo, one variable family (self-hosted, SIL OFL), used three ways:
   text at normal width, figures and dense tables a notch condensed, headlines
   heavier. Spacing: a 4px base in fixed steps. Radius: small for things you
   tap or read in rows, larger only for the one hero panel on a page. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 85% 100%; font-display: swap;
  src: url(fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 85% 100%; font-display: swap;
  src: url(fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --w-reg: 400; --w-med: 520; --w-semi: 610; --w-bold: 720;   /* the only four weights */
  --narrow: 90%;                                              /* font-stretch for figures and dense tables */
  --fs-caps: .6875rem;  /* 11px  kicker labels, set in caps */
  --fs-xs: .75rem;      /* 12px  meta, captions, table sub-lines */
  --fs-sm: .8125rem;    /* 13px  secondary text, dense tables */
  --fs-md: .9375rem;    /* 15px  body */
  --fs-lg: 1.0625rem;   /* 17px  section titles, list headings */
  --fs-xl: 1.375rem;    /* 22px  page titles on a phone */
  --fs-2xl: 1.75rem;    /* 28px  figures; page titles on a desktop */
  --fs-3xl: 2.625rem;   /* 42px  the one headline figure a page gets */
  --lh-tight: 1.08; --lh-snug: 1.25; --lh-body: 1.5;
  --track-caps: .075em; --track-tight: -.015em;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --r-1: 3px;    /* tags, fixture cells, keys */
  --r-2: 6px;    /* buttons, inputs, segmented controls, thumbnails */
  --r-3: 10px;   /* panels and grouped lists */
  --r-4: 16px;   /* the hero panel of a page, the GIF frame */
  --hair: 1px solid var(--grid);     /* dividers inside a panel */
  --edge: 1px solid var(--border);   /* a panel's outline */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms; --t-med: 200ms; --t-slow: 360ms;
  --page-w: 1180px;   /* the reading measure of a page; asymmetric pages split it */
  --rail-w: 340px;    /* the narrower column of an asymmetric page */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: var(--w-reg) var(--fs-md)/var(--lh-body) var(--font);
  font-synthesis-weight: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent-ink); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 var(--sp-2); font-weight: var(--w-bold); letter-spacing: var(--track-tight); }
h1 { font-size: var(--fs-xl); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-lg); line-height: var(--lh-snug); font-weight: var(--w-semi); }
h3 { font-size: var(--fs-md); line-height: var(--lh-snug); font-weight: var(--w-semi); }
p { margin: var(--sp-2) 0; }
small, .small { font-size: var(--fs-sm); }
b, strong { font-weight: var(--w-semi); }
.muted { color: var(--muted); } .ink2 { color: var(--ink-2); }
.num, td.r, th.r { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--card); padding: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kicker, .caps { font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
kbd { font: var(--w-semi) var(--fs-xs)/1 var(--font); padding: 2px 5px; border: var(--edge); border-bottom-width: 2px; border-radius: var(--r-1); color: var(--ink-2); background: var(--card); }

/* ---- icons: the hub's own set (templates/fpl/_icons.html) ---- */
.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.25em; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ic.sm { width: 1em; height: 1em; vertical-align: -.14em; }
.ic.lg { width: 1.6em; height: 1.6em; }
.ic-win { color: var(--good-ink); } .ic-lose { color: var(--bad-ink); } .ic-cosmic { color: var(--cosmic-ink); }

/* ---- header & navigation ----
   Phones: brand and controls on one row, status under them, not sticky (a
   tall sticky header would eat an eighth of the screen). Wider: one sticky row. */
.top {
  position: relative; z-index: 20; display: flex; align-items: center; gap: var(--sp-1) var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-4); background: color-mix(in srgb, var(--page) 94%, transparent);
  border-bottom: var(--edge);
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--ink); white-space: nowrap; order: 1; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-2); background: var(--ink); color: var(--page); }
.brand-mark .ic { width: 20px; height: 20px; stroke-width: 2.1; }
.brand-name { font-size: var(--fs-lg); font-weight: var(--w-bold); letter-spacing: var(--track-tight); }
.brand-sub { color: var(--muted); font-size: var(--fs-xs); font-weight: var(--w-med); letter-spacing: var(--track-caps); text-transform: uppercase; margin-left: -2px; }
.status { order: 3; flex: 1 1 100%; min-width: 0; display: flex; gap: var(--sp-1) var(--sp-3); align-items: center; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--muted); }
.status .ic { width: 1.15em; height: 1.15em; }
.st-item { display: inline-flex; align-items: center; gap: var(--sp-1); white-space: nowrap; }
.st-item.dl { color: var(--accent-ink); font-weight: var(--w-semi); }
.st-item.dl.day { color: var(--ink); } .st-item.dl.soon { color: var(--bad-ink); }
.st-item.warn { color: var(--bad-ink); font-weight: var(--w-semi); }
.st-sep { width: 1px; height: 12px; background: var(--grid); }
.top-actions { order: 2; margin-left: auto; display: flex; gap: var(--sp-2); align-items: center; }
.me-pick select, select, input, textarea, button {
  font: inherit; color: var(--ink); background: var(--card); border: var(--edge);
  border-radius: var(--r-2); padding: 6px 10px; min-height: 36px;
}
button { cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
button:active:not([disabled]) { transform: translateY(1px); }
.me-pick select { max-width: 44vw; font-size: var(--fs-sm); font-weight: var(--w-med); }
.icon-btn { width: 36px; padding: 0; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover, .search-btn:hover { color: var(--ink); border-color: var(--axis); }
.search-btn { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--ink-2); padding: 0 10px; }
.search-btn kbd, .search-btn .search-lbl { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); background: var(--accent); color: #fff; border: 1px solid transparent;
  border-radius: var(--r-2); padding: 0 var(--sp-4); min-height: 40px; font-weight: var(--w-semi); letter-spacing: .005em; }
.btn.ghost { background: transparent; color: var(--accent-ink); border: var(--edge); }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost:hover { filter: none; border-color: var(--axis); background: var(--card-2); }

/* Primary sections: four tabs with the hub's icons. */
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-bottom: var(--edge); }
.tiers a {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-1) 10px;
  color: var(--ink-2); font-weight: var(--w-semi); font-size: var(--fs-sm); border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast);
}
.tiers a .ic { width: 18px; height: 18px; }
/* Phones: the icon sits above a short label. */
@media (max-width: 559px) {
  .tiers a { flex-direction: column; gap: 3px; padding: var(--sp-2) 2px 6px; font-size: var(--fs-xs); }
  .tiers a .ic { width: 20px; height: 20px; }
}
.tiers a:hover { text-decoration: none; color: var(--ink); background: var(--card-2); }
.tiers a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tiers a.on .ic { color: var(--accent-ink); }
.tiers a.cosmic-tab.on { border-bottom-color: var(--cosmic); color: var(--cosmic-ink); }
.tiers a.cosmic-tab.on .ic { color: var(--cosmic-ink); }
.tiers .wide { display: none; }
@media (min-width: 900px) { .tiers .wide { display: inline; } }
/* Pages within a section: quiet text links, the current one marked by a bar. */
.subnav { display: flex; gap: var(--sp-1); overflow-x: auto; padding: 0 var(--sp-3); scrollbar-width: none; background: var(--page); border-bottom: var(--hair); }
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: 0 0 auto; padding: 10px var(--sp-2) 8px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: var(--w-med);
  white-space: nowrap; border-bottom: 2px solid transparent; transition: color var(--t-fast), border-color var(--t-fast);
}
.subnav a.on { color: var(--ink); font-weight: var(--w-semi); border-bottom-color: var(--ink); }
.subnav a:hover { text-decoration: none; color: var(--ink); }

main { max-width: var(--page-w); margin: 0 auto; padding: var(--sp-1) var(--sp-4) var(--sp-6); outline: none; }
main:focus, main:focus-visible { outline: none; }
.foot { max-width: var(--page-w); margin: 0 auto; padding: var(--sp-5) var(--sp-4) var(--sp-6); color: var(--muted); font-size: var(--fs-xs); border-top: var(--hair); }

/* ---- panels & layout ----
   A panel is a flat bordered surface, no shadow: separation comes from
   structure (edges and hairlines), not depth. */
.card {
  background: var(--card); border: var(--edge); border-radius: var(--r-3);
  padding: var(--sp-4); margin: var(--sp-3) 0; min-width: 0;
}
@media (min-width: 760px) { .card { padding: var(--sp-4) var(--sp-5); } }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.card-head .actions { display: flex; gap: var(--sp-2); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 var(--sp-3); }
.grid2 > *, .awards > * { min-width: 0; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 0 var(--sp-3); }
.loading { color: var(--muted); }
.asof { color: var(--muted); font-size: var(--fs-xs); margin-top: var(--sp-2); }
.lede { color: var(--ink-2); margin: var(--sp-1) 0 var(--sp-4); max-width: 68ch; font-size: var(--fs-md); }
.page-title { margin: var(--sp-5) 0 var(--sp-1); font-size: var(--fs-xl); font-weight: var(--w-bold); letter-spacing: -.02em; }
@media (min-width: 760px) { .page-title { font-size: var(--fs-2xl); margin-top: var(--sp-6); } }
.empty { color: var(--muted); padding: var(--sp-1) 0 var(--sp-1) var(--sp-3); margin: var(--sp-2) 0; border-left: 2px dashed var(--axis); }
.outage { display: flex; align-items: flex-start; gap: var(--sp-2); max-width: calc(var(--page-w) - 2 * var(--sp-4)); margin: var(--sp-3) auto 0; padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm); color: var(--bad-ink); background: color-mix(in srgb, var(--bad) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 28%, transparent); border-radius: var(--r-2); }
.outage[hidden] { display: none; }
.outage .ic { flex: none; margin-top: 2px; }
@media (max-width: 1211px) { .outage { margin-left: var(--sp-4); margin-right: var(--sp-4); } }
.note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--card-2); border-radius: var(--r-2); padding: var(--sp-2) var(--sp-3); margin: var(--sp-2) 0; }
.share { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--w-semi); padding: 0 10px; min-height: 30px;
  border-radius: var(--r-2); background: transparent; color: var(--ink-2); border: var(--edge); }
.share:hover { color: var(--ink); border-color: var(--axis); }
.share-row { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.share .ic { width: 15px; height: 15px; }

/* ---- states: empty, waiting, offline, not found ----
   Their own shape: a dashed outline (nothing is here yet), a drawing, one
   sentence and a way on. */
.state { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); margin: var(--sp-5) 0; padding: var(--sp-6) var(--sp-4);
  border: 1.5px dashed var(--axis); border-radius: var(--r-4); color: var(--ink-2); }
.state.small { padding: var(--sp-4) var(--sp-3); margin: var(--sp-2) 0; gap: var(--sp-2); border-radius: var(--r-3); }
.state h2 { color: var(--ink); margin: 0 0 var(--sp-1); }
.state p { margin: 0 auto; max-width: 52ch; }
.state-act { margin-top: var(--sp-3) !important; }
.ill { width: 132px; height: 99px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-2); }
.state.small .ill { width: 96px; height: 72px; }
.ill .f { fill: var(--card-2); stroke: none; }
.ill .f2 { fill: var(--card); stroke: none; }
.ill .a { stroke: var(--accent); }
.ill .net { stroke-width: 1; opacity: .45; }
.ill .dot { fill: currentColor; stroke: none; }
@media (prefers-reduced-motion: no-preference) {
  .ill .dot { animation: var-check 1.2s var(--ease) infinite; }
  .ill .dot.d2 { animation-delay: .15s; } .ill .dot.d3 { animation-delay: .3s; }
}
@keyframes var-check { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
@media (min-width: 760px) {
  .state:not(.small) { grid-template-columns: auto minmax(0, 52ch); justify-content: center; text-align: left; gap: var(--sp-6); padding: var(--sp-7) var(--sp-6); }
  .state:not(.small) p { margin: 0; }
}

/* ---- asymmetric pages: a wide data column and a narrower rail ----
   Phones: the rail's headline blocks first, then the data, then the rest.
   1100px+: data on the left, the rail on the right, "after" under the rail. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "rail" "main" "after"; }
.split-rail { grid-area: rail; min-width: 0; }
.split-main { grid-area: main; min-width: 0; }
.split-after { grid-area: after; min-width: 0; }
@media (min-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr) var(--rail-w); grid-template-rows: auto 1fr; grid-template-areas: "main rail" "main after"; gap: 0 var(--sp-6); align-items: start; }
}
/* A rail block sits on the page, not in a panel: a hairline under it. */
.rail-block { padding: var(--sp-4) 0 var(--sp-3); border-bottom: var(--hair); }
.rb-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-1); }
.rb-head h2 { margin: 0; }
.split-rail .awards.two { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--sp-4); }
.split-rail .award.compact .score { font-size: var(--fs-2xl); }
/* In a rail (or anywhere asked for) the figures pair up two by two. */
.tiles.pair, .split-rail .tiles { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 0; }
.tiles.pair .tile, .split-rail .tiles .tile { padding: 10px var(--sp-3) var(--sp-3) 0; border-left: 0; border-bottom: var(--hair); }
.tiles.pair .tile:nth-child(2n), .split-rail .tiles .tile:nth-child(2n) { padding-left: var(--sp-3); border-left: var(--hair); }
/* Your position: one big ordinal, then the gaps around it. */
.you-card { padding-bottom: var(--sp-3); }
.you-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.you-head .kicker { margin: 0; }
.you-rank { margin: var(--sp-1) 0 0; display: flex; align-items: baseline; gap: var(--sp-2); }
.you-rank b { font-size: var(--fs-3xl); font-weight: var(--w-bold); font-stretch: var(--narrow); letter-spacing: -.035em; line-height: 1; }
.you-card .tiles { margin-bottom: var(--sp-2); }
.you-card .tile .value { font-size: var(--fs-xl); }
/* First visit: one line on what this is, and the one choice that personalises it. */
.intro { position: relative; display: grid; gap: var(--sp-3); align-items: center; margin: var(--sp-4) 0 var(--sp-2); padding: var(--sp-4) 0; border-top: var(--hair); border-bottom: var(--hair); }
.intro-line { margin: 0; padding-right: 44px; font-size: var(--fs-md); line-height: 1.45; max-width: 62ch; color: var(--ink-2); }
#intro-x { position: absolute; top: var(--sp-3); right: 0; }
@media (min-width: 900px) { .intro-line { font-size: var(--fs-lg); padding-right: 0; } #intro-x { position: static; } }
.intro-line b { color: var(--ink); font-weight: var(--w-semi); }
.intro-act { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; font-size: var(--fs-sm); font-weight: var(--w-semi); }
.intro-act select { flex: 1 1 200px; min-height: 40px; }
@media (min-width: 900px) { .intro { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: var(--sp-6); } }

/* ---- manager headline: name and GIF, chips (before points), then four numbers ---- */
.mhead.with-gif { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3); align-items: start; }
.mgif { margin: var(--sp-3) 0 0; width: 112px; }
.mgif img { display: block; width: 112px; height: auto; border-radius: var(--r-2); background: var(--card-2); }
.mgif .gif-ph { display: none; width: 112px; height: 84px; border-radius: var(--r-2); background: var(--card-2); align-items: center; justify-content: center; color: var(--muted); }
.mgif .gif-ph .ic { width: 40px; height: 40px; stroke-width: 1.5; }
.mgif.noimg .gif-ph { display: flex; }
.mgif.noimg picture, .mgif.noimg a[title] { display: none; }
.mgif figcaption { margin-top: var(--sp-1); font-size: var(--fs-xs); line-height: 1.3; color: var(--ink-2); }
.mgif .gif-tag { display: flex; align-items: center; gap: 4px; font-weight: var(--w-semi); color: var(--ink); }
.mgif .giphy { color: var(--muted); font-size: .625rem; letter-spacing: .02em; }
.chip-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: var(--sp-2) 0 2px; font-size: var(--fs-sm); }
.chip-lbl { font-size: var(--fs-caps); font-weight: var(--w-semi); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--muted); margin-right: 2px; }
.chipt { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-1); padding: 1px 7px; font-size: var(--fs-xs); white-space: nowrap; }
.chipt.played { background: var(--accent-wash); color: var(--ink); }
.chipt.played b { color: var(--accent-ink); }
.chipt.left { border: 1px dashed var(--axis); color: var(--muted); font-weight: var(--w-semi); font-size: var(--fs-caps); letter-spacing: .04em; padding: 0 6px; }
.chip-left { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
span.pos { color: var(--good-ink); font-weight: var(--w-semi); } span.neg { color: var(--bad-ink); font-weight: var(--w-semi); }
.head-tiles { margin-top: var(--sp-3); }

/* ---- the manager profile hero: identity left, the GIF (the hub's signature)
   right, chips and figures across the bottom. The one r-4 panel on the page. */
.mhero { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id gif" "act act" "more more"; gap: 0 var(--sp-4); align-items: start;
  margin: var(--sp-4) 0 0; padding: var(--sp-4); background: var(--card); border: var(--edge); border-radius: var(--r-4); }
.mhero:not(.with-gif) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "act" "more"; }
.mhero-id { grid-area: id; min-width: 0; }
.mhero .kicker { margin: 0; }
.mhero-name { font-size: var(--fs-2xl); font-weight: var(--w-bold); letter-spacing: -.025em; line-height: var(--lh-tight); margin: var(--sp-1) 0; overflow-wrap: anywhere; }
.mhero-name .muted { font-weight: var(--w-med); letter-spacing: -.01em; }
.mhero-sub { margin: 0; color: var(--ink-2); }
.mhero-act { grid-area: act; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-3) 0 0; align-items: center; }
.mhero .mgif { grid-area: gif; margin: 0; }
.mhero .mgif img, .mhero .mgif .gif-ph { border-radius: var(--r-3); border: var(--edge); }
.mhero-more { grid-area: more; min-width: 0; margin-top: var(--sp-3); }
.mhero .tiles { margin-bottom: 0; border-bottom: 0; }
.jump a.on { color: var(--ink); font-weight: var(--w-semi); }
@media (min-width: 760px) {
  .mhero { padding: var(--sp-5) var(--sp-6) var(--sp-3); gap: 0 var(--sp-6); grid-template-areas: "id gif" "act gif" "more more"; grid-template-rows: auto 1fr auto; }
  .mhero:not(.with-gif) { grid-template-areas: "id" "act" "more"; }
  .mhero-name { font-size: 2.5rem; }
  .mhero .mgif, .mhero .mgif img, .mhero .mgif .gif-ph { width: 220px; }
  .mhero .mgif .gif-ph { height: 165px; }
}

/* ---- drill-downs: a run of folds is ONE grouped list ----
   Each fold is a row (title, one-line summary, chevron) separated from the
   next by a hairline; only the group's outer corners are rounded. */
details.fold { padding: 0; }
.grid2 > details.fold { align-self: start; }  /* an open fold must not stretch the closed one beside it */
/* A grid of folds reads as a wall of identical cards: it becomes the same single list. */
.grid2:has(> details.fold) { display: block; }
details.fold + details.fold { margin-top: -1px; border-top-color: var(--grid); border-top-left-radius: 0; border-top-right-radius: 0; }
details.fold:has(+ details.fold) { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--sp-3); padding: 14px var(--sp-4); border-radius: inherit;
  transition: background-color var(--t-fast); }
@media (min-width: 760px) { details.fold > summary { padding: 14px var(--sp-5); } }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
details.fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fold-t { flex: 1; min-width: 0; }
.fold-h { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--w-semi); font-size: var(--fs-lg); line-height: var(--lh-snug); letter-spacing: -.01em; }
.fold-h .ic { color: var(--ink-2); }
.fold-sum { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-2); }
.chev { flex: 0 0 auto; width: 18px; height: 18px; color: var(--muted); transition: transform var(--t-med) var(--ease); }
details.fold[open] > summary .chev { transform: rotate(180deg); }
details.fold[open] > summary { border-bottom: var(--hair); border-radius: var(--r-3) var(--r-3) 0 0; }
details.fold + details.fold[open] > summary { border-radius: 0; }
.fold-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
@media (min-width: 760px) { .fold-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); } }
.fold-share { display: flex; justify-content: flex-end; margin: -2px 0 var(--sp-1); }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }

/* ---- figures: a strip of numbers divided by hairlines, not a row of boxes ---- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--sp-3) 0; border-top: var(--hair); }
.tile { min-width: 0; padding: 10px var(--sp-3) var(--sp-3) 0; border-bottom: var(--hair); }
.tile:nth-child(2n) { padding-left: var(--sp-3); border-left: var(--hair); }
.tile .label { font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.tile .value { font-size: var(--fs-2xl); font-weight: var(--w-semi); font-stretch: var(--narrow); letter-spacing: -.02em; line-height: var(--lh-tight);
  margin-top: var(--sp-1); font-variant-numeric: tabular-nums; }
.tile .sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.tile .value .txt { display: block; font-size: var(--fs-lg); font-stretch: 100%; letter-spacing: -.01em; line-height: var(--lh-snug); overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: var(--hair); }
  .tile, .tile:nth-child(2n) { border-bottom: 0; padding: var(--sp-3) var(--sp-4); border-left: var(--hair); }
  .tile:first-child { padding-left: 0; border-left: 0; }
}
.hero { font-size: var(--fs-3xl); font-weight: var(--w-bold); font-stretch: var(--narrow); line-height: 1; letter-spacing: -.03em; }

/* ---- awards: an editorial result block, a coloured rule on top, no box ---- */
.awards { display: grid; grid-template-columns: 1fr; gap: var(--sp-3) var(--sp-5); }
.award { position: relative; min-width: 0; padding: var(--sp-3) 0 var(--sp-1); border-top: 3px solid var(--axis); }
.award.win { border-top-color: var(--good); }
.award.lose { border-top-color: var(--bad); }
.award .kicker { display: flex; align-items: center; gap: 6px; }
.award.win .kicker { color: var(--good-ink); }
.award.lose .kicker { color: var(--bad-ink); }
.award .kicker .ic { width: 16px; height: 16px; }
/* The award's icon becomes its seal: a ringed badge top right, in the award's colour. */
.award:has(.kicker .ic:first-child) { padding-right: 52px; }
.award .kicker .ic:first-child { position: absolute; top: var(--sp-3); right: 0; width: 42px; height: 42px; padding: 10px; border-radius: 50%;
  border: 1.5px solid currentColor; background: var(--card); stroke-width: 1.6; }
.award.compact:has(.kicker .ic:first-child) { padding-right: 40px; }
.award.compact .kicker .ic:first-child { width: 34px; height: 34px; padding: 8px; }
.award .who { font-size: var(--fs-lg); font-weight: var(--w-semi); line-height: var(--lh-snug); margin-top: var(--sp-1); }
.award .who .mgr, .award .who a { color: var(--ink); }
.award .score { font-size: var(--fs-3xl); font-weight: var(--w-bold); font-stretch: var(--narrow); letter-spacing: -.03em; line-height: 1; margin-top: var(--sp-2); }
.award .score .small { font-size: var(--fs-sm); font-weight: var(--w-med); letter-spacing: 0; color: var(--muted); }
.award .meta { font-size: var(--fs-sm); color: var(--ink-2); margin-top: var(--sp-2); }
.award-chip { margin: var(--sp-1) 0 0; }
/* Headline awards: side by side even on a phone, the winner given more room */
.awards.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); }
.award.compact .who { font-size: var(--fs-md); overflow-wrap: anywhere; }
.award.compact .score { font-size: var(--fs-2xl); }
@media (min-width: 760px) {
  .awards { grid-template-columns: 1fr 1fr; }
  .awards.two { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-6); }
  .award.compact .score { font-size: var(--fs-3xl); }
}
.last-gw { margin: calc(-1 * var(--sp-1)) 2px var(--sp-3); color: var(--ink-2); }
/* Quick links: a grid of rows inside one edge, not a cloud of pills. */
.drill { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--sp-3) 0; border: var(--edge); border-radius: var(--r-3); overflow: hidden; background: var(--card); }
.drill a { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); font-weight: var(--w-med); color: var(--ink);
  border-bottom: var(--hair); transition: background-color var(--t-fast); }
.drill a:nth-child(odd) { border-right: var(--hair); }
.drill a .ic { color: var(--ink-2); }
.drill a:hover { text-decoration: none; background: var(--card-2); }
@media (min-width: 760px) { .drill { grid-template-columns: repeat(3, minmax(0, 1fr)); } .drill a:nth-child(odd) { border-right: 0; } .drill a:not(:nth-child(3n)) { border-right: var(--hair); } }
.drill-desc a { align-items: flex-start; }
.drill-desc b { display: flex; align-items: center; gap: 6px; font-weight: var(--w-semi); }
.drill-desc small { display: block; margin-top: 2px; color: var(--ink-2); font-weight: var(--w-reg); font-size: var(--fs-xs); line-height: 1.4; }
@media (max-width: 759px) { .drill.drill-desc { grid-template-columns: 1fr; } .drill.drill-desc a { border-right: 0; } }
@media (min-width: 760px) { .drill.drill-desc { grid-template-columns: repeat(2, minmax(0, 1fr)); } .drill.drill-desc a { border-right: 0; } .drill.drill-desc a:nth-child(odd) { border-right: var(--hair); } }
.sect-title { margin: var(--sp-6) 0 var(--sp-2); font-size: var(--fs-lg); }
.card:not(.show-extra) tr.after-gap td { border-top: 2px dashed var(--axis); }
/* Tags: square-cornered labels for states (a chip played, live, you), never buttons. */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: var(--w-semi); line-height: 1.45; padding: 0 6px;
  border-radius: var(--r-1); background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.pill .ic { width: 13px; height: 13px; }
.pill.live { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad-ink); }
.pill.live::before, .st-item.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: pulse 1.6s infinite; }
.st-item.live { color: var(--bad-ink); font-weight: var(--w-bold); letter-spacing: .02em; }
.pill.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.pill.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--ink); }
.pill.chip { background: var(--accent-wash); color: var(--accent-ink); }
.pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad-ink); }
.pill.dl { background: var(--accent-wash); color: var(--accent-ink); }
.pill.dl.day { background: color-mix(in srgb, var(--warn) 24%, transparent); color: var(--ink); }
.pill.dl.soon { background: var(--bad); color: #fff; }
.pill.me { background: var(--accent); color: #fff; }
.tag-gw { font-weight: var(--w-bold); color: var(--ink); letter-spacing: .02em; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pill.live::before, .st-item.live::before { animation: none; } }

/* ---- pitch (XI view) ---- */
/* ---- the XI: half a pitch, goal at the top ---- */
.pitch-wrap { margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--card-2); }
.pitch { position: relative; overflow: hidden; padding: 10px 4px 14px;
  background: repeating-linear-gradient(to bottom, var(--grass-1) 0 46px, var(--grass-2) 46px 92px); }
.pitch .mk { position: absolute; pointer-events: none; border: 2px solid var(--pitch-line); }
.pitch .mk.box { top: -2px; left: 22%; right: 22%; height: 17%; }
.pitch .mk.six { top: -2px; left: 37%; right: 37%; height: 6%; }
.pitch .mk.half { left: -2px; right: -2px; bottom: 0; height: 0; border-width: 2px 0 0; }
.pitch .mk.circle { left: 50%; bottom: 0; width: 34%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, 50%); }
.pitch .line, .pitch-wrap .bench { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-start; gap: 3px; margin: 6px 0; }
.pitch-wrap .bench { margin: 0; padding: 8px 4px 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.bench-lbl { flex: 0 0 100%; text-align: center; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.pl { flex: 0 1 58px; min-width: 0; text-align: center; font-size: .66rem; line-height: 1.15; }
a.pl { color: inherit; text-decoration: none; }
a.pl:hover { text-decoration: none; }
a.pl:hover .nm { text-decoration: underline; }
.av { position: relative; display: block; width: 44px; height: 56px; margin: 0 auto; }
.av .face { position: relative; display: block; width: 44px; height: 56px; object-fit: contain; object-position: center bottom; }
.av .face.shirt { padding: 6px 4px 2px; }
.av .ini { position: absolute; left: 6px; right: 6px; top: 10px; bottom: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .78rem; visibility: hidden; }
.av.noimg .ini { visibility: visible; }
.av.noimg .face { display: none; }
.av .bdg { position: absolute; right: -4px; bottom: 0; width: 16px; height: 16px; }
.bdg-d { display: none; }
.av .cv { position: absolute; left: -3px; top: 0; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; font-size: .6rem; font-weight: 800;
  line-height: 16px; background: var(--accent); color: #fff; box-shadow: 0 0 0 1.5px var(--card); }
.av .cv.v { background: var(--ink-2); color: var(--card); }
.pl .nm { display: flex; align-items: center; justify-content: center; height: 1.4rem; padding: 0 1px; line-height: 1.08;
  white-space: nowrap; background: var(--card); color: var(--ink); border-radius: 4px 4px 0 0; font-weight: 600; overflow: hidden;
  contain: inline-size; }  /* fixed height so every card matches; a long name never widens its card or the grid: fitNames() sizes it */
.pl .nm.two { white-space: normal; }
.pl .pt { background: var(--ink); color: var(--card); border-radius: 0 0 4px 4px; padding: 1px 2px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl.cap .nm { box-shadow: inset 0 2px 0 var(--accent); }
.pl .subin { color: var(--good); }
.pl.subout { opacity: .45; }

/* ---- tables: flush in their panel, hairline rows, caps headers, figures narrow ---- */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
th, td { padding: 9px 6px; text-align: left; border-bottom: var(--hair); vertical-align: middle; }
th { font-size: var(--fs-caps); color: var(--muted); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; white-space: nowrap;
  position: sticky; top: 0; background: var(--card); border-bottom-color: var(--border); }
td.r, th.r { text-align: right; }
td.r { font-stretch: var(--narrow); }
tbody tr { transition: background-color var(--t-fast); }
tbody tr:hover td { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
@media (max-width: 559px) { th, td { padding-left: 4px; padding-right: 4px; } }  /* phones: 8px between columns buys a whole column's room */
td.c, th.c { text-align: center; }
tr.me td { background: var(--accent-wash); }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tbody tr.me:hover td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.sticky1 th:first-child, .sticky1 td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
tr.me td:first-child { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.mgr { font-weight: var(--w-semi); color: var(--ink); }
/* Player names link to their pages: the text keeps its colour, a faint underline says "tap me". */
.plink, .bar-row a.bl { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 32%, transparent); text-underline-offset: 2px; }
.plink:hover, .bar-row a.bl:hover { text-decoration-color: currentColor; }
.bar-row a.bl { color: var(--ink-2); }
.mgr-sub { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: var(--w-reg); max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv { display: inline-flex; align-items: center; gap: 1px; font-size: var(--fs-xs); font-weight: var(--w-semi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mv .ic { width: 12px; height: 12px; }
.mv.up { color: var(--good-ink); } .mv.down { color: var(--bad-ink); } .mv.same { color: var(--muted); }
.hide-sm { display: none; }
.show-sm { display: block; }
.show-sm .spark { margin: 2px 0 0 auto; }
.show-sm-inline { display: inline; }
.cell-sub { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: var(--w-reg); }
.cap-line { font-size: .74rem; color: var(--ink-2); font-weight: 400; margin-top: 1px; }
.cap-line .cv-in { font-size: .58rem; vertical-align: 1px; }
.nowrap { white-space: nowrap; }
.spark { display: block; }

/* ---- charts ---- */
.chart { position: relative; width: 100%; margin: 6px 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ax { stroke: var(--axis); stroke-width: 1; }
.chart .trend { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: none; opacity: .75; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .dot.lo { fill: var(--axis); }
.chart .xh { stroke: var(--ink-2); stroke-width: 1; }
.chart .lbl { fill: var(--ink-2); font-size: 11px; }
.stat-line { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--ink-2); margin: 4px 0; }
.stat-line b { color: var(--ink); }
.verdict { font-size: .88rem; margin: 6px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .78rem; color: var(--ink-2); margin: 6px 0; }
.legend .key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.legend .keyb { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.legend button { background: none; border: var(--edge); border-radius: var(--r-2); min-height: 28px; padding: 2px 8px; font-size: var(--fs-xs); color: var(--ink-2); }
.legend button.off { opacity: .45; }
.tt {
  position: fixed; z-index: 50; pointer-events: none; background: var(--card); color: var(--ink);
  border: var(--edge); border-radius: var(--r-2); padding: 6px 9px; font-size: var(--fs-xs);
  box-shadow: 0 6px 20px rgba(0,0,0,.14); max-width: 260px; display: none;
}
.tt .v { font-weight: 700; font-size: .9rem; } .tt .k { color: var(--ink-2); }
.tt .row { display: flex; align-items: center; gap: 6px; }
.tt .lk { width: 10px; height: 2px; border-radius: 1px; flex: 0 0 auto; }
details.tv { margin-top: 6px; font-size: .82rem; }
details.tv summary { cursor: pointer; color: var(--accent-ink); }
details.tv .tw { max-height: 320px; overflow: auto; }

/* horizontal bars (HTML, so labels wrap and never clip) */
.bars { display: grid; gap: 6px; margin: 6px 0; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 34%) 1fr; gap: 8px; align-items: center; font-size: .84rem; }
.bar-row .bl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { position: relative; height: 18px; display: flex; align-items: center; }
.bar-fill { height: 14px; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; flex-shrink: 0; }
.bar-fill.neg { background: var(--s2); border-radius: 4px 0 0 4px; }
.bar-fill.lo { background: var(--axis); }
.bar-val { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--ink); font-size: .8rem; white-space: nowrap; }
button.more { margin-top: var(--sp-2); background: none; border: var(--edge); border-radius: var(--r-2); min-height: 32px; padding: 2px 12px; font-size: var(--fs-sm); font-weight: var(--w-med); color: var(--ink-2); cursor: pointer; }
button.more:hover { color: var(--ink); border-color: var(--axis); }
.card:not(.show-extra) tr.extra { display: none; }
tr.batch td { background: var(--card-2); font-weight: 600; }
/* In-page contents: one quiet row of links between hairlines, scrolling sideways on a phone. */
.jump { display: flex; gap: 0; margin: var(--sp-1) 0 var(--sp-3); overflow-x: auto; scrollbar-width: none; border-top: var(--hair); border-bottom: var(--hair); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: 0 0 auto; font-size: var(--fs-sm); font-weight: var(--w-med); color: var(--ink-2); padding: 9px var(--sp-3); text-decoration: none; white-space: nowrap; }
.jump a:first-child { padding-left: 0; }
.jump a:hover { color: var(--ink); }
.card[id], .grid2[id] { scroll-margin-top: 72px; }

/* heat grids: chip calendar, H2H */
.heat td, .heat th { padding: 3px; text-align: center; font-size: .72rem; border: 2px solid var(--card); }
.heat td.cell { min-width: 28px; height: 26px; border-radius: 4px; }
.heat .wc { background: var(--s1); color: #fff; } .heat .fh { background: var(--s2); color: #fff; }
.heat .bb { background: var(--s3); color: #fff; } .heat .tc { background: var(--s7); color: #fff; }
.heat .am { background: var(--s5); color: #111; }
.h2h td.cell { min-width: 26px; font-weight: 600; }
/* In heat grids "you" is marked on the name only — a washed row would read as data. */
.heat tr.me td { background: transparent; }
.heat tr.me th { box-shadow: inset 3px 0 0 var(--accent); }
.sub-wrap { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }
.h2h th.rot { height: 90px; vertical-align: bottom; }
.h2h th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 500; }

/* manager DNA */
.dna { text-align: center; padding: 18px 14px; }
.dna .dna-label { font-size: 1.5rem; font-weight: 800; margin: 4px 0 2px; }
.dna .who { font-size: 1rem; color: var(--ink-2); }
.traits { display: grid; gap: 8px; margin: 14px 0 6px; text-align: left; }
.trait { font-size: .78rem; color: var(--ink-2); }
.trait .ends { display: flex; justify-content: space-between; }
.trait .track { position: relative; height: 8px; border-radius: 4px; background: var(--seq-1); margin: 3px 0; }
.trait .mark { position: absolute; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); transform: translateX(-50%); }

/* forms */
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; }
.form-grid .opt { font-weight: 400; color: var(--muted); font-size: .78rem; }
.form-grid input, .form-grid select { width: 100%; min-height: 44px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.row2 select { width: 100%; }
.privacy-line { display: flex; gap: var(--sp-2); align-items: flex-start; max-width: 80ch; margin: var(--sp-2) 0 var(--sp-4); color: var(--ink-2); font-size: var(--fs-sm); }
.privacy-line .ic { flex: none; margin-top: 2px; color: var(--ink-2); }
ul.plain { padding-left: 18px; margin: var(--sp-2) 0; } ul.plain li { margin-bottom: var(--sp-2); }
.okmsg { color: var(--good-ink); font-weight: 600; } .errmsg { color: var(--bad-ink); font-weight: 600; }
/* the newsletter part of Add your details: its own box inside the form */
.nl-set { display: grid; gap: var(--sp-3); min-width: 0; margin: var(--sp-1) 0 0; padding: var(--sp-4); border: var(--edge); border-radius: var(--r-3); }
.nl-set legend { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: 0 var(--sp-1); font-weight: var(--w-semi); font-size: var(--fs-md); }
.nl-set p { margin: 0; }
.form-grid label.chk { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: var(--w-reg); }
.form-grid label.chk input { margin-top: 3px; }
.nl-opts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
main.nl-page { max-width: 560px; }
.nl-page .card { margin-top: var(--sp-6); }

/* ---- the Bizarre wing: its own night sky ----
   Identity from the page (the violet night), the banner and violet accents;
   panels keep the house shape with a violet-tinted edge, never a thick stripe. */
body.wing-bizarre { background: var(--cosmic-page); }
body.wing-bizarre .subnav { background: var(--cosmic-page); }
body.wing-bizarre .subnav a.on { color: var(--cosmic-ink); border-bottom-color: var(--cosmic); }
body.wing-bizarre .top { background: color-mix(in srgb, var(--cosmic-page) 94%, transparent); }
body.wing-bizarre .card { border-color: color-mix(in srgb, var(--cosmic) 22%, var(--border)); }
body.wing-bizarre details.fold + details.fold { border-top-color: color-mix(in srgb, var(--cosmic) 12%, var(--grid)); }
body.wing-bizarre .fold-h .ic, body.wing-bizarre .tile .label .ic, body.wing-bizarre .chev { color: var(--cosmic-ink); }
body.wing-bizarre .tiles, body.wing-bizarre .tile { border-color: color-mix(in srgb, var(--cosmic) 16%, var(--grid)); }
.cosmic-banner {
  position: relative; border-radius: var(--r-4); padding: var(--sp-5) var(--sp-4); margin: var(--sp-4) 0 var(--sp-3); color: #fff; overflow: hidden;
  background: radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 38%, #fff 50%, transparent 51%),
              radial-gradient(1.5px 1.5px at 42% 78%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 12%, #fff 50%, transparent 51%),
              radial-gradient(1px 1px at 28% 58%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 62% 88%, #fff 50%, transparent 51%),
              radial-gradient(1px 1px at 93% 67%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 15%, #fff 50%, transparent 51%),
              linear-gradient(135deg, #1b1446, #3a2a86 60%, #4a3aa7);
}
.cosmic-banner h1 { color: #fff; font-size: var(--fs-2xl); display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.cosmic-banner h1 .ic { width: 28px; height: 28px; stroke-width: 1.6; }
.cosmic-banner p { color: #e6e2ff; max-width: 70ch; margin: 0; }
@media (min-width: 760px) { .cosmic-banner { padding: var(--sp-6) var(--sp-6) var(--sp-5); } .cosmic-banner h1 { font-size: 2.5rem; } }
.disclaimer {
  display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); font-weight: var(--w-semi);
  background: var(--cosmic-wash); color: var(--cosmic-ink); border-radius: var(--r-2); padding: var(--sp-2) var(--sp-3); margin: var(--sp-2) 0;
}
.disclaimer .ic { flex: none; margin-top: 1px; }
/* Correlation of the Week: the sentence and its r beside the chart (5:7). */
.cotw-grid { display: grid; gap: var(--sp-3); }
.cotw-chart .chart { margin-top: 0; }
@media (min-width: 900px) { .cotw-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-6); align-items: center; } }
.headline { font-size: var(--fs-lg); font-weight: var(--w-semi); line-height: var(--lh-snug); margin: var(--sp-2) 0; max-width: 60ch; }
.big-r { font-size: var(--fs-3xl); font-weight: var(--w-bold); font-stretch: var(--narrow); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.sky-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sign-cell { font-size: 1.3rem; }
.wall-item { border-left: 2px solid var(--cosmic); padding: var(--sp-1) var(--sp-3); margin: var(--sp-3) 0; }
.map { height: 360px; border-radius: var(--r-3); overflow: hidden; background: var(--card-2); border: var(--edge); }

/* ---- teams: GW picker, side-by-side comparison ---- */
.gwpick { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 10px; }
.gwpick select { flex: 0 1 150px; min-height: 36px; }
.gwpick .btn { white-space: nowrap; }
.moves { margin: 4px 0; padding-left: 18px; font-size: .88rem; }
.pl.shared { opacity: .42; }
.pl.diff .nm { background: var(--accent); color: #fff; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 8px; }
.cmp-head { display: flex; justify-content: space-between; gap: 6px; font-size: .9rem; border-bottom: 1px solid var(--grid); padding-bottom: 4px; margin-bottom: 4px; }
.cmp-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 6px; font-size: .8rem; line-height: 1.2; }
.cmp-row.shared { opacity: .45; }
.cmp-row.diff { background: var(--accent-wash); font-weight: 600; }
.cmp-nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmp-pts { font-weight: 700; min-width: 2.2ch; text-align: right; }
.cmp-bench { margin-top: 6px; }
.av.sm, .av.sm .face { width: 26px; height: 33px; flex: 0 0 26px; }
.av.sm .bdg { display: none; }
.av.sm .ini { left: 1px; right: 1px; top: 5px; bottom: 2px; font-size: .58rem; }
.av.sm .face.shirt { padding: 3px 2px 1px; }
.cv-in { background: var(--accent); color: #fff; border-radius: 6px; padding: 0 3px; font-size: .62rem; font-weight: 800; }
.key-diff { background: var(--accent-wash); padding: 0 4px; border-radius: 4px; font-weight: 600; color: var(--ink); }
.swing { margin: 4px 0; padding-left: 18px; }
.cmp-score { font-size: 1.05rem; margin: 6px 0; }
.cmp-pitches { display: none; }
.h2h td.cell a { display: block; color: inherit; text-decoration: none; }

/* ---- matches: the scoreboard (/matches) and a match page (/match/{id}) ----
   The scoreboard is a list of days, each one grouped list of rows: the home
   club right-aligned against a fixed middle (kick-off time, live score or
   result), the away club left-aligned after it, so every score sits on one
   vertical line down the page. Nothing else goes in a row. */
.mday { margin: var(--sp-5) 0 0; }
.mday-h { margin: 0 0 var(--sp-2); font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.mlist { list-style: none; margin: 0; padding: 0; background: var(--card); border: var(--edge); border-radius: var(--r-3); overflow: hidden; }
.mlist li + li { border-top: var(--hair); }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); align-items: center; gap: var(--sp-2);
  min-height: 56px; padding: var(--sp-2) var(--sp-4); color: var(--ink); transition: background-color var(--t-fast); }
.mrow:hover { text-decoration: none; background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.mrow.st-live { box-shadow: inset 3px 0 0 var(--bad); }
.mteam { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; font-weight: var(--w-med); }
.mteam.h { justify-content: flex-end; text-align: right; }
.mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mteam .bdg { width: 24px; height: 24px; flex: none; }
.mmid { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.1; }
.mscore, .mko { font-size: var(--fs-lg); font-weight: var(--w-bold); font-stretch: var(--narrow); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mscore i, .mbig b i { font-style: normal; margin: 0 3px; color: var(--muted); font-weight: var(--w-reg); }
.mko { color: var(--ink-2); font-weight: var(--w-semi); }
.mft { font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.mmid .pill.live { font-size: var(--fs-caps); padding: 0 5px; }
@media (max-width: 559px) {
  .mrow { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 6px; padding: var(--sp-2) var(--sp-3); }
  .mteam { gap: 6px; }
  .mteam .bdg { width: 20px; height: 20px; }
}
/* A match page's head: the scoreboard as the page's one hero (r-16), badges
   and names either side of the score, the scorers under each side. */
.mback { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-sm); }
.mhead { background: var(--card); border: var(--edge); border-radius: var(--r-4); padding: var(--sp-4) var(--sp-4) var(--sp-2); margin: 0 0 var(--sp-3); }
.mhead.st-live { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.mhead-k { margin: 0 0 var(--sp-3); text-align: center; }
.mboard { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--sp-3); }
.mside { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); min-width: 0; color: var(--ink); text-align: center; }
.mside:hover { text-decoration: none; }
.mside:hover .mclub { text-decoration: underline; }
.mbadge .bdg { width: 52px; height: 52px; }
.mclub { font-weight: var(--w-semi); font-size: var(--fs-md); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.mbig { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
.mbig b { font-size: var(--fs-3xl); font-weight: var(--w-bold); font-stretch: var(--narrow); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.mbig b.mko-big { font-size: var(--fs-2xl); color: var(--ink-2); }
.mgoals { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin: var(--sp-3) 0 0; padding-top: var(--sp-2); border-top: var(--hair); font-size: var(--fs-sm); color: var(--ink-2); }
.mgoals p { margin: 0; }
.mgoals .h { text-align: right; }
.mshare { margin: var(--sp-2) 0 0; text-align: center; }
@media (min-width: 760px) {
  .mhead { padding: var(--sp-5) var(--sp-6) var(--sp-3); }
  .mside { flex-direction: row; gap: var(--sp-3); }
  .mside.h { flex-direction: row-reverse; justify-content: flex-start; text-align: right; }
  .mside.a { justify-content: flex-start; text-align: left; }
  .mclub { font-size: var(--fs-xl); font-weight: var(--w-bold); letter-spacing: -.015em; }
  .mbadge .bdg { width: 64px; height: 64px; }
  .mboard { gap: var(--sp-5); }
}
/* This league in the match: figures, then who gained and who missed out. */
.mleague .tiles { margin-top: 0; }
.m-you { margin: var(--sp-3) 0 var(--sp-1); }
.mswing { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin: var(--sp-3) 0 var(--sp-2); padding-top: var(--sp-3); border-top: var(--hair); }
.mswing h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.mswing ol { margin: 0; padding-left: 1.3em; }
.mswing li { margin: 2px 0; }
.mswing p { margin: 0 0 var(--sp-2); }
@media (max-width: 559px) { .mswing { grid-template-columns: 1fr; gap: var(--sp-3); } }
/* Match stats as a console match-summary screen: always a dark panel (like the
   pitch is always grass), each side's figure either side of a centre line and a
   bar growing out from the middle for its share. The two sides take the
   palette's dark-surface categorical steps 1 and 2 (blue, orange), validated
   for that surface; the leading figure is full white, the other dimmed. */
.console { --c-bg: #121211; --c-bg-2: #1c1c1a; --c-line: rgba(255,255,255,.10); --c-ink: #fff; --c-dim: #a3a197;
  --c-h: #3987e5; --c-a: #d95926;
  background: var(--c-bg); color: var(--c-ink); border-radius: var(--r-3); border: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-4) var(--sp-3); margin: 0 0 var(--sp-3); }
.cs-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--c-line); }
.cs-title { font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-dim); }
.cs-team { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--w-bold); font-stretch: var(--narrow); font-size: var(--fs-lg); letter-spacing: .02em; }
.cs-team.a { justify-content: flex-end; }
.cs-team .bdg { width: 22px; height: 22px; }
.cs-team.h::after, .cs-team.a::before { content: ""; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.cs-team.h::after { background: var(--c-h); order: 3; }
.cs-team.a::before { background: var(--c-a); }
.console .bdg-l { display: none; }
.console .bdg-d { display: inline; }
.cs-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: var(--sp-2) var(--sp-3); padding: 6px 0 8px; }
.cs-v { font-size: var(--fs-lg); font-weight: var(--w-bold); font-stretch: var(--narrow); font-variant-numeric: tabular-nums; color: var(--c-dim); }
.cs-v small { font-size: var(--fs-xs); font-weight: var(--w-med); margin-left: 2px; }
.cs-v.a { text-align: right; }
.h-lead .cs-v.h, .a-lead .cs-v.a { color: var(--c-ink); }
.cs-l { font-size: var(--fs-sm); color: var(--c-dim); text-align: center; }
.cs-bar { grid-column: 1 / -1; display: flex; height: 6px; gap: 2px; }
.cs-bar i { display: block; height: 100%; border-radius: 3px; }
.cs-bar i.h { background: var(--c-h); margin-left: auto; }
.cs-bar i.a { background: var(--c-a); }
.cs-row.none .cs-bar i { background: var(--c-line); }  /* 0-0: no share to show */
.pl .subo { color: var(--muted); }
.cs-bar { justify-content: center; }
.cs-info { margin: var(--sp-3) 0 0; padding-top: var(--sp-2); border-top: 1px solid var(--c-line); font-size: var(--fs-sm); color: var(--c-dim); text-align: center; }
.cs-src { margin: var(--sp-1) 0 0; font-size: var(--fs-xs); color: var(--c-dim); text-align: center; }
.console details.tv summary { color: var(--c-dim); }
.console details.tv table, .console details.tv th, .console details.tv td { color: var(--c-ink); background: transparent; border-color: var(--c-line); }
@media (min-width: 760px) { .console { padding: var(--sp-5) var(--sp-6) var(--sp-4); } .cs-row { padding: 7px 0 9px; } }
/* Lineups: the XI pitch component, one per side; side by side from 760px. */
.lineups { display: grid; gap: var(--sp-4); }
.lu-h { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-1); font-size: var(--fs-md); font-weight: var(--w-semi); }
.lu-h .bdg { width: 20px; height: 20px; }
.lu-bench { margin: var(--sp-2) 0 0; }
span.pl { cursor: default; }
@media (min-width: 760px) { .lineups { grid-template-columns: 1fr 1fr; } }
/* The timeline: home events to the left of the minute, away to the right. */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: var(--sp-2); padding: 5px 0; border-top: var(--hair); font-size: var(--fs-sm); }
.tl li:first-child { border-top: 0; }
.tl .tl-min { grid-column: 2; grid-row: 1; text-align: center; font-weight: var(--w-semi); font-stretch: var(--narrow); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl .ic { width: 16px; height: 16px; }
.tl .ic.goal, .tl .ic.pen { color: var(--ink); }
.tl .ic.og { color: var(--bad-ink); }
.tl .ic.yc { color: #d9a100; }
.tl .ic.rc { color: var(--bad); }
.tl .ic.sub { color: var(--muted); }
.tl li.tl-h .ic, .tl li.tl-h .tl-t { grid-row: 1; grid-column: 1; }
.tl li.tl-h { direction: ltr; }
.tl li.tl-h .tl-t { text-align: right; padding-right: 22px; }
.tl li.tl-h .ic { justify-self: end; }
.tl li.tl-a .ic, .tl li.tl-a .tl-t { grid-row: 1; grid-column: 3; }
.tl li.tl-a .tl-t { padding-left: 22px; }
.tl li.tl-a .ic { justify-self: start; }
/* The bonus-point table: the top three carry a filled chip (outlined while provisional). */
table.bps td, table.bps th { padding: 5px 6px; }
table.bps tr.bon td { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
table.bps tr.me.bon td { background: var(--accent-wash); }
.bchip { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: var(--r-1);
  font-weight: var(--w-bold); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; background: var(--ink); color: var(--card); }
.bchip.tbc { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.mstats { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.mstats .ic { width: 14px; height: 14px; }
.mstats .ic.yc { color: #d9a100; }
.mstats .ic.rc { color: var(--bad); }
.mstats .st-a { font-weight: var(--w-semi); }

/* ---- players: /player/{id} and /players ----
   The player card: a portrait slab flush to the left edge, like FPL's own
   cards, identity and price beside it, figures below. Not the manager hero. */
.phero-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "photo id" "more more"; margin: var(--sp-4) 0 var(--sp-3);
  background: var(--card); border: var(--edge); border-radius: var(--r-3); overflow: hidden; }
.phero-photo { grid-area: photo; display: flex; align-items: flex-end; justify-content: center; background: var(--card-2); border-right: var(--hair); padding-top: var(--sp-3); }
.phero-photo .av.lg, .phero-photo .av.lg .face { width: 104px; height: 132px; }
.phero-id { grid-area: id; min-width: 0; padding: var(--sp-4) var(--sp-4) var(--sp-3); }
.phero-club { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.phero-club a { color: inherit; }
.phero-club .bdg { width: 16px; height: 16px; }
.phero-name { margin: var(--sp-1) 0 0; font-size: var(--fs-2xl); font-weight: var(--w-bold); letter-spacing: -.025em; line-height: var(--lh-tight); overflow-wrap: anywhere; }
.phero-full { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.phero-price { margin-top: var(--sp-2); font-size: var(--fs-md); }
.phero-price b { font-size: var(--fs-xl); font-weight: var(--w-bold); font-stretch: var(--narrow); letter-spacing: -.02em; }
.phero-st { margin-top: var(--sp-2); }
.phero-meter { margin-top: var(--sp-1); display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--sp-2); }
.phero-meter a:hover { text-decoration: none; }
.phero-more { grid-area: more; min-width: 0; padding: 0 var(--sp-4) var(--sp-2); border-top: var(--hair); }
.phero-more .news { margin: var(--sp-3) 0 0; }
.phero-more .tiles { margin: var(--sp-2) 0 0; border-top: 0; }
.phero-share { margin: var(--sp-2) 0; }
@media (min-width: 760px) {
  .phero-card { grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "photo id" "photo more"; grid-template-rows: auto 1fr; }
  .phero-photo { padding-top: var(--sp-5); }
  .phero-photo .av.lg, .phero-photo .av.lg .face { width: 172px; height: 219px; }
  .phero-photo .av.lg .bdg { width: 34px; height: 34px; right: -2px; }
  .phero-id { padding: var(--sp-5) var(--sp-5) var(--sp-2); }
  .phero-name { font-size: 2.5rem; }
  .phero-more { border-top: 0; padding: 0 var(--sp-5) var(--sp-1); }
  .phero-more .tiles { border-top: var(--hair); }
}
/* Differentials: their own status colour (--status-differential), whatever the
   position filter. A square tag says so in words with the target icon, so the
   colour never carries it alone; a row gets a purple edge and wash (mine AND a
   differential: the purple edge on the blue wash). */
.tag-df { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; padding: 0 5px; border-radius: var(--r-1); vertical-align: 1px;
  font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; line-height: 1.55;
  background: var(--status-differential); color: var(--status-differential-on); white-space: nowrap; }
.tag-df .ic { width: 11px; height: 11px; }
tr.df td { background: var(--status-differential-wash); }
tr.df td:first-child { box-shadow: inset 3px 0 0 var(--status-differential); background: color-mix(in srgb, var(--status-differential) 9%, var(--card)); }
tbody tr.df:hover td { background: color-mix(in srgb, var(--status-differential) 15%, transparent); }
table.plist tr.df td.sorted { background: color-mix(in srgb, var(--status-differential) 13%, transparent); }
tr.me.df td { background: var(--accent-wash); }
tr.me.df td:first-child { box-shadow: inset 3px 0 0 var(--status-differential); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.phero-card.is-df { border-color: color-mix(in srgb, var(--status-differential) 50%, var(--border)); }
.phero-card.is-df .phero-photo { background: var(--status-differential-wash); box-shadow: inset 0 3px 0 var(--status-differential); }
.phero-df { margin: var(--sp-2) 0 0; line-height: var(--lh-snug); }
.phero-df .tag-df { margin: 0 4px 0 0; }
.cell-sub .bdg { width: 14px; height: 14px; vertical-align: -3px; }
ul.duties { list-style: none; padding: 0; margin: var(--sp-2) 0 var(--sp-3); display: grid; gap: var(--sp-2); }
ul.duties li { display: flex; align-items: center; gap: var(--sp-2); }
ul.duties .ic { width: 22px; height: 22px; color: var(--ink-2); }
/* FPL's price meter: a centred bar, filling right towards a rise, left towards a fall. */
.meter { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; white-space: nowrap; }
.mbar { position: relative; display: inline-block; width: 46px; height: 7px; border-radius: 4px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--grid); overflow: hidden; }
.mbar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .6; }
.mbar i { position: absolute; top: 0; bottom: 0; }
.mbar i.up { background: var(--good); } .mbar i.down { background: var(--bad); }
.meter b { min-width: 2.6em; text-align: right; }
.marrow { display: inline-flex; }
.marrow .ic { width: 10px; height: 10px; margin-right: -3px; }
.marrow.pos { color: var(--good-ink); } .marrow.neg { color: var(--bad-ink); }
.meter.big { font-size: 1rem; gap: 8px; }
.meter.big .mbar { width: 160px; height: 12px; border-radius: 6px; }
.meter-big { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0 8px; font-weight: 600; }
/* The next five fixtures in a list row. */
.fx5 { display: inline-flex; gap: 2px; }
.fx5 > span { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 30px; padding: 1px 2px; border-radius: 4px; font-size: .64rem; font-weight: 700; line-height: 1.15; }
.fx5 small { font-size: .56rem; font-weight: 600; opacity: .85; }
table.plist.phone .fx5 > span { min-width: 25px; font-size: .6rem; padding: 3px 1px; }
.chips.views { align-items: center; }
/* Phones: chip rows scroll sideways instead of wrapping. */
@media (max-width: 559px) {
  .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px 2px; }
  .chips.scroll::-webkit-scrollbar { display: none; }
  .chips.scroll > * { flex: 0 0 auto; }
  table.plist.phone .meter { flex-direction: column; align-items: center; gap: 1px; }
  table.plist.phone .meter .mbar { width: 38px; height: 6px; }
  table.plist.phone .meter b { min-width: 0; text-align: center; font-size: .72rem; }
  table.plist.phone .marrow { display: none; }
}
.chips.views .small { margin-right: 2px; }
ul.heads { padding-left: 18px; }
/* Transfer tools */
button.pl { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; min-height: 0; }
.plan-pl.sel .face, .plan-pl.sel .av { outline: 3px solid var(--accent); outline-offset: 1px; border-radius: 8px; }
.plan-pl.new .nm { background: var(--accent-wash); border-radius: 4px; }
.pln-ctl { display: grid; gap: 10px; }
.pln-ctl label { display: grid; gap: 2px; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.pln-ctl select { min-height: 38px; }
.ctl-lbl { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
.pln-ctl label.chk, .bb-ctl label.chk { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: .86rem; color: var(--ink); }
.chk input { width: auto; min-height: 0; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 34px; height: 34px; min-height: 0; border-radius: 50%; padding: 0; font-size: 1.1rem; }
.stepper b { min-width: 1.2em; text-align: center; font-size: 1.1rem; }
.pick-card h2 { font-size: 1rem; }
.pick-top { display: flex; gap: 8px; margin-bottom: 6px; }
.pick-top input { flex: 1; min-height: 38px; }
table.pick tr.dim td { opacity: .55; }
.small-btn { min-height: 30px; padding: 3px 12px; font-size: .82rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
ul.moves { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; }
ul.moves li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: var(--card-2); border-radius: 6px; padding: 6px 8px; }
.fbars { display: grid; gap: 10px; margin: 10px 0; }
.fbar-h { display: flex; justify-content: space-between; font-size: .86rem; }
.fbar-t { position: relative; height: 10px; border-radius: 5px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--grid); overflow: hidden; margin: 3px 0 2px; }
.fbar-t i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 5px; }
.fbar-t i.hi { background: var(--good); } .fbar-t i.lo { background: var(--bad); }
.fbar-t .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .6; }
.bscore { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; width: 64px; height: 18px; }
.bscore i { position: absolute; left: 0; top: 4px; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--s1) 35%, transparent); }
.bscore b { position: relative; }
.mb5 { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.mb5 i { display: block; width: 7px; background: var(--s1); border-radius: 2px 2px 0 0; }
.bb-ctl { display: grid; gap: 8px; margin: 8px 0; }
.bb-ctl label { display: grid; gap: 2px; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.bb-ctl select { min-height: 36px; }
.bb-w { display: grid; gap: 10px; margin: 8px 0; }
.bb-w label { display: grid; gap: 2px; font-size: .86rem; }
.bb-w label > span:first-child { display: flex; justify-content: space-between; }
.bb-w input[type=range] { width: 100%; min-height: 0; padding: 0; }
.tc-grid { display: grid; gap: 12px; }
.tc-grid h2 { font-size: .95rem; margin: 0 0 4px; }
.tc-grid input { width: 100%; min-height: 40px; }
.tc-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; }
.tc-chip > span { flex: 1; min-width: 0; line-height: 1.25; }
.tc-res { display: grid; gap: 2px; margin-top: 6px; max-height: 320px; overflow-y: auto; }
.tc-opt { display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--grid); border-radius: 0; padding: 5px 2px; font: inherit; color: inherit; cursor: pointer; min-height: 0; }
.tc-opt:hover { background: var(--card-2); }
.tc-score { display: flex; align-items: center; gap: 14px; }
.tc-num { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; border: 5px solid var(--grid); }
.tc-num.ok { border-color: var(--good); } .tc-num.warn { border-color: var(--warn); } .tc-num.bad { border-color: var(--bad); }
@media (max-width: 559px) {
  .pln-ctl { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .pln-ctl > label:first-child, .pln-ctl > label.chk { grid-column: 1 / -1; }
  .pln-ctl .chips button { padding: 3px 9px; }
  .bscore { width: 44px; }
  table.bb td, table.bb th { padding: 5px 3px; }
}
@media (min-width: 560px) {
  .pln-ctl { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, 1.2fr); align-items: end; }
  .pln-ctl p { grid-column: 1 / -1; }
  .tc-grid { grid-template-columns: 1fr 1fr; }
  .bb-ctl { grid-template-columns: 220px 1fr; align-items: end; }
  .bb-w { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* Clubs */
.clink { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; }
.clink:hover { text-decoration: none; }
.clink:hover span { text-decoration: underline; }
.clist .abbr { display: none; }
.tile .clink.tl { font-size: 1rem; }
/* The club masthead: a crest plate, then the club; record as result tags. */
.chero-card { margin-top: var(--sp-4); }
.chero { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-2); }
.crest-plate { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--card-2); border: var(--hair); }
.chero-id { min-width: 0; }
.chero-id .kicker { margin: 0; }
.chero h1 { margin: 2px 0 var(--sp-2); font-size: var(--fs-2xl); font-weight: var(--w-bold); letter-spacing: -.025em; line-height: var(--lh-tight); }
.chero-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-2); margin: 0; font-size: var(--fs-sm); }
.res-tag { display: inline-flex; align-items: center; padding: 0 6px; border-radius: var(--r-1); font-size: var(--fs-xs); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.res-tag.w { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.res-tag.d { background: var(--card-2); color: var(--ink-2); }
.res-tag.l { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad-ink); }
img.chero-badge { width: 60px; height: 60px; }
@media (min-width: 760px) { .crest-plate { width: 112px; height: 112px; } img.chero-badge { width: 76px; height: 76px; } .chero h1 { font-size: 2.5rem; } }
.key-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 3px; }
@media (max-width: 559px) {
  .clist .full { display: none; }
  .clist .abbr { display: inline; }
}
@media (min-width: 560px) { .chips.views.show-sm { display: none; } }
ul.heads li { margin-bottom: 6px; }
.av.lg, .av.lg .face { width: 88px; height: 112px; }
.av.lg .bdg { width: 26px; height: 26px; right: -6px; }
.av.lg .ini { left: 8px; right: 8px; top: 18px; bottom: 6px; font-size: 1.5rem; }
.av.lg .face.shirt { padding: 12px 8px 4px; }
.news { background: color-mix(in srgb, var(--warn) 20%, transparent); border-radius: 8px; padding: 7px 10px; font-size: .88rem; }
.news.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.names { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; }
.res { font-weight: 700; }
.res.w { color: var(--good-ink); } .res.l { color: var(--bad-ink); } .res.d { color: var(--muted); }
.fxrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0; }
.fx { border-radius: 8px; padding: 5px 2px; text-align: center; line-height: 1.2; min-width: 0; }
.fx b { display: block; font-size: .95rem; letter-spacing: .02em; }
.fx-top { display: flex; justify-content: space-between; gap: 2px; padding: 0 3px; font-size: .68rem; opacity: .85; }
.fx-ha { display: block; font-size: .68rem; opacity: .85; }
.fx-d { font-weight: 800; }
.fdr-1 { background: var(--fdr-1); color: var(--fdr-1-ink); } .fdr-2 { background: var(--fdr-2); color: var(--fdr-2-ink); }
.fdr-3 { background: var(--fdr-3); color: var(--fdr-3-ink); } .fdr-4 { background: var(--fdr-4); color: var(--fdr-4-ink); }
.fdr-5 { background: var(--fdr-5); color: var(--fdr-5-ink); }
.pl-filters { display: grid; gap: 8px; margin-bottom: 6px; }
.pl-filters input[type="search"] { width: 100%; min-height: 40px; }
/* Filters: square-shouldered toggles (r-2); the pressed one inverts. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 32px; padding: 3px 11px; border-radius: var(--r-2); font-size: var(--fs-sm); font-weight: var(--w-med); color: var(--ink-2); }
.chips button:hover { color: var(--ink); border-color: var(--axis); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.pl-sel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pl-sel label { display: grid; gap: 2px; font-size: .74rem; color: var(--ink-2); font-weight: 600; }
.pl-sel select, .pl-cols select { width: 100%; min-height: 36px; }
.pl-cols { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
table.plist td, table.plist th { padding: 5px 4px; }
table.plist .pill { font-size: .68rem; padding: 1px 6px; }
table.plist td.sorted { background: color-mix(in srgb, var(--ink) 3%, transparent); }
table.plist tr.me td.sorted { background: var(--accent-wash); }
.prow { display: flex; align-items: center; gap: 8px; color: var(--ink); min-width: 0; }
.prow:hover { text-decoration: none; }
.prow:hover b { text-decoration: underline; }
.pinfo { min-width: 0; line-height: 1.25; }
.pinfo b { margin-right: 4px; }
.av.xs { width: 36px; height: 36px; flex: 0 0 36px; margin: 0; border-radius: 50%; overflow: hidden; background: var(--card-2); }
.av.xs .face { width: 36px; height: 36px; object-fit: cover; object-position: center top; }
.av.xs .face.shirt { padding: 4px; object-fit: contain; }
.av.xs .bdg { display: none; }
.av.xs .ini { inset: 0; font-size: .68rem; }
th .sort-ic { width: 9px; height: 9px; margin-left: 3px; vertical-align: 0; }
.th-sort { background: none; border: 0; padding: 0; min-height: 0; border-radius: 0; font: inherit; color: inherit; cursor: pointer; }
th.sorted, th.sorted .th-sort { color: var(--ink); }
@media (max-width: 379px) {  /* 360px Androids: a little tighter, so the list never scrolls sideways */
  .av.xs, .av.xs .face { width: 32px; height: 32px; flex-basis: 32px; }
  .prow { gap: 6px; }
  table.plist td, table.plist th { padding: 5px 3px; }
}

/* ---- looking ahead: /fixtures and the GW preview ---- */
.fx-controls { display: grid; gap: 8px; margin-bottom: 8px; }
.chips a.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 3px 11px; border-radius: var(--r-2); font-size: var(--fs-sm); font-weight: var(--w-med);
  color: var(--ink-2); background: var(--card); border: var(--edge); text-decoration: none; }
.chips a.chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.fx-who { display: grid; gap: 2px; font-size: .74rem; color: var(--ink-2); font-weight: 600; }
.fx-who select { min-width: 0; width: 100%; min-height: 36px; }
table.fdr-grid { border-collapse: separate; border-spacing: 2px; table-layout: fixed; font-size: .74rem; }
.fdr-grid th, .fdr-grid td { border: 0; padding: 3px 1px; text-align: center; border-radius: 5px; line-height: 1.15; }
.fdr-grid thead th { position: static; background: none; font-size: .68rem; padding: 2px 0; }
.fdr-grid thead th:first-child { width: 74px; text-align: left; padding-left: 4px; }
.fdr-grid thead th:last-child { width: 34px; }
.fdr-grid tbody th { position: static; text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; padding: 3px 2px 3px 4px; background: var(--card); color: var(--ink); }
.fdr-grid tbody th a { color: inherit; }
.fdr-grid .bdg { width: 16px; height: 16px; vertical-align: -4px; }
.fdr-grid td b { display: block; font-size: .72rem; letter-spacing: .01em; }
.fdr-grid td span { display: block; font-size: .6rem; opacity: .85; }
.fdr-grid td.dbl { padding: 0; background: none; }
.fdr-grid td.dbl div { border-radius: 4px; padding: 1px 0; }
.fdr-grid td.dbl div + div { margin-top: 2px; }
.fdr-grid td.run { font-weight: 700; font-size: .8rem; background: none; }
.fdr-grid .fx-blank { background: var(--card-2); color: var(--muted); }
.fdr-grid .dim { opacity: .38; }
.fdr-grid tr.mine th { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }
.fdr-grid .full { display: none; }
.cnt { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 800; line-height: 16px; text-align: center; }
.fdr-key { display: inline-flex; gap: 2px; vertical-align: -2px; margin-right: 4px; }
.fdr-key span { display: inline-block; width: 16px; height: 16px; border-radius: 4px; font-size: .62rem; font-weight: 800; line-height: 16px; text-align: center; }
.fxc { display: inline-block; border-radius: 5px; padding: 1px 5px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.fxc + .fxc { margin-left: 2px; }
.fxc.fx-blank { background: var(--card-2); color: var(--muted); }
.pv-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--grid); font-size: .86rem; }
.pv-row:last-child { border-bottom: 0; }
.pv-nm { flex: 1; min-width: 0; line-height: 1.25; }
.pv-r { flex: 0 0 auto; text-align: right; }
.card.preview { border-top: 3px solid var(--accent); }
.card.preview h3 { margin-top: 14px; }
.prov { display: block; font-size: .64rem; line-height: 1.05; font-weight: 600; color: var(--accent-ink); }  /* wraps under a phone's narrow score column */
.prov-note { color: var(--accent-ink); }
.hurt-sum { font-size: 1rem; margin: 2px 0 4px; }
b.neg { color: var(--bad-ink); } b.pos { color: var(--good-ink); }
.hurt { border-bottom: 1px solid var(--grid); padding-bottom: 8px; margin-bottom: 4px; }

/* ---- DNA share card page ---- */
.share-card { max-width: 440px; margin: 16px auto; }

@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hide-sm { display: table-cell; }
  .show-sm, .show-sm-inline { display: none; }
  .pl { flex-basis: 78px; font-size: .74rem; }
  .pl .nm { height: 1.55rem; }
  .av, .av .face { width: 56px; height: 71px; }
  .av .bdg { width: 20px; height: 20px; }
  .av.lg, .av.lg .face { width: 110px; height: 140px; }
  .av.lg .bdg { width: 30px; height: 30px; }
  .phero h1 { font-size: 1.8rem; }
  .pl-sel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pl-cols { display: none; }
  .prov { white-space: nowrap; font-size: .68rem; }
  .fdr-grid .full { display: inline; }
  .fdr-grid .abbr { display: none; }
  table.fdr-grid { font-size: .8rem; }
  .fdr-grid thead th:first-child { width: 170px; }
  .fdr-grid thead th:last-child { width: 48px; }
  .fdr-grid td b { font-size: .8rem; }
  .fdr-grid td span { font-size: .66rem; }
  .fx-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: center; }
  .leaders { grid-template-columns: 1fr 1fr; }
  .mgif, .mgif img, .mgif .gif-ph { width: 180px; }
  .mgif .gif-ph { height: 135px; }
}
@media (min-width: 760px) {
  body { font-size: 15.5px; }
  .top { position: sticky; top: 0; flex-wrap: nowrap; backdrop-filter: blur(8px); }
  .status { order: 2; flex: 1 1 auto; }
  .top-actions { order: 3; margin-left: 0; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; }
  .awards { grid-template-columns: 1fr 1fr; }
  .sky-grid { grid-template-columns: repeat(4, 1fr); }
  .mgr-sub { max-width: 260px; }
  .me-pick select { max-width: 240px; }
}
@media (forced-colors: active) {
  .bar-fill, .heat td.cell, .pl .pt { forced-color-adjust: none; }
}
@media print {
  .top, .tiers, .subnav, .foot, .share { display: none; }
  .card { break-inside: avoid; }
}
@media (min-width: 760px) {
  .cmp-pitches { display: grid; }
  .cmp-lists { display: none; }
}

/* ---- the side column: news, videos and X beside player and club pages ----
   Phones and tablets: under the page. 1100px and up: a column on the right,
   the page widening so the main column keeps its room. */
main.has-side { max-width: 1320px; }
.with-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.side-main, .side { min-width: 0; }
.side-card h2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 1.05rem; }
.side-card h2 .small { font-weight: 400; }
.side-note { margin: 10px 0 0; font-size: .74rem; }
.nw-big, .nw-row { display: block; color: var(--ink); }
a.nw-big:hover, a.nw-row:hover { text-decoration: none; }
a.nw-big:hover .nw-t, a.nw-row:hover b, .yt-txt b:hover { text-decoration: underline; }
.nw-big { margin: 4px 0 2px; padding-bottom: 10px; }
.nw-big img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--card-2); }
.nw-big .nw-t { display: block; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.nw-big img + .nw-t { margin-top: 8px; }
.nw-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--grid); }
.nw-row img, .nw-row .nw-ph { width: 104px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--card-2); }
.nw-row img { display: block; }
.nw-row b, .yt-txt b { display: block; font-weight: 600; font-size: .88rem; line-height: 1.3; }
.nw-ph { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: 1.5rem; }
.nw-m { display: block; margin-top: 3px; font-size: .74rem; line-height: 1.35; color: var(--muted); }
.nw-m .tn { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 999px; font-weight: 700; color: var(--ink);
  background: color-mix(in srgb, var(--warn) 24%, transparent); }
.yt { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--grid); }
.yt.big { display: block; border-top: 0; padding-top: 4px; }
.yt.big .yt-txt, .yt.playing .yt-txt { margin-top: 8px; }
.yt.big .yt-txt b { font-size: 1rem; font-weight: 700; }
.yt.playing { display: block; }
.yt-btn { position: relative; display: block; width: 100%; min-height: 0; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #000; }
.yt-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(0,0,0,.66); transition: background .15s; }
.yt-play::after { content: ""; position: absolute; left: 18px; top: 14px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.yt:not(.big) .yt-play { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.yt:not(.big) .yt-play::after { left: 12px; top: 9px; border-width: 7px 0 7px 11px; }
.yt-btn:hover .yt-play, .yt-btn:focus-visible .yt-play { background: var(--bad); }
.yt-ext { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.72); color: #fff; font-size: .68rem; font-weight: 700; }
a.yt-btn:hover { text-decoration: none; }
.yt-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* a match's official clip: the Premier League's site has no player to embed, so it's a link out */
.plclip { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: var(--hair); color: var(--ink); }
.plclip.big { display: block; border-top: 0; padding-top: var(--sp-1); }
a.plclip:hover { text-decoration: none; }
a.plclip:hover .plc-t b { text-decoration: underline; }
.plc-img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-2); overflow: hidden; background: #000; }
.plc-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plclip:not(.big) .yt-play { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.plclip:not(.big) .yt-play::after { left: 12px; top: 9px; border-width: 7px 0 7px 11px; }
.plclip:hover .yt-play, .plclip:focus-visible .yt-play { background: var(--bad); }
.plc-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: var(--r-1); background: rgba(0,0,0,.72); color: #fff; font-size: var(--fs-caps); font-weight: 700; font-variant-numeric: tabular-nums; }
.plc-t b { display: block; font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.plclip.big .plc-t { display: block; margin-top: var(--sp-2); }
.plclip.big .plc-t b { font-size: var(--fs-md); font-weight: 700; }
/* no clip yet: a frame the size of the clip to come, saying when to expect it */
.plc-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); aspect-ratio: 16 / 9; margin: var(--sp-1) 0 0;
  padding: var(--sp-4); border: 1px dashed var(--border); border-radius: var(--r-2); background: var(--card-2); text-align: center; color: var(--muted); }
.plc-wait .ic { width: 28px; height: 28px; color: var(--muted); }
.plc-wait p { margin: 0; max-width: 34ch; font-size: var(--fs-sm); line-height: 1.4; }
.plc-meanwhile { margin: var(--sp-3) 0 0; }
.plc-meanwhile + .plclip, .plc-meanwhile + .nw-row { padding-top: var(--sp-1); border-top: 0; }
.side-more > summary { cursor: pointer; padding: 10px 0 2px; border-top: 1px solid var(--grid); color: var(--accent-ink); font-size: .84rem; font-weight: 600; }
.side-more[open] > summary { padding-bottom: 4px; }
.x-chips { margin: 2px 0 10px; }
.x-chips button { font-size: .8rem; padding: 3px 10px; }
.x-box { min-height: 48px; }
.x-box .btn { margin-bottom: 4px; }
.x-open { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .yt-play { transition: none; } }
@media (min-width: 700px) and (max-width: 1099px) {
  /* a tablet: the three cards side by side under the page, not one very tall stack */
  .side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
  .side.has-top > .side-card { grid-column: 1 / -1; }
  .side.has-top .nw-big { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--sp-4); align-items: center; }
  .side.has-top .nw-big img { grid-row: span 2; }
  .side.has-top .nw-big img + .nw-t { margin-top: 0; align-self: end; }
  .side.has-top .nw-big .nw-m { align-self: start; }
}
@media (max-width: 1099px) {
  /* a match's clip sits under the score until the column fits beside the page */
  .side .hl-side { display: none; }
  .hl-top .plclip.big { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: var(--sp-3); align-items: center; }
  .hl-top .plclip.big .plc-t { margin-top: 0; }
}
@media (min-width: 1100px) {
  .with-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .hl-top { display: none; }
}
@media print { .side { display: none; } }

/* ---- the command palette: / or Ctrl/Cmd+K from anywhere ---- */
.cmdk { width: min(640px, calc(100vw - 24px)); max-height: min(580px, calc(100vh - 80px)); margin: 10vh auto auto; padding: 0;
  border: var(--edge); border-radius: var(--r-3); background: var(--card); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, .28); overflow: hidden; }
.cmdk[open] { display: flex; flex-direction: column; }
.cmdk::backdrop { background: rgba(8, 8, 8, .44); }
.cmdk-in { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2) 0 var(--sp-4); border-bottom: var(--hair); color: var(--ink-2); }
.cmdk-in .ic { width: 20px; height: 20px; }
.cmdk-in input { flex: 1; min-width: 0; border: 0; background: none; min-height: 56px; padding: 0; font-size: var(--fs-lg); color: var(--ink); outline: none; }
.cmdk-x { border: 0; background: none; padding: 6px; min-height: 0; }
.cmdk-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-2) var(--sp-2); }
.cmdk-gh { margin: var(--sp-3) var(--sp-2) var(--sp-1); font-size: var(--fs-caps); font-weight: var(--w-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.cmdk-o { display: flex; align-items: center; gap: var(--sp-3); padding: 7px var(--sp-2); border-radius: var(--r-2); cursor: pointer; }
.cmdk-o[aria-selected="true"] { background: var(--accent-wash); }
.cmdk-lead { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); color: var(--ink-2); overflow: hidden; }
.cmdk-lead .ic { width: 16px; height: 16px; }
.cmdk-lead .bdg { width: 20px; height: 20px; }
.cmdk-face { width: 30px; height: 30px; object-fit: cover; object-position: center top; }
.cmdk-t { flex: 1; min-width: 0; line-height: 1.3; }
.cmdk-t b { display: block; font-weight: var(--w-semi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-t small { display: block; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-go { width: 16px; height: 16px; color: var(--accent-ink); opacity: 0; transition: opacity var(--t-fast); }
.cmdk-o[aria-selected="true"] .cmdk-go { opacity: 1; }
.cmdk-none { margin: 0; padding: var(--sp-6) var(--sp-3); text-align: center; color: var(--muted); }
.cmdk-foot { display: flex; gap: var(--sp-4); margin: 0; padding: var(--sp-2) var(--sp-4); border-top: var(--hair); font-size: var(--fs-xs); color: var(--muted); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 3px; }
@media (max-width: 559px) { .cmdk { margin-top: 8px; max-height: calc(100vh - 16px); } .cmdk-foot { display: none; } }
@media (min-width: 900px) {
  .search-btn { min-width: 150px; justify-content: flex-start; }
  .search-btn .search-lbl { display: inline; font-size: var(--fs-sm); }
  .search-btn kbd { display: inline-block; margin-left: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .cmdk[open] { animation: cmdk-in 160ms var(--ease) both; }
  .cmdk[open]::backdrop { animation: vt-fade 160ms var(--ease) both; }
}
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } }

/* ---- contrast (WCAG AA, checked against the palette) ----
   White on the accent blue is 4.4:1 in light and 3.6:1 in dark: short of AA
   for button-sized text. Primary buttons and the small white-on-accent labels
   use the palette's own deeper accent-ink in light, and dark text in dark;
   likewise the under-an-hour deadline tag in dark. No palette value changes. */
.btn:not(.ghost), .pill.me, .cv-in, .av .cv:not(.v), .cnt, .pl.diff .nm { background: var(--accent-ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.btn:not(.ghost), .pill.me, .cv-in, .av .cv:not(.v), .cnt, .pl.diff .nm) { background: var(--accent); color: var(--page); }
  :root:not([data-theme="light"]) .pill.dl.soon { color: var(--page); }
}
:root[data-theme="dark"] :is(.btn:not(.ghost), .pill.me, .cv-in, .av .cv:not(.v), .cnt, .pl.diff .nm) { background: var(--accent); color: var(--page); }
:root[data-theme="dark"] .pill.dl.soon { color: var(--page); }

/* ==== Motion: only where it says something ====
   Page changes use the browser's View Transitions: a quick cross-fade, and a
   row that opens a profile grows into its hero (and shrinks back). Charts,
   award blocks and bars ease in as they scroll into view (CSS scroll-driven
   animation, on the compositor). Nothing else moves; reduced motion: nothing. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 140ms var(--ease) both vt-out; }
  ::view-transition-new(root) { animation: 240ms var(--ease) 30ms both vt-in; }
  ::view-transition-group(vt-hero) { animation-duration: 360ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  ::view-transition-old(vt-hero) { animation: 180ms var(--ease) both vt-out; }
  ::view-transition-new(vt-hero) { animation: 320ms var(--ease) both vt-fade; }
  main.page-in { animation: vt-in 220ms var(--ease) both; }
  .prow .av.xs { transition: transform var(--t-fast) var(--ease); }
  .prow:hover .av.xs { transform: scale(1.06); }
  a.btn:active { transform: translateY(1px); }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  .top { view-transition-name: vt-top; }  /* sticky here, so it stays put while the page changes */
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes vt-fade { from { opacity: 0; } }
/* Loading: a thin bar at the top, only if a page takes more than a moment. */
html.is-loading body::before {
  content: ""; position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 35% 100%;
  animation: load-slide 1.1s ease-in-out infinite;
}
@keyframes load-slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { html.is-loading body::before { animation: none; background: var(--accent); opacity: .5; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .chart, .award, .reveal { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 5% entry 60%; }
    .bar-fill, .fbar-t i { transform-origin: left center; animation: grow-x linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
    .bar-fill.neg { transform-origin: right center; }
    .tw .chart, .tw .bar-fill, .side .chart { animation: none; }  /* inside a sideways scroller the timeline isn't the page's */
  }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
