/* Awayday — the floodlit scoreboard. A dark rail down the side like the stand at night, an expanded grotesque
   (Archivo at full width) for names and headlines the way broadcast graphics set them, a mono for every
   date, kick-off and score, and one signature colour — floodlight lime, or the fan's club colours — for
   the thing that matters. Class names are shared with app.js; only the look lives here. */

:root {
  --bg: #f1f2f4; --surface: #ffffff; --surface-2: #f6f7f9; --ink: #0d1016; --muted: #5d6471;
  --line: #e1e4e9; --line-strong: #c3c9d2;
  --rail: #0b0d12; --rail-2: #171b24; --rail-ink: #eef1f5; --rail-muted: #8a93a3; --rail-line: #1d222c;
  --lime: #d4f04a; --lime-ink: #1d2400;
  --theme: var(--lime); --theme-ink: var(--lime-ink); --theme-2: #2f7d32; --pitch: #2f7d32;
  --win: #16753b; --win-bg: #dff3e5; --loss: #b3261e; --loss-bg: #fbe3e0; --draw: #8f5c00; --draw-bg: #f9ecc6;
  --accent: #0d1016; --away: #c0262d; --away-bg: #fbe3e0; --home: #1d4fa3; --home-bg: #e2ebf9;
  --radius: 16px; --radius-s: 10px;
  --shadow: 0 1px 2px rgb(13 16 22 / .04), 0 6px 20px rgb(13 16 22 / .05);
  --shadow-lg: 0 2px 4px rgb(13 16 22 / .05), 0 16px 40px rgb(13 16 22 / .10);
  --display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12; --surface: #12151c; --surface-2: #181c25; --ink: #eef1f5; --muted: #98a0ad;
    --line: #232834; --line-strong: #3a4250;
    --rail: #06070a; --rail-2: #151922; --rail-line: #1b1f28;
    --win: #6fd28a; --win-bg: #11301b; --loss: #f0857c; --loss-bg: #3a1613; --draw: #f0c04a; --draw-bg: #3a2a08;
    --accent: #eef1f5; --away: #f0857c; --away-bg: #3a1613; --home: #8fb4f0; --home-bg: #14243d;
    --shadow: 0 1px 2px rgb(0 0 0 / .3); --shadow-lg: 0 16px 40px rgb(0 0 0 / .45);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15.5px/1.55 var(--display); color: var(--ink); background: var(--bg);
  display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 26px 40px 64px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--loss); }
ol, ul { padding-left: 20px; } ol li { margin: 6px 0; }
strong { font-weight: 650; }

/* ---- type: expanded for names, mono for numbers ---- */
h1 { font-size: 46px; line-height: 1.02; font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; margin: 8px 0 10px; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1 .muted { display: block; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-top: 12px; }
h2 { font: 600 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 34px 0 12px; }
h2 .muted { letter-spacing: .04em; margin-left: 6px; opacity: .8; }
h3 { font-size: 17px; line-height: 1.25; font-weight: 750; font-stretch: 112%; letter-spacing: -.01em; margin: 24px 0 8px; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.crumb { font: 500 12px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.pagehead { margin: 0 0 20px; }
.pagehead p { margin: 0; }

/* ---- the rail ---- */
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; background: var(--rail); color: var(--rail-ink);
  display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 18px; border-right: 1px solid var(--rail-line); }
.railtop { display: contents; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 2px; text-decoration: none; color: var(--rail-ink);
  font-size: 21px; font-weight: 850; font-stretch: 125%; letter-spacing: -.01em; text-transform: uppercase; line-height: 1; }
.brand::before { content: '↗'; flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--theme); color: var(--theme-ink); font: 800 21px/1 var(--display); letter-spacing: 0; }
.brand[data-emoji]::before { content: attr(data-emoji); font-size: 19px; }
.tagline { font: 500 10.5px/1.4 var(--mono); color: var(--rail-muted); letter-spacing: .02em; padding: 8px 8px 14px; white-space: nowrap; }
.railnav, #rail-sports { display: flex; flex-direction: column; gap: 2px; }
.railnav a, #rail-sports a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--rail-muted); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.2; }
.railnav a:hover, #rail-sports a:hover { background: var(--rail-2); color: var(--rail-ink); }
.railnav a[aria-current], #rail-sports a[aria-current] { background: var(--rail-2); color: var(--rail-ink); }
.railnav a[aria-current]::before, #rail-sports a[aria-current]::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--theme); }
.railnav svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#myclub-link svg { fill: var(--theme); stroke: var(--theme); }
#rail-sports a { font-size: 14px; padding: 7px 10px; }
#rail-sports .emoji { width: 20px; text-align: center; font-size: 16px; }
.railsports { margin-top: 14px; }
.railhead { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--rail-muted); margin: 0 10px 8px; }
.langpick { order: 3; margin: auto 8px 0; font: 500 13px var(--display); padding: 8px 10px; border: 1px solid var(--rail-line); border-radius: 10px; background: var(--rail-2); color: var(--rail-ink); cursor: pointer; }
.railnote { order: 4; font-size: 11.5px; line-height: 1.45; color: var(--rail-muted); margin: 12px 8px 0; }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 12px 0; box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.list-fx { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.list-fx { padding: 0; margin: 0 0 12px; }

/* ---- controls ---- */
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; flex-wrap: wrap; }
button, .btn { font: 600 14px/1.2 var(--display); padding: 9px 14px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: var(--ink); }
button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.linkish { font: inherit; font-size: 13px; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; text-decoration: underline; padding: 0; }
.linkish:hover { opacity: 1; }
button.star { font: 700 13px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 9px 14px; border-radius: var(--radius-s); border: 1px solid var(--ink); background: var(--ink); color: var(--bg); }
button.star.on { background: var(--theme); color: var(--theme-ink); border-color: var(--theme); }
h1 .star, .name .star { font-size: 14px; vertical-align: middle; color: var(--draw); }
.search, .airport select { width: 100%; font: 500 16px var(--display); padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
input[type="search"].search { padding-left: 46px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px 50% / 20px; }
.search:focus { outline: 3px solid color-mix(in srgb, var(--theme) 55%, transparent); outline-offset: 1px; border-color: var(--ink); }
.airport select { width: auto; max-width: 100%; margin-left: 6px; padding: 7px 10px; font-size: 14px; box-shadow: none; }
#club-search { margin: 4px 0 18px; }
.qhelp { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink); font: 700 12px var(--mono); text-decoration: none; vertical-align: middle; margin-left: 4px; }

/* segmented controls: Upcoming/Results, the guide's tabs, the travel modes */
.seg, .tabs, .modes { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.seg { display: inline-flex; margin: 0 0 12px; }
.tabs { overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; }
.modes { display: inline-flex; flex-wrap: wrap; margin: 6px 0 12px; box-shadow: none; }
.seg button, .tabs a, .modes button { flex: 0 0 auto; border: 0; background: transparent; border-radius: 9px; padding: 8px 14px; font: 600 14px/1.2 var(--display); color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg button:hover, .tabs a:hover, .modes button:hover { color: var(--ink); background: var(--surface-2); }
.seg button[aria-pressed="true"], .tabs a[aria-current="page"], .modes button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---- two columns: the thing you read, and the thing you glance at ---- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 28px; align-items: start; }
.colside > :first-child, .colmain > :first-child { margin-top: 0; }
.colside.sticky { position: sticky; top: 20px; }
.colside h2 { margin-top: 24px; }

/* ---- home ---- */
.hometop { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: stretch; margin: 4px 0 8px; }
.hero { position: relative; isolation: isolate; background: var(--rail); color: var(--rail-ink); border-radius: 22px; padding: 34px 32px 26px; border: 1px solid var(--rail-line); }
/* a centre circle and spot in the signature colour, off the corner, over faint mown stripes */
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(circle at 100% 100%, transparent 149px, color-mix(in srgb, var(--theme) 40%, transparent) 150px 151.5px, transparent 153px),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--theme) 50%, transparent) 4px, transparent 5px),
    repeating-linear-gradient(90deg, transparent 0 60px, rgb(255 255 255 / .018) 60px 120px); }
.hero .eyebrow { color: var(--rail-muted); }
.hero h1 { font-size: 50px; margin: 10px 0 22px; }
.finder { position: relative; }
.finder .search { border-color: transparent; font-size: 17px; padding-top: 16px; padding-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; }
.chips button { font: 600 13px/1.2 var(--display); padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); }
.hero .chips button { background: var(--rail-2); border-color: transparent; color: var(--rail-muted); }
.hero .chips button:hover { color: var(--rail-ink); }
.chips button[aria-checked="true"], .hero .chips button[aria-checked="true"] { color: var(--theme-ink); background: var(--theme); border-color: var(--theme); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
/* under the sport chips, so another sport can be picked with the list open */
.finder .results { top: calc(100% + 8px); max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.results a { display: grid; grid-template-columns: 104px 1fr; column-gap: 12px; align-items: baseline; padding: 11px 16px 11px 12px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); border-left: 5px solid transparent; }
.results a:first-child { border-top: 0; }
.results a:hover, .results a[aria-selected="true"] { background: var(--surface-2); }
.results .what { font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.results .who { font-weight: 650; }
.results .muted { grid-column: 2; }
.results.static { position: static; margin: -8px 0 16px; box-shadow: var(--shadow); }
.results .who .star { font-size: 13px; color: var(--draw); }
.homeside { display: flex; flex-direction: column; gap: 12px; }
.homeside .card { margin: 0; flex: 1; }
.nomine { flex: 1; display: grid; place-items: center; text-align: center; margin: 0; padding: 24px 28px; border: 1.5px dashed var(--line-strong); border-radius: 22px; font-size: 14px; text-wrap: balance; }
h2.section { margin-top: 36px; }
.sports { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.sport { display: flex; flex-direction: column; gap: 3px; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 158px; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.sport:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: var(--shadow-lg); }
.sport .emoji { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 27px; line-height: 1; }
.sport .name { font-size: 20px; font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.1; margin-top: 12px; }
.sport > .muted.small:not(.comps) { font: 500 11.5px/1.4 var(--mono); letter-spacing: .03em; text-transform: uppercase; margin-top: 2px; }
.sport .comps { margin-top: 6px; line-height: 1.4; font-size: 13px; }

/* ---- the next match: a ticket in the dark ---- */
.next, .fx { position: relative; }
.cover { text-decoration: none; }
.cover::after { content: ''; position: absolute; inset: 0; }
.triplinks, .ticketlinks, .fx .score, .next .row, .next button { position: relative; z-index: 1; }
.card.next { isolation: isolate; overflow: hidden; background: var(--rail); color: var(--rail-ink); border: 1px solid var(--rail-line); padding: 20px 22px; box-shadow: var(--shadow-lg); }
.card.next a { color: inherit; }
.card.next .muted { color: var(--rail-muted); }
.card.next .btn, .card.next button:not(.star):not(.linkish):not(.fav) { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .22); color: inherit; }
.card.next .btn:hover { border-color: currentColor; }
.next .label { display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--theme); color: var(--theme-ink); }
.next .big { font-size: 30px; line-height: 1.05; font-weight: 800; font-stretch: 125%; letter-spacing: -.025em; margin: 14px 0 8px; text-wrap: balance; }
.next .big .muted { font: 500 12px var(--mono); letter-spacing: .04em; }
.next .kick { font: 500 14px/1.4 var(--mono); }
.next .at { margin: 10px 0 2px; padding-top: 10px; border-top: 1px dashed rgb(255 255 255 / .18); }
.next .ticketlinks, .next .triplinks { margin-top: 8px; }
.card.next:has(.cover:hover) { border-color: var(--theme); }
/* the fan's own club (home page): in its colours, with a kit stripe */
.card.next.mine { background: var(--c, var(--rail)); color: var(--c-ink, var(--rail-ink)); border-color: transparent; }
.card.next.mine::before { content: ''; position: absolute; inset: 0 0 0 52%; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 26px, color-mix(in srgb, var(--c2, var(--theme)) 45%, transparent) 26px 40px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.card.next.mine .label { background: var(--c-ink, var(--theme)); color: var(--c, var(--theme-ink)); }
.card.next.mine .muted { color: inherit; }
.card.next.mine .btn { background: color-mix(in srgb, var(--c-ink, #fff) 10%, transparent); border-color: color-mix(in srgb, var(--c-ink, #fff) 35%, transparent); }
/* the calendar's player card and "coming up here" are long reads, so they sit in the light */
.card.next.follow, .card.next.events { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.card.next.follow .muted, .card.next.events .muted { color: var(--muted); }
.card.next.follow .list-fx { box-shadow: none; }
.card.events > div { margin: 8px 0; }
.card.trip { background: var(--surface); }
.card.trip .triplinks { font-size: 15px; margin: 8px 0 4px; }
.trip .label { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.ha { display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .06em; padding: 4px 6px; border-radius: 5px; background: var(--home-bg); color: var(--home); vertical-align: middle; text-transform: uppercase; }
.ha.a { background: var(--away-bg); color: var(--away); }
.ha.n { background: var(--draw-bg); color: var(--draw); }
.card.next .ha { background: rgb(255 255 255 / .12); color: inherit; }

/* ---- the club banner, in the club's colours with a kit stripe ---- */
.clubhero { position: relative; isolation: isolate; overflow: hidden; background: var(--c, var(--rail)); color: var(--c-ink, var(--rail-ink)); border-radius: 22px; padding: 30px 32px 24px; margin: 6px 0 24px; box-shadow: var(--shadow-lg); }
.clubhero .kit { position: absolute; inset: 0 0 0 46%; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 38px, color-mix(in srgb, var(--c2, var(--theme)) 50%, transparent) 38px 60px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 65%); mask-image: linear-gradient(90deg, transparent, #000 65%); }
.clubhero .eyebrow { color: inherit; }
.clubhero h1 { font-size: 60px; margin: 10px 0 20px; max-width: 16ch; }
.clubhero .row { margin: 0; }
.clubhero .btn { background: color-mix(in srgb, var(--c-ink, #fff) 10%, transparent); border-color: color-mix(in srgb, var(--c-ink, #fff) 35%, transparent); color: inherit; }
.clubhero .btn:hover { border-color: currentColor; }
.clubhero button.star { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--c-ink, #fff) 55%, transparent); }
.clubhero button.star.on { background: var(--c-ink, #fff); color: var(--c, #000); border-color: var(--c-ink, #fff); }

/* ---- fixtures: date tiles down the left, kick-off or score on the right ---- */
.fx { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 18px 14px 14px; border-top: 1px solid var(--line); }
.fx:first-child { border-top: 0; }
.fx:has(.cover:hover) { background: var(--surface-2); }
.fx .when { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; padding: 7px 0 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1; align-self: start; }
.fx .when .dow, .fx .when .mm { font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fx .when .dd { font-size: 23px; font-weight: 800; font-stretch: 112%; line-height: 1; margin: 4px 0 3px; font-variant-numeric: tabular-nums; }
.fx.played .when { background: transparent; }
.fx .who { min-width: 0; }
.fx .who > div:first-child { font-size: 16.5px; font-weight: 650; line-height: 1.3; }
.fx .comp { display: inline-block; color: var(--muted); font: 500 11px/1.3 var(--mono); letter-spacing: .02em; margin-left: 4px; }
.fx .who .small { margin-top: 2px; }
.fx .venue { color: var(--muted); text-decoration: none; }
.fx .venue.guided { color: var(--ink); }
.fx .ko { font: 600 15px/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx .ko.tbc { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fx .score { font: 700 17px/1.1 var(--mono); font-variant-numeric: tabular-nums; min-width: 66px; padding: 7px 10px; border-radius: 9px; text-align: center; background: var(--surface-2); }
.fx .score.W { color: var(--win); background: var(--win-bg); }
.fx .score.L { color: var(--loss); background: var(--loss-bg); }
.fx .score.D { color: var(--draw); background: var(--draw-bg); }
.fx .score small { display: block; font-size: 10px; font-weight: 600; opacity: .85; margin-top: 2px; }
.prov { color: var(--draw); font-weight: 800; margin-left: 1px; font-size: .7em; vertical-align: super; }
.triplinks, .ticketlinks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; }
.triplinks a, .ticketlinks a { font-weight: 600; white-space: nowrap; }

/* ---- a sport's teams: countries fold, clubs in a grid ---- */
details.country { margin: 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; box-shadow: var(--shadow); }
details.country[open] { padding-bottom: 16px; }
details.country > summary { cursor: pointer; padding: 16px 0; list-style: none; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
details.country > summary::-webkit-details-marker { display: none; }
details.country > summary > span:first-child { font-size: 22px; font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; }
details.country > summary > span:first-child::before { content: '+'; display: inline-block; width: 24px; color: var(--muted); font-weight: 500; font-stretch: 100%; }
details.country[open] > summary > span:first-child::before { content: '−'; }
details.country > summary .muted { font-size: 13px; }
details.country h2 { margin: 14px 0 10px; }
details.country:has(> summary[hidden]) { background: none; border: 0; box-shadow: none; padding: 0; }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.list a { display: block; text-decoration: none; color: inherit; }
.list .card { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 100%; margin: 0; padding: 12px 14px 12px 20px; box-shadow: none; background: var(--surface-2); }
.list .card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, var(--line-strong)); }
.list a:hover .card { border-color: var(--ink); background: var(--surface); }
.list .name { font-weight: 700; font-size: 15.5px; font-stretch: 108%; line-height: 1.25; }
.list .card .muted.small { font-size: 12.5px; margin-top: 2px; }
.chev { color: var(--muted); font-size: 20px; }

/* ---- guide pages ---- */
.map { height: 380px; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 8px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.colside h2 + .map { height: 320px; }
.map .leaflet-tooltip { font: 500 12.5px/1.3 var(--display); }
@media (prefers-color-scheme: dark) {
  .map .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
  .map .leaflet-control-attribution, .map .leaflet-bar a { background: var(--surface); color: var(--ink); }
}
.legend { margin: 0 0 14px; color: var(--muted); font: 500 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot.away { background: var(--away); } .dot.tram { background: var(--home); } .dot.park { background: #7c3aed; }
section > .card { margin-top: 0; }
.end.away h2 { color: var(--away); } .end.home h2 { color: var(--home); }
.lead { font-size: 21px; font-weight: 700; font-stretch: 108%; letter-spacing: -.01em; margin: 0 0 14px; line-height: 1.25; }
.kv { display: grid; grid-template-columns: minmax(100px, 28%) 1fr; gap: 10px 16px; margin: 0; font-size: 15px; }
.kv dt { font: 600 11px/1.5 var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; }
.mode { font: 600 10.5px/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--home-bg); color: var(--home); vertical-align: middle; margin-left: 4px; }
.card.draft { background: var(--draw-bg); color: var(--draw); border-color: transparent; box-shadow: none; font-size: 14px; }
.card.draft a { color: inherit; }
.card.access h3 { margin: 18px 0 6px; }
.card.access .kv { margin-top: 8px; }
.card.access ul { padding-left: 20px; } .card.access li { margin: 5px 0; }

/* ---- navigation ---- */
.navform .row { margin: 10px 0 12px; }
.navform button[type="submit"] { background: var(--theme); color: var(--theme-ink); border-color: var(--theme); }
.essential { display: flex; gap: 10px; align-items: baseline; margin: 8px 0; font-size: 15px; }
.essential .ico { flex: 0 0 auto; }
.leg { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 14px; }
.leg h3 { margin-top: 12px; }
.leg .badge { font-size: 11px; background: var(--theme); color: var(--theme-ink); margin-left: 8px; }
/* Cost effective: every way with its cost, cheapest first */
.costs { list-style: none; padding: 0; margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.costs li { display: grid; grid-template-columns: 1fr auto 7em; gap: 10px; align-items: baseline; padding: 9px 12px; font-size: 15px; }
.costs li + li { border-top: 1px solid var(--line); }
.costs li:first-child { background: var(--surface-2); }
.costs strong { font: 600 14px var(--mono); }
.costs .muted { font: 13px var(--mono); text-align: right; }
.vsfuel { border-top: 1px solid var(--line); margin-top: 14px; }
.vsfuel ul { padding-left: 0; list-style: none; } .vsfuel li { margin: 6px 0; }
.steps { padding-left: 20px; margin: 6px 0; } .steps li { margin: 4px 0; }
.itin { padding-left: 22px; } .itin > li { margin: 10px 0; }
.roads { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; margin: 6px 0 10px; }
.roads span { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font: 600 13px var(--mono); background: var(--surface-2); }
.roads span small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.roads .arrow { border: 0; padding: 0; color: var(--muted); font-weight: 400; background: none; }
.trains { width: 100%; border-collapse: collapse; margin: 6px 0; font: 14px var(--mono); font-variant-numeric: tabular-nums; }
.trains th { text-align: left; font-weight: 600; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px 6px 0; border-bottom: 1px solid var(--line); }
.trains td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); }
.late { color: var(--draw); font-size: 12px; font-weight: 600; }
.park:not(.dot) { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: var(--surface-2); }
.price { color: var(--win); }
details.more { margin: 10px 0 4px; }
details.more > summary { cursor: pointer; font: 600 12px var(--mono); letter-spacing: .04em; color: var(--muted); list-style: none; }
details.more > summary:hover { color: var(--ink); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }
details.more > *:not(summary) { font-size: 14px; }

/* ---- help ---- */
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.toc a { font: 600 13px var(--display); padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; }
.toc a:hover { border-color: var(--ink); }
.help { max-width: 820px; }
.help h2 { font: 800 22px/1.2 var(--display); font-stretch: 118%; letter-spacing: -.015em; text-transform: none; color: var(--ink); margin: 0 0 10px; }
.help p, .help li { font-size: 15px; }
.help .kv dt { color: var(--ink); text-transform: none; letter-spacing: 0; font: 650 15px var(--display); }
.help .kv dd { margin-bottom: 4px; }

/* ---- individual sports: the calendar and the field ---- */
.tour h2 { margin: 30px 0 12px; }
.tour .list-fx > p { margin: 14px 18px; }
.chip { display: inline-block; padding: 3px 10px; margin: 2px 0; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; white-space: nowrap; background: var(--surface); }
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--ink); }

/* ---- following a player ---- */
.follow h3 { margin: 18px 0 8px; font-size: 18px; }
.badge { display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .06em; padding: 4px 7px; border-radius: 5px; vertical-align: middle; text-transform: uppercase; background: var(--draw-bg); color: var(--draw); }
.badge.play { background: var(--win-bg); color: var(--win); }
.badge.no { background: var(--loss-bg); color: var(--loss); }
.fx.st-no .who > div:first-child { color: var(--muted); }
.follow-pick .row { margin: 6px 0 4px; }
.follow-pick button[type="submit"] { background: var(--theme); color: var(--theme-ink); border-color: var(--theme); }


/* ---- following: the star, wherever it sits ---- */
button.fav { flex: 0 0 auto; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 400 18px/1 var(--display); cursor: pointer; transition: transform .12s ease, background .12s ease, color .12s ease; }
button.fav:hover { color: var(--ink); border-color: var(--ink); transform: scale(1.06); }
button.fav[aria-pressed="true"] { background: var(--theme); border-color: var(--theme); color: var(--theme-ink); }
button.fav:active { transform: scale(.94); }
button.fav.labelled { width: auto; height: auto; border-radius: var(--radius-s); padding: 9px 14px; font: 700 13px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.clubhero button.fav.labelled { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--c-ink, #fff) 55%, transparent); }
.clubhero button.fav.labelled[aria-pressed="true"] { background: var(--c-ink, #fff); color: var(--c, #000); border-color: var(--c-ink, #fff); }
.next .big button.fav.labelled { vertical-align: middle; margin-left: 8px; position: relative; z-index: 1; }
.list .card button.fav { width: 32px; height: 32px; font-size: 16px; position: relative; z-index: 1; }
.results a { grid-template-columns: 104px 1fr auto; }
.results .fav { grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 32px; height: 32px; font-size: 16px; }

/* the rail's list of who you follow */
.railfollow { margin-top: 14px; }
#rail-following { display: flex; flex-direction: column; gap: 2px; }
#rail-following a { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; color: var(--rail-muted); text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.2; }
#rail-following a:hover, #rail-following a[aria-current] { background: var(--rail-2); color: var(--rail-ink); }
#rail-following a[aria-current]::before { content: ''; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 4px 4px 0; background: var(--theme); }
#rail-following .emoji { width: 20px; text-align: center; font-size: 16px; }
.cdot { flex: 0 0 auto; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin: 0 4px; box-shadow: 0 0 0 2px rgb(255 255 255 / .12); vertical-align: -1px; }
#rail-following a.main .cdot { box-shadow: 0 0 0 2px var(--rail), 0 0 0 4px var(--theme); }

/* the toast after a tap on a star */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px; background: var(--rail); color: var(--rail-ink); border: 1px solid var(--rail-line); box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in .2s ease; }
.toast a { color: inherit; text-decoration-color: var(--theme); text-decoration-thickness: 2px; margin-left: 6px; white-space: nowrap; }
.toast:empty { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---- the merged fixture list: each row wears its team's colour down the left ---- */
.fx.feed::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, transparent); }
.fx.feed .who > div:first-child { font-weight: 500; }
.fx.feed .who strong { font-weight: 750; }
.fx.feed .v { color: var(--muted); font: 500 12px var(--mono); margin: 0 2px; }
.fx.feed .small .comp { margin-left: 0; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sechead a { font: 600 13px var(--display); text-decoration: none; }
.sechead a:hover { text-decoration: underline; }
#foryou .list-fx .pad, .fempty { margin: 16px 18px; }
h3.month { font: 600 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
#f-list > h3.month:first-child { margin-top: 16px; }
.crumb + .card.next { margin-bottom: 26px; }

/* ---- the Following page ---- */
.fadd { max-width: 620px; margin: 6px 0 22px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 0 0 28px; }
.fcard { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 16px 16px 14px 18px; border-radius: var(--radius); background: var(--c, var(--rail)); color: var(--c-ink, var(--rail-ink)); box-shadow: var(--shadow); }
.fcard .kit { position: absolute; inset: 0 0 0 55%; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 20px, color-mix(in srgb, var(--c2, var(--theme)) 45%, transparent) 20px 31px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.fcard.player { background: var(--rail); color: var(--rail-ink); border: 1px solid var(--rail-line); }
.fcard .ftop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fcard .eyebrow { color: inherit; opacity: .8; font-size: 11px; }
.fcard .fname { font-size: 22px; font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.05; color: inherit; text-decoration: none; margin-top: 4px; }
.fcard .fname:hover { text-decoration: underline; }
.fcard .fnext { opacity: .9; }
.fcard .fnext .ha { background: color-mix(in srgb, var(--c-ink, #fff) 18%, transparent); color: inherit; }
.fcard .fmain { margin-top: auto; padding-top: 6px; }
.fcard .linkish { color: inherit; font-size: 12.5px; }
.fcard button.fav { background: color-mix(in srgb, var(--c-ink, #fff) 14%, transparent); border-color: transparent; color: inherit; }
.fcard button.fav[aria-pressed="true"] { background: var(--c-ink, var(--theme)); color: var(--c, var(--theme-ink)); }
.fcard.player button.fav[aria-pressed="true"] { background: var(--theme); color: var(--theme-ink); }
.pill { display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c-ink, #fff) 18%, transparent); }
.fchips { margin: 0 0 6px; }
.fchips button { display: inline-flex; align-items: center; gap: 2px; }
.fchips .cdot { width: 10px; height: 10px; margin: 0 4px 0 0; box-shadow: none; }
.calcard .calbtns { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.calcard .btn { text-align: center; }
.btn.primary { background: var(--theme); color: var(--theme-ink); border-color: var(--theme); }
.btn.primary:hover { filter: brightness(1.05); border-color: var(--theme); }

/* ---- narrower desktops ---- */
@media (max-width: 1180px) {
  .wrap { padding: 24px 28px 56px; }
  .cols { grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
  .hometop { grid-template-columns: minmax(0, 1fr); }
  .homeside { flex-direction: row; flex-wrap: wrap; } .homeside > * { flex: 1 1 280px; }
}

/* ---- phones and small tablets: the rail splits into a top bar and a bottom tab bar ---- */
@media (max-width: 900px) {
  body { display: flex; flex-direction: column; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .rail { display: contents; }
  .railtop { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--rail); color: var(--rail-ink); border-bottom: 1px solid var(--rail-line); }
  .brand { font-size: 18px; padding: 0; gap: 9px; }
  .brand::before { width: 30px; height: 30px; border-radius: 8px; font-size: 17px; }
  .brand[data-emoji]::before { font-size: 16px; }
  .tagline, .railsports { display: none; }
  .langpick { margin: 0 0 0 auto; padding: 6px 8px; font-size: 13px; }
  main.wrap { order: 1; padding: 16px 16px 28px; }
  .railnote { order: 2; margin: 0 16px 20px; color: var(--muted); }
  .railnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--rail); border-top: 1px solid var(--rail-line); }
  .railnav a { flex: 1 1 0; flex-direction: column; gap: 4px; padding: 6px 2px 4px; font-size: 11px; font-weight: 600; text-align: center; }
  .railnav a:hover { background: transparent; }
  .railnav a[aria-current] { background: transparent; }
  .railnav a[aria-current]::before { left: 28%; right: 28%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .railnav svg { width: 22px; height: 22px; }

  .cols { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .cols .seg { align-self: flex-start; }
  .colmain, .colside, .colside.sticky { display: contents; }
  .m1 { order: 1; } .m2 { order: 2; } .m3 { order: 3; }
  .map { height: 280px; }
  .colside h2 + .map { height: 260px; }
  .legend { margin-bottom: 8px; }
  .hometop { gap: 14px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .railfollow { display: none; }
  .homeside:has(.card) { order: -1; }
  .nomine { padding: 14px 18px; border-radius: 16px; font-size: 13px; }
}
@media (max-width: 560px) {
  h1 { font-size: 32px; }
  .hero { padding: 24px 18px 20px; border-radius: 18px; }
  .hero h1 { font-size: 34px; margin-bottom: 18px; }
  .finder .search { font-size: 15px; }
  .hero .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -18px; padding-right: 18px; }
  .hero .chips button { flex: 0 0 auto; }
  .clubhero { padding: 22px 20px 20px; border-radius: 18px; }
  .clubhero h1 { font-size: 38px; }
  .next .big { font-size: 25px; }
  .card { padding: 16px; }
  .fx { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 12px 12px 10px; }
  .fx .when { width: 52px; }
  .fx .when .dd { font-size: 20px; }
  .fx .comp { display: block; margin: 2px 0 0; }
  .fx.feed .sep { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; }
  .sports { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sport { min-height: 0; padding: 14px; }
  .sport .comps { display: none; }
  .sport .name { font-size: 17px; margin-top: 10px; }
  .results a { grid-template-columns: 84px 1fr; }
  .list { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fcard { min-height: 128px; padding: 12px 12px 12px 14px; }
  .fcard .fname { font-size: 17px; }
  .fcard .fnext { font-size: 12px; }
  .results a { grid-template-columns: 84px 1fr auto; }
}

/* ---- accessibility ---- */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.rail :focus-visible, .clubhero :focus-visible, .card.next :focus-visible { outline-color: currentColor; }
h1:focus, h2:focus, main:focus { outline: none; }
::placeholder { color: var(--muted); opacity: 1; }
.card.access .lead { font-weight: 600; font-size: 18px; }
.card.access .kv dt { font: 650 13px/1.4 var(--display); text-transform: none; letter-spacing: 0; color: var(--ink); }
@media (max-width: 900px) { html { scroll-padding: 64px 0 84px; } }
@media (max-width: 560px) { .tabs { flex-wrap: wrap; overflow: visible; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) {
  .tabs a[aria-current="page"], [aria-pressed="true"], [aria-checked="true"], .railnav a[aria-current] { outline: 2px solid Highlight; outline-offset: -2px; }
}
.railnote a { color: inherit; }
