/* Shared chrome for the server-rendered and authored pages (/about, /faq,
   /guides/*, /clubs, /club/*, /gameweeks, /gameweek/*). These are corridors
   of the same building as the app, so they wear the app's exact scheme: the
   purple stage with its three atmosphere washes, the header bar with the
   signature-gradient wordmark, and the reading itself on white paper with
   the deep-purple ink ladder — the same surface the Rivalry Report reads
   on. Tokens are copied from src/styles/themes.css (html.stage) and
   base.css; if those move, move these. No JavaScript, same-origin fonts. */
@font-face { font-family: "Sakana"; src: url("/Sakana.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-400-900.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-400-900-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* the stage */
  --bg-page: #2B0B42;
  --header-bg: #451A67; --header-border: #56247A;
  --stage-text: #FFFFFF; --stage-secondary: #E6D9F4; --stage-muted: #BAA4D5; --stage-faint: #AE97C9;
  --sig-a: #00FF87; --sig-b: #04F5FF;
  /* the paper */
  --paper: #FFFFFF; --paper-alt: #F5F0FC; --paper-sub: #F4EFFC; --paper-inset: #E7DEF5;
  --paper-rim: #E2D6F1; --paper-line: #E8E0F5; --paper-inner: #D8CBEC;
  --ink: #1D0A2E; --ink-2: #3B2755; --ink-3: #574371; --ink-muted: #63507C; --ink-faint: #6F5C89;
  --green-ink: #006F49; --blue-ink: #005E8C;
  --elev-3: 0 3px 10px rgba(12,3,24,0.24), 0 22px 52px rgba(12,3,24,0.32);
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Schibsted Grotesk", sans-serif;
  --font-display: "Sakana", "Barlow Semi Condensed", sans-serif;
  --header-h: 58px;
}
@media (min-width: 1024px) { :root { --header-h: 62px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(1100px 700px at 3% 16%, rgba(4,245,255,0.16), transparent 62%),
    radial-gradient(1000px 680px at 97% 32%, rgba(233,0,82,0.15), transparent 64%),
    radial-gradient(1100px 640px at 50% 118%, rgba(0,255,135,0.08), transparent 66%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}

/* ── The header bar: the app's, in CSS ── */
header.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 1px 10px rgba(12,3,24,0.12);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 18px;
}
@media (min-width: 1024px) { header.site { padding: 0 32px; } }
.brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wordmark {
  font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 0.9; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  background: linear-gradient(90deg, var(--sig-a), var(--sig-b));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.route { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stage-muted); white-space: nowrap; }
.route::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--sig-a); flex-shrink: 0; }
nav.site { display: flex; gap: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
nav.site::-webkit-scrollbar { display: none; }
nav.site a { color: var(--stage-secondary); text-decoration: none; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; padding: 6px 0; }
nav.site a:hover, nav.site a:focus-visible { color: var(--stage-text); }
nav.site a[aria-current="page"] { color: var(--sig-a); }
.brand { flex-shrink: 0; }
.wordmark { overflow: visible; }
/* Phones: the brand never shrinks or clips; the header keeps the three
   content links and About/FAQ live in the footer (and the route label
   under the wordmark still names the page you're on). */
@media (max-width: 640px) {
  nav.site { gap: 14px; }
  nav.site a { font-size: 12.5px; }
  nav.site a:nth-child(n+4) { display: none; }
  .wordmark { font-size: 22px; }
}
a:focus-visible { outline: 2px solid var(--sig-b); outline-offset: 3px; border-radius: 2px; }

/* ── The page: reading on paper, on the stage ── */
.shell { max-width: 800px; margin: 0 auto; padding: 22px 12px 56px; }
@media (min-width: 640px) { .shell { padding: 34px 20px 72px; } }
main {
  background: var(--paper);
  border: 1px solid var(--paper-rim);
  border-radius: 14px;
  box-shadow: var(--elev-3);
  padding: 22px 18px 26px;
}
@media (min-width: 640px) { main { padding: 34px 40px 40px; } }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 8px; }
h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(30px, 5vw, 42px); line-height: 1.04; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 12px; }
.lede { font-size: 1.08rem; line-height: 1.6; color: var(--ink-2); margin: 0 0 26px; }
h2 { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); margin: 32px 0 10px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; display: inline-block; width: 10px; height: 10px; flex-shrink: 0; background: linear-gradient(135deg, var(--sig-a), var(--sig-b)); transform: skewX(-12deg); }
h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--ink); margin: 22px 0 6px; }
p { margin: 0 0 14px; color: var(--ink-2); }
strong { color: var(--ink); }
em { color: var(--ink-2); }
main a { color: var(--green-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
main a:hover { color: var(--ink); }
main ul, main ol { padding-left: 1.25em; margin: 0 0 16px; color: var(--ink-2); }
main li { margin: 0 0 6px; }
dl { margin: 0 0 16px; }
dt { font-weight: 700; color: var(--ink); margin-top: 12px; }
dd { margin: 2px 0 0; color: var(--ink-2); }
blockquote { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--sig-a); background: var(--paper-sub); border-radius: 0 8px 8px 0; color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--paper-line); margin: 26px 0; }
a.cta { display: inline-block; background: linear-gradient(135deg, var(--sig-a), var(--sig-b)); color: #120320 !important; text-decoration: none !important; font-weight: 800; font-size: 0.95rem; padding: 10px 16px; border-radius: 999px; }
p.meta { color: var(--ink-muted); font-size: 0.92rem; }

/* tables: the app's paper tables */
.table-wrap { overflow-x: auto; margin: 10px 0 22px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
table th, table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--paper-line); white-space: nowrap; color: var(--ink-2); }
table th { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
table td.num, table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table tbody tr:hover td { background: var(--paper-sub); }
table td strong { color: var(--ink); }

/* the guides index */
.guide-list { display: grid; gap: 12px; margin: 8px 0 24px; }
.guide-item { padding: 16px 18px; background: var(--paper-alt); border: 1px solid var(--paper-inner); border-radius: 12px; }
.guide-item h2 { margin: 0 0 6px; font-size: 1.15rem; }
.guide-item h2::before { display: none; }
.guide-item h2 a { color: var(--ink); text-decoration: none; }
.guide-item h2 a:hover { color: var(--green-ink); }
.guide-item p { margin: 0 0 6px; }
.guide-item p.meta { margin: 0; }

/* ── The footer: the app's SiteFooter ── */
footer.site { margin-top: 30px; padding: 22px 12px 0; text-align: center; color: var(--stage-muted); font-size: 12px; line-height: 1.7; }
footer.site p { color: var(--stage-muted); margin: 0 0 8px; }
footer.site a { color: var(--stage-secondary); text-decoration: none; font-weight: 600; }
footer.site a:hover { color: var(--stage-text); }

/* article ad units: quiet, labelled, never a gap when dark (they don't render) */
.ad-unit { margin: 22px 0; text-align: center; }
.ad-label { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }

.live-tag { display: inline-block; vertical-align: middle; font-family: var(--font); font-size: 0.6em; font-weight: 800; letter-spacing: 0.12em; color: #0A7C5A; background: rgba(0,255,135,.18); border-radius: 999px; padding: 3px 9px; margin-left: 8px; }
