/* Tone and manner: "The Special One" — cool command, passion held back for the moment that counts.
   Rules and the reasons for them are in docs/design.md; the values here are the source of truth. */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/barlow-condensed-800.woff2') format('woff2'); }

:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --border: #262b33;
  --hairline: rgb(201 164 92 / 0.35);
  --header-bg: rgb(11 13 16 / 0.88);
  --crest-bg: rgb(255 255 255 / 0.06);
  --text: #f2efea;
  --text-2: #c9ccd1;
  --muted: #9aa0a8;
  --gold: #c9a45c;
  --gold-light: #e2c68a;
  --gold-dark: #8c6e35;
  --red: #e1251b;
  --on-red: #fff;
  --black: #000;
  --red-dark: #c41d14;
  /* Small red text: --red is 3.8:1 on the surface, under the 4.5:1 that small text needs. */
  --red-text: #ff5a4f;
  --hero-glow: #1a1f27;
  --radius: 4px;
  /* Japanese has no glyphs in Barlow; each falls back to the system's Japanese sans at the same weight. */
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  --serif: Georgia, 'Times New Roman', 'Hiragino Mincho ProN', 'Noto Serif JP', 'Yu Mincho', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: var(--bg); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
/* Classes such as .btn set display, which would otherwise override the hidden attribute. */
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-family: var(--display); font-weight: 800; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.header-row { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); }
.brand svg { color: var(--gold); font-size: 28px; }
.site-nav { display: flex; align-items: center; gap: 24px; font: 600 15px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.site-nav a { transition: color 0.15s var(--ease); }
.site-nav a:hover { color: var(--text); }
.nav-history { color: var(--gold); border: 1px solid var(--hairline); padding: 7px 12px; border-radius: var(--radius); }
.site-nav .nav-history:hover { color: var(--gold-light); border-color: var(--gold); }
/* Language menu: globe + current code; opens to each language under its own name. */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color 0.15s var(--ease); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { border-color: var(--gold); }
.lang-switch summary svg:first-child { color: var(--gold); font-size: 16px; }
.lang-switch summary svg:last-child { font-size: 14px; color: var(--muted); transition: transform 0.15s var(--ease); }
.lang-switch[open] summary svg:last-child { transform: rotate(180deg); }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; margin: 0; padding: 6px; list-style: none; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius); z-index: 60; }
.lang-switch li a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 12px 10px 10px; border-left: 2px solid transparent; border-radius: var(--radius); font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); }
.lang-switch li a small { font: 600 12px var(--display); letter-spacing: 0.14em; color: var(--muted); }
.lang-switch li a:hover { background: var(--surface); }
.lang-switch li a[aria-current] { color: var(--gold); border-left-color: var(--gold); }
.menu-btn { display: none; background: none; border: 0; color: var(--gold); font-size: 28px; padding: 8px; cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--hairline); padding: 8px 16px 16px; font-size: 18px; }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-history { margin-top: 12px; text-align: center; }
  .lang-switch { margin-top: 12px; }
  .lang-switch summary { width: 100%; justify-content: center; padding: 12px; }
  .lang-switch ul { position: static; margin-top: 8px; min-width: 0; }
}

/* Hero: the night, one line of gold under the name. */
.hero { display: flex; align-items: center; background: radial-gradient(120% 140% at 50% 0%, var(--hero-glow) 0%, var(--bg) 60%); text-align: center; padding: 56px 0 44px; border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero h1 { font-size: clamp(48px, 10vw, 104px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.9; color: var(--text); }
.hero h1::after { content: ''; display: block; width: 64px; height: 3px; margin: 22px auto 0; background: var(--gold); }
.hero-tag { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: clamp(17px, 2.4vw, 22px); margin: 0; }
/* The site's own line under the name (home): read at once, not a footnote. */
.hero .hero-tag { color: var(--text-2); font-size: clamp(20px, 3.2vw, 30px); }
/* Japanese has no true italic; the browser would slant the glyphs. Any Japanese text stays upright, whatever
   class asks for italic; English quotes inside Japanese pages carry lang="en" and keep theirs. */
:lang(ja) { font-style: normal !important; }
/* Japanese headings break at spaces and punctuation ("モウリーニョ / クイズ"), not inside a word; a run
   with no break point still wraps rather than overflowing. */
:lang(ja) :is(h1, h2, h3) { word-break: keep-all; overflow-wrap: anywhere; }

/* Buttons: sharp, uppercase; gold for the way on, red only where it is the moment. */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius); padding: 12px 22px; font: 600 16px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-light); }
.btn-dark { background: transparent; color: var(--text); border-color: var(--border); }
.btn-dark:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-red { background: var(--red); color: var(--on-red); }
.btn-red:hover { background: var(--red-dark); }

/* Sections: a short gold bar before each heading, the "one". */
.sections { padding: 56px 16px 0; }
.section { margin-bottom: 96px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 28px; }
.section h2 { font-size: clamp(30px, 5vw, 44px); text-transform: uppercase; letter-spacing: -0.005em; color: var(--text); }
.section h2::before { content: ''; display: block; width: 24px; height: 3px; margin-bottom: 12px; background: var(--gold); }
.section > h2 { margin-bottom: 20px; }
.sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.more { margin-top: 16px; }
.more a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font: 600 15px var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.loading { color: var(--muted); grid-column: 1 / -1; text-align: center; padding: 40px 0; }

.grid { display: grid; gap: 16px; }
/* Grid items may shrink below their content's width, so a long name or number wraps instead of
   widening the page on a phone. */
.grid > * { min-width: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Cards: no shadows; lifted by 2px and a gold line on hover. */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.card:hover { border-color: var(--hairline); }
.card h3 { font-size: 22px; letter-spacing: 0.005em; color: var(--text); }
.card p { margin: 0; }
.card-label { color: var(--gold); font: 600 13px/1.2 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.card-link:hover { border-color: var(--gold); transform: translateY(-2px); }
.card-link:hover h2, .card-link:hover h3 { color: var(--gold-light); }
.card-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.quote-text { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.6vw, 26px); color: var(--text); line-height: 1.45; }
.quote-context { color: var(--muted); font-size: 13px; }

/* News */
.news-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.news-meta time { color: var(--gold-light); font-weight: 600; }
.news-lang { margin-left: 8px; padding: 1px 6px; border: 1px solid var(--border); border-radius: var(--radius); font: 600 11px var(--display); letter-spacing: 0.12em; color: var(--muted); }
.news-card h3 { font: 600 16px/1.45 var(--sans); letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.read { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); color: var(--gold); font: 600 14px var(--display); letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }

/* Matches: the next one carries the red. */
.match { position: relative; text-align: center; align-items: center; }
.match.next { border-color: var(--hairline); border-bottom: 2px solid var(--red); }
.match-tag { position: absolute; top: 0; right: 0; padding: 5px 12px; font: 600 13px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; border-radius: 0 var(--radius) 0 var(--radius); background: var(--surface-2); color: var(--muted); }
.match.next .match-tag { background: var(--red); color: var(--on-red); }
.teams { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; width: 100%; }
.team { flex: 1 1 0; min-width: 0; max-width: 140px; font: 600 17px/1.2 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); overflow-wrap: break-word; }
.team img { width: 52px; height: 52px; object-fit: contain; background: var(--crest-bg); border-radius: 50%; padding: 4px; display: block; margin: 0 auto 8px; }
.team small { display: block; font: 400 11px var(--sans); letter-spacing: 0.08em; color: var(--muted); }
.score { flex: none; font: 800 clamp(32px, 9vw, 44px)/1 var(--display); color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.match-date { font-size: 13px; color: var(--muted); }
.highlights { margin-top: 20px; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* Videos */
.video { position: relative; padding-top: 0; overflow: hidden; }
.video-thumb { position: relative; margin: 0 -28px 8px; aspect-ratio: 16 / 9; background: var(--black); overflow: hidden; display: block; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.8; filter: saturate(0.85); transition: opacity 0.2s var(--ease), filter 0.2s var(--ease); }
.video:hover .video-thumb img { opacity: 1; filter: none; }
.video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--on-red); }
.video-play svg { width: 56px; height: 56px; padding: 16px; background: var(--red); border-radius: 50%; transition: transform 0.2s var(--ease); }
.video-frame { margin: 0 -28px 8px; width: calc(100% + 56px); aspect-ratio: 16 / 9; border: 0; display: block; }
.video:hover .video-play svg { transform: scale(1.08); }

/* Inner pages */
.page { padding-top: 64px; }
.page-head { text-align: center; margin-bottom: 64px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.page-head h1 { font-size: clamp(44px, 8vw, 80px); text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; color: var(--text); }
.page-head h1::after { content: ''; display: block; width: 48px; height: 3px; margin: 18px auto 0; background: var(--gold); }
.intro { max-width: 640px; font-size: 16px; color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: flex; flex-direction: column; gap: 32px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px; background: linear-gradient(var(--gold), var(--border) 70%, transparent); }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 34px; width: 11px; height: 11px; background: var(--gold); transform: rotate(45deg); outline: 4px solid var(--bg); }
.timeline h2 { font-size: 28px; text-transform: uppercase; color: var(--text); }
.back { margin: 0 0 24px; }
.back svg { transform: scaleX(-1); }
.detail { padding: clamp(28px, 5vw, 56px); gap: 18px; margin-bottom: 56px; }
.detail-quote { font-size: clamp(26px, 4.4vw, 40px); }
.detail-title { font-size: clamp(34px, 6vw, 56px); text-transform: uppercase; letter-spacing: -0.005em; color: var(--text); }
.detail-text { color: var(--text-2); font-size: 18px; line-height: 1.75; }
.era-points { margin: 4px 0 0; padding: 18px 18px 18px 36px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 12px; font-size: 16px; color: var(--text-2); }
.era-points li::marker { color: var(--gold); }
.era-next { text-align: right; }
.era-next .card-label { align-self: flex-end; }
@media (min-width: 720px) { .era-next { grid-column: 2; } }
.share { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* The countdown is the moment: red label with a slow pulse, white figures. */
.countdown { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 24px; color: var(--text); }
/* Inside the next match's card on the home page: centred, above the teams. */
.match .countdown { justify-content: center; margin: 8px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--border); width: 100%; row-gap: 6px; }
.match .countdown strong { font-size: clamp(26px, 7.5vw, 52px); }
.countdown .card-label { color: var(--red-text); display: inline-flex; align-items: center; gap: 8px; }
.countdown .card-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 2s ease-in-out infinite; }
.countdown strong { font: 800 clamp(32px, 6vw, 52px)/1 var(--display); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { opacity: 0.25; } }
.news-lead { grid-column: 1 / -1; }
/* The rest read as a list: compact, and the whole card is already the link. */
.news-card:not(.news-lead) { padding: 16px 20px; gap: 8px; }
.news-card:not(.news-lead) .read { display: none; }
.news-lead h3 { font: 800 clamp(26px, 3.6vw, 36px)/1.1 var(--display); letter-spacing: -0.005em; -webkit-line-clamp: 3; }
.daily-foot { justify-content: space-between; align-items: center; }
.more-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font: 600 15px var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.more-link:hover { color: var(--gold-light); }
.era-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.era-card { padding: 18px; gap: 6px; }
.era-card h3 { font-size: 20px; text-transform: uppercase; }
.quote-original { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 17px; }
.quote-original .card-label { font-style: normal; margin-right: 6px; }
.quote-era { margin: 4px 0 0; }
.sources { font-size: 13px; color: var(--muted); }
.sources .card-label { margin-right: 6px; }
.sources a { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold-dark); text-underline-offset: 3px; }
.sources a:hover { text-decoration-color: var(--gold); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -32px 0 48px; }
.trophy-era h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* The heading is a flex row (name and years); the gold bar takes a line of its own, above, as elsewhere. */
.trophy-era h2::before { flex: 0 0 24px; margin: 0 100% 0 0; }
.trophy-era h2 a:hover { color: var(--gold-light); }
.trophy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.trophy { padding: 20px; gap: 8px; }
.trophy h3 { display: flex; align-items: center; gap: 8px; font-size: 21px; text-transform: uppercase; }
.trophy h3 svg { color: var(--gold); }
.tag-list .pill { align-self: auto; font-size: 14px; padding: 7px 14px; }
.tag-list .pill[aria-current="page"] { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.tag-list .count { opacity: 0.7; font-weight: 400; margin-left: 4px; }
.pill.pill-tag { background: transparent; }
.pill { align-self: flex-start; background: transparent; color: var(--gold); border: 1px solid var(--hairline); font: 600 13px/1.2 var(--display); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius); }
.trophies { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--muted); }
.trophies svg { color: var(--gold); margin-top: 3px; }
.timeline ul { margin: 4px 0 0; padding: 18px 18px 18px 36px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); }
.timeline li::marker { color: var(--gold); }
@media (min-width: 900px) {
  .timeline { padding: 0; }
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline-item { width: 50%; padding-right: 48px; }
  .timeline-item:nth-child(even) { margin-left: 50%; padding: 0 0 0 48px; }
  .timeline-item::before { left: auto; right: -6px; }
  .timeline-item:nth-child(even)::before { right: auto; left: -5px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 96px; padding: 56px 0; text-align: center; color: var(--muted); font-size: 13px; }
.site-footer p { margin: 0 0 8px; }
.footer-name { font: 800 22px var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); }
.footer-tag { color: var(--gold); font-family: var(--serif); font-style: italic; }
.footer-nav { margin: 18px 0; font: 600 15px var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.footer-nav a:hover { color: var(--gold-light); }
.site-footer .footer-note { max-width: 560px; margin: 0 auto; font-size: 12px; color: var(--muted); }
.site-footer .footer-contact { margin: 8px auto 0; font-size: 12px; color: var(--muted); }
.site-footer .footer-contact a { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }

/* Language suggestion banner */
.lang-banner { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 480px; margin: 0 auto; z-index: 60; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.lang-banner a { color: var(--gold); font-weight: 600; }
.lang-banner button { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }

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

/* /matches/: one row per match */
.match-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.match-row { display: grid; grid-template-columns: 72px 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.match-row time { color: var(--gold); font: 600 15px var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.match-row .row-team { font: 600 18px/1.2 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.match-row .row-team.home { text-align: right; }
.match-row .row-score { min-width: 72px; text-align: center; font: 800 22px var(--display); font-variant-numeric: tabular-nums; }
.match-row small { grid-column: 2 / -1; text-align: center; font-size: 12px; }
@media (max-width: 600px) {
  .match-row { grid-template-columns: 1fr auto 1fr; }
  .match-row time { grid-column: 1 / -1; }
  .match-row small { grid-column: 1 / -1; }
}

/* /stats/: numbers are the headline. */
.stat-value { margin: 0; font: 800 clamp(64px, 9vw, 96px)/0.9 var(--display); color: var(--gold); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-milestone { align-items: flex-start; }
.stat-milestone p, .stat p { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.stats-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stats-table th[scope="row"], .stats-table thead th:first-child { text-align: left; }
.stats-table th[scope="row"] { font: 600 17px var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.stats-table td:last-child, .stats-table thead th:last-child { text-align: left; white-space: normal; min-width: 200px; font-size: 13px; }
.stats-table thead th { color: var(--gold); font: 600 14px var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.stats-table tbody tr:last-child > * { border-bottom: 0; }
.stats-table tbody tr:hover { background: var(--surface-2); }
.stats-table a { color: inherit; }
.stats-note { font-size: 14px; margin: 12px 0 0; }
.era-record { margin-top: 16px; }
.era-record p { margin: 0 0 6px; }

/* /rivals/ */
.rival-card h2 { margin: 0; font-size: 30px; text-transform: uppercase; }
.rival-card p { margin: 0; }
.h2h { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.h2h p { margin: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 600px) { .h2h { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* On this day */
.otd { margin-top: 24px; }
.otd p { margin: 0; }
/* A timeline: oldest first, each year on the gold rule. */
.otd-list { list-style: none; margin: 16px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--gold); display: grid; gap: 18px; }
.otd-list li { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.otd-when { font-size: 14px; color: var(--muted); }
.otd-year { font: 800 26px/1 var(--display); color: var(--gold); margin-right: 6px; }
.otd-quote { font-style: italic; }
.otd-quote a { color: inherit; text-decoration: none; }
.otd-quote a:hover { text-decoration: underline; }

/* Quiz */
.quiz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.quiz-options { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-options .btn:disabled { cursor: default; opacity: 0.45; }
.quiz-options .btn.is-right { background: var(--gold); color: var(--bg); border-color: var(--gold); opacity: 1; }
.quiz-options .btn.is-wrong { background: var(--red); color: var(--on-red); border-color: var(--red); opacity: 1; }
.quiz-result:empty { display: none; }
.quiz-result { font: 600 15px var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.quiz-q summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.quiz-score { font: 800 36px var(--display); color: var(--gold); margin-top: 24px; letter-spacing: 0.02em; }
.quiz-share .share { margin-top: 0; padding-top: 12px; }

/* Fan prediction: steppers to pick a score, then the tally. Gold for the club's wins, no red (docs/design.md). */
.predict { margin: 16px 0 40px; gap: 14px; }
.predict-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.predict-form { display: grid; gap: 10px; justify-items: start; }
.predict-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.5ch auto; align-items: center; gap: 10px; width: 100%; max-width: 420px; }
.predict-team { font: 600 18px/1.2 var(--display); letter-spacing: 0.03em; text-transform: uppercase; overflow-wrap: break-word; min-width: 0; }
.predict-goals { font: 800 32px/1 var(--display); text-align: center; color: var(--gold); font-variant-numeric: tabular-nums; }
.predict-note:empty { display: none; }
.predict-mine { font: 600 18px var(--display); letter-spacing: 0.04em; }
.predict-result { font: 800 22px/1.2 var(--display); color: var(--text); }
.predict-hit { color: var(--gold); font-weight: 600; }
.predict-bar { display: flex; gap: 2px; height: 10px; border-radius: var(--radius); overflow: hidden; background: var(--border); }
.predict-bar .seg { flex-basis: 0; }
.predict-bar .seg-win { background: var(--gold); }
.predict-bar .seg-draw { background: var(--muted); }
.predict-bar .seg-loss { background: var(--surface-2); }
.predict-bar .seg.is-result { outline: 2px solid var(--text); outline-offset: -2px; }
.predict-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--muted); }
.predict-legend strong { font: 800 20px var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.predict-legend .leg-win strong { color: var(--gold); }
.predict-top { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.predict-top li { display: flex; align-items: baseline; gap: 8px; }
.predict-top strong { font: 800 32px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.predict-top small { color: var(--muted); }
.predict-caption { margin-top: 4px; }
