/* LINK — design tokens (shared by every LINK app: LINK Football, LINK Grassroots…)
   Dark = deep teal (the main look). Light = soft green-grey.
   Follows the device setting by default; force a mode with <html data-theme="dark|light">.
   Screens use these variables only — never raw hex. Source of truth: the LINK design system. */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #091e22;
  --surface-1: rgba(255,255,255,0.075);
  --surface-2: rgba(255,255,255,0.11);
  --surface-3: rgba(255,255,255,0.14);
  --line: rgba(255,255,255,0.11);
  --line-strong: rgba(255,255,255,0.17);
  --popover: #0f2a2f;
  --field: rgba(0,0,0,0.22);
  --chrome: rgba(0,0,0,0.14);
  --tabbar: rgba(9,30,34,0.94);
  --seg-bg: rgba(0,0,0,0.22);
  --seg-on: rgba(255,255,255,0.13);
  --track: rgba(255,255,255,0.10);
  --ink: #f4f6f6;
  --ink-soft: #c7cfcd;
  --ink-muted: #a0a9a7;
  --accent: #c6ebd5;
  --on-accent: #04281a;
  --accent-tint: rgba(198,235,213,0.13);
  --btn-main-top: #d9f4e4;
  --btn-main-bottom: #bde5cd;
  --btn-main-border: rgba(255,255,255,0.5);
  --btn-secondary-bg: rgba(255,255,255,0.09);
  --good: #86dca0;
  --warn: #f2c46d;
  --bad: #ff9a8f;
  --good-tint: rgba(134,220,160,0.14);
  --warn-tint: rgba(242,196,109,0.14);
  --bad-tint: rgba(255,154,143,0.14);
  --good-line: rgba(134,220,160,0.35);
  --toggle-knob: #ffffff;
  --scrim: rgba(0,0,0,0.45);
  --brand-mint: #c6ebd5;
  --brand-green: #07583f;
  --brand-teal: #173c42;
  --crest-gold: #c2a065;
  --card-shadow: none;
  --btn-main-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 10px 26px -12px rgba(169,221,191,0.7);
  --seg-on-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  --pop-shadow: 0 18px 40px -14px rgba(0,0,0,0.7);
  --toast-shadow: 0 12px 30px -12px rgba(0,0,0,0.6);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f2f5f3;
    --surface-1: #ffffff;
    --surface-2: rgba(11,30,25,0.05);
    --surface-3: rgba(11,30,25,0.08);
    --line: rgba(11,30,25,0.09);
    --line-strong: rgba(11,30,25,0.15);
    --popover: #ffffff;
    --field: #ffffff;
    --chrome: rgba(255,255,255,0.6);
    --tabbar: rgba(255,255,255,0.94);
    --seg-bg: rgba(11,30,25,0.05);
    --seg-on: #ffffff;
    --track: rgba(11,30,25,0.08);
    --ink: #0b1e19;
    --ink-soft: #3b4c46;
    --ink-muted: #5a6a64;
    --accent: #07583f;
    --on-accent: #ffffff;
    --accent-tint: rgba(7,88,63,0.09);
    --btn-main-top: #0c6c4d;
    --btn-main-bottom: #07583f;
    --btn-main-border: rgba(0,0,0,0.06);
    --btn-secondary-bg: rgba(11,30,25,0.06);
    --good: #1c7f45;
    --warn: #975a00;
    --bad: #c03a2b;
    --good-tint: rgba(28,127,69,0.10);
    --warn-tint: rgba(151,90,0,0.10);
    --bad-tint: rgba(192,58,43,0.09);
    --good-line: rgba(28,127,69,0.35);
    --toggle-knob: #ffffff;
    --scrim: rgba(0,0,0,0.45);
    --brand-mint: #c6ebd5;
    --brand-green: #07583f;
    --brand-teal: #173c42;
    --crest-gold: #c2a065;
    --card-shadow: 0 1px 2px rgba(11,30,25,0.05), 0 10px 30px -18px rgba(11,30,25,0.18);
    --btn-main-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 20px -10px rgba(7,88,63,0.6);
    --seg-on-shadow: 0 1px 2px rgba(11,30,25,0.12);
    --pop-shadow: 0 18px 40px -14px rgba(11,30,25,0.25);
    --toast-shadow: 0 12px 30px -12px rgba(11,30,25,0.22);
  }
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5f3;
  --surface-1: #ffffff;
  --surface-2: rgba(11,30,25,0.05);
  --surface-3: rgba(11,30,25,0.08);
  --line: rgba(11,30,25,0.09);
  --line-strong: rgba(11,30,25,0.15);
  --popover: #ffffff;
  --field: #ffffff;
  --chrome: rgba(255,255,255,0.6);
  --tabbar: rgba(255,255,255,0.94);
  --seg-bg: rgba(11,30,25,0.05);
  --seg-on: #ffffff;
  --track: rgba(11,30,25,0.08);
  --ink: #0b1e19;
  --ink-soft: #3b4c46;
  --ink-muted: #5a6a64;
  --accent: #07583f;
  --on-accent: #ffffff;
  --accent-tint: rgba(7,88,63,0.09);
  --btn-main-top: #0c6c4d;
  --btn-main-bottom: #07583f;
  --btn-main-border: rgba(0,0,0,0.06);
  --btn-secondary-bg: rgba(11,30,25,0.06);
  --good: #1c7f45;
  --warn: #975a00;
  --bad: #c03a2b;
  --good-tint: rgba(28,127,69,0.10);
  --warn-tint: rgba(151,90,0,0.10);
  --bad-tint: rgba(192,58,43,0.09);
  --good-line: rgba(28,127,69,0.35);
  --toggle-knob: #ffffff;
  --scrim: rgba(0,0,0,0.45);
  --brand-mint: #c6ebd5;
  --brand-green: #07583f;
  --brand-teal: #173c42;
  --crest-gold: #c2a065;
  --card-shadow: 0 1px 2px rgba(11,30,25,0.05), 0 10px 30px -18px rgba(11,30,25,0.18);
  --btn-main-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 20px -10px rgba(7,88,63,0.6);
  --seg-on-shadow: 0 1px 2px rgba(11,30,25,0.12);
  --pop-shadow: 0 18px 40px -14px rgba(11,30,25,0.25);
  --toast-shadow: 0 12px 30px -12px rgba(11,30,25,0.22);
}

:root {
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --radius-tag: 6px;
  --radius-seg-option: 8px;
  --radius-field: 10px;
  --radius-seg: 11px;
  --radius-menu: 12px;
  --radius-card: 16px;
  --radius-card-phone: 18px;
  --radius-sheet: 24px;
  --radius-pill: 999px;
  --size-btn-sm: 32px;
  --size-btn-md: 40px;
  --size-btn-lg: 52px;
  --size-tap: 44px;
  --size-nav-item: 36px;
  --size-row-phone: 60px;
  --size-tabbar: 56px;
  --size-sidebar: 232px;
  --size-sheet: 480px;
  --size-content: 1080px;
  --size-dot: 7px;
}

@font-face { font-family: "Geist"; src: url("../fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Page backgrounds — glow at the top only, fading into the page colour */
.bg-desktop {
  background:
    linear-gradient(180deg, rgba(9, 30, 34, 0.2) 0%, rgba(9, 30, 34, 0.7) 55%, #091e22 100%),
    url("../img/bg-wide-teal.jpg") center top / cover no-repeat,
    #091e22;
}
.bg-phone {
  background:
    linear-gradient(180deg, rgba(9, 30, 34, 0.25) 0%, rgba(9, 30, 34, 0.75) 50%, #091e22 100%),
    url("../img/bg-phone-teal.jpg") center top / cover no-repeat,
    #091e22;
}
[data-theme="light"] .bg-desktop { background: radial-gradient(70% 55% at 88% -12%, rgba(7, 88, 63, 0.11), rgba(7, 88, 63, 0) 62%), #f2f5f3; }
[data-theme="light"] .bg-phone { background: radial-gradient(120% 40% at 85% -8%, rgba(7, 88, 63, 0.12), rgba(7, 88, 63, 0) 62%), #f2f5f3; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .bg-desktop { background: radial-gradient(70% 55% at 88% -12%, rgba(7, 88, 63, 0.11), rgba(7, 88, 63, 0) 62%), #f2f5f3; }
  :root:not([data-theme="dark"]) .bg-phone { background: radial-gradient(120% 40% at 85% -8%, rgba(7, 88, 63, 0.12), rgba(7, 88, 63, 0) 62%), #f2f5f3; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
