/* Events area: tournament calendar, tournament page, live and today. Built from site.css tokens.
   A board card, tile or name is a link only when its page exists (backend/publication.py); otherwise the same element
   is drawn as a div or span. Hover lifts and underlines are therefore written for the link form (a.wall-tile:hover,
   .ser-card.game-link-surface:hover), so nothing that cannot be opened reacts to the pointer. */

.tc-badge { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.tc-badge-val { padding: 3px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); letter-spacing: .02em; color: var(--text); }
.tc-badge--none { color: var(--muted); }

/* The calendar, results and schedule are scoresheets too: paper, ranks in the board's two bone tones, and each
   tournament's colour on its row's leading edge. */
.cal-list, .lv-today :is(.game-list, .row-list) {
  --list-hover: var(--accent-wash);
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cal-row:nth-child(even), .lv-today :is(.game-list, .row-list) > :nth-child(even) { background: var(--card-2); }
.cal-row { box-shadow: inset 6px 0 0 var(--ev); }
.lv-today :is(.game-list, .row-list) > :has(a[href]):is(:hover, :focus-within),
.cal-row:has(a:hover), .cal-row:focus-within { background: var(--list-hover); }

/* ── Calendar ──────────────────────────────────────────────────────────── */
.cal-row { position: relative; display: grid; grid-template-columns: 190px minmax(0, 1fr) 230px 84px 112px; align-items: center; gap: 24px; padding: 18px clamp(14px, 2vw, 28px); }
.cal-row + .cal-row { border-top: 0; }
.cal-row:first-child { border-start-start-radius: inherit; border-start-end-radius: inherit; }
.cal-row:last-child { border-end-start-radius: inherit; border-end-end-radius: inherit; }
.cal-date { min-width: 0; }
.cal-date-main { display: block; font: 800 semi-condensed clamp(26px, 2.6vw, 38px)/1.1 var(--display); letter-spacing: -.015em; }
.cal-date-sub { display: block; margin-top: 6px; font: 700 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-name { font-size: 19px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
.cal-row:hover .cal-name a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cal-row:hover .cal-date-main { color: var(--accent-text); }
.cal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.cal-progress-top { display: flex; align-items: center; gap: 10px; }
.cal-progress-top .round-bar { width: 132px; }
.cal-rounds { font: 600 14px/1 var(--mono); }
.cal-progress-note { margin-top: 7px; font-size: 14px; color: var(--muted); }
.cal-games { text-align: right; }
.cal-games-n { display: block; font: 800 semi-condensed 30px/1.1 var(--display); }
.cal-games-l { font: 700 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-status { text-align: right; }
.cal-empty { padding: 4px 0 20px; color: var(--muted); font-size: 14px; }
.cal-empty strong { color: var(--text-2); font-weight: 600; }
@media (max-width: 1180px) { .cal-row { grid-template-columns: 170px minmax(0, 1fr) 200px 100px; } .cal-games { display: none; } }
@media (max-width: 860px) {
  .cal-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 15px; }
  .cal-date { grid-column: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; } .cal-date-sub { margin: 0; } .cal-date-main { font-size: 24px; }
  .cal-status { grid-column: 2; grid-row: 1; }
  .cal-main, .cal-progress { grid-column: 1 / -1; }
}

/* Series on the index: a stage of the strongest series, each pictured by the final position of its latest top game,
   with the whole list folded under it. The cards form a swipeable row on a phone. */
.cal-series { margin: clamp(44px, 6.5vw, 84px) 0 28px; padding: clamp(18px, 2.6vw, 32px); }
.cal-series .section-head { margin-bottom: 18px; }
.cal-series-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cal-serie { display: grid; grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: start; gap: 14px; padding: 14px; border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--card); transition: border-color .15s ease, transform .15s ease; }
.cal-serie:hover { border-color: var(--accent-text); transform: translateY(-2px); }
.cal-serie--plain { grid-template-columns: minmax(0, 1fr); }
.cal-serie-board .board { max-width: none; }
.cal-serie-years { display: block; font: 700 14px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.cal-serie-name { margin-top: 6px; font: 800 semi-condensed 22px/1.1 var(--display); letter-spacing: -.012em; overflow-wrap: anywhere; }
.cal-serie:hover .cal-serie-name { color: var(--accent-text); }
.cal-serie-game { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.cal-serie-game-year { flex: none; color: var(--muted); }
.cal-serie-pairing { min-width: 0; overflow-wrap: anywhere; }
.cal-serie-res { font: 600 14px/1 var(--mono); color: var(--accent-text); white-space: nowrap; }
.cal-series-all { margin-top: 16px; }
.cal-series-all summary { width: fit-content; padding: 8px 0; cursor: pointer; font: 700 14px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.cal-series-all summary:hover { color: var(--accent-text); }
.cal-series-all ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
@media (max-width: 1180px) { .cal-series-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cal-serie:not(.cal-serie--plain) { grid-template-columns: 88px minmax(0, 1fr); } }
@media (max-width: 720px) {
  .cal-series-strip { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(92%, 360px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 0 10px; scrollbar-width: thin; }
  .cal-serie { scroll-snap-align: start; }
  .cal-serie:hover { transform: none; }
}

/* ── Tournament series ─────────────────────────────────────────────────── */
/* One tournament across its years. The stage opens with the newest year's pictured game beside the year rail;
   below it each year is a block: its number, one board where a position is held, and a card per tournament. */
.ser-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 0; }
.ser-hero--plain { grid-template-columns: minmax(0, 1fr); }
.ser-hero-main { display: flex; flex-direction: column; padding: clamp(22px, 4vw, 52px) clamp(18px, 4vw, 52px) clamp(20px, 3vw, 36px); min-width: 0; }
.ser-title { margin-top: 18px; max-width: 16ch; }
.ser-rail { margin-top: auto; padding-top: clamp(26px, 4vw, 48px); }
.ser-rail ol { display: flex; flex-wrap: wrap; gap: 10px clamp(18px, 2.6vw, 34px); margin: 0; padding: 0; list-style: none; }
.ser-rail-year { display: grid; gap: 6px; padding-bottom: 6px; border-bottom: 2px solid var(--line-2); }
.ser-rail-n { font: 800 semi-condensed clamp(28px, 3.5vw, 44px)/1.1 var(--display); letter-spacing: -.03em; white-space: nowrap; }
.ser-rail-sub { font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ser-rail li:first-child .ser-rail-n { color: var(--accent-text); }
.ser-rail li:first-child .ser-rail-year, .ser-rail-year:hover { border-bottom-color: var(--accent-text); }
.ser-rail-year:hover .ser-rail-n { color: var(--accent-text); }
.ser-lead { display: grid; gap: 14px; align-content: center; margin: 0; padding: clamp(18px, 3vw, 36px) clamp(18px, 3vw, 40px) clamp(18px, 3vw, 28px) 0; min-width: 0; }
.ser-lead-board { display: block; border-radius: 10px; }
.ser-lead-board .board { --board-max: 360px; margin-inline: auto; }
.ser-lead-cap { display: grid; gap: 6px; justify-items: center; text-align: center; }
.ser-lead-game { font: 800 semi-condensed clamp(24px, 2.4vw, 32px)/1.1 var(--display); letter-spacing: -.015em; }
.ser-lead-game em { font-style: normal; color: var(--accent-text); padding-inline: .12em; }
a.ser-lead-game:hover span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ser-stats { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .ser-hero { grid-template-columns: minmax(0, 1fr); }
  .ser-lead { padding: 0 18px 22px; }
  .ser-lead-board .board { --board-max: 340px; }
}
/* On a phone the years sit on one line where they can, so the board stays in the first screen. */
@media (max-width: 720px) { .ser-rail { padding-top: 20px; } .ser-rail ol { gap: 8px 18px; } .ser-rail-sub { display: none; } }

.ser-years { display: grid; }
.ser-year { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px clamp(20px, 3vw, 44px); align-items: start; padding: clamp(22px, 3vw, 36px) 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--sticky-top) + 12px); }
.ser-year:first-child { border-top: 0; padding-top: 4px; }
.ser-year--shot { grid-template-columns: 250px 196px minmax(0, 1fr); }
.ser-year-n { font: 800 semi-condensed clamp(40px, 5vw, 64px)/1.1 var(--display); letter-spacing: -.045em; white-space: nowrap; }
.ser-year-n--long { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -.035em; }  /* a season ("2025/26") or "Undated" */
.ser-year:first-child .ser-year-n { color: var(--accent-text); }
.ser-year-n a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.ser-year-meta { display: grid; gap: 3px; margin-top: 16px; font-size: 14.5px; font-weight: 550; }
.ser-year-meta span { color: var(--text-2); font-weight: 400; }
.ser-year-count { margin-top: 8px; font: 700 14px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ser-shot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; padding: 10px; border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--card); transition: transform .15s ease, border-color .15s ease; }
a.ser-shot:hover { border-color: var(--accent-text); transform: translateY(-3px); }
.ser-shot .board { max-width: none; }
.ser-shot-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; }
.ser-shot-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ser-shot-res { flex: none; font: 600 14px/1 var(--mono); }
.ser-shot-kind { font: 700 14px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ser-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.ser-card { display: grid; align-content: start; gap: 12px; padding: 16px 18px; border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--card); transition: border-color .15s ease, transform .15s ease; }
.ser-card.game-link-surface:hover { border-color: var(--line-2); transform: translateY(-2px); }
.ser-card-main { display: grid; align-content: start; gap: 8px; }
.ser-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ser-card-dates { font: 700 14px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ser-card-name { font-size: 18px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; overflow-wrap: anywhere; }
.ser-card:hover .ser-card-name a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ser-card-score { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ser-card-pts { flex: none; font: 800 semi-condensed 34px/1.1 var(--display); letter-spacing: -.01em; }
.ser-card-of { font-size: 18px; color: var(--muted); }
.ser-card-who { display: grid; gap: 3px; }
.ser-card-names { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ser-card-names .plink { display: inline; }
/* A year with one tournament: a single wide card, its top score beside the name instead of under it. */
.ser-cards--one .ser-card { grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 12px 28px; padding: 22px 26px; }
.ser-cards--one .ser-card-name { font: 800 semi-condensed clamp(26px, 2.6vw, 36px)/1.1 var(--display); letter-spacing: -.015em; }
.ser-cards--one .ser-card-score { padding: 4px 0 4px 28px; border-top: 0; border-left: 1px solid var(--line); }
.ser-cards--one .ser-card-pts { font-size: 46px; }
.ser-cards--one .ser-card-of { font-size: 22px; }
@media (max-width: 1080px) {
  .ser-year, .ser-year--shot { grid-template-columns: 200px minmax(0, 1fr); }
  .ser-year--shot .ser-shot { grid-column: 1; grid-row: 2; }
  .ser-year--shot .ser-cards { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 720px) {
  .ser-year, .ser-year--shot { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ser-year-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 4px 18px; }
  .ser-year-n { grid-row: 1 / span 2; font-size: 44px; }
  .ser-year-n--long { font-size: 36px; }
  .ser-year-meta { margin-top: 0; align-self: end; }
  .ser-year-count { margin-top: 0; align-self: start; }
  .ser-year--shot .ser-shot { grid-column: 1; grid-row: auto; grid-template-columns: 112px minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .ser-year--shot .ser-shot .board { grid-row: 1 / span 2; }
  .ser-shot-cap { flex-direction: column; align-items: flex-start; gap: 5px; align-self: end; min-width: 0; font-size: 15px; }
  .ser-shot-names { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .ser-shot-kind { align-self: start; }
  .ser-year--shot .ser-cards { grid-column: 1; grid-row: auto; }
  .ser-cards--one .ser-card { grid-template-columns: minmax(0, 1fr); padding: 16px 18px; }
  .ser-cards--one .ser-card-score { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .ser-cards--one .ser-card-pts { font-size: 34px; }
  .ser-cards--one .ser-card-of { font-size: 18px; }
}

/* ── Tournament page ───────────────────────────────────────────────────── */
.ev-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.ev-hero-main { padding: clamp(22px, 4vw, 52px) clamp(18px, 4vw, 52px) 0; min-width: 0; }
.ev-hero-more { padding: 0 clamp(18px, 4vw, 52px) clamp(20px, 3vw, 36px); min-width: 0; }
/* With a board: the lead game sits beside the title and facts, and between them on a narrow screen, so a board is
   in the first screen at every width. */
.ev-hero--board { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); grid-template-rows: auto 1fr auto; }
.ev-hero--board .ev-title { font-size: clamp(30px, 3.5vw, 48px); }
.ev-hero--board .ev-hero-main { grid-area: 1 / 1; }
.ev-hero--board .ev-hero-more { grid-area: 2 / 1; }
.ev-hero--board .ev-stats { grid-area: 3 / 1 / auto / -1; }
.ev-lead { grid-area: 1 / 2 / span 2; display: grid; gap: 14px; align-content: center; margin: 0; padding: clamp(18px, 3vw, 36px) clamp(18px, 3vw, 40px) clamp(18px, 3vw, 28px) 0; min-width: 0; }
.ev-lead-board { display: block; border-radius: 10px; }
.ev-lead-board .board { --board-max: 360px; margin-inline: auto; }
.ev-lead-cap { display: grid; gap: 6px; justify-items: center; text-align: center; }
.ev-lead-game { font: 800 semi-condensed clamp(24px, 2.4vw, 32px)/1.1 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.ev-lead-game em { font-style: normal; color: var(--accent-text); padding-inline: .12em; }
a.ev-lead-game:hover span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 900px) {
  .ev-hero--board { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .ev-hero--board .ev-hero-main, .ev-hero--board .ev-hero-more, .ev-hero--board .ev-stats, .ev-lead { grid-area: auto; }
  .ev-lead { padding: 20px 18px 0; }
  .ev-lead-board .board { --board-max: 300px; }
}
.ev-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ev-hero-now { font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.ev-title { margin-top: 20px; max-width: 18ch; }
.ev-sub { margin-top: 12px; font-size: 16px; line-height: 1.4; color: var(--text-2); max-width: 52ch; }
.ev-facts { display: flex; flex-wrap: wrap; gap: 18px 44px; margin-top: 28px; }
.ev-facts dt, .ev-split-legend dt { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ev-facts dd { margin-top: 5px; font-size: 15.5px; font-weight: 550; max-width: 36ch; }
.ev-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ev-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ev-stats .stat { padding: 20px clamp(18px, 4vw, 52px) 24px; border-left: 1px solid var(--line); }
.ev-stats .stat-label { white-space: normal; }
.ev-hero-pairings { margin-block: 14px; }
.ev-hero-pairings ul { list-style: none; padding: 0; margin-block: 4px; }
.ev-stats .stat:first-child { border-left: 0; }
.ev-stats .stat + .stat { padding-left: 24px; }
@media (max-width: 860px) { .ev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ev-stats .stat { padding: 16px 18px; } .ev-stats .stat:nth-child(odd) { border-left: 0; } .ev-stats .stat:nth-child(n + 3) { border-top: 1px solid var(--line); } }
.ev-section .section-head h3.section-title { font-size: clamp(24px, 2.4vw, 30px); }
/* The hero scoreboard: a two-player match as one big score, any other field as its top rows. */
.ev-score { margin-top: 24px; max-width: 600px; }
.ev-score-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.ev-score-head .label { color: var(--accent-text); }
.ev-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px clamp(10px, 2vw, 20px); margin-top: 10px; padding: clamp(14px, 2vw, 20px) clamp(14px, 2.4vw, 24px); border: 1px solid var(--line); border-radius: 12px; }
.ev-match-side { display: flex; align-items: center; justify-content: flex-end; gap: clamp(10px, 2vw, 18px); min-width: 0; }
.ev-match-side ~ .ev-match-side { flex-direction: row-reverse; }
.ev-match-name { display: grid; justify-items: end; gap: 6px; min-width: 0; text-align: right; font: 800 semi-condensed clamp(17px, 1.9vw, 23px)/1.12 var(--display); overflow-wrap: break-word; }
.ev-match-side ~ .ev-match-side .ev-match-name { justify-items: start; text-align: left; }
.ev-match-name .plink-name { white-space: normal; font-weight: inherit; }
.ev-match-pts { font: 800 semi-condensed clamp(46px, 5.4vw, 72px)/.9 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ev-match-side.is-ahead .ev-match-pts { color: var(--accent-text); }
.ev-match-dash { font: 800 clamp(26px, 3vw, 40px)/1 var(--display); color: var(--muted); }
.ev-match-note { margin-top: 10px; font-size: 15.5px; font-weight: 600; }
.ev-score-list { list-style: none; padding: 0; margin: 6px 0 0; }
.ev-score-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; }
.ev-score-row + .ev-score-row { border-top: 1px solid var(--line); }
.ev-score-rank { font: 800 semi-condensed 24px/1 var(--display); color: var(--muted); }
.ev-score-row:first-child .ev-score-rank { color: var(--accent-text); }
.ev-score-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.ev-score-pts { font: 800 semi-condensed 28px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-score-pts small { margin-left: 2px; font: 400 14px/1 var(--mono); color: var(--muted); }
@media (max-width: 560px) {
  .ev-match { align-items: stretch; }
  .ev-match-side, .ev-match-side ~ .ev-match-side { flex-direction: column; justify-content: space-between; gap: 10px; }
  .ev-match-dash { align-self: end; padding-bottom: 10px; }
  .ev-match-name, .ev-match-side ~ .ev-match-side .ev-match-name { justify-items: center; text-align: center; overflow-wrap: normal; }
  :root:not(.no-flags) :is(.ev-match-name, .ev-score-name) .fed:not(.fed--noflag) .fed-code { display: none; }
}
.ev-tie { font: 600 14px/1 var(--mono); color: var(--muted); margin-left: 1px; vertical-align: 2px; }
.ev-note { margin-top: 12px; }
.ev-split-bar { width: 100%; height: 14px; border-radius: 4px; overflow: hidden; }
.ev-split-w { fill: #F5F3EC; } .ev-split-d { fill: var(--muted); } .ev-split-b { fill: #0B0B0C; }
.ev-split-bar { box-shadow: 0 0 0 1px var(--line-2); }
.ev-split-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.ev-split-legend dd { margin-top: 4px; font: 800 semi-condensed 30px/1.1 var(--display); }
.ev-split-key { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--muted); vertical-align: -1px; }

.round-tabs-track { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 2px 2px 10px; }
.round-tab { flex: none; display: grid; gap: 5px; min-width: 76px; padding: 10px 14px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.round-tab:hover { border-color: var(--text-2); }
.round-tab-n { font: 800 semi-condensed 24px/1.1 var(--display); }
.round-tab-d { display: inline-flex; align-items: center; gap: 6px; font: 400 14px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.round-tab--empty .round-tab-n { color: var(--muted); }
.round-tab[aria-current="true"], .round-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.round-tab[aria-current="true"] .round-tab-n, .round-tab[aria-selected="true"] .round-tab-n, .round-tab[aria-current="true"] .round-tab-d, .round-tab[aria-selected="true"] .round-tab-d { color: var(--on-accent); }
.round-panel { margin-top: 16px; }
.round-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 18px; }
.round-title { font: 800 semi-condensed 34px/1.1 var(--display); letter-spacing: -.01em; }
/* The shown round's boards, under the hero: a grid, and one swipeable row on a phone so the sections stay close. */
.ev-boards { margin-top: clamp(16px, 2.4vw, 28px); }
/* On a wide window the hero and board wall span it; the tabs and the sections under them keep the --max column. */
@media (min-width: 981px) {
  .ev-page :is(.ev-section, .ev-hero ~ .source-note), .ev-page .tabs--sticky .tabs-track { max-width: var(--max); margin-inline: auto; }
}
.ev-boards-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wall-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.wall-tile { display: grid; gap: 7px; padding: 10px; border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--card); transition: transform .15s ease, border-color .15s ease; }
a.wall-tile:hover { border-color: var(--accent-text); transform: translateY(-3px); }
.wall-tile .board { max-width: none; }
.wall-cap { display: flex; justify-content: space-between; gap: 8px; font: 600 14px/1 var(--mono); }
.wall-bd { color: var(--muted); }
.wall-res { display: inline-flex; align-items: center; gap: 5px; }
/* Each side has a colour swatch and surname. Tiles in a row share their height. */
.wall-grid > li { display: grid; min-width: 0; }
.wall-tile { align-content: start; min-width: 0; }
.wall-side { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 550; }
.wall-side .elo { flex: none; }
.wall-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Eight boards are drawn: one row of six on a wide screen, two rows of four below that. */
@media (min-width: 1181px) { .wall-grid > li:nth-child(n + 7) { display: none; } }
@media (max-width: 1180px) { .wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .wall-grid { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 0 10px; scrollbar-width: thin; }
  .wall-grid > li { scroll-snap-align: start; }
  a.wall-tile:hover { transform: none; }
}

/* Capped lists. A card list inside .ev-cap--N shows its first N cards until the .ev-more control after it is opened;
   .ev-folded marks the cards a windowed list (the schedule) folds away. No script: the control is a <details>, and a
   browser without :has() drops these rules and shows every card. */
.ev-cap:not(:has(> .ev-more[open])) .ev-folded,
.ev-cap--5:not(:has(> .ev-more[open])) .dcards-list > li:nth-child(n + 6),
.ev-cap--8:not(:has(> .ev-more[open])) .dcards-list > li:nth-child(n + 9),
.ev-cap--10:not(:has(> .ev-more[open])) .dcards-list > li:nth-child(n + 11) { display: none; }
.ev-more { margin-top: 12px; }
.ev-more-toggle { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 40px; margin-inline: auto; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer; list-style: none; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.ev-more-toggle::-webkit-details-marker { display: none; }
.ev-more-toggle::after { content: "↓"; }
.ev-more[open] > .ev-more-toggle::after { content: "↑"; }
.ev-more-toggle:hover { border-color: var(--text); }
.ev-more-less, .ev-more[open] .ev-more-all { display: none; }
.ev-more[open] .ev-more-less { display: inline; }

/* ── Tournament data cards ─────────────────────────────────────────────── */
/* Every list on the tournament and event pages is .dcards (site.css): one card per record. Each card type lays itself
   out for a phone under 900px with grid areas; from 900px .dcards--rows lines the cards up in the tracks --dc-cols
   names here (auto tracks take the widest value in the list, so a column is as wide as its content). The wrapper,
   list and cards share one 12px column gap, so legend labels sit exactly over their columns. A label the legend
   replaces on wide screens (.pt-lab, .st-lab, "Pts" under a score) stays in the page for assistive technology. */
.ev-section .dcards-note { margin-top: 14px; }
@media (min-width: 900px) {
  .ev-section .dcards--rows, .ev-section .dcards--rows > .dcards-list, .dcards--sections, .dcards--sections > .dcards-list { column-gap: 12px; }
  .pt-lab, .st-lab, .st-pts small { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* Schedule (a card per round) and the sections of an event (a card per tournament). */
.ev-round-link { font-weight: 650; }
a.ev-round-link { padding-block: 2px; }
a.ev-round-link:hover, .sec-card .dcard-main a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sch-card.is-focus { box-shadow: inset 4px 0 0 var(--accent); }
.sch-timing { grid-column: 1 / -1; margin: 0; }
.sch-status, .sec-status { display: inline-flex; }
.sch-card .dc-f dd { font-size: 14px; font-weight: 500; }
@media (max-width: 899px) {
  .sch-card, .sec-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main status" "facts facts"; gap: 6px 12px; }
  .sch-card > .dcard-main, .sec-card > .dcard-main { grid-area: main; }
  .sch-status, .sec-status { grid-area: status; }
  .sch-card > .dc-facts, .sec-card > .dc-facts { grid-area: facts; }
  .sec-dates { grid-column: span 2; }
  /* A round's facts read as one line: the day, then "UTC 09:15" and "Games 7", then what the coverage holds. */
  .sch-card > .dc-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; padding-top: 0; border-top: 0; }
  .sch-card .dc-f { display: flex; align-items: baseline; gap: 6px; }
  .sch-card .dc-f dd { margin: 0; }
  .sch-date dt, .sch-res dt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .sch-res { flex-basis: 100%; }
}
@media (min-width: 900px) {
  .dcards--schedule { --dc-cols: minmax(0, 1fr) auto auto auto auto minmax(0, 1.5fr); }
  .dcards--sections { --dc-cols: minmax(0, 1.5fr) auto auto auto auto auto; }
}

/* Pairings and games: a card per game. Phone: both players with their ratings and the result chips beside them, then
   one line for round, board, opening and moves. A game without a result (.pt-card--wait) has no chips: its status or
   start time opens that last line instead, so a wide pill never squeezes the names. Spacing on a phone is by margin,
   not column gap, so a part with nothing to show leaves no hole. */
.pt-player { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.pt-player .plink { flex: 0 1 auto; }
.pt-elo { font-size: 14px; color: var(--muted); text-align: right; white-space: nowrap; }
.ev-rating-list { display: block; font: 400 12px/1.3 var(--sans); color: var(--muted); }
.pt-result { display: flex; align-items: center; }
.pt-chips, .st-chip { display: inline-flex; gap: 3px; border-radius: 6px; }
.pt-vs { font: 400 14px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.pt-where, .pt-meta { display: flex; align-items: baseline; min-width: 0; font-size: 14px; color: var(--muted); }
.pt-meta { gap: 10px; }
.pt-rd, .pt-bd, .pt-moves { white-space: nowrap; }
.pt-lab { font-family: var(--sans); }
.pt-round { font-weight: 600; color: var(--text-2); }
a.pt-round { display: inline-block; padding-block: 3px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.pt-open { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
a.pt-round:hover, .pt-open a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (max-width: 1099px) { .pt-player .fed-code { display: none; } .pt-player .fed { padding: 0; border: 0; } .no-flags .pt-player .fed, .pt-player .fed--noflag { display: none; } }
@media (max-width: 899px) {
  .pt-card { grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-areas: "w w we res go" "b b be res go" "where meta meta meta meta"; gap: 6px 0; }
  .pt-card--wait { grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "w w w we go" "b b b be go" "res where meta meta meta"; }
  .pt-w { grid-area: w; } .pt-b { grid-area: b; } .pt-we { grid-area: we; } .pt-be { grid-area: be; } .pt-result { grid-area: res; } .pt-where { grid-area: where; } .pt-meta { grid-area: meta; } .pt-card > .row-go { grid-area: go; }
  .pt-elo, .pt-result { margin-left: 10px; }
  /* The whole card opens the game (the arrow's link is stretched over it), so the arrow itself can stay narrow. */
  .pt-card > .row-go { min-width: 24px; margin-left: 4px; }
  /* When the opening and the move count do not fit beside a status, the count takes a line of its own. */
  .pt-meta { flex-wrap: wrap; row-gap: 2px; }
  .pt-card--wait .pt-result { margin: 0 10px 0 0; }
  .pt-where > span:not(.pt-none) { margin-right: 10px; }
  .pt-chips { flex-direction: column; gap: 6px; }
  .pt-none { display: none; }
}
@media (min-width: 900px) {
  /* [Rd] Bd White Rtg Result Black Rtg Opening Moves [open]. A list where no card opens a game has no last track. */
  .dcards--pairings { --dc-cols: auto minmax(0, 1.5fr) auto auto minmax(0, 1.5fr) auto minmax(0, 1fr) auto; }
  .dcards--pairings.pt--rounds { --dc-cols: auto auto minmax(0, 1.5fr) auto auto minmax(0, 1.5fr) auto minmax(0, 1fr) auto; }
  .dcards--pairings.pt--opens { --dc-cols: auto minmax(0, 1.5fr) auto auto minmax(0, 1.5fr) auto minmax(0, 1fr) auto auto; }
  .dcards--pairings.pt--rounds.pt--opens { --dc-cols: auto auto minmax(0, 1.5fr) auto auto minmax(0, 1.5fr) auto minmax(0, 1fr) auto auto; }
  .pt-where, .pt-meta { display: contents; }
  .pt-bd, .pt-moves { text-align: right; }
}

/* Standings: a card per player. The round chips are a strip of fixed-width cells (opponent No. and colour over the
   score), each under its round's name. On a phone the strip wraps under the player's facts. Where the strip fits
   beside the name (from 900px, or from 1160px for .st--long, more than six rounds) the cells sit in one row under
   the legend's round names, and between those widths a long strip takes its own line in each card: either way the
   strips start at the same place, so a round reads down the list. */
.st-no { font: 400 14px/1.2 var(--mono); color: var(--muted); white-space: nowrap; }
.st-top .dcard-rank, .st-top .st-pts { color: var(--accent-text); }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px 4px; margin: 0; padding: 0; list-style: none; }
.st-cell { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; width: 34px; }
.st-rd { max-width: 100%; margin-bottom: auto; font: 700 11px/1 var(--sans); text-align: center; white-space: normal; overflow-wrap: anywhere; letter-spacing: .04em; color: var(--muted); }
.st-chip { flex-direction: column; align-items: center; gap: 2px; }
.st-chip i { font: 400 12px/1 var(--mono); font-style: normal; color: var(--muted); }  /* "125w" fits its 34px cell */
.xt-game i { font: 400 13px/1 var(--mono); font-style: normal; color: var(--muted); }
.st-cell .score, .xt-cell .score { width: 22px; height: 22px; font-size: 14px; }
a.st-chip:hover i, a.xt-game:hover i { color: var(--text); }
/* A round with several games for the player: their number over the word, a link to the round where it has a page. */
.st-multi { display: grid; justify-items: center; gap: 1px; font: 500 11px/1.1 var(--sans); color: var(--muted); white-space: nowrap; }
.st-multi b { font: 700 14px/1 var(--mono); color: var(--text); }
a.st-multi { padding-block: 2px; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.st-legend-rounds { flex-wrap: nowrap; }
.st-legend-rounds > span { flex: none; width: 34px; text-align: center; }
@media (pointer: coarse) { .st-chip, .xt-game { min-height: 40px; } }
@media (max-width: 899px) {
  /* Rank, name and points; then No., federation, rating, + = − and games side by side, each under its label (they
     take the free cells of the second row in order, so a list without federations leaves no gap); then the chips. */
  .st-card { grid-template-columns: auto auto auto auto minmax(0, 1fr) auto; grid-template-areas: "rank main main main main key" ". . . . . ." "rounds rounds rounds rounds rounds rounds"; gap: 8px 14px; }
  .st-card > .dcard-rank { grid-area: rank; } .st-card > .dcard-main { grid-area: main; } .st-card > .st-pts { grid-area: key; }
  .st-card > .dc-facts { display: contents; }
  .st-card .dc-f, .st-card > .st-no { align-self: start; white-space: nowrap; }
  .st-rounds { grid-area: rounds; }
  .st-rounds > dt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .st-rounds > dd { margin: 0; }
  .st-card > .st-no { display: grid; gap: 2px; font-size: 15px; font-weight: 600; color: var(--text); }
  .st-card .st-lab { font: 700 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .xt-card { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "no main key" "cells cells cells"; gap: 8px 12px; }
  .xt-card > .st-no { grid-area: no; } .xt-card > .dcard-main { grid-area: main; } .xt-card > .st-pts { grid-area: key; } .xt-card > .xt-cells { grid-area: cells; }
}
@media (min-width: 900px) {
  /* Rk No. Player [Fed] Rtg [rounds] + = − G Pts: every track but the name is as wide as its content. */
  .dcards--standings { --dc-cols: auto auto minmax(0, 1fr) auto auto auto auto auto auto; }
  .dcards--standings.st--nofed, .dcards--standings.st--norounds { --dc-cols: auto auto minmax(0, 1fr) auto auto auto auto auto; }
  .dcards--standings.st--nofed.st--norounds { --dc-cols: auto auto minmax(0, 1fr) auto auto auto auto; }
  .st-no { text-align: right; }
  .dcards--standings:not(.st--long) .st-chips { flex-wrap: nowrap; }
  .dcards--standings:not(.st--long) .st-rd { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (min-width: 900px) and (max-width: 1159px) {
  /* A long strip on its own line of the card. It keeps its place in the page's order (after the rating) and is drawn last. */
  .dcards--standings.st--long { --dc-cols: auto auto minmax(0, 1fr) auto auto auto auto auto; }
  .dcards--standings.st--long.st--nofed { --dc-cols: auto auto minmax(0, 1fr) auto auto auto auto; }
  .st--long .st-legend-rounds { display: none; }
  .st--long .st-rounds { order: 1; grid-column: 1 / -1; }
}
@media (min-width: 1160px) {
  .st--long .st-chips { flex-wrap: nowrap; }
  .st--long .st-rd { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* Crosstable (fields of 16 or fewer): a card per player with a cell per opponent, in the standings order. On a phone
   the cells wrap, each under its opponent's No. and surname, and pairings with no covered game are left out. From
   900px the cells are equal columns under the legend's numbers, with hairlines between them, so the matrix reads
   down as well as across: cell i is opponent i, and a player's own cell is a blank block. */
.ev-xt { margin-top: 36px; }
.xt-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.xt-cell { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.xt-self, .xt-cell--none { display: none; }
.xt-opp { display: flex; align-items: baseline; gap: 5px; min-width: 0; font-size: 13px; line-height: 1.2; color: var(--text-2); }
.xt-opp b { font: 600 13px/1 var(--mono); color: var(--muted); }
.xt-opp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xt-games { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.xt-game { display: inline-flex; align-items: center; gap: 2px; border-radius: 6px; }
.xt-game i { min-width: 1.2ch; text-align: right; }
/* A pairing of more than four games (a knockout match) is one score, points out of finished games: a link to its
   round where that round can be opened. */
.xt-match { display: inline-flex; align-items: baseline; gap: 1px; font: 600 14px/1.1 var(--sans); }
a.xt-match { padding-block: 4px; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.xt-match i { font: 400 14px/1 var(--mono); font-style: normal; color: var(--muted); }
@media (pointer: coarse) { .xt-match { min-height: 40px; align-items: center; } }
@media (min-width: 900px) {
  .dcards--xt { --dc-cols: auto minmax(0, 1fr) minmax(0, 3.4fr) auto; }
  .xt-cells { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; align-self: stretch; }
  .xt-cell, .xt-cell--none { display: flex; align-items: center; padding: 0 2px 0 5px; border: 0; border-left: 1px solid var(--line); border-radius: 0; min-height: 37px; }
  .xt-self { display: block; background: var(--surface-2); border-left: 1px solid var(--line); }
  .xt-opp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .xt-games { gap: 4px; }
  .xt-game { flex-direction: column; }
  .xt-game i { min-width: 0; text-align: center; }
  .dcards-legend > .xt-cells > .xt-col { padding-left: 6px; }
}

/* Standings race */
.ev-race-stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.ev-race-stepper[hidden], .ev-road-sort[hidden] { display: none; }
.ev-race-stepper .btn[aria-disabled="true"] { opacity: .35; cursor: default; transform: none; }
.ev-race-play { min-width: 78px; }
.ev-race-range { flex: 1 1 160px; min-width: 120px; height: 34px; accent-color: var(--accent); }
.ev-race-at { min-width: 4ch; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.ev-race { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ev-race-chart { margin: 0; min-width: 0; }
.ev-race-body { padding: 12px 8px 4px; }
.rc-svg { display: block; width: 100%; height: auto; }
.rc-svg--narrow { display: none; }
.rc-grid { stroke: var(--line); stroke-width: 1; }
.rc-band { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.rc-ylabel, .rc-xlabel { font: 400 12px var(--mono); fill: var(--muted); }
.rc-xlabel.is-on { font-weight: 600; fill: var(--text); }
.rc-sel { fill: var(--accent-wash); }
.rc-line { fill: none; stroke: var(--text-2); stroke-opacity: .55; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.rc-p circle { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.5; }
.rc-tie { fill: none; stroke: var(--line-2); stroke-width: 1; }
.rc-name { font: 550 12px var(--sans); fill: var(--text-2); }
.rc-p--lead .rc-line { stroke: var(--accent-text); stroke-opacity: 1; stroke-width: 3; }
.rc-p--lead circle { stroke: var(--accent-text); }
.rc-p--lead .rc-name { font-weight: 700; fill: var(--text); }
.rc-p:hover .rc-line { stroke: var(--text); stroke-opacity: 1; }
.rc-p:hover .rc-name { fill: var(--text); }
.ev-race-after { min-width: 0; }
.ev-race-title { margin-bottom: 10px; }
.ev-race-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px 40px; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; }
.ev-race-row + .ev-race-row { border-top: 1px solid var(--line); }
.ev-race-rank { font: 600 14px/1 var(--mono); color: var(--muted); }
.ev-race-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-race-name a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ev-race-pts { font: 800 semi-condensed 22px/1.1 var(--display); text-align: right; }
.rc-move { font: 600 14px/1 var(--mono); color: var(--muted); text-align: right; }
.rc-move--up { color: var(--text); }
.ev-race-more { margin-top: 8px; }
.ev-race-more:empty { display: none; }
@media (max-width: 980px) { .ev-race { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .rc-svg--wide { display: none; } .rc-svg--narrow { display: block; } }
@media (pointer: coarse) { .ev-race-range { height: 40px; } }

/* Hardest road: a card per player. events.js reorders the cards and marks the active order (.is-sorted on the
   legend label and on that fact in every card); an arrow says so as well as the weight. */
.ev-road-sort { margin-bottom: 14px; }
.ev-road-sort .tab { font-size: 14px; cursor: pointer; }
.ev-road-sort .tab[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.road-card .dc-f dd { color: var(--text-2); white-space: nowrap; }
.road-card .dc-f.is-sorted dd { color: var(--text); font-weight: 700; }
.road-card small { font-size: 13px; font-weight: 400; color: var(--muted); }
.road-card .dc-f dd.up { color: var(--up); } .road-card .dc-f dd.dn { color: var(--down); }
.dcards--road .dcards-legend .is-sorted { color: var(--text); }
.dcards--road .dcards-legend .is-sorted::after, .road-card .is-sorted dt::after { content: " ↓"; }
/* Players with too few rated games follow the rest, under a rule. */
.road-card.road-few:not(:first-child) { margin-top: 12px; }
.road-card.road-few:not(:first-child)::before { content: ""; position: absolute; inset: -12.5px 0 auto; border-top: 2px solid var(--line-2); }
@media (max-width: 899px) {
  .road-card { grid-template-columns: minmax(0, 1fr); }
  .road-card .is-sorted dt { color: var(--text); }
}
@media (min-width: 900px) { .dcards--road { --dc-cols: minmax(0, 1fr) 56px 96px 108px 60px 64px 124px; } }

/* ── Live and today ────────────────────────────────────────────────────── */
/* Each event previews its strongest boards in at most two rows; on smaller screens the cards scroll in one row. */
.tabs--sticky:has(+ .lv-dr-stage) { border-bottom: 0; }
.lv-anchor { scroll-margin-top: 52px; }
.lv-evs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px clamp(12px, 1.15vw, 20px); align-items: start; }
.lv-ev { min-width: 0; }
/* An event's block and its cards carry the tournament's colour: a band beside the name, a band on each card. */
.lv-ev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 12px; padding-left: 12px; border-left: 8px solid var(--ev); }
.lv-ev-name { font: 800 semi-condensed clamp(22px, 2.2vw, 28px)/1.08 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.lv-ev-name a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lv-ev-head .sch-timing { flex-basis: 100%; }
.lv-ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.lv-grid { display: grid; row-gap: clamp(12px, 1.15vw, 20px); }
/* All event groups share the wall's columns, including side-by-side single-board events. */
@media (width > 900px) {
  .lv-evs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lv-ev, .lv-grid { display: grid; grid-template-columns: subgrid; }
  .lv-ev-head, .lv-grid { grid-column: 1 / -1; }
  .lv-ev--pair { grid-column: span 2; }
  .lv-ev--wide { grid-column: 1 / -1; }
}
/* The live page spans the window (body.wide-page): a fourth column keeps boards near their 1,320px size instead of growing. */
@media (width > 1700px) { .wide-page .lv-evs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .lv-evs { gap: 26px; }
  .lv-grid { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(90%, 340px); gap: 12px; margin-inline: calc(-1 * var(--gutter)); padding: 5px var(--gutter) 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .lv-grid::-webkit-scrollbar { display: none; }
  .lv-grid > .lb { scroll-snap-align: start; }
}
.lb { --player-row: max(20px, 1.25em); --status-row: 24px; --row-gap: 5px;
  /* The two player lines, status, gaps and extra top border share a square tile with the square position. */
  --square-tile-board: calc(100% - 2 * var(--player-row) - var(--status-row) - 3 * var(--row-gap) - 4px);
  /* On narrow cards, leave enough room for the name, rating and clock. The 13px side gutter fits the meter. */
  --position-width: max(min(100% - 26px, 232px), var(--square-tile-board));
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--player-row) auto var(--player-row) minmax(var(--status-row), auto);
  justify-items: center; align-content: center; aspect-ratio: 1; align-self: start; row-gap: var(--row-gap); padding: 10px;
  font-size: clamp(15px, 1.2vw, 18px); 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; }
a.lb:hover { border-color: var(--text); border-top-color: var(--ev); box-shadow: 3px 3px 0 var(--text); transform: translate(-2px, -2px); }
.lb--plain { --position-width: 100%; aspect-ratio: auto; grid-template-rows: auto; justify-items: start; }
/* A delayed board is dashed and washed out; its pill and held clocks say the rest. */
.lb--stale { border-style: dashed; } .lb--stale .chessboard { filter: saturate(.55); }
.lb-side { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: var(--position-width); min-width: 0; line-height: 1.25; }
.lb-side .plink { align-items: center; gap: 5px; }
.lb-side .elo { flex: none; }
.lb-side .clock { flex: none; min-width: 0; height: 20px; font-size: 14px; }
.lb .fed { padding: 0; border: 0; } .lb .fed-code, .no-flags .lb .fed, .lb .fed--noflag { display: none; }
/* Keep the evaluation meter outside the player rows' shared board edges. */
.lb-board.board-with-eval { position: relative; display: block; width: var(--position-width); }
.lb-board .board { max-width: none; }
.lb-board .eval-bar { position: absolute; inset: 0 calc(100% + 5px) 0 auto; width: 8px; padding-bottom: 0; } .lb-board .eval-meter { width: 100%; min-height: 0; border-radius: 3px; border-color: var(--text-2); } .lb-board .eval-value { display: none; }
.lb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; justify-self: stretch; }
.lb-foot .meta { font-size: 14px; line-height: 1; white-space: nowrap; }
/* A closed <details> that holds the rest of a capped list: the same pill as the tournament page's .ev-more-toggle. */
.lv-more { margin-top: 14px; }
.lv-more--before { margin: 0 0 14px; }
.lv-more > summary { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 40px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer; list-style: none; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.lv-more > summary::-webkit-details-marker { display: none; }
.lv-more > summary::after { content: "↓"; }
.lv-more[open] > summary::after { content: "↑"; }
.lv-more > summary:hover { border-color: var(--text); }
.lv-more[open] > summary { margin-bottom: 14px; }
.lv-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: clamp(44px, 6.5vw, 84px) clamp(24px, 3vw, 44px); align-items: start; }
.lv-today .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.tl-item, .tl-now { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.tl-time { font-size: 14px; font-weight: 600; }
.tl-item.is-past .tl-time { color: var(--muted); font-weight: 400; }
.tl-event { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.tl-body .meta { display: block; margin-top: 4px; }
a.tl-event:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tl-now { padding: 10px; margin: 4px 0; border-top: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.tl-now + .tl-item { border-top: 0; }
.tl-now-label { grid-column: 2 / -1; font: 700 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.lv-note { margin-top: 12px; }
.lv-coming { margin-top: 36px; }
.lv-coming-row { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 620px) { .tl-item { grid-template-columns: 44px minmax(0, 1fr); } .tl-item > .pill { grid-column: 2; justify-self: start; } .lv-coming-row { grid-template-columns: minmax(0, 1fr) auto; } .lv-coming-when { grid-column: 1 / -1; } }
.lv-coming .kicker { margin-bottom: 10px; }
.lv-coming-when { font-size: 14px; color: var(--muted); }
.lv-coming-name { font-weight: 550; }
a.lv-coming-name:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.round-tabs-track { position: relative; }

/* === drama-radar === */
/* A stage (always night) holding the ranked boards. The lead board sits at the centre of a radar scope: rings and a
   sweep drawn by .lv-dr-scope, which lies under the content and outside the live region so the sweep never restarts.
   The scope repeats the lead card's own box (.lv-dr-boardbox under a head of fixed height), so the two line up at
   every width. */
.lv-dr-stage { --dr-pad: clamp(14px, 2.4vw, 32px); --dr-head: 80px; --dr-board: clamp(280px, min(44vw, 68svh), 720px); --dr-gap: clamp(18px, 3vw, 56px); --dr-thumb: clamp(84px, 7.6vw, 126px); padding: var(--dr-pad); margin-bottom: clamp(8px, 2vw, 24px); }
.lv-dr-stage:not(:has(.lv-dr)) { display: none; }
/* Without :has() the stage cannot tell whether it is empty: the section carries the panel, without the scope. */
@supports not selector(:has(a)) { .lv-dr-stage { padding: 0; border: 0; background: none; } .lv-dr-stage::before, .lv-dr-scope { display: none; } .lv-dr { padding: var(--dr-pad); border-radius: calc(var(--r) + 6px); background: #0B0B0C; } }
.lv-dr-scope { position: absolute; inset: 0; z-index: -1; padding: calc(var(--dr-pad) + var(--dr-head)) var(--dr-pad) 0; pointer-events: none; }
.lv-dr-boardbox { width: calc(52px + var(--dr-board)); max-width: 100%; }
.lv-dr-eye { position: relative; display: block; margin-left: 52px; aspect-ratio: 1; }
.lv-dr-eye::before, .lv-dr-eye::after { content: ""; position: absolute; inset: -55%; border-radius: 50%; -webkit-mask-image: radial-gradient(circle closest-side, #000 35%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 35%, transparent 100%); }
.lv-dr-eye::before { background: repeating-radial-gradient(circle closest-side, transparent 0 calc(9.09% - 1px), rgba(212, 255, 58, .16) calc(9.09% - 1px) 9.09%); }
.lv-dr-eye::after { background: conic-gradient(rgba(212, 255, 58, 0) 0 76%, rgba(212, 255, 58, .26) 100%); animation: lv-dr-sweep 7s linear infinite; }
@keyframes lv-dr-sweep { to { transform: rotate(1turn); } }
/* Nothing live is being ranked (delayed feeds only): the scope stands still. */
.lv-dr-stage:has(.lv-dr--delayed) .lv-dr-eye::after { display: none; }
@media (prefers-reduced-motion: reduce) { .lv-dr-eye::after { display: none; } }
.motion-paused .lv-dr-eye::after { display: none; }
/* With no board to show, the scope is a dial at the stage's right edge. */
.lv-dr-stage:not(:has(.lv-dr-card--lead)) .lv-dr-scope { padding: 0; }
.lv-dr-stage:not(:has(.lv-dr-card--lead)) .lv-dr-boardbox { position: absolute; top: 50%; right: clamp(-90px, 6vw - 90px, 40px); width: 150px; transform: translateY(-50%); }
.lv-dr-stage:not(:has(.lv-dr-card--lead)) .lv-dr-eye { margin-left: 0; }

.lv-dr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; min-height: var(--dr-head); }
.lv-dr-title { font: 800 semi-condensed clamp(30px, 3vw, 48px)/1.1 var(--display); letter-spacing: -.025em; white-space: nowrap; }
.lv-dr-title em { color: var(--accent-text); }
.lv-dr-stats { display: flex; flex-wrap: wrap; gap: 8px clamp(12px, 2vw, 30px); }
.lv-dr-stats li { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line-2); padding-left: clamp(10px, 1.5vw, 20px); font: 700 12px/1.25 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.lv-dr-stats strong { color: var(--text); font: 800 condensed clamp(28px, 3vw, 46px)/1 var(--display); }
.lv-dr-stats li:first-child strong { color: var(--volt); }
.lv-dr--delayed .lv-dr-stats strong { color: var(--text-2); }

.lv-dr-card { min-width: 0; }
.lv-dr-card--lead { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; grid-template-areas: "board body" "board why"; gap: 22px var(--dr-gap); }
.lv-dr-card--lead .lv-dr-boardbox { grid-area: board; }
.lv-dr-board .board { max-width: none; }
.lv-dr-board .chessboard { box-shadow: 0 0 0 1px rgba(212, 255, 58, .5), 0 0 70px -8px rgba(212, 255, 58, .28), var(--shadow); }
.lv-dr-body { display: flex; flex-direction: column; }
.lv-dr-card--lead .lv-dr-body { grid-area: body; justify-content: center; gap: clamp(12px, 1.5vw, 24px); }
.lv-dr-rank { display: flex; align-items: center; gap: 10px; font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lv-dr-no { color: var(--accent-text); }
.lv-dr-hl { font: 800 semi-condensed clamp(30px, 3.8vw, 64px)/1.02 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.lv-dr-hl em, .lv-dr-accent { color: var(--accent-text); }
.lv-dr-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 14px; color: var(--text-2); }
.lv-dr-meta .mono { font-size: 14px; color: var(--muted); white-space: nowrap; }
.lv-dr-event { font-weight: 600; }
a.lv-dr-event:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.lv-dr-sides { border-block: 1px solid var(--line-2); }
.lv-dr-side { display: flex; align-items: center; gap: 10px; padding: 12px 0; min-width: 0; font-size: clamp(16px, 1.4vw, 22px); }
.lv-dr-side + .lv-dr-side { border-top: 1px solid var(--line); }
.lv-dr-player { flex: 1; line-height: 1.25; }
.lv-dr-identity { display: flex; align-items: baseline; gap: 6px; }
.lv-dr-identity .plink-name { white-space: normal; overflow-wrap: anywhere; }
.lv-dr-side .clock { flex: none; min-width: 80px; height: 38px; font-size: 17px; }
/* The clock the board is ranked on. Its side is named in the reason beneath, so colour is not the only signal. */
.lv-dr-side .clock.is-low:not(.clock--held) { border-color: var(--accent); color: var(--accent-text); animation: lv-dr-low 1.6s ease-out infinite; }
.lv-dr-side .clock.is-low.is-turn:not(.clock--held) { color: var(--on-accent); }
@keyframes lv-dr-low { 0% { box-shadow: 0 0 0 0 rgba(212, 255, 58, .55); } 100% { box-shadow: 0 0 0 10px rgba(212, 255, 58, 0); } }
.lv-dr-follow { align-self: flex-start; }
.lv-dr-why { grid-area: why; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.lv-dr-factor { display: grid; grid-template-rows: auto 1fr auto; align-content: start; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.lv-dr-tag { font: 700 12px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.lv-dr-meter { width: 100%; height: 6px; border-radius: 2px; overflow: hidden; }
.lv-dr-meter-all { fill: var(--line-2); }
.lv-dr-meter-on { fill: var(--accent); }
.lv-dr-clock { font: 600 .93em/1 var(--mono); color: var(--text); }

.lv-dr-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 10px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.lv-dr-controls { display: flex; gap: 8px; }
.lv-dr-controls button[aria-disabled="true"] { opacity: .5; }
.lv-dr-rail { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: min(90%, clamp(330px, 31vw, 480px)); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 3px 0 8px; scrollbar-color: var(--muted) var(--ink); }
.lv-dr-card--next { display: grid; grid-template-columns: var(--dr-thumb) minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); scroll-snap-align: start; }
.lv-dr-thumb .board { max-width: none; }
.lv-dr-card--next .lv-dr-body { gap: 5px; }
.lv-dr-card--next .lv-dr-rank { flex-wrap: wrap; gap: 5px 8px; }
.lv-dr-card--next .lv-dr-rank .go { margin-left: auto; }
.lv-dr-card--next:hover .go { background: var(--accent); color: var(--on-accent); }
.lv-dr-card--next .lv-dr-hl { font-size: 23px; line-height: 1.05; letter-spacing: -.01em; }
.lv-dr-versus { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; font-size: 14px; }
.lv-dr-vs-side { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.lv-dr-v { margin-right: 1px; font: 400 14px/1 var(--mono); color: var(--muted); }
.lv-dr-bits { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--text-2); }
.lv-dr-how { max-width: 96ch; margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.lv-dr-hl--quiet { max-width: calc(100% - 150px); font-size: clamp(26px, 2.8vw, 32px); }
.lv-dr-hl--quiet + .lv-dr-how { max-width: min(72ch, 100% - 150px); margin-top: 10px; font-size: 14px; color: var(--text-2); }

@media (max-width: 790px) {
  .lv-dr-stage { --dr-thumb: 80px; --dr-head: 110px; }
  .lv-dr-head { flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; }
  .lv-dr-stats li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .lv-dr-stats li:first-child { border: 0; padding-left: 0; }
  .lv-dr-boardbox { width: 100%; }
  .lv-dr-card--lead { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "board" "body" "why"; }
  .lv-dr-rail { grid-auto-columns: min(92%, 420px); }
  .lv-dr-card--next { padding: 10px; gap: 10px; }
  .lv-dr-hl--quiet, .lv-dr-hl--quiet + .lv-dr-how { max-width: none; }
  .lv-dr-stage:not(:has(.lv-dr-card--lead)) .lv-dr-boardbox { top: 0; right: -60px; transform: translateY(-45%); }
}
@media (max-width: 520px) {
  .lv-dr-eye { margin-left: 16px; }
  .lv-dr-board { grid-template-columns: 10px minmax(0, 1fr); gap: 6px; }
  .lv-dr-board .eval-bar { padding-bottom: 0; }
  .lv-dr-board .eval-meter { width: 100%; }
  .lv-dr-board .eval-value { left: 0; top: calc(100% + 2px); bottom: auto; transform: none; }
  .lv-dr-card--lead { row-gap: 26px; }
}
/* === end drama-radar === */
