/* ranked.ink
   Slate paper, ink navy and gold (the brand mark's). Fonts are self-hosted in fonts.css.
   Gold is reserved for winners. Severity uses its own colors so the two never blur. */

:root {
    --paper: #eef1f6;
    --surface: #ffffff;
    --ink: #1b2447;
    --ink-soft: #4a5577;
    --rule: #d3d9e6;
    --gold: #855b0f;
    --gold-bright: #d4a441;
    --gold-wash: #fbf2dc;
    --link: #5b4b8a;
    --high: #a0223a;
    --high-wash: #fbe8ec;
    --warn: #b24a14;
    --warn-wash: #fcede3;
    --info: #4d5a78;
    --info-wash: #e8ecf4;
    --loss: #5f6783;
    /* Keyboard focus ring, and the edge of form fields (both at least 3:1 against the page, R15). */
    --focus: #1b2447;
    --field-border: #7d869e;

    /* Kyle (2026-10-18, "swap to Calistoga"): Calistoga, a soft display serif, for headings and big numbers. Young Serif
       is its fallback for the few letters it doesn't have (fonts.css). */
    --serif: "Calistoga", "Young Serif", Georgia, "Times New Roman", serif;
    /* Numbers get a plain zero ("ranked.ink figures" holds only the digit zero, fonts.css); names and IDs keep
       Atkinson Hyperlegible's slashed zero (--sans-slashed). Decided by Kyle, 2026-09-28 (R21). */
    --sans: "ranked.ink figures", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sans-slashed: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius: 6px;
    /* Controls (buttons, fields, pills) come in two heights: regular, and compact for filter bars and table rows. */
    --control: 2.5rem;
    --control-compact: 2rem;
    /* R49: the top bar's two pills (your area, the account menu) share one height. */
    --topbar-pill: 2.75rem;
    /* The space above every section of a page (.block) and between a page's header card and its content. */
    --section-gap: 2.25rem;
    /* Charts (R21): every chart uses these two. Strong is the main series (played, the adjusted rating, the top ten);
       soft is the one behind it (registered, the rating before uncertainty, the rest of the field). Both at least 3:1
       against the card in both themes (R15's "darker chart fills"). */
    --chart-strong: var(--link);
    --chart-soft: #8a7cc9;
    /* R63: You's scoreboard band, carrying on from the top bar (navy in both themes, deeper in dark). Its words: ink
       for the name and numbers, soft for labels, and the rise in green, each at least 4.5:1 on the band. */
    --board: #1b2447;
    --board-ink: #eef1f6;
    --board-soft: #b9c1d8;
    --board-up: #9fe0ad;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #121729;
        --surface: #1a2036;
        --ink: #e6e9f2;
        --ink-soft: #a6afc7;
        --rule: #2e3654;
        --gold: #e2b556;
        --gold-bright: #e2b556;
        --gold-wash: #342a14;
        --link: #b7a8ea;
        --high: #f0798d;
        --high-wash: #3d1a24;
        --warn: #f0a070;
        --warn-wash: #3a2418;
        --info: #aab4cf;
        --info-wash: #242b44;
        --loss: #8f98b1;
        --focus: #e2b556;
        --field-border: #6b7494;
        --chart-soft: #6f63ad;
        --board: #0c1020;
        --board-soft: #a6afc7;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.55 var(--sans);
    /* Lining figures everywhere (R21: Young Serif's default figures were old-style, "137" at three heights). */
    font-variant-numeric: lining-nums;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    text-wrap: balance;
}
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: 1.35rem; }
/* Kyle (2026-10-17, "approved", kept with Calistoga): the heading face has one weight, so the smallest headings take the
   bold sans, keeping the hierarchy (a page's title and sections in the serif, the sub-headings under them quieter). */
h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 700; }

/* One reading width for prose: the page's own. Long-form pages (terms, welcome) narrow their container instead. */
p { margin: 0 0 0.75rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- chrome */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
    background: var(--ink);
    color: var(--paper);
}
@media (prefers-color-scheme: dark) {
    .site-header { background: #0d1120; border-bottom: 1px solid var(--rule); }
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 1.15rem;
}
/* The ink drop in img/mark.svg (the favicon without its tile). */
.brand-mark { display: block; width: auto; height: 1.6rem; }

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: inherit; text-decoration: none; opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }

.page {
    flex: 1;
    width: 100%;
    max-width: 76rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

.site-footer {
    padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
    color: var(--ink-soft);
    font-size: 0.875rem;
    border-top: 1px solid var(--rule);
}

.crumbs { margin-bottom: 0.75rem; font-size: 0.9rem; }

.page-head { position: relative; margin-bottom: 1.25rem; }
.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    color: var(--ink-soft);
    max-width: none;
}
.head-action { margin-top: 0.5rem; }
@media (min-width: 52rem) {
    .head-action { position: absolute; top: 0; right: 0; margin: 0; }
    .page-head:has(.head-action) h1 { padding-right: 16rem; }
}

.block { margin-top: var(--section-gap); }
.two-col { display: grid; gap: 0 2.5rem; }
@media (min-width: 60rem) { .two-col { grid-template-columns: 1fr 1fr; } }

.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.small { font-size: 0.9rem; }
.hint { color: var(--ink-soft); font-size: 0.9rem; }
.empty { color: var(--ink-soft); font-style: italic; }
.gap { color: var(--high); font-weight: 700; }
.count {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 0.4em;
    border-radius: 999px;
    background: var(--info-wash);
    color: var(--info);
    font-family: var(--sans);
    font-size: 0.8rem;
    text-align: center;
    vertical-align: middle;
}

.notice {
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--high);
    background: var(--high-wash);
    border-radius: 0 var(--radius) var(--radius) 0;
}
/* Not a problem, just something to know (a daily limit reached). */
.notice.notice-info { border-left-color: var(--info); background: var(--info-wash); }

/* ---------------------------------------------------------------- forms */

input, select, button { font: inherit; color: inherit; }

input[type="text"], input[type="search"], input[type="date"], select {
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--field-border);
    border-radius: var(--radius);
    background: var(--surface);
    min-width: 0;
    line-height: 1.3;
}

/* Browsers add their own inner padding and arrow to dropdowns, which varies by platform.
   Drop it and draw a plain arrow, so every dropdown lines up with the other inputs. */
select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234a5577' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.7rem;
    cursor: pointer;
}
@media (prefers-color-scheme: dark) {
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a6afc7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }
}
input[type="search"] { -webkit-appearance: none; appearance: none; }

button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
    white-space: nowrap;
}
button:hover { filter: brightness(1.15); }
button.secondary { background: transparent; color: var(--ink); }
button.secondary:hover { background: var(--surface); filter: none; }

.intro { margin-bottom: 1.75rem; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }

.lookups { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .lookups { grid-template-columns: 3fr 2fr; } }

.lookup-form label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.lookup-row { display: flex; gap: 0.5rem; }
.lookup-row input { flex: 1; }
.lookup-form .hint { margin-top: 0.4rem; }
.field-error { color: var(--high); margin-top: 0.4rem; }

.controls {
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}
.controls > summary {
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-weight: 700;
}
.summary-note { font-weight: 400; color: var(--ink-soft); margin-left: 0.75rem; }
.control-forms { padding: 0 1rem 1rem; display: grid; gap: 0.9rem; }

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.6rem 1rem;
    margin-bottom: 1rem;
}
.inline-form label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9rem; color: var(--ink-soft); }
.inline-form label.check { flex-direction: row; align-items: center; gap: 0.4rem; color: var(--ink); padding-bottom: 0.5rem; }

/* ---------------------------------------------------------------- tabs + stats */

.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--rule);
    margin: 1.5rem 0 1.25rem;
    overflow-x: auto;
}
.tabs a {
    padding: 0.55rem 0.9rem;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }

.filter { font-size: 0.95rem; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 1px;
    margin: 0 0 0.5rem;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}
.stats > div { background: var(--surface); padding: 0.7rem 0.9rem; }
.stats dt { font-size: 0.85rem; color: var(--ink-soft); }
.stats dd { margin: 0.1rem 0 0; font-family: var(--serif); font-size: 1.4rem; }
.stats dd.small { font-family: var(--sans); font-size: 0.95rem; padding-top: 0.3rem; }
.stats dd small { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- findings */

.all-clear {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px dashed var(--rule);
    border-radius: var(--radius);
    color: var(--ink-soft);
}

.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.finding {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left-width: 5px;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.finding.sev-high { border-left-color: var(--high); }
.finding.sev-warn { border-left-color: var(--warn); }
.finding.sev-info { border-left-color: var(--info); }
.finding-title { font-weight: 700; margin-bottom: 0.2rem; }
.finding-detail { color: var(--ink-soft); margin-bottom: 0.3rem; }
.finding-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.9rem; margin: 0; }
@media (max-width: 34rem) {
    .finding { grid-template-columns: 1fr; gap: 0.35rem; }
}

.sev-badge {
    display: inline-block;
    align-self: start;
    justify-self: start;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.sev-badge.sev-high { background: var(--high); color: #fff; }
.sev-badge.sev-warn { background: var(--warn-wash); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.sev-badge.sev-info { background: var(--info-wash); color: var(--info); }
@media (prefers-color-scheme: dark) {
    .sev-badge.sev-high { color: #1a0a0e; }
}

.finding-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.finding-chips li {
    padding: 0.05rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    line-height: 1.5;
}
.finding-chips .sev-high { background: var(--high-wash); color: var(--high); font-weight: 700; }
.finding-chips .sev-warn { background: var(--warn-wash); color: var(--warn); }
.finding-chips .sev-info { background: var(--info-wash); color: var(--info); }

.review-list { padding-left: 1.4rem; display: grid; gap: 0.75rem; }
.rv-event > * { margin-right: 0.4rem; }
.review-list .finding-chips { margin-top: 0.3rem; }
.finding-chips li.rv-common { background: none; color: var(--ink-soft); font-weight: 400; box-shadow: inset 0 0 0 1px var(--rule); }
.finding-chips li.rv-more { color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); cursor: help; }

/* ---------------------------------------------------------------- tables */

/* Positioned (R49), so the visually-hidden words inside a wide table stay in its scroll box instead of widening the page. */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: 0.95rem;
}
th, td { padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th { font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; background: var(--paper); white-space: nowrap; }
tbody th { font-weight: 400; }
tbody tr:last-child > * { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: lining-nums tabular-nums; }

.months .bar-col { width: 34%; min-width: 9rem; }
.bar { position: relative; display: block; height: 1.1rem; }
.bar-reported, .bar-played { position: absolute; left: 0; height: 100%; border-radius: 2px; }
.bar-reported { top: 0; border: 1.5px solid var(--ink-soft); background: transparent; }
.bar-played { top: 0.2rem; height: calc(100% - 0.4rem); background: var(--link); }

/* ---------------------------------------------------------------- standings */

.standings .champion th { font-weight: 700; }
.standings .champion td:first-child { color: var(--gold); font-weight: 700; }
.record { display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap; }
.rank-col { width: 4.5rem; }

.pips { display: inline-flex; gap: 2px; }
.pip {
    width: 0.62rem;
    height: 0.72rem;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: var(--rule);
}
.pip.win { background: var(--gold-bright); }
.pip.draw { background: var(--info); }
.pip.loss { background: var(--rule); }

/* ---------------------------------------------------------------- rounds + matches */

.round {
    margin-bottom: 0.9rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}
.round > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
}
.round-name { font-family: var(--serif); font-size: 1.1rem; }
.round-meta { color: var(--ink-soft); font-size: 0.9rem; }
.round .table-wrap { border-top: 1px solid var(--rule); }
.round table { border: 0; border-radius: 0; }
.round > .empty { padding: 0 1rem 0.8rem; margin: 0; }

.matches td { vertical-align: middle; }
.matches td.winner {
    background: var(--gold-wash);
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--gold-bright);
}
.matches td.winner a { color: var(--ink); }
.matches td.loser, .matches td.loser a { color: var(--loss); }
.matches td.drew { background: var(--info-wash); }
.matches .result { text-align: center; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; font-weight: 700; }
.matches .result.pending { color: var(--warn); font-weight: 400; font-style: italic; }
.matches tr.no-result td { background: repeating-linear-gradient(-45deg, transparent 0 8px, var(--warn-wash) 8px 10px); }

/* The W / L / D marker next to each name: a small hexagon, gold for the winner. */
.wl {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.5rem;
    margin-right: 0.45rem;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}
.wl.w { background: var(--gold-bright); color: #1b2447; }
.wl.l { background: var(--rule); color: var(--ink-soft); }
.wl.d { background: var(--info); color: var(--surface); }

/* ---------------------------------------------------------------- jobs */

.jobs {
    margin: 1rem 0 1.5rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}
.jobs h2 { font-size: 1rem; font-family: var(--sans); font-weight: 700; margin-bottom: 0.4rem; }
.jobs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.jobs li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem minmax(0, 14rem);
    gap: 0.75rem;
    align-items: center;
    font-size: 0.9rem;
}
.jobs progress { width: 100%; accent-color: var(--link); }
.jobs li[data-state="Completed"] progress, .jobs li[data-state="Failed"] progress { opacity: 0.4; }
.jobs li[data-state="Failed"] .job-status { color: var(--high); }
.job-status { color: var(--ink-soft); }
.jobs-done { margin: 0.6rem 0 0; font-weight: 700; }
@media (max-width: 40rem) {
    .jobs li { grid-template-columns: 1fr; gap: 0.2rem; }
}

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

/* ---------------------------------------------------------------- risk grade
   Hexagon letter badge. Colors run cool to hot. */

:root {
    --grade-a: #2f6b4f;
    --grade-b: #5f7d3a;
    --grade-c: #86690f;
}
@media (prefers-color-scheme: dark) {
    :root { --grade-a: #7fc9a2; --grade-b: #b5cf82; --grade-c: #e2c25a; }
}

.grade {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2.25rem;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1;
    color: #fff;
    background: var(--info);
    flex: none;
}
.grade-a { background: var(--grade-a); }
.grade-b { background: var(--grade-b); }
.grade-c { background: var(--grade-c); }
.grade-d { background: var(--warn); }
.grade-f { background: var(--high); }
.grade-none { background: var(--rule); color: var(--ink-soft); }
@media (prefers-color-scheme: dark) {
    .grade:not(.grade-none) { color: #121729; }
}

.store-title { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.store-title .grade { width: 2.6rem; height: 2.9rem; font-size: 1.4rem; }
.store-title .kind { margin-left: 0; font-size: 0.8rem; }
/* R49: a name with no spaces ("Heiheiismyspiritanimal") breaks rather than running off a card on phones; in tables a
   long word breaks only once the column can't grow. */
.store-title > span, .h2h-name, .rival-name, .sr-card { min-width: 0; overflow-wrap: anywhere; }
td, th { overflow-wrap: break-word; }

.risk {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem;
    align-items: start;
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left: 5px solid var(--info);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.risk[data-grade="A"] { border-left-color: var(--grade-a); }
.risk[data-grade="B"] { border-left-color: var(--grade-b); }
.risk[data-grade="C"] { border-left-color: var(--grade-c); }
.risk[data-grade="D"] { border-left-color: var(--warn); }
.risk[data-grade="F"] { border-left-color: var(--high); }
.risk > .grade { width: 3.4rem; height: 3.8rem; font-size: 1.8rem; }
.risk h2 { margin-bottom: 0.3rem; }
.risk p { margin-bottom: 0.4rem; }
.risk-drivers span { white-space: nowrap; }
.risk { grid-template-columns: auto minmax(0, 1fr); }
@media (max-width: 34rem) {
    .risk { grid-template-columns: minmax(0, 1fr); }
    .risk-drivers span { white-space: normal; }
}
.risk .hint { margin: 0.4rem 0 0; }

/* ---------------------------------------------------------------- polish pass */

/* Every round's table uses the same columns, so winners line up down the page. */
.matches { table-layout: fixed; min-width: 44rem; }
.matches .col-table { width: 4.5rem; }
.matches .col-result { width: 6.5rem; }
.matches .col-time { width: 7.5rem; }
.matches .col-notes { width: 11rem; }

/* Badge and name stay together; the name wraps beside the badge, never under it. */
.who { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 100%; }
.who .wl { margin-right: 0; flex: none; }
.who + .who { margin-left: 0.6rem; }

/* A match nobody won: both players side by side, neutral, under neither header. */
.matches td.unplayed { color: var(--ink-soft); }
.matches td.unplayed a { color: var(--ink-soft); }
.unplayed .vs { margin: 0 0.5rem; font-size: 0.85rem; }
.unplayed .pending { margin-left: 0.9rem; color: var(--warn); font-style: italic; }

/* A thrown-out round stays visible but recedes. */
.round.repaired { background: transparent; border-style: dashed; }
.round.repaired > summary { color: var(--ink-soft); }
.round.repaired .round-name { font-size: 1rem; }

.events-table .event-col { min-width: 14rem; }

.opponents { table-layout: fixed; }
.opponents th:nth-child(2), .opponents td:nth-child(2) { width: 5.5rem; }
.opponents th:nth-child(4), .opponents td:nth-child(4) { width: 7rem; }
.opponents th:nth-child(3), .opponents td:nth-child(3) { width: 12rem; }
details.more { margin-top: 0.5rem; }
details.more > summary { cursor: pointer; color: var(--link); padding: 0.3rem 0; }
details.more table { border-top: 0; }

@media (max-width: 40rem) {
    th, td { padding: 0.5rem 0.55rem; }
    .matches { min-width: 36rem; }
    .matches .col-table { width: 3rem; }
    .matches .col-notes { width: 8rem; }
    .stats dd { font-size: 1.2rem; }
}

/* ---------------------------------------------------------------- tiers + region */

/* Tier chips: plain, stepped from quiet to gold, so "Legendary" reads as the top step. */
.tier {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--rule);
}
.tier + .tier::before { content: "→ "; font-weight: 400; color: var(--ink-soft); }
.tier + span:not(.tier) { margin-left: 0.25rem; }
.tier-below { background: var(--surface); color: var(--ink-soft); }
.tier-standard { background: var(--info-wash); color: var(--info); border-color: transparent; }
.tier-legendary { background: var(--gold-wash); color: var(--gold); border-color: var(--gold-bright); }
.tier-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.tier-summary .tier + .tier::before { content: none; }

.tier-table td.threshold { color: var(--ink-soft); }
.tier-table td.backed { font-weight: 700; }
.tier-table td.backed.gap { color: var(--high); }
.tier-table th[scope="row"] { white-space: nowrap; }

.region-table .block-hint { display: block; font-size: 0.8rem; margin-top: 0.1rem; font-weight: 400; }
.region-table tr.stands-out th, .region-table tr.stands-out td.num:first-of-type { font-weight: 700; }
.region-table tr.stands-out td.num:nth-of-type(1) { color: var(--high); }

.players-table tbody th { min-width: 10rem; }

/* Special event labels. Distinct from severity colours and from the gold used for winners. */
.kind {
    display: inline-block;
    margin-left: 0.35rem;
    font-family: var(--sans); /* R49: never the heading's serif beside an event's title */
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    vertical-align: 0.1em;
}
.kind-setchamp { background: #ece8f6; color: #4b3d7a; box-shadow: inset 0 0 0 1px #c9bfe6; }
.kind-prerelease { background: #e2f1ee; color: #1d5e52; box-shadow: inset 0 0 0 1px #b6dbd3; }
@media (prefers-color-scheme: dark) {
    .kind-setchamp { background: #2c2745; color: #cfc4f5; box-shadow: inset 0 0 0 1px #4a4170; }
    .kind-prerelease { background: #1c3632; color: #9fdccf; box-shadow: inset 0 0 0 1px #2f5c54; }
}
.page-head .kind { margin: 0 0 0.5rem; font-size: 0.85rem; }

/* Tier check: one bar per metric. Outline = what Play Hub reports, solid = backed by play
   (same convention as the monthly attendance bars); dashed ticks mark Standard and Legendary. */
.tier-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; font-size: 1.05rem; margin-bottom: 0.2rem; max-width: none; }
.tier-sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.6rem; }
.tier-bars { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.6rem 1.2rem 0.4rem; }
.tier-row {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) 11.5rem;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 0;
    border-top: 1px solid var(--rule);
}
.tier-row:first-child { border-top: 0; }
.tier-label { font-weight: 700; font-size: 0.95rem; }
.tier-track { position: relative; height: 1.4rem; margin-right: 0.6rem; }
.tier-rep { position: absolute; inset: 0 auto 0 0; border: 1.5px solid var(--link); border-radius: 4px; }
.tier-back { position: absolute; left: 0; top: 0.25rem; bottom: 0.25rem; background: var(--link); border-radius: 3px; }
.tier-tick { position: absolute; top: -0.4rem; bottom: -0.4rem; border-left: 1.5px dashed var(--ink-soft); }
.tier-ticklabel { position: absolute; top: -1.45rem; transform: translateX(-50%); font-size: 0.75rem; color: var(--ink-soft); white-space: nowrap; }
.tier-value { text-align: right; line-height: 1.3; }
.tier-number { display: block; font-family: var(--serif); font-size: 1.15rem; font-variant-numeric: lining-nums tabular-nums; }
.tier-of { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.tier-status { display: block; font-size: 0.82rem; color: var(--ink-soft); }
.tier-status.met { color: var(--grade-a); font-weight: 700; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.82rem; color: var(--ink-soft); margin: 0.7rem 0 0.4rem; max-width: none; }
.tier-legend .key { display: inline-block; width: 1.1rem; height: 0.65rem; margin-right: 0.4rem; vertical-align: -1px; border-radius: 2px; }
.tier-legend .key-rep { border: 1.5px solid var(--link); }
.tier-legend .key-back { background: var(--link); height: 0.5rem; }
.tier-legend .key-tick { width: 0; height: 0.8rem; border-left: 1.5px dashed var(--ink-soft); border-radius: 0; }
.tier-distance { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.15rem; white-space: normal; }

/* A bar that runs past the end of the axis ends in a jagged cut instead of stretching the scale. */
.tier-rep.off-scale { border-right: 0; border-radius: 4px 0 0 4px; }
.tier-rep.off-scale::after, .tier-back.off-scale::after {
    content: "";
    position: absolute;
    right: -0.45rem;
    top: -0.1rem;
    bottom: -0.1rem;
    width: 0.45rem;
    background:
        linear-gradient(135deg, var(--link) 25%, transparent 25%) 0 0 / 0.45rem 0.45rem,
        linear-gradient(45deg, var(--link) 25%, transparent 25%) 0 0 / 0.45rem 0.45rem;
    background-repeat: repeat-y;
}
.tier-back.off-scale::after { top: 0; bottom: 0; }
.tier-legend .key-cut {
    width: 0.45rem;
    background:
        linear-gradient(135deg, var(--link) 25%, transparent 25%) 0 0 / 0.45rem 0.45rem,
        linear-gradient(45deg, var(--link) 25%, transparent 25%) 0 0 / 0.45rem 0.45rem;
    border-radius: 0;
}
.tier-status.gap { color: var(--high); }

/* Narrow screens: name and numbers on one line, the bar full width underneath. Kept last so it wins. */
@media (max-width: 40rem) {
    .tier-bars { padding: 0.8rem 0.9rem 0.3rem; }
    .tier-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.5rem; }
    .tier-label { grid-row: 1; align-self: start; }
    .tier-value { grid-row: 1; }
    .tier-track { grid-column: 1 / -1; grid-row: 2; }
    .tier-row:first-child .tier-track { margin-top: 1.4rem; }
}

/* Lining, same-width figures so numbers stack and compare cleanly. */
.tier-number { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; font-variant-numeric: lining-nums tabular-nums; }
.tier-of { font-weight: 400; }
.tier-prereleases { margin: 0.4rem 0 0.2rem; }
.tier-prereleases > .hint { margin: 0.3rem 0 0.2rem; }
.tier-prereleases ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; font-size: 0.92rem; }
.tier-prereleases li { margin: 0.15rem 0; }
.tier-prereleases li .muted { display: inline-block; min-width: 8.5rem; }

/* ---------------------------------------------------------------- events tab */

.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg a { padding: 0.35rem 0.85rem; color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; border-left: 1px solid var(--rule); }
.seg a:first-child { border-left: 0; }
.seg a:hover { color: var(--ink); background: var(--paper); }
.seg a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--paper); box-shadow: inset 0 -2px 0 var(--ink); }

.season-row th { background: var(--paper); padding: 1.1rem 0.75rem 0.5rem; border-bottom: 1px solid var(--ink-soft); font-weight: 400; }
.season-row:first-child th { padding-top: 0.6rem; }
.season-name { font-family: var(--serif); font-size: 1.1rem; margin-right: 0.6rem; }
.season-meta { color: var(--ink-soft); font-size: 0.85rem; margin-right: 0.6rem; }
.req { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.05rem 0.55rem; border-radius: 999px; margin: 0.15rem 0.3rem 0.15rem 0; white-space: nowrap; }
.req-ok { background: #e2f1ee; color: #1d5e52; }
.req-warn { background: var(--warn-wash); color: var(--warn); }
.req-info { background: var(--info-wash); color: var(--info); }
@media (prefers-color-scheme: dark) { .req-ok { background: #1c3632; color: #9fdccf; } }

.events-table .kind { margin: 0 0.45rem 0 0; }
.events-table td.same { color: var(--ink-soft); }
.events-table .low { color: var(--high); font-weight: 700; }
.events-table .diff { color: var(--high); font-size: 0.75rem; margin-left: 0.2rem; }
.events-table tr.row-warn > :first-child { box-shadow: inset 4px 0 0 var(--warn); }
.events-table tr.row-high > :first-child { box-shadow: inset 4px 0 0 var(--high); }

.season-empty td { color: var(--ink-soft); font-style: italic; font-size: 0.9rem; padding: 0.6rem 0.75rem; }
/* On narrow screens the table scrolls sideways; keep season headings pinned to the visible area. */
.season-head { position: sticky; left: 0.75rem; display: inline-block; max-width: calc(100vw - 3.5rem); white-space: normal; }
.events-table { min-width: 56rem; }
@media (max-width: 40rem) {
    .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .seg a { border-left: 0; border-top: 1px solid var(--rule); text-align: center; }
    .seg a:nth-child(-n+2) { border-top: 0; }
    .seg a:nth-child(even) { border-left: 1px solid var(--rule); }
}

/* ---------------------------------------------------------------- sticky table headers
   A sticky header only sticks within its nearest scroll box. Wide screens: no sideways scroll box,
   so headers stick to the window. Narrow screens: the table scrolls sideways inside a box of limited
   height, and the header sticks inside that box. */
.sticky-head thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 2.75rem;
    background: var(--paper);
    box-shadow: inset 0 -1px 0 var(--rule);   /* borders disappear on sticky cells; draw the line instead */
}
/* Separate borders: with collapsed borders, sticky cells leave a sliver where rows show through. */
.sticky-head table { border-collapse: separate; border-spacing: 0; }
.sticky-head .season-row th {
    position: sticky;
    top: calc(2.75rem - 4px);   /* tuck under the column headers so rounding can't open a gap */
    z-index: 2;
    box-shadow: inset 0 -1px 0 var(--ink-soft);
}
@media (min-width: 60rem) {
    .table-wrap.sticky-head { overflow: visible; }
    .sticky-head table { border-radius: 0; }
}
@media (max-width: 59.99rem) {
    .table-wrap.sticky-head { max-height: 80vh; overflow: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
    .table-wrap.sticky-head > table { border: 0; }
}

/* ---------------------------------------------------------------- store header
   One card: name and grade, address, a one-line indexing status, and the tabs along the bottom edge.
   The selected tab takes the page colour, so it reads as opening onto the content below. */
.store-head { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 1.5rem; }
.store-head-main { padding: 1.3rem 1.5rem 1rem; }
.store-head .store-title { margin-bottom: 0.3rem; }
.store-head .meta { margin-bottom: 0.9rem; }

.icon { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.index-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-size: 0.9rem; color: var(--ink-soft); }
.index-icon { display: inline-flex; }
.index-icon.spinning .icon { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-job { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.live-job .job-status { color: var(--ink); font-weight: 700; }
.live-bar { display: inline-block; width: 9rem; height: 0.4rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.live-bar > span { display: block; height: 100%; background: var(--link); transition: width 0.4s ease; }
.live-note { font-size: 0.82rem; }
.job-done, .job-failed { margin-left: 0.5rem; }
.job-done::before, .job-failed::before { content: "\00b7"; margin-right: 0.5rem; }
.job-failed { color: var(--high); font-weight: 700; }

.index-panel > summary { list-style: none; cursor: pointer; }
.index-panel > summary::-webkit-details-marker { display: none; }
.button-like {
    display: inline-block; padding: 0.25rem 0.75rem; border: 1px solid var(--ink); border-radius: var(--radius);
    color: var(--ink); font-size: 0.85rem; white-space: nowrap;
}
.index-panel > summary:hover .button-like { background: var(--paper); }
.index-panel[open] { flex-basis: 100%; }
.index-panel[open] .button-like { background: var(--ink); color: var(--paper); }
.index-forms { margin-top: 0.9rem; padding: 1rem 1rem 0.2rem; background: var(--paper); border-radius: var(--radius); }
.index-forms .inline-form { margin-bottom: 0.8rem; }
/* Daily indexing limits: what's left today, next to the indexing buttons. */
.limit-note { flex-basis: 100%; margin: 0; color: var(--ink-soft); font-size: 0.85rem; }
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

.tab-count { font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); }
.tab-flag, .tab-running { font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--warn-wash); color: var(--warn); }
@media (max-width: 40rem) {
    .store-head-main { padding: 1rem 1rem 0.8rem; }
    .tab-flag, .tab-running { display: none; }
}
@media (prefers-reduced-motion: reduce) { .index-icon.spinning .icon { animation: none; } }

/* Icon and text stay together when the status line wraps. */
.index-text { display: inline-flex; align-items: flex-start; gap: 0.5rem; }
.index-text .index-icon { margin-top: 0.15rem; }

/* Several jobs can be listed at once: this store, then nearby stores waiting behind it. */
.live-jobs { display: flex; flex-direction: column; gap: 0.35rem; }
.live-job { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
.live-job .job-heading { color: var(--ink); font-weight: 700; }
.live-job .job-status { color: var(--ink); font-weight: 400; }
.live-job[data-state="Queued"] .job-status { color: var(--ink-soft); font-style: italic; }
.live-job[data-state="Queued"] .live-bar { display: none; }

/* ---------------------------------------------------------------- indexed stores (home) */
.store-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 0.9rem; }
.store-search { flex: 1 1 14rem; max-width: 20rem; }
.grade-chips { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.grade-chips button {
    padding: 0.25rem 0.8rem; border-radius: 999px; font-size: 0.85rem;
    background: var(--surface); color: var(--ink-soft); border: 1px solid var(--field-border);
}
.grade-chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.store-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: var(--ink-soft); }

.stores-table .risk-col { width: 5.5rem; }
.stores-table tbody th, .stores-table td { vertical-align: middle; }
.cell-sub { display: block; font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); margin-top: 0.1rem; }
.cell-sub.lifted { color: var(--warn); font-weight: 700; }
.flagged-count { color: var(--high); font-weight: 700; }
.issue-cell { font-size: 0.9rem; }
/* The score sits centred under the hexagon, so the letter stays the main thing. */
.grade-stack { display: inline-flex; flex-direction: column; align-items: center; gap: 0.2rem; min-width: 2.2rem; }
.grade-score { font-size: 0.72rem; line-height: 1; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.stores-table td.stale { color: var(--warn); font-weight: 700; }
.stores-table tr.no-match td { text-align: center; color: var(--ink-soft); font-style: italic; }
@media (max-width: 40rem) { .store-sort { margin-left: 0; } }

/* ---------------------------------------------------------------- players page */
.player-search { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 0.6rem; }
.player-search input { flex: 1 1 18rem; max-width: 26rem; }
.flag-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.6rem; margin: 1rem 0 1.2rem; }
.flag-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; text-align: left;
    padding: 0.65rem 0.85rem; border-radius: var(--radius); background: var(--surface); color: var(--ink);
    border: 1px solid var(--rule); cursor: pointer;
}
.flag-card b { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1.1; }
.flag-card span { font-size: 0.82rem; color: var(--ink-soft); }
.flag-card.high b { color: var(--high); }
.flag-card:hover { border-color: var(--ink-soft); filter: none; }
.flag-card[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.player-toolbar { display: flex; align-items: center; gap: 1rem; margin: 0 0 0.6rem; }
.players-list tbody th, .players-list td { vertical-align: middle; }
.home-field a { font-weight: 700; }

/* Teams: neutral context, so they get the calm purple rather than a warning colour. */
.team-pill { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0.02rem 0.5rem; border-radius: 999px; background: #ece8f6; color: #4b3d7a; vertical-align: 0.1em; }
@media (prefers-color-scheme: dark) { .team-pill { background: #2c2745; color: #cfc4f5; } }
.team-line { display: inline-flex; align-items: center; gap: 0.4rem; }
.team-members { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.flagged-heading { margin-top: 2.2rem; }

.team-pill.occasional { background: transparent; color: #4b3d7a; box-shadow: inset 0 0 0 1px #c9bfe6; }
@media (prefers-color-scheme: dark) { .team-pill.occasional { color: #cfc4f5; box-shadow: inset 0 0 0 1px #4a4170; } }
.team-roster { display: grid; gap: 0.6rem; margin: 0 0 1rem; }
.team-roster dt { font-weight: 700; }
.team-roster dd { margin: 0.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.roster-name { white-space: nowrap; }

/* ---------------------------------------------------------------- team attendance grid
   Members down, trips across. Few trips: fixed columns with the store under each date.
   Some: columns share the width. Many: fixed narrow columns, scrolls sideways with names pinned. */
.team-grid-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.5rem 0.8rem 0.7rem 0; }
.team-grid { border: 0; border-radius: 0; background: transparent; border-collapse: separate; border-spacing: 0; width: auto; }
.team-grid th, .team-grid td { border-bottom: 0; padding: 0.3rem 0.15rem; text-align: center; vertical-align: middle; }
.team-grid thead th { background: transparent; color: var(--ink-soft); font-weight: 400; font-size: 0.74rem; white-space: normal; vertical-align: bottom; line-height: 1.2; }
/* The pinned name column carries the box's left padding itself, so scrolled columns can't show beside it. */
.team-grid .tg-name { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; min-width: 10rem; padding: 0.3rem 0.9rem 0.3rem 0.8rem; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tg-role th { padding-left: 0.8rem; }
.team-grid .tg-count { text-align: right; padding-left: 0.8rem; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.tg-year { display: block; font-weight: 700; color: var(--ink); }
.tg-date { display: block; white-space: nowrap; }
.tg-store { display: block; font-size: 0.7rem; margin-top: 0.15rem; }
.few .tg-trip { width: 5.4rem; }
.some .team-grid { width: 100%; table-layout: fixed; }
.some .tg-name { width: 11rem; }
.some .tg-count { width: 3.5rem; }
.many .tg-trip { min-width: 2.4rem; }
.tg-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--link); vertical-align: middle; }
a.tg-dot:hover, a.tg-dot:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 30%, transparent); }
.tg-miss { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-soft); opacity: 0.55; vertical-align: middle; }
.tg-role th { text-align: left; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); padding-top: 0.75rem; border-bottom: 1px solid var(--rule); }
/* The row spans every column, so pin its text rather than the cell. */
.tg-role-label { position: sticky; left: 0.8rem; display: inline-block; }
.tg-role-label span { font-weight: 400; margin-left: 0.3rem; }
.tg-me > th, .tg-me > td { background: #eeedfe; }
@media (prefers-color-scheme: dark) { .tg-me > th, .tg-me > td { background: #2c2745; } }

.team-grid .tg-me > .tg-name { background: #eeedfe; }
@media (prefers-color-scheme: dark) { .team-grid .tg-me > .tg-name { background: #2c2745; } }

/* Grid header: month labels once, day numbers underneath. Absences are faint specks so the pattern of dots stands out. */
.team-grid .tg-month { text-align: center; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--rule); padding: 0.2rem 0.3rem; white-space: nowrap; }
.team-grid .tg-days th { padding-top: 0.25rem; }
.tg-miss { width: 0.2rem; height: 0.2rem; box-shadow: none; background: var(--ink-soft); opacity: 0.45; }
.h2-sub { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin-left: 0.5rem; }

/* ---------------------------------------------------------------- team trips by month
   Initials in a fixed order: purple = went, gold = won the event (the same gold as match winners),
   outline = didn't go. */
.team-key { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.8rem 1rem 0.5rem; margin-bottom: 1rem; }
.team-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; margin-bottom: 0.55rem; }
.team-key-role { flex: 0 0 5.5rem; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.team-key-member { display: inline-flex; align-items: center; gap: 0.4rem; }
.team-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.8rem; color: var(--ink-soft); margin: 0.2rem 0 0.3rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); max-width: none; }
.team-legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }

.ini {
    display: inline-grid; place-items: center; flex: none;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    font-size: 0.7rem; font-weight: 700; line-height: 1;
    background: var(--link); color: #fff;
}
.ini.won { background: var(--gold-bright); color: #1b2447; }
.ini.off { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); opacity: 0.7; }
.ini.is-me { outline: 2px solid var(--ink); outline-offset: 1px; }
.team-key .ini { width: 1.5rem; height: 1.5rem; font-size: 0.65rem; }
@media (prefers-color-scheme: dark) { .ini { color: #121729; } }

.team-trips { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.3rem 1rem 0.6rem; }
.team-month h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; margin: 0.9rem 0 0.3rem; }
.team-month h3 span { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; margin-left: 0.4rem; }
.team-trip { display: grid; grid-template-columns: 6.5rem minmax(8rem, 17rem) auto; justify-content: start; gap: 0.8rem; align-items: center; padding: 0.4rem 0; border-top: 1px solid var(--rule); }
.team-trip-date { color: var(--ink); text-decoration: none; white-space: nowrap; }
.team-trip-date:hover { text-decoration: underline; }
.team-trip-date span { color: var(--ink-soft); font-size: 0.85rem; margin-right: 0.35rem; }
.team-trip-store { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-trip-who { display: flex; gap: 0.3rem; }
.team-gap { font-size: 0.82rem; font-style: italic; color: var(--ink-soft); margin: 0.8rem 0 0; }
.team-more > summary { margin: 0.8rem 0 0.2rem; }
@media (max-width: 40rem) {
    .team-trip { grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 0.7rem; }
    .team-trip-who { grid-column: 1 / -1; }
    .team-key-role { flex-basis: 100%; }
}

/* Ratings: the number, with its uncertainty small beside it. */
.rating { font-variant-numeric: lining-nums tabular-nums; font-weight: 700; }
.rating small { font-weight: 400; color: var(--ink-soft); font-size: 0.75em; margin-left: 0.15rem; }
.rating.provisional { font-weight: 400; font-size: 0.82rem; color: var(--ink-soft); font-style: italic; }
.rating-line { display: inline-flex; align-items: baseline; gap: 0.35rem; }
.team-stats { margin: 0 0 0.6rem; }
.team-stats dd small { display: block; font-family: var(--sans); font-size: 0.75rem; color: var(--ink-soft); }
.team-h2h { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.9rem; color: var(--ink-soft); max-width: none; }
.team-h2h span { color: var(--ink); }

/* The small rating beside a name. */
.rating-tag { font-size: 0.72rem; font-weight: 400; color: var(--ink-soft); margin-left: 0.3rem; font-variant-numeric: lining-nums tabular-nums; }

/* ---------------------------------------------------------------- team member cards */
.team-roster-cards { margin-bottom: 0.9rem; }
.team-roster-role { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); margin: 0.9rem 0 0.4rem; }
.team-roster-role:first-child { margin-top: 0; }
.team-roster-role span { font-weight: 400; margin-left: 0.3rem; }
.member-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.55rem; }
.member-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.6rem 0.8rem 0.65rem; min-width: 0; }
.member-card.is-me { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.member-card-top { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.member-card-top a, .member-card-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card-nums { display: flex; gap: 1.2rem; margin-top: 0.5rem; font-size: 0.75rem; color: var(--ink-soft); }
.member-card-nums b { display: block; font-size: 1.05rem; font-weight: 700; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; }
.member-card-nums b.has-wins { color: var(--gold); }
.team-legend { margin: 0 0 0.5rem; padding-top: 0; border-top: 0; }

/* Two-letter initials. */
.ini { width: 1.9rem; height: 1.9rem; font-size: 0.68rem; letter-spacing: 0.01em; }

/* Against other teams. */
.team-h2h { margin: 0 0 1rem; }
.team-h2h > summary { font-weight: 700; }
.h2h-table { margin-top: 0.5rem; }
.rate-bar { display: inline-block; width: 5rem; height: 0.4rem; border-radius: 999px; background: var(--rule); overflow: hidden; vertical-align: middle; margin-right: 0.5rem; }
.rate-bar > span { display: block; height: 100%; background: var(--link); }
.rate-num { font-variant-numeric: lining-nums tabular-nums; }

/* Against other teams: heading on its own line, table underneath. */
details.team-h2h { display: block; margin: 0 0 1rem; }
details.team-h2h > summary { display: list-item; cursor: pointer; font-weight: 700; margin-bottom: 0.2rem; }
details.team-h2h > summary .muted { font-weight: 400; margin-left: 0.3rem; }
.h2h-table { width: auto; min-width: 26rem; }

/* ---------------------------------------------------------------- player header (same card as the store page) */
.player-head-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.8rem 2rem; }
.player-head-id { min-width: 0; }
.rating-badge { text-align: right; }
.rating-badge-num { font-family: var(--serif); font-size: 2.1rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.rating-badge-num small { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); margin-left: 0.2rem; }
.rating-badge-num.provisional { font-family: var(--sans); font-size: 1.1rem; font-style: italic; color: var(--ink-soft); }
.rating-badge-label { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.3rem; }
.head-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); margin: 0; border-top: 1px solid var(--rule); }
.head-strip > div { padding: 0.6rem 1.2rem; border-left: 1px solid var(--rule); }
.head-strip > div:first-child { border-left: 0; }
.head-strip dt { font-size: 0.75rem; color: var(--ink-soft); }
.head-strip dd { margin: 0.1rem 0 0; font-family: var(--serif); font-size: 1.15rem; font-variant-numeric: lining-nums tabular-nums; }
.head-strip dd.small { font-family: var(--sans); font-size: 0.85rem; padding-top: 0.2rem; }
@media (max-width: 40rem) {
    .rating-badge { text-align: left; }
    .head-strip > div { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 40rem) {
    .head-strip > div:last-child { grid-column: 1 / -1; }
}


/* ---------------------------------------------------------------- opponents */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0 0 0.6rem; }
.opponents th, .opponents td { vertical-align: middle; }
.opponents { min-width: 40rem; }
.opp-name { min-width: 10rem; max-width: 18rem; }
.opp-rec-col { min-width: 10rem; }
.opp-name a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.opp-record { font-variant-numeric: lining-nums tabular-nums; }

/* The opponents table sizes its columns to their contents (an older rule fixed them to equal widths,
   which clipped headers); long names are capped on the link itself. */
table.opponents { table-layout: auto; }
.opp-name a { max-width: 16rem; }

/* ---------------------------------------------------------------- players page (tabs) */
.summary-nums { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; color: var(--ink-soft); font-size: 0.92rem; margin: 0.2rem 0 0.9rem; max-width: none; }
.summary-nums b { color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin-right: 0.25rem; }
.players-head .player-search { margin-bottom: 0.3rem; }
.throwaway-groups { display: grid; gap: 0.6rem; }
.throwaway-group {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; align-items: center;
    padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--warn);
    border-radius: var(--radius); color: var(--ink); text-decoration: none;
}
.throwaway-group.big { border-left-color: var(--high); }
.throwaway-group:hover { border-color: var(--ink-soft); }
.twg-store { font-weight: 700; color: var(--link); }
.twg-place { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; margin-left: 0.4rem; }
.twg-count { grid-row: 1 / 3; grid-column: 2; text-align: right; font-family: var(--serif); font-size: 1.6rem; line-height: 1; }
.twg-count small { display: block; font-family: var(--sans); font-size: 0.72rem; color: var(--ink-soft); }
.twg-why { font-size: 0.85rem; color: var(--ink-soft); }
.all-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1rem; }
.all-filters input[type="search"] { flex: 1 1 12rem; max-width: 18rem; }
.all-filters label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin: 1rem 0; font-size: 0.9rem; }
.ratings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 1.5rem; align-items: start; }
.movers { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.9rem 1rem; }
.movers h2 { font-size: 1.1rem; margin: 0 0 0.3rem; }
.movers h3 { font-size: 0.85rem; color: var(--ink-soft); margin: 0.8rem 0 0.3rem; }
.mover-list { list-style: none; margin: 0; padding: 0; }
.mover-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem; align-items: baseline; padding: 0.3rem 0; border-top: 1px solid var(--rule); font-size: 0.9rem; }
.mover-list li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover { font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.mover.up { color: var(--grade-a); }
.mover.down { color: var(--high); }
@media (max-width: 52rem) { .ratings-layout { grid-template-columns: minmax(0, 1fr); } }

.flag-card { white-space: normal; min-width: 0; }
.flag-card span { overflow-wrap: anywhere; }
.leaderboard th:first-child, .leaderboard td:first-child { width: 2.5rem; padding-right: 0.4rem; }

/* ---------------------------------------------------------------- filter bar (All players) */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem;
    padding: 0.6rem 0.9rem; margin: 0 0 1rem;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.filter-count { font-size: 0.92rem; margin-right: 0.3rem; }
.filter-count b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.filter-field { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--ink-soft); }
.filter-field select { max-width: 15rem; padding-top: 0.35rem; padding-bottom: 0.35rem; font-size: 0.9rem; color: var(--ink); }
.filter-sort { margin-left: auto; }
.toggle-pill {
    position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none;
    padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.88rem;
    border: 1px solid var(--field-border); background: var(--surface); color: var(--ink-soft);
}
.toggle-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.toggle-pill:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.toggle-pill:has(input:checked)::before { content: "\2713"; margin-right: 0.35rem; font-size: 0.8rem; }
.toggle-pill:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 999px;
    background: var(--info-wash); color: var(--ink); text-decoration: none; font-size: 0.88rem;
}
.filter-chip span { color: var(--ink-soft); font-size: 1rem; line-height: 1; }
.filter-clear { font-size: 0.85rem; }
@media (max-width: 40rem) { .filter-sort { margin-left: 0; } .filter-field select { max-width: 11rem; } }

.leaderboard td.stale { color: var(--warn); }

.rating-badge-calc { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.1rem; font-variant-numeric: lining-nums tabular-nums; }

/* ---------------------------------------------------------------- area */
.area-pill {
    display: inline-flex; align-items: center; gap: 0.35rem; max-width: 22rem;
    padding: 0.25rem 0.75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.35);
    font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.area-pill .icon { width: 0.95rem; height: 0.95rem; }
.area-form { max-width: 48rem; }
.area-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1.2rem; }
.area-filter input { width: 100%; max-width: 26rem; }
.area-stores { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.5rem; }
.area-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 0.8rem; }
@media (max-width: 40rem) { .area-pill { max-width: 11rem; } }

.inline-set-area { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; font-size: inherit; cursor: pointer; }
.link-button:hover { filter: none; color: var(--ink); }
.outside-area { display: inline-block; margin-top: 0.15rem; font-size: 0.72rem; font-weight: 700; padding: 0 0.45rem; border-radius: 999px; background: var(--info-wash); color: var(--info); }

.show-older { margin: 0.8rem 0; text-align: center; }

a.flag-card { text-decoration: none; }

/* ---------------------------------------------------------------- site header
   Brand on the left, the two sections as tabs (the current one underlined in gold), and the area as its own
   control on the right, set off by a divider. */
.site-header {
    display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; gap: 0 1.5rem;
    padding: 0 1.5rem; min-height: 4rem;
    background: linear-gradient(180deg, #1f2a52 0%, #1b2447 100%);
    border-bottom: 3px solid var(--gold-bright);
    box-shadow: 0 2px 10px rgba(17, 22, 44, 0.18);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; align-self: center; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; color: #fff; letter-spacing: 0.01em; line-height: 1;
    /* Kyle (2026-10-18): the wordmark sat high beside the drop. Calistoga's line box puts the lowercase above the box's
       middle, and the drop's weight is in its round foot, so the name is nudged down to sit level with the drop's bulb. */
    position: relative; top: 0.08em; }
.brand-name span { color: var(--gold-bright); }
.site-nav { display: flex; align-items: stretch; gap: 0.25rem; margin-left: 1rem; }
.site-nav a {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 1rem;
    color: rgba(255, 255, 255, 0.78); text-decoration: none; opacity: 1; font-size: 0.98rem;
    border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.site-nav a[aria-current="page"] { color: #fff; font-weight: 700; border-bottom-color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-nav .icon { width: 1.15rem; height: 1.15rem; }

@media (max-width: 48rem) {
    .site-header { grid-template-columns: auto 1fr; padding: 0 1rem; gap: 0 0.5rem; }
    .site-nav { margin-left: 0; justify-content: flex-end; }
    .site-nav a { padding: 0 0.7rem; }
}
@media (max-width: 30rem) {
    .site-nav .icon { display: none; }
}

@media (max-width: 48rem) {
    .brand { padding: 0.75rem 0; }
    .site-nav a { padding: 0.75rem 0.75rem; }
}

/* ---------------------------------------------------------------- store players table */
.players-table tbody th, .players-table td { vertical-align: middle; }
.player-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; font-weight: 400; }
.team-label {
    display: inline-flex; align-items: center; gap: 0.3rem; max-width: 17rem;
    padding: 0.05rem 0.55rem 0.05rem 0.4rem; border-radius: 999px; font-size: 0.72rem;
    background: #ece8f6; color: #4b3d7a; text-decoration: none;
}
.team-label:hover { box-shadow: inset 0 0 0 1px #9d8fd6; }
.team-label.occasional { background: transparent; box-shadow: inset 0 0 0 1px #c9bfe6; }
.team-label .icon { width: 0.85rem; height: 0.85rem; }
.team-label-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-label-role { white-space: nowrap; }
@media (prefers-color-scheme: dark) {
    .team-label { background: #2c2745; color: #cfc4f5; }
    .team-label.occasional { background: transparent; box-shadow: inset 0 0 0 1px #4a4170; }
}
.ptag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.ptag.high { background: var(--high-wash); color: var(--high); }
.ptag.warn { background: var(--warn-wash); color: var(--warn); }
.ptag.info { background: var(--info-wash); color: var(--info); }
.share-bar { width: 4.5rem; }
.share-bar > span { background: var(--link); }
.no-show { color: var(--high); font-weight: 700; font-size: 0.8rem; }

/* ---------------------------------------------------------------- stores page */
.filter-search { flex: 0 1 12rem; }
.tier-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.6rem; margin: 0 0 1rem; }
.tier-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.7rem 0.9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.tier-card b { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; line-height: 1; }
.stores-table .risk-col { width: 4.5rem; }

/* ---------------------------------------------------------------- player labels
   Descriptive, never warnings: soft rounded chips, coloured by kind. Warnings keep their square look. */
.plabels { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.5rem 0 0.2rem; font-weight: 400; }
.plabels.small { gap: 0.25rem; margin: 0.3rem 0 0; }
.plabel {
    display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap;
    padding: 0.15rem 0.65rem 0.15rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; cursor: default;
}
.plabels.small .plabel { font-size: 0.68rem; padding: 0.05rem 0.5rem 0.05rem 0.4rem; }
.plabel .icon { width: 0.9rem; height: 0.9rem; }
.plabels.small .plabel .icon { width: 0.75rem; height: 0.75rem; }
.lbl-skill { background: #f8ecd4; color: #6b4708; }
.lbl-activity { background: #dcf1ea; color: #0b5344; }
.lbl-where { background: #e1edf8; color: #174a79; }
.lbl-role { background: #eeece6; color: #46453f; }
@media (prefers-color-scheme: dark) {
    .lbl-skill { background: #3a2e17; color: #f1cf8d; }
    .lbl-activity { background: #173a33; color: #9fdcc9; }
    .lbl-where { background: #1b3148; color: #a9cdf0; }
    .lbl-role { background: #34332f; color: #d4d1c7; }
}
.more-labels { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.more-labels > summary { list-style: none; cursor: pointer; font-size: 0.68rem; font-weight: 700; color: var(--ink-soft); padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid var(--field-border); }
.more-labels > summary::-webkit-details-marker { display: none; }
.more-labels[open] > summary { display: none; }
.label-filter { position: relative; }
.label-filter > summary { cursor: pointer; list-style: none; padding: 0.3rem 0.85rem; border-radius: 999px; border: 1px solid var(--field-border); font-size: 0.88rem; color: var(--ink-soft); }
.label-filter > summary::-webkit-details-marker { display: none; }
.label-filter[open] > summary { border-color: var(--ink-soft); color: var(--ink); }
.label-filter-panel {
    position: absolute; z-index: 20; top: calc(100% + 0.4rem); left: 0; width: min(34rem, 90vw);
    display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.7rem; background: var(--surface); border: 1px solid var(--rule);
    border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17, 22, 44, 0.16);
}

@media (max-width: 40rem) {
    .label-filter { width: 100%; }
    .label-filter-panel { position: static; width: auto; margin-top: 0.5rem; box-shadow: none; }
}

/* ---------------------------------------------------------------- attendance chart */
.chart-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.8rem 0.8rem 0.3rem; }
.attendance-chart { display: block; width: 100%; height: auto; min-width: 36rem; }
.attendance-chart text { font-size: 10px; fill: var(--ink-soft); font-family: var(--sans); }
.attendance-chart .att-registered { fill: var(--chart-soft); }
.attendance-chart .att-played { fill: var(--chart-strong); }
.eval-line { stroke: var(--high); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; font-size: 0.8rem; color: var(--ink-soft); margin: 0.4rem 0 0; }
.chart-legend span[class^="key-"] { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; margin-right: -0.5rem; vertical-align: middle; }
.chart-legend .legend-item { display: inline-flex; align-items: center; gap: 0.9rem; white-space: nowrap; }
.chart-legend .legend-item span[class^="key-"] { margin-right: -0.5rem; flex: none; }
.key-registered { background: var(--chart-soft); }
.key-played { background: var(--chart-strong); }
.key-eval { height: 0 !important; border-top: 2px dashed var(--high); border-radius: 0 !important; }

/* ---------------------------------------------------------------- for Players (R28): season facts */
/* Season facts for Players (R28, Kyle): neutral, never the tier check's warn colours. */
.season-fact { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.05rem 0.55rem; border-radius: 999px; margin: 0.15rem 0.3rem 0.15rem 0; white-space: nowrap; background: var(--surface); color: var(--ink-soft); border: 1px solid var(--rule); }

/* ---------------------------------------------------------------- player bundle */
.rating-chart { display: block; width: 100%; height: 11rem; min-width: 30rem; overflow: visible; }
.rating-chart .rating-adjusted { fill: none; stroke: var(--chart-strong); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rating-chart .rating-underlying { fill: none; stroke: var(--chart-soft); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rating-chart .season-line { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.rating-chart text { font-size: 10px; fill: var(--ink-soft); font-family: var(--sans); }
.key-adjusted { background: var(--chart-strong); height: 3px !important; }
.key-underlying { background: var(--chart-soft); height: 3px !important; }
.compare-form { display: flex; gap: 0.5rem; margin: 0 0 0.9rem; max-width: 36rem; }
.compare-form input { flex: 1; }
.rival-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.6rem; margin: 0 0 1rem; }
.rival-card { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 0.9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.rival-card:hover { border-color: var(--ink-soft); }
.rival-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.rival-name { font-weight: 700; color: var(--link); }
.rival-record { font-variant-numeric: lining-nums tabular-nums; }
.h2h-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.h2h-side { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.h2h-side:last-child { align-items: flex-end; text-align: right; }
.h2h-name { font-family: var(--serif); font-size: 1.5rem; }
.h2h-middle { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; text-align: center; }
.h2h-record { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.h2h-chance { font-size: 0.85rem; font-weight: 700; padding: 0.15rem 0.7rem; border-radius: 999px; background: var(--info-wash); }
.h2h-won { font-weight: 700; }
.choice-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.choice-list li { padding: 0.3rem 0; border-top: 1px solid var(--rule); }
/* R70: the face-off holds on phones: three columns, smaller names that wrap in their own half, one label each. */
@media (max-width: 40rem) {
    .h2h-grid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.6rem; }
    .h2h-name { font-size: 1.1rem; line-height: 1.2; }
    .h2h-record { font-size: 1.9rem; }
    .h2h-side .plabel ~ .plabel { display: none; }
    .h2h-side .plabel { white-space: normal; max-width: 100%; text-align: left; }
}

.notable-entrants { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0.2rem 0 1rem; max-width: none; }
.notable-entrants .plabels { margin: 0 0.4rem 0 0; }
.notable-group { margin: 0; }
.notable-group .plabels { display: inline-flex; vertical-align: middle; margin: 0 0.3rem 0 0; }

.stats dd small.below { display: block; font-family: var(--sans); font-size: 0.75rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- sign-in: user menu, welcome, agree, legal pages */
.site-header { grid-template-columns: auto 1fr auto; }
.site-header-plain { grid-template-columns: 1fr auto; }

.user-menu { position: relative; align-self: center; }
.user-menu summary {
    display: inline-flex; align-items: center; gap: 0.5rem; list-style: none; cursor: pointer;
    box-sizing: border-box; height: var(--topbar-pill);
    padding: 0 0.8rem 0 0.35rem; border-radius: 999px; color: #fff;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
}
.user-menu summary::-webkit-details-marker { display: none; }
/* Beta feedback: the account button says it opens. A chevron at its end (on phones beside the avatar alone), turned up
   while the menu is open. */
.user-menu-chevron { display: inline-flex; margin-left: -0.15rem; }
.user-menu-chevron .icon { width: 1rem; height: 1rem; transition: transform 0.15s ease; }
.user-menu[open] .user-menu-chevron .icon { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .user-menu-chevron .icon { transition: none; } }
.user-menu summary:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.32); }
.user-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.user-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; font-weight: 700; }
.user-menu-panel {
    position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 20; min-width: 14rem;
    padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--surface); color: var(--ink);
    border: 1px solid var(--rule); box-shadow: 0 8px 24px rgba(17, 22, 44, 0.18);
}
.user-menu-who { display: flex; flex-direction: column; }
.user-menu-who span { color: var(--ink-soft); font-size: 0.85rem; }
.user-menu-panel form { margin: 0; }

@media (max-width: 48rem) {
    .site-header { grid-template-columns: auto 1fr auto; }
    .site-header-plain { grid-template-columns: 1fr auto; }
    .user-name { display: none; }
    .user-menu summary { padding: 0 0.35rem; }
}

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.footer-links { display: inline-flex; gap: 1rem; }

.welcome { max-width: 38rem; margin: clamp(0.5rem, 4vw, 3rem) auto 0; }
.welcome h1 { margin-bottom: 0.75rem; }
.welcome-lede { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.welcome-note {
    padding: 0.6rem 0.9rem; border-radius: var(--radius); margin-bottom: 1.25rem;
    background: var(--warn-wash); color: var(--warn);
}
.discord-button {
    display: inline-flex; align-items: center; gap: 0.65rem; margin-bottom: 1rem;
    padding: 0.75rem 1.4rem; border-radius: var(--radius); font-weight: 700; font-size: 1.05rem;
    background: #5865f2; color: #fff; text-decoration: none;
}
.discord-button:hover { background: #4752c4; color: #fff; text-decoration: none; }
.discord-button .icon { width: 1.4rem; height: 1.4rem; }
.invite-id { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; user-select: all; overflow-wrap: anywhere; }

.agree-form { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 0.4rem; max-width: 40rem; }
.agree-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 1.02rem; cursor: pointer; }
.agree-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; }
/* R49: the main button, then the way out as a quiet button on the same row. */
.agree-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin-top: 0.2rem; }
.agree-actions button:not(.link-button) { padding: 0.65rem 1.5rem; font-weight: 700; }
.agree-signout { margin: 0; }

/* First-visit steps (R49): agree, which player, where you play share one layout: the header card with "Step 1 of 3"
   above the title, the step's form inside it, and the skip (a .link-button) with its "you can do this later" line at
   the card's foot. */
/* R49: a line in the header card about the page as a whole (a quiet area), under the summary numbers. */
.head-note { margin: 0.2rem 0 0.4rem; font-size: 0.9rem; color: var(--ink-soft); }
.open-store { margin-bottom: 0.4rem; }
/* R49: Account's "Change where you live": the saved answer is said, the form opens under it. */
.acct-change > summary { width: fit-content; cursor: pointer; color: var(--link); font-weight: 700; }
.acct-change[open] > summary { margin-bottom: 0.4rem; }
/* R49: You before a claim: what the page becomes, in words (the same for everyone). */
.you-preview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.you-preview-list li { display: grid; gap: 0.2rem; }
.you-preview-list span { color: var(--ink-soft); font-size: 0.95rem; }
.step-note { margin: 0 0 0.35rem; font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.step-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin: 1rem 0 0; padding-top: 0.8rem;
    border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--ink-soft); }
.step-foot p { margin: 0; }
.step-head .you-private { margin: 0.8rem 0 0; }

/* The landing page (R8): wider than the sign-in steps, with a short list of what players get. */
.welcome-landing { max-width: 44rem; }
.welcome-landing + .welcome-landing { margin-top: 2.5rem; }
.welcome-landing h2 { margin-top: 1.75rem; }
.welcome-kicker { margin: 0 0 0.4rem; color: var(--gold); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; }
.welcome-features {
    list-style: none; margin: 0 0 1.25rem; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem;
}
.welcome-features li { display: flex; flex-direction: column; gap: 0.2rem; }
.welcome-features span { color: var(--ink-soft); font-size: 0.95rem; }
.welcome-kofi {
    display: inline-block; padding: 0.6rem 1.2rem; border-radius: var(--radius); font-weight: 700;
    background: var(--gold-bright); color: #1b2447; text-decoration: none;
}
.welcome-kofi:hover { filter: brightness(1.05); color: #1b2447; text-decoration: none; }

/* Hiding a player page (R8). */
.player-hide-link { margin-top: 2rem; }
.hide-direct { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 1rem; margin-bottom: 1.25rem; }
.hide-direct input { max-width: 12rem; }

.legal { max-width: 44rem; }
.legal h2 { margin-top: 1.75rem; }

/* ---------------------------------------------------------------- roles: user menu role, seeing it as a Player, Investigators only */
.view-as-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 1rem;
    padding: 0.55rem 0.9rem; border-radius: var(--radius); background: var(--warn-wash); color: var(--ink);
    font-size: 0.9rem;
}
.for-investigators {
    padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--surface);
}
.for-investigators h2 { margin-top: 0; }
.for-investigators p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- activity and audit log (R6) */
.act-people { padding-left: 1.2rem; }
.audit-filters input[type="search"] { width: 11rem; }
.audit-list td { vertical-align: top; }
@media (max-width: 640px) {
    .audit-filters input[type="search"] { width: 100%; }
    .audit-filters .filter-field { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- Investigator requests (the form, its status, the admin queue) */
.ireq-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1rem; }
.ireq-field { display: flex; flex-direction: column; gap: 0.3rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.ireq-label { font-weight: 700; padding: 0; }
.ireq-field .hint { font-weight: 400; }
.ireq-field input[type="text"], .ireq-field textarea {
    width: 100%; padding: 0.5rem 0.65rem; border: 1px solid var(--field-border); border-radius: var(--radius);
    background: var(--surface); font: inherit; color: inherit; line-height: 1.4;
}
.ireq-field textarea { resize: vertical; }
.ireq-choices { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.2rem; }
.ireq-choice { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.ireq-status {
    padding: 0.75rem 1rem; border-radius: var(--radius); border: 1px solid var(--rule); border-left: 4px solid var(--info);
    background: var(--surface); margin: 0.5rem 0 1rem;
}
.ireq-status p { margin: 0.25rem 0; }
.ireq-status.ireq-declined { border-left-color: var(--loss); }
.ireq-note { white-space: pre-line; }
.ireq-note span { color: var(--ink-soft); }
.ireq-sent { margin: 0 0 1rem; }
.ireq-sent dt { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }
.ireq-sent dd { margin: 0.1rem 0 0; }
.ireq-text { white-space: pre-line; overflow-wrap: anywhere; }
.ireq-card {
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 1rem 1.25rem; margin-bottom: 1rem; max-width: 48rem;
}
.ireq-who { display: flex; gap: 0.8rem; align-items: flex-start; }
.ireq-who .user-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ireq-name { margin: 0; display: flex; flex-wrap: wrap; gap: 0 0.5rem; align-items: baseline; }
.ireq-name span { color: var(--ink-soft); font-size: 0.9rem; }
.ireq-facts { margin: 0.15rem 0 0; display: flex; flex-wrap: wrap; gap: 0.1rem 1rem; color: var(--ink-soft); font-size: 0.88rem; }
.ireq-decide { display: flex; flex-direction: column; gap: 0.6rem; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
.ireq-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ireq-table td .cell-sub { display: block; }
.ireq-yes { color: var(--ink); }
.ireq-no { color: var(--ink-soft); }
.ireq-remove summary { cursor: pointer; color: var(--link); white-space: nowrap; }
.ireq-remove form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; min-width: 16rem; }

/* ---------------------------------------------------------------- your account: download and delete (R7) */
button.acct-delete { background: var(--high); border-color: var(--high); color: #fff; }

/* ---------------------------------------------------------------- admin dashboard (R10) */
.adm-switch {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin: 0.6rem 0 1rem;
    padding: 0.75rem 1rem; border: 1px solid var(--rule); border-left: 4px solid var(--info); border-radius: var(--radius);
    background: var(--surface);
}
.adm-switch p { margin: 0; flex: 1 1 22rem; }
.adm-switch-paused { border-left-color: var(--warn); background: var(--warn-wash); }
.adm-paused-note b { color: var(--warn); }
.adm-full { color: var(--warn); font-weight: 700; }
.adm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0.8rem 0; }
.adm-inline button { display: inline-flex; align-items: center; gap: 0.4rem; }
.adm-health { list-style: none; padding: 0; margin: 0.4rem 0; }
.adm-health li { padding: 0.35rem 0.7rem; margin: 0.3rem 0; border-left: 4px solid var(--info); background: var(--surface); border-radius: var(--radius); }
.adm-health .adm-health-degraded { border-left-color: var(--warn); }
.adm-health .adm-health-unhealthy { border-left-color: var(--high); background: var(--high-wash); }
.adm-role summary { cursor: pointer; color: var(--link); white-space: nowrap; }
.adm-role form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; min-width: 16rem; max-width: 32rem; }
.adm-approve { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 1rem; margin: 0.8rem 0 1rem; }
.adm-approve .ireq-field { flex: 1 1 14rem; }
.adm-approve input[type="text"], .adm-role input[type="text"] {
    padding: 0.45rem 0.6rem; border: 1px solid var(--field-border); border-radius: var(--radius); background: var(--surface);
}
.adm-limits input[type="number"], .adm-cap input[type="number"] {
    width: 8rem; padding: 0.35rem 0.5rem; border: 1px solid var(--field-border); border-radius: var(--radius); background: var(--surface);
}
.adm-limits th[scope="row"] { text-align: left; }
.adm-cap { margin: 1rem 0 0.5rem; }

/* ---------------------------------------------------------------- accessibility and phones (R15)
   Focus shows on the dark header too; tabs inside scrolling rows draw their ring inside, where it can't be clipped;
   warnings (.ptag) are square and outlined so they never read as labels (.plabel, rounded, with an icon) by colour
   alone; finding chips differ by weight and outline as well as colour; and things you tap are at least 24px. */
.site-header :focus-visible { outline-color: var(--gold-bright); }
.tabs a:focus-visible, .seg a:focus-visible, .site-nav a:focus-visible { outline-offset: -3px; }

.ptag { border-radius: 3px; box-shadow: inset 0 0 0 1px currentColor; }
.finding-chips .sev-warn { box-shadow: inset 0 0 0 1px var(--warn); }
.finding-chips li.rv-common.sev-warn { box-shadow: inset 0 0 0 1px var(--rule); }
/* A member who didn't go is an outline, not faded text (which fell below AA contrast). */
.ini.off { opacity: 1; }

.more-labels > summary { display: inline-flex; align-items: center; min-height: 1.5rem; min-width: 1.5rem; justify-content: center; }
.footer-links a, .mover-list li a, .finding-links a { display: inline-block; padding: 0.2rem 0; }
.label-filter > summary, .toggle-pill { min-height: 2rem; }
.inline-form label.check input, .agree-check input, .ireq-choice input { width: 1.15rem; height: 1.15rem; }

/* Charts: the numbers behind them, for screen readers and anyone who'd rather read a table. */
.chart-data { margin-top: 0.5rem; }
.chart-data > summary { cursor: pointer; color: var(--link); padding: 0.3rem 0; font-size: 0.9rem; }
.chart-data table { margin-top: 0.4rem; }

@media (max-width: 48rem) {
    .site-header .user-menu { grid-row: 1; grid-column: 3; }
    button { white-space: normal; }
}
@media (max-width: 30rem) {
    .site-header { gap: 0 0.25rem; }
    .site-nav a { padding: 0.75rem 0.55rem; }
}

/* ---------------------------------------------------------------- shared components (R21)
   One of each, used everywhere; docs/STYLE.md says which to use when. Page-specific rules above adjust these, never
   replace them. */

/* Zeros: plain in numbers (the default, --sans), slashed in names, IDs and anything people type or copy. Player and
   store links are names; tabs, pagers and "show more" links that point at those pages carry numbers instead. */
:where(input, textarea, .ident, .user-name, .user-menu-who, .invite-id, a[href^="/player/"], a[href^="/store/"]) { font-family: var(--sans-slashed); }
:where(.pager, .show-older, h1, h2, h3, .h2h-name) :where(a, .ident) { font-family: inherit; }
/* A tile that links to a player carries numbers (a record); only the name inside keeps the slash. */
a.rival-card { font-family: var(--sans); }
.rival-name { font-family: var(--sans-slashed); }

/* Analysis catching up: a slim bar under the site header, on the pages whose numbers it affects. */
.status-bar {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0;
    padding: 0.45rem clamp(1rem, 4vw, 2.5rem); font-size: 0.88rem; text-align: center;
    background: var(--info-wash); color: var(--ink); border-bottom: 1px solid var(--rule);
}
.status-bar .icon { animation: spin 2.4s linear infinite; color: var(--info); }
@media (prefers-reduced-motion: reduce) { .status-bar .icon { animation: none; } }

/* Header card: every page opens with one (.store-head, the name it started with). Title, one context line
   (.area-note or .meta), summary numbers (.summary-nums), actions (.head-actions). R118: only the first-visit steps and the
   few headers that haven't moved to the section band use it. */
.store-head { margin-bottom: var(--section-gap); }
.store-head-main > :last-child { margin-bottom: 0; }
.store-head .area-note, .store-head .meta { font-size: 0.9rem; margin: 0 0 0.8rem; }
.store-head .summary-nums { margin: 0 0 0.9rem; }
.head-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; }
.head-title h1 { margin: 0 0 0.3rem; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 0.9rem; }
.head-actions form { margin: 0; }
.head-actions .index-panel[open] { flex-basis: 100%; }
.summary-nums b { font-variant-numeric: lining-nums tabular-nums; }

/* Buttons: primary (filled), secondary (outlined) and quiet (a link that does a button's job), all at one height;
   .compact for filter bars and table rows. <button> is primary unless it says otherwise; a link styled as a button
   uses .btn. */
button, .btn, .button-like {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    min-height: var(--control); padding: 0 1rem; line-height: 1.2;
    border: 1px solid var(--ink); border-radius: var(--radius); font-size: 1rem;
    background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.15); color: var(--paper); }
button.secondary, .btn.secondary, .button-like { background: var(--surface); color: var(--ink); }
button.secondary:hover, .btn.secondary:hover, .index-panel > summary:hover .button-like { background: var(--paper); color: var(--ink); filter: none; }
button.compact, .btn.compact, .button-like { min-height: var(--control-compact); padding: 0 0.8rem; font-size: 0.9rem; }
/* Accent: a filled button in the link colour, for the one action on a view that should be noticed ("This is me"). */
button.accent, .btn.accent { background: var(--link); border-color: var(--link); color: #fff; }
button.accent:hover, .btn.accent:hover { filter: brightness(1.12); color: #fff; }
@media (prefers-color-scheme: dark) { button.accent, .btn.accent, button.accent:hover, .btn.accent:hover { color: #121729; } }
button.link-button { min-height: 0; padding: 0; border: 0; background: none; color: var(--link); display: inline; }
input[type="text"], input[type="search"], input[type="date"], input[type="number"], select { min-height: var(--control); }
.discord-button, .welcome-kofi { min-height: var(--control); }

/* Tabs along the bottom of the header card. Counts are plain; at most one tinted pill says something needs
   attention (its number, with the word for screen readers and on hover). A row that scrolls sideways fades at the
   edge that has more. */
.tab-count { font-variant-numeric: lining-nums tabular-nums; }
.tab-flag { font-size: 0.75rem; font-weight: 700; min-width: 1.5rem; padding: 0.05rem 0.45rem; border-radius: 999px; text-align: center; background: var(--warn-wash); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.tab-running { background: var(--info-wash); color: var(--info); box-shadow: inset 0 0 0 1px var(--info); }
@media (max-width: 40rem) {
    .tab-flag, .tab-running { display: inline-block; }
}

/* Tiles: a row of numbers you can click to filter (.flag-card) or just read (.tier-card). Rows are always full:
   Ui.Tiles picks how many go on a row so they share out evenly (7 is 4 + 3, never 6 + 1), and tiles grow to fill
   their row. Zero counts don't get a tile; they go in the quieter .tiles-none line underneath. */
.tiles { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 0.6rem; }
.tiles > * { flex: 1 1 calc((100% - (var(--per) - 1) * 0.6rem) / var(--per)); min-width: 0; }
.tiles.per-1 { --per: 1; } .tiles.per-2 { --per: 2; } .tiles.per-3 { --per: 3; }
.tiles.per-4 { --per: 4; } .tiles.per-5 { --per: 5; } .tiles.per-6 { --per: 6; }
@media (max-width: 60rem) { .tiles.per-5, .tiles.per-6 { --per: 3; } }
@media (max-width: 40rem) {
    .tiles:not(.per-1) { --per: 2; gap: 0.45rem; }
    .tiles .flag-card, .tiles .tier-card { padding: 0.5rem 0.7rem; }
    .tiles .flag-card b, .tiles .tier-card b { font-size: 1.25rem; }
}
.tiles-none { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 1rem; }

/* Stat strips (dl.stats, the player header's .head-strip): cells grow to fill the last row, so none is left
   half-empty. Numbers in the display face use lining, same-width figures. */
.stats, dl.sg-facts { display: flex; flex-wrap: wrap; }
.stats > div { flex: 1 1 9.5rem; }
dl.sg-facts > div { flex: 1 1 min(100%, 13rem); }
.stats dd, .head-strip dd, .sg-facts dd b, .flag-card b, .tier-card b, .twg-count, .h2h-record, .filter-count b { font-variant-numeric: lining-nums tabular-nums; }
.stats dd.text { font-family: var(--sans); font-size: 0.95rem; padding-top: 0.35rem; }

/* Filter bar (R21, polished in R38): count and search on the left, filters in the middle, sort on the right. Lay the
   form out in three spans (.fb-main, .fb-filters, .fb-sort); a bar without them keeps the plain wrapping row.
   - Wide: one row. The count and search never wrap apart, and the sort keeps to the right.
   - Tablets: count and search, then sort on the right; the filters on a row of their own.
   - Phones: the count with the sort beside it, the search full width, then the filters.
   Every control is the compact height, the same font size and edge, sized to its content (never stretched). */
.filter-bar:has(> .fb-main) { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: 0.6rem 1.2rem; }
.fb-main, .fb-filters, .fb-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; }
.fb-main { flex-wrap: nowrap; }
.fb-sort { justify-content: flex-end; }
.fb-sort .filter-sort { margin-left: 0; }
.filter-bar .filter-count { white-space: nowrap; margin-right: 0; }
.filter-bar input[type="search"], .filter-bar select {
    min-height: var(--control-compact); padding-top: 0.2rem; padding-bottom: 0.2rem; font-size: 0.9rem;
}
.filter-bar .filter-search { flex: 0 1 14rem; width: 14rem; min-width: 9rem; }
.filter-bar select { width: auto; max-width: 13rem; }
.filter-bar button { min-height: var(--control-compact); padding-top: 0; padding-bottom: 0; font-size: 0.9rem; }
.filter-bar .toggle-pill, .filter-bar .label-filter > summary, .filter-bar .seg a { font-size: 0.88rem; }
.filter-bar .filter-field { white-space: nowrap; }
@media (max-width: 60rem) {
    .filter-bar:has(> .fb-main) { grid-template-columns: minmax(0, 1fr) max-content; }
    .fb-filters { grid-column: 1 / -1; grid-row: 2; }
    .fb-filters:empty { display: none; }
}
@media (max-width: 40rem) {
    .filter-bar:has(> .fb-main) { grid-template-columns: minmax(0, 1fr) max-content; gap: 0.6rem 0.75rem; }
    .fb-main { display: contents; }
    .fb-main .filter-count { grid-column: 1; grid-row: 1; }
    .fb-sort { grid-column: 2; grid-row: 1; justify-content: flex-end; }
    .fb-main .filter-search { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; }
    .fb-main > :not(.filter-count):not(.filter-search) { grid-column: 1 / -1; }
    .fb-filters { grid-column: 1 / -1; grid-row: auto; }
    .fb-sort .filter-field > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .filter-bar select { max-width: 11rem; }
    /* A segmented control in a bar is one row on phones: its parts share the width, never wrap their words, and the
       row scrolls sideways if it's still too long. */
    .filter-bar .seg { display: flex; width: 100%; overflow-x: auto; }
    .filter-bar .seg a { flex: 1 0 auto; border-top: 0; border-left: 1px solid var(--rule); padding: 0 0.5rem; white-space: nowrap; font-size: 0.84rem; }
    .filter-bar .seg a:first-child { border-left: 0; }
    /* Four or more parts don't fit one phone row: two a row, as a grid. */
    .filter-bar .seg:has(> a:nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
    .filter-bar .seg:has(> a:nth-child(4)) a { border-left: 0; border-top: 1px solid var(--rule); }
    .filter-bar .seg:has(> a:nth-child(4)) a:nth-child(-n+2) { border-top: 0; }
    .filter-bar .seg:has(> a:nth-child(4)) a:nth-child(even) { border-left: 1px solid var(--rule); }
    .filter-bar .label-filter { width: auto; }
    /* A long count ("150 players · showing 1-100") wraps rather than running under the sort. */
    .fb-main .filter-count { white-space: normal; min-width: 0; }
    /* Several labelled searches (the audit log): labels in one column so the fields line up. */
    .fb-filters .filter-field:has(input[type="search"]) { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); width: 100%; }
    .fb-filters .filter-field input[type="search"] { width: 100%; }
}

/* Segmented control: one choice of a few (event type, sort teams by). A toggle (.toggle-pill, or a link styled as one
   with aria-pressed) turns one filter on and off. Both sit in the filter bar at the compact height. */
.seg a { display: inline-flex; align-items: center; justify-content: center; min-height: calc(var(--control-compact) - 2px); padding: 0 0.85rem; }
.toggle-pill, .label-filter > summary { min-height: var(--control-compact); }
a.toggle-pill { text-decoration: none; }
a.toggle-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
a.toggle-pill[aria-pressed="true"]::before { content: "\2713"; margin-right: 0.35rem; font-size: 0.8rem; }
a.toggle-pill:hover { border-color: var(--ink-soft); color: var(--ink); }
a.toggle-pill[aria-pressed="true"]:hover { color: var(--paper); }

/* Sections: every section of a page is a .block with the same space above it; a heading's hint sits right under it. */
.block > h2:not(:first-child), .block > section > h2:not(:first-child) { margin-top: var(--section-gap); }
h2 + .hint { margin-top: -0.15rem; }
h2 .count { font-size: 0.8rem; vertical-align: 0.2em; margin-left: 0.2rem; }

/* Empty states: one component, a sentence and (where there is one) the next step, in a quiet dashed box with an
   icon. Any <p class="empty"> gets it. */
p.empty, .empty-state {
    display: flex; align-items: flex-start; gap: 0.6rem; margin: 0 0 1rem; padding: 0.85rem 1rem;
    background: var(--surface); border: 1px dashed var(--field-border); border-radius: var(--radius);
    color: var(--ink-soft); font-style: normal;
}
p.empty::before, .empty-state::before {
    content: ""; flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13l3-8h12l3 8v6H3zM3 13h5l1 2h6l1-2h5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13l3-8h12l3 8v6H3zM3 13h5l1 2h6l1-2h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.all-clear { border-color: var(--field-border); }
/* Inside a card or a round an empty line stays a line. */
.round > p.empty, .for-investigators p.empty, .movers p.empty { display: block; padding: 0 1rem 0.8rem; border: 0; background: none; }
.round > p.empty::before, .for-investigators p.empty::before, .movers p.empty::before { content: none; }

/* The account menu: who you are (avatar, name, username, role), then groups of full-width items with an icon each,
   divided by rules; a waiting count is a pill at the item's end; the actions (see it as a Player, sign out) come last
   and look like the other items, not like page buttons. */
.user-menu-panel { min-width: 17rem; padding: 0.4rem; }
.menu-who { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.1rem 0.7rem; padding: 0.55rem 0.6rem 0.7rem; }
.menu-who .user-avatar { grid-row: 1 / 3; width: 2.5rem; height: 2.5rem; }
.menu-who .user-menu-who { margin: 0; min-width: 0; }
.menu-who .user-menu-who strong, .menu-who .user-menu-who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-role { grid-column: 2; justify-self: start; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--info-wash); color: var(--info); }
.menu-note { margin: 0 0.6rem 0.5rem; padding: 0.4rem 0.6rem; border-radius: var(--radius); background: var(--warn-wash); color: var(--ink); font-size: 0.85rem; }
.menu-hint { margin: 0.3rem 0.6rem 0.2rem; color: var(--ink-soft); font-size: 0.82rem; }
.menu-group { list-style: none; margin: 0; padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.menu-group form { margin: 0; }
.menu-heading { margin: 0; padding: 0.55rem 0.6rem 0.1rem; border-top: 1px solid var(--rule); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.menu-heading + .menu-group { border-top: 0; padding-top: 0.1rem; }
.user-menu-panel .menu-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 0.65rem; width: 100%; min-height: 2.25rem;
    padding: 0 0.6rem; border: 0; border-radius: var(--radius); background: none; color: var(--ink);
    font-size: 0.95rem; font-weight: 400; text-align: left; text-decoration: none; cursor: pointer;
}
.user-menu-panel .menu-item:hover, .user-menu-panel .menu-item:focus-visible { background: var(--paper); color: var(--ink); filter: none; }
.user-menu-panel .menu-item .icon { width: 1.05rem; height: 1.05rem; color: var(--ink-soft); }
.menu-count { margin-left: auto; min-width: 1.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; text-align: center; font-size: 0.75rem; font-weight: 700; background: var(--warn-wash); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }

@media (min-width: 48.01rem) and (max-width: 56rem) {
    .site-header .user-name { display: none; }
    .site-header .user-menu summary { padding: 0 0.35rem; }
}

/* Stores → Indexing: your limits (a meter each) and the automatic updates, as two cards side by side. */
.index-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; margin: 0 0 1rem; }
.index-overview .card > h2 { font-size: 1.1rem; margin-bottom: 0.7rem; }
.limit-meters { list-style: none; margin: 0 0 0.7rem; padding: 0; display: grid; gap: 0.65rem; }
.limit-meters li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; align-items: baseline; }
.lm-label { font-size: 0.92rem; }
.lm-left { font-size: 0.85rem; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.lm-left b { color: var(--ink); font-size: 1rem; }
.lm-bar { grid-column: 1 / -1; display: block; height: 0.45rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.lm-bar > span { display: block; height: 100%; background: var(--link); }
.refresh-status { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 0 0.6rem; }
.refresh-status .icon { margin-top: 0.2rem; color: var(--grade-a); }
.index-overview .card .hint:last-child, .index-overview details.more { margin-bottom: 0; }
.jobs h2 { font-size: 1.1rem; }

/* Your area: the header card holds the radius and the two quick choices; the stores fill the page's width, and a long
   name wraps inside its tile instead of spilling out. */
.area-form { max-width: none; }
.head-actions select { min-height: var(--control-compact); padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 0.9rem; }
.area-filter input { width: 100%; max-width: none; }
.area-filter { flex: 0 1 22rem; }
.area-stores { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.6rem; margin: 0; }
.area-stores li { display: grid; }
.area-stores li[hidden] { display: none; }

/* Players → Ratings (R21, Kyle): the leader and the spread of the field side by side, the movers as tiles, then the
   leaderboard with a bar for each rating and its four-week change. Gold is the leader's (gold is for winners). */
.rt-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; margin: 0 0 1.25rem; }
.rt-label, .card > h2.rt-label { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 0.6rem; }
.rt-first { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; align-items: center; padding-bottom: 0.7rem; }
.rt-crown { display: inline-flex; color: var(--gold); }
.rt-crown .icon { width: 1.7rem; height: 1.7rem; }
.rt-first-name { font-weight: 700; font-size: 1.15rem; }
.rt-first-rating .rating { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1; color: var(--gold); }
/* Facts: each one whole, on one line; a long line drops a whole fact to the next line, never splits one. */
.rt-facts { display: flex; flex-wrap: wrap; gap: 0.1rem 0; margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.rt-facts > span { white-space: nowrap; }
.rt-facts > span:first-child { white-space: normal; overflow-wrap: anywhere; }   /* a long store name wraps, never past a phone */
.rt-facts > span:not(:last-child)::after { content: "\00b7"; margin: 0 0.45rem; }
.rt-next { list-style: none; margin: 0; padding: 0; }
.rt-next li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: baseline; padding: 0.45rem 0; border-top: 1px solid var(--rule); counter-increment: rt; }
.rt-next { counter-reset: rt 1; }
.rt-next li::before { content: counter(rt); font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); }
.rt-next-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-next-rating .rating { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.rt-spread-chart { display: block; width: 100%; height: auto; }
.rt-axis { display: flex; justify-content: space-between; margin: 0.15rem 0 0.3rem; font-size: 0.78rem; color: var(--ink-soft); }
.rt-bin { fill: var(--chart-soft); }
.rt-bin-top { fill: var(--chart-strong); }
.rt-top-line { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.rt-spread .chart-data { margin-top: 0.3rem; }
.rt-movers-h { margin-top: 0; }
.rt-movers { margin-bottom: 1.25rem; }
.rt-mover { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.65rem 0.85rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); min-width: 0; }
.rt-mover a { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-mover-title { font-size: 0.78rem; color: var(--ink-soft); }
.rt-mover .mover { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.rt-rank-first { color: var(--gold); font-weight: 700; }
.rt-home { margin-left: 0.5rem; font-size: 0.82rem; font-weight: 400; color: var(--ink-soft); }
.rt-rating-cell { display: inline-grid; grid-template-columns: 3.2rem 5.5rem; gap: 0.6rem; align-items: center; }
.rt-bar { display: block; height: 0.4rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.rt-bar > span { display: block; height: 100%; background: var(--link); }
.rt-board .mover { font-weight: 700; }
.rt-board tbody th { min-width: 9.5rem; }
@media (max-width: 52rem) { .rt-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) {
    .rt-rating-cell { grid-template-columns: auto; }
    .rt-bar { display: none; }
    .rt-home { display: block; margin: 0.1rem 0 0; }
}

/* Tier check rows (R21, Kyle, option B): the threshold labels in a header row over every bar, and each row's numbers
   on one line (backed of reported, the shortfall as a tag, the next tier), so rows are one height and line up. */
.tier-row { grid-template-columns: 8.5rem minmax(0, 1fr) 21rem; }
@media (max-width: 60rem) { .tier-row { grid-template-columns: 8rem minmax(0, 1fr) 17rem; } }
.tier-row:first-child { border-top: 0; }
.tier-head { padding: 0 0 0.2rem; border-top: 0; }
.tier-head + .tier-row { border-top: 0; }
.tier-head .tier-track { height: 1.1rem; }
.tier-head .tier-ticklabel { top: 0; }
.tier-bars { padding-top: 0.9rem; }
.tier-value { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 0.2rem 0.5rem; text-align: right; }
.tier-value .tier-number { display: inline; }
.tier-value .tier-status { display: inline; white-space: nowrap; }
.tier-value .tier-status::before { content: "\00b7"; margin-right: 0.5rem; color: var(--ink-soft); font-weight: 400; }
.tier-value .ptag { align-self: center; }
@media (max-width: 60rem) { .tier-value .tier-status::before { content: none; } }
@media (max-width: 40rem) {
    .tier-row { grid-template-columns: minmax(0, 1fr) auto; }
    .tier-head { padding: 0; }
    .tier-head .tier-track { grid-column: 1 / -1; grid-row: 1; }
    .tier-value { justify-content: flex-start; grid-column: 1 / -1; grid-row: 3; }
    .tier-value .tier-status::before { content: none; }
    .tier-row:first-child .tier-track { margin-top: 0; }
    .tier-row:not(.tier-head) .tier-ticklabel { display: none; }
}

/* Cards: a section in a box (your account's sections, the "for Investigators" note). .cards stacks them. */
.cards { display: grid; gap: 1rem; }
.card { padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); min-width: 0; }
.card > h2 { font-size: 1.2rem; margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-danger { border-left: 4px solid var(--high); }

/* Facts on a header's context line: "Home field Rose City Games 80% of events". */
.meta .fact { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.4rem; color: var(--ink-soft); }
.meta .fact a { font-weight: 700; }
.fact-note { font-size: 0.85rem; color: var(--ink-soft); }

.player-head-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
@media (max-width: 40rem) { .player-head-top { grid-template-columns: minmax(0, 1fr); } }
/* The player header's rating: a panel, never an empty corner. A provisional rating shows how far it has to go. */
.rating-badge { min-width: 12rem; padding: 0.7rem 1rem; background: var(--paper); border-radius: var(--radius); }
.rating-badge-num.provisional { font-size: 1.25rem; font-style: normal; font-weight: 700; color: var(--ink); }
.rating-progress { display: block; height: 0.35rem; margin-top: 0.45rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.rating-progress > span { display: block; height: 100%; background: var(--link); }
.rating-chart .grid-line { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* Head to head: both names start at the same height, whatever sits under them. */
.h2h-grid { align-items: start; }
.h2h-middle { align-self: center; }

/* Findings: the severity pill and its text close together, lined up down the list. */
.finding { grid-template-columns: 4.75rem minmax(0, 1fr); gap: 0.75rem; }
/* Finding chips: one shape; severity is the colour, the weight and the edge (solid for high and warnings, dashed for notes). */
.finding-chips li { background: var(--surface); box-shadow: inset 0 0 0 1px currentColor; }
.finding-chips .sev-high { background: var(--high-wash); color: var(--high); font-weight: 700; }
.finding-chips .sev-warn { background: var(--warn-wash); color: var(--warn); }
.finding-chips .sev-info { background: var(--surface); color: var(--info); box-shadow: none; outline: 1px dashed var(--info); outline-offset: -1px; }
.finding-chips li.rv-common { background: var(--surface); color: var(--ink-soft); font-weight: 400; box-shadow: inset 0 0 0 1px var(--rule); }

/* Event-type chips in a table: under the name, every row alike. */
:is(th, td) > .kind { display: block; width: fit-content; margin: 0.25rem 0 0; }

/* A tile with a meter (the admin's Play Hub requests against the cap). */
.tile-meter { display: block; width: 100%; height: 0.5rem; margin-top: 0.45rem; }

/* Admin health checks: a compact list, a status dot and word each (the word is the signal, the dot repeats it). */
.adm-health { list-style: none; padding: 0; margin: 0.4rem 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.adm-health li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; padding: 0.4rem 0.9rem; margin: 0; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none; }
.adm-health li:first-child { border-top: 0; }
.adm-health .adm-health-unhealthy { background: var(--high-wash); }
.adm-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--grade-a); flex: none; align-self: center; }
.adm-health-degraded .adm-dot { background: var(--warn); }
.adm-health-unhealthy .adm-dot { background: var(--high); }
.adm-health-word { font-weight: 700; }
.adm-health .muted { font-size: 0.88rem; }
.adm-paused-note b { color: var(--warn); font-family: var(--sans); font-size: 1rem; font-weight: 700; }

/* Sub-headings inside a section get the same space above them everywhere. */
.block > h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }

/* Activity: a page viewed several times in a row. */
.act-times { color: var(--ink-soft); font-size: 0.85rem; margin-left: 0.3rem; }

/* Your activity (R21, Kyle): "Jump back in" chips; the filter bar in two rows (the kind of page as the segmented
   control across the top, then search, period and sort); the count as a results line; the timeline by day. */
.act-jump { margin-top: 0; }
.act-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; }
.act-chip {
    display: inline-flex; align-items: center; gap: 0.4rem; min-height: var(--control-compact); max-width: 100%; padding: 0.15rem 0.8rem;
    border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 0.88rem; text-decoration: none;
}
.act-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-chip .icon { color: var(--ink-soft); }
.act-chip:hover { border-color: var(--link); color: var(--link); }
.act-kinds a { display: inline-flex; align-items: center; gap: 0.35rem; }
.act-kinds .icon { width: 0.95rem; height: 0.95rem; }
.act-timeline { display: grid; gap: 1rem; }
.act-day { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.act-day h3 { margin: 0; padding: 0.55rem 1rem; font-family: var(--sans); font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); background: var(--paper); border-bottom: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0; }
.act-day ol { list-style: none; margin: 0; padding: 0; }
.act-day li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.45rem 1rem; border-top: 1px solid var(--rule); }
.act-day li:first-child { border-top: 0; }
.act-time { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }
.act-page { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.act-page span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-page .icon { color: var(--ink-soft); }
.act-visits tbody th { font-weight: 400; }
@media (max-width: 40rem) {
    /* R49: the kinds wrap as the shared .seg does on phones (two a row), never overlapping; a time range wraps under
       its start. */
    .act-kinds .icon { display: none; }
    .act-kinds a { justify-content: center; }
    .act-day li { grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0.5rem; padding: 0.45rem 0.75rem; }
    .act-time { white-space: normal; }
}

/* Throwaway accounts by store: the count and its word on one line. */
.throwaway-group { grid-template-columns: minmax(0, 1fr) auto; }
.twg-count { display: inline-flex; align-items: baseline; gap: 0.3rem; font-size: 1.4rem; }
.twg-count small { display: inline; font-size: 0.8rem; }

/* Side cards' sub-headings are the sans, like every other card's. */
.movers h3 { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; }

/* Teams: both tables share the first two columns' widths, so they line up. */
.teams-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.tm-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: center;
    padding: 0.9rem 1.1rem 0.9rem 1rem; border-top: 1px solid var(--rule); box-shadow: inset 3px 0 0 var(--link);
}
.tm-row:first-child { border-top: 0; }
.tm-name { font-weight: 700; font-size: 1.05rem; }
.tm-home { margin-left: 0.45rem; font-size: 0.85rem; color: var(--ink-soft); }
.tm-members { margin: 0.2rem 0 0; font-size: 0.9rem; }
.tm-nums { display: flex; gap: 1.6rem; margin: 0; text-align: right; }
.tm-nums dt { font-size: 0.75rem; color: var(--ink-soft); }
.tm-nums dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.tm-places { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.1rem 0 0; }
.tm-chip {
    display: inline-flex; align-items: center; min-height: 1.6rem; padding: 0.1rem 0.6rem; border-radius: 999px;
    font-size: 0.8rem; font-family: var(--sans); background: #ece8f6; color: #4b3d7a; text-decoration: none;
}
a.tm-chip:hover { box-shadow: inset 0 0 0 1px #9d8fd6; }
.tm-chip span { margin-left: 0.2rem; font-weight: 700; }
.tm-more { background: transparent; box-shadow: inset 0 0 0 1px var(--field-border); color: var(--ink-soft); cursor: help; }
.tm-last { margin-left: auto; font-size: 0.82rem; color: var(--ink-soft); }
@media (prefers-color-scheme: dark) { .tm-chip { background: #2c2745; color: #cfc4f5; } a.tm-chip:hover { box-shadow: inset 0 0 0 1px #4a4170; } .tm-more { background: transparent; color: var(--ink-soft); } }
@media (max-width: 40rem) {
    .tm-row { grid-template-columns: minmax(0, 1fr); }
    .tm-nums { text-align: left; }
    .tm-last { margin-left: 0; flex-basis: 100%; }
}

/* Rival tiles: titles in sentence case, like every other tile. */
.rival-title { font-size: 0.8rem; text-transform: none; letter-spacing: 0; }
.risk { grid-template-columns: minmax(0, 1fr); }

/* ---------------------------------------------------------------- store profiles for players (R19)
   What a store's events are like. Facts in a grid of cards; chips are descriptive (rounded, with an icon), never warnings. */
.sg-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }
.sg-chips.small { margin: 0.3rem 0 0; gap: 0.25rem; }
.sg-chip {
    display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap;
    padding: 0.15rem 0.65rem 0.15rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
    background: #e1edf8; color: #174a79;
}
.sg-chips.small .sg-chip { font-size: 0.68rem; padding: 0.05rem 0.5rem 0.05rem 0.4rem; }
.sg-chip .icon { width: 0.9rem; height: 0.9rem; }
.sg-chips.small .sg-chip .icon { width: 0.75rem; height: 0.75rem; }
@media (prefers-color-scheme: dark) { .sg-chip { background: #1b3148; color: #a9cdf0; } }
.sg-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1px; margin: 0 0 0.6rem;
    background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
.sg-facts > div { background: var(--surface); padding: 0.7rem 0.9rem; }
.sg-facts dt { font-size: 0.85rem; color: var(--ink-soft); }
.sg-facts dd { margin: 0.1rem 0 0; }
.sg-facts dd b { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; }

/* ---------------------------------------------------------------- upcoming events (R20) */
.upcoming-list tbody th, .upcoming-list td { vertical-align: top; }
.upcoming-list tbody th { font-weight: 600; }
.upcoming-list .kind { margin: 0 0 0 0.4rem; }
.upcoming-list tr.up-special > * { background: var(--gold-wash); }
.upcoming-list tr.up-special > :first-child { box-shadow: inset 4px 0 0 var(--gold-bright); }
@media (max-width: 30rem) {
    /* Three sections don't fit beside the brand on a phone: the tabs get their own row under it. */
    .site-header:not(.site-header-plain) .brand { grid-row: 1; grid-column: 1; }
    .site-header:not(.site-header-plain) .user-menu { grid-row: 1; grid-column: -2; justify-self: end; }
    .site-header:not(.site-header-plain) .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; }
}

/* ---------------------------------------------------------------- the Investigator page (R22) */
/* What Investigators get, as cards with an illustration on sample data each (never the index), then who it's for and
   what's expected in two columns, then the request form in a card. */
.inv-examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.inv-example { margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.inv-example figcaption h3 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.inv-example figcaption p { margin: 0; }
/* The last card runs the full row, so seven cards never leave one alone (R28 added teams and trips). */
.inv-wide { grid-column: 1 / -1; }
@media (min-width: 48rem) { .inv-wide { flex-direction: row; align-items: center; } .inv-wide > .inv-sample { flex: 0 0 24rem; } .inv-wide > figcaption { flex: 1 1 0; } }
.inv-sample {
    position: relative; padding: 0.9rem 1rem; background: var(--paper); border: 1px dashed var(--field-border);
    border-radius: var(--radius); font-size: 0.9rem; min-width: 0;
}
.inv-sample p { margin: 0; }
.inv-eg {
    position: absolute; top: -0.65rem; right: 0.75rem; padding: 0 0.45rem; background: var(--surface);
    border: 1px solid var(--rule); border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft);
}
.inv-name { font-weight: 700; }
.inv-sample .inv-sub { color: var(--ink-soft); margin: 0 0 0.5rem; }
.inv-sample .player-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 0.7rem; }
.inv-sample .player-tags:last-child { margin-bottom: 0; }
.inv-store { display: flex; gap: 0.8rem; align-items: flex-start; }
.inv-store-main { min-width: 0; }
.inv-table { margin: 0; font-size: 0.88rem; }
.inv-table th, .inv-table td { padding: 0.35rem 0.5rem; background: none; }
.inv-table td.num { text-align: right; }
.inv-table .sev-badge { white-space: normal; }
.inv-review { margin: 0.3rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.inv-review li > span { margin-right: 0.3rem; }
.inv-review .finding-chips { display: inline-flex; vertical-align: middle; }
/* Two bars each: what Play Hub reports (outline) and what recorded play backs up (filled). Widths are classes, since
   the policy allows no inline styles. */
.inv-bars { margin: 0.2rem 0 0; display: grid; gap: 0.55rem; }
.inv-bars > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.2rem 0.6rem; align-items: center; }
.inv-bars dt { color: var(--ink-soft); }
.inv-bars dd { margin: 0; display: grid; gap: 0.2rem; }
.inv-track { position: relative; display: block; height: 0.9rem; }
.inv-rep, .inv-back { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.inv-rep { border: 1.5px solid var(--ink-soft); }
.inv-back { background: var(--link); top: 3px; bottom: 3px; left: 3px; }
.inv-sample .inv-key { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.inv-key i { display: inline-block; width: 1.4rem; height: 0.7rem; margin-right: 0.35rem; vertical-align: -0.05rem; border-radius: 3px; }
.inv-key .inv-rep, .inv-key .inv-back { position: static; }
.inv-w55 { width: 55%; } .inv-w70 { width: 70%; } .inv-w75 { width: 75%; } .inv-w90 { width: 90%; }
.inv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 48rem) { .inv-two { grid-template-columns: minmax(0, 1fr); } }
.inv-two .card > h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.inv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.inv-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.inv-list .icon { flex: none; width: 1.2rem; height: 1.2rem; margin-top: 0.1rem; color: var(--link); }
.inv-ask { max-width: 48rem; }
.inv-ask .ireq-form { margin-top: 0; }
.inv-ask .ireq-status + .ireq-form, .inv-ask .ireq-status + .ireq-sent { margin-top: 1rem; }

/* ---------------------------------------------------------------- claiming your player (R23)
   "You" beside the player the viewer said is them. Only the claimer ever sees it. A solid pill with no icon, so it
   reads as neither a label (.plabel) nor a warning (.ptag). */
.you-mark {
    display: inline-block; margin: 0 0 0 0.4rem; padding: 0.05rem 0.5rem; border-radius: 999px;
    background: var(--ink); color: var(--surface); font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
    line-height: 1.4; letter-spacing: 0.02em; vertical-align: 0.1em; white-space: nowrap;
}
h1 .you-mark { font-size: 0.8rem; vertical-align: 0.35em; }
/* "Is this you? [This is me]" (R21, Kyle): the right-hand end of the player header's last row, the status line on the
   left; the button in the accent colour so it's noticed. "You" and "Not me" take its place once claimed. */
.claim-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0; }
.claim-actions form { margin: 0; }
.claim-actions .you-mark { margin: 0; }
.claim-ask { display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap; font-size: 0.9rem; color: var(--ink-soft); }
.player-head .index-status { border-top: 1px solid var(--rule); padding-top: 0.75rem; margin-top: 0.4rem; }
.player-head .index-status .claim-actions { margin-left: auto; }
.player-head .index-status .area-offer { order: 10; padding: 0.45rem 0.8rem; border-radius: var(--radius); background: var(--info-wash); color: var(--ink); }
section.legal .claim-actions { margin: 0.6rem 0 0.4rem; }
.claim-note { font-size: 0.88rem; color: var(--ink-soft); }
tr.is-you > * { background: var(--info-wash); }
tr.is-you > :first-child { box-shadow: inset 4px 0 0 var(--ink); }
.you-private { margin-top: 0.8rem; }
/* "Use <home store> as your area?" after claiming (R23 follow-up): one quiet line, asked once per claim. */
.area-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; flex-basis: 100%; margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.area-offer form { margin: 0; }

/* ---------------------------------------------------------------- how it works (R24) */
/* A long-form page: the header card with an "on this page" list, then sections in a narrower column. Its examples
   reuse the Investigator page's cards (.inv-example, .inv-sample, .inv-eg). The Investigator part sits under a rule. */
.hiw { max-width: none; }
.hiw section.block { scroll-margin-top: 1rem; }
.hiw-list { margin: 0.4rem 0 0.8rem; padding-left: 1.3rem; display: grid; gap: 0.4rem; }
.hiw-chips { margin: 0.2rem 0 0.9rem; }
.hiw-table { margin: 0.3rem 0 0.9rem; font-size: 0.92rem; }
.hiw-table th[scope="row"] { font-weight: 700; min-width: 9rem; }
.hiw-findings td:last-child { color: var(--ink-soft); }
.hiw-grades { width: auto; }
.hiw-sum { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; margin: 0.5rem 0; }
.hiw-sum dt { font-size: 0.8rem; color: var(--ink-soft); }
.hiw-sum dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-variant-numeric: lining-nums tabular-nums; }
.hiw-sum-total dd { color: var(--link); }
.inv-sample .hiw-calc { color: var(--ink-soft); font-size: 0.85rem; }
.hiw-wide { max-width: 40rem; }
.hiw-wide .inv-sample p + p { margin-top: 0.4rem; }
.hiw-inv { margin-top: 2.5rem; padding-top: 0.5rem; border-top: 2px solid var(--rule); }
.hiw-inv section.block { scroll-margin-top: 1rem; }
.hiw-inv-note {
    display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.9rem; border-radius: var(--radius);
    background: var(--info-wash); color: var(--info);
}
.hiw-inv-note .icon { margin-top: 0.15rem; }

/* "How is this worked out?" (Ui.HowLink): a quiet question-mark link next to a number, or the words in a hint. */
.how-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 1.5rem; min-height: 1.5rem;
    vertical-align: middle; color: var(--ink-soft); text-decoration: none;
}
.how-link:hover { color: var(--link); }
.how-link .icon { width: 0.95rem; height: 0.95rem; }
.how-words { color: var(--link); text-decoration: underline; white-space: nowrap; }
/* Chips with their link beside them (the player page's labels). */
.how-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.35rem; }

/* ------------------------------------------------------------------ contact us (R27) */
/* R38: the page's full width, like Account's cards; the message box keeps a readable measure. */
.contact textarea { max-width: 60rem; }
.contact-shortcuts { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.contact-shortcuts li + li { margin-top: 0.35rem; }
.contact-topics { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.3rem; }
.contact-topic { display: flex; align-items: flex-start; gap: 0.55rem; cursor: pointer; }
.contact-topic input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; }
.contact-topic .hint { display: block; font-weight: 400; }
.contact-about { margin: 0; overflow-wrap: anywhere; }
.ireq-field input[type="email"] {
    width: 100%; padding: 0.5rem 0.65rem; border: 1px solid var(--field-border); border-radius: var(--radius);
    background: var(--surface); font: inherit; color: inherit; line-height: 1.4;
}
/* The honeypot: off-screen, never shown (not display: none, which some bots check for). */
.contact-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact-mine .ireq-facts { margin-bottom: 0.4rem; }
.contact-mine .ireq-text { margin: 0 0 0.6rem; }
.contact-new, .user-menu-flag {
    display: inline-block; min-width: 1.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; text-align: center;
    font-size: 0.75rem; font-weight: 700; background: var(--warn-wash); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn);
}
.user-menu-flag { margin-left: 0.2rem; }

/* ---------------------------------------------------------------- getting started (R29) */
/* The tour: a card that points at each stop in the top bar (site.js), the stop ringed in gold. Without script it's a
   card in the corner listing all four stops. */
dialog.tour {
    position: fixed; inset: auto 1rem 1rem auto; z-index: 50; margin: 0; padding: 1rem 1.1rem 0.9rem;
    width: min(24rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
    background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-top: 3px solid var(--gold-bright);
    border-radius: var(--radius); box-shadow: 0 10px 30px rgba(17, 22, 44, 0.28);
}
dialog.tour:not([open]) { display: none; }
dialog.tour.tour-stepped { overflow: visible; max-height: none; }
dialog.tour.tour-pointing { position: absolute; inset: auto; }
/* The arrow, under the stop it points at. */
dialog.tour.tour-pointing::before {
    content: ""; position: absolute; top: -10px; left: calc(var(--tour-arrow, 50%) - 8px);
    border: 8px solid transparent; border-top: 0; border-bottom: 8px solid var(--gold-bright);
}
/* R49: focus goes to the card itself when it opens, shown as a ring round its edge (not round the stop's heading). */
dialog.tour:focus { outline: none; }
dialog.tour:focus-visible { box-shadow: 0 0 0 3px var(--focus), 0 10px 30px rgba(17, 22, 44, 0.28); }
.tour-title {
    display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.5rem; font-family: var(--sans);
    font-size: 0.85rem; font-weight: 700; color: var(--ink-soft);
}
.tour-title .icon { width: 1rem; height: 1rem; color: var(--gold); }
.tour-stops { list-style: none; margin: 0; padding: 0; }
.tour-stop + .tour-stop { margin-top: 0.8rem; }
.tour-stop p { margin: 0.25rem 0 0; }
.tour-count { font-size: 0.8rem; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.tour-stepped .tour-count { position: absolute; top: 1rem; right: 1.1rem; margin: 0; line-height: 1.4; }
.tour-stop-title { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 1.15rem; }
.tour-stop-title .icon { width: 1.15rem; height: 1.15rem; color: var(--link); }
.tour-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 1rem; }
.tour-buttons { display: flex; gap: 0.5rem; margin-left: auto; }
/* The stop the card points at, in the top bar. */
.tour-spot { outline: 3px solid var(--gold-bright); outline-offset: -3px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.user-menu summary.tour-spot { outline-offset: 2px; border-radius: 999px; }
.tour [hidden] { display: none; }

/* ---------------------------------------------------------------- running costs and donations (R26)
   The tracker on /support (this month against the goal as a bar), its small version in the footer, and the admin
   dashboard's Donations tab. The bars are decorative: the words beside them say the numbers. */
.fund-line { margin: 0 0 0.5rem; font-size: 1.05rem; }
.fund-big { font-family: var(--serif); font-size: 2rem; font-weight: 400; font-variant-numeric: lining-nums tabular-nums; }
.fund-pct { color: var(--ink-soft); }
.fund-bar, .fund-mini-bar {
    display: block; overflow: hidden; border-radius: 999px; background: var(--rule); border: 1px solid var(--ink-soft);
}
.fund-bar { height: 0.9rem; max-width: 40rem; margin: 0 0 0.8rem; }
.fund-bar > span, .fund-mini-bar > span { display: block; height: 100%; background: var(--gold-bright); }
.fund .stats { max-width: 40rem; }
.fund-actions { margin: 1rem 0 0.4rem; }
.fund-names {
    display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; list-style: none; padding: 0; margin: 0.4rem 0 0;
}
.fund-names li {
    padding: 0.2rem 0.75rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
    overflow-wrap: anywhere;
}
.footer-links { flex-wrap: wrap; }
/* The footer's card (R21, Kyle): full width at the top of the footer, the month's progress and one button. */
.fund-card {
    flex-basis: 100%; display: grid; grid-template-columns: auto minmax(12rem, 22rem) minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: center;
    margin: 0 0 0.6rem; padding: 0.85rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
    color: var(--ink);
}
.fund-card-icon { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--gold-wash); color: var(--gold); }
.fund-card-icon .icon { width: 1.3rem; height: 1.3rem; }
.fund-card h2 { margin: 0; font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.fund-card p { margin: 0.1rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.fund-card-nogoal { grid-template-columns: auto minmax(0, 1fr) auto; }
.fund-card-progress { min-width: 0; }
.fund-card-nums { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.1rem 1rem; margin: 0 0 0.35rem; font-size: 0.88rem; color: var(--ink-soft); }
.fund-card-nums b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--ink); }
.fund-card .fund-mini-bar { height: 0.55rem; }
.btn.fund-btn { background: var(--gold-bright); border-color: var(--gold-bright); color: #1b2447; font-weight: 700; }
.btn.fund-btn:hover { color: #1b2447; }
.fund-mini-bar { width: 100%; min-width: 6rem; height: 0.35rem; }
/* /support (R21, Kyle): a hero card with the month and the button, then what it pays for and the months so far, then
   the supporters. The same coffee mark and gold button as the footer's card. */
.sup-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem 1.2rem; align-items: center; padding: 1.4rem 1.6rem; margin-bottom: var(--section-gap); }
.sup-title h1 { margin: 0 0 0.2rem; }
.sup-title p { margin: 0; color: var(--ink-soft); }
.sup-progress { grid-column: 1 / -1; }
.sup-nums { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 1rem; margin: 0 0 0.5rem; color: var(--ink-soft); }
.sup-nums b { color: var(--ink); }
.sup-progress .fund-bar { max-width: none; margin: 0 0 1.1rem; }
.sup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.sup-actions .hint { flex: 1 1 22rem; margin: 0; }
.sup-actions .fund-btn .icon { width: 1.1rem; height: 1.1rem; }
.sup-detail { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; }
.sup-detail .card > h2, .sup-names > h2 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.sup-costs { list-style: none; margin: 0; padding: 0; }
.sup-costs li { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; border-top: 1px solid var(--rule); }
.sup-costs li:first-child { border-top: 0; padding-top: 0.2rem; }
.sup-costs .icon { color: var(--ink-soft); }
.sup-months { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0; }
.sup-months > div { padding: 0.7rem 0.9rem; border-radius: var(--radius); background: var(--paper); }
.sup-months dt { font-size: 0.85rem; color: var(--ink-soft); }
.sup-months dd { margin: 0.1rem 0 0; font-family: var(--serif); font-size: 1.5rem; font-variant-numeric: lining-nums tabular-nums; }
.sup-months dd.sup-sub { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); }
.sup-names .empty { margin-bottom: 0; }
@media (max-width: 52rem) { .sup-detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) { .sup-hero { align-items: start; padding: 1.1rem 1.1rem; } }

/* The account menu's entry: the month's progress under the words. */
.user-menu-panel .menu-fund { min-height: 2.8rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.user-menu-panel .menu-fund .icon { color: var(--gold); align-self: flex-start; margin-top: 0.15rem; }
.user-menu-panel .menu-invest .icon { color: var(--link); }
.menu-fund-text { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.menu-fund-text small { font-size: 0.78rem; color: var(--ink-soft); }
.menu-fund-text .fund-mini-bar { height: 0.3rem; }
@media (max-width: 60rem) {
    .fund-card, .fund-card-nogoal { grid-template-columns: auto minmax(0, 1fr) auto; }
    .fund-card-progress { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 40rem) {
    .fund-card, .fund-card-nogoal { grid-template-columns: auto minmax(0, 1fr); }
    .fund-card .fund-btn { grid-column: 1 / -1; justify-self: start; }
}
.welcome-support { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.don-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.6rem 1rem; }
.don-fields .don-note { grid-column: 1 / -1; }
.don-fields input[type="text"], .don-fields input[type="date"] { width: 100%; }
.don-table details form { margin-top: 0.5rem; }
.don-table .adm-role form.adm-inline { flex-direction: row; min-width: 0; margin: 0.5rem 0 0; }
.don-goal input[type="number"] { max-width: 10rem; }
.don-removed td { color: var(--ink-soft); }

/* ---------------------------------------------------------------- worldwide (R30) */
/* Miles or kilometres where a distance is chosen (_UnitsChoice): a segmented control of buttons, like .seg's links. */
.seg button {
    display: inline-flex; align-items: center; justify-content: center; min-height: calc(var(--control-compact) - 2px);
    padding: 0 0.85rem; margin: 0; border: 0; border-left: 1px solid var(--rule); border-radius: 0;
    background: transparent; color: var(--ink-soft); font: inherit; font-size: 0.9rem; font-weight: 400; cursor: pointer;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--ink); background: var(--paper); filter: none; }
.seg button[aria-pressed="true"] { color: var(--ink); font-weight: 700; background: var(--paper); box-shadow: inset 0 -2px 0 var(--ink); }
.seg button:focus-visible { outline-offset: -3px; }
.units-seg { vertical-align: middle; }
@media (max-width: 40rem) { .head-actions .units-seg { display: inline-flex; width: auto; } }
/* Your account: units, dates and times. */
.format-fields { display: grid; gap: 0.8rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin: 0 0 0.8rem; }
.format-fields fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.format-fields legend { font-weight: 700; padding: 0; margin-bottom: 0.3rem; }
.format-fields label { display: flex; align-items: center; gap: 0.45rem; min-height: 1.6rem; }

/* ---------------------------------------------------------------- Age by country and privacy for everyone shown (R32) */
.age-question { display: flex; flex-direction: column; gap: 0.9rem; }
.age-question select { max-width: 100%; width: 22rem; }
.age-answer { gap: 0.45rem; }
.age-answer legend { margin-bottom: 0.3rem; }
.welcome-sorry h2 { margin-top: 1.5rem; }
.legal .table-wrap + p { margin-top: 0.9rem; }

/* Near you this week (R34): the Players' home page. Tables and movers reuse Upcoming's and Ratings' components. */
/* R53: a store page's link to the store owner page, in its status row. */
.for-stores-link { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 1.5rem; font-size: 0.9rem; }
.for-stores-link .icon { width: 1rem; height: 1rem; }
.ny-items { list-style: none; margin: 0; padding: 0; }
.ny-items li { padding: 0.45rem 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.ny-items li .cell-sub { display: block; }
.ny-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 0 2.5rem; }
.ny-cols h3 { margin-top: 0.4rem; }
.ny-thin .player-search { margin-top: 0.75rem; }
.mover-list.ny-new li { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------------------------------------------------------------- Season recaps (R36) */
.sr-now { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.5rem; border: 1px solid var(--rule); border-radius: 999px;
    font-family: var(--sans); font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); vertical-align: middle; }
.ss-icon { display: inline-flex; color: var(--gold); align-self: center; }

/* ---------------------------------------------------------------- event recaps (R35) */
.recap-lead { display: flex; align-items: center; gap: 0.6rem; font-size: 1.15rem; margin: 0 0 0.9rem; }
.recap-lead .icon { width: 1.5rem; height: 1.5rem; color: var(--gold); flex: none; }
.recap-lead a { font-family: var(--serif); font-size: 1.3rem; }
.recap-lead .record { margin-left: 0.35rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.recap-kicker { display: inline-block; margin-right: 0.35rem; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.recap-as-rated { margin: 0.9rem 0 0; }
.recap-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.recap-card { min-width: 0; }
.recap-card > h3 { margin: 0 0 0.6rem; font-size: 1.05rem; display: flex; align-items: center; gap: 0.35rem; }
.recap-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.recap-top li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: baseline; }
.recap-top li.is-you { font-weight: 700; }
.recap-rank { color: var(--ink-soft); text-align: right; }
.recap-who { overflow-wrap: anywhere; }
.recap-top .record { color: var(--ink-soft); }
.recap-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.55rem; }
.recap-list .cell-sub { display: block; }
.recap-pair { white-space: nowrap; }
.recap-note { margin: 0; }
.recap-anon { font-style: italic; color: var(--ink-soft); }
.recap-field { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.5rem; margin: 1rem 0 0; }
.recap-field > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.4rem; }
.recap-field .cell-sub { display: inline; margin: 0; }
.recap-field .notable-entrants { margin: 0; }
/* Recent results (Stores): the event's recap link sits beside its name. */

/* ---------------------------------------------------------------- emails to admins (R37) */
/* The dashboard's Emails tab: the address field at a readable width, and each choice on its own line. */
.eml-form input[type="email"] { width: 100%; max-width: 28rem; }
.eml-kinds { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.3rem; }
.eml-kinds .ireq-choice { display: flex; align-items: flex-start; gap: 0.5rem; min-height: 24px; }
.eml-kinds input[type="checkbox"] { margin-top: 0.2rem; flex: none; }

/* ---------------------------------------------------------------- second review (R38) */
/* An area's results (_ResultsList): This week's "Last few days" and Stores → Recent results. On phones the date moves
   under the event and its column goes. */
.results-list .rl-when-sub { display: none; }
@media (max-width: 40rem) {
    .results-list .rl-when { display: none; }
    .results-list .rl-when-sub { display: inline; }
}
/* The link at the end of a digest section ("All recent results"), the same everywhere. */
.more-link { margin: 0.5rem 0 0; }
/* Summary numbers that open the list they count. */
.summary-nums a { color: var(--ink-soft); }
.summary-nums a:hover { color: var(--link); }
.sr-jump { margin: 0 0 0.5rem; flex-wrap: wrap; }
/* The footer: the note on its own row, then the links (right-aligned on wide screens), for every role. */
.site-footer .footer-note { flex: 1 1 100%; }
.site-footer .footer-links { margin-left: auto; }
@media (max-width: 40rem) { .site-footer .footer-links { margin-left: 0; } }
/* "All N stores" and the like: the rest of a short list, opened on demand. */
.more-rows { margin-top: 0.5rem; }
.more-rows > summary { cursor: pointer; color: var(--link); text-decoration: underline; padding: 0.2rem 0; }
.more-rows[open] > summary { margin-bottom: 0.5rem; }
/* A store profile's facts fill every row, like tiles (Ui.TilesPer): 7 are 4 + 3, never 5 + 2. One a row on phones. */
dl.sg-facts.per-2 { --per: 2; } dl.sg-facts.per-3 { --per: 3; } dl.sg-facts.per-4 { --per: 4; }
dl.sg-facts[class*="per-"] > div { flex: 1 1 calc((100% - (var(--per) - 1) * 1px) / var(--per)); }
@media (max-width: 40rem) { dl.sg-facts[class*="per-"] > div { flex-basis: 100%; } }
/* A header's one choice (Upcoming: how far ahead), a .seg where the actions go. */
.head-seg { margin: 0 0 0.9rem; }
/* The admin Emails tab's form (R37) in a card: each group with room above it. */
.eml-form .ireq-field { margin: 0 0 1rem; }
.eml-form fieldset.ireq-field { border: 0; padding: 0; }
@media (max-width: 40rem) { .filter-bar .label-filter[open] { width: 100%; } }
/* Near you this week, below the results (R38): upsets as a table like the results list. On phones (R49) each upset
   is one stacked cell, "A beat B · 459 apart" with the event under it, since real names are long. */
.upsets-list .up-phone { display: none; }
.upsets-list td.num b { font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 40rem) {
    .upsets-list td, .upsets-list thead th:not(:first-child) { display: none; }
    .upsets-list .up-phone { display: block; font-weight: 400; margin-top: 0.15rem; }
    .upsets-list .up-phone .cell-sub { display: block; }
}
.season-summary .more-rows { margin: -0.3rem 0 0.9rem; }

/* A player's set season (_SeasonRecap), R38 (Kyle's concept A): one card, two a row in div.sr-cards (one on phones).
   The Set Championship finish leads (gold for a win: gold is for winners), then three numbers, the best win and most
   played, the top three stores as bars, then any other labels. */
.sr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(20rem, (100% - 0.9rem) / 2)), 1fr)); gap: 0.9rem; align-items: start; }
.sr-cards > .season-recap { margin: 0; }
.sr-cards > .season-recap > h2, .sr-cards > .season-recap h3 { margin: 0; }
.sr-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 0.9rem 1rem 0.8rem; }
.sr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.7rem; margin: 0 0 0.6rem; }
.sr-head h2, .sr-head h3 { margin: 0; font-size: 1.15rem; }
.sr-dates, .sr-sub { color: var(--ink-soft); font-size: 0.85rem; }
.sr-finish { display: flex; gap: 0.6rem; align-items: center; margin: 0 0 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--rule); border-left-width: 4px; border-radius: 8px; background: var(--paper); }
.sr-finish > .icon { width: 1.25rem; height: 1.25rem; flex: none; color: var(--ink-soft); }
.sr-finish .sr-sub { display: block; }
.sr-finish.sr-won { background: var(--gold-wash); border-color: var(--gold-bright); }
.sr-finish.sr-won > .icon, .sr-finish.sr-won b { color: var(--gold); }
.sr-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.sr-nums > div { padding: 0.45rem 0.7rem; border-left: 1px solid var(--rule); min-width: 0; }
.sr-nums > div:first-child { border-left: 0; }
.sr-nums dt { font-size: 0.8rem; color: var(--ink-soft); }
.sr-nums dd { margin: 0; font-family: var(--serif); font-size: 1.3rem; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.sr-nums dd.text { font-family: var(--sans); font-size: 0.95rem; padding-top: 0.3rem; }
.sr-nums dd.sr-sub { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft); white-space: normal; }
.sr-change { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; vertical-align: middle; }
.sr-change.up { color: var(--grade-a); }
.sr-change.down { color: var(--high); }
.sr-facts { margin: 0.7rem 0 0; }
.sr-facts > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.6rem; padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.sr-facts > div:first-child { border-top: 0; }
.sr-facts dt { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); padding-top: 0.1rem; }
.sr-facts dd { margin: 0; overflow-wrap: anywhere; }
.sr-where { margin: 0.8rem 0 0.3rem; font-family: var(--sans); font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.sr-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.sr-bars li { position: relative; display: flex; align-items: baseline; gap: 0.5rem; padding: 0.2rem 0.45rem; min-height: 24px; }
.sr-bar { position: absolute; inset: 1px 0; z-index: 0; }
.sr-bar > span { display: block; height: 100%; background: var(--info-wash); border-radius: 4px; }
.sr-bars a { position: relative; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sr-bars b { position: relative; font-variant-numeric: lining-nums tabular-nums; }
.sr-more { margin: 0.25rem 0 0 0.45rem; }
.sr-labels { margin: 0.7rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
@media (max-width: 40rem) {
    .sr-facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .sr-nums dd { font-size: 1.1rem; }
}

/* Terms and privacy (R38): the header card, then the text at a reading width (48rem) beside a list of every section,
   which stays in view as you scroll on wide screens and sits at the top, as a wrapped list, on phones and tablets. */
.legal-doc { display: grid; grid-template-columns: 15rem minmax(0, 48rem); gap: 2.5rem; align-items: start; }
.legal-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.legal-side-h { margin: 0 0 0.3rem; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.legal-side ol { list-style: none; margin: 0; padding: 0; }
.legal-side a { display: block; padding: 0.22rem 0; font-size: 0.9rem; min-height: 24px; }
.legal.legal-body { max-width: none; }
.legal-body > h2:first-child { margin-top: 0; }
.legal-body h2 { scroll-margin-top: 1rem; }
@media (max-width: 60rem) {
    .legal-doc { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .legal-side { position: static; max-height: none; }
    .legal-side ol { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
}

/* How it works (R38): the same layout as terms and privacy, a little wider for its tables and examples. */
.legal-doc.hiw-doc { grid-template-columns: 15rem minmax(0, 54rem); }
.hiw-doc .hiw > section.block:first-child, .hiw-doc .hiw > section.block:first-child > h2 { margin-top: 0; }
.hiw-side-inv { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed var(--rule); }
@media (max-width: 60rem) { .legal-doc.hiw-doc { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- third pass, real data (R49) */
/* A player's Latest events (_LatestEvents): on phones the date and store go under the event, three columns. */
.player-recent .pr-sub { display: none; }
@media (max-width: 40rem) {
    .player-recent .pr-col { display: none; }
    .player-recent .pr-sub { display: block; }
}

/* ---------------------------------------------------------------- phones (R53, the stakeholder review's item 9)
   The first screen was all chrome: a three-row top bar (about 155 px) and a tall header card. On phones the top bar is
   two rows: the brand's mark, the area pill and the account button, then the tabs. The wordmark stays for screen
   readers (the link's name). Every pill stays at least 24 px to tap (here 36). */
@media (max-width: 30rem) {
    .site-header:not(.site-header-plain) { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 0.5rem; padding: 0 0.75rem; min-height: 0; }
    .site-header:not(.site-header-plain) .brand { grid-row: 1; grid-column: 1; padding: 0.5rem 0; }
    .site-header:not(.site-header-plain) .brand-name {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
    .site-header:not(.site-header-plain) .user-menu { grid-row: 1; grid-column: 3; justify-self: end; }
    .site-header:not(.site-header-plain) .user-menu summary { height: 2.25rem; padding: 0 0.15rem; }
    .site-header:not(.site-header-plain) .user-menu summary .user-avatar { width: 1.75rem; height: 1.75rem; }
    .site-header:not(.site-header-plain) .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; }
    .site-header:not(.site-header-plain) .site-nav a { padding: 0.6rem 0.5rem; }

    /* Header cards: less padding, and the summary numbers side by side (the number over its words), not a line each. */
    .store-head-main { padding: 0.85rem 0.9rem 0.7rem; }
    .store-head .meta, .store-head .area-note { margin-bottom: 0.6rem; }
    .store-head .summary-nums { display: flex; flex-wrap: nowrap; gap: 0.75rem; font-size: 0.8rem; line-height: 1.25; margin-bottom: 0.7rem; }
    .store-head .summary-nums > * { flex: 1 1 0; min-width: 0; }
    .store-head .summary-nums b { display: block; margin: 0; }
    /* The player header's strip: three a row, the cells of the last row growing to fill it (like .stats). */
    .head-strip { display: flex; flex-wrap: wrap; }
    .head-strip > div { flex: 1 1 28%; min-width: 0; padding: 0.45rem 0.8rem; }
    .head-strip dd { font-size: 1.05rem; }
}
/* Final standings: Points are three a win, already in the record, so phones leave the column out (it scrolled away). */
@media (max-width: 40rem) {
    .standings .standings-points { display: none; }
}

/* ---------------------------------------------------------------- R56: the stores near you, being fetched (nf-*) */
/* The viewer's own area's stores coming in: the headline, a bar of stores whose year is in, the minutes, then each
   store nearest first with its status in words (never colour alone) and what's coming up near them. */
.nf .nf-head { font-weight: 600; margin: 0 0 0.4rem; }
.nf-progress { display: grid; gap: 0.25rem; margin: 0 0 0.4rem; }
.nf-progress progress { width: 100%; height: 0.6rem; accent-color: var(--info); }
.nf-progress p, .nf-latest, .nf-explain { margin: 0 0 0.4rem; }
.nf-eta { margin: 0 0 0.4rem; color: var(--ink-soft); }
.nf-eta:empty { display: none; }
.nf-wider { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; margin: 0.5rem 0; }
.nf-stores { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.35rem; }
.nf-stores li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.75rem; align-items: baseline;
    padding: 0.4rem 0; border-top: 1px solid var(--rule);
}
.nf-store-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.nf-store-place { grid-column: 1; color: var(--ink-soft); font-size: 0.85rem; }
/* R62: the status is plain words (a bordered pill read as a button); the one fetching now is bold. */
.nf-status { grid-column: 2; grid-row: 1 / span 2; font-size: 0.85rem; white-space: nowrap; }
.nf-status.nf-now { color: var(--ink); font-weight: 700; }
.nf-status.nf-recent, .nf-status.nf-all { color: var(--ink); }
.nf-status.nf-all { font-weight: 600; }
.nf-status.nf-wait { color: var(--ink-soft); }
.nf-sub { margin: 1rem 0 0.4rem; font-size: 1rem; }
.nf-upcoming { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.nf-upcoming li { display: grid; gap: 0.1rem; }
.nf-when { color: var(--ink-soft); font-size: 0.85rem; }
.area-link { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; }
.area-link-field { display: grid; gap: 0.25rem; flex: 1 1 18rem; min-width: 0; }
.area-link-field input { width: 100%; }
.area-link .welcome-note { flex-basis: 100%; margin: 0; }

/* ── Upcoming events as cards (R89; You, player pages and /upcoming, Kyle 2026-10-08): one size whatever the name, a date
   block in the band's colours (gold-edged for a Set Championship or prerelease), the kind chip, the name, the store (a
   link to its page here), then the entry and the seats (R69), and "View on Play Hub". A card to read with two links in
   it, so the site's quiet edge, not a choice card's (R62). ── */
.uc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.uc-grid > li { min-width: 0; }
/* The way on to the full list sits a block's gap below the cards (ri Stakeholder). */
.uc-grid + .hint { margin-top: 0.9rem; }
.uc-card { display: flex; height: 9rem; overflow: hidden; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); }
.uc-date { flex: none; width: 4.6rem; display: grid; align-content: center; justify-items: center; gap: 0; background: var(--board); color: var(--board-ink); border-right: 3px solid transparent; }
.uc-special .uc-date { border-right-color: var(--gold-bright); }
.uc-dow, .uc-mon { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.uc-day { font-family: var(--serif); font-size: 1.9rem; line-height: 1.05; font-variant-numeric: lining-nums; }
.uc-time { margin-top: 0.3rem; font-size: 0.75rem; font-weight: 700; color: var(--board-ink); white-space: nowrap; }
.uc-body { min-width: 0; flex: 1; padding: 0.45rem 0.8rem; display: flex; flex-direction: column; justify-content: center; gap: 0.05rem; }
.uc-kind { line-height: 1; margin-bottom: 0.1rem; }
.uc-kind .kind { font-size: 0.7rem; }
.uc-name { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.uc-store { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The two links (Kyle, 2026-10-08): the store's page here, then the event on Play Hub; each at least 24 px to tap. */
a.uc-store-link { display: block; align-self: flex-start; max-width: 100%; min-height: 24px; line-height: 24px; color: var(--link); }
.uc-playhub { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.3rem; min-height: 24px; font-size: 0.85rem; font-weight: 700; color: var(--link); }
.uc-playhub .icon { width: 0.95rem; height: 0.95rem; margin: 0; }
.uc-figs { display: flex; flex-wrap: wrap; gap: 0 0.8rem; font-size: 0.85rem; color: var(--ink); }
.uc-figs .el-unit { color: var(--ink-soft); }
/* A Set Championship or prerelease: a gold wash as well as its chip and the date block's gold edge (as the table's gold row was). */
.uc-card.uc-special { background: var(--gold-wash); }
/* /upcoming's cards say more (the store's town and distance, the format): one size there too, a little taller. */
.uc-tall .uc-card { height: 10.5rem; }
.uc-where { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-format { color: var(--ink-soft); white-space: nowrap; }
/* /upcoming: a heading for each day over its cards. */
.uc-day-h { display: flex; align-items: baseline; gap: 0.6rem; margin: 1.3rem 0 0.5rem; font-size: 1.05rem; }
.uc-day-h:first-of-type { margin-top: 0.6rem; }
.uc-day-n { font-family: var(--sans); font-size: 0.82rem; font-weight: 400; color: var(--ink-soft); }
.uc-seats-note { margin-bottom: 0.2rem; }

/* ---------------------------------------------------------------- R62: choice cards, and things to read */
/* A choice card is a whole card you tap to choose (a store on "Where do you play?"): the name in the link colour, a
   chevron at the end, an edge of at least 3:1 (--field-border), a pressed state, and at least 44 px tall. Anything
   else in a box is for reading (.read-points): no edge, no fill, no chevron, so it never looks tappable. */
.choice-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.15rem;
    width: 100%; height: 100%; min-height: 3.6rem; padding: 0.6rem 2.6rem 0.6rem 0.9rem;
    background: var(--surface); color: var(--ink); border: 1px solid var(--field-border); border-radius: var(--radius);
    text-align: left; white-space: normal; overflow-wrap: anywhere; text-decoration: none; cursor: pointer;
    font-size: 1rem; line-height: 1.3;
    transition: background-color 80ms, border-color 80ms;
}
.choice-card .choice-name { color: var(--link); font-weight: 700; }
.choice-card .choice-sub { color: var(--ink-soft); font-size: 0.85rem; }
.choice-card > .icon { position: absolute; right: 0.75rem; top: 50%; width: 1.25rem; height: 1.25rem; margin-top: -0.625rem; color: var(--link); }
.choice-card:hover { background: var(--paper); border-color: var(--link); filter: none; }
.choice-card:active { background: var(--info-wash); border-color: var(--link); box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.12); }
.choice-card:active > .icon { transform: translateX(2px); }
/* The current one: a double edge in the link colour, and its words say so ("your area's centre"). */
.choice-card.is-current { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
@media (prefers-reduced-motion: reduce) { .choice-card, .choice-card > .icon { transition: none; transform: none; } }

/* The store list's count and search on "Where do you play?" sit on the page, not in a card (a card there looked like
   one more store to tap). */
.area-pick h2 { margin-bottom: 0.25rem; }
.area-pick .filter-bar { background: none; border: 0; padding: 0; margin: 0.6rem 0 0.75rem; }
.area-link { margin-top: var(--section-gap); }
.area-link-field > span { font-weight: 700; }

/* "Which player are you?" results: a card per player, read-only (faint edge), with a full-width "This is me". */
.you-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.you-choice { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1rem 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.you-choice p { margin: 0; }
.you-choice-name { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.you-choice-sub { display: flex; flex-direction: column; color: var(--ink-soft); font-size: 0.9rem; }
.you-choice form { margin: auto 0 0; padding-top: 0.6rem; }
.you-choice-claim { width: 100%; min-height: 2.75rem; white-space: nowrap; font-weight: 700; }
.you-choice .you-mark { align-self: flex-start; margin: 0.6rem 0 0; }
.you-results { scroll-margin-top: 1rem; }
/* R64: a rival card is a whole-card link (to head to head), so it's a choice card: its own title, name and record
   keep their look; the card takes the choice card's edge, chevron and pressed state. */
.rival-card.choice-card { justify-content: flex-start; height: 100%; }
.rival-card.choice-card .rival-title { color: var(--ink-soft); }

/* Things to read in a list (what you'll see, what you get): a short rule at the start, no box. */
.you-preview-list li, .welcome-features li { padding: 0.1rem 0 0.1rem 0.9rem; border-left: 3px solid var(--rule); }

/* ---------------------------------------------------------------- R63: You's scoreboard (yb-*) */
/* Kyle's pick (concept B): a navy band like the top bar with the gold rule under it, the name, then the rating, record
   and events as a scoreboard; the form guide (the last few events, newest first, a win in gold); one quiet row. */
.you-board { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; margin-bottom: 1rem; }
.yb-band {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1rem 2rem;
    padding: 1.4rem 1.6rem 1.2rem; background: var(--board); color: var(--board-ink); border-bottom: 3px solid var(--gold-bright);
    background-image: radial-gradient(120% 140% at 100% 0%, rgb(212 164 65 / 0.16), transparent 55%);
}
.yb-band :focus-visible { outline-color: var(--gold-bright); }
.yb-id { display: grid; gap: 0.3rem; min-width: 0; }
.yb-home { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.yb-home a { color: var(--board-ink); text-decoration-color: var(--board-soft); }
.yb-home .icon { width: 1rem; height: 1rem; }
.yb-name { margin: 0; color: var(--board-ink); font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.5rem); overflow-wrap: anywhere; }
.yb-score { display: grid; grid-auto-flow: column; gap: 1.6rem; margin: 0; text-align: right; }
.yb-score > div { display: grid; justify-items: end; align-content: end; }
.yb-score dt { display: inline-flex; align-items: center; gap: 0.15rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.yb-score dt .how-link { color: var(--board-soft); min-width: 1.5rem; min-height: 1.5rem; }
.yb-score dt .how-link:hover { color: var(--board-ink); }
.yb-score dd { margin: 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.yb-score .yb-rating dd:first-of-type { font-size: 2.6rem; line-height: 1.05; }
.yb-score .yb-rating dd.yb-word { font-size: 1.6rem; }
.yb-score dd.yb-delta { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; color: var(--board-soft); }
.yb-score dd.yb-delta.is-up { color: var(--board-up); }
.yb-score dd.yb-count { font-family: var(--sans); font-size: 0.78rem; color: var(--board-soft); }
/* R63 follow-up: their area's stores still coming in (R56): one line under the band, in the info wash. */
.yb-fetching { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0; padding: 0.65rem 1.6rem; background: var(--info-wash); color: var(--ink); font-size: 0.92rem; }
.yb-fetching .icon { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; color: var(--link); }
.yb-form { padding: 1rem 1.6rem 1.1rem; }
.yb-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.yb-tiles a {
    position: relative; display: grid; align-content: start; gap: 0.1rem; height: 100%; padding: 0.6rem 0.7rem 0.65rem; color: var(--ink); text-decoration: none;
    background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius);
}
.yb-tiles a:hover { background: var(--paper); border-color: var(--link); }
.yb-when { font-size: 0.78rem; color: var(--ink-soft); }
.yb-rec { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.yb-place { display: flex; align-items: center; gap: 0.25rem; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.yb-place .icon { width: 0.95rem; height: 0.95rem; }
.yb-tiles .is-latest .yb-when::after { content: " · latest"; font-weight: 700; color: var(--ink); }
/* A win: gold is for winners. */
.yb-tiles .is-win a { border: 2px solid var(--gold-bright); background: var(--gold-wash); }
.yb-tiles .is-win .yb-place { color: var(--gold); }
.yb-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; padding: 0.7rem 1.6rem; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--ink-soft); }
.yb-quiet form { margin: 0; }
/* The quiet line's links (Not me, asking for the page to be hidden) are small but at least 24 px to tap (R15, WCAG 2.5.8; ri Stakeholder). */
.yb-quiet > a, .yb-quiet .link-button { display: inline-flex; align-items: center; min-height: 24px; }
.yb-private { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: auto; }
.yb-private .icon { width: 0.95rem; height: 0.95rem; }
/* You's header actions (Kyle, 2026-10-08, option B): R87's buttons, 44 px, two a row on a phone; Not me and hiding stay
   small links at the end of the privacy line (.yb-quiet). */
.yb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0 1.6rem 1rem; }
.yb-acts .eb-btn { min-height: 2.75rem; }
.you-board + .area-offer { margin: 0 0 var(--section-gap); padding: 0.6rem 0.9rem; border-radius: var(--radius); background: var(--info-wash); color: var(--ink); font-size: 0.95rem; }
.you-board:not(:has(+ .area-offer)) { margin-bottom: var(--section-gap); }
@media (max-width: 40rem) {
    .yb-band { grid-template-columns: minmax(0, 1fr); padding: 1.1rem 1.1rem 1rem; }
    .yb-score { justify-content: start; text-align: left; gap: 1.4rem; }
    .yb-score > div { justify-items: start; }
    .yb-score .yb-rating dd:first-of-type { font-size: 2.2rem; }
    .yb-form { padding: 0.9rem 1rem 1rem; }
    .yb-fetching { padding: 0.65rem 1rem; }
    .yb-quiet { padding: 0.7rem 1rem; }
    .yb-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 1rem 0.9rem; }
    .yb-acts .eb-btn { padding: 0 0.5rem; font-size: 0.86rem; white-space: normal; text-align: center; }
    .yb-acts > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    /* Three on a phone (the heading gives no number), the newest marked by a heavier edge. */
    .yb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .yb-tiles li:nth-child(n+4) { display: none; }
    .yb-tiles a { padding-left: 0.55rem; padding-right: 0.55rem; }
    .yb-place { font-size: 0.8rem; gap: 0.2rem; }
    .yb-place .icon { width: 0.85rem; height: 0.85rem; }
    .yb-tiles .is-latest .yb-when::after { content: none; }
    .yb-tiles .is-latest:not(.is-win) a { border-width: 2px; border-color: var(--ink); }
}

/* ---------------------------------------------------------------- R68: the player page as the scoreboard */
/* R63's board (yb-*) for everyone: the labels under the name, "This is me" in a quiet row at the band's foot, then the
   form guide, one quiet facts line, the indexing status and the tabs. */
/* The home field as running text (a flex row broke a long store name into columns). */
.yb-home { display: block; line-height: 1.5; }
.yb-home .icon { vertical-align: -0.15em; margin-right: 0.35rem; }
.yb-home-note { text-transform: none; letter-spacing: 0; }
.yb-labels { margin-top: 0.35rem; }
.yb-labels .how-link { color: var(--board-soft); }
.yb-labels .how-link:hover { color: var(--board-ink); }
.yb-name .you-mark { background: var(--board-ink); color: var(--board); }

/* ---------------------------------------------------------------- R79: a store's chips (its board became R107's dashboard) */
.sb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.3rem 0 0; }
/* The tier is a square outline (Play Hub's word, not ours); the chips are rounded and filled, so they never look alike. */
.sb-tier { display: inline-flex; align-items: baseline; gap: 0.3rem; padding: 0.05rem 0.55rem; border: 1px solid var(--board-soft); border-radius: 6px; font-size: 0.82rem; color: var(--board-soft); }
.sb-tier b { color: var(--board-ink); }
.sb-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: rgb(255 255 255 / 0.12); color: var(--board-ink); }
.sb-chip .icon { width: 0.9rem; height: 0.9rem; }
.sb-chip-gold { background: var(--gold-bright); color: var(--board); }
.sb-playhub { font-weight: 700; }

/* R68: the rating chart's scale in a column of its own, so its numbers stay in view while a phone scrolls the chart. */
.chart-frame { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.chart-frame .chart-wrap { border: 0; border-radius: 0; background: none; padding-left: 0.2rem; }
.chart-scale { position: relative; height: 11rem; margin-top: 0.8rem; }
.chart-scale span { position: absolute; right: 0.45rem; transform: translateY(-50%); font-size: 0.7rem; line-height: 1; color: var(--ink-soft); font-variant-numeric: tabular-nums lining-nums; }

/* ---------------------------------------------------------------- R69: the event line (el-*) */
/* One event on a phone: a headline (the winner and event, or the time and event), a sub-line (store, day, format), an
   optional kind chip, and one figure at the right (seats, or the record and players). The tables stay on wider screens
   (.el-wide); the lines are phones only (.el-phone). Results lines are one link each, to the recap. */
.el-phone { display: none; }
@media (max-width: 40rem) {
    .el-phone { display: block; }
    .el-wide { display: none; }
}
.el-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.el-list > li { border-bottom: 1px solid var(--rule); }
.el-list > li.el, .el-list > li > a.el { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.9rem; align-items: start; padding: 0.65rem 0.1rem; }
.el-list > li > a.el { grid-template-columns: minmax(0, 1fr) auto 1.1rem; color: inherit; text-decoration: none; }
.el-list > li > a.el:hover { background: var(--paper); }
.el-list > li > a.el:active { background: var(--info-wash); }
.el-list > li > a.el .el-head { color: var(--link); }
.el-list > li > a.el > .icon { grid-column: 3; grid-row: 1 / span 2; align-self: center; width: 1.1rem; height: 1.1rem; color: var(--link); }
.el-head { grid-column: 1; font-weight: 700; overflow-wrap: anywhere; }
.el-sub { grid-column: 1; font-size: 0.86rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.el-fig { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.25; white-space: nowrap; }
.el-fig b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--ink); }
.el-none { font-style: italic; }
.el-special { box-shadow: inset 3px 0 0 var(--gold-bright); padding-left: 0.6rem !important; }
/* Day headings in sentence case (R38/R49 took the capitals out of labels elsewhere; ri Stakeholder's review). */
.el-day { margin: 0.9rem 0 0; padding: 0 0 0.3rem; font-family: var(--sans); font-size: 0.92rem; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--rule); }
.el-seats-note { margin: 0 0 0.2rem; }
/* In a wide table, Seats is the number alone, with "Full" in words. */
.el-wide .el-unit, .upcoming-list .el-unit { display: none; }

/* ---------------------------------------------------------------- R70: shareable moments */
/* A Set Championship's champion: the gold tile (gold is for winners), whatever the field's size. */
.recap-champ {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.1rem 1rem; margin: 0 0 1rem;
    padding: 1rem 1.2rem; background: var(--gold-wash); border: 2px solid var(--gold-bright); border-radius: 12px;
}
.recap-champ > .icon { grid-row: span 2; width: 2.4rem; height: 2.4rem; color: var(--gold); }
.recap-champ-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.recap-champ-who { grid-column: 2; font-family: var(--serif); font-size: clamp(1.5rem, 1rem + 2vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
.recap-champ-who a { color: var(--ink); text-decoration-color: var(--gold-bright); }
.recap-champ-rec { grid-column: 3; grid-row: 1 / span 2; font-family: var(--serif); font-size: 2rem; font-variant-numeric: tabular-nums lining-nums; }
/* The event page's utilities, a quiet row at its end. */
.event-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; margin-top: var(--section-gap); padding-top: 0.8rem; border-top: 1px solid var(--rule); font-size: 0.9rem; }
.event-foot form { margin: 0; }
.event-foot a, .event-foot button.link-button { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink-soft); min-height: 1.5rem; }
.event-foot button.link-button:disabled { opacity: 1; color: var(--ink-soft); text-decoration: none; cursor: not-allowed; }
.event-foot .icon { width: 1rem; height: 1rem; }
/* Head to head's win chance: a bar across both players, each one's chance under their side. */
.h2h-odds { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.3rem 0.5rem; align-items: center; margin-top: 0.4rem; font-size: 0.85rem; color: var(--ink-soft); }
.h2h-bar { grid-column: 1 / -1; display: block; height: 0.55rem; border-radius: 999px; overflow: hidden; background: var(--info-wash); border: 1px solid var(--field-border); }
.h2h-bar > span { display: block; height: 100%; background: var(--chart-strong); }
.h2h-odds-b { text-align: right; }
.h2h-odds-a, .h2h-odds-b { font-weight: 700; color: var(--ink); }
.h2h-odds-none { grid-column: 1 / -1; text-align: center; margin: 0.3rem 0 0; }
/* The rounds on a phone: each match stacked (table number, the winner, the loser, the result at the right), so no table
   scrolls sideways; one markup for every viewer, Investigators' columns underneath. */
@media (max-width: 40rem) {
    .table-wrap:has(> table.matches) { overflow: visible; border: 0; }
    table.matches { min-width: 0; table-layout: auto; }
    table.matches, table.matches tbody { display: block; }
    table.matches colgroup, table.matches thead { display: none; }
    table.matches tr.match { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 0.7rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--rule); }
    table.matches tr.match > td { display: block; padding: 0; border: 0; grid-column: 1; }
    table.matches tr.match > td.num { font-size: 0.75rem; color: var(--ink-soft); }
    table.matches tr.match > td.num::before { content: "Table "; }
    table.matches tr.match > td.num { text-align: left; }
    table.matches tr.match > td.result { grid-column: 2; grid-row: 2 / span 2; align-self: center; text-align: right; }
    table.matches tr.match > td.unplayed, table.matches tr.match > td:nth-child(n+5) { grid-column: 1 / -1; }
    table.matches tr.match > td:nth-child(n+5) { font-size: 0.82rem; }
    table.matches td.winner, table.matches td.drew { background: none; box-shadow: none; }
}

/* ---------------------------------------------------------------- R71: the store header on phones */
/* The owner link at the end of the header (it sat between the status and the actions); the actions share one row. */
@media (max-width: 40rem) {
    .store-head .index-status { gap: 0.5rem; }
    .store-head .index-status .index-text { flex-basis: 100%; }
    .store-head .index-status .button-like, .store-head .index-status .inline-set-area button { font-size: 0.85rem; padding: 0 0.6rem; gap: 0.35rem; }
}

/* ---------------------------------------------------------------- R72: the landing page's picture */
/* The first section is two columns on a wide screen: today's words and the sign-in, then the scoreboard for a made-up
   player, tilted a little like a card on a table. One column on phones and tablets, the picture under the sign-in. */
.welcome-hero { max-width: 66rem; display: grid; gap: 2rem 3rem; align-items: center; }
.welcome-hero .welcome-intro { min-width: 0; max-width: 38rem; }
@media (min-width: 56rem) { .welcome-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.welcome-pic { margin: 0; min-width: 0; }
.welcome-board .yb-name { font-family: var(--serif); font-weight: 400; }
/* The landing page's sections share the hero's left edge; their text keeps its reading width. */
.welcome-landing { max-width: 66rem; }
.welcome-landing:not(.welcome-hero) > * { max-width: 44rem; }
.welcome-board { margin: 0; transform: rotate(-1.5deg); box-shadow: 0 18px 40px rgb(17 22 44 / 0.22); }
.welcome-board .yb-band { grid-template-columns: minmax(0, 1fr); }
.welcome-board .yb-score { justify-content: start; text-align: left; }
.welcome-board .yb-score > div { justify-items: start; }
.yb-form-label { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.welcome-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.welcome-tiles li > span { display: grid; gap: 0.1rem; height: 100%; padding: 0.55rem 0.6rem; border: 1px solid var(--field-border); border-radius: var(--radius); background: var(--surface); }
.welcome-tiles .is-win > span { border: 2px solid var(--gold-bright); background: var(--gold-wash); }
.welcome-tiles .is-win .yb-place { color: var(--gold); }
.welcome-tiles .is-latest:not(.is-win) > span { border-width: 2px; border-color: var(--ink); }
.welcome-tiles .yb-when::after { content: none !important; }
.welcome-pic figcaption { margin-top: 1rem; font-size: 0.85rem; color: var(--ink-soft); text-align: center; }
@media (prefers-reduced-motion: reduce) { .welcome-board { transform: none; } }
@media (max-width: 56rem) { .welcome-board { transform: none; } }

/* ---------------------------------------------------------------- R73: This week, tightened */
/* A visitor with no area: one prompt to make the page theirs (in the info wash, never for someone with an area). */
.ny-setup { display: grid; gap: 0.6rem; padding: 1rem 1.1rem; background: var(--info-wash); border-radius: 10px; }
.ny-setup p { margin: 0; }
.ny-setup-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* "Taylor Stone won at Burnside Battles": the joining words quieter than the names. */
.el-soft { font-weight: 400; color: var(--ink); }
/* An upset's player and their rating stay together when the line wraps. */
.ny-pl { white-space: nowrap; }
.ss-champions-h { font-size: 1.1rem; margin: 0.4rem 0 0.6rem; }

/* ---------------------------------------------------------------- R74: the section band (sb-*) */
/* Kyle's pick "Your patch", with ri Stakeholder's changes: the header of Stores, Players and Upcoming. R63's navy band
   and gold rule; the title is the tab; figures as a scoreboard; a small picture with its key; underline tabs below. */
.sb { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: visible; }
.sb-band { border-radius: 13px 13px 0 0; }
.sb-band {
    display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 0.4rem 1.5rem; align-items: center;
    padding: 1.2rem 1.4rem 1.25rem; background: var(--board); color: var(--board-ink); border-bottom: 3px solid var(--gold-bright);
    background-image: radial-gradient(120% 140% at 100% 0%, rgb(212 164 65 / 0.13), transparent 55%);
}
.sb-nopic .sb-band { grid-template-columns: minmax(0, 1fr); }
.sb-band :focus-visible { outline-color: var(--gold-bright); }
.sb-main { display: grid; gap: 0.35rem; min-width: 0; align-content: start; }
.sb-area { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.88rem; color: var(--board-soft); }
.sb-area .icon { flex: none; width: 1rem; height: 1rem; }
.sb-area b { color: var(--board-ink); }
.sb-area a { display: inline-block; min-height: 1.5rem; padding-top: 0.1rem; color: var(--board-ink); text-decoration-color: var(--board-soft); }
.sb-title { margin: 0; color: var(--board-ink); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); line-height: 1.15; overflow-wrap: anywhere; }
/* R78 (ri Designer): the period the figures cover, a quiet subtitle in the title; sans, never the heading face */
.sb-h1-per { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--board-soft); }
.sb-figs { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; margin: 0.1rem 0 0; }
.sb-figs > div { display: flex; flex-direction: column; }
.sb-figs dt { order: 2; }
.sb-figs dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); max-width: 9rem; line-height: 1.25; }
.sb-figs dd { margin: 0; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.sb-figs dd a { color: var(--board-ink); text-decoration-color: var(--board-soft); }
.sb-figs dt .how-link { color: var(--board-soft); min-width: 1.5rem; min-height: 1.5rem; vertical-align: middle; }
.sb-figs dt .how-link:hover { color: var(--board-ink); }
.sb-next { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--board-ink); }
.sb-next b { color: var(--gold-bright); white-space: nowrap; }
.sb-next a { color: var(--board-ink); }
.sb-desc { margin: 0.15rem 0 0; color: var(--board-soft); font-size: 0.93rem; max-width: 40rem; }
.sb-desc .how-link { color: var(--board-ink); }
.sb-search { display: flex; flex-wrap: nowrap; gap: 0.5rem; margin: 0.6rem 0 0; max-width: 34rem; }
.sb-search input[type="search"] { flex: 1 1 auto; min-width: 0; width: auto; }
.sb-search button { flex: none; }
.sb-search input[type="search"] { background: #fff; color: #1b2447; border-color: #7d869e; }
.sb-search button { background: var(--gold-bright); color: #1b2447; border-color: var(--gold-bright); }
/* The pictures: graphics on the band at 3:1 or more (R15); their words are in the aria-label and the key. */
.sb-pic-wrap { display: grid; gap: 0.35rem; justify-items: center; align-self: center; }
.sb-pic { display: block; width: 100%; height: auto; max-height: 11.5rem; }
.sb-pic-phone { display: none; }
.pic-line { fill: none; stroke: rgb(185 193 216 / 0.45); stroke-dasharray: 3 4; }
.pic-dot { fill: var(--board-soft); }
.pic-hot { fill: var(--gold-bright); }
.pic-pre { fill: none; stroke: var(--gold-bright); stroke-width: 2.5; }
.pic-me { fill: var(--board-soft); stroke: var(--board-ink); stroke-width: 2.5; }
.pic-me.hot { fill: var(--gold-bright); }
.pic-lab { fill: var(--board-soft); font: 10px var(--sans); }
.pic-bar { fill: var(--board-soft); }
.pic-bar.hot { fill: var(--gold-bright); }
.pic-cell { fill: rgb(255 255 255 / 0.08); }
.pic-cell.today { stroke: var(--board-ink); stroke-width: 1.5; }
.pic-key { list-style: none; margin: 0; padding: 0; font-size: 0.75rem; line-height: 1.35; color: var(--board-soft); text-align: center; }
.pic-mark { display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.3rem; border-radius: 50%; background: var(--gold-bright); }
.pic-mark.ring { background: none; box-shadow: inset 0 0 0 2px var(--gold-bright); }
/* The tabs: underlined, the current one in bold with the gold rule; on phones, short labels and "More". */
.sb-tabs { display: flex; gap: 0.2rem; padding: 0 0.9rem; align-items: stretch; }
.sb-tabs > a, .sb-more > summary {
    display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0.6rem 0.6rem 0.55rem; color: var(--ink-soft);
    text-decoration: none; font-size: 0.95rem; border-bottom: 3px solid transparent; white-space: nowrap;
}
.sb-tabs > a:hover, .sb-more > summary:hover { color: var(--ink); }
.sb-tabs > a[aria-current="page"], .sb-more.is-current > summary { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold-bright); }
.sb-tabs .icon { width: 1.05rem; height: 1.05rem; }
.sb-tabs .sb-s { display: none; }
.sb-more { display: none; position: relative; }
.sb-more > summary { cursor: pointer; list-style: none; }
.sb-more > summary::-webkit-details-marker { display: none; }
.sb-more-menu {
    position: absolute; right: 0; top: 100%; z-index: 20; display: grid; min-width: 12rem; padding: 0.3rem;
    background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius); box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}
.sb-more-menu a { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.7rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.sb-more-menu a:hover { background: var(--paper); }
.sb-more-menu a[aria-current="page"] { font-weight: 700; }
/* Find a store (Players' Indexing tab): the stores we know as choice cards, then the Play Hub link box. */
.find-store .player-search { flex-wrap: nowrap; max-width: 34rem; }
.find-store .player-search input { flex: 1 1 auto; min-width: 0; }
.find-store .player-search button { flex: none; }
.find-head { font-size: 1.1rem; margin: 1.2rem 0 0.6rem; }
.find-stores { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.6rem; }
.find-stores li { display: grid; }
@media (max-width: 40rem) {
    .sb-band { grid-template-columns: minmax(0, 1fr) 5.5rem; padding: 0.85rem 0.9rem 0.9rem; gap: 0.3rem 0.8rem; align-items: start; }
    .sb-main { display: contents; }
    /* The picture beside the title and figures; a long title ("Upcoming events") takes the whole width above it. */
    .sb-area { grid-column: 1 / -1; }
    .sb-title, .sb-figs, .sb-next { grid-column: 1; }
    .sb-long .sb-title { grid-column: 1 / -1; }
    .sb-desc, .sb-search { grid-column: 1 / -1; }
    .sb-pic-wrap { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
    .sb-long .sb-pic-wrap { grid-row: 3 / span 2; }
    .sb-nopic .sb-band { grid-template-columns: minmax(0, 1fr); }
    .sb-title { font-size: 1.75rem; }
    .sb-h1-per { display: block; margin-top: 0.1rem; }
    .sb-within { display: none; }
    .sb-figs { gap: 0.2rem 1rem; }
    .sb-figs dd { font-size: 1.45rem; }
    .sb-figs dt { font-size: 0.66rem; }
    .sb-next { font-size: 0.85rem; }
    /* ri Stakeholder: the tabs stay on the first screen, so what's here is the title and figures; a how-it-works
       link the page has nowhere else stays. */
    .sb-desc-text, .sb-desc-only { display: none; }
    .pic-lab:not(.pic-wd) { display: none; }
    .pic-wd { font-size: 14px; }
    .pic-key { font-size: 0.7rem; }
    .sb-pic-wide { display: none; }
    .sb-pic-phone { display: block; }
    .sb-tabs { padding: 0 0.3rem; gap: 0; }
    .sb-tabs > a, .sb-more > summary { flex: 1 1 auto; justify-content: center; padding: 0.6rem 0.35rem 0.55rem; font-size: 0.88rem; gap: 0.3rem; }
    .sb-tabs .icon { display: none; }
    .sb-tabs .sb-l { display: none; }
    .sb-tabs .sb-s { display: inline; }
    .sb-tabs > a.sb-wide { display: none; }
    .sb-more { display: flex; }
}

/* ---------------------------------------------------------------- R76: head to head as a face-off (fo-*) */
/* Kyle's pick, ri Stakeholder's changes: R68's navy board as a face-off. The sides mirror each other and share three rows
   (name, rating, labels); the record in words in the middle; the win chance in two tones, each share under its own
   player with a matching swatch (colour is never the only signal). */
.h2h-board { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.fo-band { padding: 1.3rem 1.5rem 1.2rem; background: var(--board); color: var(--board-ink); border-bottom: 3px solid var(--gold-bright);
    background-image: radial-gradient(120% 140% at 50% 0%, rgb(212 164 65 / 0.12), transparent 60%); }
.fo-band :focus-visible { outline-color: var(--gold-bright); }
.fo-eyebrow { margin: 0 0 0.8rem; text-align: center; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--board-soft); }
.fo-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 0.3rem 1.5rem; align-items: start; }
.fo-side { display: grid; grid-row: 1 / span 3; grid-template-rows: subgrid; row-gap: 0.3rem; justify-items: start; min-width: 0; }
.fo-b { grid-column: 3; text-align: right; justify-items: end; }
.fo-name { align-self: end; font-family: var(--serif); font-size: clamp(1.45rem, 1rem + 1.8vw, 2.1rem); line-height: 1.1; color: var(--board-ink); text-decoration-color: var(--board-soft); overflow-wrap: anywhere; }
.fo-rating { margin: 0; display: flex; gap: 0.4rem; align-items: baseline; }
.fo-rating dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.fo-rating dd { margin: 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.fo-rating dd.fo-prov { font-family: var(--sans); font-size: 0.88rem; color: var(--board-soft); }
.fo-chips { align-self: start; display: flex; flex-wrap: wrap; gap: 0.3rem; max-width: 100%; }
.fo-b .fo-chips { justify-content: flex-end; }
.fo-chips .plabels { display: contents; }
.fo-chips .plabel { white-space: normal; max-width: 100%; text-align: left; text-wrap: balance; }
.fo-chips .you-mark { margin: 0; background: var(--board-ink); color: var(--board); }
.fo-mid { grid-column: 2; grid-row: 1 / span 3; display: grid; justify-items: center; align-content: center; text-align: center; gap: 0.2rem; min-width: 9rem; }
.fo-lead { margin: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; }
.fo-met { margin: 0; font-size: 0.85rem; color: var(--board-soft); }
.fo-met a { color: var(--board-ink); text-decoration-color: var(--board-soft); }
.fo-odds { margin-top: 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.35rem 0.8rem; align-items: center; }
.fo-odds-h { grid-column: 1 / -1; margin: 0; display: flex; justify-content: center; align-items: center; gap: 0.2rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.fo-odds-h .how-link, .fo-noodds .how-link { color: var(--board-soft); min-width: 1.5rem; min-height: 1.5rem; }
.fo-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 0.7rem; border-radius: 999px; overflow: hidden; }
.fo-bar-a { background: #c9bdf2; }
.fo-bar-b { background: #6f7aa3; }
.fo-pct { font-weight: 700; font-size: 0.95rem; min-width: 0; overflow-wrap: anywhere; }
.fo-pct small { font-weight: 400; font-size: 0.82rem; color: var(--board-soft); }
.fo-pct i { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 3px; margin-right: 0.35rem; }
.fo-pct-a i { background: #c9bdf2; }
.fo-pct-b { grid-column: 2; text-align: right; }
.fo-pct-b i { background: #6f7aa3; margin: 0 0 0 0.35rem; }
.fo-noodds { margin: 1rem 0 0; display: flex; justify-content: center; align-items: center; gap: 0.2rem; font-size: 0.88rem; color: var(--board-soft); text-align: center; }
.fo-quiet { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; align-items: center; padding: 0.6rem 1.5rem; font-size: 0.9rem; }
.fo-quiet a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 1.75rem; }
/* The matches: R69's event lines with a W, L or D tile for the left-hand player (gold only for a win). */
.fo-lines { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.fo-lines > li { border-bottom: 0; }
.fo-lines > li + li { border-top: 1px solid var(--rule); }
.fo-lines > li > a.el { grid-template-columns: auto minmax(0, 1fr) auto 1.1rem; align-items: center; padding: 0.7rem 0.9rem; }
.fo-lines .fo-wl { grid-column: 1; grid-row: 1 / span 2; }
.fo-lines .el-head { grid-column: 2; grid-row: 1; }
.fo-lines .el-sub { grid-column: 2; grid-row: 2; }
.fo-wl { grid-row: 1 / span 2; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 6px; font-weight: 700; font-size: 0.85rem; border: 2px solid var(--field-border); color: var(--ink-soft); }
.fo-wl-won { border-color: var(--gold-bright); background: var(--gold-wash); color: var(--gold); }
.fo-wl-drew { border-style: dashed; }
.fo-wl-none { border-style: dotted; }
.fo-games { grid-row: 1 / span 2; grid-column: 3; font-family: var(--serif); font-size: 1.3rem; font-variant-numeric: lining-nums tabular-nums; }
.fo-lines > li > a.el > .icon { grid-row: 1 / span 2; grid-column: 4; color: var(--ink-soft); }
/* "Compare with…": choice cards with each player's home field and rating. */
.h2h-pick-h { font-size: 1.1rem; margin: 0 0 0.6rem; }
.h2h-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.6rem; }
.h2h-cards li { display: grid; }
@media (max-width: 40rem) {
    .fo-band { padding: 1rem 0.95rem; }
    /* Phones (R70): the two players keep their halves; the record goes under them, across both. */
    .fo-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto auto; gap: 0.3rem 0.9rem; }
    .fo-b { grid-column: 2; }
    .fo-mid { grid-column: 1 / -1; grid-row: 4; min-width: 0; margin-top: 0.4rem; padding-top: 0.6rem; border-top: 1px solid rgb(185 193 216 / 0.35); }
    .fo-name { font-size: 1.35rem; }
    .fo-chips .plabels .plabel { font-size: 0.72rem; }
    .fo-quiet { padding: 0.6rem 0.95rem; }
    .fo-lines > li > a.el { padding: 0.65rem 0.75rem; gap: 0.1rem 0.6rem; }
}

/* ---------------------------------------------------------------- R78: the list head (lh-), the site's filter bar */
/* Kyle: "remember the look and feel of this filter bar; we will need to mimic it on other filters across the entire
   site". Rebuilt after his review ("this looks really poor"): one card, a heading line saying what's listed (the count,
   then the period in words, then how-it-works), and under a thin rule one strip of controls that are all alike: one
   height, one edge, one radius, one type size, the label inside, sized to what they hold. The list's main choice (the
   set) is the first control, set apart only by a stronger edge in the link colour; Sort stays in the flow. */
.lh { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: visible; margin-bottom: 1rem; }
.lh-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; margin: 0; padding: 0.7rem 1rem; font-size: 0.95rem; color: var(--ink-soft); }
.lh-count { color: var(--ink); white-space: nowrap; }
.lh-count b { font-weight: 700; }
.lh-shown { color: var(--ink-soft); }
.lh-period { min-width: 0; }
.lh-period::before { content: "\00b7"; margin-right: 0.6rem; color: var(--ink-soft); }
.lh-dates { color: var(--ink); font-weight: 700; }
/* a line of its own under the count and period: a flex item of .lh-head (inside .lh-period it stacked beside the count) */
.lh-early { display: block; flex-basis: 100%; min-width: 0; color: var(--ink); }
.lh-head .how-link { align-self: center; }
.lh-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.65rem 1rem; border-top: 1px solid var(--rule); background: var(--paper); border-radius: 0 0 11px 11px; }
.lh-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; padding: 0 1rem 0.65rem; background: var(--paper); border-radius: 0 0 11px 11px; }
.lh-filters:has(+ .lh-picked) { border-radius: 0; }
/* every control the same */
.ctl {
    display: inline-flex; flex: none; align-items: center; gap: 0.4rem; box-sizing: border-box; height: 2.5rem; max-width: 100%; padding: 0 0.75rem;
    border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.92rem;
    line-height: 1.2; cursor: pointer; white-space: nowrap;
}
.ctl > span { color: var(--ink-soft); white-space: nowrap; }
.ctl select {
    font: inherit; font-weight: 700; color: var(--ink); background: transparent; border: 0; padding: 0 1.15rem 0 0; min-height: 0; appearance: none; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 0.45rem center, right 0.12rem center; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; box-shadow: none;
    /* Sized to the value shown, not the longest option (Kyle's review: "Home field Any" ran 770 px); where a browser can't,
       a long store name is capped and cut with an ellipsis. */
    field-sizing: content; max-width: 8rem; text-overflow: ellipsis;
}
.ctl select:focus-visible { outline: none; }
.ctl:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.ctl:hover { border-color: var(--ink-soft); }
/* the list's main choice: the same control, with the link colour's edge */
.ctl-main { border: 2px solid var(--link); padding: 0 0.7rem; }
.ctl-main select { max-width: 10rem; }
/* Where field-sizing isn't supported (Firefox, older Safari) a select is as wide as its longest option up to these caps:
   with every control showing, the strip still fits one row at 1280 px (measured, ri Coordinator's check). */
/* an on/off switch: a drawn box that fills when on (the mock-up's), never the browser's own checkbox beside a select */
.ctl-toggle input { appearance: none; flex: none; width: 1rem; height: 1rem; margin: 0; border: 2px solid var(--field-border); border-radius: 4px; background: var(--surface); cursor: pointer; }
.ctl-toggle input:checked { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 2px var(--surface); }
.ctl-toggle:has(input:checked) { border-color: var(--ink); font-weight: 700; }
/* R81: a search box in the same frame: the icon, then the field, no edge of its own */
.ctl-search { cursor: text; }
.ctl-search .icon { width: 1rem; height: 1rem; color: var(--ink-soft); }
.ctl-search input { width: 11rem; min-width: 0; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    font: inherit; color: var(--ink); }
.ctl-search input:focus, .ctl-search input:focus-visible { outline: none; box-shadow: none; }
/* R81: an on/off filter that's a link (it changes the address): the same drawn box, filled when on */
a.ctl { text-decoration: none; }
.ctl-box { flex: none; width: 1rem; height: 1rem; border: 2px solid var(--field-border); border-radius: 4px; background: var(--surface); }
a.ctl-toggle[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }
a.ctl-toggle[aria-pressed="true"] .ctl-box { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 2px var(--surface); }
.ctl-caret { display: inline-block; width: 0; height: 0; border-left: 0.3rem solid transparent; border-right: 0.3rem solid transparent; border-top: 0.36rem solid currentColor; }
.ctl-menu { position: relative; flex: none; }
.ctl-menu > summary { list-style: none; }
/* the older .label-filter summary (a pill) mustn't win over .ctl inside the list head (ri Stakeholder) */
.label-filter > summary.ctl { padding: 0 0.75rem; border-radius: 8px; font-size: 0.92rem; color: var(--ink); }
.ctl-menu > summary::-webkit-details-marker { display: none; }
.ctl-sort > .icon { display: none; color: var(--ink-soft); }
/* headings that say their period, and the period beside a card's title */
.th-per { display: block; font-weight: 400; font-size: 0.75rem; color: var(--ink-soft); }
.rt-per { margin-left: 0.35rem; padding: 0 0.45rem; border: 1px solid var(--field-border); border-radius: 999px; font-size: 0.75rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
@media (max-width: 40rem) {
    .lh-head { padding: 0.65rem 0.8rem; }
    /* the period on its own line under the count, no leading dot */
    .lh-period { flex-basis: 100%; }
    .lh-period::before { content: none; }
    .lh-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.6rem 0.8rem; }
    .lh-filters > .filter-chip, .lh-filters > .ctl-main, .lh-filters > .ctl-search { grid-column: 1 / -1; margin: 0; }
    .ctl-search input { width: 100%; flex: 1; }
    /* a control left alone on the last row takes the whole row: counted among the half-width controls only (the set,
       search, segments and chips each take a row of their own) */
    .lh-filters > :last-child:nth-child(odd of :not(.ctl-main, .ctl-search, .ctl-seg, .filter-chip)):not(.ctl-main, .ctl-search, .ctl-seg, .filter-chip) { grid-column: 1 / -1; }
    .ctl, .ctl-menu > summary { width: 100%; min-width: 0; justify-content: space-between; }
    .ctl-toggle { justify-content: flex-start; }
    .ctl select { min-width: 0; max-width: none; }
    .ctl-sort { justify-content: flex-start; }
    .ctl-sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .ctl-sort > .icon { display: inline; }
    .ctl-sort select, .ctl-main select { flex: 1; }
    .lh-picked { padding: 0 0.8rem 0.6rem; }
}
/* R78: a segmented choice inside the list head's strip, at the controls' height; and a player's events grouped by set. */
.ctl-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--field-border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.ctl-seg a { display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0 0.8rem; color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.ctl-seg a + a { border-left: 1px solid var(--field-border); }
.ctl-seg a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.set-group { margin-top: 1.4rem; }
.set-group-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; font-size: 1.3rem; margin: 0 0 0.5rem; }
.set-group-sub { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); }
@media (max-width: 40rem) { .ctl-seg { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .ctl-seg a { justify-content: center; } .ctl-seg a:nth-child(3) { border-left: 0; } .ctl-seg a:nth-child(n+3) { border-top: 1px solid var(--field-border); } }
/* R81: three choices sit in one row of three on a phone (two to a row left a blank cell), each column as wide as its
   label: one line, the strip's one height, where there's room (375 px and up); where there isn't (360 px), the long
   label wraps rather than overflowing (ri Stakeholder) */
@media (max-width: 40rem) {
    .ctl-seg:has(> a:nth-child(3):last-child) { grid-template-columns: auto auto auto; }
    .ctl-seg:has(> a:nth-child(3):last-child) a { padding: 0.2rem 0.6rem; text-align: center; line-height: 1.2; }
    .ctl-seg:has(> a:nth-child(3):last-child) a:nth-child(3) { border-left: 1px solid var(--field-border); border-top: 0; }
}
/* R78: Players' lists as player lines on phones (the mock-up): the name, then home field and a label; the set's figures at the end. */
.pl-lines { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.pl-lines > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.15rem 0.7rem; align-items: center; padding: 0.65rem 0.8rem; }
.pl-lines > li + li { border-top: 1px solid var(--rule); }
.pl-rank { grid-column: 1; grid-row: 1 / span 2; color: var(--ink-soft); font-weight: 700; min-width: 1.4rem; }
.pl-name { grid-column: 2; grid-row: 1; font-weight: 700; overflow-wrap: anywhere; }
.pl-sub { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.4rem; font-size: 0.84rem; color: var(--ink-soft); }
.pl-figs { grid-column: 3; grid-row: 1 / span 2; display: grid; justify-items: end; text-align: right; font-size: 0.82rem; color: var(--ink-soft); }
.pl-figs b { font-size: 1.02rem; color: var(--ink); white-space: nowrap; }
.pl-figs b small { font-weight: 400; font-size: 0.72rem; color: var(--ink-soft); }

/* ── R83: achievement cards, the Medallion (Kyle's pick; STYLE.md "Achievement cards"). One card, one size: 8rem tall at
   every width, a 5.4rem band with rays behind a medallion whose rings count the tier, and the text beside it, each line
   clamped (the kind and tier on one line, the name and the why line on two at most). The band is the site's for now;
   R84 gives a set's achievements its set's colour and adds "counts towards" to the tier line. ── */
.acs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.ac { position: relative; overflow: hidden; height: 8rem; display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); border-radius: 12px;
    background: var(--surface); border: 1px solid var(--rule); color: var(--ink); }
.ac-side { position: relative; background: var(--board); display: grid; place-items: center; overflow: hidden; }
.ac-side::before { content: ""; position: absolute; inset: -40%;
    background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--board-ink) 10%, transparent) 0 7deg, transparent 7deg 20deg); }
.ac-side svg.md { position: relative; width: 3.9rem; height: 3.9rem; }
.ac-body { padding: 0.6rem 0.75rem; display: grid; align-content: center; gap: 0.12rem; min-width: 0; }
.ac-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 0.68rem/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.ac-nm { font-size: 0.95rem; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ac-tier { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.ac-why { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.md-face { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.md-ring { fill: none; stroke: var(--gold-bright); stroke-width: 2.2; }
.md-glyph { fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.md-pip { fill: var(--ink); }
.ac-group + .ac-group { margin-top: 1rem; }
.ac-group-h { margin: 0 0 0.45rem; font: 700 0.78rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.ac-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin: 0 0 0.6rem; }
.ac-head h2 { margin: 0; }
.ac-head .ac-sub { font-size: 0.9rem; color: var(--ink-soft); }
.ac-private { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.ac-private .icon { width: 0.95em; height: 0.95em; }
/* R83: admins mark a problem report as fixed (Bug hunter) when they close it. */
.ireq-check { display: flex; align-items: center; gap: 0.45rem; margin: 0.45rem 0 0; min-height: 24px; font-size: 0.92rem; }
/* R83: how it works lists an achievement's tiers one to a line. */
.hiw-tier { display: block; }
/* R83: what appeared since the claimer last looked (You only), in words on the tier line; and the one welcome card on
   their first look, instead of marking everything from past play new (Kyle). */
.ac-new { margin-right: 0.4rem; color: var(--gold); }
.ac-welcome { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 0 0.7rem; padding: 0.6rem 0.85rem; border-radius: var(--radius);
    background: var(--gold-wash); color: var(--ink); font-size: 0.95rem; }
.ac-welcome .icon { flex: none; width: 1.2em; height: 1.2em; margin-top: 0.1em; color: var(--gold); }

/* ── R83 part 2: the season track (the claimer's own) and Season complete. ── */
.track-line { margin: 0 0 0.9rem; font-size: 0.98rem; }
.track-meter { position: relative; margin: 0.2rem 0 2.4rem; }
.track-bar { display: block; height: 0.7rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.track-fill { display: block; height: 100%; background: var(--link); border-radius: 999px; width: 0; }
.track-fill-0 { width: 0%; }
.track-fill-10 { width: 10%; }
.track-fill-20 { width: 20%; }
.track-fill-30 { width: 30%; }
.track-fill-40 { width: 40%; }
.track-fill-50 { width: 50%; }
.track-fill-60 { width: 60%; }
.track-fill-70 { width: 70%; }
.track-fill-80 { width: 80%; }
.track-fill-90 { width: 90%; }
.track-fill-100 { width: 100%; }
.track-mark { position: absolute; top: -0.35rem; width: 2px; height: 1.4rem; background: var(--ink); }
.track-mark span { position: absolute; top: 1.6rem; transform: translateX(-50%); white-space: nowrap; font-size: 0.78rem; color: var(--ink-soft); }
.track-mark-half { left: 50%; }
.track-mark-end { right: 0; }
.track-mark-end span { transform: translateX(-100%); }
.track-rewards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.track-reward { display: grid; gap: 0.15rem; padding: 0.6rem 0.75rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.track-reward-name { font-weight: 700; display: inline-flex; align-items: center; gap: 0.35rem; }
.track-reward-state { font-size: 0.85rem; color: var(--ink-soft); }
.track-reward.track-locked { border-style: dashed; border-color: var(--field-border); background: transparent; }
.track-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0.5rem; }
.track-steps li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.1rem 0.6rem; align-items: start; padding: 0.6rem 0.7rem;
    border: 1px dashed var(--field-border); border-radius: 10px; font-size: 0.92rem; }
.track-steps li.track-done { border: 1px solid var(--rule); background: var(--surface); }
.track-tick { grid-row: 1 / span 2; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--field-border); display: grid; place-items: center; color: var(--surface); }
.track-done .track-tick { background: var(--link); border-color: var(--link); }
.track-tick .icon { width: 1rem; height: 1rem; }
.track-step-name { font-weight: 700; line-height: 1.3; }
.track-step-rule { font-size: 0.84rem; color: var(--ink-soft); }
.track-others { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.9rem 0 0; font-size: 0.92rem; }
.track-others a { min-height: 24px; display: inline-flex; align-items: center; }
/* Season complete (STYLE.md): the same 8rem card, filled with the band and a laurel reading 10/10. */
.ac.ac-complete { background: linear-gradient(120deg, var(--board), color-mix(in srgb, var(--board) 75%, #000)); border-color: transparent; color: var(--board-ink); }   /* darker towards the end, so the band text only gains contrast */
.ac-complete .ac-side { background: transparent; }
.ac-complete .ac-side::before { display: none; }
.ac-complete .ac-k, .ac-complete .ac-why { color: var(--board-soft); }
.ac-complete .ac-tier, .ac-complete .ac-nm { color: var(--board-ink); }
.ac-complete svg.lau { width: 4.4rem; height: 4.4rem; }
.lau path { fill: none; stroke: var(--gold-bright); stroke-width: 2; stroke-linecap: round; }
.lau ellipse { fill: var(--gold-bright); }
.lau text { fill: var(--board-ink); font: 700 12px var(--sans); }
/* ri Stakeholder: a step whose window has passed in an open track says so, undashed and without the progress look. */
.track-steps li.track-shut { border: 1px solid var(--rule); background: transparent; }
.track-shut .track-tick { border-style: dotted; }

/* ── R83 (Kyle approved the mock-up, 2026-10-04): kind colours. Each card's kind gets its ring colour and a band
   pattern; the kind line still says it in words, so colour is never the only signal. Every ring is at least 5:1 on the
   band in both themes (the band is navy in both), and on the still-to-earn band. Set colours wait for R84. ── */
:root { --k-wins: #7cc6ea; --k-results: #e2b556; --k-seasons: #8fd694; --k-travel: #f2a27e; --k-milestone: #c9b6f2; }
.ac-wins { --kc: var(--k-wins); --kpat: repeating-conic-gradient(from 0deg, var(--k-wins) 0 7deg, transparent 7deg 20deg); }
.ac-results { --kc: var(--k-results); --kpat: repeating-linear-gradient(90deg, var(--k-results) 0 3px, transparent 3px 11px); }
.ac-seasons { --kc: var(--k-seasons); --kpat: repeating-radial-gradient(circle at 50% 50%, var(--k-seasons) 0 2px, transparent 2px 10px); }
.ac-travel { --kc: var(--k-travel); --kpat: radial-gradient(circle, var(--k-travel) 1.6px, transparent 2px) 0 0 / 10px 10px; }
.ac-milestone { --kc: var(--k-milestone); --kpat: repeating-linear-gradient(45deg, var(--k-milestone) 0 2px, transparent 2px 9px); }
.ac .ac-side::before { background: var(--kpat, repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--board-ink) 10%, transparent) 0 7deg, transparent 7deg 20deg)); opacity: 0.16; }
.ac .md-ring { stroke: var(--kc, var(--gold-bright)); }
/* Still to earn: the same card, quieter. The band greys and the rings dash; the text keeps its full contrast. */
.ac.ac-todo { background: transparent; border-style: dashed; border-color: var(--field-border); }
.ac-todo .ac-side { background: color-mix(in srgb, var(--board) 70%, #6b7280); }
.ac-todo .md-ring { stroke-dasharray: 3 3; }
.ac-why b { color: var(--ink); }
.ac-why .ac-sep { margin: 0 0.25rem; }
/* Your achievements (/me/achievements): its tabs. */
.ya-tabs { display: flex; gap: 0.2rem; overflow-x: auto; border-bottom: 1px solid var(--rule); margin: 0.8rem 0 0; scrollbar-width: none; }
.ya-tabs a { padding: 0.55rem 0.8rem; white-space: nowrap; text-decoration: none; color: var(--ink-soft); border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center; gap: 0.35rem; }
.ya-tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--link); }
.ya-tabs .tab-count { font-weight: 400; }
.ya-note { color: var(--ink-soft); font-size: 0.92rem; }
.you-ach .ya-track { margin: 0.9rem 0 0; }

/* ── Your achievements' header (Kyle, 2026-10-04: "match it to style of the app"): R74's section band. Its picture is the
   newest medallions, overlapping, each ringed in its kind colour (every ring at least 7:1 on the band); decorative, the
   figures say it. The privacy line stays a quiet line in the band. ── */
.sb-ya .sb-area a { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 24px; }
.sb-ya .sb-area .icon { width: 1rem; height: 1rem; }
.ya-private { display: flex; align-items: flex-start; gap: 0.4rem; }
.ya-private .icon { flex: none; width: 1rem; height: 1rem; margin-top: 0.15em; }
.ya-private a { color: var(--board-ink); }
.ya-pic { display: flex; justify-content: center; align-items: center; padding: 0.3rem 0; }
.ya-medal { display: block; width: 4rem; height: 4rem; margin-left: -0.6rem; border-radius: 50%; background: var(--board); }
.ya-medal:nth-child(even) { transform: translateY(0.5rem); }
/* The newest three: each one whole, rather than five crowding the 11rem column. */
.ya-medal:nth-last-child(n+4) { display: none; }
.ya-medal:nth-last-child(3) { margin-left: 0; }
.ya-medal:first-child { margin-left: 0; }
.ya-medal svg { display: block; width: 100%; height: 100%; }
.ya-medal .md-ring { stroke: var(--kc, var(--gold-bright)); }
.sb-tabs .tab-count { font-weight: 400; }
@media (max-width: 40rem) {
    /* ri Stakeholder: the four tabs fit a phone without their counts, which the band above already shows. */
    .sb-ya .sb-tabs .tab-count { display: none; }
    /* Phones: the same three, a little smaller. */
    .ya-medal { width: 3.2rem; height: 3.2rem; margin-left: -0.8rem; }
    .ya-medal:nth-last-child(3) { margin-left: 0; }
}

/* ── R83: the season track as a board (Kyle's pick C, with prize cards "that look like something special"). In the set's
   own colours: the partial sets --s-*-l and --s-*-d from the set's hue (SetPalette, checked by SetPaletteTests) and the
   reader's theme picks one. Band text 4.5:1 on both ends of the band; accent, kind rings and the edge 3:1. ── */
.tb { --s-board: var(--s-board-l); --s-board2: var(--s-board2-l); --s-ink: var(--s-ink-l); --s-soft: var(--s-soft-l); --s-face: var(--s-face-l); --s-accent: var(--s-accent-l); --s-edge: var(--s-edge-l); }
.tb-trophy { --s-board: var(--s-board-l); --s-board2: var(--s-board2-l); --s-ink: var(--s-ink-l); }
@media (prefers-color-scheme: dark) {
    .tb { --s-board: var(--s-board-d); --s-board2: var(--s-board2-d); --s-ink: var(--s-ink-d); --s-soft: var(--s-soft-d); --s-face: var(--s-face-d); --s-accent: var(--s-accent-d); --s-edge: var(--s-edge-d); }
    .tb-trophy { --s-board: var(--s-board-l); --s-board2: var(--s-board2-l); --s-ink: var(--s-ink-l); }
}
.tb { display: grid; gap: 0.9rem; }
.tb-band { position: relative; overflow: hidden; border-radius: 14px; padding: 1rem 1.15rem 1.1rem; color: var(--s-ink);
    background: linear-gradient(125deg, var(--s-board), var(--s-board2)); }
.tb-band::before { content: ""; position: absolute; inset: 0; opacity: 0.14; pointer-events: none;
    background: repeating-radial-gradient(circle at 85% 20%, var(--s-accent) 0 2px, transparent 2px 14px); }
.tb-band > * { position: relative; }
.tb-eyebrow { margin: 0; font: 700 0.72rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--s-soft); }
.tb-title { margin: 0.1rem 0 0; font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2rem); line-height: 1.15; color: var(--s-ink); overflow-wrap: anywhere; }
.tb-n { color: var(--s-accent); }
.tb-line { margin: 0.35rem 0 0; font-size: 0.97rem; color: var(--s-ink); max-width: 48ch; }
.tb-banner { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0.55rem 0 0; padding: 0.15rem 0.75rem; border-radius: 999px;
    background: var(--s-accent); color: var(--s-board); font-weight: 700; font-size: 0.86rem; }
.tb-banner .icon { width: 1rem; height: 1rem; }
.tb-complete .tb-band::after { content: ""; position: absolute; inset: -40% -60%; pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--s-accent) 35%, transparent) 50%, transparent 60%);
    transform: translateX(-60%); animation: tb-sweep 3.2s ease-out 0.4s 1 both; }
@keyframes tb-sweep { to { transform: translateX(60%); } }
.tb-closed .tb-band { background: linear-gradient(125deg, color-mix(in srgb, var(--s-board) 70%, #3b3f4c), color-mix(in srgb, var(--s-board2) 70%, #3b3f4c)); }
.tb-closed .tb-band::before { opacity: 0.06; }
/* the board: rows of five steps, each ending in its prize */
.tb-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .tb-board { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tb-tile { display: grid; justify-items: center; align-content: start; gap: 0.2rem; text-align: center; padding: 0.65rem 0.4rem 0.75rem; border-radius: 12px; min-height: 8.6rem; }
.tb-tok { width: 3.4rem; height: 3.4rem; }
.tb-ring { fill: none; stroke-width: 2.6; }
.tb-face { stroke-width: 1.5; }
.tb-glyph { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-name { font-weight: 700; font-size: 0.86rem; line-height: 1.2; }
.tb-sub { font-size: 0.78rem; line-height: 1.25; }
.tb-done { background: linear-gradient(160deg, var(--s-board), var(--s-board2)); color: var(--s-ink); }
.tb-done .tb-sub { color: var(--s-soft); }
.tb-done .tb-ring { stroke: var(--kc, var(--s-accent)); }
.tb-done .tb-face { fill: var(--s-face); stroke: var(--s-ink); }
.tb-done .tb-glyph { stroke: var(--s-board); }
.tb-todo { border: 1.5px dashed var(--field-border); color: var(--ink); }
/* A closed step (ri Stakeholder): its own look, never the to-do dash. Undashed and muted, with a dotted ring. */
.tb-shut { border: 1px solid var(--rule); background: color-mix(in srgb, var(--rule) 30%, transparent); color: var(--ink-soft); }
.tb-shut .tb-name { color: var(--ink-soft); }
.tb-todo .tb-sub, .tb-shut .tb-sub { color: var(--ink-soft); }
.tb-todo .tb-ring, .tb-shut .tb-ring { stroke: var(--field-border); stroke-dasharray: 3 4; }
.tb-todo .tb-face, .tb-shut .tb-face { fill: transparent; stroke: var(--field-border); }
.tb-todo .tb-glyph, .tb-shut .tb-glyph { stroke: var(--field-border); }
.tb-shut .tb-ring { stroke-dasharray: 1 5; }
/* the prizes: a window onto the theme, a gold foil edge once it's yours */
.tb-prize { position: relative; overflow: hidden; display: grid; justify-items: center; align-content: start; gap: 0.35rem; text-align: center;
    padding: 0.55rem 0.5rem 0.7rem; border-radius: 14px; min-height: 8.6rem; color: var(--ink);
    background: linear-gradient(var(--surface), var(--surface)) padding-box,
                conic-gradient(from 200deg, #b8862b, #f6dd8c, #d4a441, #fff3c4, #b8862b, #e8c55e, #b8862b) border-box;
    border: 3px solid transparent;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold-bright) 40%, transparent), 0 6px 18px -6px color-mix(in srgb, var(--gold-bright) 55%, transparent); }
.tb-prize.tb-locked { background: transparent; border: 2px dashed var(--field-border); box-shadow: none; }
.tb-ribbon { position: absolute; top: 0.55rem; right: -1.9rem; width: 6.6rem; rotate: 35deg; padding: 0.05rem 0; text-align: center; z-index: 2;
    font: 700 0.6rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; background: var(--gold-bright); color: #1b2447; }
.tb-locked .tb-ribbon { background: var(--field-border); color: var(--surface); }
.tb-window { position: relative; width: 100%; max-width: 8.5rem; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; display: grid; grid-template-rows: 42% 7% 1fr;
    background: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 15%, transparent); }
.tb-w-band { position: relative; background: linear-gradient(120deg, var(--s-board), var(--s-board2)); }
.tb-w-band::before { content: ""; position: absolute; left: 10%; top: 30%; width: 38%; height: 16%; border-radius: 3px; background: var(--s-ink); opacity: 0.9; }
.tb-w-band::after { content: ""; position: absolute; left: 10%; top: 58%; width: 24%; height: 11%; border-radius: 3px; background: var(--s-soft); }
.tb-w-accent { background: var(--s-accent); }
.tb-w-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7%; padding: 8%; }
.tb-w-body i { border-radius: 3px; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.tb-aurora .tb-w-band { background: linear-gradient(115deg, var(--s-board), color-mix(in srgb, var(--s-accent) 55%, var(--s-board)) 55%, var(--s-board2)); }
.tb-aurora .tb-w-band b { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--s-ink); box-shadow: 0 0 4px var(--s-accent); }
.tb-s1 { left: 18%; top: 22%; } .tb-s2 { left: 44%; top: 14%; } .tb-s3 { left: 70%; top: 30%; } .tb-s4 { left: 58%; top: 56%; } .tb-s5 { left: 84%; top: 12%; }
.tb-locked .tb-window { filter: grayscale(0.9) blur(1.2px); opacity: 0.6; }
.tb-lock { position: absolute; top: 1.65rem; left: 50%; translate: -50% 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; z-index: 1;
    background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--field-border); }
.tb-lock .icon { width: 1.1rem; height: 1.1rem; }
.tb-pk { font: 700 0.62rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.tb-locked .tb-pk { color: var(--ink-soft); }
.tb-pn { font-family: var(--serif); font-size: 0.98rem; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.tb-ps { font-size: 0.78rem; line-height: 1.25; color: var(--ink-soft); }
.tb-ps b { color: var(--ink); }
.tb-open::after { content: ""; position: absolute; inset: -20% -60%; pointer-events: none; z-index: 3;
    background: linear-gradient(105deg, transparent 42%, rgb(255 246 214 / 0.55) 50%, transparent 58%);
    transform: translateX(-70%); animation: tb-foil 2.6s ease-out 0.6s 1 both; }
@keyframes tb-foil { to { transform: translateX(70%); } }
@media (prefers-reduced-motion: reduce) { .tb-complete .tb-band::after, .tb-open::after { animation: none; opacity: 0; } }
/* the trophy shelf: the other sets' tracks, in their own colours (the light band in both themes, so it never sinks into a dark card) */
.tb-shelf-h { margin: 0.4rem 0 0; font: 700 0.78rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.tb-shelf { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tb-trophy { display: grid; grid-template-columns: 2.7rem minmax(0, 1fr); gap: 0 0.6rem; align-items: center; min-width: 12rem; min-height: 44px;
    padding: 0.45rem 0.75rem 0.45rem 0.45rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); text-decoration: none; }
.tb-trophy:hover { border-color: var(--field-border); }
.tb-pen { grid-row: 1 / span 2; width: 2.7rem; height: 2.7rem; border-radius: 8px; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--s-board), var(--s-board2)); color: var(--s-ink); font: 700 0.78rem var(--sans); }
.tb-tn { font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.tb-tk { font-size: 0.8rem; color: var(--ink-soft); }
.tb-how summary { cursor: pointer; color: var(--link); font-size: 0.92rem; min-height: 24px; }
.tb-how p { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--ink-soft); max-width: 62ch; }
.tb-note { margin: -0.3rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

/* ── R84: themes (Decision 33; the v12 mock-up). A theme replaces the site's tokens on :root (themes.css, generated
   from Analysis/Themes.cs, every one through ThemeTests' contrast gate in light and dark). Swatches carry a theme's
   colours as --tw-*-l/-d custom properties; the reader's mode picks one. ── */
.th-sw, .ac-tdot, .tb-theme { --tw-board: var(--tw-board-l); --tw-board2: var(--tw-board2-l); --tw-accent: var(--tw-accent-l); --tw-paper: var(--tw-paper-l); --tw-ink: var(--tw-ink-l); }
@media (prefers-color-scheme: dark) {
    .th-sw, .ac-tdot, .tb-theme { --tw-board: var(--tw-board-d); --tw-board2: var(--tw-board2-d); --tw-accent: var(--tw-accent-d); --tw-paper: var(--tw-paper-d); --tw-ink: var(--tw-ink-d); }
}
.th-sw { display: grid; grid-template-rows: 1.15rem 3px 1fr; height: 2.4rem; border-radius: 5px; overflow: hidden; border: 1px solid var(--rule); }
.th-sw i { display: block; }
.th-sw-band { background: linear-gradient(120deg, var(--tw-board), var(--tw-board2)); }
.th-sw-rule { background: var(--tw-accent); }
.th-sw-page { background: var(--tw-paper); position: relative; }
.th-sw-page b { position: absolute; left: 12%; top: 35%; width: 40%; height: 28%; border-radius: 2px; background: var(--tw-ink); opacity: 0.85; }
/* The collection: one tile size for every theme (v12): the swatch, two lines of name, two of note. */
.th-screen { display: flex; flex-direction: column; }
.th-group { margin-top: 1.1rem; }
.th-group-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin: 0 0 0.45rem; }
.th-group-h h2 { margin: 0; font: 700 0.8rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.th-group-h > span { font-size: 0.85rem; color: var(--ink-soft); }
.th-meter { flex: 1; max-width: 8rem; height: 0.35rem; border-radius: 999px; background: var(--rule); overflow: hidden; align-self: center; }
.th-meter i { display: block; height: 100%; background: var(--link); }
.th-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); grid-auto-rows: 8rem; gap: 0.45rem; }
.th-tile { position: relative; display: grid; grid-template-rows: 2.4rem auto auto; align-content: start; gap: 0.25rem; height: 100%; overflow: hidden;
    padding: 0.35rem; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; }
.th-tile:hover { border-color: var(--ink); }
.th-tile[aria-current="true"] { border: 2px solid var(--link); padding: calc(0.35rem - 1px); }
.th-nm { font-size: 0.85rem; font-weight: 700; line-height: 1.2; color: var(--link); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.th-l1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-nm small { display: block; font-size: 0.78rem; font-weight: 400; }
.th-note { font-size: 0.72rem; color: var(--ink-soft); line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.th-note.th-prog { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.th-note.th-use { color: var(--ink); font-weight: 700; }
.th-locked { border-style: dashed; background: transparent; }
.th-locked .th-sw { filter: grayscale(0.6); }
.th-locked .th-sw > * { opacity: 0.5; }
.th-locked .th-nm { color: var(--ink-soft); font-weight: 400; }
.th-lk { position: absolute; top: 0.45rem; right: 0.45rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 3px; background: var(--surface); color: var(--ink); }
.th-lk .icon { width: 0.85rem; height: 0.85rem; }
.th-new, .th-new-word { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0 0.35rem; border-radius: 4px; background: var(--gold-bright); color: #1b2447; }
.th-new { position: absolute; top: 0.45rem; right: 0.45rem; }
.th-more { display: inline-flex; align-items: center; min-height: 2rem; margin-top: 0.4rem; font-size: 0.9rem; }
.th-hint { margin: 0.5rem 0 0; font-size: 0.88rem; color: var(--ink-soft); max-width: 62ch; }
.sb-th .th-inuse { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.th-pic { display: flex; justify-content: center; align-items: center; }
.th-sw-big { width: 4.2rem; height: 3rem; grid-template-rows: 1.35rem 3px 1fr; margin-left: -0.9rem; border-color: var(--board-soft); box-shadow: 0 4px 10px rgb(0 0 0 / 0.25); }
.th-sw-big:first-child { margin-left: 0; }
.th-sw-big:nth-child(even) { transform: translateY(0.5rem); }
/* The panel (v12): in the theme's own band colours. At the top on a wide screen; a sheet from the bottom on a phone. */
.th-pv { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.5rem 0.8rem;
    margin: 0 0 1rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--board); color: var(--board-ink); border-bottom: 3px solid var(--gold-bright); }
.th-pv-h { margin: 0; font: 400 1rem var(--sans); color: var(--board-ink); }
.th-pv-h b { font-weight: 700; }
.th-pv-h:focus { outline: none; }
.th-pv-h:focus-visible { outline: 2px solid var(--board-ink); outline-offset: 2px; border-radius: 3px; }
.th-pv-sub { margin: 0.1rem 0 0; font-size: 0.86rem; color: var(--board-soft); display: flex; align-items: center; gap: 0.3rem; }
.th-pv-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.th-pv-acts form { margin: 0; }
.th-pv-foot { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; color: var(--board-soft); }
.th-btn { display: inline-flex; align-items: center; justify-content: center; font: 700 0.92rem var(--sans); min-height: 2.75rem; padding: 0 1rem; border-radius: 8px;
    border: 1px solid var(--board-soft); background: transparent; color: var(--board-ink); text-decoration: none; cursor: pointer; }
.th-btn.th-primary { background: var(--gold-bright); border-color: var(--gold-bright); color: #1b2447; }
.th-btn:focus-visible { outline: 3px solid var(--board-ink); outline-offset: 2px; }
.th-ck, .th-ck ul { list-style: none; margin: 0.4rem 0 0; padding: 0; font-size: 0.88rem; color: var(--board-ink); }
.th-ck ul { margin: 0.15rem 0 0.2rem 0.45rem; padding-left: 0.8rem; border-left: 1px solid var(--board-soft); }
.th-ck li { margin: 0.15rem 0; line-height: 1.35; }
.th-ck a { color: var(--board-ink); text-decoration: underline; text-underline-offset: 0.15em; display: inline-block; min-height: 24px; line-height: 24px; }
.th-ck a:focus-visible { outline: 2px solid var(--board-ink); outline-offset: 1px; }
.th-ck-ok, .th-ck-no { display: inline-block; width: 1.2em; font-weight: 700; }
.th-ck-ok { color: var(--gold-bright); }
.th-ck-no { color: var(--board-soft); }
.th-ck-prog { color: var(--board-soft); font-size: 0.82rem; }
.th-ck-then, .th-ck-any { color: var(--board-soft); font-size: 0.82rem; font-style: italic; }
@media (max-width: 37.4rem) {
    .th-pv.th-pv-detail { order: 9; position: sticky; top: auto; bottom: 0; margin: 1rem 0 0; border-bottom: 0; border-top: 3px solid var(--gold-bright);
        border-radius: 14px 14px 0 0; max-height: 72vh; overflow-y: auto; box-shadow: 0 -8px 24px rgb(0 0 0 / 0.35); }
}
/* Cards (R84): a set's achievement takes its set's colour on its band (SetPalette, as the track's board); the tier line
   on the claimer's own pages adds the theme it counts towards, with a dot in that theme's colours. */
.ac-set { --s-board: var(--s-board-l); --s-board2: var(--s-board2-l); --s-ink: var(--s-ink-l); --s-soft: var(--s-soft-l); --s-accent: var(--s-accent-l); }
@media (prefers-color-scheme: dark) {
    .ac-set { --s-board: var(--s-board-d); --s-board2: var(--s-board2-d); --s-ink: var(--s-ink-d); --s-soft: var(--s-soft-d); --s-accent: var(--s-accent-d); }
}
.ac-set .ac-side { background: var(--s-board); }
.ac-set.ac-todo .ac-side { background: color-mix(in srgb, var(--s-board) 70%, #6b7280); }
.ac.ac-set.ac-complete { background: linear-gradient(120deg, var(--s-board), var(--s-board2)); color: var(--s-ink); }
.ac-set.ac-complete .ac-k, .ac-set.ac-complete .ac-why { color: var(--s-soft); }
.ac-set.ac-complete .ac-tier, .ac-set.ac-complete .ac-nm, .ac-set.ac-complete .ac-tow { color: var(--s-ink); }
.ac-set.ac-complete .lau path { stroke: var(--s-accent); }
.ac-set.ac-complete .lau ellipse { fill: var(--s-accent); }
.ac-tow { letter-spacing: 0; text-transform: none; color: var(--link); }
.ac-tow.is-done { color: var(--ink); }
.ac-tdot { display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.25rem; border-radius: 50%; background: var(--tw-accent); box-shadow: inset 0 0 0 1.5px var(--tw-board); vertical-align: 0; }
/* Aurora themes (a gradient band, a subtle pattern and one shimmer): the bands run to the theme's second colour; the
   shimmer sweeps once when a page opens, never with reduced motion. */
.yb-band, .sb-band, .fo-band { background: linear-gradient(120deg, var(--board), var(--board-2, var(--board))); }
/* No overflow: hidden on the band (Kyle, 2026-10-21): it cut off the player finder's suggestions where the tabs begin.
   The pattern and shimmer keep to the band's corners with border-radius: inherit instead. */
:root[data-ri-look="aurora"] :is(.yb-band, .sb-band, .fo-band, .eb-band) { position: relative; isolation: isolate; }
/* Its own layer would sit under the tiles after it (their stretched links are z-index 1 and 2), so lift it while a finder
   in it is in use. */
:root[data-ri-look="aurora"] :is(.yb-band, .sb-band, .fo-band, .eb-band):has(.suggest-box:focus-within) { z-index: 30; }
:root[data-ri-look="aurora"] :is(.yb-band, .sb-band, .fo-band, .eb-band)::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.1; pointer-events: none; border-radius: inherit;
    background-image: radial-gradient(circle at 1px 1px, var(--board-ink) 1px, transparent 1.6px); background-size: 14px 14px; }
:root[data-ri-look="aurora"] :is(.yb-band, .sb-band, .fo-band, .eb-band)::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--board-ink) 14%, transparent) 50%, transparent 70%); background-size: 250% 100%;
    background-position: -120% 0; animation: th-sweep 4s ease-in-out 1 both; }
@keyframes th-sweep { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { :root[data-ri-look="aurora"] :is(.yb-band, .sb-band, .fo-band, .eb-band)::after { animation: none; opacity: 0; } }
/* R84: the track's prize cards show the real theme. */
.tb-theme { background: var(--tw-paper); }
.tb-theme .tb-w-band { background: linear-gradient(120deg, var(--tw-board), var(--tw-board2)); }
.tb-theme .tb-w-accent { background: var(--tw-accent); }
.tb-theme.tb-aurora .tb-w-band { background: linear-gradient(115deg, var(--tw-board), color-mix(in srgb, var(--tw-accent) 55%, var(--tw-board)) 55%, var(--tw-board2)); }
.tb-use { margin: 0.2rem 0 0; position: relative; z-index: 4; }
.tb-use button { min-height: 2.75rem; }
/* R84 (Kyle: "theme isnt changing the top bar"): with a theme in use, the top bar takes the theme's band, as the
   boards do; without one it keeps the brand's navy exactly. Its words stay white (ThemeTests checks them, and the faint
   "Your area" label, on every theme's band). */
/* Razor writes data-ri-theme="" when no theme is in use, so the theme rules need a value. */
:root[data-ri-theme]:not([data-ri-theme=""]) .site-header { background: linear-gradient(180deg, color-mix(in srgb, var(--board) 94%, #fff) 0%, var(--board) 100%); border-bottom-color: var(--gold-bright); }
@media (prefers-color-scheme: dark) { :root[data-ri-theme]:not([data-ri-theme=""]) .site-header { background: var(--board); } }
/* R84 (Kyle: "correct for the coloring in the icon"): the header's mark follows the theme; without one, mark.svg's
   colours exactly. */
.brand-mark { height: 1.6rem; width: auto; aspect-ratio: 32 / 49; }
.brand-mark-drop { fill: var(--mark-drop, #d4a441); }
.brand-mark-cut { fill: none; stroke: var(--mark-cut, #1b2447); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

/* The event's Rounds as face-off cards (Kyle, 2026-10-05: "go with A, round by round, today's rule"). Two a row, one on
   a phone (the players stack, the score beside them). Winner with the gold W, the other player with the grey L, each
   with their rating going into the round and, round by round, the estimate (≈); Head to head at the card's foot. Byes
   and empty rounds are a quiet line. */
.rd-round { container-type: inline-size; }
.rd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; padding: 0.2rem 1rem 0.9rem; }
@container (max-width: 40rem) { .rd-cards { grid-template-columns: minmax(0, 1fr); padding: 0.2rem 0.6rem 0.8rem; } }
.rd-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; min-width: 0; }
.rd-card.rd-mine { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.rd-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.5rem; padding: 0.7rem 0.8rem 0.55rem; }
.rd-side { display: grid; gap: 0.25rem; min-width: 0; justify-items: stretch; }
.rd-right { justify-items: end; text-align: right; }
.rd-name { display: flex; align-items: center; gap: 0.35rem; min-width: 0; font-weight: 700; }
.rd-right .rd-name { flex-direction: row-reverse; justify-content: flex-start; }
/* A long name wraps inside its column, never over the score (Kyle, 2026-10-14). */
.rd-name a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.rd-name a:hover { text-decoration: underline; }
.rd-right .rd-name a { font-weight: 400; }
.rd-rating { display: flex; flex-wrap: wrap; gap: 0 0.35rem; font-size: 0.82rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rd-right .rd-rating { justify-content: flex-end; }
.rd-rating .rating { color: var(--ink-soft); }
.rd-up { color: var(--grade-a); font-weight: 700; white-space: nowrap; }
.rd-down { color: var(--loss); font-weight: 700; white-space: nowrap; }
.rd-after { font-weight: 400; color: var(--ink-soft); }
.rd-score { text-align: center; }
.rd-score b { display: block; font: 400 1.45rem/1 var(--serif); font-variant-numeric: lining-nums; }
.rd-score small { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.rd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; padding: 0.4rem 0.8rem; border-top: 1px solid var(--rule);
    background: color-mix(in srgb, var(--paper) 55%, var(--surface)); font-size: 0.8rem; color: var(--ink-soft); }
.rd-foot .finding-chips { margin: 0; }
.rd-foot-you { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; color: var(--ink); }
.rd-foot-you .you-mark { margin: 0; }
.rd-h2h { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; padding: 0 0.7rem; border: 1px solid var(--field-border);
    border-radius: 8px; background: var(--surface); color: var(--link); font-weight: 700; font-size: 0.85rem; text-decoration: none; white-space: nowrap; }
.rd-h2h:hover { border-color: var(--link); }
.rd-h2h .icon { width: 1rem; height: 1rem; }
.rd-card.rd-open .rd-score b { font-size: 1.1rem; color: var(--ink-soft); }
.rd-quiet { margin: 0.4rem 1rem 0.8rem; padding: 0.45rem 0.75rem; border: 1px dashed var(--field-border); border-radius: 10px; font-size: 0.9rem; color: var(--ink-soft); }
.rd-quiet b { color: var(--ink); }
.rd > .rd-quiet { margin: 0.4rem 0; }
@container (max-width: 30rem) {
    .rd-top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a s" "b s"; row-gap: 0.45rem; }
    .rd-top > .rd-side:first-child { grid-area: a; }
    .rd-top > .rd-right { grid-area: b; justify-items: start; text-align: left; }
    .rd-right .rd-name { flex-direction: row; }
    .rd-right .rd-rating { justify-content: flex-start; }
    .rd-score { grid-area: s; padding-left: 0.6rem; border-left: 1px solid var(--rule); align-self: stretch; display: grid; align-content: center; }
}

/* The event as a board (Kyle, 2026-10-06, from the mock-up with buttons): R68/R79's navy band and gold rule, the store
   and town, the name and kind, the day, format and rounds; at most three figures; the field's rating spread when enough
   players were rated; then the result with notable entrants, Investigators' own row, and the utilities as buttons. */
.event-board { container-type: inline-size; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; margin-bottom: var(--section-gap); }
.eb-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem 2rem; align-items: end; padding: 1.2rem 1.4rem 1.1rem;
    background: linear-gradient(120deg, var(--board), var(--board-2, var(--board))); color: var(--board-ink); border-bottom: 3px solid var(--gold-bright); }
@container (max-width: 40rem) { .eb-band { grid-template-columns: minmax(0, 1fr); padding: 1rem; } }
.eb-main { min-width: 0; }
.eb-where { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.eb-where a { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--board-ink); min-height: 24px; }
.eb-where .icon { width: 0.95rem; height: 0.95rem; }
.eb-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0.2rem 0 0.35rem; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem); line-height: 1.12; color: var(--board-ink); }
.eb-name > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.eb-name .kind { font-family: var(--sans); font-size: 0.8rem; }
.eb-when { margin: 0; display: flex; flex-wrap: wrap; gap: 0.1rem 0.7rem; font-size: 0.92rem; color: var(--board-soft); }
.eb-when b { color: var(--board-ink); font-weight: 400; }
.eb-score { display: grid; grid-auto-flow: column; gap: 1.6rem; margin: 0; text-align: right; }
@container (max-width: 40rem) { .eb-score { justify-content: start; text-align: left; gap: 1.3rem; } }
.eb-score dt { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); white-space: nowrap; }
.eb-score dt a, .eb-score dt .how-link { color: var(--board-soft); }
.eb-score dd { margin: 0; font: 400 1.75rem/1.05 var(--serif); font-variant-numeric: lining-nums; }
.eb-score dd small { display: block; font: 0.72rem var(--sans); color: var(--board-soft); }
.eb-score .eb-big dd { font-size: 2.3rem; }
.eb-spread { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 28rem); justify-content: space-between; gap: 0.2rem 0.8rem; align-items: center; font-size: 0.75rem; color: var(--board-soft); }
.eb-spread svg { width: 100%; height: auto; aspect-ratio: 300 / 30; display: block; }
.eb-axis { stroke: var(--board-soft); stroke-width: 1; }
.eb-dot { fill: var(--board-ink); opacity: 0.85; }
.eb-median { stroke: var(--gold-bright); stroke-width: 2; }
.eb-scale { grid-column: 2; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
/* R115: on a phone the words go above the dots; beside them, the words took the width and the dots and scale had none. */
@container (max-width: 40rem) { .eb-spread { justify-content: stretch; grid-template-columns: minmax(0, 1fr); } .eb-scale { grid-column: 1; } }
.eb-highlight { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.75rem 1.4rem; border-bottom: 1px solid var(--rule); }
@container (max-width: 40rem) { .eb-highlight { padding: 0.7rem 1rem; } }
.eb-champ { display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.9rem; border-radius: 12px; background: var(--gold-wash); border: 2px solid var(--gold-bright); }
.eb-crown { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--gold-bright); color: #1b2447; }
.eb-crown .icon { width: 1.15rem; height: 1.15rem; }
.eb-champ-k { display: block; font: 700 0.68rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.eb-champ-n { font: 400 1.15rem var(--serif); color: var(--ink); }
.eb-winner { font-size: 0.95rem; }
.eb-winner .wl { margin-right: 0.35rem; vertical-align: -0.15em; }
.eb-unended { font-size: 0.92rem; color: var(--ink-soft); }
.eb-unended b { color: var(--ink); }
.eb-notable { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; font-size: 0.88rem; color: var(--ink-soft); }
.eb-notable-k { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.eb-notable .notable-group .plabels { display: inline-flex; vertical-align: middle; margin: 0 0.3rem 0 0; }
.eb-inv { padding: 0.6rem 1.4rem; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--info-wash) 70%, var(--surface)); font-size: 0.85rem; }
@container (max-width: 40rem) { .eb-inv { padding: 0.6rem 1rem; } }
.eb-inv-k { font: 700 0.7rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--info); }
.eb-inv dl { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0.25rem 0 0; }
.eb-inv dt { display: inline; color: var(--ink-soft); }
.eb-inv dd { display: inline; margin: 0 0 0 0.3rem; font-weight: 700; }
.eb-inv dd.gap { color: var(--warn); }
.eb-inv dd.gap::after { content: " ▲ over"; font-size: 0.75rem; }
/* Kyle: the utilities as buttons, one set, all alike (one height, edge, radius; none filled: none is the page's main
   action); two a row on a phone, a lone last one taking the row. */
.eb-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1.4rem 0.9rem; }
.eb-actions form { margin: 0; display: contents; }
@container (max-width: 40rem) { .eb-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.7rem 1rem 0.9rem; } .eb-actions > :last-child { grid-column: 1 / -1; } }
.eb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.5rem; padding: 0 0.9rem; border-radius: 8px;
    border: 1px solid var(--field-border); background: var(--surface); color: var(--ink); font: 700 0.88rem var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.eb-btn:hover { border-color: var(--ink); filter: none; }
.eb-btn .icon { width: 1rem; height: 1rem; color: var(--link); }
.eb-btn:disabled { color: var(--ink-soft); border-style: dashed; cursor: not-allowed; }
@container (max-width: 40rem) { .eb-btn { min-height: 2.75rem; padding: 0 0.5rem; font-size: 0.84rem; gap: 0.3rem; } }

/* ── Sharing a card (R83 part 4; reference v12, 5e). On the claimer's own Your achievements an earned card has a Share
   button in its corner (filled while it's shared, with words for screen readers); the share page shows the card as it will
   look, the switch with ri Legal's words, the link and the cards being shared. The card's own page (/c/...) is the
   image with its words. ── */
.ac-share { position: absolute; top: 0.4rem; right: 0.4rem; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem;
    border-radius: 8px; border: 1px solid var(--field-border); background: var(--surface); color: var(--link); }
.ac-share .icon { width: 1rem; height: 1rem; }
.ac-share:hover { border-color: var(--ink); }
.ac-share.is-on { background: var(--link); border-color: var(--link); color: var(--surface); }
.ac:has(.ac-share) .ac-body { padding-right: 2.7rem; }
/* R101 (Kyle): a season's Share button is the achievements' own (.ac-share: icon, size, edge, focus), in its card's top-right
   corner, level with the title; the heading keeps clear of it however it wraps. The share panel: the shapes, the picture,
   Share image and Save image, ri Legal's notice and the link. On You it's a dialog over the page, a sheet from the bottom on
   a phone; without script, its own page. */
.sr-card { position: relative; }
.sr-share { top: 0.7rem; right: 0.7rem; }
.sr-card:has(> .sr-share) .sr-head { padding-right: 2.6rem; }
.ss { display: grid; gap: 0.8rem; max-width: 34rem; }
.ss-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ss-dialog .ss-h { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin: 0; padding-right: 3rem; font-size: 1.3rem; }
.ss-shapes { display: flex; border: 1px solid var(--field-border); border-radius: var(--radius); overflow: hidden; }
.ss-shapes a { flex: 1; display: grid; place-items: center; min-height: var(--control); font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.ss-shapes a + a { border-left: 1px solid var(--field-border); }
.ss-shapes a.is-on { background: var(--ink); color: var(--paper); }
.ss-preview { display: block; justify-self: center; width: 100%; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); background: var(--board); }
.ss-preview[height="1920"] { width: auto; max-height: min(62vh, 36rem); }
.ss-says { margin: 0; font-size: 0.9rem; color: var(--ink-soft); text-align: center; }
.ss-acts { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.ss-acts > * { min-height: 2.75rem; }
.ss-notice { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0.7rem 0.9rem; border-radius: 8px; background: var(--info-wash); color: var(--ink); font-size: 0.95rem; }
.ss-notice-text { flex: 1; }
.ss-notice.is-quiet { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ss-undo { flex: none; min-height: 2.75rem; }
.ss-link { display: grid; gap: 0.5rem; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
.ss-link-h { margin: 0; font-size: 1rem; }
.ss-link-what { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.ss-linkform, .ss-stop { margin: 0; }
.ss-copylink { min-height: 2.75rem; }
.ss-dialog { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1rem; border: 1px solid var(--rule); border-radius: 14px;
    background: var(--surface); color: var(--ink); overflow: auto; }
.ss-dialog::backdrop { background: rgb(10 14 30 / 0.55); }
.ss-dialog .ss { max-width: none; margin: 0; }
.ss-close { position: absolute; top: 0.6rem; right: 0.6rem; width: 2.75rem; min-height: 2.75rem; padding: 0; font-size: 1.5rem; line-height: 1;
    background: transparent; color: var(--ink); border-color: var(--field-border); }
.ss-close:hover { background: var(--paper); filter: none; }
@media (max-width: 40rem) {
    .ss-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 92dvh; }
}
.share-sec-saved { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
/* R102: Upcoming's Share control ends the list head's strip at its own height and edge; a store's "Coming up here" takes the
   achievements' Share icon top right, its heading kept clear of it. */
.ctl-share { justify-content: center; gap: 0.45rem; color: var(--link); font-weight: 700; text-decoration: none; }
.ctl-share .icon { width: 1rem; height: 1rem; }
.su { position: relative; }
.sr-held { margin: 0.7rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--ink-soft); }
.sb-share .sb-desc { color: var(--board-soft); }
.sharebox { display: grid; gap: 0.9rem; max-width: 46rem; }
.share-preview, .share-page-img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 10px; border: 1px solid var(--rule); background: var(--board); }
.share-switch-form { margin: 0; display: grid; gap: 0.35rem; }
/* The switch is one button (role="switch"): the track and its knob, then the words; on is the link colour, filled. */
.share-switch { justify-self: start; display: inline-flex; align-items: center; gap: 0.7rem; min-height: 44px; padding: 0.3rem 0.8rem 0.3rem 0.4rem;
    border: 1px solid var(--field-border); border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 1rem var(--sans); cursor: pointer; text-align: left; }
.share-switch:hover { border-color: var(--ink); filter: none; }
.share-track { position: relative; flex: none; width: 2.75rem; height: 1.6rem; border-radius: 999px; border: 2px solid var(--field-border); background: var(--surface); }
.share-knob { position: absolute; top: 2px; left: 2px; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--ink-soft); transition: left 0.15s; }
.share-switch[aria-checked="true"] .share-track { background: var(--link); border-color: var(--link); }
.share-switch[aria-checked="true"] .share-knob { left: calc(100% - 1.05rem - 2px); background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .share-knob { transition: none; } }
.share-words { display: grid; line-height: 1.2; }
.share-state { font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }
.share-legal { margin: 0; font-size: 0.88rem; color: var(--ink-soft); max-width: 40rem; }
.share-linkrow { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: stretch; }
.share-url { flex: 1 1 14rem; min-width: 0; min-height: 2.75rem; padding: 0 0.7rem; border: 1px solid var(--field-border); border-radius: 8px;
    background: var(--paper); color: var(--ink); font: 0.9rem var(--sans); }
.share-copy { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; }
.share-copy .icon { width: 1rem; height: 1rem; }
.share-nolink { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.share-hint { margin: 0; font-size: 0.88rem; color: var(--ink-soft); max-width: 40rem; }
.share-list { max-width: 46rem; }
.sl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.8rem; align-items: center; padding: 0.6rem 0.8rem;
    border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.sl-what { display: flex; flex-wrap: wrap; gap: 0.1rem 0.6rem; align-items: baseline; min-width: 0; }
.sl-what b { overflow-wrap: anywhere; }
.sl-since { font-size: 0.85rem; color: var(--ink-soft); }
.sl-link { grid-column: 1; font-size: 0.85rem; overflow-wrap: anywhere; min-height: 24px; display: inline-flex; align-items: center; }
.sl-stop { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.sl-stop button { min-height: 2.75rem; }
@media (max-width: 40rem) { .sl-row { grid-template-columns: minmax(0, 1fr); } .sl-stop { grid-column: 1; grid-row: auto; } .sl-stop button { width: 100%; } }
.share-page { display: grid; gap: 0.8rem; max-width: 46rem; margin: 0 auto; }
/* Things you're sharing, on Account (Kyle, 2026-10-08): one expandable section in the cards' column, a count, rows that
   say what kind of thing each is; and where the list used to be, a line with the way to it. */
.share-sec { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.share-sec > summary { list-style: none; display: flex; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0.7rem 1.1rem; cursor: pointer; }
.share-sec > summary::-webkit-details-marker { display: none; }
.share-sec-h { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.share-sec-count { font-weight: 700; font-size: 0.82rem; padding: 0.05rem 0.55rem; border-radius: 999px; border: 1px solid var(--field-border); color: var(--ink); }
.share-sec-none { font-size: 0.9rem; color: var(--ink-soft); }
.share-sec-chev { margin-left: auto; display: inline-flex; }
.share-sec-chev .icon { width: 1.1rem; height: 1.1rem; transition: transform 0.15s; }
.share-sec[open] .share-sec-chev .icon { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .share-sec-chev .icon { transition: none; } }
.share-sec-body { padding: 0 1.1rem 1rem; display: grid; gap: 0.7rem; }
.share-sec-legal { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.share-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.share-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1rem; align-items: center; padding: 0.65rem 0.85rem; border: 1px solid var(--rule); border-radius: 10px; }
.share-item-what { display: grid; gap: 0.1rem; min-width: 0; }
.share-item-kind { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.share-item-name { font-weight: 700; overflow-wrap: anywhere; justify-self: start; min-height: 24px; display: inline-flex; align-items: center; }
.share-item-meta { font-size: 0.85rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.share-item-meta a { display: inline-flex; align-items: center; min-height: 24px; }
.share-item-stop { margin: 0; }
.share-item-stop button { min-height: 2.75rem; }
@media (max-width: 40rem) { .share-item { grid-template-columns: minmax(0, 1fr); } .share-item-stop button { width: 100%; } }
.sharing-link { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; max-width: 46rem; padding: 0.75rem 1rem;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; color: var(--ink-soft); }
.sharing-link a { display: inline-flex; align-items: center; min-height: 24px; font-weight: 700; }
.share-page-h { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
.share-page-what { margin: 0; font-size: 1.05rem; }
.share-page-note { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.share-page-note a { display: inline-flex; align-items: center; min-height: 24px; }
/* One-tap sharing's notice (Kyle, 2026-10-07): a bar at the foot of the screen, ink on surface swapped so it stands apart
   in both themes, with Undo (a button you can see is one), Share link when a phone needs a second tap, and Close. */
.share-toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: min(34rem, calc(100% - 2rem)); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; padding: 0.6rem 0.6rem 0.6rem 1rem;
    border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.share-toast[hidden] { display: none; }
.st-text { flex: 1 1 14rem; margin: 0; font-size: 0.95rem; line-height: 1.4; }
.st-acts { display: flex; gap: 0.4rem; align-items: center; margin-left: auto; }
.st-undo, .st-again { min-height: 2.75rem; padding: 0 0.9rem; border-radius: 8px; border: 2px solid var(--surface); background: transparent;
    color: var(--surface); font: 700 0.92rem var(--sans); cursor: pointer; }
.st-close { width: 2.75rem; height: 2.75rem; border-radius: 8px; border: 0; background: transparent; color: var(--surface); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.st-undo:hover, .st-again:hover, .st-close:hover { background: color-mix(in srgb, var(--surface) 15%, transparent); filter: none; }
.share-toast button:focus-visible { outline: 3px solid var(--surface); outline-offset: 2px; }
.st-undo[hidden], .st-again[hidden] { display: none; }

/* ── A shared card's page for someone new (Kyle, 2026-10-08): the card, then what the site is, what you'd get and how to
   start, beside R72's made-up scoreboard; signed in, one panel to your own achievements. Site tokens throughout, so
   themes reach it. ── */
.share-page:has(.sp-about) { max-width: 60rem; }
.share-page:has(.sp-about) > .share-page-img, .share-page:has(.sp-about) > .share-page-h, .share-page:has(.sp-about) > .share-page-what { max-width: 46rem; }
.sp-about { container-type: inline-size; margin-top: 0.6rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem 2rem; padding: 1.2rem 1.3rem; align-items: center; }
@media (min-width: 56rem) { .sp-about { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 1.5rem 1.6rem; } }
.sp-about-text { display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
.sp-about-k { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.sp-about h2 { margin: 0; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); }
.sp-about-lede { margin: 0; color: var(--ink-soft); }
.sp-gets { list-style: none; margin: 0.2rem 0; padding: 0; display: grid; gap: 0.55rem; }
.sp-gets li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.6rem; align-items: start; }
.sp-gets-n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--board); color: var(--gold-bright); }
.sp-gets-n .icon { width: 1rem; height: 1rem; }
.sp-gets b { display: block; color: var(--ink); }
.sp-gets li > span:last-child { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.35; }
.sp-start { justify-self: start; margin: 0.3rem 0 0; }
.sp-start-note { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }
.sp-start-beta { margin: 0.3rem 0 0; font-weight: 700; color: var(--ink); }
.sp-start.btn { min-height: 2.75rem; }
.sp-start-note a { display: inline-flex; align-items: center; min-height: 24px; }
.sp-pic { max-width: 24rem; justify-self: center; }
.sp-pic .welcome-board { transform: none; box-shadow: 0 10px 28px rgb(17 22 44 / 0.18); }
.sp-own { margin-top: 0.6rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.2rem; display: grid; gap: 0.5rem; justify-items: start; }
.sp-own h2 { margin: 0; font-size: 1.3rem; }
.sp-own p { margin: 0; color: var(--ink-soft); }
.sp-own .btn { min-height: 2.75rem; display: inline-flex; align-items: center; }

/* ---------------------------------------------------------------- R93: the Discord bot on the site */
/* The landing page's block: the words beside one card (a picture, so it reads the same in every theme). */
.welcome-discord { display: grid; gap: 1rem 2.5rem; align-items: center; }
@media (min-width: 56rem) { .welcome-discord { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.welcome-discord h2 { display: flex; align-items: center; gap: 0.5rem; margin-top: 0; }
.welcome-discord h2 .icon { width: 1.3rem; height: 1.3rem; color: #5865f2; }
.welcome-landing.welcome-discord > * { max-width: none; }
.wd-text { min-width: 0; max-width: 38rem; }
.wd-pic { margin: 0; min-width: 0; }
.wd-pic img, .db-cards img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 10px 28px rgb(17 22 44 / 0.18); }
.wd-pic figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--ink-soft); }
/* /discord: the steps, the cards and the commands. */
.db-steps { display: grid; gap: 0.7rem; padding-left: 1.4rem; }
.db-steps li > span { display: block; color: var(--ink-soft); }
.db-add { margin-top: 0.6rem; }
.db-cards { list-style: none; padding: 0; margin: 1rem 0 0.5rem; display: grid; gap: 1.4rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.db-cards li { display: grid; gap: 0.35rem; align-content: start; min-width: 0; }
.db-cards li > strong { margin-top: 0.3rem; }
.db-cards li > span { color: var(--ink-soft); font-size: 0.95rem; }
.db-commands th[scope="row"] { white-space: nowrap; font-weight: 400; }
/* On a phone the command wraps (at its spaces) so what it does keeps a readable width. */
@media (max-width: 40rem) { .db-commands th[scope="row"] { white-space: normal; width: 42%; } .db-commands th[scope="row"] code { overflow-wrap: anywhere; } }
.db-commands code, .db-steps code, #yours code { font-size: 0.9em; }

/* ---------------------------------------------------------------- R80 part 2: suggestions under the player finders */
/* The box takes the input's place in its form; the list hangs under it, over the page, as wide as the box. A row is a
   tap target (44 px, the name in the link colour, R62's rule), the typed text bold in the name; the chosen row has a
   wash and a bar at its start, not colour alone. "See all" ends the list, above a rule. */
.suggest-box { position: relative; display: flex; flex: 1 1 18rem; max-width: 26rem; min-width: 0; }
.suggest-box > input { flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; }
.sb-search .suggest-box, .compare-form .suggest-box { flex: 1 1 auto; max-width: none; }
.suggest-list {
    position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: max(100%, min(24rem, calc(100vw - 2rem)));
    margin: 0; padding: 0.25rem; list-style: none; max-height: min(32rem, 70vh); overflow-y: auto;
    background: var(--surface); color: var(--ink); border: 1px solid var(--field-border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); text-align: left;
}
.suggest-option {
    display: flex; flex-direction: column; justify-content: center; gap: 0.1rem; min-height: 2.75rem;
    padding: 0.4rem 0.75rem 0.4rem 0.85rem; border-radius: 4px; cursor: pointer; line-height: 1.3;
    border-left: 3px solid transparent; overflow-wrap: anywhere;
}
.suggest-name { color: var(--link); font-weight: 500; font-family: var(--sans-slashed); }
.suggest-name b { font-weight: 800; }
.suggest-sub { color: var(--ink-soft); font-size: 0.85rem; }
.suggest-option:hover, .suggest-option[aria-selected="true"] { background: var(--info-wash); border-left-color: var(--link); }
.suggest-all { margin-top: 0.25rem; border-top: 1px solid var(--rule); border-radius: 0 0 4px 4px; color: var(--link); font-weight: 600; }
.suggest-none, .suggest-loading { padding: 0.65rem 0.85rem; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.4; }
.suggest-loading { display: flex; align-items: center; gap: 0.6rem; }
.suggest-loading::before {
    content: ""; flex: none; width: 1rem; height: 1rem; border-radius: 50%;
    border: 2px solid var(--field-border); border-top-color: var(--link); animation: suggest-spin 0.8s linear infinite;
}
@keyframes suggest-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .suggest-loading::before { animation: none; } }

/* ---------------------------------------------------------------- Player rows (Kyle: "approved, A yes, B keep the bar,
   C yes, other tables should switch to this row styling") */
/* Every list of players is rows, not a table: who (the name, labels, and for Investigators one quiet line), where they
   play, a middle figure (this set's events and record with the won bar, or what the list is about), and one big number
   at the right edge (the rating, or what the list ranks by). A wrapper .pr sets the columns (--pr-cols) for its head
   and rows; on a phone each row stacks: the rank, the name and the big number on top, then the rest under the name. */
.pr { --pr-cols: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1.3fr) 6.5rem; margin: 0 0 1rem; }
.pr-ranked { --pr-cols: 2.4rem minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1.4fr) 6.5rem; }
.pr-opp { --pr-cols: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 0.9fr) 5.5rem auto; }
.pr-stand { --pr-cols: 2.6rem minmax(0, 2fr) minmax(0, 1.6fr) 5rem; }
.pr-stand-open { --pr-cols: minmax(0, 2fr) minmax(0, 1.6fr) 5rem; }
/* Play Hub's tiebreakers on standings (Kyle, 2026-10-17: "B"): OMW, GW and OGW in columns of their own between the record
   and the points; on a phone a strip under the record, each figure with its short name. */
.pr-stand-tb { --pr-cols: 2.6rem minmax(0, 2fr) minmax(0, 1.3fr) 4.3rem 4.3rem 4.3rem 4.6rem; }
.pr-stand-open-tb { --pr-cols: minmax(0, 2fr) minmax(0, 1.3fr) 4.3rem 4.3rem 4.3rem 4.6rem; }
.pr-tbs { display: contents; }
.pr-tbc { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.95rem; }
.pr-tbl { display: none; }
.pr-tb-key b { font-weight: 700; letter-spacing: 0.03em; }
/* Mock-up (store and event rows): the same rows for stores and events. An event row opens with a date tile in the
   rank's place; a store row's big number is its typical turnout; Investigators' store rows open with the grade. A
   season heading inside a list is .pr-season, a full-width row. */
.pr-dated { --pr-cols: 3.4rem minmax(0, 2.4fr) minmax(0, 1.5fr) 6.5rem; }
.pr-dated-wide { --pr-cols: 3.4rem minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1.2fr) 6.5rem; }
.pr-stores { --pr-cols: minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1.4fr) 6.5rem; }
.pr-graded { --pr-cols: 3.2rem minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.8fr) 6.5rem; }
.pr-graded-short { --pr-cols: 3.2rem minmax(0, 2.2fr) minmax(0, 1.6fr) 6.5rem; }
.pr-graded-two { --pr-cols: 3.2rem minmax(0, 1fr) 6.5rem; }
.pr-two { --pr-cols: minmax(0, 1fr) 6.5rem; }
.pr-date { display: inline-flex; flex-direction: column; align-items: center; justify-self: start; width: 3.1rem; padding: 0.3rem 0 0.35rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); line-height: 1.05; color: var(--ink); }
.pr-date span { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.pr-date b { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pr-date .pr-date-x { margin-top: 0.15rem; letter-spacing: 0; text-transform: none; font-weight: 600; }
.pr-row.is-special .pr-date { border-color: var(--gold); background: var(--gold-wash); }
.pr-season { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; padding: 0.7rem 1.1rem; background: var(--paper); border-top: 1px solid var(--rule); }
.pr-season:first-child { border-top: 0; }
.pr-season b { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.pr-name-sm { font-size: 1rem; }
.pr-who > .pr-line { color: var(--ink-soft); font-size: 0.85rem; }
.pr-who > .pr-line a { color: inherit; }
.pr-bar-flag { background: var(--warn); }
.pr-grade { justify-self: start; }
.pr-set > .pr-full { grid-column: 1 / -1; }
.pr-home .tier { align-self: flex-start; }
.pr-head, .pr-row { display: grid; grid-template-columns: var(--pr-cols); gap: 0.4rem 1.5rem; align-items: center; }
.pr-head { padding: 0.55rem 1.1rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.pr-head > :last-child, .pr-head .pr-head-num { text-align: right; }
.pr-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.pr-row { padding: 0.95rem 1.1rem; border-top: 1px solid var(--rule); }
.pr-row:first-child { border-top: 0; }
/* No hover on a row: it holds several links (the name, a store, a winner), so only they react (Kyle: hovering a row
   "changes the color ... as if it was clickable, but it is not clickable"; R62: what you read never looks tappable). */
.pr-row.is-you { background: var(--info-wash); }
.pr-rank { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-soft); text-align: right; }
.pr-row.is-first .pr-rank, .pr-row.is-champion .pr-rank { color: var(--gold); }
.pr-row.is-champion .pr-name { font-weight: 800; }
.pr-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; min-width: 0; }
.pr-name { font-family: var(--sans-slashed); font-size: 1.08rem; font-weight: 700; color: var(--link); text-decoration: none; overflow-wrap: anywhere; }
.pr-name:hover { text-decoration: underline; }
.pr-who > .pr-name { flex: 1 0 100%; }
.pr-who > .pr-line { flex-basis: 100%; }
.pr-meta { flex-basis: 100%; margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.pr-tags { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pr-home { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.pr-home a { font-weight: 600; overflow-wrap: anywhere; }
.pr-sub { font-size: 0.82rem; color: var(--ink-soft); }
.pr-set { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.15rem 0.6rem; min-width: 0; }
.pr-set b { font-weight: 700; }
.pr-set > .pr-sub { grid-column: 1 / -1; }
.pr-rec { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.9rem; justify-self: end; }
.pr-bar { grid-column: 1 / -1; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--rule); }
.pr-bar-w { background: var(--link); }
.pr-bar-d { background: var(--field-border); }
.pr-big { display: flex; flex-direction: column; align-items: flex-end; gap: 0; text-align: right; }
.pr-big b { font-family: var(--sans); font-size: 1.55rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.pr-big .pr-sub { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.pr-big .pr-sub.pr-plain { font-size: 0.82rem; letter-spacing: 0; text-transform: none; }
.pr-act { justify-self: end; }
.pr-narrow { display: none; }
@media (max-width: 47.99rem) {
    .pr-head { display: none; }
    /* About 100 px a row (ri Stakeholder): the name and its one line of labels beside the big number, then where they
       play and the middle figure side by side; the home field's share is left to the player's page. Each list names
       only the slots it has, so no empty slot adds a gap. */
    .pr-wide { display: none; }
    .pr-narrow { display: contents; }
    .pr-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "who who big" "home set set"; gap: 0.4rem 0.9rem; padding: 0.7rem 0.9rem; }
    .pr-ranked .pr-row { grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; grid-template-areas: "rank who who big" ". home set set"; }
    .pr-stand .pr-row { grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "rank who big" ". set set"; }
    .pr-stand-open .pr-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who big" "set set"; }
    .pr-stand-tb .pr-row { grid-template-areas: "rank who big" ". set set" ". tbs tbs"; }
    .pr-stand-open-tb .pr-row { grid-template-areas: "who big" "set set" "tbs tbs"; }
    .pr-tbs { grid-area: tbs; display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; }
    .pr-tbc { font-size: 0.84rem; text-align: left; }
    .pr-tbl { display: inline; font-weight: 700; letter-spacing: 0.03em; margin-right: 0.25rem; }
    .pr-opp .pr-row { grid-template-areas: "who who big" "set set set" "home home act"; }
    .pr-dated .pr-row, .pr-dated-wide .pr-row, .pr-graded .pr-row { grid-template-columns: 3.3rem minmax(0, 1fr) auto auto; grid-template-areas: "rank who who big" "rank home set set"; }
    .pr-dated .pr-row { grid-template-areas: "rank who who big" "rank home home big"; }
    .pr-dated-rec .pr-row { grid-template-areas: "rank who who big" "rank set set set"; }
    .pr-graded-short .pr-row { grid-template-columns: 3.3rem minmax(0, 1fr) auto auto; grid-template-areas: "rank who who big" "rank set set set"; }
    .pr-graded-two .pr-row { grid-template-columns: 3.3rem minmax(0, 1fr) auto; grid-template-areas: "rank who big"; }
    .pr-two .pr-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who big"; }
    .pr-date, .pr-grade { grid-area: rank; align-self: start; }
    .pr-season { padding: 0.6rem 0.9rem; }
    .pr-rank { grid-area: rank; align-self: start; padding-top: 0.1rem; }
    .pr-who { grid-area: who; }
    .pr-who .plabels { flex-wrap: nowrap; overflow: hidden; }
    .pr-big { grid-area: big; align-self: start; }
    .pr-big b { font-size: 1.35rem; }
    .pr-home { grid-area: home; align-self: center; }
    .pr-home > a { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pr-home > .pr-sub { display: none; }
    .pr-set { grid-area: set; align-self: center; min-width: 7.5rem; }
    .pr-act { grid-area: act; justify-self: end; align-self: center; }
    .pr-opp .pr-home > .pr-sub { display: inline; }
    .pr-opp .pr-set { min-width: 0; }
}

/* ---------------------------------------------------------------- R98: usage charts on the admin dashboard */
/* A chart is a figure: the title, today's figure and the week's change, then the plot (the line in inline SVG stretched
   to the box, the scale and days in HTML so they stay readable on a phone), then its numbers in a table. */
.uc-tabhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.4rem; }
.uc-tabhead h2 { margin: 0; }
.uc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0.75rem; margin: 0.8rem 0 1.2rem; }
.uc-tiles > div { padding: 0.75rem 0.9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.uc-tiles dt { font-size: 0.82rem; color: var(--ink-soft); }
.uc-tiles dd { margin: 0.15rem 0 0; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.uc-tiles dd span { font-size: 0.85rem; font-weight: 400; color: var(--ink-soft); }
.uc-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1rem; }
.uc { margin: 0; padding: 0.9rem 1rem 0.6rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; min-width: 0; }
.uc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; margin-bottom: 0.6rem; }
.uc-title { flex-basis: 100%; font-weight: 700; }
.uc-now { font-size: 0.9rem; color: var(--ink-soft); }
.uc-now b { font-size: 1.45rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.uc-change { font-size: 0.85rem; color: var(--ink-soft); }
.uc-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; }
.uc-y { position: relative; width: 2.6rem; font-size: 0.72rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; text-align: right; }
.uc-y span { position: absolute; right: 0; }
.uc-y-top { top: -0.45rem; }
.uc-y-mid { top: calc(50% - 0.45rem); }
.uc-y-zero { bottom: -0.45rem; }
.uc-area { position: relative; height: 9rem; }
.uc-big .uc-area { height: 15rem; }
.uc-area svg { display: block; width: 100%; height: 100%; overflow: visible; }
.uc-grid { stroke: var(--rule); stroke-width: 1; }
.uc-line { fill: none; stroke: var(--link); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.uc-fill { fill: var(--link); fill-opacity: 0.12; }
.uc-mark { stroke: var(--field-border); stroke-width: 1; stroke-dasharray: 3 3; }
.uc-mark-label { position: absolute; top: 0; transform: translateX(-100%); padding-right: 0.3rem; font-size: 0.7rem; color: var(--ink-soft); white-space: nowrap; }
.uc-cap { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 3; }
.uc-cap-label { position: absolute; left: 0.3rem; transform: translateY(115%); font-size: 0.72rem; font-weight: 700; color: var(--warn); }
.uc-x { display: flex; justify-content: space-between; margin: 0.3rem 0 0 3.1rem; font-size: 0.72rem; color: var(--ink-soft); }
.uc .chart-data { margin-top: 0.4rem; }

/* R100: the weekly summary's switch on Account (ri Designer's v4, section 4). The whole line is the button: what you tap
   looks tappable (R62), 44 px, the switch's edge 3:1 (--field-border) and its focus ring --focus. A status under it is
   words on a wash, never a pill. */
button.wk-toggle, .wk-toggle {
    display: flex; align-items: flex-start; gap: 0.7rem; min-height: 44px; width: 100%; margin: 0; padding: 0.3rem 0;
    background: none; border: 0; border-radius: var(--radius); color: var(--ink); font: inherit; font-weight: 400;
    text-align: left; cursor: pointer; white-space: normal;   /* its whole sentence wraps (Kyle, 2026-10-25: it spilled out of its tile) */
}
.wk-toggle > span:not(.wk-sw) { min-width: 0; flex: 1 1 auto; }
button.wk-toggle:hover { background: none; color: var(--ink); }
button.wk-toggle:disabled { cursor: default; opacity: 1; background: none; color: var(--ink-soft); }
button.wk-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wk-toggle b { font-weight: 700; overflow-wrap: anywhere; }
.wk-sw {
    /* ri Designer: beside the sentence's first line, not its middle (the line is about 1.5 x 1rem tall). */
    flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; margin-top: 0;
    border: 2px solid var(--field-border); background: var(--surface);
}
.wk-sw::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--field-border);
}
.wk-toggle.is-on .wk-sw { background: var(--link); border-color: var(--link); }
.wk-toggle.is-on .wk-sw::after { left: 21px; background: var(--surface); }
.wk-toggle.is-disabled { cursor: default; color: var(--ink-soft); }
.wk-toggle.is-disabled .wk-sw { border-style: dashed; }
.wk-stopped {
    margin: 0.6rem 0 0; padding: 0.55rem 0.75rem; border-left: 4px solid var(--warn); border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--warn-wash); color: var(--ink); font-size: 0.92rem;
}
.wk-admin { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.wk-admin h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.wk-admin form { margin: 0 0 0.4rem; }
.wk-previews a { display: inline-block; min-height: 24px; }
.unsub-card { max-width: 36rem; margin: 2rem auto; }
.unsub-card h1 { font-size: 1.5rem; }

/* ---------------------------------------------------------------- You as a dashboard (R105) */
/* Kyle, 2026-10-18: "Build 1b (whole tiles as buttons, no Customise) as R105." A slim navy band, then tiles that all look
   alike (one surface, one edge, a small-caps title line), each saying one thing with a picture. A tile you can open
   (.yd-link) is one tap: its title's link is stretched over the whole tile (.yd-stretch::after), in the link colour with a
   chevron, on the choice cards' 3:1 edge that turns the link colour on hover (R62); Share and the "?" sit above it. A tile
   to read (travel) keeps the faint edge. This set and its track are in the set's own colours (SetPalette). Four columns on
   a wide screen, two on a phone. */
.yd-who { min-width: 0; }
.yd-home { display: flex; align-items: center; gap: 0.35rem; margin: 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.yd-home a { color: var(--board-ink); }
.yd-home .icon { width: 1rem; height: 1rem; flex: none; }
.yd-name { margin: 0.15rem 0 0; color: var(--board-ink); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); line-height: 1.1; overflow-wrap: anywhere; }
.yd-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.yd-act { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.95rem; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
    border: 1px solid color-mix(in srgb, var(--board-ink) 45%, transparent); color: var(--board-ink); text-decoration: none; }
.yd-act:hover { background: color-mix(in srgb, var(--board-ink) 12%, transparent); }
.yd-act .icon { width: 1rem; height: 1rem; }
.yd-fetching { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; padding: 0.65rem 0.9rem; border-radius: var(--radius); background: var(--info-wash); color: var(--ink); font-size: 0.95rem; }
.yd-fetching .icon { flex: none; width: 1.1rem; height: 1.1rem; }
.you-head ~ .area-offer { margin: 0 0 1rem; padding: 0.6rem 0.9rem; border-radius: var(--radius); background: var(--info-wash); color: var(--ink); font-size: 0.95rem; }

.yd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.yd-rating { grid-column: span 2; grid-row: span 2; }
.yd-grid.no-set .yd-rating { grid-row: span 1; }
.yd-form { grid-column: span 2; }
.yd-set.is-alone { grid-column: span 2; }
.yd-grid .w-d1 { grid-column: span 1; }
.yd-grid .w-d2 { grid-column: span 2; }
.yd-coming, .yd-travel, .yd-rivals, .yd-settings { grid-column: 1 / -1; }
.yd-travel .yd-figs { column-gap: 2.2rem; }
@media (max-width: 62rem) {
    .yd-grid .w-t2 { grid-column: span 2; }
    .yd-grid .w-t4 { grid-column: 1 / -1; }
}

.yd-tile { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.yd-th { display: flex; align-items: center; gap: 0.4rem; min-height: 1.6rem; }
.yd-th h2 { margin: 0; font: 700 0.8rem/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.yd-link { position: relative; border-color: var(--field-border); transition: border-color 80ms; }
.yd-link:hover { border-color: var(--link); }
/* Pressed, as a choice card (R62): the link's edge, the info wash and an inset shadow; the set's tiles keep their top edge. */
.yd-link:active { border-color: var(--link); background: var(--info-wash); box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.12); }
.yd-set:active { box-shadow: inset 0 4px 0 var(--s-edge), inset 0 2px 3px rgb(0 0 0 / 0.12); }
.yd-stretch { color: var(--link); text-decoration: none; }
.yd-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.yd-stretch:focus-visible { outline: none; }
.yd-stretch:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 14px; }
.yd-link .yd-share, .yd-link .how-link { position: relative; z-index: 2; }
.yd-chev { display: inline-flex; margin-left: auto; color: var(--link); }
.yd-chev .icon { width: 1.3rem; height: 1.3rem; }
.yd-share { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; margin-left: auto; border: 1px solid var(--field-border); border-radius: 999px; color: var(--ink); }
.yd-share .icon { width: 1rem; height: 1rem; }
.yd-share ~ .yd-chev { margin-left: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .yd-link { transition: none; } }

.yd-big { margin: 0; font-family: var(--serif); font-size: 3rem; line-height: 1; }
.yd-word { font-size: 2rem; }
.yd-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; margin: 0; font-size: 0.92rem; }
.yd-line .icon { width: 1rem; height: 1rem; align-self: center; }
.yd-chg { font-weight: 700; }
.yd-chg.is-up, .yd-figs dd.is-up { color: var(--grade-a); }
.yd-chg.is-down, .yd-figs dd.is-down { color: var(--ink-soft); }
.yd-count, .yd-quiet { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.yd-figs { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0; }
.yd-figs dt { font-size: 0.78rem; color: var(--ink-soft); }
.yd-figs dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; }
.yd-k { margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }

.yd-spark { margin-top: auto; }
.yd-plot { position: relative; height: 6.5rem; }
.yd-sparkline { display: block; width: 100%; height: 100%; overflow: visible; }
.yd-spark-area { fill: color-mix(in srgb, var(--chart-strong) 14%, transparent); }
.yd-spark-line { fill: none; stroke: var(--chart-strong); stroke-width: 2.5; stroke-linejoin: round; }
.yd-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--chart-strong); box-shadow: 0 0 0 3px var(--surface); }
.yd-axis { display: flex; justify-content: space-between; gap: 0.5rem; margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--ink-soft); }

/* The form guide: read, not tapped (the tile opens every event), a win in gold with the crown (R63). */
.yd-pips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.yd-pips li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; min-height: 5.2rem; padding: 0.55rem 0.25rem; background: var(--paper); border-radius: 10px; text-align: center; }
.yd-pips li.is-good { background: color-mix(in srgb, var(--grade-a) 9%, var(--surface)); }
.yd-pips li.is-win { background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold-bright); }
.yd-pip-when { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
.yd-pip-rec { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.yd-pip-rec.is-none { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; line-height: 1.2; }
.yd-pip-place { display: inline-flex; align-items: center; gap: 0.15rem; font-size: 0.8rem; font-weight: 700; }
.yd-pips .is-win .yd-pip-place { color: var(--gold); }
.yd-pip-place .icon { width: 0.9rem; height: 0.9rem; }

/* This set and its track (Kyle, 2026-10-19: in another theme they "stick out like a sore thumb"): tiles like every other,
   in the reader's theme; the set keeps only a thin edge of its own colour along the top (SetPalette's edge). */
.yd-set { --s-edge: var(--s-edge-l); box-shadow: inset 0 4px 0 var(--s-edge); }
@media (prefers-color-scheme: dark) {
    .yd-set { --s-edge: var(--s-edge-d); }
}
.yd-track { align-items: center; text-align: center; }
.yd-track .yd-th { align-self: stretch; }
.yd-track-line { justify-content: center; }
.yd-ring { display: grid; place-items: center; }
.yd-ringsvg { width: 6.5rem; height: 6.5rem; }
.yd-ring-bg { fill: none; stroke: var(--rule); stroke-width: 6; }
.yd-ring-fg { fill: none; stroke: var(--link); stroke-width: 6; stroke-linecap: round; }
.yd-ring-n { font-family: var(--serif); font-size: 15px; fill: var(--ink); }
.yd-ring-s { font-family: var(--sans); font-size: 7px; fill: var(--ink-soft); }

.yd-next { display: flex; align-items: center; gap: 0.8rem; }
.yd-next > div { flex: 1; min-width: 0; }
.yd-medal { flex: none; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 12px; background: var(--board); }
.yd-medal svg.md { width: 3.3rem; height: 3.3rem; }
.yd-medal .md-ring { stroke: var(--kc, var(--gold-bright)); stroke-dasharray: 3 3; }
.yd-next-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.yd-tier { margin: 0; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.yd-bar { display: block; height: 0.55rem; margin: 0.35rem 0; overflow: hidden; background: var(--paper); border: 1px solid var(--field-border); border-radius: 999px; }
.yd-bar > span { display: block; height: 100%; background: var(--link); }
.yd-finish { flex-wrap: nowrap; align-items: flex-start; }
.yd-finish .icon { margin-top: 0.2rem; }
.yd-welcome { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0; padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--gold-wash); font-size: 0.88rem; }
.yd-welcome .icon { flex: none; width: 1rem; height: 1rem; margin-top: 0.15rem; color: var(--gold); }

.yd-rows { margin: 0; padding: 0; list-style: none; }
/* What, who, the figure; a name never shortened (R49), so when they can't share a line the figure drops under it. */
.yd-rows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--rule); }
.yd-rows .yd-k { flex: 0 0 5rem; }
.yd-rows li:first-child { border-top: 0; }
.yd-who-name { flex: 0 1 auto; max-width: calc(100% - 5.5rem); font-weight: 700; overflow-wrap: anywhere; }
.yd-rows b { margin-left: auto; font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }
.yd-set-name { margin: 0; font-size: 1.05rem; font-weight: 700; }
.yd-finish.is-won { color: var(--gold); font-weight: 700; }

.yd-cal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.yd-cal li { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.yd-date { flex: none; display: grid; place-items: center; align-content: center; width: 3.2rem; height: 3.4rem; line-height: 1.05; border-radius: 10px; background: var(--board); color: var(--board-ink); }
.yd-cal li.is-champ .yd-date { box-shadow: inset 0 0 0 2px var(--gold-bright); }
.yd-date b { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.yd-date span { font-family: var(--serif); font-size: 1.4rem; }
.yd-ev { display: grid; min-width: 0; }
.yd-ev-name { font-weight: 700; overflow-wrap: anywhere; }
.yd-ev-name > :last-child:not(:first-child) { margin-left: 0.35rem; }

.yd-private { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; margin: 0 0 var(--section-gap); font-size: 0.88rem; color: var(--ink-soft); }
.yd-private form { margin: 0; }
.yd-private > a, .yd-private .link-button { display: inline-flex; align-items: center; min-height: 24px; }
.yd-lock .icon { width: 1rem; height: 1rem; margin-right: 0.3rem; vertical-align: -2px; }

@media (max-width: 47.99rem) {
    .yd-acts { gap: 0.4rem; }
    .yd-act { padding: 0 0.7rem; font-size: 0.84rem; }
    .yd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .yd-rating, .yd-form, .yd-grid .w-d1, .yd-grid .w-d2, .yd-grid .w-t2, .yd-grid .w-t4 { grid-column: 1 / -1; grid-row: auto; }
    .yd-tile { padding: 0.9rem; }
    .yd-big { font-size: 2.5rem; }
    .yd-set .yd-big { font-size: 2.1rem; }
    .yd-pips { gap: 0.35rem; }
    .yd-pips li { min-height: 4.6rem; }
    .yd-pip-rec { font-size: 1.25rem; }
    .yd-of { display: none; }
    .yd-cal { grid-template-columns: minmax(0, 1fr); }
    .yd-ringsvg { width: 5.5rem; height: 5.5rem; }
}

/* R111 (Kyle, 2026-10-21: "expanding the content on "Rivals" and giving it a full row", "a similar change to "Your
   Travel"", "a block on the screen for things like "Send Weekly Email" toggle"). Rivals' cards are choice cards, one tap to
   head to head; Your travel's are cards to read, a soft fill with no edge (R62); Your settings' controls are buttons. */
.yr-cards, .yt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 0.75rem; }
.yr-card.choice-card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.3rem; padding: 0.85rem 0.95rem; text-align: left; }
.yr-kind, .yt-kind { display: flex; align-items: center; gap: 0.35rem; margin: 0; font: 700 0.74rem/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.yr-kind .icon, .yt-kind .icon { flex: none; width: 1rem; height: 1rem; }
/* A link to a player page is in the slashed face (R21); the card is in the plain one, numbers too, and only the name slashed. */
a.yr-card { font-family: var(--sans); }
.yr-name { font-family: var(--sans-slashed); font-size: 1.15rem; overflow-wrap: anywhere; }
.yr-rec, .yt-rec { display: grid; gap: 0.3rem; margin: 0; }
.yr-rec .pr-rec, .yt-rec .pr-rec { justify-self: start; font: 400 1.6rem/1.1 var(--serif); color: var(--ink); }
.yt-rec .pr-rec { font-size: 1.35rem; }
.yr-big, .yt-big { margin: 0; font: 400 1.6rem/1.1 var(--serif); color: var(--ink); }
.yt-big { font-size: 2rem; }
.yr-big small, .yt-big small { font: 400 0.88rem var(--sans); color: var(--ink-soft); }
.yr-meta, .yt-sub { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.yr-meta b { color: var(--ink); }
.yr-go { display: flex; align-items: center; gap: 0.2rem; margin-top: auto; padding-top: 0.35rem; font-size: 0.85rem; font-weight: 700; color: var(--link); }
.yr-go .icon { width: 1rem; height: 1rem; }
.yr-foot, .ys-foot { margin: 0; }
.yt-card, .yt-crew { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; padding: 0.85rem 0.95rem; border-radius: 12px; background: var(--paper); }
.yt-card dl, .yt-vs { display: grid; gap: 0.35rem; margin: 0; }
.yt-card dd, .yt-vs dd { margin: 0; }
.yt-vs dt { font-size: 0.86rem; color: var(--ink-soft); }
.yt-crew { display: grid; grid-template-columns: max-content minmax(12rem, 22rem); justify-content: start; align-items: end; gap: 0.4rem 2.2rem; }
.yt-crew .yt-kind { grid-column: 1 / -1; }
.yt-crew .yd-figs { margin: 0; }
.ys-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem 1.6rem; }
.ys-col { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.ys-col p { margin: 0; }
.ys-h { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.95rem; }
.ys-h .icon { flex: none; width: 1.05rem; height: 1.05rem; color: var(--ink-soft); }
.yd-settings .wk-toggle { white-space: normal; }
.yd-settings .wk-toggle > span:last-child { min-width: 0; }
.ys-formats { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.ys-seg { display: inline-flex; max-width: 100%; border: 1px solid var(--field-border); border-radius: 999px; overflow: hidden; }
.ys-seg button { min-height: 32px; margin: 0; padding: 0.2rem 0.85rem; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); font: 400 0.88rem var(--sans); }
.ys-seg button + button { border-left: 1px solid var(--field-border); }
.ys-seg button:hover { background: var(--paper); color: var(--ink); }
.ys-seg button[aria-pressed="true"] { background: var(--link); color: var(--surface); font-weight: 700; }
.ys-seg button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ys-theme { display: flex; align-items: center; gap: 0.6rem; }
.ys-sw { flex: none; width: 3.2rem; }
@media (max-width: 47.99rem) {
    .yt-crew { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- The player page as a dashboard (R106) */
/* Kyle, 2026-10-19: "Build A: the full chart on a Rating tab, Next most played off the Overview, and You and them to ri
   Legal before you build it." R105's band and tiles on the player page; what the player page adds is here: the home
   field's share and the claim in the band, the facts and index line under it, the You and them tile, the newest medals,
   where they play as bars, and what's coming up stacked in a half-width tile. */
.pd-home { display: block; line-height: 1.5; }
.pd-home .icon { margin-right: 0.35rem; vertical-align: -3px; }
.pd-share { margin-left: 0.15rem; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.pd-labels { gap: 0.35rem; margin-top: 0.55rem; }
.pd-labels .plabels { display: contents; }
.pd-band .you-mark { background: var(--board-ink); color: var(--board); }
.pd-claim { font-size: 0.9rem; color: var(--board-soft); }
.pd-claim .claim-actions { gap: 0.3rem 0.8rem; }
.pd-claim .claim-ask, .pd-claim .claim-note { color: var(--board-soft); font-size: 0.9rem; }
.pd-claim button.link-button { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 1.5rem; color: var(--board-ink); text-decoration: underline; text-underline-offset: 0.15em; font-size: 0.9rem; }
.pd-claim button.link-button .icon { width: 0.95rem; height: 0.95rem; }
.pd-claim button.secondary { background: transparent; color: var(--board-ink); border-color: var(--board-soft); }
.pd-claim button.secondary:hover { background: rgb(255 255 255 / 0.08); color: var(--board-ink); }
.pd-claim .area-offer { margin-top: 0.5rem; color: var(--board-soft); }
.pd-claim .area-offer button.link-button { color: var(--board-ink); }
/* The facts and where they come from share the band's last line where they fit (R115). */
.pd-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.2rem; }
.pd-findings { margin: 0 0 1rem; }
.yd-grid .w-d4 { grid-column: 1 / -1; }
.pd-vs.is-alone { grid-column: span 2; }
.pd-you, .pd-unit { font-family: var(--sans); font-size: 1rem; color: var(--ink-soft); }
.pd-chance { font-weight: 700; }
.pd-keep { white-space: nowrap; }
.pd-medals { display: flex; gap: 0.6rem; margin: 0.2rem 0 0; padding: 0; list-style: none; }
.pd-medals li { display: grid; justify-items: center; align-content: start; gap: 0.25rem; width: 4.6rem; text-align: center; }
.pd-medal { width: 3rem; height: 3rem; border-radius: 10px; }
.pd-medal svg.md { width: 2.5rem; height: 2.5rem; }
.pd-medal .md-ring { stroke-dasharray: none; }
.pd-mname { font-size: 0.75rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pd-bars { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.pd-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.2rem 0.6rem; }
.pd-store { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.pd-store .ptag { vertical-align: 0.1em; }
.pd-bars b { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; font-variant-numeric: lining-nums tabular-nums; }
/* The bar is under the words, in the theme's own colours (ri Designer): the words keep the tile's checked contrast. */
.pd-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.pd-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--link); }
@media (max-width: 40rem) {
    .pd-tabs .tab-count, .pd-tabs .tab-flag { display: none; }
    /* R115 (ri Designer, ri Stakeholder): the share takes a line of its own, never one that starts with a dot. */
    .pd-share { display: block; margin-left: 0; }
    .pd-dot { display: none; }
}

/* ---------------------------------------------------------------- The store page as a dashboard (R107) */
/* Kyle, 2026-10-19: "Build A2 (the store's figures in the band), with C's clean-up in the same story." R105's band and
   tiles for a store, replacing R79's board: the band keeps R79's four figures (.sd-figs) beside the name, its two actions
   are R105's pills, Coming up here is a row of its own, and the last events are lines in a tile that opens the Events tab. */
.sd-band.has-figs { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.sd-band.has-figs .sd-acts { grid-column: 1 / -1; }
.sd-home { display: block; line-height: 1.5; }
.sd-home .icon { margin-right: 0.35rem; vertical-align: -3px; }
.sd-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; }
.sd-addr { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--board-soft); }
.sd-addr a { color: var(--board-ink); }
.sd-chips { margin: 0.6rem 0 0; }
.sd-figs { display: grid; grid-template-columns: repeat(4, auto); gap: 0.2rem 1.6rem; margin: 0; text-align: right; }
.sd-figs dt { font: 700 0.72rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--board-soft); }
.sd-figs dd { margin: 0; font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--board-ink); white-space: nowrap; }
.sd-figs dd.sd-sub { font: 400 0.82rem var(--sans); color: var(--board-soft); }
.sd-acts .inline-set-area { margin: 0; }
button.yd-act { background: transparent; cursor: pointer; font-family: inherit; }
.sd-coming { margin: 0 0 1rem; }
.sd-share { margin-left: auto; }
.sd-lines { display: grid; margin: 0; padding: 0; list-style: none; }
.sd-lines li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--rule); }
.sd-lines li:first-child { border-top: 0; padding-top: 0; }
.sd-day { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); padding-top: 0.15rem; }
.sd-ev { display: grid; min-width: 0; }
.sd-ev-name { font-weight: 700; overflow-wrap: anywhere; }
.sd-sub { font-size: 0.86rem; color: var(--ink-soft); }
.sd-sub .icon { width: 0.9rem; height: 0.9rem; vertical-align: -2px; margin-right: 0.15rem; }
.sd-lines li.is-champ .sd-sub { color: var(--gold); font-weight: 700; }
/* More about events here is short beside Tier progress (the pairing Kyle approved), so it keeps its own height rather
   than stretching into an empty box (ri Designer's review, as R106 first did). */
.sd-grid > .sd-more { align-self: start; }
.yd-figs.sd-figs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem 1rem; }
.sd-figs-grid dd small { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); }
.sd-word { font-size: 1.3rem; }
/* R108: field strength as the stores it's compared with, ranked, this one marked (Kyle's C). The row is decorative (the
   sentence under it says it all), so its squares are a quiet fill and only Here takes the link colour; each bracket names
   the places that read that level, the store's own in the ink colour. Many stores (a city) close the gaps. */
.fm { display: grid; gap: 0.3rem; margin-top: 0.5rem; }
.fm-row { display: grid; grid-template-columns: repeat(var(--fm-n), minmax(0, 1fr)); column-gap: 3px; row-gap: 0.2rem; }
.fm-row.is-many { column-gap: 1px; }
.fm-here { grid-row: 1; justify-self: center; font-size: 0.78rem; font-weight: 700; color: var(--link); white-space: nowrap; }
.fm-here.at-start { justify-self: start; }
.fm-here.at-end { justify-self: end; }
.fm-sq { grid-row: 2; height: 1.1rem; border-radius: 3px; background: color-mix(in srgb, var(--ink-soft) 40%, var(--surface)); }
.fm-row.is-many .fm-sq { border-radius: 1px; }
.fm-sq.is-here { background: var(--link); }
/* A word is never shortened: a narrow bracket other than the store's own is a bare line (FieldRow.Names), and the store's own
   word stays centred and may run past its bracket (flex centring overflows both ways). */
.fm-br { grid-row: 3; display: flex; justify-content: center; min-width: 0; min-height: 1.2rem; margin: 0 1px; padding-top: 0.15rem;
    border-top: 2px solid var(--ink-soft); font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
.fm-br.at-start { justify-content: flex-start; }
.fm-br.at-end { justify-content: flex-end; }
.fm-br.is-level { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.fm-said { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }
/* R109: Players' Tier progress as the tier check's picture on Play Hub's numbers only: one solid bar a measure, Standard and
   Legendary as solid lines with a surface halo so they show across the bar, the number and its shortfall on the name's line.
   Its own tp-* classes, never the tier check's (R28: the crawl keeps them apart). */
.tp-close { font-weight: 700; color: var(--ink); }
.tp-chart { display: grid; margin-top: 0.4rem; }
.tp-row { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(66%); column-gap: 0.8rem; row-gap: 0.35rem; align-items: baseline; padding: 0.55rem 0;
    border-top: 1px solid var(--rule); }
.tp-row:first-child, .tp-head + .tp-row { border-top: 0; }
.tp-head { padding: 0; }
.tp-head .tp-track { grid-row: 1; grid-column: 1 / -1; height: 1.1rem; }
.tp-label { grid-row: 1; grid-column: 1; font-weight: 700; }
.tp-value { grid-row: 1; grid-column: 2; text-align: right; }
.tp-value b { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; font-variant-numeric: lining-nums tabular-nums; }
.tp-status { font-size: 0.82rem; color: var(--ink-soft); margin-left: 0.3rem; }
.tp-part { white-space: nowrap; }   /* a phrase never breaks inside: "Past Standard ·" then "11 short of Legendary" */
.tp-status.is-met { color: var(--grade-a); font-weight: 700; }
.tp-track { position: relative; grid-row: 2; grid-column: 1 / -1; height: 0.75rem; }
.tp-bar { position: absolute; inset: 0 auto 0 0; background: var(--link); border-radius: 999px; }
.tp-tick { position: absolute; top: -0.3rem; bottom: -0.3rem; width: 2px; margin-left: -1px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--surface); }
.tp-ticklabel { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.75rem; color: var(--ink-soft); white-space: nowrap; }
/* Thresholds that don't line up (they're settings) get their labels on a line of their own under each bar (ri Designer). */
.tp-ticks { position: relative; grid-row: 3; grid-column: 1 / -1; height: 1rem; }
/* R109: Investigators' tier check as a tile, beside More about events here. The tier check's columns are sized for the whole
   page, so in a narrow tile it takes its own phone layout (the name and numbers on one line, the bar under them). */
.sd-tc { container-type: inline-size; }
.sd-tc .tier-sub { margin-bottom: 0.8rem; }
/* The tile holds the tier check directly: no panel inside it (a box you read gets no strong edge; ri Designer). */
.sd-tc .tier-bars { border: 0; border-radius: 0; background: none; padding: 0; }
.sd-tc .tier-bars:not(:has(.tier-head)) { padding-top: 1.5rem; }
@container (max-width: 44rem) {
    .sd-tc .tier-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.5rem; }
    .sd-tc .tier-label { grid-row: 1; align-self: start; }
    .sd-tc .tier-head { padding: 0; }
    .sd-tc .tier-head .tier-track { grid-column: 1 / -1; grid-row: 1; }
    .sd-tc .tier-value { justify-content: flex-start; grid-column: 1 / -1; grid-row: 3; }
    .sd-tc .tier-value .tier-status::before { content: none; }
    .sd-tc .tier-track { grid-column: 1 / -1; grid-row: 2; }
    .sd-tc .tier-row:first-child .tier-track { margin-top: 0; }
    /* Thresholds that don't line up keep their labels, on a line of their own under the bar. */
    .sd-tc .tier-bars:not(:has(.tier-head)) { padding-top: 0; }
    .sd-tc .tier-row:not(.tier-head) .tier-ticklabel { display: block; top: auto; bottom: -1.35rem; }
    .sd-tc .tier-row:not(.tier-head) .tier-track:has(.tier-ticklabel) { margin-bottom: 1.35rem; }
}
/* R110: This week as a dashboard (nw-*), in R105's tiles. The store page's event lines (sd-lines) and rank rows (sd-rows)
   serve its lists too. Your week is one slim row: the rating in the heading face, then the next event. */
.nw-grid { margin-top: 1rem; }
/* R113 (ri Designer): the fortnight's notice that ratings now count Limited sits clear of the tabs and the tiles. */
.nw-limited { margin: 1rem 0; }
.nw-limited + .nw-grid { margin-top: 0; }
.nw-you-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 2rem; }
.nw-you-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin: 0; }
.nw-you-num { font-family: var(--serif); font-size: 2rem; font-weight: 400; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.nw-you-next { margin: 0; }
.nw-k { margin-right: 0.3rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.nw-soft { font-weight: 400; color: var(--ink-soft); }
.nw-sub-h { display: flex; align-items: center; gap: 0.35rem; margin: 0.7rem 0 0.15rem; font-size: 0.86rem; font-weight: 700; }
.nw-sub-h > .icon { width: 1rem; height: 1rem; color: var(--ink-soft); }
.yd-th + .nw-sub-h { margin-top: 0.2rem; }
.nw-sub { font-size: 0.82rem; color: var(--ink-soft); }
.nw-upsets, .nw-stores, .nw-champs { margin: 0; padding: 0; list-style: none; }
.nw-upsets li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.8rem; padding: 0.4rem 0; border-top: 1px solid var(--rule); }
.nw-upsets li:first-child, .nw-stores li:first-child, .nw-champs li:first-child { border-top: 0; }
.nw-up-gap { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--serif); font-size: 1.1rem; font-weight: 400; white-space: nowrap; }
.nw-up-gap small { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft); }
.nw-up-where { font-size: 0.82rem; color: var(--ink-soft); }
.nw-stores li, .nw-champs li { padding: 0.35rem 0; border-top: 1px solid var(--rule); }
/* The season's three lists side by side when there's room for a name and its figure, else fewer to a row. */
.nw-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 1.2rem; }
.nw-cols .yd-who-name { overflow-wrap: normal; word-break: normal; }   /* a name breaks between words, never inside one */
.nw-dates { margin-top: -0.3rem; }
.nw-more { margin-top: 0.2rem; font-size: 0.9rem; }
.nw-last { display: flex; gap: 0.4rem; align-items: flex-start; margin-top: 0.7rem; }
.nw-last > .icon { flex: none; width: 1rem; height: 1rem; margin-top: 0.2rem; color: var(--gold); }
.nw-last p { margin: 0; }
.sd-bars { display: block; width: 100%; height: 4rem; }
.sd-bars rect { fill: color-mix(in srgb, var(--link) 65%, var(--surface)); }
.sd-bars rect.is-now { fill: var(--link); }
.sd-tierline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0; font-weight: 700; }
.sd-of { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); }
.sd-rows .yd-k { flex: 0 0 1.4rem; }
.sd-rows .yd-who-name { max-width: calc(100% - 7rem); }
@media (max-width: 47.99rem) {
    .sd-band.has-figs { grid-template-columns: minmax(0, 1fr); }
    .sd-figs { grid-template-columns: repeat(2, auto); justify-content: start; text-align: left; }
    .yd-figs.sd-figs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* R114 (Kyle, 2026-10-21: "A, build it"): What's new (wn-*). The banner is a note to read with one link and one button: in
   the page above the section band, never over it; no pill, no gold, no strong edge (R62). The page is a navy band like
   You's, then R105's tiles: the newest note large, the rest two across, each one tap from its title when it has a link.
   A note's kind is a word and an icon in the label kinds' colours. */
.wn-banner { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1rem; padding: 0.3rem 0.3rem 0.3rem 0.75rem;
    border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.wn-ico { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--info-wash); color: var(--link); }
.wn-ico .icon { width: 1.05rem; height: 1.05rem; }
.wn-text { flex: 1; min-width: 0; margin: 0; padding: 0.35rem 0; font-size: 0.95rem; line-height: 1.4; color: var(--ink); }
.wn-k { margin-right: 0.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.wn-title { font-weight: 700; }
.wn-more { color: var(--ink-soft); }
.wn-text a { margin-left: 0.45rem; font-weight: 700; white-space: nowrap; }
.wn-x { flex: none; margin: 0; }
.wn-banner .wn-close { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 10px;
    background: transparent; color: var(--ink-soft); }
.wn-banner .wn-close:hover { background: var(--paper); color: var(--ink); filter: none; }
.wn-close .icon { width: 1.15rem; height: 1.15rem; }

.k-new { --k-bg: var(--info-wash); --k-ink: var(--link); }
.k-better { --k-bg: #dcf1ea; --k-ink: #0b5344; }
.k-fixed { --k-bg: #eeece6; --k-ink: #46453f; }
@media (prefers-color-scheme: dark) {
    .k-better { --k-bg: #173a33; --k-ink: #9fdcc9; }
    .k-fixed { --k-bg: #34332f; --k-ink: #d4d1c7; }
}
.wn-kind { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--k-ink); }
.wn-kind .icon { width: 0.95rem; height: 0.95rem; }
.wn-day, .wn-dot { font-size: 0.8rem; color: var(--ink-soft); }
.wn-sec { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.7rem; font: 700 0.8rem/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.wn-sec::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.wn-grid { margin-bottom: 1.6rem; }
.wn-t .yd-th { gap: 0.5rem; }
.wn-t p { margin: 0; }
.wn-h { margin: 0; font: 400 1.3rem/1.2 var(--serif); }
.wn-txt { color: var(--ink); font-size: 0.95rem; }
.wn-go { margin-top: auto !important; padding-top: 0.2rem; font-size: 0.88rem; font-weight: 700; color: var(--link); }
.wn-t.is-alone { grid-column: 1 / -1; }
.wn-hero { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem 2rem; padding: 1.4rem 1.5rem; }
.wn-t .wn-body { display: flex; flex: 1; flex-direction: column; gap: 0.55rem; min-width: 0; }
.wn-hero .wn-h { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
.wn-hero .wn-txt { font-size: 1.02rem; max-width: 38rem; }
.wn-hero .yd-chev { position: absolute; top: 1.2rem; right: 1.2rem; }
.wn-medal { display: grid; place-items: center; width: 7.5rem; height: 7.5rem; border-radius: 24px; background: var(--k-bg); color: var(--k-ink); }
.wn-medal .icon { width: 3.4rem; height: 3.4rem; stroke-width: 1.4; }
.wn-preview { margin: 1rem 0; padding: 1rem; border-radius: 12px; background: var(--paper); }
.wn-preview > h3 { margin: 0 0 0.6rem; font: 700 0.8rem/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.wn-preview .wn-banner { margin-bottom: 0.9rem; }
.wn-preview .yd-grid { margin: 0; }
.wn-acts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.wn-acts form { margin: 0; }
.wn-form { display: grid; gap: 0.9rem; max-width: 40rem; }
.wn-form textarea { min-height: 7rem; }
@media (max-width: 47.99rem) {
    .wn-hero { grid-template-columns: minmax(0, 1fr); padding: 1.1rem; }
    .wn-medal { grid-row: 1; width: 4rem; height: 4rem; border-radius: 16px; }
    .wn-medal .icon { width: 2rem; height: 2rem; }
}

/* ---------------------------------------------------------------- R115: the player and store pages on the section band */
/* Kyle, 2026-10-21 (relayed by ri Coordinator): "The tab coloring and midline information does not match what we do for
   the banner bar on the rest of the site." R106's and R107's bands sit in R74's card (.sb) with its underline tabs attached
   (_BandTabs), so they take the band's gold rule, glow and aurora as Stores, Players and Upcoming do. What sat loose
   between the band and the tabs (the player's facts, the store's update line and actions) is part of the band. */
.pd-head, .sd-head { margin: 0 0 1rem; }
.pd-head > .sb-band { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.8rem 1.5rem; }
.sd-head > .sb-band { grid-template-columns: minmax(0, 1fr); gap: 0.9rem 1.5rem; }
.sd-head > .sb-band.has-figs { grid-template-columns: minmax(0, 1fr) auto; }
.sd-head .sd-live { grid-column: 1 / -1; }
.sb > .sb-band:last-child { border-radius: 13px; }
/* A tab that opens a player or store isn't a name: its count keeps the plain zero (R21). */
.sb-tabs a { font-family: var(--sans); }
.pd-band .pd-facts { margin: 0.75rem 0 0; font-size: 0.88rem; color: var(--board-soft); }
.pd-band .pd-facts b { color: var(--board-ink); }
.pd-band .pd-facts a { color: var(--board-ink); }
.pd-band .fact-note { color: var(--board-soft); }
.pd-source { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 0.35rem; }
.pd-source .icon { width: 1rem; height: 1rem; }
.sb-band .ident { color: var(--board-ink); }
.sd-acts { align-items: center; }
.sd-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.3rem 1.2rem; margin: 0 0 0 auto; font-size: 0.88rem; color: var(--board-soft); }
.sd-status a { color: var(--board-ink); }
.sd-status .how-link { color: var(--board-soft); }
.sd-updated { display: inline-flex; align-items: center; gap: 0.35rem; }
.sd-updated .icon { width: 1rem; height: 1rem; flex: none; }
.sd-status .for-stores-link { font-size: 0.88rem; }
/* Fetching more events (everyone, on a store) and finding more of a player's events (Investigators): a pill like the band's
   other actions; open, its forms are a card of their own inside the band, in the page's colours. */
.sb-band .index-panel { margin: 0; }
.pd-band .index-panel { margin: 0.75rem 0 0; }
.sb-band .index-panel[open] > summary.yd-act { background: color-mix(in srgb, var(--board-ink) 14%, transparent); }
.sb-band .index-forms { margin-top: 0.7rem; background: var(--surface); color: var(--ink); }
.sb-band .index-forms :focus-visible { outline-color: var(--focus); }
.sb-band .index-forms a { color: var(--link); }
.sb-band .live-jobs { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--board-soft); }
.sb-band .live-job .job-heading, .sb-band .live-job .job-status { color: var(--board-ink); }
.sb-band .live-job[data-state="Queued"] .job-status { color: var(--board-soft); }
.sb-band .live-bar { background: color-mix(in srgb, var(--board-ink) 22%, transparent); }
.sb-band .live-bar > span { background: var(--gold-bright); }
.sb-band .job-failed { color: var(--board-ink); }
@media (max-width: 40rem) {
    .pd-head > .sb-band, .sd-head > .sb-band, .sd-head > .sb-band.has-figs { grid-template-columns: minmax(0, 1fr); }
    .sd-status { justify-content: flex-start; margin: 0.2rem 0 0; }
}

/* ---------------------------------------------------------------- The heading face: Calistoga (Kyle, 2026-10-18) */
/* A name Calistoga can't draw whole (a rare letter), set wholly in Young Serif so no word mixes faces (Ui.SerifName). */
.serif-ext { font-family: "Young Serif", Georgia, "Times New Roman", serif; }
/* Calistoga's figures are proportional by default but it has tabular ones: figures that stack in a column turn them on,
   so they line up in the heading face itself (Last few days and Recent results on phones, Ratings' 2nd to 5th and its
   movers, head to head's games, Support's months, Investigators' team and tier figures). A new such list joins them. */
.el-fig b, .rt-next-rating .rating, .rt-mover .mover, .fo-games, .twg-count, .tier-number, .tm-nums dd, .sup-months dd, .yd-rows b {
    font-variant-numeric: lining-nums tabular-nums;
}
/* ri Stakeholder: a record never breaks at its hyphen ("120-" then "28" reads as two numbers). Board figures keep to one
   line; on a phone the scoreboard's figures wrap as whole blocks, and under 400px the record and events step down a notch
   so a typical record fits beside the rating (a long one, "1234-567", moves Events to the next line, whole). */
.yb-score dd, .yb-rec, .sb-figs dd, .eb-score dd, .tier-card b, .recap-champ-rec, .el-fig b, .rd-score b, .fo-games, .h2h-record, .fo-rating dd, .yd-big, .yd-figs dd, .yd-pip-rec, .yd-rows b { white-space: nowrap; }
@media (max-width: 47.99rem) {
    .yb-score { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 1.4rem; }
}
@media (max-width: 25rem) {
    .yb-score { column-gap: 1rem; }
    .yb-score > div:not(.yb-rating) dd:first-of-type { font-size: 1.4rem; }
}

/* ---------------------------------------------------------------- R116: the Rating tab, as tiles */
/* Kyle, 2026-10-22 (relayed): "The Ratings tab could use more content." R105's tiles around R106's chart: today, the
   highest (your own page) or best week, what it's from, last played; then the weeks that moved it, set by set, and what
   goes into it. Decision 31: nothing on someone else's page shows a fall. */
.rt-grid { margin: 0 0 1rem; }
.rt-grid .yd-big small { font: 400 1rem var(--sans); color: var(--ink-soft); }
.rt-up { color: var(--win); }
.rt-down { color: var(--loss); }
.yd-big.rt-up { font-size: 2.6rem; }
.rt-date { font-size: 2.2rem; }
.rt-range { position: relative; height: 2.1rem; margin: 0.2rem 0 0; }
.rt-band { position: absolute; left: 0; right: 0; top: 0.35rem; height: 0.55rem; border-radius: 999px; background: color-mix(in srgb, var(--link) 28%, var(--surface)); }
.rt-mid { position: absolute; top: 0.1rem; width: 3px; height: 1.05rem; border-radius: 2px; transform: translateX(-1px); }
/* The low end, the number shown: a dot in the link colour. */
.rt-shown { position: absolute; top: 0.2rem; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: var(--link); border: 2px solid var(--surface); }
.rt-shown { left: 0; }
.rt-mid { left: 50%; background: var(--ink); }
.rt-lo, .rt-hi { position: absolute; top: 1.2rem; font-size: 0.78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rt-lo { left: 0; } .rt-hi { right: 0; }
.rt-meter { height: 0.6rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.rt-meter i { display: block; height: 100%; background: var(--link); }
.rt-split { display: flex; height: 0.7rem; border-radius: 999px; overflow: hidden; gap: 2px; }
.rt-split i, .rt-key i { display: block; }
.rt-c { background: var(--link); }
.rt-l { background: color-mix(in srgb, var(--link) 40%, var(--surface)); }
.rt-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; font-size: 0.9rem; }
.rt-key li { display: flex; align-items: center; gap: 0.45rem; }
.rt-key i { width: 0.75rem; height: 0.75rem; border-radius: 3px; flex: none; }
/* ri Designer: no gold (it's the Set Championships'), the link colour fading to the rule. */
.rt-place { position: relative; height: 0.6rem; border-radius: 999px; background: var(--rule); margin: 0.3rem 0 0.15rem; }
.rt-place b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--link); }
.rt-place-ends { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.rt-place i { position: absolute; top: -0.3rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); transform: translateX(-50%); }
.rt-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rt-list li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.rt-list li:first-child { border-top: 0; }
.rt-wk { display: grid; font-weight: 700; line-height: 1.15; }
.rt-wk small { font-weight: 400; color: var(--ink-soft); font-size: 0.78rem; }
.rt-what { font-size: 0.92rem; overflow-wrap: anywhere; }
.rt-list b { font: 1.35rem var(--serif); font-variant-numeric: tabular-nums; }
.rt-goes { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; font-size: 0.92rem; }
.rt-goes-tile .rt-goes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); column-gap: 2rem; }
/* The chart sits in a tile too, its title as a tile's. */
.rt-chart .rating-history { margin: 0; }
.rt-chart .rating-history > h2 { margin: 0 0 0.3rem; font: 700 0.8rem/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.rt-only { margin-left: auto; font-size: 0.78rem; color: var(--ink-soft); }
.rt-set .yd-big { font-size: 2.4rem; }
@media (min-width: 48rem) {
    .rt-grid .rt-set-first.w-d1 { grid-column: 1 / span 1; }
    .rt-grid .rt-set-first.w-d2 { grid-column: 1 / span 2; }
    .rt-grid .rt-set-first.w-d4 { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
    .rt-grid .rt-now, .rt-grid .rt-mix { grid-column: span 2; }
    /* Today first, then the two small tiles side by side, then what it's from. */
    .rt-now { order: 1; } .rt-peak { order: 2; } .rt-last { order: 3; } .rt-mix { order: 4; } .rt-stand { order: 5; }
}

/* ---------------------------------------------------------------- R118: the site tidied (step 1 of the navigation review) */
/* Kyle, 2026-10-23: "Build all three steps, one story at a time: 1 Tidy first." Every page opens with the section band's
   card (.sb-page: the title, a line above it where it belongs, one under it kept on phones); You, Help and Admin have tabs
   of their own (SiteSections); long documents keep their contents in reach on phones; a store's figures are one facts
   line there; an event's page has tabs. */
.sb-page, .you-head { margin: 0 0 1rem; }
.sb-page .sb-desc { max-width: 48rem; }
.sb-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 1.2rem; }
.sb-page .sb-desc strong { color: var(--board-ink); }
.sb-page .sb-desc a { color: var(--board-ink); }
.sb-page-acts { margin: 0.5rem 0 0; }
/* You's band: the home field and name, How others see you beside them, You's tabs under it. */
.sb > .sb-band.you-band { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.8rem 1.5rem; }
.you-ask .sb-search { max-width: 34rem; }
/* A page's views under its band (Your achievements' four, an admin tab's parts): the list head's segmented control, with
   a count where one helps. */
.ya-views, .adm-views { margin: 0 0 1rem; }
.seg-count { margin-left: 0.4rem; font-size: 0.82rem; font-weight: 400; opacity: 0.85; }
/* Account as tiles: what's kept and what you share across the width, deleting your account last, marked as R21's danger. */
.acct-who { display: flex; flex-wrap: wrap; gap: 0.15rem 1.2rem; }
.acct-grid .yd-tile > :is(p, ul, form, details, .wk-admin) { margin: 0; }
.acct-grid .yd-tile ul { padding-left: 1.2rem; }
.acct-shared > .share-sec { margin: 0; }
.acct-danger { border-left: 4px solid var(--high); }
/* A store on a phone: the tier and the four figures as one facts line (.sd-facts), the owner link at the page's foot. */
.sd-facts { display: none; }
.sd-foot { margin: 1.4rem 0 0; font-size: 0.9rem; }
@media (max-width: 40rem) {
    .sd-band .sd-figs { display: none; }
    .sd-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--board-soft); }
    .sd-facts b { color: var(--board-ink); }
    .sd-chips .sb-tier { display: none; }
    .sd-chips:not(:has(.sb-chip)) { display: none; }
}
/* The admin section's Inbox: a tile for each kind of thing waiting, one tap to its page. */
.adm-inbox { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 47.99rem) { .adm-inbox { grid-template-columns: minmax(0, 1fr); } }
/* An event's tabs, under its board's buttons. */
.event-board > .sb-tabs { border-top: 1px solid var(--rule); }
/* The account menu's Help: two lines, like Support's. */
.user-menu-panel .menu-help { min-height: 2.8rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.user-menu-panel .menu-help .icon { align-self: flex-start; margin-top: 0.15rem; }
/* Your area: the radius, units and location in a card under the band. */
.area-ctl { margin: 0 0 1rem; }
.area-ctl .head-actions { margin: 0; }
/* A long document's contents (how it works, the bot, terms, privacy): beside the text on a wide screen, always open; on
   phones and tablets a slim bar that stays at the top as you read, opening the list (site.js closes it after a choice). */
.legal-toc > summary { list-style: none; }
.legal-toc > summary::-webkit-details-marker { display: none; }
@media (min-width: 60.01rem) { .legal-toc > summary { cursor: default; } }
@media (max-width: 60rem) {
    .legal-side { position: sticky; top: 0; z-index: 20; max-height: calc(100vh - 1rem); padding: 0; box-shadow: 0 2px 6px rgb(0 0 0 / 0.08); }
    .legal-toc > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 2.75rem; margin: 0; padding: 0 1rem; cursor: pointer; color: var(--ink); font-size: 0.92rem; }
    .legal-toc > summary::after { content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: translateY(-25%) rotate(45deg); }
    .legal-toc[open] > summary::after { transform: translateY(25%) rotate(-135deg); }
    .legal-toc > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
    .legal-toc > ol:last-child { margin-bottom: 0.8rem; }
    /* A section chosen from the bar lands below it. */
    .legal-doc [id], .legal-doc section.block[id] { scroll-margin-top: 3.6rem; }
}

/* ---------------------------------------------------------------- R119: the site re-cut (step 2 of the navigation review) */
/* Kyle, 2026-10-23: "Build all three steps, one story at a time: 1 Tidy first, then 2 Re-cut, then 3 App-shaped." The top
   bar is the brand, five tabs (Home, Events, Players, Stores, You) and your picture: the area left it for the band of every
   page it changes. Below a computer's width the tabs drop their icons; on a phone and a small tablet they take a row of
   their own under the brand, five alike, and the wordmark has room again. */
.site-header:not(.site-header-plain) { grid-template-columns: auto 1fr auto; }
.site-header:not(.site-header-plain) .user-menu { grid-row: 1; grid-column: 3; justify-self: end; }
@media (max-width: 62rem) {
    .site-nav .icon { display: none; }
    .site-nav a { padding: 0 0.8rem; }
}
@media (max-width: 48rem) {
    .site-header:not(.site-header-plain) { gap: 0 0.5rem; padding: 0 0.75rem; min-height: 0; }
    .site-header:not(.site-header-plain) .brand { grid-row: 1; grid-column: 1; padding: 0.55rem 0; }
    .site-header:not(.site-header-plain) .brand-name {
        position: relative; top: 0.08em; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: nowrap;
    }
    .site-header:not(.site-header-plain) .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; margin-left: 0; }
    .site-header:not(.site-header-plain) .site-nav a { flex: 1 1 0; justify-content: center; padding: 0.65rem 0.2rem; }
}
/* The band's area line keeps its radius on a phone, short ("50 mi · Rose City Games"), now the top bar has no area. */
.sb-within-s { display: none; }
@media (max-width: 40rem) { .sb-within-s { display: inline; } }
/* Home, for Investigators: what's waiting for review, a count and the two lists, at the top of This week. */
.nw-review-lines { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; margin: 0; }
.nw-review-lines b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }

/* ---------------------------------------------------------------- R120: app-shaped (step 3 of the navigation review) */
/* Kyle, 2026-10-23: "Build all three steps, one story at a time: 1 Tidy first, then 2 Re-cut, then 3 App-shaped." On a
   phone the five tabs are a bar at the bottom of the screen, where thumbs reach: an icon over each name, the one you're on
   in bold under the gold rule, clear of the phone's home indicator. The top is one slim row: the brand and your picture.
   The page keeps room under its footer so the bar never covers it (Terms and Privacy stay one tap away: ri Legal). */
:root { --bottom-bar: 3.7rem; }
@media (max-width: 40rem) {
    .site-header:not(.site-header-plain) .site-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 0; margin: 0;
        padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
        background: var(--surface); border-top: 1px solid var(--rule); box-shadow: 0 -2px 10px rgb(17 22 44 / 0.12);
    }
    .site-header:not(.site-header-plain) .site-nav a {
        flex: 1 1 0; flex-direction: column; justify-content: center; gap: 0.15rem; min-height: var(--bottom-bar);
        padding: 0.35rem 0.1rem 0.3rem; margin: 0; font-size: 0.74rem; color: var(--ink-soft); background: none;
        border-bottom: 0; border-top: 3px solid transparent;
    }
    .site-header:not(.site-header-plain) .site-nav a .icon { display: block; width: 1.45rem; height: 1.45rem; }
    .site-header:not(.site-header-plain) .site-nav a:hover { color: var(--ink); background: var(--paper); }
    .site-header:not(.site-header-plain) .site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; background: none; border-top-color: var(--gold-bright); }
    .site-header:not(.site-header-plain) .site-nav a:focus-visible { outline-color: var(--focus); }
    body:has(.site-header:not(.site-header-plain) .site-nav) { padding-bottom: calc(var(--bottom-bar) + env(safe-area-inset-bottom, 0px)); }
    /* What floats at the bottom sits above the bar. */
    body:has(.site-nav) .share-toast { bottom: calc(var(--bottom-bar) + 1rem + env(safe-area-inset-bottom, 0px)); }
    body:has(.site-nav) dialog.tour:not(.tour-pointing) { bottom: calc(var(--bottom-bar) + 1rem + env(safe-area-inset-bottom, 0px)); }
    /* While you type, the bar slides away (ri Stakeholder): many phone browsers lift a fixed bar above the keyboard, over
       the search's suggestions. Moved, never hidden, so it stays in the tab order and comes back with the next tap. */
    .site-header:not(.site-header-plain) .site-nav { transition: transform 0.15s ease-out; }
    body:has(:is(input:not([type=checkbox], [type=radio], [type=range], [type=button], [type=submit], [type=file], [type=color]), textarea):focus) .site-header:not(.site-header-plain) .site-nav {
        transform: translateY(calc(100% + 1rem));
    }
}
@media (prefers-reduced-motion: reduce) { .site-header:not(.site-header-plain) .site-nav { transition: none; } }
/* The tour pointing at a tab in the bottom bar opens above it, its arrow underneath (site.js adds .tour-above). */
dialog.tour.tour-above::before { top: auto; bottom: -10px; transform: rotate(180deg); }
/* One search in the top bar (SiteSearch): a pill beside the tabs on a computer; on a phone the top row's middle, between
   the mark and your picture. Its suggestions are R80's list, players then stores under their names. Under 56rem the tabs
   take a row of their own (on a phone, the bottom bar), so the search has the first row's room. */
.site-header:not(.site-header-plain) { grid-template-columns: auto 1fr auto auto; }
.site-header:not(.site-header-plain) .site-search { grid-row: 1; grid-column: 3; align-self: center; min-width: 0; margin: 0; }
.site-header:not(.site-header-plain) .user-menu { grid-column: 4; }
.site-search-box {
    flex: none; width: clamp(12rem, 20vw, 19rem); max-width: none; align-items: center; gap: 0.5rem; box-sizing: border-box;
    height: var(--topbar-pill); padding: 0 0.85rem; border-radius: 999px; color: #fff;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.24);
}
.site-search-box:focus-within { border-color: var(--gold-bright); background: rgba(255, 255, 255, 0.16); }
.site-search-box > .icon { width: 1.05rem; height: 1.05rem; flex: none; opacity: 0.85; }
.site-search-box > input { min-height: 0; height: 100%; padding: 0; border: 0; background: none; color: inherit; font-size: 0.92rem; box-shadow: none; }
.site-search-box > input:focus { outline: none; }
.site-search-box > input::placeholder { color: rgba(255, 255, 255, 0.72); opacity: 1; }
.site-search-box .suggest-list { left: auto; right: 0; width: min(26rem, calc(100vw - 1.5rem)); }
.suggest-group { padding: 0.55rem 0.85rem 0.15rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 56rem) {
    .site-header:not(.site-header-plain) { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 0.6rem; padding: 0 0.75rem; min-height: 0; }
    .site-header:not(.site-header-plain) .brand { grid-row: 1; grid-column: 1; padding: 0.55rem 0; }
    .site-header:not(.site-header-plain) .site-search { grid-row: 1; grid-column: 2; justify-self: stretch; }
    .site-header:not(.site-header-plain) .user-menu { grid-row: 1; grid-column: 3; }
    .site-header:not(.site-header-plain) .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; margin-left: 0; }
    .site-header:not(.site-header-plain) .site-nav a { flex: 1 1 0; justify-content: center; padding: 0.65rem 0.2rem; }
    .site-search-box { width: 100%; }
    .site-search-box .suggest-list { left: 0; right: auto; width: min(26rem, calc(100vw - 1.5rem)); }
}
@media (max-width: 40rem) {
    /* The mark alone, as before R119: the search needs the row. The wordmark stays for screen readers. */
    .site-header:not(.site-header-plain) .brand-name {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
    .site-search-box { height: 2.4rem; }
    .site-search-box .suggest-list { position: fixed; left: 0.75rem; right: 0.75rem; top: 3.2rem; width: auto; }
}
/* The search page: the box in the band, the players and the stores as tiles. */
.srch-head .sb-search { max-width: 36rem; }
/* On a phone R96's row keeps the home field to one line beside the middle figure; here the figure is only "N events", so
   the home field wraps instead of being cut (ri Stakeholder). */
@media (max-width: 47.99rem) {
    .srch-players .pr-home > a { white-space: normal; }
    .srch-players .pr-set { min-width: 0; }
}

/* R121: a player's Results tab. The set so far in the set's colours, then each event's matches in a tile as head to head's
   lines (R76) from this player's side, with the opponent on each. */
.rs-grid { margin-top: 1rem; }
.rs-sum-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.4rem; }
.rs-sum-facts { display: grid; gap: 0.25rem; min-width: 0; }
.rs-event { gap: 0.75rem; }
.rs-eh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "date who res"; gap: 0.2rem 0.8rem; align-items: start; }
.rs-eh .pr-date { grid-area: date; }
.rs-eh .rs-ewho { grid-area: who; }
.rs-eh .rs-eres { grid-area: res; }
.rs-event.is-special .pr-date { border-color: var(--gold); background: var(--gold-wash); }
.rs-ewho { min-width: 0; }
.rs-ename { display: inline; margin: 0 0.35rem 0 0; font: 700 1rem/1.3 var(--sans); overflow-wrap: anywhere; }
.rs-emeta { display: flex; flex-wrap: wrap; gap: 0 0.5rem; margin: 0.2rem 0 0; font-size: 0.86rem; color: var(--ink-soft); }
.rs-emeta > :not(:last-child)::after { content: "\00b7"; margin-left: 0.5rem; }
.rs-eres { display: grid; justify-items: end; text-align: right; gap: 0.1rem; }
.rs-eres b { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.1; white-space: nowrap; }
.rs-lines { margin: 0; }
/* In a tile the lines sit flush, between rules: no box inside the box. */
.rs-event .rs-lines { background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; overflow: visible; }
.rs-event .rs-lines > li > a.el, .rs-lines > li > .el.rs-plain { padding: 0.6rem 0.25rem; }
.rs-lines > li > .el.rs-plain { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 1.1rem; gap: 0.1rem 0.9rem; align-items: center; }
.rs-lines .el-sub:empty { display: none; }
.rs-rate { white-space: nowrap; }   /* the opponent's rating stays beside their name */
@media (max-width: 47.99rem) {
    .rs-event .rs-lines > li > a.el, .rs-lines > li > .el.rs-plain { padding: 0.6rem 0.1rem; gap: 0.1rem 0.6rem; }
    .rs-sum-row { gap: 0.3rem 1rem; }
}
