/* Agentic AI Women’s Football League — design system (P4; P57 new look).
   P57: a calm white and light-grey base (black at night), soft-black type, one blue for actions, and a few vivid colour blocks.
   Club crests and kits still carry the clubs' colours. Every colour is a token here; the stylesheets use the tokens.
   Type: Inter (variable) for everything on the public site. Big Shoulders stays for the 3D viewer only.
   Fonts: SIL OFL 1.1 (see FONTS-LICENSE-OFL.txt). */

@font-face { font-family: "Inter"; src: url(/ui/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  /* night (default) */
  --bg: #000000;
  --bg-deep: #161617;       /* alternate sections */
  --surface: #1d1d1f;
  --surface-2: #2c2c2e;
  --line: #48484a;
  --line-soft: #2c2c2e;
  --ink: #f5f5f7;
  --ink-2: #d1d1d6;
  --ink-3: #a1a1a6;
  --flood: #2997ff;         /* the one action colour: primary buttons, focus ring */
  --flood-ink: #000000;
  --link: #2997ff;
  --live: #ff5a4a;
  --warn-ink: #f5b544;
  --win: #4ade80; --draw: #a3b8ac; --loss: #ff7a6b;
  --turf-a: #1c5a39; --turf-b: #195234; --chalk-line: rgba(237, 243, 236, .78);
  /* player ratings: white text on each, at least 4.5:1, both themes */
  --rate-top: #0e7a3c; --rate-good: #2b8052; --rate-ok: #55705f; --rate-low: #9a5a3c;
  --glow: rgba(255, 223, 140, .30);
  --shadow: none;           /* the new look has no shadows */

  /* colour blocks, the same in both themes: white text on each (orange takes dark text) */
  --pop-pink: #e0115f; --pop-blue: #0071e3; --pop-green: #0a8443; --pop-violet: #8a2be2; --pop-orange: #ff9f0a; --pop-orange-ink: #1d1d1f;
  --hi: #ffe14d;            /* highlighter */
  --act-bg: #b9f5d0; --act-ink: #1d1d1f; --watch-bg: #ffe14d; --watch-ink: #1d1d1f;
  --grad: linear-gradient(90deg, #ff9f0a, #ff375f 35%, #bf5af2 65%, #0a84ff);
  --foot-bg: #1d1d1f; --foot-ink: #a1a1a6; --foot-link: #ffffff; --foot-line: #3a3a3c; --foot-surface: #2c2c2e;
  --card: var(--surface);   /* a card on the page: #1d1d1f on black; by day #f5f5f7 on white (white on grey sections) */

  /* fixed colours, the same in both themes: the match screen is always dark; card and record colours */
  --white: #ffffff; --black: #000000; --kit-default: #888888;
  --scr-ink: #eef3ec; --scr-ink-2: #dfe8e2; --scr-ink-3: #b9c9bf; --scr-ink-4: #9fb3a6;
  --scr-turf: #1c5a39; --scr-night: #0b241b; --scr-card-a: #143f2a; --scr-card-b: #07160f;
  --scr-hi: #facc15; --scr-hi-ink: #0b0d12;
  --card-yellow: #facc15; --card-red: #ef4444; --rec: #e11d48; --on-win: #062b14;

  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--text);

  /* type scale (1.25, 16px base) */
  --t-xs: .75rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.25rem; --t-xl: 1.5625rem; --t-2xl: 1.953rem; --t-3xl: 2.441rem; --t-4xl: 3.815rem;
  /* spacing (4px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-card: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --page: 1200px;
  --bar-h: 60px;            /* sticky top bar; things that stick below it use this */
}
/* P40: Chinese mode. Latin letters and digits keep Inter; Chinese falls to a system Chinese font. */
html:lang(zh-Hans) {
  --text: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  --display: var(--text);
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { color-scheme: light; } }

/* day (the two light blocks stay identical) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff; --bg-deep: #f5f5f7; --surface: #ffffff; --surface-2: #f5f5f7; --line: #d2d2d7; --line-soft: #e8e8ed;
    --ink: #1d1d1f; --ink-2: #424245; --ink-3: #6e6e73;
    --flood: #0071e3; --flood-ink: #ffffff; --link: #0066cc; --live: #b42e23; --warn-ink: #8a5400; --win: #116d33; --draw: #5d7266; --loss: #a8380a;
    --turf-a: #387f44; --turf-b: #347840; --chalk-line: rgba(255,255,255,.88); --glow: rgba(255, 244, 200, .25);
    --shadow: none; --card: var(--surface-2);
  }
}
:root[data-theme="light"] {
  --bg: #ffffff; --bg-deep: #f5f5f7; --surface: #ffffff; --surface-2: #f5f5f7; --line: #d2d2d7; --line-soft: #e8e8ed;
  --ink: #1d1d1f; --ink-2: #424245; --ink-3: #6e6e73;
  --flood: #0071e3; --flood-ink: #ffffff; --link: #0066cc; --live: #b42e23; --warn-ink: #8a5400; --win: #116d33; --draw: #5d7266; --loss: #a8380a;
  --turf-a: #387f44; --turf-b: #347840; --chalk-line: rgba(255,255,255,.88); --glow: rgba(255, 244, 200, .25);
  --shadow: none; --card: var(--surface-2);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + var(--s4)); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.5 var(--text); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg, canvas { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--flood); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 50; background: var(--flood); color: var(--flood-ink); padding: var(--s2) var(--s4); border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: var(--s3); }

.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .page { padding: 0 var(--s6); } }

/* headings (P57): Inter 600, tight tracking, sentence case */
.h-display { font: 600 clamp(2.2rem, 5.4vw, var(--t-4xl))/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.h-section { font: 600 var(--t-2xl)/1.1 var(--display); margin: 0; letter-spacing: -.02em; }
.h-card { font: 600 var(--t-xl)/1.15 var(--display); margin: 0; letter-spacing: -.02em; }
.lede { color: var(--ink-2); font-size: var(--t-md); margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: var(--t-sm); }

/* ------------------------------------------------------------------ shell */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg-deep) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-soft); }
.topbar .page { display: flex; align-items: center; gap: var(--s5); height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.45rem/1 var(--display); letter-spacing: .01em; white-space: nowrap; }
.brand .brand-logo { width: 44px; height: 44px; flex: none; object-fit: contain; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .25)); }
@media (min-width: 720px) and (max-width: 900px) { .topbar .page { gap: var(--s3); } .nav a { padding: 8px 9px; } }
/* narrower screens: the name on two lines, "Agentic AI Women’s" / "Football League" */
@media (max-width: 1440px) { .brand { font-size: 1.12rem; } .brand-name > span { display: block; line-height: 1.02; } }
/* laptops: a tighter nav so the buttons on the right stay on screen */
@media (min-width: 720px) and (max-width: 1279px) { .topbar .page { gap: var(--s3); } .topbar .nav a { padding: 8px 9px; } .topbar .nav a[aria-current="page"]::after { left: 9px; right: 9px; } }
/* tablets: brand and buttons on the first row, the whole nav on a second row */
@media (min-width: 720px) and (max-width: 1099px) {
  :root { --bar-h: 96px; }
  .topbar .page { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: 8px; }
  .topbar .nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -9px; padding-bottom: 6px; }
  .topbar .nav a { white-space: nowrap; }
  .topbar .nav a[aria-current="page"]::after { bottom: -6px; }
}
/* the league crest, large (Matchday footer band, sign-in page) */
.leagueband { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; margin-top: var(--s6, 48px); padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.leagueband img { width: 132px; height: 132px; object-fit: contain; }
.leagueband h2 { margin: 0 0 6px; font: 700 var(--t-2xl)/1.05 var(--display); }
.leagueband p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
@media (max-width: 560px) { .leagueband { grid-template-columns: 1fr; justify-items: center; text-align: center; } .leagueband img { width: 160px; height: 160px; } }
.nav { display: flex; gap: var(--s1); }
.nav a { position: relative; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: var(--t-sm); padding: 8px 12px; border-radius: var(--r-sm); }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 3px; border-radius: 3px 3px 0 0; background: var(--flood); }
.topbar .end { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }

/* phone: bottom tab bar replaces the top nav */
.tabbar { display: none; }
@media (max-width: 719px) {
  .nav { display: none; }
  .topbar .page { gap: var(--s3); height: 56px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-deep) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-soft); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 600; border-radius: var(--r-sm); }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] svg { color: var(--flood); }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* the footer runs under the tab bar, so no white strip below it (cs's walk-through, 2026-11-25) */
  body:has(.sitefoot) { padding-bottom: 0; }
  .sitefoot { padding-bottom: calc(var(--s6) + 76px + env(safe-area-inset-bottom)); }
  .brand { font-size: 1.05rem; min-width: 0; gap: 8px; }
  .brand .brand-logo { width: 40px; height: 40px; }
  /* the name takes what the buttons leave, cut with … rather than running under them, and drops out when there is too little room for it */
  .brand { flex: 1 1 0; }
  .brand-name { flex: 1 1 0; min-width: 0; container-type: inline-size; }
  .brand-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @container (max-width: 56px) { .brand-name > span { display: none; } }
  .topbar .end { gap: 4px; }
  .topbar .themebtn { display: none; }   /* in the footer instead */
  #ac-me .btn { width: 40px; min-height: 40px; padding: 0; gap: 0; }
  #ac-me .btn span { display: none; }   /* the name stays in aria-label; font-size: 0 left it room in WebKit, pushing the icon off centre */
  #ac-me .btn svg { width: 20px; height: 20px; flex: none; }   /* without flex: none the name squeezed the icon to 5 px in WebKit */
}
@media (max-width: 389px) { .brand { font-size: .84rem; } }   /* 360-389 wide phones: the whole name still fits beside four buttons */
@media (max-width: 340px) { .brand-name { display: none; } }
html, body { overflow-x: clip; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: var(--t-sm); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s var(--ease), background .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--flood); color: var(--flood-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn-quiet:hover { color: var(--ink); background: var(--surface); }
.btn-sm { min-height: 36px; padding: 0 14px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.lang { font: 700 13px/1 var(--text); letter-spacing: .02em; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; font-weight: 600; }
.link:hover { text-decoration-color: var(--flood); }

/* segmented control */
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); }
.seg button { flex: none; white-space: nowrap; border: 0; background: transparent; padding: 6px 14px; min-height: 32px; border-radius: 999px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ football primitives */
/* Crest: the clubs' drawn crests (.logo, an <img>), else a shield generated from kit colour + 3-letter code. */
.crest { --kit: var(--kit-default); position: relative; flex: none; width: 40px; height: 46px; display: grid; place-items: center; }
.crest svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crest b { position: relative; font: 700 13px/1 var(--display); letter-spacing: .04em; color: var(--white); text-shadow: 0 1px 2px rgba(0,0,0,.45); margin-top: -2px; }
.crest.sm { width: 26px; height: 30px; } .crest.sm b { font-size: 9px; }
.crest.lg { width: 64px; height: 74px; } .crest.lg b { font-size: 21px; }
.crest.dim { opacity: .62; filter: saturate(.55); }
/* Drawn crests are square and detailed, so they get more room than the generated shields. */
.crest.logo { width: 56px; height: 56px; } .crest.logo.sm { width: 34px; height: 34px; } .crest.logo.lg { width: 132px; height: 132px; }
.crest.xs { width: 19px; height: 22px; } .crest.xs b { font-size: 7px; } .crest.logo.xs { width: 24px; height: 24px; }
.crest.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); user-select: none; }

.kitbar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--kit, var(--kit-default)); }
.form { display: inline-flex; gap: 3px; }
.form i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.form i.W { background: var(--win); } .form i.D { background: var(--draw); } .form i.L { background: var(--loss); }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 var(--live); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 70%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; max-width: 100%; padding: 3px 9px; line-height: 1.25; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-soft); }
.chip.warn { color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 40%, transparent); }

/* spoiler-safe score */
.reveal { border: 1px dashed var(--line); background: transparent; color: var(--ink-3); border-radius: var(--r-sm); font: 600 var(--t-xs)/1 var(--text); padding: 7px 10px; cursor: pointer; min-height: 32px; }
.reveal:hover { color: var(--ink); border-color: var(--ink-3); }
.score { font: 700 var(--t-xl)/1 var(--display); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score:has(> .d) { display: inline-grid; grid-template-columns: 2ch auto 2ch; align-items: baseline; }
.score > .h { text-align: right; } .score > .a { text-align: left; } .score > .d { padding: 0 .2em; }

/* reply-time meter: average reply against the match deadline (the mark sits at the deadline; the bar spans 1.5× it) */
.meter { position: relative; height: 6px; border-radius: 6px; background: var(--line-soft); overflow: visible; }
.meter > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--ink-3); }
.meter > span.ok { background: var(--win); } .meter > span.slow { background: var(--loss); }
.meter::after { content: ""; position: absolute; left: 66.6%; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--ink); opacity: .55; }

/* ------------------------------------------------------------------ surfaces */
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.section { margin-top: var(--s7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }

.empty { padding: var(--s5); color: var(--ink-3); }
.skeleton { background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* toast */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 999px; font-weight: 600; font-size: var(--t-sm); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); animation: rise .25s var(--ease); }
.toast button { background: transparent; border: 0; color: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }
@media (max-width: 719px) { .toasts { bottom: 92px; } }
body.has-savebar .toasts { bottom: 88px; }
@media (max-width: 719px) { body.has-savebar .toasts { bottom: 150px; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* command palette */
.palette-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(3, 12, 8, .55); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; padding: 12vh var(--s4) 0; }
.palette-scrim.open { display: flex; }
.palette { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); overflow: hidden; animation: rise .18s var(--ease); }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; padding: 18px 20px; font-size: var(--t-lg); outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; }
.palette li a[aria-selected="true"] { background: var(--surface-2); }
.palette li .k { margin-left: auto; color: var(--ink-3); font-size: var(--t-xs); }
.kbd { font: 600 11px/1 var(--text); padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-3); }
.searchbtn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-3); cursor: pointer; font-size: var(--t-sm); }
.searchbtn:hover { color: var(--ink); background: var(--surface); }
.searchbtn svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .searchbtn span, .searchbtn .kbd { display: none; } .searchbtn { width: 40px; padding: 0; justify-content: center; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ live now bar + kick-off alerts (P10) */
.livebar { background: color-mix(in srgb, var(--live) 14%, var(--bg-deep)); border-bottom: 1px solid color-mix(in srgb, var(--live) 35%, transparent); }
.livebar .page { display: flex; align-items: center; gap: var(--s4); min-height: 40px; overflow-x: auto; scrollbar-width: none; }
.livebar .tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 800; color: var(--live); white-space: nowrap; }
.livebar a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; font-size: var(--t-sm); padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); }
.livebar a:hover { border-color: var(--line); }
.livebar .sc { font: 700 var(--t-md)/1 var(--display); }
.livebar small { color: var(--live); font-weight: 700; font-variant-numeric: tabular-nums; }
.bellwrap { position: relative; }
.bellpop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(300px, calc(100vw - 32px)); display: grid; gap: 8px; padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
.bellpop[hidden] { display: none; }
/* P41.3: the share menu opens under its button, wherever that is on the page */
.sharewrap { position: relative; display: inline-flex; }
.sharepop { left: 0; right: auto; width: min(240px, calc(100vw - 32px)); gap: 2px; }
.sharepop .opt { padding: 6px 8px; border-radius: var(--r-sm, 6px); color: var(--ink); text-decoration: none; background: none; border: 0; text-align: left; font: inherit; font-size: var(--t-sm); font-weight: 600; }
.sharepop .opt:hover, .sharepop .opt:focus-visible { background: var(--surface-2); }
.bellpop .opt { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 600; cursor: pointer; min-height: 32px; }
.bellpop .optrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bellpop .optrow .select { flex: 1; min-width: 140px; min-height: 34px; }
.bellpop p { margin: 0; }
@media (max-width: 1240px) and (min-width: 720px) { .searchbtn span:not(.kbd) { display: none; } .searchbtn .kbd { display: none; } }
/* the ⌘K hint only where the bar has room for it */
@media (max-width: 1480px) { .searchbtn .kbd { display: none; } }
.kbd { white-space: nowrap; }
@media (max-width: 719px) { .tabbar a { font-size: 10.5px; } }
@media (max-width: 719px) { .bellpop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }
@media (max-width: 719px) { .sharepop { width: min(240px, calc(100vw - 32px)); } }   /* P42.1: placed by script next to its button, not across the top */

/* P16: site footer (AI-content note, brand disclaimer, Privacy + Terms) and the legal pages */
.sitefoot { margin: var(--s8) 0 0; padding: var(--s7) 0 var(--s6); border-top: 1px solid var(--line-soft); background: var(--bg-deep); color: var(--ink-3); font-size: var(--t-sm); line-height: 1.55; }
.sitefoot .ftop { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.sitefoot .fbrand { display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; }   /* crest on top, name and line below */
.sitefoot .fbrand img { flex: none; width: 176px; height: 176px; filter: drop-shadow(0 4px 10px rgba(8, 20, 40, .28)); }   /* the crest is detailed: big enough to read */
@media (max-width: 519px) { .sitefoot .fbrand img { width: 136px; height: 136px; } }
.sitefoot .fbrand b { display: block; color: var(--ink); font: 800 var(--t-lg)/1.15 var(--display, inherit); margin-bottom: var(--s2); }
.sitefoot .fbrand p { margin: 0; max-width: 36ch; }
.sitefoot .fcol h2 { margin: 0 0 var(--s3); color: var(--ink); font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sitefoot .fcol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.sitefoot .fcol a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.sitefoot .fcol a:hover { color: var(--ink); text-decoration: underline; }
.sitefoot .fbottom { display: flex; gap: var(--s5); justify-content: space-between; align-items: flex-end; margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line-soft); font-size: var(--t-xs); }
.sitefoot .fbottom p { margin: 0; flex: 1; max-width: none; }
.sitefoot .fbottom .fcopy { flex: none; white-space: nowrap; }
.sitefoot .ftheme { display: none; }
@media (max-width: 719px) { .sitefoot .ftheme { display: block; } .sitefoot .ftheme svg { width: 18px; height: 18px; } }
@media (max-width: 899px) { .sitefoot .ftop { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sitefoot .fbrand { grid-column: 1 / -1; } }
@media (max-width: 519px) { .sitefoot { padding-top: var(--s6); } .sitefoot .ftop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); } .sitefoot .fbottom { flex-direction: column; align-items: flex-start; gap: var(--s3); } }
.legal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s6); align-items: start; margin-top: var(--s5); }
.legal-body { display: grid; gap: var(--s4); line-height: 1.65; min-width: 0; }
.legal-sec { padding: var(--s5) var(--s6); scroll-margin-top: 96px; }
.legal-sec h2 { display: flex; gap: var(--s3); align-items: baseline; margin: 0 0 var(--s3); }
.legal-sec p, .legal-sec ul { margin: 0 0 var(--s3); max-width: 75ch; }
.legal-sec > :last-child { margin-bottom: 0; }
.legal-sec ul { padding-left: 1.2em; }
.legal-sec li { margin-bottom: var(--s2); }
.legal .num { color: var(--link); font: 700 var(--t-sm)/1 var(--display); letter-spacing: .04em; min-width: 1.6em; }
.legal-grid > aside { position: sticky; top: calc(var(--bar-h) + 28px); }
.legal-toc { padding: var(--s5); }
.legal-toc h2 { margin: 0 0 var(--s3); }
.legal-toc ol { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: 2px; }
.legal-toc ol a { display: flex; gap: var(--s2); align-items: baseline; min-height: 36px; padding: 6px var(--s2); border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); }
.legal-toc ol a:hover { background: var(--surface-2); color: var(--ink); }
.legal-toc dl { margin: 0; padding-top: var(--s4); border-top: 1px solid var(--line-soft); display: grid; gap: 2px; font-size: var(--t-sm); }
.legal-toc dt { color: var(--ink-3); font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: var(--s2); }
.legal-toc dt:first-child { margin-top: 0; }
.legal-toc dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 959px) { .legal-grid { grid-template-columns: 1fr; } .legal-grid > aside { order: -1; position: static; } .legal-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 519px) { .legal-sec { padding: var(--s4); } .legal-toc ol { grid-template-columns: 1fr; } }

/* phones: every control outside running text is at least 44 px tall to touch */
@media (max-width: 719px) {
  .btn-sm, .seg button { min-height: 44px; }
  .icon-btn, .searchbtn, #ac-me .btn { width: 44px; height: 44px; min-height: 44px; }
  .brand { min-height: 44px; }
  .skip { display: inline-flex; align-items: center; min-height: 44px; }
  html { scroll-padding-bottom: 92px; }
  .sitefoot .fcol ul { gap: 0; }
  .sitefoot .fcol a { min-height: 44px; }
  .link:not(p .link), a.small:not(p a), .section-head a, .section-head button { display: inline-flex; align-items: center; min-height: 44px; }
}

/* P18: the mailing list sign-up */
.subform { margin: var(--s5) 0 0; }
.subform h2 { font-family: var(--f-display, inherit); font-size: var(--t-xl, 1.5rem); margin: 0 0 var(--s2); }
.subform .row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.subform .row .input { flex: 1 1 220px; min-height: 44px; }
.subform .row select.input { flex: 0 1 200px; }
.subform .consent { margin: var(--s2) 0 0; }
.subform .done { margin: 0; }
.subform.compact h2 { font-size: var(--t-sm); font-family: inherit; letter-spacing: .04em; text-transform: uppercase; }
.subform.compact .row .input { flex-basis: 160px; }
.subform.compact .btn { min-height: 40px; }
.sitefoot .subform { margin: 0; }

/* P34.1: the Follow popover (desktop) and sheet (phones) */
.topbar .follow { gap: 6px; }
.topbar .follow svg { width: 18px; height: 18px; }
.followpop { width: min(380px, calc(100vw - 32px)); }
.followpop .sheet-head { display: flex; align-items: center; justify-content: space-between; }
.followpop .sheet-head b { font: 700 var(--t-lg)/1.1 var(--display); }
.followpop .sheet-close { display: none; }
.followpop .sheet-sub { margin-top: var(--s2); font-size: var(--t-sm); }
.followpop .subform { margin: 0; }
.followpop .subform .row .input { flex-basis: 100%; }
.followpop .subform.compact h2 { margin-top: 0; }
@media (max-width: 719px) {
  /* A backdrop-filter makes the bar the containing block of fixed children, which pinned the Follow sheet to the bar instead of the screen's bottom. */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg-deep); z-index: 31; }   /* above the tab bar, so the Follow sheet is too */
  .topbar .follow { padding: 0 12px; }
  .topbar .follow span { display: none; }
  .followpop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 85vh; overflow: auto; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s4) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); box-shadow: 0 -8px 32px rgb(0 0 0 / .25); }
  .followpop .sheet-close { display: inline-flex; }
}
.subform.panel { padding: var(--s4) var(--s5); }
@media (max-width: 719px) { .subform.panel { padding: var(--s4); } }

/* ------------------------------------------------------------------ P57.2 shared components */
:root { --page: 1184px; }   /* 1120 px of content between 32 px gutters */
/* top bar: the page colour, a hairline, no blur; the current page in ink on a pill, the rest grey (no bar under it) */
.topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid var(--line-soft); }
.brand { font: 700 1.05rem/1.12 var(--text); letter-spacing: -.01em; }
.brand .brand-logo { filter: none; }
.nav a { color: var(--ink-3); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); background: transparent; }
/* the current page: ink on a soft pill, so it shows at a glance (cs, 2026-11-21: bold alone was not enough) */
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--line-soft); border-radius: 999px; }   /* #e8e8ed by day, #2c2c2e at night */
.nav a[aria-current="page"]::after { content: none; }
.tabbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tabbar a[aria-current="page"] svg { color: var(--ink); }
.searchbtn { border: 0; background: transparent; color: var(--ink-3); padding: 0 8px; }
.searchbtn:hover { background: transparent; color: var(--ink); }
.icon-btn { border-color: var(--line-soft); }
/* buttons: pills; primary in the action colour, secondary an outline */
.btn { min-height: 44px; padding: 11px 22px; font-weight: 600; font-size: 15px; line-height: 1.2; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: var(--t-sm); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover, .btn-quiet:hover, .icon-btn:hover { background: var(--surface-2); }
/* links: the link colour, underlined on hover; a section's link ends with › */
.link { color: var(--link); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; text-decoration-color: currentColor; }
.section-head > a.link::after, a.more::after { content: "\00a0›"; }
.section-head > a.link { white-space: nowrap; }
/* segmented controls read as text tabs: the current one in ink, the rest grey */
.seg { background: transparent; border: 0; padding: 0; gap: 4px; }
.seg button { color: var(--ink-3); font-size: 15px; font-weight: 500; padding: 6px 10px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: transparent; color: var(--ink); font-weight: 600; box-shadow: none; }
/* cards: rounded, no border, no shadow */
.panel { background: var(--card); border: 0; border-radius: var(--r-card); box-shadow: none; }
/* full-width sections, white and grey in turn */
.band { padding: 72px 0; }
.band.alt { background: var(--bg-deep); }
.band.alt .panel, .band.alt .card { background: var(--surface); }
@media (max-width: 719px) { .band { padding: 48px 0; } }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
/* pop cards: one colour block, white text (orange takes dark text), at most three to a screen */
.pop { --pop: var(--pop-blue); background: var(--pop); color: var(--white); border-radius: var(--r-card); padding: 28px; }
.pop .muted, .pop .eyebrow, .pop small { color: color-mix(in srgb, var(--white) 88%, transparent); }
.pop a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.pop.pink { --pop: var(--pop-pink); } .pop.blue { --pop: var(--pop-blue); } .pop.green { --pop: var(--pop-green); } .pop.violet { --pop: var(--pop-violet); }
.pop.orange { --pop: var(--pop-orange); color: var(--pop-orange-ink); }
.pop.orange .muted, .pop.orange .eyebrow, .pop.orange small, .pop.orange a { color: var(--pop-orange-ink); }
/* the gradient word (once a page) and the highlighter (by day a yellow swipe; at night the phrase turns yellow instead) */
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hi { box-shadow: inset 0 -.36em 0 var(--hi); }
:root[data-theme="dark"] .hi { box-shadow: none; color: var(--hi); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hi { box-shadow: none; color: var(--hi); } }
/* footer: soft black in both themes, grey text, white links, yellow column headings */
.sitefoot { background: var(--foot-bg); color: var(--foot-ink); border-top: 0; color-scheme: dark;
  --ink: var(--white); --ink-2: var(--foot-link); --ink-3: var(--foot-ink); --line: var(--foot-line); --line-soft: var(--foot-line); --surface: var(--foot-surface); --surface-2: var(--foot-surface); --link: var(--foot-link); --flood: var(--pop-blue); --flood-ink: var(--white); }
.sitefoot .fcol h2 { color: var(--hi); }
.sitefoot .fcol a { color: var(--foot-link); }
.sitefoot .fbrand b { font-weight: 700; }
.sitefoot .fbrand img { filter: none; }
/* P57.5: tabular figures where numbers line up (Inter's tabular set also widens the hyphen, so not in running text) */
.tbl td:not(.cl):not(.l):not(.pl), .score, .statbig, .sk-time, .chip.cd, time { font-variant-numeric: tabular-nums; }

/* the AI/Soccer pill in the top bar (P68), moved from site.css (cs, 2026-11-25): the Dugout and the Control room load ui.css only, so the pill
   showed there as underlined text, both labels at once ("AI newsAI") */
.sideswitch { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #8a2be2; color: var(--ink); font-weight: 600; font-size: var(--t-sm, .875rem); text-decoration: none; white-space: nowrap; }
:root[data-side="brief"] .sideswitch { border-color: #0a8443; }   /* back to the pitch: the league's green */
.sideswitch:hover { background: var(--surface-2); }
.sideswitch .ss-short { display: none; }
@media (max-width: 719px) { .sideswitch { min-height: 32px; padding: 0 7px; font-size: 12px; } .sideswitch .ss-long { display: none; } .sideswitch .ss-short { display: inline; } }
/* on touch screens it keeps its size (the league name needs the room) but its tappable area reaches past its edge */
@media (pointer: coarse) { .sideswitch { position: relative; } .sideswitch::after { content: ''; position: absolute; inset: -4px -6px; } }
