/* Football Intelligence v4 - the pages outside the app
   (FAQ, methodology, guides, calculators, legal, about, league and match pages).

   Loaded after /static/css/legal-static.css and after tokens.css. It re-points the old
   sheet's variables at the v4 tokens, so each page's own <style> block follows without
   being edited, and it restyles the shared components: one ground, no glow, no tinted
   pills, the display face for headings, 16 px text, the accent only on actions.
   Both themes: <html data-theme="dark|light"> is set by the inline script next to the link. */

/* ---------- 1 The old names, pointed at the v4 tokens ---------- */
:root {
  --bg: var(--g-0);
  --surface-1: var(--g-1);
  --surface-2: var(--g-2);
  --surface-3: var(--g-3);
  --border: var(--rule);
  --border-strong: var(--g-4);
  --divider: var(--rule);

  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-tertiary: var(--ink-3);
  --text-disabled: var(--ink-3);

  --accent-strong: var(--accent-down);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-fg: var(--on-accent);

  --warn: #f2b84b;
  --warn-soft: color-mix(in srgb, #f2b84b 12%, transparent);
  --warn-border: transparent;
  --danger: #ff6b5e;
  --danger-soft: color-mix(in srgb, #ff4b3e 14%, transparent);
  --danger-border: transparent;

  --font-sans: var(--f-text);
  --text-display: var(--t-48);
  --text-h1: var(--t-48);
  --text-h2: var(--t-28);
  --text-body: 1rem;
  --text-small: var(--t-13);
  --leading-relaxed: 1.6;

  --radius-sm: var(--r-1);
  --radius-md: var(--r-2);
  --radius-lg: var(--r-card);
  --shadow-sm: var(--e-0);
  --shadow-lg: var(--e-1);
  --duration-fast: var(--dur);
  --duration-base: var(--dur);
  --easing-out: var(--ease);
}
:root[data-theme="light"] {
  --warn: #7a5200;
  --warn-soft: #fbefd2;
  --danger: #a8281d;
  --danger-soft: #fbe3df;
}

/* ---------- 2 Ground and base ---------- */
html, body { background: var(--g-0); color: var(--ink-2); font-family: var(--f-text); font-size: 1rem; line-height: 1.6; }
body::before { background-image: none; background-color: var(--g-0); }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--g-4); }
a:hover { color: var(--ink); text-decoration-color: currentColor; }
strong, b { color: var(--ink); }
em, i { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 3 Header strip: the app's 52 px bar ---------- */
.lp-header { background: var(--g-0); border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 -1px 0 var(--rule); }
.lp-header__inner { max-width: 68rem; min-height: var(--hdr-h); padding: 0 var(--gutter); gap: var(--s-3); }
.lp-header__brand { color: var(--ink); font: var(--dw-7) var(--t-20)/1 var(--f-display); letter-spacing: 0; text-decoration: none; min-height: var(--tap); }
.lp-header__brand img { width: 1.75rem; height: 1.75rem; }
.lp-header__crumb { color: var(--ink-3); font-size: var(--t-13); }
.lp-header__crumb::before { color: var(--g-4); }
.lp-header__back { min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-2); background: var(--g-2); color: var(--ink); font: 600 var(--t-13)/1 var(--f-text); text-decoration: none; white-space: nowrap; }
.lp-header__back:hover { color: var(--ink); background: var(--g-3); }
.lp-header__back:hover .lp-header__back-arrow { transform: none; }

/* ---------- 4 Page column and the title band ---------- */
.lp-wrap { max-width: 44rem; padding: var(--s-8) var(--gutter) var(--s-12); }
.lp-wrap--wide { max-width: 56rem; }
.lp-eyebrow { margin-bottom: var(--s-3); padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink-3); font: 600 var(--t-12)/1.2 var(--f-text); letter-spacing: 0.08em; }
.lp-eyebrow::before { display: none; }
h1.lp-title, .lp-wrap h1 { margin: 0 0 var(--s-3); color: var(--ink); font: var(--dw-8) clamp(2.25rem, 9vw, 3.5rem)/calc(0.98 * var(--dlh)) var(--f-display); letter-spacing: 0; text-transform: var(--d-case); text-wrap: balance; }
.lp-subtitle { margin: 0 0 var(--s-8); color: var(--ink-3); font-size: var(--t-13); }
.lp-subtitle .dot { color: var(--g-4); }

/* ---------- 5 Article type ---------- */
.lp-wrap h2 { display: block; margin: var(--s-12) 0 var(--s-3); color: var(--ink); font: var(--dw-7) var(--t-28)/calc(1.05 * var(--dlh)) var(--f-display); letter-spacing: 0; text-wrap: balance; }
.lp-wrap h2::before { display: none; }
.lp-wrap h3 { margin: var(--s-6) 0 var(--s-2); color: var(--ink); font: 600 1.0625rem/1.3 var(--f-text); }
.lp-wrap p { margin: 0 0 var(--s-4); color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.lp-wrap ul, .lp-wrap ol { margin: var(--s-2) 0 var(--s-6) 1.25rem; color: var(--ink-2); font-size: 1rem; }
.lp-wrap li { margin-bottom: var(--s-2); line-height: 1.55; }
.lp-wrap li::marker { color: var(--ink-3); }
code, kbd, samp { padding: 0.0625rem 0.375rem; border: 0; border-radius: var(--r-1); background: var(--g-2); color: var(--ink); font-size: 0.875em; }
img { max-width: 100%; height: auto; }

/* ---------- 6 Blocks: one tone step, no borders ---------- */
.lp-card, .lp-toc, .plan-card { padding: var(--s-4); border: 0; border-radius: var(--r-card); background: var(--g-1); box-shadow: var(--e-0); }
/* Notices: the same graphite block as everything else, set apart by a straight rule on the left.
   No tinted panel and no coloured text: an amber or red box around a legal sentence reads as decoration. */
.info-box, .warn-box, .danger-box { padding: var(--s-4); border: 0; border-left: 3px solid var(--g-4); border-radius: 0 var(--r-2) var(--r-2) 0; background: var(--g-1); box-shadow: none; }
.warn-box, .danger-box { border-left-color: var(--ink); }
.info-box p, .warn-box p, .danger-box { font-size: 0.9375rem; line-height: 1.55; }
.warn-box p, .warn-box a, .danger-box, .danger-box p, .danger-box a { color: var(--ink); }
.warn-box strong, .danger-box strong { color: var(--ink); font-weight: 700; }
.formula-box { padding: var(--s-4); border: 0; border-radius: var(--r-2); background: var(--g-2); color: var(--ink); font-size: 0.875rem; line-height: 1.75; }
.formula-box strong { color: var(--ink); }
.plan-card { font-size: 1rem; }
.plan-card strong, .plan-card.pro strong, .plan-card.elite strong { color: var(--ink); }

.lp-toc { margin-bottom: var(--s-8); }
.lp-toc__title, .lp-related__title { color: var(--ink-3); font: 600 var(--t-12)/1.2 var(--f-text); letter-spacing: 0.08em; }
.lp-toc ol { color: var(--ink-3); font-size: 0.9375rem; }
.lp-toc li { margin-bottom: 0; }
.lp-toc a { display: inline-block; padding: 0.3125rem 0; color: var(--ink); text-decoration: none; }
.lp-toc a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 7 Tables: hairlines between rows only ---------- */
.lp-wrap table { border: 0; border-radius: 0; background: none; font-size: 0.9375rem; }
.lp-wrap th { padding: var(--s-2) var(--s-3) var(--s-2) 0; border-bottom: 1px solid var(--rule); background: none; color: var(--ink-3); font: 600 var(--t-12)/1.3 var(--f-text); letter-spacing: 0.06em; }
.lp-wrap td { padding: var(--s-3) var(--s-3) var(--s-3) 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.lp-wrap td:first-child { color: var(--ink); }

/* ---------- 8 Steps ---------- */
.step-list { gap: var(--s-2); }
.step-list li { padding: var(--s-4); border: 0; border-radius: var(--r-card); background: var(--g-1); box-shadow: var(--e-0); }
.step-list li::before { width: 1.75rem; height: 1.75rem; background: var(--g-3); color: var(--ink); font: var(--dw-7) var(--t-15)/1 var(--f-display); }
.step-list .step-title { font-size: 1rem; }
.step-list .step-body p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }

/* ---------- 9 Questions and answers: one flat list ---------- */
.lp-accordion { gap: 0; }
.lp-accordion details, .lp-accordion details[open] { border: 0; border-radius: 0; background: none; box-shadow: inset 0 -1px 0 var(--rule); }
.lp-accordion summary { min-height: 3.5rem; padding: var(--s-3) 0; color: var(--ink); font: 600 1.0625rem/1.35 var(--f-text); }
.lp-accordion summary:hover { color: var(--ink); }
.lp-accordion summary::after { flex: none; margin-right: 0.25rem; border-color: var(--ink-3); }
.lp-accordion details[open] summary::after { border-color: var(--ink); }
.lp-accordion .answer { padding: 0 0 var(--s-6); border-top: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.lp-accordion .answer code { font-size: 0.875em; }

/* ---------- 10 The call to action: a block with one button ---------- */
.cta-card { padding: var(--s-6); border: 0; border-radius: var(--r-card); background: var(--g-1); box-shadow: var(--e-0); text-align: left; }
.cta-card h3 { margin: 0 0 var(--s-2); font: var(--dw-7) var(--t-28)/calc(1.05 * var(--dlh)) var(--f-display); }
.cta-card p { margin: 0 0 var(--s-4); color: var(--ink-2); font-size: 1rem; }
.cta-btn { justify-content: center; min-height: 3rem; padding: 0 var(--s-6); border-radius: var(--r-2); background: var(--accent); color: var(--on-accent); font: 600 var(--t-15)/1 var(--f-text); text-decoration: none; }
.cta-btn:hover { background: var(--accent-down); color: var(--on-accent); transform: none; }
.cta-note { margin-top: var(--s-3); color: var(--ink-3); font-size: var(--t-12); }
.cta-note a { color: var(--ink-3); }

/* ---------- 11 Small parts ---------- */
.risk-chip { padding: 0.1875rem 0.5rem; border: 0; border-radius: var(--r-1); background: var(--g-2); font: 600 var(--t-12)/1.2 var(--f-text); letter-spacing: 0.04em; }
.risk-chip.low, .risk-chip.med, .risk-chip.high { color: var(--ink); }
.risk-chip.reject { color: var(--ink-3); }
.lang-toggle { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-2); background: var(--g-2); }
.lang-btn { min-height: 2.5rem; padding: 0 var(--s-4); border: 0; border-radius: 6px; background: none; color: var(--ink-2); font: 500 var(--t-13)/1 var(--f-text); }
.lang-btn:hover { color: var(--ink); border-color: transparent; }
.lang-btn.active { border: 0; background: var(--g-4); color: var(--ink); }

/* ---------- 12 Live widget (methodology, guide) ---------- */
.vbw { max-width: 56rem; padding: 0 var(--gutter) var(--s-8); }
.vbw__header { border-top: 1px solid var(--rule); }
.vbw__title { font: var(--dw-7) var(--t-28)/calc(1.05 * var(--dlh)) var(--f-display); }
.vbw__sub, .vbw__footnote { color: var(--ink-3); font-size: var(--t-13); }
.vbw__sub a, .vbw__footnote a { color: var(--ink-2); }
.vbw__grid { gap: var(--s-2); }
.vbw__card, .vbw__placeholder { padding: var(--s-4); border: 0; border-radius: var(--r-card); background: var(--g-1); box-shadow: var(--e-0); }
.vbw__meta { color: var(--ink-3); font-size: var(--t-12); }
.vbw__match { font-size: 1rem; }
.vbw__prob, .vbw__neutral { padding: 0.1875rem 0.5rem; border: 0; background: var(--g-2); color: var(--ink-2); font-size: var(--t-13); }
.vbw__prob.fav { border: 0; background: var(--ink); color: var(--ink-inv); }
.vbw__lambda { font-size: var(--t-13); }
.vbw__cta { color: var(--ink); font-size: var(--t-13); text-decoration: underline; }
.vbw__cta:hover { color: var(--ink); }

/* ---------- 13 Related links and the legal footer ---------- */
.lp-related { margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--rule); }
.lp-related a { margin: 0 var(--s-4) 0 0; padding: 0.375rem 0; color: var(--ink); font-size: 0.9375rem; }
.lp-related a:hover { color: var(--ink); }
.lp-footer { margin-top: var(--s-12); border-top: 1px solid var(--rule); background: none; }
.lp-footer__inner { max-width: 68rem; padding: var(--s-6) var(--gutter) var(--s-8); gap: var(--s-2); text-align: left; font-size: var(--t-13); }
.lp-footer__age { color: var(--ink); font: 700 var(--t-12)/1.2 var(--f-text); letter-spacing: 0.08em; }
.lp-footer__body { max-width: 44rem; margin: 0; color: var(--ink-3); }
.lp-footer__links { justify-content: flex-start; gap: 0 var(--s-4); color: var(--g-4); }
.lp-footer__links a { padding: 0.375rem 0; color: var(--ink-2); }
.lp-footer__links a:hover { color: var(--ink); }
.lp-footer__copy, .lp-footer__copy a { color: var(--ink-3); }

/* ---------- 14 Form controls the calculators draw themselves ---------- */
input[type="number"], input[type="text"], input[type="email"], input[type="search"], select, textarea {
  min-height: 3rem; border-radius: var(--r-2); font: 400 1rem/1.2 var(--f-text);   /* 16 px: no zoom on focus */
}
button { font-family: var(--f-text); }

/* ---------- 15 What some pages state for themselves ----------
   A few pages carry colours and sizes in their own <style> block or in style="" attributes.
   Until those are cleaned in the HTML (cut-over), the same rules are stated here so they win. */
.lp-wrap .lp-toc__title, .lp-wrap .lp-related__title { display: block; margin: 0 0 var(--s-2); color: var(--ink-3); font: 600 var(--t-12)/1.2 var(--f-text); letter-spacing: 0.08em; text-transform: uppercase; }
.lp-footer__copy, .lp-footer__copy a { font-size: var(--t-12); }
body .news-chip, body .news-card__time, body .lg-badge-pill, body .lp-wrap .date { font-size: var(--t-12); }
/* tables coloured cell by cell (calculator pages) */
.lp-wrap table tr[style], .lp-wrap table th[style], .lp-wrap table td[style] { border-color: var(--rule) !important; background: none !important; }
.lp-wrap table th[style], .lp-wrap table td[style] { border-width: 0 0 1px !important; padding: var(--s-3) var(--s-3) var(--s-3) 0 !important; }
.lp-wrap table tr[style*="color"] { color: var(--ink-3) !important; }
.lp-wrap table td[style*="color"] { color: var(--ink) !important; font-weight: 600; }
.lp-wrap p[style*="monospace"] { border: 0 !important; border-radius: var(--r-2) !important; background: var(--g-2) !important; color: var(--ink); }
/* the embed box on the methodology page */
body .lp-embed-cta { padding: var(--s-4); border: 0; border-radius: var(--r-card); background: var(--g-1); }
body .lp-embed-snippet pre { border: 0; border-radius: var(--r-2); background: var(--g-2); color: var(--ink-2); font-size: var(--t-13); }
body .lp-embed-snippet code { padding: 0; background: none; color: inherit; font-size: inherit; }
body .lp-copy-btn { min-height: 2rem; padding: 0 var(--s-3); border: 0; border-radius: var(--r-1); background: var(--g-3); color: var(--ink); font-size: var(--t-12); }
body .lp-copy-btn:hover { background: var(--g-4); color: var(--ink); }
pre { max-width: 100%; overflow-x: auto; }

/* ---------- 16 Small screens ---------- */
@media (max-width: 37.5rem) {
  .lp-header__inner { padding: 0 var(--gutter); }
  .lp-wrap { padding: var(--s-6) var(--gutter) var(--s-12); }
  h1.lp-title, .lp-wrap h1 { font-size: clamp(2.125rem, 10vw, 2.75rem); }
  .lp-wrap h2 { margin-top: var(--s-8); font-size: var(--t-28); }
  .cta-card { padding: var(--s-4); }
  .cta-btn { display: flex; width: 100%; }
  .lp-footer__inner { padding: var(--s-6) var(--gutter) var(--s-8); }
  .vbw { padding: 0 var(--gutter) var(--s-8); }
  /* A table with three or more columns keeps readable columns and scrolls sideways inside its own pane,
     instead of crushing every cell to one word a line and cutting the last column off. */
  .lp-wrap table th:first-child:nth-last-child(n+3):nth-last-child(-n+6), .lp-wrap table th:first-child:nth-last-child(n+3):nth-last-child(-n+6) ~ th,
  .lp-wrap table td:first-child:nth-last-child(n+3):nth-last-child(-n+6), .lp-wrap table td:first-child:nth-last-child(n+3):nth-last-child(-n+6) ~ td { min-width: 8.5rem; }
  .lp-wrap table td:first-child:nth-last-child(n+3):nth-last-child(-n+6), .lp-wrap table th:first-child:nth-last-child(n+3):nth-last-child(-n+6) { min-width: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- 17 Floors: nothing under 12 px, no tap target under 40 px in a call to action ---------- */
.lp-wrap code, .lp-wrap td code { font-size: max(0.75rem, 0.875em); }
.cta-card a:not(.cta-btn), .cta-card + p a { display: inline-block; padding: 0.625rem 0; }
