/* Players area: player profile, directory, FIDE ratings, head to head. Built from site.css tokens. */
:root { --series-rapid: #4AA3F0; --series-blitz: #F08A4B; }

/* ── Card lists ────────────────────────────────────────────────────────── */
/* Every list of records in this area is built on the data cards of site.css (.dcards). A list sets its column
   tracks for wide screens in --dc-cols (the first and last track also hold the card's 15.5px of border and
   padding) and, where the default phone card (rank | name | key, then facts) does not fit, its own phone layout
   under 900px. .pl-lbl is a label printed inside a card on a phone: from 900px the legend
   row names the column, and only screen readers read it. .pl-pre is a short prefix printed on a phone only. */
.dcards .pl-lbl { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dcard a:not(.plink):not(.row-go):hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .dcards--rows .pl-lbl { 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 .pl-pre { display: none; }
}

/* ── Player profile ────────────────────────────────────────────────────── */
.player-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(24px, 4vw, 64px); align-items: start; }
.player-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-bottom: 18px; font-size: 14px; color: var(--text-2); }
.player-fideid:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
/* The whole name carries the highlight (volt type at night, a volt underline by day), not the surname alone. */
.player-hero .pname { color: var(--accent-text); padding-bottom: .1em; line-height: 1; overflow-wrap: anywhere; }
.player-hero .pname-given, .player-hero .pname-surname { display: inline; }
:root[data-theme="light"] .player-hero .pname { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .09em; text-underline-offset: .08em; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .player-hero .pname { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .09em; text-underline-offset: .08em; } }
.player-sub { margin-top: 14px; font-size: 16px; line-height: 1.4; color: var(--text-2); }
.player-summary { margin-top: 22px; }
.player-sub + .player-summary { margin-top: 10px; }
.player-latest { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; max-width: 70ch; font-size: 14px; color: var(--text-2); }
.player-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
/* The covered-games count where the page has no Games list to jump to: a figure in the row, not a button. */
.player-covered { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: 14px; color: var(--text-2); }
.player-rankcard { padding: clamp(20px, 2.6vw, 30px); }
.rankcard-list { margin-top: 10px; }
.rankcard-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 6px 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.rankcard-row:first-child { border-top: 0; }
.rankcard-rank { font: 800 semi-condensed 44px/1.1 var(--display); color: var(--accent-text); min-width: 1.6ch; }
.rankcard-no { font: 700 14px/1 var(--sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; vertical-align: 30px; }
.rankcard-mode { display: grid; gap: 4px; font-weight: 600; font-size: 16px; }
.rankcard-rating { font: 800 semi-condensed 36px/1.1 var(--display); }
.rankcard-bar { grid-column: 1 / -1; width: 100%; height: 3px; }
.rankcard-bar rect { fill: var(--line); } .rankcard-bar .fill { fill: var(--accent); }
.rankcard-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.rankcard-score { display: grid; gap: 8px; margin-top: 16px; }
.rankcard-big { font: 800 semi-condensed 42px/1.1 var(--display); color: var(--accent-text); letter-spacing: -.02em; }
.rankcard-of { font-size: .45em; color: var(--muted); }
.rankcard-cap { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.rankcard-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.rankcard-facts dt { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rankcard-facts dd { margin-top: 5px; font: 800 semi-condensed 26px/1.1 var(--display); }
@media (max-width: 1080px) { .player-hero { grid-template-columns: minmax(0, 1fr); align-items: start; } }
.player-tiles { margin-top: clamp(24px, 3.4vw, 40px); }
.player-page .tabs--sticky { margin-inline: 0; padding-inline: 0; }
.player-tile--empty .stat-value { color: var(--muted); }
.player-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; margin-top: 20px; align-items: center; }
.player-form > div:first-child { display: grid; gap: 10px; }
.player-colours { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.player-colours dt { display: flex; align-items: center; gap: 7px; font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.player-colours dd { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 15px; }
.player-colourbar { flex: 1; height: 6px; border-radius: 3px; }
.player-colourbar rect { fill: var(--line); } .player-colourbar .fill { fill: var(--text-2); }
@media (max-width: 760px) { .player-form { grid-template-columns: minmax(0, 1fr); } }

.player-rating { display: grid; gap: 16px; }
.player-rating--both { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .player-rating--both { grid-template-columns: minmax(0, 1fr); } }
.pchart-head { flex-wrap: wrap; align-items: center; }
.pchart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pc-key::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: 3px; background: var(--accent-text); }
.pc-key--rapid::before { background: var(--series-rapid); } .pc-key--blitz::before { background: var(--series-blitz); }
.pc-key-mark::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: var(--text-2); }
.pc-key-mark--game::before { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-2); }
.pchart-main { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.pchart-readout { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-right: 1px solid var(--line); }
.pchart-now { font: 800 semi-condensed 42px/1.1 var(--display); }
.pchart-facts { display: grid; gap: 10px; margin-top: auto; padding-top: 14px; }
.pchart-facts dt { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pchart-facts dd { font: 800 semi-condensed 22px/1.1 var(--display); }
.pchart-body { padding: 12px 12px 6px; min-width: 0; }
.pchart-svg { width: 100%; height: auto; }
.pchart-svg--narrow, .pstrip-svg--narrow { display: none; }
.pc-grid { stroke: var(--line); stroke-width: 1; } .pc-axis { stroke: var(--line-2); stroke-width: 1; }
.pc-ylabel, .pc-xlabel, .ps-axis { font: 400 12px var(--mono); fill: var(--muted); }
.pc-area { fill: var(--accent-wash); }
.pc-line { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pc-line--rapid { stroke: var(--series-rapid); } .pc-line--blitz { stroke: var(--series-blitz); }
.pc-fide { fill: var(--accent-text); } .pc-fide--rapid { fill: var(--series-rapid); } .pc-fide--blitz { fill: var(--series-blitz); }
.pc-game { fill: var(--surface); stroke: var(--accent-text); stroke-width: 2; }
.pc-game--rapid { stroke: var(--series-rapid); } .pc-game--blitz { stroke: var(--series-blitz); }
.pc-last, .ps-label { font: 600 12px var(--mono); fill: var(--text); }
.pchart-data { border-top: 1px solid var(--line); }
.pchart-data summary { padding: 12px 18px; cursor: pointer; font: 700 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
/* Chart data: one compact card per point, oldest first, scrolling inside the chart's card. */
.pchart-points { position: relative; max-height: 300px; overflow: auto; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.ptc-date { font-size: 14px; font-weight: 400; }
.ptc dd { font-size: 14px; }
.ptc-ctl dd, .ptc-src dd { font-weight: 400; color: var(--text-2); }
@media (max-width: 899.98px) {
  .ptc { grid-template-areas: "date ctl rating" "src src src"; gap: 2px 10px; padding: 8px 12px; }
  .ptc > .dc-facts { display: contents; }
  .ptc dt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .ptc dd { margin: 0; }
  .ptc-date { grid-area: date; } .ptc-ctl { grid-area: ctl; } .ptc-rating { grid-area: rating; } .ptc-src { grid-area: src; }
}
@media (min-width: 900px) {
  .dcards--points { --dc-cols: 120px 84px 52px minmax(0, 1fr); }
  .dcards--points > .dcards-list > .dcard { padding-block: 5px; }
}
.pstrip { padding: 14px 18px 10px; }
.pstrip-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 4px; }
.pstrip-svg { width: 100%; height: auto; }
.ps-base { stroke: var(--line-2); stroke-width: 1; } .ps-tick { stroke: var(--muted); stroke-width: 1; opacity: .55; }
.ps-mark { stroke: var(--accent-text); stroke-width: 2; } .ps-dot { fill: var(--accent); stroke: var(--on-accent); stroke-width: 1.5; }
@media (max-width: 720px) {
  .pchart-main { grid-template-columns: minmax(0, 1fr); } .pchart-readout { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; } .pchart-facts { display: none; }
  .pchart-svg--wide, .pstrip-svg--wide { display: none; } .pchart-svg--narrow, .pstrip-svg--narrow { display: block; }
}
.ptour { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; }
.ptour:hover { background: var(--surface-2); }
.ptour--plain:hover { background: none; } /* a tournament without a page: the card is not a link */
.ptour-name { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptour-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.ptour-chips .score { width: 20px; height: 20px; font-size: 14px; border-radius: 5px; }
.ptour-points, .popp-rec { font: 800 semi-condensed 30px/1.1 var(--display); white-space: nowrap; }
.ptour-of { font-size: .55em; color: var(--muted); }
.popp { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 18px; }
.popp-who { display: flex; align-items: baseline; gap: 10px; }
.popp-rec { font-size: 24px; }
/* Holds the H2H button's column in a row without one, so the scores of a list line up. */
.popp-gap { visibility: hidden; }
/* Games lists. The profile's card: the player's colour, the opponent and their rating, the score, then event,
   round and date. The head-to-head card: date, the first player's colour, the score, event and both ratings. */
.pgc-col, .hgc-col, .pgc-score, .hgc-score { display: inline-flex; align-items: center; }
.pgc-opp, .hgc-ev { flex-wrap: nowrap; }
.pgc-elo { font-size: 14px; color: var(--muted); text-align: right; }
/* The event and its round share a line and both give way: a long round name never pushes the event out. */
.hgc-ev { font-size: 15px; }
.hgc-ev .truncate { flex: 0 1 auto; min-width: 0; }
.hgc-ev .truncate a, .pgc-opp .truncate a { display: inline-block; max-width: 100%; padding-block: 3px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.hgc-ev .sub { flex: 0 1 auto; min-width: 3ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--muted); }
.hgc-date, .hgc-elo { font-size: 14px; color: var(--muted); white-space: nowrap; }
@media (max-width: 899.98px) {
  .pgc { grid-template-columns: auto minmax(0, 1fr) auto auto auto; grid-template-areas: "col opp elo score go" "meta meta meta meta meta"; gap: 6px 10px; }
  .pgc-col { grid-area: col; } .pgc-opp { grid-area: opp; } .pgc-elo { grid-area: elo; } .pgc-score { grid-area: score; } .pgc > .row-go { grid-area: go; }
  .pgc-meta { grid-area: 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); }
  .pgc-ev { flex: 1; min-width: 0; } .pgc-rd { order: -1; white-space: nowrap; } .pgc-rd--none { display: none; } .pgc-date { white-space: nowrap; }
  /* Second line: the date from the left and the ratings from the right. Both span the flexible column, so neither
     widens the narrow columns of the first line. */
  .hgc { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px 10px; }
  .hgc-col { grid-area: 1 / 1; } .hgc-score { grid-area: 1 / 2; } .hgc-ev { grid-area: 1 / 3; flex-wrap: wrap; row-gap: 0; } .hgc > .row-go { grid-area: 1 / 4; }
  .hgc-date { grid-area: 2 / 1 / auto / 4; } .hgc-elo { grid-area: 2 / 3 / auto / -1; justify-self: end; }
  .hgc-ev .truncate, .hgc-ev .sub { max-width: 100%; }
}
@media (min-width: 900px) {
  .dcards--player-games { --dc-cols: 28px minmax(0, 2fr) 72px minmax(56px, max-content) minmax(0, 1.5fr) minmax(44px, max-content) 96px 46px; }
  .pgc-meta { display: contents; }
  .pgc-ev, .pgc-rd, .pgc-date { font-size: 14px; color: var(--muted); }
  .dcards--h2h-games { --dc-cols: 116px 14px minmax(56px, max-content) minmax(0, 1fr) 124px 46px; }
  .dcards--h2h-games:not(:has(.row-go)) { --dc-cols: 116px 14px minmax(56px, max-content) minmax(0, 1fr) 140px; }
  .hgc-elo { text-align: right; }
  .hgc-ev .sub::before { content: "· "; }
  /* A card without a game page has no arrow: it stays as tall as one that has. */
  .dcards--h2h-games > .dcards-list > .dcard, .dcards--ledger-games > .dcards-list > .dcard { min-height: 51px; }
}
/* A capped list's remainder, opened without script. */
.list-more { margin-top: 12px; }
.list-more summary { width: fit-content; padding: 10px 0; cursor: pointer; font: 700 14px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.list-more summary:hover { color: var(--accent-text); }
.list-more[open] summary { margin-bottom: 8px; }

/* ── Directory ─────────────────────────────────────────────────────────── */
.players-filter { max-width: 760px; }
.players-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin: 22px 0 14px; }
.players-count { font-size: 14px; color: var(--text-2); }
.players-count strong { font: 800 semi-condensed 26px/1.1 var(--display); color: var(--text); margin-right: 4px; }
.players-titles { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.players-titlecount { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.players-titles .tbadge { cursor: default; }
.players-country-head { grid-template-columns: minmax(0, 1fr); }
/* Federation totals and average ratings: one row of tiles on a shared grid, so labels, figures and notes line up. */
.players-country-summary .counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 0; align-items: start; }
.players-country-summary .counters .stat { height: 100%; }
.players-country-summary .counters .stat:first-child { padding-left: 0; border-left: 0; }
.players-country-summary .stat-label { white-space: normal; min-height: 1.3em; }
@media (max-width: 720px) { .players-country-summary .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); } .players-country-summary .counters .stat { padding-inline: 12px; } .players-country-summary .counters .stat:nth-child(3n + 1) { padding-left: 0; border-left: 0; } }
/* The sort control: one link per heading, the active one marked aria-current, its arrow showing the direction. On a
   phone it is a row of buttons above the cards; from 900px the links are the legend row, each over its column. */
.players-sort-label { font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.players-sort { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.players-sort-icon { font-size: 14px; letter-spacing: 0; }
@media (max-width: 899.98px) {
  .dcards-legend.players-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .players-sort-label { margin-right: 4px; }
  .players-sort { min-height: 36px; padding: 0 10px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font: 700 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
  .players-sort:hover { border-color: var(--text); }
  .players-sort[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
}
@media (max-width: 899.98px) and (pointer: coarse) { .players-sort { min-height: 40px; } }
@media (min-width: 900px) {
  .dcards--rows > .dcards-legend.players-sortbar { padding-bottom: 0; row-gap: 0; }
  .players-sort-label { grid-column: 1 / -1; }
  .players-sort { min-height: 38px; border-bottom: 3px solid transparent; }
  .players-sort.num:not(:first-of-type) { justify-content: flex-end; } /* the rank heads a left-aligned column */
  .players-sort:hover { color: var(--text); border-bottom-color: var(--line-2); }
  .players-sort[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
}
/* The directory card. Phone: the name with the classical rating beside it, the top-100 rank and federation under the
   name, then the other figures in one row. From 900px: one row of nine columns. */
.dcp-fed { display: flex; align-items: center; min-width: 0; }
@media (max-width: 899.98px) {
  .dcp { grid-template-areas: "main main key" "rank fed key" "facts facts facts"; gap: 3px 0; }
  .dcp > .dcard-main { grid-area: main; }
  .dcp-rank { grid-area: rank; min-width: 0; font: 700 13px/1.4 var(--sans); color: var(--text-2); white-space: nowrap; }
  .dcp-rank:not(:empty) { margin-right: 8px; }
  .dcp-fed { grid-area: fed; }
  .dcp > .dcard-key { grid-area: key; margin-left: 12px; }
  .dcp > .dc-facts { grid-area: facts; margin-top: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.7fr); gap: 8px 10px; }
  .dcp .dc-f dd { font-size: 14px; }
}
@media (max-width: 359.98px) { .dcp > .dc-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .dcards--players { --dc-cols: 56px minmax(0, 2.4fr) 76px minmax(76px, .9fr) repeat(2, minmax(60px, .8fr)) minmax(52px, .7fr) minmax(56px, .7fr) minmax(116px, 1.1fr); }
  .dcp-no { display: none; }
}
.players-results[aria-busy="true"] { opacity: .5; transition: opacity .15s ease; }
.players-note { margin-bottom: 8px; }
.players-points { white-space: nowrap; }
.players-of { margin-inline: 1px; color: var(--muted); }
/* A federation without a page of its own is a name and a count, with no answer to the pointer. */
span.taglink:hover { color: var(--text-2); border-color: var(--line); }
.players-foot { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }
.players-foot .section-link { margin: 0; }

/* ── Ratings ───────────────────────────────────────────────────────────── */
.podium { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.podium-step { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: clamp(18px, 2.4vw, 30px); border: 1.5px solid var(--edge); border-radius: var(--r); background: var(--card); min-width: 0; }
.podium-rank { font: 800 semi-condensed clamp(40px, 4vw, 56px)/1.1 var(--display); color: var(--muted); }
.podium-step--1 .podium-rank { font-size: clamp(48px, 6vw, 80px); color: var(--accent-text); }
.podium-name { display: block; font: 800 semi-condensed clamp(24px, 2.2vw, 30px)/1.1 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.podium-step--1 .podium-name { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
a.podium-name:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.podium-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.podium-figs { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.podium-rating { font: 800 semi-condensed clamp(30px, 3vw, 40px)/1.1 var(--display); }
.podium-step--1 { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: end; }
.podium-step--1 .podium-figs { grid-column: 1 / -1; }
.podium-step--1 .podium-rating { font-size: clamp(38px, 4vw, 52px); }
@media (max-width: 980px) { .podium { grid-template-columns: repeat(2, minmax(0, 1fr)); } .podium-step--1 { grid-column: 1 / -1; } }
@media (max-width: 560px) { .podium { grid-template-columns: minmax(0, 1fr); } .podium-step--1 { grid-template-columns: minmax(0, 1fr); } }
/* The official list: one ordered list of cards. Phone: rank, name and rating, the federation under the name, then
   change, birth year and covered games. From 900px: eight columns, with a bar for the rating against No. 1. */
.ratings-bar { display: block; width: 100%; height: 5px; border-radius: 3px; }
.ratings-bar rect { fill: var(--line); } .ratings-bar .fill { fill: var(--text-2); }
.dcard--top .ratings-bar .fill { fill: var(--accent); }
.rtc-fed { display: flex; align-items: center; min-width: 0; }
.rtc-bar { display: none; }
@media (max-width: 899.98px) {
  .rtc { grid-template-areas: "rank main key" "rank fed key" "facts facts facts"; row-gap: 3px; }
  .rtc > .dcard-rank { grid-area: rank; } .rtc > .dcard-main { grid-area: main; } .rtc-fed { grid-area: fed; } .rtc > .dcard-key { grid-area: key; }
  .rtc > .dc-facts { grid-area: facts; margin-top: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .dcards--ratings { --dc-cols: 60px minmax(0, 2.6fr) 84px 72px minmax(72px, 1.4fr) 72px 60px 78px; }
  .rtc-bar { display: block; }
}
/* The list opens on its first ranks: the cards marked .rt-folded stay hidden until the <details> after the list is
   opened. Where :has() is missing every card shows, and the control, which would do nothing, is left out. */
.rt-cap:not(:has(> .rt-more[open])) .rt-folded { display: none; }
@supports not selector(:has(*)) { .rt-cap > .rt-more { display: none; } }
/* The time-control switch sits in the page head; the sticky bar under it holds the page's sections. */
.ratings-modes { margin-top: 18px; }
.ratings-modes .tab { height: 34px; padding: 0 14px; font-size: 14px; }
.rt-anchor { scroll-margin-top: 52px; }
/* A closed <details> that holds the rest of a capped list: the same pill as the tournament page's .ev-more-toggle. */
.rt-more { margin-top: 14px; }
.rt-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; }
.rt-more > summary::-webkit-details-marker { display: none; }
.rt-more > summary::after { content: "↓"; }
.rt-more[open] > summary::after { content: "↑"; }
.rt-more > summary:hover { border-color: var(--text); }
.rt-more[open] > summary { margin-bottom: 14px; }
.rt-cap > .rt-more[open] > summary { margin-bottom: 0; }
.ratings-dist-row { display: grid; grid-template-columns: max-content minmax(0, 110px) minmax(0, 1fr) 28px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ratings-dist-row--decade { grid-template-columns: 52px minmax(0, 1fr) 28px; }
.ratings-dist-bar { width: 100%; height: 8px; }
.ratings-dist-bar .fill { fill: var(--text-2); }
.ratings-dist-row:first-child .ratings-dist-bar .fill { fill: var(--accent); stroke: var(--line-2); stroke-width: .3; }
.ratings-dist-n { font: 800 semi-condensed 22px/1.1 var(--display); text-align: right; }
.ratings-young { margin-top: 12px; }

/* ── Head to head ──────────────────────────────────────────────────────── */
.h2h-form { align-items: flex-end; max-width: 980px; gap: 16px; }
.h2h-none { max-width: 980px; margin-top: 20px; }
.h2h-fallback-search { margin-bottom: 16px; }
.h2h-picker { position: relative; }
.h2h-picker-list { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 10; max-height: 300px; overflow-y: auto; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.h2h-picker-option { padding: 10px 12px; min-height: 44px; border-radius: var(--r-sm); cursor: pointer; overflow-wrap: anywhere; }
.h2h-picker-option[aria-selected="true"], .h2h-picker-option:hover { background: var(--surface-2); }
.h2h-picker-detail { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.h2h-picker-status { padding: 10px 12px; font-size: 14px; color: var(--muted); }
.h2h-v { align-self: center; padding-top: 18px; font: 800 semi-condensed 30px/1.1 var(--display); color: var(--muted); }
.h2h-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px clamp(16px, 4vw, 56px); align-items: center; padding: clamp(20px, 4vw, 52px); }
.h2h-side--b { text-align: right; }
.h2h-name { display: block; font: 800 semi-condensed clamp(26px, 2.7vw, 36px)/1.1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.h2h-name:hover { color: var(--accent-text); }
.h2h-side-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.h2h-side--b .h2h-side-meta, .h2h-side--b .h2h-facts { justify-content: flex-end; }
.h2h-facts { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 20px 0 12px; }
.h2h-facts dt { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.h2h-facts dd { margin-top: 4px; font: 800 semi-condensed 24px/1.1 var(--display); }
.h2h-rank { display: block; margin-top: 4px; font: 600 12px/1 var(--mono); color: var(--accent-text); letter-spacing: .06em; }
.h2h-centre { text-align: center; display: grid; gap: 12px; justify-items: center; }
.h2h-score { display: flex; align-items: baseline; gap: 10px; font: 800 semi-condensed clamp(44px, 6vw, 72px)/1.1 var(--display); letter-spacing: -.03em; color: var(--accent-text); }
.h2h-dash { color: var(--muted); }
.h2h-wdl { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); }
.h2h-bar { width: 100%; height: 12px; border-radius: 4px; overflow: hidden; }
.h2h-bar-a { fill: var(--accent); } .h2h-bar-d { fill: var(--line-2); } .h2h-bar-b { fill: var(--text); }
.h2h-wdl-labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.h2h-wdl-labels strong { color: var(--text); font: 800 semi-condensed 22px/1.1 var(--display); margin-right: 2px; }
.h2h-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.h2h-key--a { background: var(--accent); } .h2h-key--d { background: var(--line-2); } .h2h-key--b { background: var(--text); }
/* On the volt stage the accent is ink, so the second player's share is drawn in white to stay apart from the first. */
.stage--volt .h2h-bar-b { fill: #FBFAF5; } .stage--volt .h2h-key--b { background: #FBFAF5; box-shadow: inset 0 0 0 1px rgba(11, 12, 6, .4); }
.stage--volt .h2h-bar { box-shadow: 0 0 0 1px rgba(11, 12, 6, .4); }
/* On the bone stage volt fills get an ink edge, since volt on bone alone is faint. */
.stage--bone .ms-bar--a { stroke: #0B0B0C; stroke-width: 1px; } .stage--bone .ms-key--a { box-shadow: inset 0 0 0 1px #0B0B0C; }
.stage--bone .ms-range { accent-color: #0B0B0C; }
.h2h-pick { display: grid; gap: 8px; padding: 16px 18px; transition: border-color .15s ease, transform .15s ease; }
.h2h-pick:hover { border-color: var(--accent-text); transform: translateY(-2px); }
.h2h-pick-who { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 16px; }
/* Landing view: the newest rivalry on a stage with its latest board, the next ones as board tiles. */
.h2h-lead { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(18px, 3.2vw, 44px); }
.h2h-lead-board .board { margin-inline: auto; }
.h2h-lead-info { display: grid; gap: 12px; justify-items: start; }
.h2h-lead-names { font: 800 semi-condensed clamp(26px, 3vw, 38px)/1.1 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.h2h-lead-names em { color: var(--accent-text); }
.h2h-lead:hover .h2h-lead-names a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.h2h-lead-score { font: 800 semi-condensed clamp(40px, 5vw, 64px)/1.1 var(--display); letter-spacing: -.03em; color: var(--accent-text); }
.h2h-lead-go { margin-top: 6px; }
.h2h-lead .meta { max-width: 100%; }
.h2h-rivs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.h2h-riv { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; transition: border-color .15s ease, transform .15s ease; }
.h2h-riv:hover { border-color: var(--line-2); transform: translateY(-2px); }
.h2h-riv-body { display: grid; gap: 3px; }
.h2h-lead-info:only-child, .h2h-riv-body:only-child { grid-column: 1 / -1; }
.h2h-riv-name { font-weight: 600; font-size: 14.5px; }
.h2h-riv-score { margin-top: 4px; font: 800 semi-condensed 30px/1.1 var(--display); }
@media (max-width: 1080px) { .h2h-rivs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .h2h-lead { grid-template-columns: minmax(0, 1fr); } .h2h-lead-board .board { --board-max: 320px; } .h2h-rivs { grid-template-columns: minmax(0, 1fr); } .h2h-riv { grid-template-columns: 88px minmax(0, 1fr); } }
/* match simulator */
.ms-panel { display: grid; gap: 24px; padding: clamp(20px, 3.4vw, 40px); }
.ms-form { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.ms-field { max-width: 520px; }
.ms-slider { display: flex; align-items: center; gap: 16px; }
.ms-range { flex: 1; min-width: 0; height: 40px; margin: 0; accent-color: var(--accent); background: transparent; cursor: pointer; }
.ms-range:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 999px; }
.ms-length { flex: none; min-width: 5.5em; font: 800 semi-condensed 28px/1.1 var(--display); text-align: right; }
.ms-odds .stat-label { display: flex; align-items: center; gap: 8px; white-space: normal; }
.ms-odds .stat-value { font-size: clamp(32px, 4vw, 48px); }
.ms-key { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; }
.ms-key--a { background: var(--accent); } .ms-key--d { background: var(--line-2); } .ms-key--b { background: var(--text); }
.ms-summary { font-size: 14px; color: var(--text-2); }
.ms-summary strong { color: var(--text); font-weight: 600; }
.ms-figure { display: grid; gap: 10px; }
.ms-chart { display: block; width: 100%; height: clamp(120px, 18vw, 180px); border-bottom: 1px solid var(--line-2); overflow: visible; }
.ms-bar { vector-effect: non-scaling-stroke; }
.ms-bar--a { fill: var(--accent); } .ms-bar--d { fill: var(--line-2); } .ms-bar--b { fill: var(--text); }
.ms-bar.is-mode { stroke: var(--text-2); stroke-width: 2px; }
.ms-bar--b.is-mode { stroke: var(--accent); }
.ms-axis { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* One game, model against record: a card per source, the same three outcomes in each. */
.msc-src { flex-direction: column; align-items: flex-start; gap: 2px; }
.msc .meta { font-weight: 400; }
.msc dd .meta { margin-left: 6px; }
/* A long name wraps its label over several lines: the figures still sit on one line across the card. */
.msc .dc-f { display: flex; flex-direction: column; }
.msc .dc-f dd { margin-top: auto; padding-top: 2px; }
@media (max-width: 899.98px) {
  .msc > .dcard-main { grid-column: 1 / -1; }
  .msc > .dc-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) { .dcards--ms { --dc-cols: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.ms-notes { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .ms-field { max-width: none; width: 100%; } .ms-form .btn { width: 100%; } .ms-length { min-width: 5em; font-size: 24px; } }
@media (max-width: 860px) {
  .h2h-board { grid-template-columns: minmax(0, 1fr); text-align: left; } .h2h-side--b { text-align: left; } .h2h-side--b .h2h-side-meta, .h2h-side--b .h2h-facts { justify-content: flex-start; }
  .h2h-centre { order: -1; justify-items: start; text-align: left; } .h2h-form { flex-direction: column; align-items: stretch; } .h2h-v { display: none; }
}

/* live ledger */
.ledger-tag { display: inline-block; padding: 3px 8px; border: 1px dashed var(--line-2); border-radius: 999px; font: 700 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); vertical-align: 1px; }
.ledger-lede { max-width: 72ch; margin-bottom: 20px; font-size: 14.5px; color: var(--text-2); }
.ledger-lede .ledger-tag { margin-right: 6px; }
.ledger-th-sub { font-weight: 400; text-transform: none; letter-spacing: 0; }
.ledger-movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-bottom: 20px; }
.ledger-mover summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; list-style: none; }
.ledger-mover summary::-webkit-details-marker { display: none; }
.ledger-mover summary::after { content: "+"; font: 600 14px/1 var(--mono); color: var(--muted); }
.ledger-mover[open] summary::after { content: "−"; }
.ledger-mover summary:hover { background: var(--surface-2); }
.ledger-mover-name { font-weight: 600; }
.ledger-mover-figs { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.ledger-mover-figs .delta { font-size: 15px; }
.ledger-mover-body { display: grid; gap: 10px; padding: 0 18px 14px; }
.ledger-mover-body .section-link { justify-self: start; margin: 0; }
.ledger-games { display: grid; font-size: 14px; }
.ledger-games li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 52px; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.ledger-games .mono { font-size: 14px; color: var(--muted); }
.ledger-game-round { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.ledger-games .delta { text-align: right; }
.ledger-games a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.ledger-bar { display: block; flex: 1; min-width: 0; height: 8px; }
.ledger-bar .axis { fill: var(--line-2); } .ledger-bar .up { fill: var(--up); } .ledger-bar .down { fill: var(--down); }
.ledger-method { margin-top: 20px; max-width: 80ch; }
.ledger-method ul { display: grid; gap: 6px; margin-top: 8px; padding-left: 18px; list-style: disc; font-size: 14px; color: var(--text-2); }
details.ledger-method > summary { width: fit-content; padding: 10px 0; cursor: pointer; font: 700 14px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
details.ledger-method > summary:hover { color: var(--accent-text); }
.ledger-method sup { font-size: .75em; }
.ledger-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding: 18px; border-bottom: 1px solid var(--line); }
.ledger-now { display: grid; gap: 10px; }
.ledger-live { font: 800 semi-condensed clamp(36px, 4vw, 48px)/1.1 var(--display); letter-spacing: -.01em; }
.ledger-facts { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.ledger-facts dt { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ledger-facts dd { margin-top: 5px; font: 800 semi-condensed 24px/1.1 var(--display); }
.ledger-facts .delta { font-size: 18px; }
.ledger-facts dd .meta { font: 400 14px/1.3 var(--sans); }
@media (max-width: 720px) { .ledger-movers { grid-template-columns: minmax(0, 1fr); } }
/* Ledger cards. Ratings page (.lgc): a player with official rating, estimated change, live estimate and games, in
   that order. Player page (.lgg): a counted game with its date, opponent, the opponent rating used, result, expected
   score, change and event. On a phone the figures are a labelled row under the name; from 900px they are columns. */
.ledger-note { margin-bottom: 10px; }
.ledger-games-wrap { padding: 14px 18px 18px; }
.lgc-live dd { font-weight: 700; }
.lgg-date { font-size: 14px; color: var(--muted); white-space: nowrap; }
.lgg-ev dd { font-size: 14px; font-weight: 400; color: var(--muted); }
@media (max-width: 899.98px) {
  .lgc > .dcard-main { grid-column: 1 / -1; }
  .lgc > .dc-facts { grid-template-columns: 1fr 1.25fr 1fr .75fr; gap: 8px 10px; }
  .lgc .ledger-bar { display: none; }
  .lgg { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "main date go" "facts facts facts"; }
  .lgg > .dcard-main { grid-area: main; } .lgg-date { grid-area: date; } .lgg > .row-go { grid-area: go; }
  .lgg > .dc-facts { grid-area: facts; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
  .lgg-ev dt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .ledger-games-wrap { padding: 12px; }
}
@media (min-width: 900px) {
  .dcards--ledger { --dc-cols: minmax(0, 2fr) 84px minmax(200px, 1.8fr) 96px 78px; }
  .lgc-change dd { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
  .lgc-change .delta { flex: none; min-width: 5ch; text-align: right; }
  .dcards--ledger-games { --dc-cols: 76px minmax(0, 1.4fr) 56px 56px 52px 64px minmax(0, 1.2fr) 46px; }
}

/* === repertoire-fingerprint === */
/* Pie colours identify opening families consistently across White and Black; scores are printed in the legend. */
.prep {
  --prep-colour-0: #A8A6A0; --prep-colour-1: #38BDF8; --prep-colour-2: #FB7185;
  --prep-colour-3: #FBBF24; --prep-colour-4: #A78BFA; --prep-colour-5: #A3E635;
  --prep-colour-6: #60A5FA; --prep-colour-7: #F472B6; --prep-colour-8: #34D399;
  --prep-colour-9: #FB923C; --prep-colour-10: #2DD4BF; --prep-colour-11: #E879F9;
  --prep-colour-12: #C4B5FD; --prep-colour-13: #FDE68A; --prep-colour-14: #67E8F9;
  --prep-colour-15: #FDA4AF; --prep-colour-16: #BEF264; --prep-colour-17: #FDBA74;
  --prep-colour-18: #86EFAC; --prep-pie-ink: #121416;
}
.prep-c0 { --prep-colour: var(--prep-colour-0); } .prep-c1 { --prep-colour: var(--prep-colour-1); }
.prep-c2 { --prep-colour: var(--prep-colour-2); } .prep-c3 { --prep-colour: var(--prep-colour-3); }
.prep-c4 { --prep-colour: var(--prep-colour-4); } .prep-c5 { --prep-colour: var(--prep-colour-5); }
.prep-c6 { --prep-colour: var(--prep-colour-6); } .prep-c7 { --prep-colour: var(--prep-colour-7); }
.prep-c8 { --prep-colour: var(--prep-colour-8); } .prep-c9 { --prep-colour: var(--prep-colour-9); }
.prep-c10 { --prep-colour: var(--prep-colour-10); } .prep-c11 { --prep-colour: var(--prep-colour-11); }
.prep-c12 { --prep-colour: var(--prep-colour-12); } .prep-c13 { --prep-colour: var(--prep-colour-13); }
.prep-c14 { --prep-colour: var(--prep-colour-14); } .prep-c15 { --prep-colour: var(--prep-colour-15); }
.prep-c16 { --prep-colour: var(--prep-colour-16); } .prep-c17 { --prep-colour: var(--prep-colour-17); }
.prep-c18 { --prep-colour: var(--prep-colour-18); }
.prep-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.prep-side { --prep-tone: var(--volt); }
.prep-side--black { --prep-tone: var(--prep-colour-4); }
.prep-head { flex-wrap: wrap; align-items: center; gap: 8px; background: var(--prep-tone); color: var(--ink); border-radius: calc(var(--r) - 2px) calc(var(--r) - 2px) 0 0; border-color: transparent; }
.prep-head .card-title { display: flex; align-items: center; gap: 10px; }
.prep-head .meta { font-size: 14px; color: var(--ink); }
.prep-chart-body { padding: 14px 20px 18px; }
.prep-pie { width: min(100%, 280px); height: auto; margin: 0 auto 14px; overflow: visible; }
.prep-slice { fill: var(--prep-colour); stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; }
.prep-pie-label { fill: var(--prep-pie-ink); font: 600 12px/1 var(--mono); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.prep-legend { display: grid; gap: 10px; }
.prep-legend-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: baseline; column-gap: 9px; }
.prep-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--prep-colour); }
.prep-legend-copy { display: grid; gap: 2px; min-width: 0; }
.prep-name { font-weight: 600; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.prep-link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prep-detail { font-size: 14px; line-height: 1.3; color: var(--text-2); }
.prep-share { font: 800 semi-condensed 22px/1.1 var(--display); white-space: nowrap; }
.prep-share span { font: 500 14px/1.1 var(--sans); color: var(--text-2); margin-left: 1px; }
@media (min-width: 1200px) {
  .prep-chart-body { display: grid; grid-template-columns: minmax(190px, .9fr) minmax(0, 1.1fr); align-items: center; gap: 16px; padding-block: 22px; }
  .prep-pie { margin: 0; }
}
@media (max-width: 620px) { .prep-sides { grid-template-columns: minmax(0, 1fr); } }
.prep-shift { margin-top: 28px; }
/* Share by year: a block per colour, a card per opening, a fact per year (the share as a bar and a figure). The
   legend names the years with their game counts: a line of text on a phone, the column heads from 900px. */
.prep-years { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; align-items: start; }
.prep-yc-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 800 semi-condensed 22px/1.1 var(--display); letter-spacing: -.01em; }
.prep-yc-name { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.prep-yc-card--other .prep-yc-name { font-weight: 400; color: var(--text-2); }
.prep-col { display: block; width: 24px; height: 28px; margin: 0 0 4px; }
.prep-col-base { fill: var(--line-2); } .prep-col-fill { fill: var(--series-rapid); }
.prep-yc-card:nth-child(even) .prep-col-fill { fill: var(--series-blitz); }
.prep-yt-pct { font: 400 14px/1 var(--mono); color: var(--text-2); }
.prep-yt-year { color: var(--text); font-weight: 700; }
.prep-yt-n { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
@media (max-width: 899.98px) {
  .dcards-legend.prep-yc-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; }
  .prep-yc-legend-name { display: none; }
  .prep-yc-card > .dcard-main { grid-column: 1 / -1; }
  .prep-yc-card > .dc-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
}
@media (min-width: 900px) {
  .prep-yc--2 { --dc-cols: minmax(120px, 1.4fr) repeat(2, minmax(44px, 1fr)); } .prep-yc--3 { --dc-cols: minmax(120px, 1.4fr) repeat(3, minmax(44px, 1fr)); }
  .prep-yc--4 { --dc-cols: minmax(120px, 1.4fr) repeat(4, minmax(44px, 1fr)); } .prep-yc--5 { --dc-cols: minmax(120px, 1.4fr) repeat(5, minmax(44px, 1fr)); }
  .prep-yc--6 { --dc-cols: minmax(120px, 1.4fr) repeat(6, minmax(44px, 1fr)); }
  .dcards--rows > .dcards-legend.prep-yc-legend { align-items: end; }
  .prep-yt-n { display: block; margin-top: 3px; }
  .prep-col { margin-left: auto; }
}
@media (max-width: 1199.98px) { .prep-years { grid-template-columns: minmax(0, 1fr); } }
/* Keep cached pre-pie player pages readable while the new HTML rolls out. */
.prep {
  --prep-score-1: #EF4438; --prep-score-2: #F28C18; --prep-score-3: #D6B400;
  --prep-score-4: #8FC52B; --prep-score-5: #00B66A;
}
.prep-s0 { --prep-shade: transparent; }
.prep-s1 { --prep-shade: var(--prep-score-1); }
.prep-s2 { --prep-shade: var(--prep-score-2); }
.prep-s3 { --prep-shade: var(--prep-score-3); }
.prep-s4 { --prep-shade: var(--prep-score-4); }
.prep-s5 { --prep-shade: var(--prep-score-5); }
.prep-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 14px; font-size: 14px; color: var(--text-2); }
.prep-key li { display: inline-flex; align-items: center; gap: 6px; }
.prep-key .prep-key-head { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.prep-chip { display: inline-block; flex: none; width: 16px; height: 10px; border-radius: 2px; background: var(--prep-shade); }
.prep-chip.prep-s0 { box-shadow: inset 0 0 0 1px var(--line-2); }
.prep-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.prep-row:first-child { border-top: 0; }
.prep-eco { font: 400 14px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.prep-games { font-size: 14px; color: var(--text-2); text-align: right; white-space: nowrap; }
.prep-games strong { font: 800 semi-condensed 22px/1.1 var(--display); color: var(--text); }
.prep-bar { width: 100%; height: 10px; overflow: visible; }
.prep-fill { fill: var(--prep-shade); }
.prep-fill.prep-s0 { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.prep-score { font: 400 14px/1.2 var(--mono); color: var(--text-2); text-align: right; white-space: nowrap; }
.prep-row--other { border-top-style: dashed; }
.prep-row--other .prep-name { font-weight: 400; color: var(--text-2); }
.prep-row--other .prep-score { grid-column: 2; }
.prep-thin { padding: 16px 18px; font-size: 14px; color: var(--text-2); }
.prep-note { margin-top: 14px; }
.prep-bar { border-radius: 3px; background: color-mix(in srgb, var(--line) 60%, transparent); }
@media (max-width: 760px) { .prep-row { padding: 11px 14px; } }
/* === end repertoire-fingerprint === */

/* === next-list-calculator === */
.nlc-lede { max-width: 72ch; margin-bottom: 20px; font-size: 14.5px; color: var(--text-2); }
.nlc-lede .ledger-tag { margin-right: 6px; }
.nlc-card { display: flex; flex-wrap: wrap; overflow: hidden; }
.nlc-form { flex: 1 1 320px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 14px 16px; padding: 20px; background: var(--surface-2); }
.nlc-field--wide { grid-column: 1 / -1; }
.nlc-out { flex: 1.6 1 380px; min-width: 0; display: grid; align-content: start; gap: 16px; padding: clamp(20px, 3vw, 32px); }
.nlc-start { font-size: 14px; color: var(--muted); }
.nlc-answer { font: 800 semi-condensed clamp(24px, 2.6vw, 34px)/1.2 var(--display); text-wrap: pretty; }
.nlc-answer strong, .nlc-plan strong { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .12em; text-underline-offset: .16em; }
.nlc-answer strong { font-weight: 400; }
.nlc-plan { padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text-2); text-wrap: pretty; }
.nlc-plan strong { font-weight: 600; }
/* === end next-list-calculator === */

/* === rivalry-timeline === */
.h2h-rv-panel { display: grid; gap: 18px; padding: clamp(18px, 3.2vw, 38px); }
.h2h-rv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; }
.h2h-rv-facts dt { font: 700 14px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.h2h-rv-facts dd { margin-top: 6px; font: 800 semi-condensed clamp(28px, 3vw, 40px)/1.1 var(--display); }
.h2h-rv-facts .meta { display: block; margin-top: 6px; font: 400 14px/1.35 var(--sans); }
.h2h-rv-lead--a { color: var(--accent); }
.h2h-rv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.h2h-rv-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.h2h-rv-pick-label { float: left; margin-right: 6px; padding: 0; font: 700 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.h2h-rv-opt { position: relative; display: inline-flex; }
.h2h-rv-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.h2h-rv-opt span { padding: 8px 13px; border: 1px solid var(--line-2); border-radius: 999px; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.h2h-rv-opt input:hover + span { border-color: var(--text-2); color: var(--text); }
.h2h-rv-opt input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.h2h-rv-opt input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (pointer: coarse) { .h2h-rv-opt span { padding: 14px 15px; } }
.h2h-rv-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h2h-rv-legend li { display: inline-flex; align-items: center; gap: 7px; }
.h2h-rv-key { display: inline-block; flex: none; width: 9px; height: 9px; }
.h2h-rv-key--line-a, .h2h-rv-key--line-b { width: 16px; height: 2px; background: var(--accent); }
.h2h-rv-key--line-b { background: var(--text); }
.h2h-rv-key--a { background: var(--accent); clip-path: polygon(50% 0, 100% 90%, 0 90%); }
.h2h-rv-key--b { background: var(--text); clip-path: polygon(0 10%, 100% 10%, 50% 100%); }
.h2h-rv-key--d { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.h2h-rv-for { display: none; font-size: 14px; color: var(--text-2); }
.h2h-rv-for.is-default { display: block; }
.h2h-rv-note { color: var(--muted); }
.h2h-rv-rating { display: none; }
.h2h-rv-rating.is-default { display: inline; }
/* The rating-list radios switch the lines and their caption without script, where :has() is supported. */
.h2h-rv:has(.h2h-rv-opt input:checked) .h2h-rv-for, .h2h-rv:has(.h2h-rv-opt input:checked) .h2h-rv-rating { display: none; }
.h2h-rv:has(.h2h-rv-opt input[value="standard"]:checked) .h2h-rv-for--standard,
.h2h-rv:has(.h2h-rv-opt input[value="rapid"]:checked) .h2h-rv-for--rapid,
.h2h-rv:has(.h2h-rv-opt input[value="blitz"]:checked) .h2h-rv-for--blitz { display: block; }
.h2h-rv:has(.h2h-rv-opt input[value="standard"]:checked) .h2h-rv-rating--standard,
.h2h-rv:has(.h2h-rv-opt input[value="rapid"]:checked) .h2h-rv-rating--rapid,
.h2h-rv:has(.h2h-rv-opt input[value="blitz"]:checked) .h2h-rv-rating--blitz { display: inline; }
.h2h-rv-svg { display: block; width: 100%; height: auto; }
.h2h-rv-svg--narrow { display: none; }
.h2h-rv-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.h2h-rv-rule { stroke: var(--line); stroke-width: 1; }
.h2h-rv-level { stroke: var(--line-2); stroke-width: 1.5; }
.h2h-rv-axis { font: 400 12px var(--mono); fill: var(--muted); }
.h2h-rv-cap { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; fill: var(--text-2); }
.h2h-rv-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.h2h-rv-line--a { stroke: var(--accent); } .h2h-rv-line--b { stroke: var(--text); }
.h2h-rv-end { font: 600 12px var(--mono); fill: var(--text); }
.h2h-rv-end--a { fill: var(--accent); }
.h2h-rv-ahead--a { fill: var(--accent-wash); } .h2h-rv-ahead--b { fill: color-mix(in srgb, var(--text) 8%, transparent); }
.h2h-rv-score { fill: none; stroke: var(--text-2); stroke-width: 1.75; stroke-linejoin: round; }
.h2h-rv-side { font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); }
.h2h-rv-side--a { fill: var(--accent); }
.h2h-rv-mark rect { fill: transparent; }
.h2h-rv-mark--a :not(rect) { fill: var(--accent); } .h2h-rv-mark--b :not(rect) { fill: var(--text); } .h2h-rv-mark--d :not(rect) { fill: var(--muted); }
/* A mark is a link when its game has a page: links are drawn solid, the others faint. Every mark takes keyboard
   focus; only a link answers the pointer. */
g.h2h-rv-mark :not(rect) { fill-opacity: .4; }
a.h2h-rv-mark:hover rect, .h2h-rv-mark:focus-visible rect { fill: var(--surface-2); stroke: var(--ring); stroke-width: 1.5; }
.h2h-rv-foot { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .h2h-rv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .h2h-rv-svg--wide { display: none; } .h2h-rv-svg--narrow { display: block; max-width: 540px; } }
@media (max-width: 560px) { .h2h-rv-pick-label { float: none; margin-bottom: 8px; } }
/* === end rivalry-timeline === */
