/* Matchday-programme look: navy ink, warm paper, scoreboard type, ticket-stub components. */
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #f4efe4;
  --surface: #fffdf8;
  --ink: #14213d;
  --text: #1d2433;
  --muted: #6b6457;
  --line: #ddd3bf;
  --band: #14213d;
  --band-text: #f4efe4;
  --band-muted: #aab3c7;
  --accent: #d9462b;
  --accent-ink: #ffffff;
  --ok: #2f7d4f;
  --lvl-1: #2f7d4f;
  --lvl-2: #c88a12;
  --lvl-3: #d9662b;
  --lvl-4: #c0322b;
  --league: var(--accent);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", ui-sans-serif, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1424;
    --surface: #16203a;
    --ink: #f1ead9;
    --text: #e4e0d6;
    --muted: #a39d90;
    --line: #2a3654;
    --band: #070c18;
    --band-text: #f1ead9;
    --band-muted: #8c96ad;
    --accent: #ff7a59;
    --accent-ink: #1a0d08;
    --lvl-1: #5fbf86;
    --lvl-2: #e9b347;
    --lvl-3: #ff8f57;
    --lvl-4: #ff6b62;
  }
}
[data-league="premier-league"] { --league: #6d2c91; }
[data-league="la-liga"] { --league: #e8690b; }
[data-league="serie-a"] { --league: #0a7cc2; }
[data-league="bundesliga"] { --league: #d20515; }
[data-league="ligue-1"] { --league: #2c3e8f; }
[data-league="scottish-premiership"] { --league: #2b5aa6; }
[data-league="eredivisie"] { --league: #f2700f; }
@media (prefers-color-scheme: dark) {
  [data-league="premier-league"] { --league: #b07ad6; }
  [data-league="ligue-1"] { --league: #8ea2f0; }
  [data-league="scottish-premiership"] { --league: #7fa6e6; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.6 var(--body); }
a { color: var(--accent); text-underline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.05; letter-spacing: 0.005em; }
h1 { font-weight: 800; text-transform: uppercase; font-size: clamp(38px, 7vw, 68px); margin: 0 0 12px; }
h2 { font-weight: 800; text-transform: uppercase; font-size: 28px; margin: 44px 0 14px; }
h3 { font-weight: 600; font-size: 22px; margin: 0 0 6px; }
.eyebrow { font: 600 13px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Header ---------- */
header.site { background: var(--band); color: var(--band-text); position: sticky; top: 0; z-index: 10; }
header.site .wrap { display: flex; align-items: center; gap: 20px; height: 60px; overflow-x: auto; scrollbar-width: none; }
header.site a { color: var(--band-muted); text-decoration: none; font: 600 15px var(--body); white-space: nowrap; }
header.site a:hover { color: var(--band-text); }
header.site a.logo { display: flex; align-items: center; gap: 10px; color: var(--band-text); font: 800 22px var(--display); text-transform: uppercase; margin-right: auto; }
.logo svg { flex: none; }

/* ---------- Hero band ---------- */
.band { background: var(--band); color: var(--band-text); padding: 44px 0 52px; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: 0; opacity: 0.07; background: repeating-linear-gradient(90deg, #fff 0 60px, transparent 60px 120px); pointer-events: none; }
.band h1, .band h2 { color: var(--band-text); }
.band .lede { color: var(--band-muted); }
.band .wrap { position: relative; }
.band[data-league] { border-bottom: 6px solid var(--league); }
.lede { font-size: 20px; max-width: 40em; margin: 0 0 20px; color: var(--muted); }
.crumbs { font-size: 14px; color: var(--band-muted); margin-bottom: 14px; }
.crumbs a { color: var(--band-muted); }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid currentColor; border-radius: 99px; padding: 5px 12px; font: 600 14px var(--body); }
.band .pill { color: var(--band-text); border-color: rgba(255, 255, 255, 0.35); }

main { padding: 0 0 72px; }
.section { padding-top: 8px; }

/* ---------- League tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 22px; }
.tile { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--league); border-radius: 6px; padding: 16px 18px 18px; transition: transform 0.12s; }
a.tile:hover { transform: translateY(-2px); }
.tile .name { font: 800 30px/1 var(--display); text-transform: uppercase; color: var(--ink); }
.tile .meta { color: var(--muted); font-size: 15px; margin-top: 6px; }
.tile.soon { opacity: 0.55; border-top-color: var(--line); }

/* ---------- Ticket stub ---------- */
.stub { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); color: var(--text); border-radius: 10px; margin-top: -30px; position: relative; box-shadow: 0 10px 30px rgba(20, 33, 61, 0.12); }
.stub > div { padding: 16px 20px; }
.stub > div + div { border-left: 2px dashed var(--line); }
.stub .eyebrow { display: block; margin-bottom: 6px; }
.stub .big { font: 800 26px/1.05 var(--display); text-transform: uppercase; color: var(--ink); }
.stub .small { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) {
  .stub { grid-template-columns: 1fr; }
  .stub > div + div { border-left: 0; border-top: 2px dashed var(--line); }
}

/* Difficulty meter: four bars */
.meter { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 8px; }
.meter i { width: 16px; height: 10px; border-radius: 2px; background: var(--line); }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--lvl-1); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--lvl-2); }
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--lvl-3); }
.meter[data-level="4"] i:nth-child(-n+4) { background: var(--lvl-4); }

/* ---------- Club layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .layout aside { order: -1; } }
aside .official { position: sticky; top: 80px; }
.official { background: var(--surface); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; margin-top: 30px; }
.official .head { background: var(--ink); color: var(--paper); padding: 10px 16px; font: 800 18px var(--display); text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.official ul { list-style: none; margin: 0; padding: 6px 0; }
.official li a { display: block; padding: 10px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.official li:last-child a { border-bottom: 0; }
.official li a:hover { background: var(--paper); }
.official .kind { display: block; font: 600 11px var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.official .label { font-weight: 600; }
.official .host { font-size: 13px; color: var(--muted); }
.official .foot { font-size: 13px; color: var(--muted); padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font: 700 16px var(--body); padding: 10px 16px; border-radius: 6px; }

/* Sale phases as numbered gates */
.gates { list-style: none; padding: 0; margin: 0; counter-reset: gate; display: grid; gap: 10px; }
.gates li { counter-increment: gate; display: grid; grid-template-columns: 54px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 12px 12px; }
.gates li::before { content: counter(gate); display: grid; place-items: center; width: 54px; height: 54px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 800 30px var(--display); }
.gates strong { font: 600 21px/1.1 var(--display); color: var(--ink); }
.gates .who { color: var(--muted); font-size: 15px; }

ol.steps { padding-left: 0; list-style: none; counter-reset: step; }
ol.steps li { counter-increment: step; position: relative; padding: 0 0 12px 40px; }
ol.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: grid; place-items: center; font: 800 15px var(--display); }

.stat { border-left: 6px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 0 8px 8px 0; margin-top: 18px; }
.stat .num { font: 800 34px/1 var(--display); color: var(--ink); display: block; margin: 4px 0; }
.warn { border-left: 6px solid var(--lvl-2); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; }

.stations { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.stations li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.stations svg { margin-top: 3px; color: var(--accent); }
.stations .walk { color: var(--muted); font-size: 15px; }

/* League page: club rows like a fixture list */
.fixtures { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.fixtures a { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.fixtures a:hover { background: var(--surface); }
.fixtures .club { font: 800 26px/1 var(--display); text-transform: uppercase; color: var(--ink); }
.fixtures .ground { color: var(--muted); font-size: 15px; }
.fixtures .lvl { font-size: 14px; color: var(--muted); white-space: nowrap; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.facts .panel h3 { color: var(--ink); }

.note { font-size: 14px; color: var(--muted); }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.steps3 .panel .n { font: 800 44px/1 var(--display); color: var(--accent); }

footer { background: var(--band); color: var(--band-muted); padding: 28px 0; font-size: 14px; }
footer a { color: var(--band-text); }
