/* LongCastles · "Matchday" design system. Reference: docs/DESIGN.md.
   CSP: style-src 'self' — no inline styles anywhere; everything lives in files. */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-grotesque-latin-wdth-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-grotesque-latin-ext-wdth-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/jetbrains-mono-latin-600.woff2) format("woff2"); }

/* ── Tokens ────────────────────────────────────────────────────────────── */
/* Chrome is ink, bone and volt. Colour belongs to tournaments: the nine .evp-N palettes below. */
:root {
  color-scheme: dark;
  --ink: #0B0B0F; --bone: #F3F0E7; --volt: #D4FF3A;
  --bg: #0B0B0F; --bg-2: #111117; --surface: #17171E; --surface-2: #20202A; --line: #2C2C38; --line-2: #4A4A5A; --field-line: #7B7B8C;
  --text: #FAF8F1; --text-2: #CBC8BF; --muted: #9C9991; --list-surface: #14141A;
  --card: #17171E; --card-2: #1F1F28; --edge: #4E4E5E; --band: #F3F0E7; --on-band: #0B0B0F;
  --accent: #D4FF3A; --on-accent: #0B0C06; --accent-text: #D4FF3A; --mark-alt: #2E2E34; --accent-wash: rgba(212, 255, 58, .12); --ring: #D4FF3A;
  --live: #FF5436; --live-fill: #D6391D; --live-text: #FF7A61; --live-wash: rgba(255, 84, 54, .14);
  --up: #63D98F; --down: #FF7A61;
  /* Board squares. Without an event a board is stone; an .evp-N class on the board or around it recolours it. */
  --sq-light: #E8E5D9; --sq-dark: #969C8F; --sq-last-light: #F1FF9A; --sq-last-dark: #C9E34F; --sq-coord: rgba(11, 11, 15, .82);
  --ev: #969C8F; --ev-light: #E8E5D9; --ev-deep: #1B1D19; --cap-tray: #E8E5D9;
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px; --r-sm: 6px; --max: 1320px; --gutter: clamp(16px, 4vw, 40px);
  --hdr-h: 64px; --sticky-top: var(--hdr-h);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); --hard: 4px 4px 0 var(--text);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --page-bg: #FCFCFC;
    --bg: #F3F0E7; --bg-2: #E9E5D9; --surface: #FFFFFF; --surface-2: #F6F4EC; --line: #D9D5C8; --line-2: #A6A395; --field-line: #7A776B;
    --text: #0B0B0F; --text-2: #33333B; --muted: #57575F; --list-surface: #FBFAF6;
    --card: #F4F1E8; --card-2: #EAE6D9; --edge: #0B0B0F; --band: #0B0B0F; --on-band: #F3F0E7;
    --accent-text: #0B0B0F; --mark-alt: #D4FF3A; --accent-wash: rgba(212, 255, 58, .5); --ring: #0B0B0F;
    --live-text: #A72E17; --live-wash: rgba(255, 84, 54, .12); --up: #1A693B; --down: #A72E17;
    --shadow: 0 24px 60px -30px rgba(16, 22, 34, .28);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --page-bg: #FCFCFC;
  --bg: #F3F0E7; --bg-2: #E9E5D9; --surface: #FFFFFF; --surface-2: #F6F4EC; --line: #D9D5C8; --line-2: #A6A395; --field-line: #7A776B;
  --text: #0B0B0F; --text-2: #33333B; --muted: #57575F; --list-surface: #FBFAF6;
  --card: #F4F1E8; --card-2: #EAE6D9; --edge: #0B0B0F; --band: #0B0B0F; --on-band: #F3F0E7;
  --accent-text: #0B0B0F; --mark-alt: #D4FF3A; --accent-wash: rgba(212, 255, 58, .5); --ring: #0B0B0F;
  --live-text: #A72E17; --live-wash: rgba(255, 84, 54, .12); --up: #1A693B; --down: #A72E17;
  --shadow: 0 24px 60px -30px rgba(16, 22, 34, .28);
}
/* Tournament palettes. backend/present.py board_palette() picks one from the tournament's stable id, so an event
   keeps its colours on every page. --sq-* colour the board; --ev is the event colour for chips and rules (ink text
   reaches 4.5:1 on each), --ev-light its tint and --ev-deep the shade a stage takes (white text). */
.evp-1 { --sq-light: #EAF5E4; --sq-dark: #57A870; --ev: #57A870; --ev-light: #EAF5E4; --ev-deep: #0D3A22; }
.evp-2 { --sq-light: #E2F5F3; --sq-dark: #3FAAA9; --ev: #3FAAA9; --ev-light: #E2F5F3; --ev-deep: #06393C; }
.evp-3 { --sq-light: #E6F3FC; --sq-dark: #5BB0E6; --ev: #5BB0E6; --ev-light: #E6F3FC; --ev-deep: #0A3352; }
.evp-4 { --sq-light: #EAEFFE; --sq-dark: #6A8EEA; --ev: #6A8EEA; --ev-light: #EAEFFE; --ev-deep: #13255F; }
.evp-5 { --sq-light: #F1ECFD; --sq-dark: #A08AE2; --ev: #A08AE2; --ev-light: #F1ECFD; --ev-deep: #2A1767; }
.evp-6 { --sq-light: #FCE9F2; --sq-dark: #DC76A8; --ev: #DC76A8; --ev-light: #FCE9F2; --ev-deep: #55123A; }
.evp-7 { --sq-light: #FDECE5; --sq-dark: #EA8066; --ev: #EA8066; --ev-light: #FDECE5; --ev-deep: #5A1A0B; }
.evp-8 { --sq-light: #FBF2D4; --sq-dark: #DCA92E; --ev: #DCA92E; --ev-light: #FBF2D4; --ev-deep: #453000; }
.evp-9 { --sq-light: #F4E6D1; --sq-dark: #BC8D62; --ev: #BC8D62; --ev-light: #F4E6D1; --ev-deep: #3A2410; }
/* The stage is always night, in either theme: it re-declares the tokens so everything inside adapts. With a
   tournament palette on it (.stage.evp-N) it takes the event's deep shade instead of ink. */
.stage, .site-header, .site-footer {
  color-scheme: dark;
  --bg: #0B0B0F; --bg-2: #111117; --surface: #18181F; --surface-2: #22222C; --line: #2E2E3A; --line-2: #4C4C5C; --field-line: #7B7B8C;
  --card: #18181F; --card-2: #20202A; --edge: #4C4C5C; --band: #2C2C38; --on-band: #FAF8F1;
  --text: #FAF8F1; --text-2: #CBC8BF; --muted: #9C9991; --list-surface: #14141A;
  --accent-text: #D4FF3A; --mark-alt: #2E2E34; --accent-wash: rgba(212, 255, 58, .12); --ring: #D4FF3A;
  --live-text: #FF7A61; --live-wash: rgba(255, 84, 54, .16); --up: #63D98F; --down: #FF7A61;
  color: var(--text);
}
.stage { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r); background: var(--ink); border: 2px solid var(--ink); }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, .035) 0 25%, transparent 0 50%) 0 0 / 128px 128px;
  mask-image: linear-gradient(120deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%); }
.stage[class*="evp-"] { background: var(--ev-deep); border-color: var(--ev-deep);
  --surface: rgba(255, 255, 255, .07); --surface-2: rgba(255, 255, 255, .12); --card: rgba(255, 255, 255, .07); --card-2: rgba(255, 255, 255, .11); --edge: rgba(255, 255, 255, .34); --band: rgba(255, 255, 255, .16); --line: rgba(255, 255, 255, .16); --line-2: rgba(255, 255, 255, .34); --muted: rgba(250, 248, 241, .72); --text-2: rgba(250, 248, 241, .88); }
.stage[class*="evp-"]::before { background: repeating-conic-gradient(color-mix(in srgb, var(--ev) 22%, transparent) 0 25%, transparent 0 50%) 0 0 / 128px 128px; }
/* Stage variants, so a page with several feature panels is not all night: volt (ink on the accent) and bone (ink on
   the board's light square). Both re-declare the tokens like the stage itself and look the same in either theme. */
.stage--volt {
  color-scheme: light;
  --bg: #D4FF3A; --bg-2: #C6F02E; --surface: rgba(11, 12, 6, .06); --surface-2: rgba(11, 12, 6, .1); --card: rgba(11, 12, 6, .06); --card-2: rgba(11, 12, 6, .1); --edge: #0B0C06; --band: #0B0C06; --on-band: #D4FF3A; --line: rgba(11, 12, 6, .18); --line-2: rgba(11, 12, 6, .4); --field-line: rgba(11, 12, 6, .55);
  --text: #0B0C06; --text-2: #2A300C; --muted: #4C5516;
  --accent: #0B0C06; --on-accent: #D4FF3A; --accent-text: #0B0C06; --accent-wash: rgba(11, 12, 6, .1); --ring: #0B0C06;
  --live-text: #9A2A14; --up: #1E5A2E; --down: #9A2A14;
  background: #D4FF3A; border-color: #0B0C06;
}
.stage--bone {
  color-scheme: light;
  --bg: #E8E5D9; --bg-2: #DDD9CB; --surface: #F1EFE6; --surface-2: #F8F6F0; --card: #F4F2EA; --card-2: #E9E5D8; --edge: #0B0B0C; --band: #0B0B0C; --on-band: #F3F0E7; --line: #CCC8B9; --line-2: #A9A596; --field-line: #7A7668;
  --text: #0B0B0C; --text-2: #3B3A36; --muted: #5F5C54;
  --accent-text: #0B0B0C; --accent-wash: rgba(212, 255, 58, .55); --ring: #0B0B0C;
  --live-text: #A72E17; --up: #1A693B; --down: #A72E17;
  background: #E8E5D9; border-color: #0B0B0C;
}
.stage--volt::before, .stage--bone::before { background: repeating-conic-gradient(rgba(0, 0, 0, .05) 0 25%, transparent 0 50%) 0 0 / 128px 128px; }
.stage--volt .btn:not(.btn--ghost):hover { background: #262A0E; border-color: #262A0E; }

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky-top) + 20px); }
body { margin: 0; background: var(--page-bg, var(--bg)); color: var(--text); font: 400 17px/1.5 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
abbr[title] { text-decoration: none; cursor: help; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ── Utilities ─────────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
/* Above 980px the header and footer span the window on every page, with 2.5% side margins.
   Pages led by walls of boards (body.wide-page) open their main column the same way; the rest keep the --max column. */
@media (min-width: 981px) {
  .site-header .wrap, .site-footer .wrap, .wide-page .site-main { --gutter: 2.5vw; max-width: none; }
}
.mono { font-family: var(--mono); font-size: 1em; }
.muted { color: var(--muted); }
.num { text-align: right; }
.c { text-align: center; }
.strong { font-weight: 650; }
.min0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label, .kicker { font: 700 13px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); }
.kicker--accent { color: var(--accent-text); }
.meta { font-size: 14px; color: var(--muted); }
.lede { font-size: clamp(17px, 1.7vw, 21px); line-height: 1.4; color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.prose { max-width: 68ch; color: var(--text-2); font-size: 16px; line-height: 1.65; }
.prose p + p { margin-top: 1em; }
.prose a, .link { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover, .link:hover { background: var(--accent-wash); }
.prose strong { color: var(--text); font-weight: 650; }
.stretched::after { content: ""; position: absolute; inset: 0; }
.game-link-surface { position: relative; isolation: isolate; }
.game-link-surface a:not(.stretched) { position: relative; z-index: 1; }
.game-link-surface:has(.stretched:focus-visible) { outline: 2px solid var(--ring); outline-offset: -3px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.display { font-family: var(--display); font-weight: 800; font-stretch: 87.5%; letter-spacing: -.02em; }
em, .em { font-family: inherit; font-style: italic; }
/* The key words of a headline sit on a volt marker block instead of leaning: the display face has no italic. */
h1 em, h2 em, h3 em, .hl-em, .lv-dr-hl em, .gm-big em { font-style: normal; background: linear-gradient(transparent 9%, var(--accent) 9% 93%, transparent 93%); color: var(--on-accent) !important; padding: 0 .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ── Shell: header ─────────────────────────────────────────────────────── */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 650; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); border-bottom: 2px solid var(--ink); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--hdr-h); }
/* The wordmark: the tower on a volt tile, then both words in the display face, "Castles" in volt. The header and the
   footer are always ink, so the mark looks the same in either theme. */
.wordmark { display: inline-flex; align-items: center; gap: 12px; flex: none; font: 800 condensed 30px/1 var(--display); letter-spacing: .005em; text-transform: uppercase; color: var(--text); }
.wordmark-mark { width: 36px; height: 36px; flex: none; padding: 4px 11px; background: var(--volt); border-radius: 4px; }
.wm-a { fill: var(--ink); } .wm-b { fill: var(--volt); }
.wordmark-text { display: inline-block; white-space: nowrap; }
.wordmark-text span { color: var(--volt); }
.wordmark:hover .wordmark-text { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; text-decoration-color: var(--volt); }
.main-nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.main-nav a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; font: 800 condensed 19px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.main-nav a:hover { color: var(--volt); }
.main-nav a[aria-current="page"] { color: var(--volt); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 4px; background: var(--volt); }
/* The live count beside the nav link: fresh boards on volt, delayed boards outlined, so the header says what the page says. */
.nav-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; font: 700 13px/1 var(--sans); letter-spacing: 0; }
.nav-count--live { background: var(--volt); color: var(--ink); }
.nav-count--stale { border: 1.5px dashed var(--muted); color: var(--text-2); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-open { display: inline-flex; align-items: center; gap: 10px; height: 40px; min-width: 250px; padding: 0 10px 0 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font-size: 14px; }
.search-open:hover { border-color: var(--volt); color: var(--text); }
.search-open svg, .icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.search-open-text { flex: 1; text-align: left; }
.kbd, kbd { font: 600 12px/1 var(--mono); padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--muted); background: var(--bg-2); }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); padding: 0; }
.icon-btn:hover { border-color: var(--text); color: var(--text); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; } :root[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: block; } :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; } }
html:not(.js) .theme-toggle { display: none; }
@media (max-width: 1180px) { .search-open { min-width: 0; flex: 0 1 220px; overflow: hidden; white-space: nowrap; } .search-open .kbd { display: none; } .header-inner { gap: 16px; } .main-nav a { padding-inline: 10px; } }
/* Between the phone layout and a roomy desktop the search box is its icon alone, so the header never overflows. */
@media (max-width: 1100px) { .header-tools { flex: none; } .search-open-text { display: none; } .search-open { flex: none; width: 40px; padding: 0; justify-content: center; } }
@media (max-width: 900px) {
  :root { --hdr-h: 104px; }
  .header-inner { flex-wrap: wrap; gap: 0 12px; }
  .wordmark { height: 58px; font-size: 26px; } .wordmark-mark { width: 32px; height: 32px; padding: 4px 10px; }
  .main-nav { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding-inline: calc(var(--gutter) - 12px); min-height: 46px; flex-wrap: wrap; border-top: 1px solid var(--line); }
  .main-nav a { min-height: 44px; }
  .search-open-text { display: none; } .search-open { width: 40px; padding: 0; justify-content: center; }
}

@media (max-width: 520px) {
  .main-nav { justify-content: space-evenly; gap: 0; padding-inline: 2px; }
  .main-nav a { justify-content: center; padding-inline: 3px; gap: 4px; font-size: 15px; letter-spacing: 0; }
  .main-nav .nav-count { min-width: 18px; height: 18px; padding-inline: 3px; font-size: 11px; }
  .main-nav a[aria-current="page"]::after { inset-inline: 3px; }
}

/* Ticker: latest live boards and results, on every page. A volt band under the ink header, in both themes. */
.ticker { --text: #0B0C06; --text-2: #262B08; --line: rgba(11, 12, 6, .22); --ring: #0B0C06; background: var(--volt); color: var(--text); border-bottom: 2px solid var(--ink); overflow: hidden; font: 500 14px/1 var(--mono); }
.ticker-inner { display: flex; align-items: stretch; }
.ticker-tag { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px 0 var(--gutter); background: var(--ink); color: var(--volt); font: 800 condensed 16px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; z-index: 1; }
.ticker-view { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 90s linear infinite; }
/* The strip holds still under the pointer, while a link in it has focus, and while the strip itself has keyboard focus
   (it takes focus when most of its items are not links: a game without a page is a plain <span class="ticker-item">). */
.ticker-view:hover .ticker-track, .ticker-view:focus-visible .ticker-track, .ticker-track:focus-within { animation-play-state: paused; }
/* While the strip has keyboard focus it stands still and can be scrolled with the arrow keys. */
.ticker-view:focus-visible { outline-offset: -3px; overflow-x: auto; scrollbar-width: none; }
.ticker-group { display: flex; flex: none; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 18px; color: var(--text-2); white-space: nowrap; border-right: 1px solid var(--line); }
a.ticker-item:hover { color: var(--volt); background: var(--ink); }
a.ticker-item:hover .ticker-score { background: var(--volt); color: var(--ink); }
a.ticker-item:hover .ticker-live { background: var(--live-fill); }
a.ticker-item:hover b { color: inherit; }
a.ticker-item:focus-visible { outline-offset: -3px; }
.ticker-item b { font-weight: 600; color: var(--text); }
.ticker-score { background: var(--ink); color: var(--volt); font-weight: 600; padding: 3px 6px; border-radius: 4px; }
.ticker-live { background: var(--live-fill); color: #fff; font-weight: 600; letter-spacing: .08em; padding: 3px 6px; border-radius: 4px; }
@keyframes ticker { to { transform: translateX(-50%); } }
/* The pause button is shown by script; the choice is kept on <html> (theme.js) so it holds from page to page. It
   freezes the ticker where it is and stops every other animation (live pulses, the radar sweep). */
.ticker-pause { display: none; flex: none; place-items: center; width: 40px; padding: 0; border: 0; border-left: 2px solid var(--ink); background: var(--volt); color: var(--ink); }
.js .ticker-pause { display: grid; }
.ticker-pause:hover { color: var(--volt); background: var(--ink); }
.ticker-pause:focus-visible { outline-offset: -3px; }
.ticker-pause svg { width: 12px; height: 12px; fill: currentColor; }
.ticker-pause .i-play, .motion-paused .ticker-pause .i-pause { display: none; }
.motion-paused .ticker-pause .i-play { display: block; }
.motion-paused .ticker-track { animation-play-state: paused; }
.motion-paused *:not(.ticker-track), .motion-paused *::before, .motion-paused *::after { animation: none !important; }
/* Without JavaScript there is no working pause button, so continuous motion stays off. */
html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; }
html:not(.js) .ticker-view { overflow-x: auto; }
html:not(.js) .ticker-group[aria-hidden="true"] { display: none; }
@media (prefers-reduced-motion: reduce) { .ticker-view { overflow-x: auto; scrollbar-width: none; } .ticker-group[aria-hidden="true"] { display: none; } .js .ticker-pause { display: none; } }

.site-main { flex: 1; padding-top: clamp(24px, 4vw, 44px); padding-bottom: clamp(56px, 8vw, 112px); outline: none; }

/* ── Shell: footer ─────────────────────────────────────────────────────── */
.site-footer { border-top: 6px solid var(--volt); background: var(--ink); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr); gap: 40px; padding-block: 56px 40px; }
.footer-brand p { margin-top: 16px; max-width: 44ch; color: var(--muted); font-size: 14px; }
.footer-word { font: 800 condensed clamp(44px, 7vw, 88px)/.9 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.footer-word em { font-style: normal; color: var(--volt); }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-links a { display: block; padding: 5px 0; color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.footer-head { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-base { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-block: 18px 28px; border-top: 1px solid var(--line); font: 400 14px/1.5 var(--mono); color: var(--muted); }
.footer-base a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; padding-block: 40px 28px; } }

/* ── Layout ────────────────────────────────────────────────────────────── */
.section { margin-top: clamp(44px, 6.5vw, 84px); }
.section--tight { margin-top: 24px; }
.section--first { margin-top: 28px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 4px; }
.toolbar-search { display: flex; gap: 8px; flex: 0 1 420px; min-width: 240px; }
.toolbar-note { margin-top: 14px; }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; margin-bottom: 20px; border-top: 4px solid var(--text); }
.section-title { display: flex; align-items: center; gap: .3em; font: 800 condensed clamp(30px, 3.6vw, 46px)/1 var(--display); letter-spacing: 0; text-transform: uppercase; }
h3.section-title, .section-head--sub .section-title { font-size: clamp(24px, 2.4vw, 32px); }
.section-count { flex: none; font: 700 14px/1 var(--sans); background: var(--accent); color: var(--on-accent); padding: 4px 7px; border-radius: 999px; letter-spacing: 0; }
.section-note { font-size: 14px; color: var(--muted); }
.section-link { margin-left: auto; max-width: 100%; font: 700 14px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text); overflow-wrap: anywhere; padding: 6px 0; border-bottom: 3px solid var(--accent); }
.section-link:hover { color: var(--text); background: var(--accent-wash); }
.card .section-head { border-top: 0; padding: 16px 18px 12px; margin: 0; border-bottom: 1px solid var(--line); }
.card .section-title { font-size: 26px; }
/* Every content block runs the full width: a split stacks its parts, and the smaller blocks of an aside sit side by side below. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(44px, 6.5vw, 84px); align-items: start; }
.split > .stack-lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 32px clamp(24px, 3vw, 44px); align-items: start; }
.split > .stack-lg > * + * { margin-top: 0; }
.split > .stack-lg > .section-link { grid-column: 1 / -1; justify-self: start; margin-left: 0; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1080px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } }
.card { position: relative; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.card-title { font: 800 semi-condensed 22px/1.1 var(--display); letter-spacing: -.01em; }
.card-body { padding: 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.list > * + * { border-top: 1px solid var(--line); }
/* Headerless lists sit on the same paper as data cards. */
.row-list { background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-sm); padding: 4px clamp(12px, 2vw, 20px); }
.row-list > :first-child { border-top: 0; }
.row-list > :last-child { border-bottom: 0; }
/* Only a row that holds a link answers the pointer. */
.row-list > :has(a[href]):hover:not(.tl-now) { background: var(--accent-wash); }
.breadcrumb { margin-bottom: 14px; font: 700 14px/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.breadcrumb li + li::before { content: "/"; color: var(--line-2); }
/* 25px tall, so wrapped links on a phone are at least 24px apart. */
.breadcrumb a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; padding-block: 2px; }
.breadcrumb a:hover { color: var(--text); }
.taglink { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); font-size: 14px; font-weight: 550; color: var(--text-2); }
.taglink:hover, .taglink[aria-current] { color: var(--text); border-color: var(--text); }
.taglink-n { font: 400 12px/1 var(--mono); color: var(--muted); }

/* Page head: kicker, headline, lede, counters. */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; padding-bottom: clamp(20px, 3vw, 32px); }
.page-head-main > * + * { margin-top: 14px; }
.dateline { display: block; font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.page-head h1, .page-title, h1.pname--xl { font: 800 semi-condensed clamp(38px, 5.6vw, 76px)/.98 var(--display); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.counters { display: flex; gap: 0; }
.counters .stat { padding: 0 24px; border-left: 2px solid var(--text); }
.counters .stat:last-child { padding-right: 0; }
@media (max-width: 900px) {
  /* On a phone the page head is short, so the first board or card of the page is on the first screen. */
  .page-head { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-bottom: 16px; } .page-head-main > * + * { margin-top: 10px; }
  .counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 12px 0; }
  .counters .stat { padding: 0 12px; gap: 2px; } .counters .stat:first-child { padding-left: 0; border-left: 0; }
  .counters .stat-value { font-size: 28px; } .counters .stat-label { font-size: 11px; white-space: normal; } .counters .stat-sub { font-size: 13px; line-height: 1.25; }
}

/* ── Components ────────────────────────────────────────────────────────── */
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.stat-value { font: 800 semi-condensed clamp(30px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.stat-sub { font-size: 14px; color: var(--muted); }
.stat--link:hover .stat-value { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.stat--ebony .stat-value, .stat--accent .stat-value { color: var(--accent-text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5px; background: var(--edge); border: 1.5px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.stat-grid > .stat { background: var(--card); padding: 16px 18px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot--live { background: var(--live); box-shadow: 0 0 0 0 var(--live); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 84, 54, .65); } 100% { box-shadow: 0 0 0 9px rgba(255, 84, 54, 0); } }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 5px; border: 1.5px solid var(--line-2); font: 700 12px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.pill--live { background: var(--live-fill); border-color: var(--live-fill); color: #fff; }
.pill--live .dot { background: #fff; animation: pulse-w 1.8s ease-out infinite; }
@keyframes pulse-w { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
.pill--stale { background: transparent; border-style: dashed; border-color: var(--text-2); color: var(--text); }
.dot--stale, .pill--stale .dot { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.pill--today { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill--soon { border-color: var(--accent-text); color: var(--accent-text); }
.pill--ongoing { background: var(--accent-wash); border-color: transparent; color: var(--text); }
.pill--done, .pill--neutral, .pill--upcoming { color: var(--muted); }
.tbadge { display: inline-block; font: 600 12px/1 var(--mono); letter-spacing: .04em; padding: 3px 4px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-2); vertical-align: 1px; }
.tbadge--gm, .tbadge--wgm { background: var(--text); border-color: var(--text); color: var(--bg); }
.tbadge--im, .tbadge--wim { border-color: var(--text-2); color: var(--text); }
/* A federation: its flag beside the three-letter code. Where space is tight (.fed--flag contexts below) the flag stands alone.
   theme.js adds .no-flags where the system font has no flag glyphs; the code then shows alone, as before. */
.fed { display: inline-flex; align-items: center; gap: 5px; flex: none; font: 600 12px/1 var(--mono); letter-spacing: .08em; color: var(--muted); padding: 2px 5px 2px 4px; border: 1px solid var(--line); border-radius: 4px; vertical-align: 1px; white-space: nowrap; }
.fed-flag { font: 400 14px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif; letter-spacing: 0; }
.no-flags .fed-flag { display: none; }
abbr.fed[title] { cursor: default; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; flex: none; vertical-align: -1px; }
.swatch--white { background: #F5F3EC; box-shadow: inset 0 0 0 1px #8D8A82; }
.swatch--black { background: #0B0B0C; box-shadow: inset 0 0 0 1px #6A6860; }
.score { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; font: 800 15px/1.1 var(--sans); flex: none; }
.score--win { background: var(--accent); color: var(--on-accent); }
.score--draw { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.score--loss { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.score--none { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-weight: 400; }
.score--lg { width: 44px; height: 44px; border-radius: 6px; font: 800 26px/1 var(--display); }
.form-strip { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.form-label { font: 700 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.form-empty { font-size: 14px; color: var(--muted); }
.delta { font: 600 14px/1 var(--mono); }
.delta--up { color: var(--up); } .delta--down { color: var(--down); } .delta--none, .delta--flat { color: var(--muted); }
.clock { display: inline-grid; place-items: center; min-width: 82px; height: 38px; padding: 0 10px; border-radius: 6px; background: var(--surface-2); border: 1.5px solid var(--line-2); font: 600 16px/1 var(--mono); color: var(--text-2); }
.clock.is-turn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.clock--sm { min-width: 56px; height: 24px; padding: 0 6px; border-radius: 4px; font-size: 14px; }
/* A delayed board's clock is its last reading, not the time now: hatched, dashed and never the side-to-move colour. */
.clock--held, .clock--held.is-turn { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--muted) 22%, transparent) 5px 7px); border-style: dashed; border-color: var(--muted); color: var(--text-2); }
.round-bar { width: 96px; height: 6px; flex: none; }
.rb { fill: var(--line-2); } .rb--completed { fill: var(--text-2); } .rb--live { fill: var(--live); } .rb--stale { fill: var(--muted); }
.plink { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%; }
a.plink { padding-block: 2px; margin-block: -2px; }
.plink-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
a.plink:hover .plink-name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pname { display: block; font-family: var(--sans); font-style: normal; font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
.pname-given { display: block; }
.pname-surname { display: block; }
.pname--lg { font-size: clamp(30px, 3.5vw, 44px); }
.pname--md { font-size: clamp(24px, 2.3vw, 30px); line-height: 1.1; }
.pname--sm { font-size: 21px; line-height: 1; }
.pname--md .pname-given, .pname--sm .pname-given { display: inline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 2px solid var(--on-accent); border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-weight: 750; font-size: 16px; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); }
.btn--ghost { background: transparent; border-color: var(--text); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--icon { width: 46px; padding: 0; }
.btn--icon svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.btn:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field-label { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input, .select { width: 100%; height: 46px; padding: 0 16px; border: 1.5px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 15px; }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus { outline: 2px solid var(--ring); outline-offset: 1px; }
.select { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 15px) center; background-size: 5px 5px; background-repeat: no-repeat; }
@media (forced-colors: active) { .select { appearance: auto; background-image: none; } }
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-bar .btn { min-height: 46px; }
.tabs { display: block; }
.tabs-track { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs-track::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 650; white-space: nowrap; }
.tab:hover { border-color: var(--text); color: var(--text); }
.tab[aria-current], .tab.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.tab-count, .ga-tab-count { font: 600 12px/1 var(--mono); opacity: .7; }
.tabs--sticky { position: sticky; top: var(--hdr-h); z-index: 20; margin: 24px calc(-1 * var(--gutter)) 0; padding: 8px var(--gutter); background: var(--bg); border-bottom: 2px solid var(--text); }
body.has-tabs { --sticky-top: calc(var(--hdr-h) + 62px); }
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 20px; font-size: 14px; }
.pager-list { display: flex; gap: 4px; }
.pager-num, .pager-step { display: inline-grid; place-items: center; grid-auto-flow: column; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-weight: 600; }
a.pager-num:hover, a.pager-step:hover { border-color: var(--text-2); color: var(--text); }
.pager-num[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 650; }
.pager-step[aria-disabled] { opacity: .4; }
.pager-gap { align-self: center; padding: 0 4px; color: var(--muted); }
.pager-count { margin-left: auto; font: 400 14px/1 var(--mono); color: var(--muted); }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1.5px solid var(--line-2); border-left: 6px solid var(--accent); border-radius: var(--r-sm); background: var(--surface); font-size: 15px; color: var(--text-2); }
.notice strong { color: var(--text); }
.notice > .dot + span { flex: 1; min-width: 0; }
.notice a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.notice .btn { margin-left: auto; }
.notice--stale { border-style: dashed; border-left-style: solid; border-left-color: var(--text-2); margin-bottom: 24px; color: var(--text); font-weight: 550; }
.notice--coverage { margin-bottom: 24px; }
.notice--live { border-left-color: var(--live); }
.empty { display: grid; justify-items: start; gap: 6px; padding: clamp(24px, 4vw, 40px); border: 2px dashed var(--line-2); border-radius: var(--r); }
.empty-mark { width: 30px; height: 30px; margin-bottom: 8px; border-radius: 5px; }
.em-l { fill: var(--surface-2); } .em-d { fill: var(--line-2); }
.empty-title { font: 800 semi-condensed 26px/1.1 var(--display); letter-spacing: -.01em; }
.empty-body { max-width: 56ch; color: var(--muted); font-size: 14px; }
.empty .section-link { margin: 10px 0 0; }
.source-note { margin-top: 28px; font: 400 14px/1.6 var(--mono); color: var(--muted); }
.source-note a { text-decoration: underline; text-underline-offset: 3px; color: var(--text-2); }
.source-note-text { display: block; margin-top: 2px; }
.row-go, .go { display: inline-grid; place-items: center; grid-auto-flow: column; gap: 6px; min-width: 30px; height: 30px; border-radius: var(--r-sm); color: var(--text-2); font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.row-go:hover, .go:hover { background: var(--accent); color: var(--on-accent); }
.go { padding: 0 10px; white-space: nowrap; flex: none; }

/* ── Chess board (markup contract shared with renderBoard() in site.js) ── */
.board-with-eval { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
.eval-bar { position: relative; min-height: 0; padding-bottom: 24px; }
.eval-meter { display: block; width: 12px; height: 100%; min-height: 80px; margin-inline: auto; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.eval-black { fill: var(--on-accent); }
.eval-white { fill: #F3F0E7; }
.eval-midpoint { stroke: var(--muted); stroke-width: .35; }
.eval-value { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 14px/1.4 var(--mono); color: var(--text); }
.eval-bar.is-unavailable .eval-meter { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--line) 4px 8px); }
.eval-bar.is-unavailable .eval-meter > * { visibility: hidden; }
.eval-bar.is-unavailable .eval-value { color: var(--muted); }
/* A small board's bar: a slim strip beside the board, its figure left to the label (home cards; the live grid has its own). */
.eval-slim { grid-template-columns: 8px minmax(0, 1fr); gap: 5px; }
.eval-slim .eval-bar { padding-bottom: 0; } .eval-slim .eval-meter { width: 100%; min-height: 0; border-radius: 3px; border-color: var(--text-2); } .eval-slim .eval-value { display: none; }
.board { width: 100%; max-width: var(--board-max, 640px); }
.game-mode { display: inline-flex; align-items: center; gap: 4px; width: max-content; flex: none; vertical-align: middle; padding: 2px 5px; border: 1px solid var(--field-line); border-radius: 4px; background: var(--surface); color: var(--text); font: 600 12px/1.2 var(--sans); letter-spacing: normal; text-transform: none; white-space: nowrap; }
.board--lg { --board-max: 680px; } .board--md { --board-max: 460px; } .board--sm { --board-max: 280px; } .board--xs { --board-max: 132px; }
.chessboard { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; container-type: inline-size; border-radius: 6px; overflow: hidden; background: var(--sq-dark); box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.board--xs .chessboard, .board--sm .chessboard { border-radius: 4px; box-shadow: 0 0 0 2px var(--ink); }
.square { position: relative; aspect-ratio: 1; }
.square.light { background: var(--sq-light); } .square.dark { background: var(--sq-dark); }
/* The last move is marked by shape as well as colour: both squares turn volt and carry an ink frame, so the mark
   reads on every tournament palette (gold and walnut boards included) and at thumbnail size. */
.square.light.is-last { background: var(--sq-last-light); } .square.dark.is-last { background: var(--sq-last-dark); }
.square.is-last::before { content: ""; position: absolute; inset: 0; border: max(2px, .7cqw) solid var(--ink); pointer-events: none; }
.piece { position: absolute; inset: 3%; background: center / contain no-repeat; }
.wK { background-image: url(pieces/wK.svg); } .wQ { background-image: url(pieces/wQ.svg); } .wR { background-image: url(pieces/wR.svg); } .wB { background-image: url(pieces/wB.svg); } .wN { background-image: url(pieces/wN.svg); } .wP { background-image: url(pieces/wP.svg); }
.bK { background-image: url(pieces/bK.svg); } .bQ { background-image: url(pieces/bQ.svg); } .bR { background-image: url(pieces/bR.svg); } .bB { background-image: url(pieces/bB.svg); } .bN { background-image: url(pieces/bN.svg); } .bP { background-image: url(pieces/bP.svg); }
.rank-label, .file-label { position: absolute; font: 600 12px/1 var(--mono); color: var(--sq-coord); pointer-events: none; }
.rank-label { top: 3px; left: 4px; } .file-label { bottom: 3px; right: 4px; }
.square.is-last .rank-label { top: 5px; left: 6px; } .square.is-last .file-label { bottom: 5px; right: 6px; }
.board--nocoords .rank-label, .board--nocoords .file-label, .board--xs .rank-label, .board--xs .file-label { display: none; }
.board--sm .rank-label, .board--sm .file-label { font-size: 10px; }
.board-empty { grid-column: 1 / -1; display: grid; place-items: center; aspect-ratio: 1; color: #2A2C27; font-size: 14px; }

/* Captured pieces: a bone tray beside the player who took them, so black and white pieces both show in either theme
   and on every stage. One group per piece type (queen first), a group's pieces overlapping. The tray is an image
   named in words ("Captured by White: queen, 2 pawns"). Same markup from the `captured` macro and site.js. */
.cap { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 22px; padding: 2px 5px; border-radius: 4px; background: var(--cap-tray); box-shadow: inset 0 0 0 1.5px rgba(11, 11, 15, .3); vertical-align: middle; flex: none; max-width: 100%; }
.cap-g { display: inline-flex; flex: none; }
.cap-p { width: 17px; height: 17px; flex: none; background-position: center; background-size: contain; background-repeat: no-repeat; }
.cap-g .cap-p + .cap-p { margin-left: -9px; }
.cap--lg { min-height: 30px; padding: 3px 7px; gap: 5px; } .cap--lg .cap-p { width: 24px; height: 24px; } .cap--lg .cap-g .cap-p + .cap-p { margin-left: -13px; }
.cap--none { display: none; }
/* No strip can be drawn when the move record does not reproduce the position shown: the card says so once. */
.cap-na { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1.5px dashed var(--muted); border-radius: 4px; font: 600 12px/1.2 var(--sans); color: var(--muted); white-space: nowrap; }

/* On the game page the strip sits between the player and the clock; on a phone it drops to a line of its own under
   the name, so the name keeps its room. */
.gm-bar .cap { flex: none; }
.gm-cap-note { order: 3; width: 100%; max-width: calc(var(--gm-board) + 52px); margin: 2px auto 0; }
@media (max-width: 640px) {
  .gm-bar { flex-wrap: wrap; row-gap: 3px; }
  .gm-bar:has(.cap:not(.cap--none))::after { content: ""; flex-basis: 100%; height: 0; order: 8; }
  .gm-bar .cap { order: 9; margin-left: 21px; }
}

/* ── Data cards (replace tables) ───────────────────────────────────────── */
/* One card per record. .dcards is the wrapper, .dcards-list its <ol>/<ul>, .dcard a record. Inside a card:
   .dcard-rank (a number), .dcard-main (the name line), then .dc-facts, a <dl> whose .dc-f groups pair a label (dt)
   with a value (dd). On a phone a card stacks: name first, facts in a small grid with their labels shown.
   .dcards--rows lines the cards up from 900px: the wrapper names the column tracks (--dc-cols, set per list in
   CSS), cards and the legend take them by subgrid, the dt labels move to the one .dcards-legend row (aria-hidden:
   every value still carries its own label for assistive technology) and dense data scans down the columns.
   .dcards--grid lays cards out as tiles instead. */
.dcards { display: grid; gap: 8px; }
.dcards-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dcards-legend { display: none; }
.dcard { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-sm); min-width: 0; }
.dcard:has(a.stretched):hover, a.dcard:hover { border-color: var(--text); box-shadow: 3px 3px 0 var(--text); }
.dcard:has(.stretched:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.dcard.game-link-surface:hover { border-color: var(--text); box-shadow: 3px 3px 0 var(--text); }
.dcard--top { border-color: var(--text); border-left-width: 6px; }
.dcard--live { border-color: var(--live); }
.dcard--stale { border-style: dashed; }
.dcard--focus { border-color: var(--text); background: var(--surface-2); }
.dcard-rank { font: 800 semi-condensed 26px/1 var(--display); min-width: 1.6em; color: var(--text); }
.dcard-rank small { font: 700 12px/1 var(--sans); color: var(--muted); margin-left: 1px; }
.dcard-main { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font-weight: 600; }
.dcard-main .plink { min-width: 0; }
.dcard-key { font: 800 semi-condensed 26px/1 var(--display); text-align: right; white-space: nowrap; }
.dcard-key small { display: block; margin-top: 3px; font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dcard-sub { grid-column: 1 / -1; font-size: 14px; color: var(--muted); min-width: 0; }
.dc-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px 14px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.dc-f { min-width: 0; }
.dc-f dt { font: 700 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dc-f dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dc-f--wide { grid-column: 1 / -1; }
.dc-f--num dd { font-family: var(--mono); font-weight: 600; }
.dc-go { justify-self: end; }
.dcards-note { font-size: 14px; color: var(--muted); max-width: 90ch; }
.dcards--rows > .dcards-list { grid-auto-rows: 1fr; gap: 0; overflow: hidden; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-sm); }
.dcards--rows > .dcards-list > .dcard { align-content: start; border: 0; border-radius: 0; background: transparent; }
.dcards--rows > .dcards-list > .dcard:nth-child(even) { background: var(--card-2); }
.dcards--rows > .dcards-list > .dcard:has(a.stretched):hover, .dcards--rows > .dcards-list > .dcard.game-link-surface:hover { background: var(--accent-wash); box-shadow: inset 4px 0 0 var(--text); }
.dcards--rows > .dcards-list > .dcard:has(.stretched:focus-visible) { outline-offset: -3px; }
.dcards--rows > .dcards-list > .dcard--top { background: var(--accent-wash); box-shadow: inset 6px 0 0 var(--text); }
.dcards--rows > .dcards-list > .dcard--live { box-shadow: inset 4px 0 0 var(--live); }
.dcards--rows > .dcards-list > .dcard--stale { border-left: 4px dashed var(--muted); }
.dcards--rows > .dcards-list > .dcard--focus { background: var(--accent-wash); box-shadow: inset 4px 0 0 var(--text); }
.dcards--grid > .dcards-list, .dcards-list.dcards--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (max-width: 899px) {
  /* A card is taller than the table row it replaced, and a phone list has a hundred of them: keep each one tight. */
  .dcards, .dcards-list { gap: 6px; }
  .dcard { padding: 9px 12px; gap: 5px 10px; }
  .dc-facts { padding-top: 6px; gap: 5px 12px; }
  .dc-f dd { margin-top: 0; }
  .gcard { gap: 3px 10px; } .gcard-meta { padding-top: 4px; }
}
@media (min-width: 900px) {
  .dcards--rows { grid-template-columns: var(--dc-cols, minmax(0, 1fr)); column-gap: 16px; gap: 0 16px; }
  .dcards--rows > .dcards-list { grid-column: 1 / -1; grid-template-columns: subgrid; gap: 0 16px; border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }
  .dcards--rows > .dcards-legend, .dcards--rows > .dcards-list > .dcard { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
  .dcards--rows > .dcards-legend { padding: 11px 15.5px 10px; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--band); font: 700 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--on-band); }
  .dcards--rows > .dcards-legend a { color: inherit; }
  .dcards--rows > .dcards-legend > .num, .dcards--rows .dc-f--num, .dcards--rows .dcard-key { text-align: right; }
  .dcards--rows > .dcards-list > .dcard { padding-block: 7px; }
  .dcards--rows .dc-facts { display: contents; }
  .dcards--rows .dc-f dt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .dcards--rows .dc-f dd { margin: 0; }
  .dcards--rows .dc-f--wide { grid-column: auto; }
  .dcards--rows .dcard-sub { grid-column: auto; }
  .dcards--rows .dcard-rank, .dcards--rows .dcard-key { font-size: 22px; }
}
/* Game cards (the game_table macro). Phone: both players with the result beside them, then round, event and code. */
.gcard { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "w we res go" "b be res go" "meta meta meta meta"; gap: 6px 10px; }
.gcard-w { grid-area: w; } .gcard-we { grid-area: we; } .gcard-b { grid-area: b; } .gcard-be { grid-area: be; } .gcard-res { grid-area: res; } .gcard-meta { grid-area: meta; }
.gcard > .row-go, .gcard-nogo { grid-area: go; }
.gcard-p { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.gcard-elo { font-size: 14px; color: var(--muted); text-align: right; }
.gcard-res .result { display: inline-flex; }
.gcard-res .result > span[aria-hidden] { display: inline-flex; flex-direction: column; gap: 6px; }
.gcard-none { color: var(--muted); }
.gcard-meta { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding-top: 6px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.gcard-rd:empty, .gcard-eco:empty { display: none; }
.gcard-ev { flex: 1; min-width: 0; }
.gcard-ev a { display: inline-block; padding-block: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.gcard-ev a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.dcards--games:not(:has(.row-go)) .gcard-nogo { display: none; }
@media (min-width: 900px) {
  .dcards--games { --dc-cols: 64px minmax(0, 1.2fr) 48px 64px minmax(0, 1.2fr) 48px minmax(0, 1fr) 44px 32px; }
  .dcards--games .gcard { grid-template-areas: none; }
  .dcards--games .gcard > *, .dcards--games .gcard-meta > * { grid-area: auto; }
  .gcard-meta { display: contents; }
  .gcard-rd { order: -1; }
  .gcard-rd:empty, .gcard-eco:empty { display: block; }
  .gcard-res .result > span[aria-hidden] { flex-direction: row; gap: 3px; }
  .gcard-ev, .gcard-rd, .gcard-eco { font-size: 14px; color: var(--muted); }
}
/* A list that opens short: .ev-cap--N on the wrapper shows the first N cards until its <details> opens (events.css). */

/* ── Game objects ──────────────────────────────────────────────────────── */
.mini-game { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; padding: 14px; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r); transition: border-color .15s ease, transform .15s ease; }
/* A game, player or tournament without a page is printed as text in the place of its link (a <span> with the link's
   class), and a card or row that only opened a game loses its arrow and the game-link-surface class. Only what can be
   opened reacts to the pointer. */
.mini-game.game-link-surface:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mini-game--noboard { grid-template-columns: minmax(0, 1fr); }
.mini-game-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mini-game-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 2px; }
.mini-game-top .meta { font: 400 14px/1 var(--mono); }
.side { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; }
.side .plink { flex: 1; }
.side-elo, .elo { font: 400 14px/1 var(--mono); color: var(--muted); flex: none; }
.mini-game--stale { border-style: dashed; }
/* The foot is as tall with the event name alone as with the "Game" link (30px) beside it, so the feet of a row of cards line up. */
.mini-game-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 39px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.mini-game-foot a.truncate:hover { color: var(--text); }
.game-list { container-type: inline-size; overflow: hidden; }
.game-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr) minmax(0, .85fr) auto; align-items: center; gap: 0 8px; padding: 11px 14px; font-size: 14px; }
.game-row + .game-row { border-top: 1px solid var(--line); }
.game-row.game-link-surface:hover { background: var(--surface-2); }
/* Each row is its own grid. In a list where some rows open their game and others cannot, a row without the arrow keeps
   an unseen one, so names and scores line up down the list. A list with no arrow at all keeps no room for one. */
.game-list:has(.gr-go) .game-row:not(.game-link-surface)::after { content: "→"; visibility: hidden; }
.gr-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gr-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-left: 14px; font-size: 14px; color: var(--muted); }
.gr-meta a, .gr-meta .truncate { align-self: start; max-width: 100%; }
.gr-meta a:hover { color: var(--text); }
.gr-meta span:not(.truncate) { font: 400 14px/1.2 var(--mono); }
@container (max-width: 640px) {
  .game-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "w ws go" "b bs go" "m m m"; gap: 6px 8px; }
  .gr-white { grid-area: w; }
  .gr-black { grid-area: b; } .gr-ws { grid-area: ws; } .gr-bs { grid-area: bs; } .gr-go, .game-row::after { grid-area: go; }
  .gr-meta { grid-area: m; padding-left: 0; flex-direction: row; gap: 8px; }
}
.event-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.event-row:hover { background: var(--surface-2); }
.event-row:not(:has(.stretched)):hover { background: none; }
.event-row-main { min-width: 0; }
.event-row-name { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }
.event-row-rounds { display: inline-flex; align-items: center; gap: 8px; }
.event-row-rounds .meta { font: 400 14px/1 var(--mono); }
.event-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.event-card:hover { border-color: var(--line-2); }
.event-card:not(:has(.stretched)):hover { border-color: var(--line); }
.event-card-top, .event-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event-card-name { font: 800 semi-condensed 24px/1.1 var(--display); letter-spacing: -.01em; }
.event-card-foot { margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--muted); }

/* ── Search palette ────────────────────────────────────────────────────── */
.palette { width: min(660px, calc(100% - 24px)); max-height: min(680px, 87dvh); margin: 6dvh auto auto; padding: 0; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--text); box-shadow: 0 32px 100px -16px rgba(0, 0, 0, .7); overflow: hidden; }
.palette::backdrop { background: rgba(5, 5, 6, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.palette[open] { display: flex; flex-direction: column; }
.palette-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px clamp(14px, 4vw, 24px) 10px; background: var(--ink); color: var(--bone); }
.palette-head h2 { font: 800 condensed clamp(32px, 5vw, 44px)/1 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.palette-head h2::after { content: ""; display: inline-block; margin-left: 6px; width: .18em; height: .18em; background: var(--volt); }
.palette svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.palette-close { border-color: var(--bone); color: var(--bone); background: var(--ink); }
.palette-close:hover, .palette-close:focus-visible { border-color: var(--volt); background: var(--volt); color: var(--ink); outline-color: var(--volt); }
.palette-form { display: flex; gap: 4px; padding: 4px clamp(14px, 4vw, 24px) 20px; background: var(--ink); }
.palette-input { flex: 1; min-width: 0; height: 50px; padding-inline: 12px; border: 2px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); font-size: clamp(16px, 3vw, 19px); }
.palette-input:focus-visible, .palette-submit:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
.palette-submit { display: grid; place-items: center; width: 52px; border: 0; border-radius: var(--r-sm); background: var(--volt); color: var(--ink); }
.palette-submit:hover { background: var(--bone); }
.palette-input::placeholder { color: var(--muted); }
.palette-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(12px, 3vw, 22px) 12px; }
.palette-group { display: flex; align-items: center; gap: 12px; padding-block: 20px 10px; font: 700 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.palette-group::after { content: ""; flex: 1; border-top: 1px solid var(--line-2); }
.palette-item { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.palette-item::after { content: ""; flex: none; width: 8px; height: 8px; margin-inline: 6px 2px; border-block-start: 2px solid; border-inline-end: 2px solid; transform: rotate(45deg); }
.palette-item:is(:hover, [aria-selected="true"]) { background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); }
.palette-item:is(:hover, [aria-selected="true"]) :is(.palette-sub, .tbadge) { color: inherit; border-color: currentColor; background: transparent; }
.palette-main { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 750 semi-condensed 20px/1.15 var(--display); }
.palette-sub { max-width: 38%; font: 400 13px/1.3 var(--mono); text-align: right; color: var(--muted); overflow-wrap: anywhere; }
.palette-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.palette-foot { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 10px clamp(14px, 4vw, 24px); border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
@media (pointer: coarse), (max-height: 440px) { .palette-foot { display: none; } }

/* ── Home ──────────────────────────────────────────────────────────────── */
.hl { background: var(--accent); color: var(--on-accent); padding: 0 .28em; border-radius: 3px; font-weight: 700; white-space: nowrap; }
/* A tournament's colour beside its name: a chip for a round, a dot for a list row. Inside an .evp-N element. */
.ev-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 5px; background: var(--ev); color: #0B0B0F; font: 700 12px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.ev-dot { display: inline-block; width: 11px; height: 11px; flex: none; background: var(--ev); border: 1.5px solid var(--text); border-radius: 2px; transform: rotate(45deg); margin: 0 4px 0 2px; vertical-align: -1px; }

/* The home page's h1: one compact line above the lead, so the board stays the first thing seen. */
.home-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: clamp(10px, 1.6vw, 18px); }
.home-intro-title { font: 800 semi-condensed clamp(20px, 2.1vw, 26px)/1.1 var(--display); letter-spacing: -.02em; }
.home-intro-sub { font-size: 15px; line-height: 1.35; color: var(--text-2); }

/* The lead: a stage in the tournament's deep colour. What it says follows the state of play. */
.home-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, min(53%, 800px)); gap: clamp(24px, 3vw, 48px); align-items: start; padding: clamp(18px, 3vw, 40px); }
.home-lead--noboard { grid-template-columns: minmax(0, 1fr); }
.home-lead--delayed { border-style: dashed; border-color: var(--text-2); }
.hl-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.live-feature { display: grid; gap: 10px; margin-bottom: 18px; padding: clamp(16px, 2vw, 28px); }
.live-feature .section-title { overflow-wrap: anywhere; }
.featured-next { padding-block: 12px; order: 8; font-size: 15px; }
.featured-next a { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 981px) {
  .home-lead--pairing .hl-info { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: clamp(24px, 4vw, 72px); }
  .home-lead--pairing .hl-info > * { grid-column: 1; }
  .home-lead--pairing .hl-info > .hl-context { grid-column: 2; grid-row: 1 / span 5; align-self: start; }
  .live-feature { grid-template-columns: minmax(0, 1fr) auto; }
  .live-feature > * { grid-column: 1; }
  .live-feature .hl-actions { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
.hl-kickers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.hl-date { font: 700 13px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); }
.hl-title { font: 800 condensed clamp(40px, 6vw, 88px)/.92 var(--display); letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.hl-title--long { font-size: clamp(34px, 4.6vw, 64px); } .hl-title--xlong { font-size: clamp(30px, 3.6vw, 50px); line-height: .96; }
.hl-title a:hover { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; text-decoration-color: var(--volt); }
.hl-sub { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; color: var(--text-2); max-width: 60ch; text-wrap: pretty; }
.hl-sub strong { color: var(--text); font-weight: 700; }
.hl-held { font-weight: 700; color: var(--text); border-bottom: 2px dashed var(--text-2); }
.hl-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.hl-facts li { padding: 5px 10px; border: 1.5px solid var(--line-2); border-radius: 5px; font-size: 14px; font-weight: 550; color: var(--text-2); }
.hl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hl-scorecard { display: grid; gap: 8px; min-width: 0; padding: 14px 16px; border-inline-start: 3px solid var(--ev, var(--volt)); border-radius: var(--r-sm); background: rgba(0, 0, 0, .3); }
.hl-scoreline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font: 750 semi-condensed clamp(20px, 2vw, 30px)/1.15 var(--display); overflow-wrap: anywhere; }
.hl-scoreline strong { color: var(--volt); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl-score-note, .hl-standings-note { color: var(--text-2); font-size: 14px; line-height: 1.4; }
.hl-score-games, .hl-leaders { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.hl-score-games a { display: grid; gap: 3px; min-width: 52px; min-height: 40px; padding: 5px 8px; border: 1px solid var(--field-line); border-radius: 4px; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.hl-score-games a:hover, .hl-score-games a:focus-visible { background: var(--volt); color: var(--ink); }
.hl-score-games a span, .hl-place { font: 600 12px/1 var(--mono); }
.hl-leaders { gap: 6px 14px; }
.hl-leaders li { overflow-wrap: anywhere; }
.hl-leaders strong { color: var(--volt); }
.hl-standings-note a { text-decoration: underline; }
.hl-standings-note summary { cursor: pointer; min-height: 24px; }
@media (max-width: 980px) {
  .hl-scorecard { order: 4; gap: 3px; padding: 6px 10px; }
  .hl-scorecard .hl-score-games, .hl-scorecard .hl-score-note { display: none; }
  .hl-scorecard--match h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hl-scoreline { font-size: 19px; gap: 3px 8px; }
}
.hl-context { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 2px solid var(--line-2); }
.hl-context .section-link { margin: 4px 0 0; align-self: start; }
.hl-list li { display: flex; align-items: center; gap: 8px; min-height: 36px; border-bottom: 1px solid var(--line); font-size: 15px; }
.hl-list li:last-child { border-bottom: 0; }
.hl-list-name { font-weight: 650; min-width: 0; padding-block: 5px; }
a.hl-list-name:hover { text-decoration: underline; text-decoration-color: var(--volt); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hl-list-meta { margin-left: auto; flex: none; font: 500 14px/1 var(--mono); color: var(--text-2); }
.hl-res { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding-block: 6px; font-weight: 600; }
.hl-res b { font: 600 14px/1 var(--mono); padding: 4px 7px; border-radius: 4px; background: var(--surface-2); }
.hl-res > :last-child { text-align: right; }
a.hl-res:hover b { background: var(--volt); color: var(--ink); }
.hl-board { display: grid; grid-template-columns: 46px minmax(0, 1fr) 8px; min-width: 0; background: rgba(0, 0, 0, .34); border: 2px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; }
.hl-board-label { padding: 10px 14px 0; }
.hl-bar { grid-column: 2; display: flex; align-items: center; gap: 10px; min-height: 60px; padding-block: 8px; }
.hl-who { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hl-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; min-width: 0; font: 800 semi-condensed clamp(19px, 2vw, 25px)/1.05 var(--display); }
.hl-player { min-width: 0; overflow-wrap: anywhere; }
.hl-player .tbadge { margin-right: 6px; }
.hl-name a:hover { text-decoration: underline; text-decoration-color: var(--volt); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; min-height: 22px; font: 500 13px/1 var(--mono); color: var(--text-2); }
.hl-meta .cap { margin-left: 4px; }
.hl-bar .clock { height: 42px; min-width: 96px; font-size: 19px; }
.clock--none { color: var(--muted); border-style: dashed; }
.hl-eval { grid-column: 1 / 3; grid-template-columns: subgrid; gap: 0; }
.hl-eval .eval-bar { padding: 10px 0 32px; } .hl-eval .eval-value { bottom: 8px; } .hl-eval .eval-meter { border-color: rgba(243, 240, 231, .6); }
.hl-boardlink { display: block; }
.hl-boardlink .board { --board-max: none; }
.hl-boardlink .chessboard { border-radius: 0; box-shadow: none; }
.hl-boardlink:focus-visible { outline-offset: -4px; }
.hl-moves { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 44px; padding: 8px 12px; border-top: 2px solid var(--ink); background: rgba(0, 0, 0, .3); font-size: 14px; color: var(--text-2); }
.hl-moves strong { color: var(--volt); }
/* A quiet day: what comes next takes the room, the latest result is a compact card. */
.home-lead--quiet, .home-lead--empty { grid-template-columns: minmax(0, 1fr) minmax(0, min(38%, 480px)); }
.home-lead--quiet.home-lead--noboard, .home-lead--empty.home-lead--noboard { grid-template-columns: minmax(0, 1fr); }
.hl-recent { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: rgba(0, 0, 0, .34); border: 2px solid var(--ink); border-radius: var(--r-sm); min-width: 0; }
.hl-recent-board .board { --board-max: none; }
.hl-recent.game-link-surface:hover { border-color: var(--volt); }
@media (max-width: 980px) {
  /* One column, the board straight under the headline and the buttons straight under the board. */
  .home-lead { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hl-info { display: contents; }
  .home-lead, .home-lead--quiet, .home-lead--empty { grid-template-columns: minmax(0, 1fr); }
  .hl-kickers { order: 1; } .hl-title { order: 2; } .hl-board { order: 3; width: 100%; max-width: 520px; } .hl-actions { order: 4; } .hl-sub { order: 5; } .hl-facts { order: 6; } .hl-context { order: 7; }
  /* On a quiet day the order is the reverse: when the next round starts comes before the latest result. */
  .home-lead--quiet .hl-sub, .home-lead--empty .hl-sub { order: 3; } .hl-recent { order: 8; width: 100%; max-width: 360px; }
  .hl-date { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .notice--stale { gap: 8px; padding: 7px 10px; margin-bottom: 12px; font-size: 14px; line-height: 1.35; }
  .hl-sub { order: 3; }
  .hl-board { order: 5; }
  /* A phone keeps the board wide: the bar is a slim strip and its figure moves to the end of the moves line below. */
  .hl-board { position: relative; grid-template-columns: 22px minmax(0, 1fr) 6px; }
  .hl-eval .eval-bar { position: static; margin-inline: 6px; padding: 6px 0; } .hl-eval .eval-meter { width: 100%; min-height: 0; }
  .hl-eval .eval-value { left: auto; right: 12px; bottom: 12px; transform: none; } .hl-moves { padding-right: 76px; }
  .hl-actions .btn { flex: 1; padding-inline: 12px; } .hl-bar { min-height: 52px; padding-block: 6px; } .hl-bar .clock { min-width: 78px; height: 36px; font-size: 16px; } }

/* Worth watching: bold cards, each with the reason and the clock or score behind it. */
/* Top stories (home.html top_stories): a yellow stage, the lead story on a board beside its headline, the rest as cards. */
.top-stories { padding: clamp(16px, 2.4vw, 32px); }
/* Its own colour, a sunflower yellow no event palette uses, on the bone stage's light tokens; ink is the accent. */
.top-stories {
  --bg: #FFD23F; --bg-2: #F0C63C; --surface: #FFE079; --surface-2: #FFE695; --card: #FFE48C; --card-2: #FFDB65; --line: #D3AE36; --line-2: #A2862C;
  --text-2: #372F15; --muted: #5E4F1D; --accent: #0B0B0C; --on-accent: #FFD23F; --accent-wash: rgba(11, 11, 12, .1);
  background: #FFD23F; border-color: #0B0B0C;
}
.top-stories { margin-top: clamp(16px, 2vw, 28px); }
.ts-kicker { display: inline-block; margin-bottom: clamp(12px, 1.6vw, 20px); padding: 6px 10px; border-radius: 5px; background: var(--text); color: var(--bg); font: 700 13px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.ts-lead { display: grid; grid-template-columns: minmax(0, min(38%, 460px)) minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); align-items: center; }
.ts-boardlink { display: block; border: 2px solid var(--text); border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--hard); }
.ts-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ts-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--text-2); }
.ts-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1.5px solid var(--text); border-radius: 5px; font: 700 12px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--text); }
.ts-move { font-weight: 600; color: var(--text); }
.ts-headline { font: 800 condensed clamp(34px, 5vw, 72px)/.94 var(--display); letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.ts-headline--long { font-size: clamp(30px, 3.9vw, 56px); }
.ts-why { max-width: 62ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.45; color: var(--text-2); }
.ts-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ts-foot { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--muted); }
.ts-foot a, .gm-story a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ts-unplayed { position: relative; }
.ts-unplayed .board { opacity: .4; filter: grayscale(1); }
.ts-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg); padding: .12em .4em; border-radius: 4px; background: var(--text); color: var(--bg); font: 800 condensed clamp(24px, 3.4vw, 46px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.ts-card .ts-stamp { font-size: 18px; }
.ts-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: clamp(18px, 2.4vw, 32px); padding-top: clamp(18px, 2.4vw, 32px); border-top: 2px solid var(--text); }
.ts-card { display: grid; max-width: 760px; grid-template-columns: minmax(116px, 34%) minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-sm); transition: transform .12s ease, box-shadow .12s ease; }
.ts-card:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); }
.ts-card-body { display: flex; flex-direction: column; gap: 8px; }
.ts-card-title { font: 800 semi-condensed clamp(21px, 2vw, 28px)/1.05 var(--display); overflow-wrap: anywhere; }
.ts-card-why { font-size: 15px; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.ts-card-foot .go { padding: 0; font-weight: 700; }
.ts-card.ts-card--news { grid-template-columns: minmax(48px, 25%) minmax(0, 1fr); }
.ts-delay { margin-top: 12px; }
@media (max-width: 760px) {
  .ts-lead { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ts-board { width: 100%; max-width: 460px; }
  .ts-actions .btn { white-space: normal; text-align: center; padding-block: 10px; }
}
@media (max-width: 420px) { .ts-card { grid-template-columns: 104px minmax(0, 1fr); gap: 10px; } }
.ww-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.ww { display: grid; grid-template-columns: minmax(132px, 42%) minmax(0, 1fr); align-content: start; gap: 12px 14px; padding: 14px; background: var(--card); border: 2px solid var(--edge); border-left: 10px solid var(--ev); border-radius: var(--r-sm); min-width: 0; }
.ww.game-link-surface:hover { box-shadow: var(--hard); transform: translate(-2px, -2px); }
.ww { transition: transform .12s ease, box-shadow .12s ease; }
.ww-board { align-self: start; }
.ww-body { display: contents; }
.ww-head { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ww-sides { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.ww-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ww-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 5px; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ww-tag::before { content: ""; flex: none; }
/* Each reason has its own mark as well as its own colour: a clock face for a scramble, an up arrow for a won position. */
.ww-tag--clock { background: var(--live-fill); color: #fff; }
.ww-tag--clock::before { width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(currentColor, currentColor) 50% 15% / 2px 45% no-repeat; }
.ww-tag--winning { background: var(--accent); color: var(--on-accent); }
.ww-tag--winning::before { border: 5px solid transparent; border-bottom: 8px solid currentColor; border-top: 0; }
.ww-title { font: 800 semi-condensed clamp(21px, 2vw, 26px)/1.05 var(--display); overflow-wrap: anywhere; }
.ww-v { font: 600 .6em/1 var(--sans); color: var(--muted); }
.ww-why { display: grid; gap: 4px; }
.ww-why li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--text-2); }
.ww-figure { flex: none; min-width: 58px; font-weight: 600; font-size: 17px; color: var(--text); }
.ww-side { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 15px; font-weight: 600; }
.ww-side > .truncate { min-width: 0; }
.ww-side .clock { margin-inline-start: auto; }
.ww-side .tbadge { margin-right: 6px; }
.ww-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
@media (max-width: 520px) { .ww { grid-template-columns: 116px minmax(0, 1fr); gap: 10px 12px; } }
/* The narrowest phones (320px, the reflow width): nothing may push the page sideways. */
@media (max-width: 359px) { .ww { grid-template-columns: 92px minmax(0, 1fr); } .ww-tag { height: auto; min-height: 24px; padding-block: 4px; line-height: 1.25; white-space: normal; } .ww-side { flex-wrap: wrap; } }

/* The first track holds the evaluation strip; both players and clocks line up with the squares in the second. */
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
@media (min-width: 1180px) { .hb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hb { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-content: start; gap: 7px 5px; padding: 12px; background: var(--card); border: 1.5px solid var(--edge); border-top: 6px solid var(--ev); border-radius: var(--r-sm); min-width: 0; transition: transform .12s ease, box-shadow .12s ease; }
.hb.game-link-surface:hover { border-color: var(--text); border-top-color: var(--ev); box-shadow: var(--hard); transform: translate(-2px, -2px); }
/* A delayed board: dashed, its colour band hatched, its pill and held clocks saying the rest. */
.hb--stale { border-style: dashed; border-top-style: dashed; }
.hb--stale .chessboard { filter: saturate(.55); }
.hb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.hb-event { font-size: 14px; font-weight: 650; color: var(--text-2); min-width: 0; }
.hb-top, .hb-board, .hb-foot { grid-column: 1 / -1; }
.hb-board { grid-template-columns: subgrid; }
.hb-side { grid-column: 2; display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 15px; }
.hb-side .clock { margin-inline-start: auto; }
.hb-name { min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.hb-name .tbadge { margin-right: 6px; }
.hb-board .board { --board-max: none; }
.hb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; min-height: 34px; }
@media (max-width: 620px) {
  .hb-grid { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(88%, 330px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 5px; }
  .hb { scroll-snap-align: center; }
}

/* Square result cards give the position all the space above the score sheet. */
.home-page .rc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.5vw, 28px); }
.rc { display: grid; grid-template-rows: minmax(0, 1fr) auto; aspect-ratio: 1; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r); overflow: hidden; min-width: 0; transition: transform .12s ease, box-shadow .12s ease; }
.rc-board { container-type: size; display: grid; place-items: center; padding: 10px; min-height: 0; background: var(--ev-deep); color: var(--bone); }
.rc-board .board { width: min(100cqw, 100cqh); max-width: none; }
.rc.game-link-surface:hover { border-color: var(--text); box-shadow: var(--hard); transform: translate(-2px, -2px); }
.rc:focus-within { outline: 3px solid var(--ring); outline-offset: 2px; }
.rc-body { display: flex; flex-direction: column; gap: 4px; padding: 10px clamp(12px, 1.4vw, 20px); }
.rc-side { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 15px; }
.rc .rc-side { font: 800 semi-condensed clamp(18px, 1.55vw, 26px)/1.15 var(--display); }
.rc .rc-foot { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 3px; }
.rc-name { flex: 1; min-width: 0; font-weight: 650; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; min-width: 0; }
@media (max-width: 800px) {
  .home-page .rc-grid { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(88%, 330px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 5px 5px 8px; }
  .rc { scroll-snap-align: center; }
}

/* Upset radar: the biggest surprise on volt, the next ones beside it. */
.ur-intro { max-width: 70ch; margin: -6px 0 18px; color: var(--text-2); font-size: 15px; }
.ur-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.ur-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "s m" "f f" "go go"; gap: 12px 16px; align-items: center; padding: 16px; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-sm); min-width: 0; transition: transform .12s ease, box-shadow .12s ease; }
.ur-row.game-link-surface:hover { border-color: var(--text); box-shadow: var(--hard); transform: translate(-2px, -2px); }
.ur-row--lead { --text: #0B0C06; --text-2: #2A300C; --muted: #4C5516; --line: rgba(11, 12, 6, .18); --line-2: rgba(11, 12, 6, .4); --accent: #0B0C06; --on-accent: #D4FF3A; --accent-text: #0B0C06; --surface-2: rgba(11, 12, 6, .1); --ring: #0B0C06; background: var(--volt); border: 2px solid #0B0C06; color: var(--text); }
.ur-surprise { grid-area: s; display: flex; flex-direction: column; gap: 4px; }
.ur-surprise-n { font: 800 semi-condensed clamp(38px, 4vw, 52px)/.95 var(--display); letter-spacing: -.02em; }
.ur-main { grid-area: m; }
.ur-line { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.ur-side { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.ur-verb { font: 700 12px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); min-width: 26px; }
.ur-meta { display: flex; gap: 4px 10px; margin-top: 8px; min-width: 0; }
.ur-meta .truncate { min-width: 0; }
.ur-meta span:not(.truncate) { font: 400 14px/1.4 var(--mono); flex: none; }
.ur-facts { grid-area: f; display: flex; gap: 28px; padding-top: 12px; border-top: 1.5px solid var(--line-2); }
.ur-facts dt { font: 700 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ur-facts dd { margin-top: 2px; font: 800 semi-condensed 26px/1.1 var(--display); }
.ur-row > .go { grid-area: go; justify-self: start; padding-left: 0; color: var(--text); }
.ur-row--lead > .go:hover { background: #0B0C06; color: var(--volt); padding-left: 10px; }

/* What comes next: rounds by start time, the next pairings, and this week's events in their own colours. */
.home-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 56px) clamp(24px, 3vw, 44px); align-items: start; }
.home-next > :only-child, .home-week { grid-column: 1 / -1; }
.home-next .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.home-next .section-title { grid-column: 1; grid-row: 1; }
.home-next .section-link { grid-column: 2; grid-row: 1; text-align: right; }
.home-next .section-note { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .home-next .section-head { grid-template-columns: minmax(0, 1fr) fit-content(42%); gap: 8px; }
}
.nr-grid, .pair-grid { display: grid; gap: 8px; }
.nr { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px; background: var(--card); border: 1.5px solid var(--edge); border-left: 8px solid var(--ev); border-radius: var(--r-sm); }
.nr:has(a.stretched):hover, .wk:has(a.stretched):hover, .pair.game-link-surface:hover { border-color: var(--text); box-shadow: 3px 3px 0 var(--text); }
.nr:has(a.stretched):hover { border-left-color: var(--ev); }
.nr-time { display: block; font: 800 semi-condensed 30px/1 var(--display); }
.nr-day { display: block; margin-top: 3px; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nr-name, .wk-name { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.nr-until { justify-self: end; padding: 4px 8px; border-radius: 5px; background: var(--accent); color: var(--on-accent); font: 700 13px/1 var(--sans); white-space: nowrap; }
.pair { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 9px 12px; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-sm); font-size: 15px; }
.pair-grid:not(:has(.row-go)) .pair { grid-template-columns: 34px minmax(0, 1fr) auto minmax(0, 1fr); }
.pair-bd { font: 800 semi-condensed 20px/1 var(--display); color: var(--muted); }
.pair-side { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; }
.pair-side .plink { flex: 1; }
.pair-v { font: 700 12px/1 var(--sans); color: var(--muted); }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.wk { position: relative; display: grid; grid-template-rows: auto 1fr auto; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r-sm); overflow: hidden; }
.wk-date { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 14px; background: var(--ev); color: #0B0B0F; }
.wk-date-main { font: 800 semi-condensed 28px/1 var(--display); white-space: nowrap; }
.wk-date-sub { font: 700 12px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.wk-main { padding: 12px 14px 6px; }
.wk-main .meta { margin-top: 4px; }
.wk-side { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px 12px; }
.wk:has(a.stretched):hover .wk-name, .nr:has(a.stretched):hover .nr-name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
@media (max-width: 900px) { .home-next { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .nr { grid-template-columns: 76px minmax(0, 1fr); } .nr-until { grid-column: 2; justify-self: start; } .nr-time { font-size: 26px; }
  .pair { grid-template-columns: 28px minmax(0, 1fr) 30px; grid-template-areas: "bd w go" "bd b go"; gap: 4px 10px; } .pair-grid:not(:has(.row-go)) .pair { grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "bd w" "bd b"; }
  .pair-bd { grid-area: bd; } .pair-side:nth-of-type(2) { grid-area: w; } .pair-side:nth-of-type(4) { grid-area: b; } .pair-v { display: none; } .pair > .row-go { grid-area: go; }
}

/* FIDE top three: one card per list, the leader set large. */
.rk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.rk { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--card); border: 1.5px solid var(--edge); border-top: 6px solid var(--text); border-radius: var(--r-sm); min-width: 0; }
.rk-kind { font: 800 condensed 24px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.rk-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rk-n { font: 800 semi-condensed 20px/1 var(--display); color: var(--muted); }
.rk-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rk-rating { font: 800 semi-condensed 22px/1 var(--display); }
.rk-row--lead { font-size: 18px; } .rk-row--lead .rk-n { font-size: 30px; color: var(--text); } .rk-row--lead .rk-rating { font-size: 32px; } .rk-row--lead .plink-name { font-weight: 750; }
.rk-more { margin: 8px 0 0; align-self: start; }
.coverage-snapshot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 20px; border-top: 4px solid var(--text); }

/* ── About and error ───────────────────────────────────────────────────── */
.about-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); margin-top: 24px; }
.about-nav { position: sticky; top: calc(var(--hdr-h) + 24px); align-self: start; display: flex; flex-direction: column; border-left: 1px solid var(--line-2); }
.about-nav a { padding: 8px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); font-size: 14px; }
.about-nav a:hover { color: var(--text); border-left-color: var(--accent-text); }
.about-section + .about-section { margin-top: 56px; }
.source-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 18px; }
.source-row h3 { font-size: 16px; font-weight: 650; }
.source-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.source-row p { grid-column: 1 / -1; color: var(--text-2); font-size: 14px; }
@media (max-width: 860px) { .about-layout { grid-template-columns: minmax(0, 1fr); } .about-nav { position: static; flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 4px 0; } .about-nav a { border-left: 0; padding: 6px 14px 6px 0; } }
.error-page { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(24px, 6vw, 80px); align-items: center; padding-block: clamp(24px, 6vw, 72px); }
.error-code { font: 800 semi-condensed clamp(64px, 8vw, 96px)/1.1 var(--display); color: var(--accent-text); letter-spacing: -.04em; margin-bottom: 20px; }
.error-page .min0 > * + * { margin-top: 18px; }
.error-search { display: flex; gap: 10px; max-width: 520px; }
.error-links { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) { .error-page { grid-template-columns: minmax(0, 1fr); } .error-page .board { display: none; } }

@media (pointer: coarse) { .tab, .pager-num, .pager-step { min-height: 42px; } .row-go, .go { min-width: 40px; height: 40px; } .mini-game-foot { min-height: 49px; } .btn--sm { min-height: 40px; } }
@media print { .site-header, .ticker, .site-footer, .tabs--sticky, .palette { display: none; } body { background: #fff; color: #000; } }
.about-after { margin-top: 24px; }
.error-title { font-size: clamp(32px, 4vw, 48px); }
@media (max-width: 520px) { .mini-game { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; } .mini-game .side-elo { display: none; } }
/* Scroll containers are positioned so absolutely positioned children (.sr-only) scroll and clip with them. */
.tabs-track, .main-nav, .move-list, .palette-results { position: relative; }
.toolbar > .tabs { min-width: 0; max-width: 100%; }
.palette-results[aria-busy="true"] { opacity: .45; transition: opacity .2s ease .15s; }
.rank-lead-name .tbadge { margin-right: 8px; vertical-align: 6px; }

/* A news item without a corresponding game carries an empty board motif. */
.ts-motif{width:clamp(44px,8vw,84px);aspect-ratio:1;align-self:start;background:repeating-conic-gradient(#26231c 0 25%,#f3dc95 0 50%) 0 0/25% 25%;opacity:.42}
