/* data.css */
/* Saved data: /data and the planner's "Pick from saved data…" dialog.
 * One card per car @ track (rate-memory.js). */

/* /data page chrome: the header is the shared .lmu-eyebrow / .lmu-head (lmu-section.css). The stats slot carries
 * "See your team's numbers" for a viewer with a team; Fuel analysis is a quiet link under the picker. */
.rm-team-link { font-size: 13px; color: var(--accent); }
.rm-fuel { margin: calc(-1 * var(--s2)) 0 var(--s3); font-size: var(--fs-small); }
.rm-fuel a { color: var(--text-3); }
.rm-fuel a:hover { color: var(--text-hi, var(--text)); }
/* The planner dialog's link row (rate-memory.js). */
.rm-links { margin: 0 0 var(--s3); font-size: var(--fs-small); }
.rm-links a { color: var(--accent); }

.rm-picks .rm-search input { min-height: 34px; min-width: 190px; box-sizing: border-box; }

.rm-list { display: grid; gap: var(--s5); }
.rm-group .rm-car { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2);
    font-size: var(--fs-lead, 15px); color: var(--text-hi, var(--text)); }
.rm-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }

.rm-card { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); min-width: 0;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.rm-card-head { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.rm-card-name { flex: 1; min-width: 0; }
.rm-card-title { margin: 0; font-size: var(--fs-body); font-weight: 700; color: var(--text-hi, var(--text));
    overflow-wrap: anywhere; }
.rm-card-sub { display: block; font-size: var(--fs-small); color: var(--text-3); overflow-wrap: anywhere; }
.rm-badges { display: inline-flex; align-items: center; gap: 6px; flex: none; }

.rm-trk { flex: none; width: 40px; height: 40px; fill: none; stroke: var(--accent);
    stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rm-flag { flex: none; width: 21px; height: 14px; border-radius: 2px; color: var(--text); vertical-align: middle; }

.rm-conds { display: grid; gap: var(--s3); }
.rm-conds.has-two { grid-template-columns: 1fr 1fr; }
.rm-cond { min-width: 0; }
.rm-cond h4 { margin: 0 0 6px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-3); }
.rm-cond-wet h4 { color: var(--info); }
.rm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px var(--s3); margin: 0; }
.rm-stat { min-width: 0; }
.rm-stat dt { font-size: var(--fs-micro); color: var(--text-3); }
.rm-stat dd { margin: 0; font-size: var(--fs-lead, 15px); font-weight: 700; color: var(--text-hi, var(--text));
    font-variant-numeric: tabular-nums; }
.rm-stat.is-big dd { font-size: 22px; }
.rm-x { color: var(--text-4); font-weight: 400; }
.rm-over { margin: 8px 0 0; font-size: var(--fs-small); color: var(--text-3); }

/* Wet conditions: one row per wetness band x tire (rate-memory.js bandTable). Scrolls in its box, never the page. */
.rm-band-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rm-band-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.rm-band-table th, .rm-band-table td { padding: 4px 6px; text-align: right; white-space: nowrap; vertical-align: top;
    border-top: 1px solid var(--line); }
.rm-band-table th:first-child, .rm-band-table td:nth-child(2) { padding-left: 0; text-align: left; }
.rm-band-table thead th { border-top: 0; font-size: var(--fs-micro); font-weight: 400; color: var(--text-3); }
.rm-band-table tbody th { font-weight: 700; color: var(--text-hi, var(--text)); }
.rm-band-table .rm-band-sub td { padding: 0 0 6px; border-top: 0; text-align: left; white-space: normal; }
.rm-band-sub .rcl-tag:first-child { margin-left: 0; }
.rm-cross { color: var(--info); }

/* Where an entry's numbers come from (rate-memory.js provenance): tags and the run list. */
.rcl-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--warn); border-radius: 999px;
    font-size: var(--fs-micro); line-height: 1.6; color: var(--warn); white-space: nowrap; }
.rcl-runs { margin-top: 4px; font-size: var(--fs-small); color: var(--text-3); }
.rcl-runs h5 { margin: 6px 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--text-2); }
.rcl-runs ul { list-style: none; margin: 4px 0 0; padding: 0; }
.rcl-runs li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 28px;
    border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rcl-runs li span { min-width: 0; overflow-wrap: anywhere; }
.rcl-runs li.rcl-off span { opacity: .6; }   /* left out by the cleanup: listed, not counted */
.rcl-runs .btn-link { flex: none; min-height: 28px; padding: 0 4px; font-size: var(--fs-small); }

/* Edit: a manual override on top of the measured numbers (rate-memory.js editForm). */
.rcl-tag-edit { border-color: var(--accent); color: var(--accent); }
.rcl-reset { margin-left: 6px; min-height: 24px; padding: 0 4px; font-size: var(--fs-small); }
.rcl-meas { display: block; font-size: var(--fs-micro); font-weight: 400; color: var(--text-3); white-space: nowrap; }
.rcl-edit { display: grid; gap: var(--s3); padding: var(--s3); border: 1px solid var(--line-2);
    border-radius: var(--radius); background: var(--surface-2, var(--bg-3)); }
.rcl-sets { display: grid; gap: var(--s3); }
.rcl-sets.has-two { grid-template-columns: 1fr 1fr; }
.rcl-set { min-width: 0; margin: 0; padding: 0; border: 0; }
.rcl-set legend { padding: 0; margin-bottom: 6px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-3); }
.rcl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rcl-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--fs-micro); color: var(--text-3); }
.rcl-field i { font-style: normal; color: var(--text-4); }
.rcl-field input { width: 100%; min-height: 32px; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.rcl-field input[aria-invalid] { border-color: var(--crit); }
.rcl-err { color: var(--crit); font-size: var(--fs-micro); }
.rcl-err:empty { display: none; }
.rcl-corners { margin-top: 8px; font-size: var(--fs-small); }
.rcl-corners summary { cursor: pointer; width: max-content; color: var(--text-2); margin-bottom: 6px; }
.rcl-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rcl-acts button { margin: 0; min-height: 32px; padding: 4px 14px; font-size: var(--fs-small); }

.rm-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: auto;
    padding-top: var(--s2); border-top: 1px solid var(--line); }
.rm-btns { display: flex; flex-wrap: wrap; gap: var(--s2); margin-left: auto; }
.rm-btns button, .rm-btns a { margin: 0; min-height: 32px; padding: 4px 12px; font-size: var(--fs-small); }

.rm-empty { padding: var(--s4); border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--text-2); }
.rm-empty p { margin: 0 0 var(--s2); }
.rm-empty a { color: var(--accent); }
.rm-flow { list-style: none; counter-reset: rf; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: var(--s3) 0; padding: 0; }
.rm-flow li { counter-increment: rf; position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.rm-flow li::before { content: counter(rf); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 13px; }
.rm-flow li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 22px; width: 8px; height: 8px; border: solid var(--accent); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.rm-flow b { color: var(--text-hi, var(--text)); }
.rm-flow span { font-size: .88rem; line-height: 1.4; color: var(--text-3); }
.rm-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.rm-empty .rm-acts .btn-primary { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; color: var(--ink); text-decoration: none; font-weight: 700; }
.rm-note { color: var(--text-3); font-size: .88rem; }
@media (max-width: 760px) { .rm-flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rm-flow li::after { display: none; } }

/* The planner dialog. */
.rm-dlg { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh / var(--z, 1) - 32px); }
.rm-dlg-body { padding: 0 var(--s3) var(--s3); overflow-y: auto; }

/* Open: everything stored behind one entry (rate-memory.js openEntry). Tables scroll in .rm-band-wrap, never the page. */
.rm-tank b { color: var(--text); }
.rmo-dlg { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh / var(--z, 1) - 32px); box-sizing: border-box; padding: 0;
    background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); }
.rmo-dlg::backdrop { background: rgba(0, 0, 0, .62); }
.rmo-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--s2);
    padding: var(--s2) var(--s3); background: var(--panel); border-bottom: 1px solid var(--line); }
.rmo-head h2 { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-body); overflow-wrap: anywhere; }
.rmo-head h2:focus { outline: none; }
.rmo-x { flex: none; min-width: 36px; min-height: 36px; margin: 0; padding: 0 8px; font-size: 20px; line-height: 1; }
.rmo-body { display: grid; gap: var(--s4); padding: var(--s3); min-width: 0; }
.rmo-period { display: grid; gap: var(--s3); min-width: 0; }
.rmo-period > h3, .rmo-period > summary { margin: 0; font-size: var(--fs-small); font-weight: 700; color: var(--text-2); }
.rmo-period > summary { cursor: pointer; width: max-content; max-width: 100%; }
details.rmo-period[open] > summary { margin-bottom: var(--s3); }
.rmo-sec { min-width: 0; display: grid; gap: 6px; }
.rmo-sec h4 { margin: 0; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.rmo-sec p { margin: 0; }
.rmo-table td:nth-child(2) { padding-left: 6px; }
.rmo-table td:first-child { padding-left: 0; text-align: left; }
.rmo-table .btn-link { min-height: 28px; padding: 0 4px; font-size: var(--fs-small); }
.rmo-pace { white-space: nowrap; }
.rmo-pace-good { color: var(--accent); }
.rmo-pace-warn { color: var(--warn); }
.rmo-pace-off { color: var(--text-3); }
/* Bands vs the LMU reference lap (pace-ref.js); the label in the cell carries the meaning, color repeats it. */
.rmo-pace-alien, .rmo-pace-competitive, .rmo-pace-good { color: var(--accent); }
.rmo-pace-tail { color: var(--warn); }
.rmo-pace-offline { color: var(--text-3); }
.rmo-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* By race and stint (rate-memory.js openRaces): folds whose summaries wrap at phone width. */
.rmo-race, .rmo-stint { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.rmo-race { padding: 6px var(--s2); }
.rmo-stint { margin: 6px 0 0; padding: 4px var(--s2); border-color: var(--line-2); }
.rmo-race > summary, .rmo-stint > summary { cursor: pointer; overflow-wrap: anywhere; font-size: var(--fs-small); }
.rmo-meta { color: var(--text-2); }
.rmo-stint .rm-band-wrap { margin-top: 6px; }

/* The one-line Rates offer carries the same chips. */
.rate-offer .rm-flag { margin-right: 6px; }

@media (max-width: 560px) {
    .rm-conds.has-two, .rcl-sets.has-two { grid-template-columns: 1fr; }
    .rm-picks .rm-search, .rm-picks .rm-search input { width: 100%; min-width: 0; }
    .rm-btns { margin-left: 0; }
}

/* Saved data card: tire wear per corner, four across. */
.rm-stat.rm-wear { grid-column: 1 / -1; }
.rm-corners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; font-variant-numeric: tabular-nums; }
.rm-corners small { display: block; font-size: var(--fs-micro); font-weight: 400; color: var(--text-3); }

/* ---- Redesign (#748): /data on the shared layer (v2.css 15 to 17, main.sl-page). Left rail: Record practice as the page's
 * one .card.hero and the Find card (#rmFind); each group a .strip over its cards (.card.lift, class color on the border);
 * conditions as boxes; the band table in the small table look. The planner dialog (no .sl-page) keeps the rules above. ---- */
.sl-page .prk-card { margin: 0; gap: 4px; }
.sl-page .prk-title { margin: 0 0 4px; font: 700 var(--fs-micro) var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); }
.sl-page .prk-how { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.sl-page .prk-status { font: 650 14px var(--sl-display); color: var(--text-2); }
.sl-page .prk-card.is-recording .prk-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); animation: sl-pulse-g 2s ease-out infinite; }
.sl-page .prk-last { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
.sl-page .prk-last li { display: flex; gap: 6px; align-items: baseline; }
.sl-page .prk-last li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; position: relative; top: -1px; }
.sl-page .prk-last li.prk-no::before { background: var(--crit); }   /* the line itself says "Not saved" */
.sl-page .prk-signin { align-self: flex-start; margin-top: 6px; }
.sl-page .prk-card details.explain { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .sl-page .prk-card.is-recording .prk-dot { animation: none; } }

.sl-page .rm-find .rm-q { width: 100%; height: 32px; margin: 0 0 8px; box-sizing: border-box; font-size: 12.5px; }
.sl-page .rm-find .seg { margin: 0 0 8px; align-self: flex-start; }
.sl-page .rm-find .rm-other { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 8px; font-size: 12px; color: var(--text-3); }
.sl-page .rm-find .rm-other b { color: var(--text-hi); }
.sl-page .rm-find .serlist button > span { min-width: 0; overflow-wrap: anywhere; }
.sl-page .rm-find .serlist small { flex: none; font-weight: 400; color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.sl-page .rm-find .rm-over { margin: 0; }
@media (max-width: 1499px) { .sl-page .rm-find .serlist { max-height: 260px; overflow-y: auto; } }   /* stacked above the cards: a long list scrolls in its card */

.sl-page .rm-list { gap: var(--sl-gap); }
.sl-page .rm-group .strip { align-items: center; margin-bottom: 8px; }
.sl-page .rm-group .strip h2.rm-car { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 20px/1.2 var(--sl-display); color: var(--text-hi); }
.sl-page .rm-grid { gap: var(--sl-gap); }
.sl-page .rm-card { gap: 8px; }
.sl-page .rm-card-title { font: 650 15px/1.15 var(--sl-display); }
.sl-page .rm-card-sub { font-size: 12px; }
.sl-page .rm-trk { width: 34px; height: 34px; stroke: var(--text-3); }
.sl-page .rm-conds, .sl-page .rm-conds.has-two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.sl-page .rm-cond { padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--bg-2); }
.sl-page .rm-cond h4 { margin: 0 0 4px; font: 700 10px var(--sl-display); letter-spacing: var(--caps); }
.sl-page .rm-cond-wet h4 { color: var(--info); }
.sl-page .rm-cond.rm-bands { grid-column: 1 / -1; padding: 0; border: 0; background: none; }
.sl-page .rm-stats { grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.sl-page .rm-stat dt { font-size: 10.5px; color: var(--text-3); }
.sl-page .rm-stat dd { font: 600 14px/1.2 var(--sl-display); color: var(--text-hi); }
.sl-page .rm-stat.is-big dd { font-size: 17px; }
.sl-page .rm-corners { font: 600 12px var(--sl-display); }
.sl-page .rm-over { margin: 6px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
.sl-page .rm-band-wrap { border: 1px solid var(--v2-line); border-radius: var(--r-lg); background: var(--v2-panel); }
.sl-page .rm-band-table { font-size: 12px; }
.sl-page .rm-band-table th, .sl-page .rm-band-table td { height: 28px; padding: 0 8px; border-top: 0; border-bottom: 1px solid var(--v2-line); vertical-align: middle; }
.sl-page .rm-band-table th:first-child, .sl-page .rm-band-table td:nth-child(2) { padding-left: 8px; }
.sl-page .rm-band-table thead th { background: var(--panel-2, var(--panel)); font: 700 10px var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); }
.sl-page .rm-band-table tbody tr:last-child > * { border-bottom: 0; }
.sl-page .rm-band-table .rm-band-sub td { height: auto; padding: 0 8px 6px; }
.sl-page .rm-card-foot { padding-top: 8px; border-top: 0; }
.sl-page .rm-btns { flex: 1; gap: 6px; margin-left: 0; }
.sl-page .rm-btns .rm-del { margin-left: auto; }
.sl-page .rm-btns .btn:disabled { opacity: .55; cursor: not-allowed; }
.sl-page .rm-empty.empty { padding: 14px; }
.sl-page .rm-empty.empty strong { color: var(--text-hi); font: 600 var(--fs-md) var(--sl-display); }
.sl-page .rm-empty .rm-acts { gap: 6px; }
.sl-page .rm-empty .rm-acts .btn { text-decoration: none; }
.sl-page .rm-empty .rm-acts .btn.primary { color: var(--ink, #060806); }

/* compare.css */
/* /compare (compare.js): track and condition, a tab per class, one table per class.
 * The table scrolls inside its box; the page never scrolls sideways. */
.cmp-page { min-width: 0; }
.cmp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: 0 0 var(--s3); }
.cmp-track { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: var(--text-3); min-width: 0; max-width: 100%; }
.cmp-track select { min-height: 34px; min-width: 0; max-width: min(100%, 360px); }
.cmp-cond { flex-wrap: wrap; border-radius: var(--v2-r-lg, 10px); max-width: 100%; }
.cmp-cond button { font-size: var(--fs-small); padding: 6px 12px; }
.cmp-classes { margin-bottom: var(--s3); }
.cmp-classes[hidden] { display: none; }
.cmp-n { color: var(--text-3); font-weight: 400; margin-left: 4px; }

.cmp-wrap { max-width: 100%; }
.cmp-table { font-variant-numeric: tabular-nums; min-width: 640px; }
.cmp-table th, .cmp-table td { white-space: nowrap; vertical-align: top; }
.cmp-table thead th { padding: 0; }
.cmp-sort { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 10px 12px; cursor: pointer;
    font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cmp-sort:hover, th[aria-sort] .cmp-sort { color: var(--text-hi, var(--text)); }
.cmp-sort:focus-visible { box-shadow: var(--v2-focus, 0 0 0 2px var(--accent)); }
/* Sortable headings in lb-table tables (/official, /bop): the button carries the padding. */
.lb-table thead th.cmp-th { padding: 0; }
.cmp-table tbody th { font-weight: 700; color: var(--text-hi, var(--text)); white-space: normal; min-width: 180px;
    text-transform: none; letter-spacing: normal; font-family: inherit; font-size: var(--fs-body); }
.cmp-car { display: block; }
.cmp-field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-width: 0; max-width: 100%; }
.cmp-field[hidden] { display: none; }
.cmp-lbl { font-size: var(--fs-small); color: var(--text-3); cursor: help; }
.cmp-you { margin: 0 0 var(--s3); font-size: var(--fs-small); font-weight: 650; color: var(--text-hi, var(--text)); }
.cmp-sample { display: block; margin-top: 2px; font-size: var(--fs-micro); font-weight: 400; color: var(--text-3); }
.cmp-v { font-size: var(--fs-body); font-weight: 650; color: var(--text-hi, var(--text)); }
.cmp-rank { margin-left: 8px; font-size: var(--fs-micro); color: var(--text-3); }
.cmp-table td.is-best { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); box-shadow: inset 3px 0 0 var(--accent); }
.cmp-table td.is-best .cmp-rank { color: var(--accent); font-weight: 700; }
.cmp-none { color: var(--text-4); }
.cmp-empty { margin: var(--s4) 0; padding: var(--s5) var(--s4); text-align: center; color: var(--text-3);
    border: 1px dashed var(--line); border-radius: var(--radius); }
.cmp-updated { margin: -8px 0 0; font-size: var(--fs-micro); color: var(--text-3); }
/* Phones: the car column stays put while the numbers scroll under it. */
@media (max-width: 640px) {
    .cmp-table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--v2-raise, var(--panel)); box-shadow: 1px 0 0 var(--v2-line-2, var(--line)); }
    .cmp-table tbody th { min-width: 132px; max-width: 150px; font-size: var(--fs-small); }
}

/* Pace group buttons: each % group in its own color (compare.js PACE_COLOR), fast purple to slow red. */
.cmp-group .cmp-pace { display: inline-flex; align-items: center; gap: 6px; }
.cmp-group .cmp-pace-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pg); flex: none; }
.cmp-group .cmp-pace[aria-pressed="true"] { background: color-mix(in srgb, var(--pg) 22%, transparent); border-color: var(--pg); box-shadow: inset 0 -2px 0 var(--pg); }
.cmp-group .cmp-pace:hover { border-color: var(--pg); }

/* Lap progression chart (compare.js paintChart): inline SVG, one line per car, fits the page width. */
.cmp-chart { margin: 0 0 var(--s4); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--v2-raise, var(--panel)); min-width: 0; }
.cmp-chart[hidden], .cmp-chart-head .seg-toggle[hidden] { display: none; }
.cmp-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.cmp-chart-title { margin: 0; font-size: var(--fs-body); }
.cmp-chart .cmp-empty { margin: var(--s2) 0; }
.cmp-plot { position: relative; min-width: 0; }
.cmp-svg { display: block; width: 100%; height: auto; overflow: hidden; touch-action: pan-y; }
.cmp-axis-y { margin: 0 0 4px; font-size: var(--fs-micro); color: var(--text-3); }
.cmp-grid { stroke: var(--line); stroke-width: 1; }
.cmp-tick, .cmp-axis { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.cmp-line path { fill: none; stroke: var(--lc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cmp-line circle { fill: var(--lc); }
.cmp-line.is-mine path { stroke-width: 3.5; }
.cmp-line.is-ref path { stroke-dasharray: 6 5; stroke-width: 2; opacity: .85; }
.cmp-line.is-hl path { stroke-width: 4; }
.cmp-line.is-dim { opacity: .18; }
.cmp-guide { stroke: var(--text-3); stroke-dasharray: 2 3; }
.cmp-mark { fill: var(--v2-raise, var(--panel)); stroke-width: 2.5; pointer-events: none; }
.cmp-tip { position: absolute; z-index: 2; max-width: 100%; padding: 4px 8px; border-radius: 6px; pointer-events: none;
    background: var(--text-hi, var(--text)); color: var(--v2-raise, var(--panel)); font-size: var(--fs-micro); font-weight: 650; white-space: nowrap; }
.cmp-tip[hidden] { display: none; }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: var(--s2); }
.cmp-key { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 6px;
    border-radius: 6px; font-size: var(--fs-small); color: var(--text-2, var(--text)); cursor: pointer; }
.cmp-key:hover, .cmp-key[aria-pressed="true"] { color: var(--text-hi, var(--text)); background: color-mix(in srgb, var(--lc) 18%, transparent); }
.cmp-key:focus-visible { box-shadow: var(--v2-focus, 0 0 0 2px var(--accent)); }
.cmp-key.is-note { cursor: default; color: var(--text-3); background: none; --lc: var(--text-3); }
.cmp-key-line { width: 18px; height: 0; border-top: 3px solid var(--lc); flex: none; }
.cmp-key-line.is-ref { border-top-style: dashed; border-top-width: 2px; }
.cmp-key-line.is-proj { border-top-style: dotted; border-top-width: 3px; }
.cmp-key-n { color: var(--text-3); font-size: var(--fs-micro); }
.cmp-line path.cmp-proj { stroke-dasharray: 1 6; stroke-width: 3; opacity: .8; }
.cmp-table tbody tr[data-car] { cursor: pointer; }
.cmp-table tbody tr.is-hl > * { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }
#cmpMetric { flex-wrap: nowrap; }
@media (max-width: 640px) {
    .cmp-tip { white-space: normal; }
    #cmpMetric button { padding: 6px 10px; }
    .cmp-legend { gap: 4px 8px; }
}

/* ---- Redesign (#748): /compare on the shared layer (v2.css 15 to 17, main.sl-page). The bar (folds under 760), the rail
 * (track list, How to read this), class tabs with the class pill, the table card (.c7, .tbl, Drivers and Laps on data-pri)
 * beside the chart card (.c5, the plot capped at 720px); the table takes the row when the chart is hidden. ---- */
.sl-page .cmp-controls .cmp-field { gap: 8px 18px; }
.sl-page .cmp-group .cmp-pace { display: inline-flex; align-items: center; gap: 5px; }
.sl-page .cmp-group .cmp-pace-dot { width: 7px; height: 7px; }
.sl-page .cmp-tracks .serlist button { overflow-wrap: anywhere; }
.sl-page .cmp-tracks .cmp-none { margin: 0; }
@media (max-width: 1499px) { .sl-page .cmp-tracks .serlist { max-height: 220px; overflow-y: auto; } }   /* stacked above the table: a long list scrolls in its card */
.sl-page .cmp-how summary { list-style: none; cursor: pointer; }
.sl-page .cmp-how summary::-webkit-details-marker { display: none; }
.sl-page .cmp-how summary .eyebrow { margin: 0; }
.sl-page .cmp-how summary .eyebrow::after { content: "\25BE"; color: var(--text-4); }
.sl-page .cmp-how:not([open]) summary .eyebrow::after { content: "\25B8"; }
.sl-page .cmp-how .sl-explain { margin-top: 8px; }

.sl-page .cmp-classes { display: flex; gap: 2px; margin: 0 0 var(--sl-gap); border-bottom: 1px solid var(--v2-line); overflow-x: auto; scrollbar-width: none; }
.sl-page .cmp-classes .subtab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 0; margin: 0 0 -1px; padding: 8px 14px 9px; border: 0;
    border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none; color: var(--text-3); font: 650 13px var(--sl-ui); }
.sl-page .cmp-classes .subtab:hover { color: var(--text-hi); }
.sl-page .cmp-classes .subtab[aria-selected="true"] { color: var(--text-hi); border-bottom-color: var(--accent); }

.sl-page .cmp-cols:has(> .cmp-chart[hidden]) > .cmp-tablecard { grid-column: span 12; }
.sl-page .cmp-tablecard .cmp-empty { margin: 0; }
.sl-page .cmp-table { min-width: 560px; }
.sl-page .cmp-table td { height: auto; padding-top: 7px; padding-bottom: 7px; vertical-align: top; }
.sl-page .cmp-table tbody th { position: static; height: auto; padding: 7px 12px; background: none; border-bottom: 1px solid var(--v2-line); color: var(--text-hi);
    font: 650 13px var(--sl-ui); letter-spacing: normal; text-transform: none; white-space: normal; min-width: 160px; }
.sl-page .cmp-table tbody tr:last-child th { border-bottom: 0; }
.sl-page .cmp-table .cmp-arrow { display: none; }   /* the .tbl head draws the sort arrow */
.sl-page .cmp-table .cmp-v { font-size: 13px; }
.sl-page .cmp-table .cmp-rank { margin-left: 6px; font: 700 10.5px var(--sl-display); color: var(--text-4); }
.sl-page .cmp-table td.is-best .cmp-v { color: var(--text-hi); }
.sl-page .cmp-table td.is-best .cmp-rank { color: var(--good); }
.sl-page .cmp-updated { margin: 6px 2px 0; }
@media (max-width: 640px) { .sl-page .cmp-table tr > :first-child { background: var(--panel); } }

.sl-page .cmp-chart { margin: 0; }
.sl-page .cmp-chart-head { align-items: flex-start; }
.sl-page .cmp-chart-title { margin: 0; }
.sl-page .cmp-plot, .sl-page .cmp-legend { max-width: 720px; }

/* leaderboards.css */
/* Leaderboards table rules shared with /official, /cars, /schedule (lb-table, lb-rank, lb-own, rbd-rate), then the /leaderboards page itself (.lb-boards, #325) on the LMU section components (lmu-section.css). */
.lb-table { min-width: 520px; }
.lb-table thead th { padding: 10px 12px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); text-align: left; }
.lb-table tbody th { min-width: 140px; }
.lb-rank { width: 3em; font-weight: 700; color: var(--text-3); }
.lb-table tr.is-you > * { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }
.lb-table tr.is-you > :first-child { box-shadow: inset 3px 0 0 var(--accent); color: var(--accent); }
.lb-own tr > * { border-top: 2px solid var(--border, rgba(127, 127, 127, .3)); }
.rbd-rate { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
@media (max-width: 560px) {
    .lb-table { min-width: 0; }
    .lb-table tbody th { min-width: 0; white-space: normal; }
    .lb-table th, .lb-table td { padding-left: 8px; padding-right: 8px; }
}

/* ---- /leaderboards (.lb-boards on <main>): rail, Driver cell, own row, You card, distributions. ---- */
.lb-boards .rm-links { margin: var(--s4, 16px) 2px 0; font-size: 12px; color: var(--text-3); }
.lb-boards .rm-links a { color: var(--accent); }
.lb-rail { display: flex; align-items: flex-start; justify-content: space-between; gap: 0 var(--s3, 12px); flex-wrap: wrap; }
.lb-rail > :empty { display: none; }
.lb-rail .lmu-subtabs { margin-bottom: var(--s3, 12px); }
.lb-rail .lmu-explain { margin: 6px 0 var(--s3, 12px) auto; }
.lb-rail .lmu-explain[open] { flex: 1 1 100%; margin-left: 0; }
.lb-rail .lmu-explain-body a { color: var(--accent); }
.lb-boards .ofl-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.lb-boards .ofl-lookup:empty { display: none; }
.lb-tbl tbody th { min-width: 220px; white-space: normal; padding-top: 6px; padding-bottom: 6px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.lb-tbl th .pos { width: 30px; flex: none; }
.lb-drv { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lb-name { min-width: 0; overflow-wrap: break-word; }
.lb-you { flex: none; font-size: 11px; font-weight: 700; color: var(--accent); }
.lb-boards .pp.lb-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 0 30px; max-width: 100%; }
.lb-boards .pp.lb-chips:empty, .lb-boards .pp.lb-chips:has(> .ofl-sl:empty:only-child) { display: none; }
.lb-boards .lb-chips .ofl-sl { margin-left: 0; }
.lb-world { font-size: 11px; font-weight: 500; color: var(--text-3); }
.lb-tbl .cmp-v { color: var(--text-hi); font-weight: 650; font-variant-numeric: tabular-nums; }
.lb-gap { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--text-3); }
.lb-tbl td.lb-date { color: var(--text-3); }
.lb-tbl .ofl-flag { margin-right: 4px; }
.lb-tbl tr.is-you > * { background: color-mix(in srgb, var(--accent) 13%, var(--panel)); }
.lb-tbl tr.is-you > th { box-shadow: inset 3px 0 0 var(--accent); }
.lb-tbl .lb-own tr > * { border-top: 2px solid var(--line-3); }
.lb-more { margin: 10px 0 0; }
.lb-me-card { margin: 0 0 var(--s3, 12px); padding: 12px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--lmu-r-ctl, 6px); background: var(--panel); font-size: 13px; }
.lb-me-card .rt-h { margin-top: 0; }
.lb-me-link { margin: 8px 0 0; font-size: 12px; }
.lb-me-row { display: grid; grid-template-columns: minmax(160px, 1.2fr) repeat(2, minmax(150px, 1fr)); gap: 12px 20px; }
.lb-me-row .k { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.lb-me-row b { display: flex; align-items: center; gap: 6px; color: var(--text-hi); }
.lb-me-row .sub { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.lb-me-card [data-rank-history]:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); min-width: 0; }
/* Distributions: a share label on every bar, the rank's total share under its name, a finding line, the viewer's bar outlined. */
.lb-dists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s4, 16px) var(--s5, 24px); }
.lb-dist { min-width: 0; margin: 0; padding: 14px 16px 12px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box, 10px); background: var(--panel); }
.lb-dist h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.lb-find { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--text-hi); }
.lb-find small { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.lb-plot { display: flex; align-items: flex-end; gap: 3px; height: 150px; margin-top: 34px; border-bottom: 1px solid var(--line-2); }
.lb-plot .b { position: relative; flex: 1 1 0; min-width: 0; height: var(--h); border-radius: 3px 3px 0 0; background: var(--rk, var(--text-3)); opacity: .9; }
.lb-plot .b > span { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); font-size: 10px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-plot .b.you { opacity: 1; outline: 2px solid var(--text-hi); outline-offset: 1px; }
.lb-plot .b.you > b { position: absolute; left: 50%; bottom: calc(100% + 16px); transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--text-hi); }
.lb-axis { display: flex; gap: 3px; margin-top: 4px; }
.lb-axis span { min-width: 0; padding-top: 4px; border-top: 2px solid var(--rk, var(--text-3)); font-size: 12px; font-weight: 650; color: var(--text-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-axis small { display: block; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lb-axis2 { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--text-3); }
@media (max-width: 720px) {
    /* Phones: the Driver cell is the sticky 150px left column (lmu-section.css pins it); the table scrolls in its box. */
    .lb-tbl tbody th, .lb-tbl thead th:first-child { width: 150px; min-width: 150px; max-width: 150px; }
    .lb-boards .pp.lb-chips { margin-left: 0; }
    .lb-me-row { grid-template-columns: 1fr; }
    .lb-plot .b > span { font-size: 8.5px; letter-spacing: -.02em; }
    .lb-axis span { font-size: 11px; }
}

/* ---- Teams view (#751): team cell, lineup rows, counted drivers. Columns past Pos, Team, Skill and Wins fold away on narrow screens. ---- */
.lb-team { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.lb-team:hover .n { text-decoration: underline; }
.lb-team .n { color: var(--text-hi); font-weight: 600; }
.lb-tl { --team: var(--accent); width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; object-fit: cover; background: linear-gradient(135deg, var(--team), color-mix(in srgb, var(--team) 55%, #000)); color: #fff; font-size: 9.5px; font-weight: 700; }
.lb-tag { padding: 0 6px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; line-height: 16px; color: var(--text-3); }
.lb-prov { display: inline-block; padding: 0 7px; border: 1px dashed var(--line-3); border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; color: var(--text-2); white-space: nowrap; }
.lb-grade { font-weight: 700; color: var(--text-hi); }
.lb-pos { width: 3em; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lb-from { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--text-2); }
.lb-from > span { white-space: nowrap; }
.lb-x { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px 0 5px; margin-left: 8px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--text-3); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; vertical-align: middle; }
.lb-x::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.lb-x[aria-expanded="true"]::before { transform: rotate(45deg) translateY(-2px); }
.lb-x:hover { color: var(--text-hi); border-color: var(--line-3); }
.lb-lurow > * { font-size: 12px; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.lb-lurow > th { padding-left: 24px; font-weight: 500; }
.lb-lu { --lu: var(--text-3); display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 650; line-height: 20px; color: var(--text-hi); background: color-mix(in srgb, var(--lu) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lu) 50%, transparent); white-space: nowrap; }
.lb-lu::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--lu); }
/* ---- Redesign (#748): main.sl-page, rails from v2.css 15 and 16; the Teams columns fold by data-pri. ---- */
.sl-page.lb-boards .sl-rail.lb-rail { display: grid; flex-wrap: nowrap; }
.sl-page.lb-boards .lb-rail .lmu-explain { margin: 0; }
.sl-page.lb-boards .lb-rail > div:empty { display: none; }
.sl-page.lb-boards .lb-wchips { white-space: normal; }
@media (min-width: 1500px) {
    .sl-page.lb-boards .lb-rail .lmu-subtabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .sl-page.lb-boards .lb-rail .lmu-subtabs [aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }
    #rbTable .lb-drv + .lb-chips { display: none; }   /* the other rating has its own column from here */
}
@media (min-width: 1800px) { #lbTable .lb-drv + .lb-chips { display: none; } }
.sl-page .lb-tm { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; }
.sl-page .lb-tm small { color: var(--text-3); font-size: 12px; }
.sl-page .lb-tdist .hbar i { background: var(--rk, var(--info)); }
.sl-page .lb-tdist .hbar b { color: var(--text-hi); }
#tbTable tr[data-cls] > :first-child { box-shadow: inset 3px 0 0 var(--cls, transparent); }
#tbTable tr.pick > * { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }
@media (max-width: 720px) { .lb-lurow > th { padding-left: 14px; } }

/* official.css */
/* official.css — shared by /official and /schedule (the LMU races section): page tokens, the sub-nav tabs and the schedule cards (official-schedule.js). */
.ofl-stats { margin: -8px 0 12px; min-height: 1.4em; font-size: var(--fs-small); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ofl-page { --ofl-r: var(--v2-r-lg, 10px); --ofl-line: var(--line-2, rgba(127, 127, 127, .25)); }
.ofl-page .page-lede { margin: 0 0 var(--s3, 12px); font-size: var(--fs-small); color: var(--text-3); }
.ofl-grid + .cmp-updated { margin-top: var(--s3, 12px); }
/* Schedule: one section per tier, a card per series (hero image, facts, start chips, the picked start's actions). */
.ofl-tier { margin: var(--s5, 24px) 0 var(--s3, 12px); font-size: var(--v2-fs-lg, 20px); }
.ofl-tier small { margin-left: 8px; font-size: var(--fs-small); font-weight: 500; color: var(--text-3); }
.ofl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: var(--s4, 16px); }
.ofl-card { min-width: 0; border: 1px solid var(--line-2, rgba(127, 127, 127, .25)); border-radius: var(--v2-r-lg, 10px); overflow: hidden; background: var(--v2-panel, var(--bg-2, transparent)); }
.ofl-hero { position: relative; aspect-ratio: 16 / 6; overflow: hidden; background-color: var(--v2-inset, #111);
    background-image: radial-gradient(circle at 0% 0%, rgba(148, 163, 184, .34), transparent 55%),
        linear-gradient(180deg, color-mix(in srgb, var(--accent, #94a3b8) 10%, var(--v2-inset, #111)), var(--v2-inset, #111));
    background-size: cover; background-position: center; background-repeat: no-repeat; }
/* The wash above is always underneath; lazy-bg.js preloads the artwork, then sets --art and is-art, so the picture fades in over it (#691). */
.ofl-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none; background: var(--art, none) center / cover no-repeat; }
.ofl-hero.is-art::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .ofl-hero::after { transition: opacity .25s ease; } }
.ofl-hero h3 { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; margin: 0; padding: 28px 14px 10px; font-size: 18px; color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .78)); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.ofl-cb { padding: 12px 14px 14px; }
.ofl-facts { margin: 0; font-size: var(--fs-small); color: var(--text-2, var(--text)); }
.ofl-facts + .ofl-facts { margin-top: 3px; color: var(--text-3); }
.ofl-slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.ofl-slot { display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 74px; padding: 5px 9px; border: 1px solid var(--line-2, rgba(127, 127, 127, .3));
    border-radius: var(--v2-r-md, 6px); background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.ofl-slot b { font-size: var(--fs-small); font-weight: 650; white-space: nowrap; }
.ofl-slot span { font-size: var(--fs-micro); color: var(--text-3); white-space: nowrap; }
.ofl-slot[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ofl-slot.is-set b::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.ofl-slot.is-est { border-style: dashed; }
.ofl-slot.is-proj { border-style: dotted; color: var(--text-3); }
.ofl-card.is-proj .ofl-hero { opacity: .6; }
.ofl-weeks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 var(--s3, 12px); }
.ofl-weeks small { margin-left: 4px; font-size: var(--fs-micro); font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.ofl-more-times { margin-top: 6px; }
.ofl-more-times b { color: var(--accent); }
/* The start and day radio groups (radio-group.js): one Tab stop each; the focused chip shows the ring. */
.ofl-slot:focus-visible, .ofl-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A card with no artwork: a flat title panel instead of an empty image box. */
.ofl-hero.is-flat { aspect-ratio: auto; background: var(--v2-inset, rgba(127, 127, 127, .12)); }
.ofl-hero.is-flat h3 { position: static; padding: 12px 14px; background: none; text-shadow: none; color: var(--text-hi, var(--text)); }
.ofl-days { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; scrollbar-width: thin; }
.ofl-day { flex: none; display: inline-flex; flex-direction: column; align-items: center; padding: 4px 9px; border: 0; border-bottom: 2px solid transparent;
    background: transparent; color: var(--text-2, var(--text)); font: inherit; font-size: var(--fs-small); font-weight: 600; cursor: pointer; white-space: nowrap; }
.ofl-day small { font-size: 10px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.ofl-day[aria-checked="true"] { border-bottom-color: var(--accent); color: var(--text-hi, var(--text)); }
.ofl-rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 2px 12px; margin: 10px 0 0; padding: 0; list-style: none; font-size: var(--fs-micro); }
.ofl-rounds li { display: flex; flex-wrap: wrap; gap: 0 5px; padding: 3px 6px; border-radius: var(--v2-r-sm, 3px); color: var(--text-3); }
.ofl-rounds li b { color: var(--text-2, var(--text)); }
.ofl-rounds li span { flex-basis: 100%; }
.ofl-rounds li.is-cur { background: var(--v2-overlay, rgba(127, 127, 127, .15)); box-shadow: inset 2px 0 0 var(--accent); color: var(--text-hi, var(--text)); }
.ofl-sub { margin: 12px 0 0; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ofl-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2, rgba(127, 127, 127, .25)); }
.ofl-act p { flex: 1 1 100%; margin: 0; font-size: var(--fs-small); color: var(--text-2, var(--text)); }
.ofl-act select { min-height: 34px; flex: 1 1 100%; min-width: 0; max-width: 100%; }
.ofl-btns { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
.ofl-btns .v2-btn { flex: 1 1 0; }
/* With the worth chip the row stays one line at any font: the button keeps its label, the chip text ellipsizes (its title has it all). */
.ofl-btns .worth ~ .v2-btn { flex: 0 0 auto; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.ofl-btns .worth { flex: 0 1 auto; min-width: 0; }
.ofl-act .is-on { border-color: var(--accent); color: var(--accent); }
/* LMU races sub-nav, the same strip on /schedule (links) and /official (view buttons plus links). */
.ofl-tabs { display: flex; gap: 2px; margin: 0 0 var(--s4, 16px); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--ofl-line); }
.ofl-tabs::-webkit-scrollbar { display: none; }
.ofl-tabs button, .ofl-tabs a { flex: none; min-height: 0; padding: 9px 14px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; background: none; box-shadow: none;
    color: var(--text-3); font: inherit; font-size: var(--fs-small); font-weight: 650; white-space: nowrap; cursor: pointer; text-decoration: none; }
.ofl-tabs button:hover, .ofl-tabs a:hover { color: var(--text-hi, var(--text)); }
.ofl-tabs button[aria-pressed="true"], .ofl-tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text-hi, var(--text)); }
.ofl-signin { flex: 1 1 100%; margin: 0 0 var(--s3, 12px); font-size: var(--fs-small); color: var(--text-2, var(--text)); }
/* Past weekly results cards: the class table scrolls inside the card (the wide-screen sticky-header rule would let it spill), link buttons look like the schedule's buttons. */
.ofl-page .ofl-wcard .table-wrap.cmp-wrap { overflow-x: auto; }
.ofl-wcard .ofl-btns { margin: 0; }
.ofl-wcard .ofl-btns a, .ofl-btns a.v2-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ofl-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.ofl-lookup:empty { display: none; }

/* LMU rank "worth chip" on the action row (rank-worth.js chipString). */
.worth { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border: 1px solid var(--line-3, var(--line-2)); border-radius: 999px; background: var(--bg-2); font-size: var(--fs-small); font-weight: 650; color: var(--text-2, var(--text)); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.worth .k { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
a.worth { text-decoration: none; color: var(--text); } a.worth:hover { border-color: var(--accent); }
/* Two meanings only, gain and loss; the same split as the panel's position strip. */
.worth .mini { display: inline-flex; flex: none; width: 44px; height: 6px; gap: 1px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.worth .mini i { display: block; height: 100%; } .worth .mini .g { background: var(--rw-gain, #2f9a57); } .worth .mini .l { background: var(--rw-loss, #b5434f); }
.worth .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.worth .rank { --rk: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.worth .rank::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rk); }
.worth .rank[data-rank="Bronze"] { --rk: var(--rank-bronze, #cd8a4e); } .worth .rank[data-rank="Silver"] { --rk: var(--rank-silver, #c3cbd6); }
.worth .rank[data-rank="Gold"] { --rk: var(--rank-gold, #e6b93d); } .worth .rank[data-rank="Platinum"] { --rk: var(--rank-platinum, #7fd4e6); }
.worth .rank small { color: var(--text-3); font-weight: 600; }
/* The driver's form (#705): a triangle at the chip's end, never text, so ellipsizing never cuts it; amber border when SR is at risk. */
.worth .fm { flex: none; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--rw-gain, #2f9a57); }
.worth .fm.dn { border-bottom: 0; border-top: 6px solid var(--rw-loss, #b5434f); }
.worth.has-form.is-sr { border-color: color-mix(in srgb, var(--warn, #d99a2b) 55%, var(--line-3, var(--line-2))); }
/* On a phone width action row the chip drops "clean" (its title keeps it). */
.ofl-btns { container-type: inline-size; }
@container (max-width: 360px) { .worth .cl { display: none; } }
/* The form line under the buttons: full width, wraps, never truncates; the rail's color is repeated by its words. */
.ofl-act .ofl-form { flex: 1 0 100%; width: 100%; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-2, var(--text)); }
.ofl-form::before { content: ""; flex: none; width: 3px; align-self: stretch; border-radius: 2px; background: var(--good, #2f9a57); }
.ofl-form.is-sr::before { background: var(--warn, #d99a2b); }
.ofl-form b { color: var(--text-hi, var(--text)); font-weight: 650; }
.ofl-form small { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-micro, 11px); }
@media (prefers-reduced-motion: no-preference) { .worth .mini i { transition: flex-basis .2s ease; } }
@media (forced-colors: active) { .worth .mini i, .ofl-form::before { border: 1px solid CanvasText; } }
/* Coming up (#721): LMU's special events without exact times, one list row each (name and classes | week and days | tags and Remind). */
.ofl-up { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ofl-up li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 14px;
    border: 1px solid var(--line-2, rgba(127, 127, 127, .25)); border-radius: var(--v2-r-lg, 10px); background: var(--v2-panel, var(--bg-2, transparent)); }
.ofl-up .nm { min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.2; color: var(--text-hi, var(--text)); }
.ofl-up .nm small { display: block; margin-top: 2px; font-size: var(--fs-small); font-weight: 500; line-height: 1.3; color: var(--text-3); }
.ofl-up .cls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ofl-up .cls span { padding: 1px 6px; border: 1px solid var(--line-2, rgba(127, 127, 127, .25)); border-radius: 4px; font-size: var(--fs-micro); font-weight: 650; color: var(--text-3); }
.ofl-up .wk { min-width: 0; font-size: var(--fs-small); color: var(--text-2, var(--text)); }
.ofl-up .wk b { font-weight: 650; color: var(--text-hi, var(--text)); }
.ofl-up .wk small { display: block; font-size: var(--fs-micro); color: var(--text-3); }
.ofl-up .ac { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.ofl-up .src { grid-column: 1 / -1; margin: 0; font-size: var(--fs-micro); color: var(--text-4, var(--text-3)); }
.ofl-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1;
    letter-spacing: .06em; text-transform: uppercase; background: var(--surface-3, rgba(127, 127, 127, .18)); color: var(--text-2, var(--text)); }
.ofl-tag.is-tba { background: var(--surface-2, transparent); color: var(--text-3); border: 1px dashed var(--line-3, var(--line-2)); }
.ofl-tag.is-team { background: var(--accent-deep, rgba(148, 163, 184, .2)); color: var(--accent-soft, var(--accent)); }
.ofl-tag.is-out { background: color-mix(in srgb, var(--good, #3fb950) 16%, transparent); color: var(--good, #3fb950); }
@media (max-width: 720px) { .ofl-up li { grid-template-columns: 1fr; } .ofl-up .ac { justify-content: flex-start; } }
@media (forced-colors: active) { .ofl-tag { border: 1px solid CanvasText; } }

/* official-views.css */
/* official-views.css: the look of the /official Results page (laps table, driver rows, histogram, sector colors; the picker
 * and filter bar come from lmu-section.css), the LMU Ratings pieces on /leaderboards (rank chips, progress bars, flags, the
 * Countries table), the Cars page pieces (ladder, class dots, lap distributions) and their light-theme colors. */
.ofl-exp { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--accent); border-radius: 999px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
/* Official ranks: RaceOS rank chips (colored by rank name), the driver-rank progress bar, flags. */
.ofl-rk { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-small); font-weight: 650; white-space: nowrap; }
.ofl-rk::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rk, var(--text-3)); flex: none; }
[data-rk="Bronze"] { --rk: #b4773f; } [data-rk="Silver"] { --rk: #a9b3bd; } [data-rk="Gold"] { --rk: #d9a92a; }
[data-rk="Platinum"] { --rk: #4fb8b0; }
.ofl-bar { display: block; width: 88px; max-width: 100%; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--line-2, rgba(127, 127, 127, .25)); overflow: hidden; }
.ofl-bar > i { display: block; height: 100%; background: var(--rk, var(--accent)); }
.ofl-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.ofl-chips .ofl-rk { font-size: var(--fs-micro); font-weight: 600; color: var(--text-2, var(--text)); }
.ofl-flag { width: 20px; height: 15px; border-radius: 2px; vertical-align: middle; object-fit: cover; }
.ofl-cc { display: inline-block; min-width: 20px; font-size: var(--fs-micro); font-weight: 700; color: var(--text-3); vertical-align: middle; }
.ofl-more { display: block; margin: 0 auto var(--s4, 16px); }
.ofl-ranks-table { min-width: 560px; }
.ofl-sl:empty { display: none; }
.ofl-sl { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
/* Countries view, and the shared distribution chart (account Ratings card, Results histogram, Cars lap distributions). */
.ofl-ranks-table td, .ofl-ranks-table th { vertical-align: middle; }
.ofl-cc-btn { min-height: 0; border-radius: 0; box-shadow: none; }
.ofl-ranks-table .ofl-cc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.ofl-cc-btn:hover span, .ofl-cc-btn:focus-visible span { color: var(--accent); text-decoration: underline; }
.ofl-top { display: none; }
.ofl-dist { margin: 0; padding: 14px 16px 12px; border: 1px solid var(--line-2, rgba(127, 127, 127, .25)); border-radius: var(--v2-r-lg, 10px); background: var(--v2-panel, var(--bg-2, transparent)); }
.ofl-dist-h { margin: 0 0 4px; font-size: var(--fs-small); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2, var(--text)); }
.rt-plot { position: relative; height: 120px; margin-top: 22px; border-bottom: 1px solid var(--line, rgba(127, 127, 127, .3)); }
.rt-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.rt-bar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.rt-bar i { display: block; width: 100%; background: var(--rk, var(--text-3)); border-radius: 3px 3px 0 0; }
.rt-you { position: absolute; top: -20px; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); }
.rt-you b { position: absolute; top: 0; left: 5px; font-size: 0.75rem; color: var(--text); white-space: nowrap; }
.rt-you.rt-you-l b { left: auto; right: 5px; }
.rt-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: var(--text-3); margin-top: 4px; }
/* Best laps: filters, sort, histogram, sector colors, the driver's lap list; columns hidden on phones (ofl-m). */
.ofl-lf { margin-top: var(--s2, 8px); }
.ofl-lflag:empty { display: none; }
.ofl-sort { margin: 0 0 var(--s3, 12px); }
.ofl-histo { margin: 0 0 var(--s3, 12px); }
.ofl-histo > summary { cursor: pointer; width: max-content; font-size: var(--fs-small); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2, var(--text)); }
.ofl-hist { margin-top: var(--s2, 8px); }
.ofl-hist .rt-bar i { background: var(--accent); opacity: .75; }
.ofl-hm { position: absolute; top: -18px; bottom: 0; width: 0; border-left: 1px dashed var(--text-3); }
.ofl-hm b { position: absolute; top: 0; left: 3px; font-size: 0.6875rem; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.ofl-laps-table td, .ofl-laps-table th { vertical-align: middle; }
.ofl-laps-table .ofl-lrow:hover > *, .ofl-laps-table .ofl-lrow.is-open > * { background: var(--v2-overlay, rgba(127, 127, 127, .1)); }
/* The Laps toggle after a driver name on the lap board (#687): the name opens the profile, this opens the laps. */
.ofl-laps { display: inline-flex; align-items: center; gap: 4px; height: 22px; min-height: 0; margin-left: 10px; padding: 0 7px; border: 1px solid transparent; border-radius: 999px; box-shadow: none; background: none; color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; cursor: pointer; }
.ofl-laps::after { content: "\25BE"; }
.ofl-laps[aria-expanded="true"]::after { content: "\25B4"; }
.ofl-laps:hover, .ofl-laps:focus-visible { color: var(--text-hi); border-color: var(--line-3); background: var(--v2-hover); }
.ofl-dflag { width: 18px; height: 13px; margin-right: 5px; }
#oflBody [hidden] { display: none !important; }
.ofl-sub { display: none; margin-top: 2px; font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-3); }
.ofl-sp { color: var(--ofl-sp, #b06cff); font-weight: 700; }
.ofl-sg { color: var(--ofl-sg, #2fbf71); font-weight: 600; }
.ofl-xrow > td { padding: 0 !important; background: var(--v2-inset, rgba(127, 127, 127, .06)); }
.ofl-x { padding: 10px 12px 12px; white-space: normal; }
.ofl-xsum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: var(--fs-small); font-weight: 650; }
.ofl-xsum small { margin-right: 5px; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.ofl-xwhere { margin-left: auto; font-weight: 500; color: var(--text-3); }
/* Width 0 + min-width 100%: the lap list scrolls inside the row instead of widening the board. */
.ofl-xwrap { width: 0; min-width: 100%; margin-top: 8px; overflow-x: auto; }
.ofl-x .ofl-xtable { width: auto; min-width: 0; font-size: var(--fs-small); }
.ofl-x .ofl-xtable thead th, .ofl-x .ofl-xtable td { padding: 4px 12px; text-align: right; vertical-align: middle; }
.ofl-x .ofl-xtable thead th { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.ofl-xtable tr.is-best td { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }
.ofl-xtable tr.is-stint td { border-top: 2px solid var(--accent); }
.ofl-xnote { margin: 8px 0 0; font-size: var(--fs-micro); color: var(--text-3); }
/* The lap time chart (lap-chart.js) in a driver's laps */
.ofl-xview { margin-left: auto; }
.ofl-xview + .ofl-xwhere { margin-left: 0; }
.ofl-xchart { max-width: 760px; }
.lc-fig { margin: 0; }
.lc-svg { display: block; width: 100%; min-width: 320px; height: auto; font-size: 11px; }
.lc-grid { stroke: var(--border, rgba(127, 127, 127, .25)); stroke-width: 1; }
.lc-ylbl, .lc-xlbl { fill: var(--text-3); font-variant-numeric: tabular-nums; }
.lc-stint { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.lc-s polyline { fill: none; stroke: var(--lc); stroke-width: 1.5; opacity: .55; }
.lc-s.is-main polyline { stroke-width: 2; opacity: .9; }
.lc-s circle { fill: var(--lc); }
.lc-s circle.is-best { stroke: var(--text-1, #fff); stroke-width: 1.5; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: var(--fs-micro); color: var(--text-2, inherit); }
.lc-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; background: var(--lc); vertical-align: -1px; }
@media (max-width: 768px) {
    .ofl-page .ofl-m { display: none; }
    .ofl-laps-table, .ofl-cars-table { min-width: 0; }
    .ofl-sub { display: block; }
    .ofl-laps-table th, .ofl-laps-table td, .ofl-cars-table th, .ofl-cars-table td { padding-left: 8px; padding-right: 8px; }
    .ofl-laps-table tbody th { min-width: 0; white-space: normal; }
    .ofl-xwhere { margin-left: 0; flex-basis: 100%; }
    .ofl-sort { display: flex; width: 100%; }
    .ofl-sort button { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; }
    .ofl-hm b { font-size: 0.625rem; }
}
@media (max-width: 560px) {
    .ofl-ranks-table { min-width: 0; }
    .ofl-top { display: block; }
    .ofl-bar { width: 64px; }
}
/* ---- Shared look: class dots, calmer tables. ---- */
[data-rk="Field"] { --rk: #7c8591; }
[data-cls="Hyper"], [data-cls="Hypercar"] { --cls: #e5484d; } [data-cls="LMP2"] { --cls: #3e8ef7; } [data-cls="LMP3"] { --cls: #a66cff; }
[data-cls="GT3"] { --cls: #f2a33a; } [data-cls="GTE"] { --cls: #e05fa8; }
/* A car name with its class dot. */
.ofl-car { display: inline-flex; align-items: center; gap: 7px; }
.ofl-car::before { content: ""; display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cls, var(--text-3)); }
/* Tables: room to breathe, aligned numbers, a light zebra, the header kept in view on wide screens. */
.ofl-page .cmp-table { font-variant-numeric: tabular-nums; }
.ofl-page .cmp-table tbody tr:not(.ofl-xrow):nth-child(even) > * { background: rgba(127, 127, 127, .045); }
.ofl-page .cmp-table tbody td, .ofl-page .cmp-table tbody th { padding-top: 10px; padding-bottom: 10px; }
.ofl-page .cmp-table thead th { font-size: var(--fs-micro); letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.ofl-page .table-wrap { border-radius: var(--ofl-r); border-color: var(--ofl-line); }
@media (min-width: 1200px) {
    .ofl-page .table-wrap:has(> .ofl-laps-table, > .ofl-ranks-table, > .ofl-ana-table) { overflow: visible; }
    .ofl-page .table-wrap:has(> .ofl-laps-table, > .ofl-ranks-table, > .ofl-ana-table) thead th { position: sticky; top: 0; z-index: 2; background: var(--v2-panel, var(--panel)); }
}
.ofl-num { text-align: right; white-space: nowrap; }
.ofl-num small { color: var(--text-3); }
.ofl-dim { color: var(--text-3); font-size: var(--fs-micro); }
.ofl-sub2 { display: block; margin-top: 3px; font-size: var(--fs-micro); font-weight: 500; color: var(--text-3); white-space: normal; }
/* DR / SR chips: "Silver 1 · 60%", a thin progress bar, "top 12%". */
.ofl-rkw { display: inline-flex; flex-direction: column; gap: 4px; min-width: 0; vertical-align: middle; }
.ofl-rk small { margin-right: 4px; font-size: .85em; font-weight: 700; letter-spacing: .04em; color: var(--text-3); }
.ofl-rk em { margin-left: 6px; font-style: normal; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ofl-rkw .ofl-bar { width: 96px; margin-top: 0; height: 3px; }
.ofl-rkw .ofl-bar > i { background: var(--rk, var(--accent)); }
.ofl-top-pct { font-size: var(--fs-micro); font-weight: 600; color: var(--text-3); white-space: nowrap; }
.ofl-chips { gap: 6px 16px; margin-top: 6px; }
.ofl-chips .ofl-rkw { gap: 3px; }
.ofl-chips .ofl-rkw .ofl-bar { width: 72px; }
.ofl-chips .ofl-top-pct { display: none; }
.ofl-ranks-table td .ofl-rkw { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.ofl-ranks-table td .ofl-rkw .ofl-rk { flex-basis: 100%; }
/* A track with a fill (the lap-time tier cards need bar). */
.ofl-track { position: relative; display: block; flex: 1 1 auto; min-width: 40px; max-width: 160px; height: 8px; border-radius: 4px; background: rgba(127, 127, 127, .16); overflow: hidden; }
.ofl-track > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.ofl-page .cmp-table tbody th { background: transparent; }
.ofl-ana-table tr.is-win > th, .ofl-ana-table tr.is-win > td:first-child { box-shadow: none; }
.ofl-ana-table tr.is-win > td:first-child { border-left: 3px solid var(--ofl-gold, #e2b33c); }
.ofl-ana-table { min-width: 0; }
.ofl-ana-table tbody th { min-width: 150px; }
/* Lap-time tiers: a card per track with its artwork and a colored ladder of bands. */
.ofl-hero-sm { aspect-ratio: 16 / 5; }
.ofl-tcard.is-thin .ofl-hero { filter: grayscale(.6) brightness(.8); }
.ofl-ladder { display: grid; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.ofl-ladder li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-left: 4px solid var(--rk); border-radius: var(--v2-r-md, 6px);
    background: color-mix(in srgb, var(--rk) 13%, transparent); font-size: var(--fs-small); }
.ofl-ladder li:nth-child(1) { margin-right: 0; } .ofl-ladder li:nth-child(2) { margin-right: 4%; } .ofl-ladder li:nth-child(3) { margin-right: 8%; }
.ofl-ladder li:nth-child(4) { margin-right: 12%; } .ofl-ladder li:nth-child(5) { margin-right: 16%; } .ofl-ladder li:nth-child(6) { margin-right: 20%; }
.ofl-rung { min-width: 66px; font-weight: 700; color: var(--rk); }
.ofl-ladder b { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ofl-ladder li.is-you { box-shadow: inset 0 0 0 1px var(--accent); }
.ofl-youtag { padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--bg, #000); font-size: var(--fs-micro); font-weight: 700; }
.ofl-you { margin: 10px 0 0; font-size: var(--fs-small); color: var(--text-2, var(--text)); }
.ofl-need { margin-top: 12px; }
.ofl-need p { margin: 0 0 6px; font-size: var(--fs-small); color: var(--text-3); }
.ofl-need .ofl-track { max-width: none; }
.ofl-need .ofl-track > i { background: var(--text-3); }
/* The histogram note clears the plot. */
.ofl-histo .cmp-updated { margin-top: 10px; }
/* Lap-time distribution: a small histogram per car on one shared axis, bars in the class color; the median tick solid. */
.ofl-ldists { display: grid; gap: 8px; margin: 0 0 var(--s3, 12px); }
.ofl-ldist { padding: 10px 14px 8px; }
.ofl-ldist .ofl-dist-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-transform: none; letter-spacing: 0; }
.ofl-ldist .rt-plot { height: 56px; margin-top: 6px; }
.ofl-ldist .rt-bar i { background: var(--cls, var(--accent)); opacity: .8; }
.ofl-ldist .ofl-hm { top: -4px; }
.ofl-ldist .ofl-qm { border-left: 2px solid var(--text); }
/* Light theme: the fixed purple/green/gold/rank colors are too pale on a bright page, so darker values. */
[data-theme="daylight"] { --ofl-sp: #7a2fd0; --ofl-sg: #137a40; --ofl-gold: #c9961a; --ofl-gold-t: #8a6100; --ofl-pod: #a8691f; }
[data-theme="daylight"] [data-rk="Bronze"] { --rk: #98602a; } [data-theme="daylight"] [data-rk="Silver"] { --rk: #6b7885; }
[data-theme="daylight"] [data-rk="Gold"] { --rk: #a87a00; } [data-theme="daylight"] [data-rk="Platinum"] { --rk: #1f8a82; }
[data-theme="daylight"] [data-rk="Field"] { --rk: #5b6572; }
[data-theme="daylight"] [data-cls="GT3"] { --cls: #c97a10; } [data-theme="daylight"] [data-cls="LMP3"] { --cls: #7f45d6; }
.ofl-tsel select { min-width: 160px; }
@media (max-width: 768px) {
    .ofl-sort { width: auto; }
    .ofl-ana-table tbody th { min-width: 0; }
    .ofl-car { display: inline; }
    .ofl-car::before { margin-right: 6px; vertical-align: 1px; }
    .ofl-ladder li { margin-right: 0 !important; }
    .ofl-chips .ofl-rkw .ofl-bar { width: 56px; }
}
/* Results page (.lmu-page): the strip's facts sit straight in its flex row, the series list's empty note spans the grid, the
 * distribution details takes the explainer look, and the old .cmp-table rules do not fight .lmu-table. */
.lmu-strip #oflStripS { display: contents; }
.lmu-serlist .cmp-empty { grid-column: 1 / -1; margin: 0; }
.lmu-page .ofl-histo { margin: 0 0 var(--s3, 12px); }
.lmu-page .ofl-histo > summary { width: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.lmu-page .lmu-table .cmp-table { min-width: 0; margin: 0; }
.lmu-page .lmu-table .ofl-laps-table .ofl-lrow:hover > *, .lmu-page .lmu-table .ofl-laps-table .ofl-lrow.is-open > * { background: var(--v2-overlay, rgba(127, 127, 127, .1)); }
.lmu-page .ofl-more { margin-top: var(--s3, 12px); }
/* Results redesign (#744): only official.html has .res-pick, .res-main and #oflTable, so /cars and /car look as before. */
.res-pick .lmu-ser { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.res-pick .lmu-ser > b, .res-pick .lmu-ser > span:last-child { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-pick .lmu-ser > .cp { grid-column: 2; grid-row: 1 / span 2; }
.res-pick .lmu-ser.on { box-shadow: inset 3px 0 0 var(--accent); }
@media (min-width: 1500px) {
    .sl-rail .res-pick { margin: 0; }
    .sl-rail .res-pick .lmu-picker-top { display: grid; gap: 8px; }
    .sl-rail .res-pick .lmu-seg { flex-wrap: wrap; border-radius: var(--r-md, 6px); }
    .sl-rail .res-pick .lmu-seg button { flex: 1 1 auto; }
    .sl-rail .res-pick .lmu-picker-top .lmu-inp { width: 100%; margin-left: 0; }
    .sl-rail .res-pick .lmu-serlist { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .res-main .strip .end { margin-left: 0; width: 100%; } }
.res-main #oflHisto[open] { padding: 10px 14px 12px; border: 1px solid var(--v2-line, var(--line-2)); border-radius: var(--r-lg, 10px); background: var(--v2-panel, var(--panel)); }
.res-main #oflHisto .ofl-dist { padding: 0; border: 0; background: none; }
/* Sectors: purple is the board's fastest (the page's --purple: #7a2fc0 on Daylight), green the driver's own best. */
#oflTable { --ofl-sp: var(--purple, #c084fc); }
#oflTable .res-d { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
#oflTable .res-you { margin-left: 8px; padding: 0 6px; border-radius: 999px; background: var(--v2-wash); color: var(--text-hi); font-size: var(--fs-micro, 11px); font-weight: 700; }
#oflTable .res-sub { display: block; margin-top: 2px; font-size: var(--fs-micro, 11px); font-weight: 500; color: var(--text-3); white-space: normal; }
#oflTable .res-sub .ofl-chips { margin-top: 4px; }
@media (min-width: 1100px) { #oflTable .res-sub { display: none; } }
#oflTable tr[data-cls] > :first-child { box-shadow: inset 3px 0 0 var(--cls, transparent); }
#oflTable tbody tr.pick > * { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }
#oflTable .res-x { border-top: 1px dashed var(--line-3, var(--line-2)); }
#oflTable .res-more { display: flex; justify-content: center; margin: var(--s3, 12px) 0 0; }
#oflTable .res-more .ofl-more { margin: 0; }

/* lmu-section.css */
.lmu-carlink { color: inherit; text-decoration: none; }
.lmu-carlink:hover, .lmu-carlink:focus-visible { text-decoration: underline; }
.lmu-trk-about { align-self: center; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.lmu-trk-about:hover, .lmu-trk-about:focus-visible { color: var(--text-hi); }
/* lmu-section.css: the LMU races section (Schedule, Results, Cars, Tracks, When to race, Rank up plan, Your split). Design: docs/design/lmu-races/design-spec.md.
   Markup comes from public/js/lmu-section.js. Only site tokens are used, so every theme works; the four rank colors
   are the one exception (they match the LMU driver rank badges). Buttons, selects and tables get global styles from
   app.css, so each component below resets what it must (min-height, margin, shadow, borders, background). */

.lmu-page {
    /* --lmu-top: the top bar is position: relative on these pages (it scrolls away), so the sticky bar pins at 0. */
    --lmu-top: 0px; --lmu-caps: .08em; --lmu-good: var(--dx-good, var(--green));
    --lmu-r-ctl: 6px; --lmu-r-box: 10px; --lmu-r-pill: 999px; --lmu-h-ctl: 30px; --lmu-h-seg: 26px; --lmu-h-chip: 28px; --lmu-h-row: 40px;
    --rank-bronze: #cd8a4e; --rank-silver: #c3cbd6; --rank-gold: #e6b93d; --rank-platinum: #7fd4e6;
    --lmu-focus: var(--v2-focus, 0 0 0 3px rgba(var(--accent-rgb), .35));
    font-family: var(--v2-font-ui, var(--font-ui, system-ui, sans-serif));
    max-width: 1300px; margin: 0 auto; overflow-x: clip;
}
.lmu-page [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.lmu-sheet-open { overflow: hidden; }

/* Focus ring, only on the section's own controls. */
.lmu-bar :focus-visible, .lmu-tabs a:focus-visible, .lmu-table button:focus-visible, .rk button:focus-visible,
.lmu-subtabs button:focus-visible, .lmu-explain summary:focus-visible, .lmu-picker-top .lmu-sel:focus-visible { outline: none; box-shadow: var(--lmu-focus); }

/* 3.1 Section header */
.lmu-eyebrow { display: flex; align-items: center; gap: var(--s3, 12px); margin: 0 0 var(--s3, 12px); font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.lmu-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.lmu-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3, 12px) var(--s5, 24px); flex-wrap: wrap; margin-bottom: var(--s4, 16px); }
.lmu-head h1 { margin: 0; font: 600 26px/1.1 var(--v2-font-display, var(--font-display, inherit)); letter-spacing: .01em; color: var(--text-hi); text-wrap: balance; }
.lmu-sub { margin: 4px 0 0; max-width: 62ch; color: var(--text-2); font-size: 14px; }
.lmu-head-right { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2, 8px) var(--s3, 12px); }
.lmu-head-right .lmu-stats { white-space: normal; }
.lmu-stats { margin: 0; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 3.2 Section tab bar (links) */
.lmu-tabs { display: flex; gap: 2px; margin: 0 0 var(--s4, 16px); border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.lmu-tabs::-webkit-scrollbar { display: none; }
.lmu-tabs a { flex: none; padding: 9px 14px 10px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-3); font-size: 13px; font-weight: 650; white-space: nowrap; text-decoration: none; }
.lmu-tabs a:hover { color: var(--text-hi); }
.lmu-tabs a[aria-current="page"] { color: var(--text-hi); border-bottom-color: var(--accent); }

/* 3.3 Sub-tabs (Cars) */
.lmu-subrow { display: flex; align-items: center; justify-content: space-between; gap: var(--s3, 12px); flex-wrap: wrap; }
.lmu-subtabs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 var(--s4, 16px); border: 1px solid var(--line-2); border-radius: var(--lmu-r-ctl); background: var(--panel); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lmu-subtabs::-webkit-scrollbar { display: none; }
.lmu-subtabs button { height: var(--lmu-h-ctl); min-height: 0; margin: 0; padding: 0 14px; border: 0; border-radius: 3px; background: none; box-shadow: none; transform: none; color: var(--text-2); font: 600 13px/1 var(--v2-font-ui, inherit); white-space: nowrap; }
.lmu-subtabs button:hover { color: var(--text-hi); }
.lmu-subtabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text-hi); box-shadow: inset 0 -2px 0 var(--accent); }
/* The selected tab keeps its accent underline under the focus ring (tabs.js gives each bar one Tab stop). */
.lmu-subtabs button[aria-selected="true"]:focus-visible { box-shadow: var(--lmu-focus), inset 0 -2px 0 var(--accent); }
.lmu-hint { margin: 0 0 var(--s4, 16px); color: var(--text-3); font-size: 12px; }

/* 3.4 Sticky filter bar and its controls */
.lmu-bar { position: sticky; top: var(--lmu-top); z-index: 30; margin: 0 0 var(--s3, 12px); padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.lmu-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.lmu-bar-row + .lmu-bar-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.lmu-bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lmu-grp { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.lmu-lbl { font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.lmu-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-pill); background: var(--bg-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lmu-seg::-webkit-scrollbar { display: none; }
.lmu-seg button { flex: none; height: var(--lmu-h-seg); min-height: 0; margin: 0; padding: 0 11px; border: 0; border-radius: var(--lmu-r-pill); background: none; box-shadow: none; transform: none; color: var(--text-2); font: 600 12px/1 var(--v2-font-ui, inherit); white-space: nowrap; }
.lmu-seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text-hi); }
.lmu-seg button:hover:not([aria-pressed="true"]) { color: var(--text-hi); }
.lmu-sel { width: auto; max-width: 100%; height: var(--lmu-h-ctl); min-height: 0; margin: 0; padding: 0 28px 0 10px; border: 1px solid var(--line-3); border-radius: var(--lmu-r-ctl); color: var(--text); font: 600 12px/1 var(--v2-font-ui, inherit); appearance: none;
    background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a9a90' stroke-width='1.5'/%3E%3C/svg%3E") right 10px center no-repeat; }
.lmu-inp { width: auto; max-width: 100%; min-width: 0; height: var(--lmu-h-ctl); min-height: 0; margin: 0; padding: 0 10px; border: 1px solid var(--line-3); border-radius: var(--lmu-r-ctl); background: var(--bg-2); color: var(--text); font: 12px/1 var(--v2-font-ui, inherit); }
.lmu-btn-q, .lmu-btn-o { height: var(--lmu-h-ctl); min-height: 0; margin: 0; border-radius: var(--lmu-r-ctl); box-shadow: none; transform: none; font: 600 12px/1 var(--v2-font-ui, inherit); white-space: nowrap; }
.lmu-btn-q { padding: 0 10px; border: 1px solid transparent; background: none; color: var(--text-2); }
.lmu-btn-q:hover { color: var(--text-hi); background: var(--v2-hover); }
.lmu-btn-o { padding: 0 12px; border: 1px solid var(--line-3); background: var(--bg-2); color: var(--text); }
.lmu-btn-o:hover { border-color: var(--accent); }

/* 3.5 Driver rank chips: --rk per rank, set from data-rank */
.lmu-ranks { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rk { position: relative; display: inline-flex; --rk: var(--accent); }
.rk[data-rank="Bronze"] { --rk: var(--rank-bronze); }
.rk[data-rank="Silver"] { --rk: var(--rank-silver); }
.rk[data-rank="Gold"] { --rk: var(--rank-gold); }
.rk[data-rank="Platinum"] { --rk: var(--rank-platinum); }
.rk-main, .rk-caret { height: var(--lmu-h-chip); min-height: 0; margin: 0; border: 1px solid var(--line-3); background: var(--bg-2); box-shadow: none; transform: none; color: var(--text-2); font: 650 12px/1 var(--v2-font-ui, inherit); }
.rk-main { padding: 0 10px; border-radius: var(--lmu-r-pill) 0 0 var(--lmu-r-pill); border-right: 0; display: inline-flex; align-items: center; gap: 6px; }
.rk-caret { width: 26px; padding: 0; border-radius: 0 var(--lmu-r-pill) var(--lmu-r-pill) 0; display: inline-grid; place-items: center; color: var(--text-3); }
.rk-main::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--rk); }
.rk-main[aria-pressed="true"] { background: color-mix(in srgb, var(--rk) 20%, var(--bg-2)); border-color: var(--rk); color: var(--text-hi); }
.rk-main[aria-pressed="true"]::before { background: var(--rk); }
.rk-main[aria-pressed="mixed"] { background: color-mix(in srgb, var(--rk) 12%, var(--bg-2)); border-color: var(--rk); color: var(--text-hi); }
.rk-main[aria-pressed="mixed"]::before { background: linear-gradient(90deg, var(--rk) 50%, transparent 50%); }
.rk-main[aria-pressed="true"] + .rk-caret, .rk-main[aria-pressed="mixed"] + .rk-caret { border-color: var(--rk); color: var(--rk); }
.rk-main small { font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rk-main[aria-pressed="mixed"] small { color: var(--rk); }
.rk-caret[aria-expanded="true"] { background: var(--surface-3); color: var(--text-hi); }
.rk-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 35; min-width: 190px; padding: 8px; border: 1px solid var(--line-3); border-radius: var(--lmu-r-ctl); background: var(--panel-2); box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 22px 54px -14px rgba(0, 0, 0, .85); }
.rk-pop header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 4px 8px; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.rk-pop header span button { min-height: 0; margin: 0; border: 0; background: none; box-shadow: none; padding: 0 4px; color: var(--accent-soft, var(--accent)); font: 600 11px/1.4 var(--v2-font-ui, inherit); text-transform: none; letter-spacing: 0; }
.rk-pop label { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 3px; font-size: 13px; color: var(--text); }
.rk-pop label:hover { background: var(--v2-hover); }
.rk-pop input { accent-color: var(--rk); width: 15px; height: 15px; min-height: 0; margin: 0; padding: 0; }
.rk-pop label small { margin-left: auto; color: var(--text-3); font-size: 11px; }
.rk-presets { display: inline-flex; align-items: center; gap: 2px; padding-left: 10px; margin-left: 4px; border-left: 1px solid var(--line-3); }
.rk-presets button { height: var(--lmu-h-seg); min-height: 0; margin: 0; padding: 0 8px; border: 0; border-radius: 3px; background: none; box-shadow: none; transform: none; color: var(--text-3); font: 600 12px/1 var(--v2-font-ui, inherit); }
.rk-presets button:hover { color: var(--text-hi); background: var(--v2-hover); }
.rk-presets button[aria-pressed="true"] { color: var(--text-hi); background: var(--surface-3); }
.rk-hint { color: var(--warn); font-size: 12px; }

/* 3.10 Mobile filter drawer (under 720px); the summary and the sheet head are hidden above it */
.lmu-bar-sum, .lmu-drawer-head, .lmu-drawer-foot, .lmu-scrim { display: none; }
@media (max-width: 720px) {
    .lmu-bar { padding: 8px 10px; }
    .lmu-bar-sum { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .lmu-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 12px; }
    .lmu-sum b { color: var(--text-hi); font-weight: 650; }
    .lmu-bar-ctl { display: none; }
    /* backdrop-filter would make the bar the containing block of the fixed sheet, so it is dropped while open. */
    .lmu-bar.is-open { backdrop-filter: none; }
    .lmu-bar.is-open .lmu-bar-ctl { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 82vh; overflow: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-3); border-radius: 14px 14px 0 0; background: var(--panel-2); box-shadow: 0 -20px 60px rgba(0, 0, 0, .7); animation: lmu-sheet .18s ease-out; }
    .lmu-bar.is-open .lmu-bar-ctl:focus { outline: none; }
    .lmu-bar.is-open .lmu-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); }
    .lmu-bar.is-open .lmu-bar-row { display: contents; }
    .lmu-grp { flex-wrap: wrap; }
    .lmu-bar-right { order: 9; margin-left: 0; width: 100%; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line-2); }
    .lmu-drawer-head { width: 100%; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--text-hi); }
    .lmu-drawer-x { width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0; border: 1px solid var(--line-3); border-radius: var(--lmu-r-ctl); background: var(--panel-2); box-shadow: none; transform: none; color: var(--text-2); font: 400 20px/1 var(--v2-font-ui, inherit); }
    .lmu-drawer-x:hover { color: var(--text-hi); background: var(--v2-hover); }
    .lmu-drawer-foot { order: 10; width: 100%; display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--line-2); }
    .lmu-drawer-foot .lmu-btn-o { min-width: 96px; }
    .rk-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 20vh; }
}
@keyframes lmu-sheet { from { transform: translateY(24px); opacity: .6; } }

/* 3.8 Explainer */
/* A one-paragraph reading of the data above a table (Pace tiers distribution). */
.lmu-summary { margin: 0 0 var(--s3, 12px); padding: 12px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--lmu-r-ctl); background: var(--panel); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.lmu-summary b { color: var(--text-hi); }
.lmu-explain { margin: 0 0 var(--s3, 12px); }
.lmu-explain summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; color: var(--text-2); font-size: 12px; font-weight: 600; border-radius: 3px; padding: 2px 4px; }
.lmu-explain summary::-webkit-details-marker { display: none; }
.lmu-explain summary::before { content: "?"; width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-3); font-size: 10px; color: var(--text-3); }
.lmu-explain[open] summary::before { background: var(--surface-3); color: var(--text-hi); }
.lmu-explain-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px 24px; margin: 10px 0 0; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-ctl); background: var(--panel); font-size: 13px; color: var(--text-2); }
.lmu-explain-body dt { font-weight: 700; color: var(--text-hi); }
.lmu-explain-body dd { margin: 2px 0 0; }
.lmu-explain-body .full { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--line-2); color: var(--text-3); font-size: 12px; }

/* 3.6 Data table: scrolls sideways inside its container; the page is the only vertical scroller. Everything is scoped under .lmu-table
   (app.css styles bare table, th and td, and compare.css styles .cmp-table). */
.lmu-table { border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); overflow: auto; max-width: 100%; }
.lmu-table table { width: 100%; min-width: 0; margin: 0; border-collapse: separate; border-spacing: 0; background: none; font-size: 13px; }
.lmu-table th, .lmu-table td { border: 0; font-size: 13px; }
.lmu-table thead th { position: sticky; top: 0; z-index: 2; padding: 0; background: var(--panel-2); color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line-3); white-space: nowrap; }
.lmu-table thead th.num { text-align: right; }
.lmu-table thead th button { width: 100%; height: var(--lmu-h-row); min-height: 0; margin: 0; padding: 0 14px; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: inherit; display: flex; align-items: center; gap: 5px; }
.lmu-table thead th.num button { justify-content: flex-end; }
.lmu-table thead th button:hover, .lmu-table thead th[aria-sort] button { color: var(--text-hi); }
.lmu-table thead .lmu-th { display: flex; align-items: center; height: var(--lmu-h-row); padding: 0 14px; }
.lmu-table thead th button .arr { width: 9px; opacity: 0; font-size: 9px; }
.lmu-table thead th[aria-sort] button .arr { opacity: 1; }
.lmu-table thead th[aria-sort="descending"] button .arr::before { content: "\25BC"; }
.lmu-table thead th[aria-sort="ascending"] button .arr::before { content: "\25B2"; }
.lmu-table tbody td, .lmu-table tbody th { height: var(--lmu-h-row); padding: 0 14px; border-bottom: 1px solid var(--line-2); background: none; color: var(--text-2); vertical-align: middle; white-space: nowrap; }
.lmu-table tbody tr:last-child :is(td, th) { border-bottom: 0; }
.lmu-table tbody tr:nth-child(even) { background: var(--v2-zebra); }
.lmu-table tbody tr:hover { background: var(--v2-hover); }
.lmu-table tbody th { text-align: left; font-weight: 650; color: var(--text-hi); min-width: 0; max-width: none; }
.lmu-table th .pos { display: inline-block; width: 22px; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.lmu-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lmu-table td.sorted { color: var(--text-hi); font-weight: 650; }
.lmu-table .up { color: var(--lmu-good); }
.lmu-table .down { color: var(--crit); }
.lmu-table .muted { color: var(--text-3); }
.lmu-table .delta { display: inline-block; min-width: 4.5em; margin-left: 8px; font-size: 11px; color: var(--text-3); }
.lmu-table .delta.neg { color: var(--warn); }
.lmu-table .delta.pos { color: var(--lmu-good); }
.lmu-table tr.is-prov :is(td, th) { color: var(--text-3); }
.lmu-table tr.is-prov th { color: var(--text-2); }
.lmu-table .tag { display: inline-block; padding: 1px 7px; border: 1px dashed var(--line-3); border-radius: var(--lmu-r-pill); font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }
.lmu-tfoot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 2px 0; color: var(--text-3); font-size: 12px; }
.lmu-tfoot .sw { display: inline-flex; align-items: center; gap: 6px; }
.lmu-tfoot .up { color: var(--lmu-good); }
.lmu-tfoot .down { color: var(--crit); }
.lmu-tfoot .sw-prov { width: 18px; height: 10px; border: 1px dashed var(--line-3); border-radius: 2px; }
@media (max-width: 720px) {
    .lmu-table tbody th, .lmu-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line-2); }
    .lmu-table thead th:first-child { z-index: 3; background: var(--panel-2); }
    .lmu-table tbody tr:nth-child(even) th { background: color-mix(in srgb, var(--text) 2.5%, var(--panel)); }
    .lmu-table tbody td, .lmu-table tbody th, .lmu-table thead th button, .lmu-table thead .lmu-th { padding-left: 10px; padding-right: 10px; }
}

/* 3.7 Empty, loading, error */
.lmu-state { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); color: var(--text-2); }
.lmu-state b { font-weight: 650; color: var(--text-hi); }
.lmu-state p { margin: 0; max-width: 46ch; color: var(--text-3); font-size: 13px; }
.lmu-state.err { border-color: color-mix(in srgb, var(--crit) 40%, var(--line-2)); }
.lmu-skel { display: block; max-width: 100%; height: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--surface-2, var(--panel-2)), var(--surface-3), var(--surface-2, var(--panel-2))); background-size: 200% 100%; animation: lmu-shimmer 1.4s linear infinite; }
@keyframes lmu-shimmer { to { background-position: -200% 0; } }

/* 3.9 Notice */
.lmu-notice { display: grid; gap: 4px; margin: 0 0 var(--s3, 12px); padding: 10px 14px; border: 1px solid var(--line-2); border-left: 3px solid var(--warn); border-radius: var(--lmu-r-ctl); background: var(--panel); font-size: 13px; color: var(--text-2); }
.lmu-notice b { color: var(--text-hi); }
.lmu-notice ul { margin: 2px 0 0; padding-left: 18px; color: var(--text-3); font-size: 12px; }
.lmu-notice ul b { color: var(--accent-soft, var(--accent)); font-weight: 600; }

/* 4.2 Results: series picker and strip; Schedule tier heading */
.lmu-picker { margin: 0 0 var(--s3, 12px); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); }
.lmu-picker-top { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.lmu-picker-top .lmu-inp { margin-left: auto; width: 220px; }
.lmu-serlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px; }
.lmu-serlist h4 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.lmu-ser { display: grid; gap: 2px; min-width: 0; min-height: 0; margin: 0; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-ctl); background: none; box-shadow: none; text-align: left; font: inherit; }
.lmu-ser b { font-size: 13px; color: var(--text-hi); }
.lmu-ser span { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmu-ser:hover { border-color: var(--line-3); }
.lmu-ser[aria-pressed="true"] { border-color: var(--accent); background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }
.lmu-strip { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 var(--s3, 12px); padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: var(--lmu-r-ctl); background: var(--panel); }
.lmu-strip h2 { margin: 0; font: 600 20px/1.2 var(--v2-font-display, var(--font-display, inherit)); color: var(--text-hi); }
.lmu-strip span { color: var(--text-2); font-size: 13px; }
.lmu-tier { margin: var(--s4, 16px) 0 var(--s3, 12px); font: 600 20px/1.2 var(--v2-font-display, var(--font-display, inherit)); color: var(--text-hi); }
.lmu-tier small { margin-left: 8px; font: 500 12px/1 var(--v2-font-ui, inherit); color: var(--text-3); }
@media (max-width: 720px) { .lmu-picker-top .lmu-inp { margin-left: 0; width: 100%; } }

/* 4.4 Rank chip (a rank name that always travels with its color): Your split's answer, ladder and the Schedule card's split chip */
.rk.rk-chip { align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border: 1px solid color-mix(in srgb, var(--rk) 55%, transparent); border-radius: var(--lmu-r-pill); background: color-mix(in srgb, var(--rk) 14%, transparent); color: var(--text-hi); font: 650 13px/20px var(--v2-font-ui, inherit); letter-spacing: 0; white-space: nowrap; vertical-align: middle; }
.rk.rk-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rk); }
.rk.rk-chip[data-rank="none"] { --rk: var(--line-3); color: var(--text-3); }

/* 4.5 Schedule card: the split chip next to the picked start (links to /your-split) */
.split-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 28px; padding: 0 4px 0 10px; border: 1px solid var(--line-3); border-radius: var(--lmu-r-pill); background: var(--bg-2); color: var(--text-hi); font-size: 13px; font-weight: 650; white-space: nowrap; text-decoration: none; }
.split-chip .rk.rk-chip { font-size: 12px; line-height: 18px; padding: 0 8px 0 6px; }
.split-chip .rk.rk-chip::before { width: 7px; height: 7px; }
.split-chip:hover { border-color: var(--accent); }
.split-chip:focus-visible { outline: none; box-shadow: var(--lmu-focus); }

/* 4.6 Your split (/your-split): its rules live in css/your-split.css (the redesign layer, v2.css 15). */

@media (prefers-reduced-motion: reduce) {
    .lmu-skel, .lmu-bar.is-open .lmu-bar-ctl { animation: none; }
}

/* ---- Rank up plan (/rank-up and its /account card; public/js/rank-up.js), scoped to .ru. Rank colors only inside
   named chips and rails; sign by --good / --crit with the sign printed. ---- */
.ru { --ru-good: var(--lmu-good, var(--good)); --ru-crit: var(--crit, var(--red)); min-width: 0; }
.ru :is(button, a, summary, [tabindex="0"]):focus-visible { outline: none; box-shadow: var(--lmu-focus); }
.ru .up { color: var(--ru-good); } .ru .down { color: var(--ru-crit); }
.ru-rk { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border: 1px solid color-mix(in srgb, var(--rk) 55%, transparent); border-radius: var(--lmu-r-pill); background: color-mix(in srgb, var(--rk) 14%, transparent); color: var(--text-hi); font-size: 12px; font-weight: 650; white-space: nowrap; line-height: 18px; --rk: var(--accent); }
.ru-rk::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rk); }
.ru-rk small { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ru-rk.lg { font-size: 15px; padding: 3px 12px 3px 9px; line-height: 22px; }
[data-rank="Bronze"]:is(.ru-rk, .rail) { --rk: var(--rank-bronze); } [data-rank="Silver"]:is(.ru-rk, .rail) { --rk: var(--rank-silver); }
[data-rank="Gold"]:is(.ru-rk, .rail) { --rk: var(--rank-gold); } [data-rank="Platinum"]:is(.ru-rk, .rail) { --rk: var(--rank-platinum); }
.ru .hero { margin: 0 0 16px; padding: 18px 20px 16px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); }
.ru .big { margin: 0; font: 600 clamp(24px, 3.2vw, 34px)/1.15 var(--v2-font-display, inherit); color: var(--text-hi); text-wrap: balance; }
.ru .big em { font-style: normal; color: var(--accent-soft, var(--accent)); }
.ru .hero .sub { margin: 8px 0 0; color: var(--text-2); font-size: 15px; max-width: 78ch; }
.ru b { color: var(--text-hi); font-weight: 650; }
.ru .lmu-bar { position: static; }
.ru .ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px; margin: 0 0 16px; }
.ru .rank { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); min-width: 0; display: grid; gap: 10px; }
.ru .kk { font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; gap: 8px; }
.ru .now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ru .pc { font: 600 28px/1 var(--v2-font-display, inherit); color: var(--text-hi); }
.ru .pc small { font: 600 12px/1 var(--v2-font-ui, inherit); color: var(--text-3); margin-left: 4px; }
.ru .next { margin: 0; color: var(--text-2); font-size: 13px; }
.rail { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 12px; --rk: var(--accent); }
.rail i { display: block; border-radius: 2px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.rail i.on { background: var(--rk); box-shadow: none; }
.rail i.plan { background: color-mix(in srgb, var(--rk) 35%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rk) 70%, transparent); }
.ru .ends { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-3); margin-top: -4px; }
.ru .recent { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.ru .step { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.ru .step.up { color: var(--ru-good); } .ru .step.down { color: var(--ru-crit); } .ru .step.dnf { text-decoration: underline dotted; text-underline-offset: 3px; }
.ru .panel { margin: 0 0 16px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); min-width: 0; }
.ru .ph { display: flex; align-items: center; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; padding: 12px 14px 10px; border-bottom: 1px solid var(--line-2); }
.ru .ph h2, .ru .fold-h { margin: 0; font: 600 20px/1.2 var(--v2-font-display, inherit); color: var(--text-hi); }
.ru .ph h2 small { margin-left: 8px; font: 500 12px/1 var(--v2-font-ui, inherit); color: var(--text-3); }
.ru .ph span, .ru .why { color: var(--text-3); font-size: 12px; }
.ru .pb { padding: 14px; }
.ru .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; margin: 0 0 16px; }
.ru .two > .panel { margin: 0; }
.ru .lede { margin: 0 0 12px; color: var(--text-2); font-size: 13px; max-width: 70ch; }
.ru .races { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.race { position: relative; display: grid; gap: 8px; padding: 12px 14px 12px 16px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--bg-2); min-width: 0; }
.race::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--line-3); }
.race.is-done::before { background: var(--ru-good); } .race.is-next::before { background: var(--accent); }
.race .top { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.race.is-done .st { color: var(--ru-good); } .race.is-next .st { color: var(--accent-soft, var(--accent)); }
.race .when { font: 600 20px/1.15 var(--v2-font-display, inherit); color: var(--text-hi); }
.race .when small { font: 600 13px/1 var(--v2-font-ui, inherit); color: var(--text-2); margin-left: 6px; }
.race .series { color: var(--text-2); font-size: 13px; }
.race .facts { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--text-3); font-size: 12px; align-items: center; }
/* The driver's form row (#705): the Schedule card's form line rail and tint, --warn when SR is at risk. */
.race .facts.form { flex-wrap: nowrap; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: var(--lmu-r-ctl); color: var(--text-2); background: color-mix(in srgb, var(--ru-good) 8%, transparent); }
.race .facts.form::before { content: ""; flex: none; width: 3px; align-self: stretch; border-radius: 2px; background: var(--ru-good); }
.race .facts.form.is-sr { background: color-mix(in srgb, var(--warn, #d99a2b) 8%, transparent); }
.race .facts.form.is-sr::before { background: var(--warn, #d99a2b); }
.race .worth .v .plain { font-size: 12px; font-weight: 600; color: var(--text-3); }
@media (forced-colors: active) { .race .facts.form::before { border: 1px solid CanvasText; } }
.race .worth { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--lmu-r-ctl); overflow: hidden; }
.race .worth div { background: var(--panel); padding: 6px 8px; min-width: 0; }
.race .worth .k { font-size: 10px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.race .worth .v { font-size: 15px; font-weight: 650; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.race .result { padding: 8px 10px; border-radius: var(--lmu-r-ctl); background: color-mix(in srgb, var(--ru-good) 10%, transparent); font-size: 13px; color: var(--text-2); }
.race .result.miss { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.race .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--text-3); }
.ru .avoid { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--line-3); border-radius: var(--lmu-r-ctl); font-size: 13px; color: var(--text-2); display: grid; gap: 4px; }
.ru .habits { display: grid; gap: 10px; margin-top: 10px; }
.habit { display: grid; grid-template-columns: minmax(130px, 170px) 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.habit .name { color: var(--text-hi); font-weight: 650; }
.habit small { display: block; color: var(--text-3); font-weight: 500; font-size: 12px; }
.habit .trk { position: relative; height: 14px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.habit .trk i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 0 3px 3px 0; background: color-mix(in srgb, var(--accent) 75%, transparent); }
.habit .trk em { position: absolute; top: -2px; bottom: -2px; left: var(--x); width: 2px; background: var(--text-3); border-radius: 1px; }
.habit .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-hi); font-weight: 650; white-space: nowrap; }
.habit.is-top .trk i { background: color-mix(in srgb, var(--ru-crit) 70%, transparent); }
.coach { padding: 10px 12px; border-radius: var(--lmu-r-ctl); background: var(--panel-2, var(--bg-2)); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); display: grid; gap: 6px; }
.coach .tip-big { font: 600 20px/1.2 var(--v2-font-display, inherit); color: var(--text-hi); }
.ru .key { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-3); font-size: 12px; margin-top: 10px; }
.ru .key i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.ru .sw-top { background: color-mix(in srgb, var(--ru-crit) 70%, transparent); } .ru .sw-you, .ru .sw-plan { background: var(--accent); }
.ru .sw-typ { background: color-mix(in srgb, var(--accent) 45%, transparent); } .ru .key .mk { width: 2px; height: 12px; background: var(--text-3); }
.ru-chart { width: 100%; height: auto; display: block; overflow: visible; }
.ru-chart text { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.ru-chart .grid line { stroke: var(--line-2); } .ru-chart .zero { stroke: var(--line-3); }
.ru-chart .bar-up { fill: var(--ru-good); } .ru-chart .bar-down { fill: var(--ru-crit); } .ru-chart .bar-acc { fill: var(--accent); }
.ru-chart .bar-dim { fill: color-mix(in srgb, var(--accent) 45%, transparent); } .ru-chart .lbl-hi { fill: var(--text-hi); font-weight: 650; }
.ru-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; } .ru-chart .ln.proj { stroke-dasharray: 3 5; }
.ru-chart .band { fill: rgba(var(--accent-rgb), .14); } .ru-chart .target { fill: rgba(var(--accent-rgb), .08); }
.ru-chart .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.ru-chart .tierline { stroke: var(--rank-silver); stroke-dasharray: 2 4; } .ru-chart .tiertext { fill: var(--rank-silver); font-weight: 650; }
.ru-chart .hit { fill: transparent; outline: none; } .ru-chart .hit:focus-visible, .ru-chart .hit:hover { fill: rgba(var(--accent-rgb), .16); }
.ru-tip { position: fixed; z-index: 50; pointer-events: none; padding: 6px 9px; border: 1px solid var(--line-3); border-radius: var(--lmu-r-ctl); background: var(--panel-2, var(--panel)); color: var(--text-2); font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); max-width: 260px; }
.ru .twin > summary { cursor: pointer; color: var(--text-2); font-size: 12px; font-weight: 600; padding: 2px 4px; display: inline-block; margin-top: 8px; }
.ru .tbl { border: 1px solid var(--line-2); border-radius: var(--lmu-r-ctl); overflow: auto; margin-top: 8px; }
.ru .tbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ru .tbl th, .ru .tbl td { padding: 0 12px; height: 34px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
.ru .tbl thead th { color: var(--text-3); font-size: 11px; letter-spacing: var(--lmu-caps); text-transform: uppercase; }
.ru .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.ru .sure { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--line-2); border-bottom: 1px solid var(--line-2); }
.tile { padding: 12px 14px 13px; background: var(--panel); min-width: 0; }
.tile .k { font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.tile .v { margin: 4px 0 2px; font-size: 22px; font-weight: 650; color: var(--text-hi); line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .s { color: var(--text-3); font-size: 12px; }
.ru .limits { margin: 0; padding: 0 0 0 18px; color: var(--text-2); font-size: 13px; display: grid; gap: 5px; }
.ru .fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 12px 14px; }
.ru .fold > summary::-webkit-details-marker { display: none; }
.ru .fold > summary::after { content: "Show"; font-size: 12px; font-weight: 600; color: var(--accent-soft, var(--accent)); margin-left: auto; }
.ru .fold[open] > summary::after { content: "Hide"; } .ru .fold[open] > summary { border-bottom: 1px solid var(--line-2); }
.ru .fold-s { color: var(--text-2); font-size: 13px; }
.ru .notes { margin: 16px 2px 0; color: var(--text-3); font-size: 12px; display: grid; gap: 4px; }
.ru .guest { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.ru-card .rank { padding: 0; border: 0; background: none; }
.ru-card .ranks { margin: 0 0 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
@media (prefers-reduced-motion: no-preference) { .rail i { transition: background-color .12s ease; } }
@media (max-width: 720px) { .habit { grid-template-columns: 1fr auto; } .habit .trk { grid-column: 1 / -1; } .ru .fold > summary::after { width: 100%; } }
/* 4.4 When to race: its rules live in when-to-race.css (the site redesign layer). */
.lmu-table tr[aria-selected="true"] { background: var(--v2-wash, rgba(var(--accent-rgb), .13)); }

/* Shared tooltip for table headers th[data-tip] (lmu-section.js wireTips). */
th[data-tip] { cursor: help; }
.lmu-tipcell { cursor: help; display: inline-block; border-radius: 4px; }
.lmu-tipcell:focus-visible { outline: 2px solid var(--accent, #94a3b8); outline-offset: 2px; }
.lmu-tip { position: fixed; z-index: 90; max-width: min(280px, calc(100vw - 16px)); padding: 7px 10px; border: 1px solid var(--line-3); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); pointer-events: none; white-space: pre-line; }
.lmu-tip[hidden] { display: none; }

/* encyclopedia.css */
/* encyclopedia.css: the encyclopedia pages (car, track and the tracks index). Spec: StintLabs-research/
   feature-demos/encyclopedia/spec.md section 3. Markup from public/js/encyclopedia.js; the header, tabs, tables, explainer
   and states are lmu-section.css's. Site tokens only, so every theme works. */

.enc-page { --series-car: var(--info); --series-field: var(--text-3); }
.enc-page :is(a, button, select, summary):focus-visible, .enc-page .lmu-sel:focus-visible { outline: none; box-shadow: var(--lmu-focus); }

.enc-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s2, 8px); color: var(--text-3); font-size: 12px; }
.enc-crumb a { color: var(--text-2); text-decoration: none; }
.enc-crumb a:hover { color: var(--text-hi); text-decoration: underline; }

/* Title, one-line meta, two actions. */
.enc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3, 12px) var(--s5, 24px); align-items: start; margin-bottom: var(--s4, 16px); }
.enc-head h1 { margin: 0; font: 600 26px/1.1 var(--v2-font-display, var(--font-display, inherit)); color: var(--text-hi); text-wrap: balance; overflow-wrap: anywhere; }
.enc-meta { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.enc-meta span + span::before { content: "\00b7"; margin: 0 8px; color: var(--text-3); }
.enc-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.enc-btn-p, .enc-btn-o { height: 34px; padding: 0 14px; border-radius: var(--lmu-r-ctl); font: 700 13px/1 var(--v2-font-ui, inherit); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.enc-btn-p { border: 1px solid var(--accent); background: var(--accent); color: var(--ink); }
.enc-btn-p:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }
.enc-btn-o { border: 1px solid var(--line-3); background: var(--bg-2); color: var(--text); font-weight: 600; }
.enc-btn-o:hover { color: var(--text-hi); background: var(--v2-hover); }

/* The lead: one sentence answering the page's question. */
.enc-lead { margin: 0 0 var(--s4, 16px); max-width: 46ch; font: 500 22px/1.3 var(--v2-font-ui, inherit); color: var(--text-2); text-wrap: balance; }
.enc-lead b { color: var(--text-hi); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Fact strip: four cells, two by two under 720px. */
.enc-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 var(--s5, 24px); border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--line-2); overflow: hidden; }
.enc-fact { padding: 12px 14px; background: var(--panel); min-width: 0; }
.enc-fact .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.enc-fact .v { display: block; margin-top: 2px; font: 600 22px/1.15 var(--v2-font-display, var(--font-display, inherit)); color: var(--text-hi); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enc-fact .v small { margin-left: 4px; font: 600 12px/1 var(--v2-font-ui, inherit); color: var(--text-3); }
.enc-fact .s { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enc-blk .enc-facts { margin-bottom: 0; }

/* Sections. */
.enc-blk { margin: 0 0 var(--s6, 36px); scroll-margin-top: 16px; }
.enc-blk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 var(--s3, 12px); }
.enc-blk-head h2 { margin: 0; padding: 0; border: 0; font: 600 20px/1.2 var(--v2-font-display, var(--font-display, inherit)); color: var(--text-hi); }
.enc-blk-head p { margin: 2px 0 0; color: var(--text-3); font-size: 12px; }
.enc-ctl { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-left: auto; max-width: 100%; }
.enc-note { margin: 8px 2px 0; color: var(--text-3); font-size: 12px; max-width: 110ch; }
.enc-more { margin: 10px 0 0; }
.enc-more summary::before { content: "+"; }
.enc-more[open] summary::before { content: "\2212"; }
.enc-more > :not(summary) { margin-top: 10px; }
.enc-panel { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); }
.enc-panel p { margin: 0; font-size: 13px; color: var(--text-2); }
.enc-panel p + p { margin-top: 8px; }
.enc-panel b { color: var(--text-hi); }
.enc-panel .muted { color: var(--text-3); }
.enc-page .lmu-table tbody th { text-transform: none; letter-spacing: 0; }
.enc-page .lmu-table tr.enc-you :is(td, th) { background: var(--v2-wash); }
.enc-page .lmu-table tbody th a { color: inherit; text-decoration: none; }
.enc-page .lmu-table tbody th a:hover { text-decoration: underline; }
.enc-page .lmu-table td a { color: var(--accent-soft, var(--accent)); }
.enc-wrap { display: block; min-width: 220px; max-width: 70ch; padding: 8px 0; white-space: normal; line-height: 1.4; }
@media (max-width: 720px) { .enc-page .lmu-table tr.enc-you th { background: color-mix(in srgb, var(--accent) 13%, var(--panel)); } }

/* Charts: inline SVG at the box's pixel width, redrawn on resize. */
.enc-chart { position: relative; min-width: 0; padding: 12px 14px 8px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); }
.enc-svg { min-width: 0; overflow: hidden; }
.enc-svg svg { display: block; max-width: 100%; }
.enc-chart .grid { stroke: var(--line-2); stroke-width: 1; }
.enc-chart .grid.ref { stroke: var(--text-3); }
.enc-chart .grid.base { stroke: var(--line-3); }
.enc-chart .ax { fill: var(--text-3); font: 11px var(--v2-font-ui, sans-serif); }
.enc-chart .lab { fill: var(--text-2); font: 600 11px var(--v2-font-ui, sans-serif); }
.enc-chart .lab.hi { fill: var(--text-hi); }
.enc-chart .hit { fill: transparent; }
.enc-chart .hbar.good { fill: var(--lmu-good); } .enc-chart .hbar.bad { fill: var(--crit); } .enc-chart .hbar.flat { fill: var(--accent); }
.enc-chart .fld { fill: var(--series-field); opacity: .55; }
.enc-chart .car { fill: var(--series-car); }
.enc-chart .med { stroke: var(--series-car); stroke-width: 1.5; stroke-dasharray: 3 3; }
.enc-chart circle { stroke: var(--panel); stroke-width: 2; }
.enc-chart circle.reset { fill: var(--panel); stroke-width: 2; }
.enc-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 6px 0 0; font-size: 12px; color: var(--text-3); }
.enc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.enc-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.enc-legend i.enc-ring { border: 2px solid var(--text-2); border-radius: 50%; }
.enc-tip { position: absolute; z-index: 5; pointer-events: none; padding: 6px 9px; border: 1px solid var(--line-3); border-radius: var(--lmu-r-ctl); background: var(--panel-2); color: var(--text); font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.enc-tip b { color: var(--text-hi); }

/* Track page: two columns (map and corners 3:2, even pairs 1:1), one under 900px. */
.enc-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4, 16px); align-items: start; }
.enc-two.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.enc-panel { min-width: 0; }
.enc-panel h3, .enc-lbl { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: var(--lmu-caps); text-transform: uppercase; color: var(--text-3); }
.enc-hint { margin: 0; color: var(--text-3); font-size: 12px; }
.enc-page .lmu-table tr.enc-sub-row th { color: var(--text-2); font-weight: 500; }

/* The map: road, core, S/F tick, numbered corners (22px circles); the corner list selects the same corner. */
.enc-map { position: relative; min-width: 0; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); }
.enc-map .map-line { fill: none; stroke: var(--line-3); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.enc-map .map-core { fill: none; stroke: var(--text-2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.enc-map .map-sf { stroke: var(--text-hi); stroke-width: 3; }
.enc-map .cn { cursor: pointer; outline: none; }
.enc-map .cn circle { fill: var(--panel-2); stroke: var(--line-3); stroke-width: 1.5; }
.enc-map .cn text { fill: var(--text-2); font: 700 11px var(--v2-font-ui, sans-serif); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.enc-map .cn:is(.is-on, :hover) circle { fill: var(--accent); stroke: var(--accent); }
.enc-map .cn:is(.is-on, :hover) text { fill: var(--ink); }
.enc-map .cn:focus-visible circle { stroke: var(--text-hi); stroke-width: 2.5; }
.enc-map .cn .nm { fill: var(--text-hi); font: 600 12px var(--v2-font-ui, sans-serif); dominant-baseline: central; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.enc-map .cn.is-on .nm { fill: var(--text-hi); }
.enc-corners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.enc-corners button { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 4px 6px; border: 0; border-radius: var(--lmu-r-ctl); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.enc-corners button:hover, .enc-corners button[aria-pressed="true"] { background: var(--v2-hover); }
.enc-corners .n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1px solid var(--line-3); border-radius: 50%; background: var(--panel-2); color: var(--text-2); font-size: 11px; font-weight: 700; }
.enc-corners button[aria-pressed="true"] .n { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.enc-corners b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text-2); }
.enc-corners button[aria-pressed="true"] b { color: var(--text-hi); }
.enc-corners small { margin-left: auto; flex: none; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Race list: name, cadence or round on the right, one detail line. */
.racelist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.racelist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-ctl); background: var(--bg-2); font-size: 13px; }
.racelist b { color: var(--text-hi); font-weight: 650; overflow-wrap: anywhere; }
.racelist .r { color: var(--text-3); font-size: 12px; text-align: right; white-space: nowrap; }
.racelist .d { grid-column: 1 / -1; color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.racelist a { color: var(--accent-soft, var(--accent)); }

/* Tracks index: the Tracks / Cars switch, then a card per circuit (outline, length, corners, layouts, GT3 laps, pit lane). */
.enc-idx-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 var(--s4, 16px); }
.enc-idx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s3, 12px); }
.enc-tcard { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--lmu-r-box); background: var(--panel); color: inherit; text-decoration: none; }
.enc-tcard:hover { border-color: var(--line-3); background: var(--v2-hover); }
.enc-thumb { display: block; width: 84px; height: 64px; }
.enc-thumb svg { display: block; width: 84px; height: 64px; }
.enc-thumb path { fill: none; stroke: var(--text-2); stroke-width: 2.2; stroke-linejoin: round; }
.enc-tc-body { display: block; min-width: 0; }
.enc-tcard .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: 14px; color: var(--text-hi); }
.enc-tcard .ln { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; }
.enc-tcard .st { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.enc-tcard .st > span { white-space: nowrap; }
.enc-tcard .st b { color: var(--text-hi); font-weight: 650; }
.enc-cls-h { margin: var(--s5, 24px) 0 var(--s2, 8px); font: 600 18px/1.2 var(--v2-font-display, var(--font-display, inherit)); color: var(--text-hi); }
.enc-cls-h small { margin-left: 8px; font: 500 12px/1 var(--v2-font-ui, inherit); color: var(--text-3); }

@media (max-width: 900px) {
    .enc-two, .enc-two.even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .enc-corners { grid-template-columns: minmax(0, 1fr); }
    .enc-map { padding: 6px; }
    .enc-head { grid-template-columns: minmax(0, 1fr); }
    .enc-actions { justify-content: flex-start; }
    .enc-lead { font-size: 18px; }
    .enc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .enc-chart { padding: 10px 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .enc-page, .enc-page * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* v2.css */
/* v2.css — the "timing screen" design system. Loads LAST on every page.
 *
 * Direction: a broadcast timing screen, not a web form. Neutral graphite
 * surfaces in clear steps (page < panel < raised), hairlines instead of tinted
 * outlines, one condensed display face (Saira) for labels, tabs, buttons and
 * every number, and the theme accent kept for state and the one thing to press.
 *
 * Everything is scoped so ?design=old (or localStorage stintlab.design = 'old')
 * puts html.design-old on the page and turns all of this off:
 *   - token blocks use  html:not(.design-old)          (beats [data-theme])
 *   - rules use        :where(html:not(.design-old))   (zero specificity, so
 *     source order wins and app.css state rules like .tab.active still apply)
 * Spec and class names: DESIGN-V2.md. Page files: v2-planner/-race/-dash.css.
 */

/* Saira variable (wght 100-900, wdth 50-125), SIL OFL 1.1: /fonts/saira-OFL.txt */
@font-face {
    font-family: "SL Saira";
    src: url(/fonts/saira-var.woff2) format("woff2-variations"), url(/fonts/saira-var.woff2) format("woff2");
    font-weight: 100 900;
    font-stretch: 50% 125%;
    font-style: normal;
    font-display: swap;
}

/* ======================================================================
   1. TOKENS — derived from each theme's --bg / --text / --accent
   ====================================================================== */
html:not(.design-old) {
    color-scheme: dark;

    /* Type: 5 sizes. Display face for labels, controls and numbers; the
       system face for running text. */
    --v2-font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --v2-font-display: "SL Saira", Bahnschrift, "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
    --v2-font-mono: "Cascadia Mono", ui-monospace, Consolas, monospace;
    --v2-fs-xs: 11px;    /* caps labels, table headers */
    --v2-fs-sm: 13px;    /* secondary text, dense rows, segmented items */
    --v2-fs-md: 15px;    /* body, controls */
    --v2-fs-lg: 20px;    /* section headings, card values */
    --v2-fs-xl: clamp(30px, 4.2vw, 48px);  /* key race numbers */
    --v2-track-caps: .08em;

    /* Space: --s1..--s6 from app.css (4 8 12 16 24 36) plus one. */
    --s7: 48px;

    /* Radius: sharper than before; a timing screen is not a bubble UI. */
    --v2-r-sm: 3px;
    --v2-r-md: 6px;
    --v2-r-lg: 10px;
    --v2-r-pill: 999px;
    --radius: var(--v2-r-md);

    /* Control heights */
    --v2-h-sm: 30px;
    --v2-h-md: 38px;
    --v2-h-lg: 46px;

    /* Surfaces: page < inset < panel < raised < overlay, by mixing white into
       the theme's own --bg so every dark theme keeps its tint. */
    --v2-page: var(--bg);
    --v2-inset: color-mix(in srgb, #000 40%, var(--bg));
    --v2-panel: color-mix(in srgb, #fff 4.5%, var(--bg));
    --v2-raise: color-mix(in srgb, #fff 8%, var(--bg));
    --v2-overlay: color-mix(in srgb, #fff 11%, var(--bg));
    --v2-line: color-mix(in srgb, var(--text) 11%, transparent);
    --v2-line-2: color-mix(in srgb, var(--text) 19%, transparent);
    --v2-hover: color-mix(in srgb, var(--text) 6%, transparent);
    --v2-zebra: color-mix(in srgb, var(--text) 2.5%, transparent);
    --v2-wash: rgba(var(--accent-rgb), .13);
    --v2-shadow-1: inset 0 1px 0 rgba(255, 255, 255, .045), 0 1px 2px rgba(0, 0, 0, .45);
    --v2-shadow-2: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 34px -14px rgba(0, 0, 0, .8);
    --v2-shadow-pop: 0 0 0 1px var(--v2-line-2), 0 22px 54px -14px rgba(0, 0, 0, .85);
    --v2-focus: 0 0 0 3px rgba(var(--accent-rgb), .35);

    /* Stacking: one scale. Content stays at or below --z-sticky; the header
       never sets a z-index (no stacking context), its menus use --z-dropdown. */
    --z-base: 1;
    --z-sticky: 30;
    --z-ticker: 10050;
    --z-dropdown: 10070;
    --z-toast: 10080;
    --z-dialog: 10090;

    /* Motion */
    --v2-ease: cubic-bezier(.2, .7, .2, 1);
    --v2-fast: 120ms;
    --v2-med: 200ms;

    /* The old tokens follow, so the ~5000 lines of app.css shift with us. */
    --panel: var(--v2-panel);
    --panel-2: var(--v2-raise);
    --bg-2: var(--v2-inset);
    --surface-1: var(--v2-raise);
    --surface-2: color-mix(in srgb, #fff 11%, var(--bg));
    --surface-3: color-mix(in srgb, #fff 16%, var(--bg));
    --line: var(--v2-line);
    --line-2: var(--v2-line-2);
    --line-3: color-mix(in srgb, var(--text) 28%, transparent);
    --dx-mono: var(--v2-font-display);
}

/* Daylight: white cards on a grey page, ink shadows, darker wells. */
html[data-theme="daylight"]:not(.design-old) {
    color-scheme: light;
    --v2-inset: color-mix(in srgb, #000 3%, var(--bg));
    --v2-panel: #fff;
    --v2-raise: #fff;
    --v2-overlay: #fff;
    --v2-line: color-mix(in srgb, var(--text) 14%, transparent);
    --v2-line-2: color-mix(in srgb, var(--text) 24%, transparent);
    --v2-hover: color-mix(in srgb, var(--text) 5%, transparent);
    --v2-zebra: color-mix(in srgb, var(--text) 2.5%, transparent);
    --v2-wash: rgba(var(--accent-rgb), .1);
    --v2-shadow-1: 0 1px 2px rgba(16, 32, 26, .08);
    --v2-shadow-2: 0 1px 2px rgba(16, 32, 26, .06), 0 10px 28px -14px rgba(16, 32, 26, .28);
    --v2-shadow-pop: 0 0 0 1px var(--v2-line-2), 0 18px 44px -14px rgba(16, 32, 26, .35);
    --surface-2: color-mix(in srgb, #000 4%, var(--bg));
    --surface-3: color-mix(in srgb, #000 8%, var(--bg));
}
/* Mono's page is already #000: lift the wells a touch so they still read. */
html[data-theme="mono"]:not(.design-old) { --v2-inset: #050505; }

/* ======================================================================
   2. BASE + TYPE
   ====================================================================== */
/* Paint the whole viewport, not only what the body covers; in-frame pages stay see-through. */
:where(html:not(.in-frame)) { background: var(--v2-page, var(--bg)); }
:where(html:not(.design-old)) body {
    font-family: var(--v2-font-ui);
    background: var(--v2-page);
    font-feature-settings: "kern";
}
:where(html:not(.design-old)) h1,
:where(html:not(.design-old)) h2,
:where(html:not(.design-old)) h3 {
    font-family: var(--v2-font-display);
    font-stretch: 94%;
    letter-spacing: -.005em;
    color: var(--text-hi, var(--text));
}

/* Section heading: big and mixed case. Labels below are the small caps. */
:where(html:not(.design-old)) .section h1,
:where(html:not(.design-old)) .section h2,
:where(html:not(.design-old)) .section h3,
:where(html:not(.design-old)) .plan-sec > .section:first-child h2 {
    font-size: var(--v2-fs-lg);
    font-weight: 650;
    text-transform: none;
    letter-spacing: -.005em;
    color: var(--text-hi, var(--text));
    line-height: 1.15;
}
:where(html:not(.design-old)) .section { margin: var(--s5) 0 var(--s4); }
:where(html:not(.design-old)) .section .section-note { font-size: var(--v2-fs-sm); color: var(--text-3); }

/* Caps label: field labels, table headers, card eyebrows. */
:where(html:not(.design-old)) .v2-label,
:where(html:not(.design-old)) .field > label,
:where(html:not(.design-old)) th {
    font-family: var(--v2-font-display);
    font-size: var(--v2-fs-xs);
    font-weight: 600;
    font-stretch: 92%;
    letter-spacing: var(--v2-track-caps);
    text-transform: uppercase;
    color: var(--text-3);
}
:where(html:not(.design-old)) .field .hint { font-size: 12.5px; color: var(--text-4); }

/* ======================================================================
   3. KEY NUMBERS
   ====================================================================== */
:where(html:not(.design-old)) .v2-num,
:where(html:not(.design-old)) .tk-val,
:where(html:not(.design-old)) .gmt-clock,
:where(html:not(.design-old)) .room-code,
:where(html:not(.design-old)) #lapDelta .ld-num,
:where(html:not(.design-old)) .call-word,
:where(html:not(.design-old)) .ev-val,
:where(html:not(.design-old)) .wx-v,
:where(html:not(.design-old)) .big,
:where(html:not(.design-old)) .dv-tile > b,
:where(html:not(.design-old)) .eh-cell b,
:where(html:not(.design-old)) .eh-clock b,
:where(html:not(.design-old)) .field.is-derived .value {
    font-family: var(--v2-font-display);
    font-variant-numeric: tabular-nums lining-nums;
    font-stretch: 84%;
    letter-spacing: -.01em;
}
:where(html:not(.design-old)) .v2-num,
:where(html:not(.design-old)) #lapDelta .ld-num,
:where(html:not(.design-old)) .call-word,
:where(html:not(.design-old)) .dv-tile > b { font-weight: 700; line-height: .95; }
:where(html:not(.design-old)) .v2-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:where(html:not(.design-old)) .v2-kpi-value {
    font-family: var(--v2-font-display); font-size: var(--v2-fs-xl); font-weight: 700;
    font-stretch: 84%; line-height: .95; letter-spacing: -.015em;
    font-variant-numeric: tabular-nums lining-nums; color: var(--text-hi, var(--text));
}
:where(html:not(.design-old)) .v2-kpi-unit { font-size: .45em; font-weight: 600; color: var(--text-3); margin-left: .15em; letter-spacing: 0; }
:where(html:not(.design-old)) .field.is-derived .value { font-size: 18px; font-weight: 600; color: var(--text-hi, var(--text)); }

/* ======================================================================
   4. SURFACES
   ====================================================================== */
:where(html:not(.design-old)) .v2-card,
:where(html:not(.design-old)) .panel {
    background: var(--v2-panel);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-md);
    box-shadow: var(--v2-shadow-1);
}
:where(html:not(.design-old)) .v2-card { padding: var(--s4); }
:where(html:not(.design-old)) .v2-card-2 { background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); padding: var(--s3); }
:where(html:not(.design-old)) .v2-quiet { border-top: 1px solid var(--v2-line); padding-top: var(--s3); }
/* The one card to look at: an accent rail down its left edge. */
:where(html:not(.design-old)) .v2-rail { box-shadow: inset 3px 0 0 var(--accent), var(--v2-shadow-1); }

/* ======================================================================
   5. HEADER, NAV, THEME MENU, TICKER
   ====================================================================== */
/* The header is a full-width band, not a floating box. */
:where(html:not(.design-old)) .top-bar {
    margin: 0 0 var(--s4);
    padding: 10px 4px;
    background: var(--v2-panel);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    /* Full-bleed band + bottom hairline painted outside #app by border-image
       outset: no clip-path or transform, so the header's dropdowns are never
       clipped or trapped in a stacking context. */
    border-image: linear-gradient(to top, var(--v2-line) 1px, var(--v2-panel) 1px) fill 0 / 0 / 0 100vmax;
}
:where(html:not(.design-old)) .site-link {
    font-family: var(--v2-font-display);
    font-size: 12.5px;
    font-weight: 600;
    font-stretch: 88%;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
    border-radius: var(--v2-r-sm);
    padding: 8px 8px;
}
:where(html:not(.design-old)) .site-link:hover { color: var(--text); background: var(--v2-hover); }
:where(html:not(.design-old)) .site-link.is-here { color: var(--text-hi, var(--text)); background: none; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
/* Companion dot (site-nav.js): a 32x44 target around a 10px light, green when connected. */
.sn-comp { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px; border-radius: 8px; flex: none; }
.sn-comp[hidden] { display: none; }
.sn-comp:hover { background: var(--v2-hover, var(--panel-2)); }
.sn-comp:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-4); box-shadow: 0 0 0 2px var(--v2-panel, var(--panel)); }
.sn-comp.is-on .sn-dot { background: #22c55e; }

:where(html:not(.design-old)) .room-chip { background: transparent; border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); }
:where(html:not(.design-old)) .room-code { color: var(--accent); font-size: 16px; font-weight: 650; letter-spacing: .06em; }
:where(html:not(.design-old)) .gmt-clock {
    background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md);
    color: var(--text-hi, var(--text)); font-size: 15px; font-weight: 600; min-height: var(--v2-h-md);
}
:where(html:not(.design-old)) .clock-zone { border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); background: var(--v2-inset); padding: 2px; gap: 2px; }
:where(html:not(.design-old)) .clock-zone button {
    background: none; border-radius: var(--v2-r-sm); color: var(--text-3);
    font: 600 12px var(--v2-font-display); letter-spacing: .06em; text-transform: uppercase;
}
:where(html:not(.design-old)) .clock-zone button[aria-pressed="true"] { background: var(--v2-overlay); color: var(--text-hi, var(--text)); box-shadow: var(--v2-shadow-1); }

:where(html:not(.design-old)) .top-btn { height: var(--v2-h-md); }
:where(html:not(.design-old)) .top-btn,
:where(html:not(.design-old)) .theme-trigger {
    min-height: var(--v2-h-md);
    background: var(--v2-raise); border: 1px solid var(--v2-line-2); border-radius: var(--v2-r-md);
    color: var(--text); font-family: var(--v2-font-display); font-size: 14px; font-weight: 600;
    box-shadow: var(--v2-shadow-1);
}
:where(html:not(.design-old)) .top-btn:hover,
:where(html:not(.design-old)) .theme-trigger:hover { background: var(--v2-overlay); border-color: var(--line-3); }

:where(html:not(.design-old)) .theme-menu {
    background: var(--v2-overlay); border: 0; border-radius: var(--v2-r-lg);
    box-shadow: var(--v2-shadow-pop); padding: 4px;
    animation: v2-pop var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) .theme-menu button { min-height: 34px; border-radius: var(--v2-r-sm); font-family: var(--v2-font-display); font-size: 14px; }
:where(html:not(.design-old)) .theme-menu button:hover { background: var(--v2-hover); }
:where(html:not(.design-old)) .theme-menu button.is-current { background: var(--v2-wash); }

/* ---- Top bar: one row (topbar.js builds the "more" menu) -------------
   Left: logo, nav, room chip. Right: engineer | clock | more | account.
   Controls are ghost (no box each); groups are split by hairline dividers. */
:where(html:not(.design-old)) .top-bar {
    position: relative;
    flex-direction: row; flex-wrap: nowrap; align-items: center;
    gap: var(--s4); min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}
:where(html:not(.design-old)) .top-bar-left,
:where(html:not(.design-old)) .top-bar-right {
    min-height: 44px; flex-wrap: nowrap; align-items: center; width: auto;
}
:where(html:not(.design-old)) .top-bar-left { flex: 1 1 auto; min-width: 0; gap: var(--s4); }
:where(html:not(.design-old)) .top-bar-right { flex: 0 0 auto; gap: 2px; }
:where(html:not(.design-old)) .site-nav { flex: 0 0 auto; flex-wrap: nowrap; gap: 2px; }
:where(html:not(.design-old)) .top-bar-right > .clock-group,
:where(html:not(.design-old)) .top-bar-right > .tb-more,
:where(html:not(.design-old)) .top-bar-right > .user-menu {
    margin-left: var(--s2); padding-left: var(--s2); border-left: 1px solid var(--v2-line);
}
:where(html:not(.design-old)) .top-bar-right > .tb-more { margin-left: var(--s1); padding-left: var(--s1); }
:where(html:not(.design-old)) .top-bar-right > :first-child { margin-left: 0; padding-left: 0; border-left: 0; }

/* Ghost control: the shared look of every bar button. Plain prefix: it must
   beat the styles engineer-header.js injects at runtime. */
html:not(.design-old) .top-bar .room-name,
html:not(.design-old) .top-bar .split-btn,
html:not(.design-old) .room-copy-btn,
html:not(.design-old) .top-bar .eh-btn,
html:not(.design-old) .top-bar .gmt-clock,
html:not(.design-old) .tb-more-btn,
html:not(.design-old) .top-bar .user-trigger {
    min-height: 40px; height: 40px; margin: 0; padding: 0 10px;
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid transparent; border-radius: var(--v2-r-md);
    box-shadow: none; color: var(--text-2);
    font-family: var(--v2-font-display); font-size: 14px; font-weight: 600;
}
html:not(.design-old) .top-bar .room-name:hover,
html:not(.design-old) .top-bar .split-btn:hover,
html:not(.design-old) .room-copy-btn:hover,
html:not(.design-old) .top-bar .eh-btn:hover,
html:not(.design-old) .top-bar .gmt-clock:hover,
html:not(.design-old) .tb-more-btn:hover,
html:not(.design-old) .top-bar .user-trigger:hover { background: var(--v2-hover); color: var(--text-hi, var(--text)); border-color: transparent; }
html:not(.design-old) .tb-more-btn[aria-expanded="true"],
html:not(.design-old) .top-bar .eh-btn[aria-expanded="true"] { background: var(--v2-hover); color: var(--text-hi, var(--text)); }

html:not(.design-old) .top-bar :is(.room-name, .split-btn, .room-copy-btn, .eh-btn, .gmt-clock, .tb-more-btn, .user-trigger):focus-visible,
html:not(.design-old) .tb-menu :is(button, a):focus-visible { outline: none; box-shadow: var(--v2-focus); border-color: var(--accent); }

/* Split view: icon + label on wide screens, icon only below 1700px (the
   button is hidden below 1100px, where split-view.js won't open it). */
html:not(.design-old) .top-bar .split-btn.is-on,
html:not(.design-old) .top-bar .split-btn[aria-pressed="true"] { color: var(--accent); background: var(--v2-wash); }
@media (min-width: 1700px) { :where(html:not(.design-old)) .top-bar .split-btn .split-label { display: inline; } }
@media (max-width: 1699px) { :where(html:not(.design-old)) .top-bar .split-btn .split-label { display: none; } }
@media (max-width: 1100px) { html:not(.design-old) .top-bar .split-btn { display: none; } }

/* Room chip: name, code, copy icon, one compact group. */
:where(html:not(.design-old)) .top-bar .room-chip {
    flex: 0 1 auto; min-width: 0; gap: 0; padding: 0 0 0 var(--s3);
    background: none; border: 0; border-left: 1px solid var(--v2-line); border-radius: 0;
}
html:not(.design-old) .top-bar .room-name { min-width: 9ch; max-width: 34ch; color: var(--text); padding-right: 6px; }
:where(html:not(.design-old)) .top-bar .room-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(html:not(.design-old)) .top-bar .room-name-pencil { color: var(--text-4); font-size: 12px; }
:where(html:not(.design-old)) .top-bar .room-code { padding: 0 2px 0 4px; font-size: 15px; white-space: nowrap; }
html:not(.design-old) .room-copy-btn { width: 36px; padding: 0; justify-content: center; color: var(--text-3); }
html:not(.design-old) .room-copy-btn:hover { color: var(--accent); }

/* Engineer (engineer-header.js): icon + On/Off. */
/* "Engineer: Off" in words at every width: "off" alone read as nothing. */
html:not(.design-old) .top-bar .eh-word { display: inline; }
:where(html:not(.design-old)) .eh-btn { font-size: 13px; }
html:not(.design-old) .top-bar .eh-btn.is-on { color: var(--accent); }
html:not(.design-old) .top-bar .eh-btn.is-locked { color: var(--warn); }
:where(html:not(.design-old)) .eh-panel {
    background: var(--v2-overlay); border: 0; border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
}

/* Clock: the time, then UTC|Local, then 12H|24H, one group (the "…" menu's Clock row when the bar is crowded). */
:where(html:not(.design-old)) .clock-group { display: inline-flex; align-items: center; gap: 6px; }
:where(html:not(.design-old)) .top-bar .gmt-clock { color: var(--text-hi, var(--text)); font-size: 16px; padding: 0 8px; white-space: nowrap; }
:where(html:not(.design-old)) .clock-zone {
    display: inline-flex; flex: 0 0 auto; gap: 1px; padding: 2px;
    background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md);
}
:where(html:not(.design-old)) .clock-zone button {
    min-height: 26px; height: 26px; margin: 0; padding: 0 7px; border: 0; box-shadow: none;
    background: none; border-radius: var(--v2-r-sm); color: var(--text-3);
    font: 600 11px var(--v2-font-display); letter-spacing: .06em; text-transform: uppercase;
}
:where(html:not(.design-old)) .clock-zone button:hover { color: var(--text); background: var(--v2-hover); }
:where(html:not(.design-old)) .clock-zone button[aria-pressed="true"] { background: var(--v2-overlay); color: var(--text-hi, var(--text)); box-shadow: var(--v2-shadow-1); }

/* More / hamburger */
:where(html:not(.design-old)) .tb-more { display: inline-flex; }
:where(html:not(.design-old)) .tb-more-btn { width: 40px; padding: 0; justify-content: center; }
:where(html:not(.design-old)) .tb-ico-burger { display: block; }
:where(html:not(.design-old)) .top-bar .user-trigger { padding: 0 8px 0 4px; }
:where(html:not(.design-old)) .top-bar .user-trigger.is-signed-in { padding: 0 4px; }

:where(html:not(.design-old)) .tb-menu {
    position: absolute; top: calc(100% + 4px); right: 0;
    width: min(300px, calc(100vw - 16px)); max-height: calc(100dvh / var(--z, 1) - 90px); overflow-y: auto;
    padding: 6px; background: var(--v2-overlay); border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
    display: flex; flex-direction: column;
    animation: v2-pop var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) .tb-menu[hidden] { display: none; }
:where(html:not(.design-old)) .tb-slot { display: flex; flex-direction: column; gap: 1px; }
:where(html:not(.design-old)) .tb-slot:empty { display: none; }
:where(html:not(.design-old)) .tb-slot:not(:empty) ~ .tb-slot:not(:empty) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--v2-line); }
/* Rows inside the menu */
:where(html:not(.design-old)) .tb-menu .top-btn,
:where(html:not(.design-old)) .tb-menu .split-btn,
:where(html:not(.design-old)) .tb-menu .theme-trigger,
:where(html:not(.design-old)) .tb-menu .site-link,
:where(html:not(.design-old)) .tb-menu .user-trigger {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; min-height: 40px; margin: 0;
    padding: 0 10px; justify-content: flex-start; flex: none;
    background: none; border: 0; border-radius: var(--v2-r-sm); box-shadow: none;
    color: var(--text-2); font-family: var(--v2-font-display); font-size: 14px; font-weight: 600;
    text-transform: none; letter-spacing: 0; text-align: left;
}
:where(html:not(.design-old)) .tb-menu .top-btn:hover,
:where(html:not(.design-old)) .tb-menu .split-btn:hover,
:where(html:not(.design-old)) .tb-menu .theme-trigger:hover,
:where(html:not(.design-old)) .tb-menu .site-link:hover,
:where(html:not(.design-old)) .tb-menu .user-trigger:hover { background: var(--v2-hover); color: var(--text-hi, var(--text)); }
:where(html:not(.design-old)) .tb-menu .site-link.is-here { color: var(--text-hi, var(--text)); box-shadow: inset 3px 0 0 var(--accent); }
:where(html:not(.design-old)) .tb-menu .site-nav { flex-direction: column; align-items: stretch; }
:where(html:not(.design-old)) .tb-menu .split-btn .split-label,
:where(html:not(.design-old)) .tb-menu .theme-picker .theme-name { display: inline; }
:where(html:not(.design-old)) .tb-menu .theme-picker { display: block; }
:where(html:not(.design-old)) .tb-menu .theme-caret { margin-left: auto; }
:where(html:not(.design-old)) .tb-menu .user-menu { display: block; }
/* Sub-menus open in place inside the panel, not as a second popup. */
:where(html:not(.design-old)) .tb-menu .theme-menu,
:where(html:not(.design-old)) .tb-menu .user-dropdown {
    position: static; width: auto; min-width: 0; max-height: none; margin: 2px 0 4px;
    box-shadow: none; background: var(--v2-inset); border: 0; animation: none;
}
:where(html:not(.design-old)) .tb-menu .clock-group { flex-wrap: wrap; padding: 4px 2px; }

/* Room menu (planner): "Room ▾" beside the room chip; grouped panel under it; a full-height sheet on a phone. */
:where(html:not(.design-old)) .tb-room { display: inline-flex; flex: none; }
html:not(.design-old) .tb-room-btn {
    min-height: 40px; height: 40px; margin: 0; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); box-shadow: none;
    color: var(--text-2); font: 600 14px var(--v2-font-display); white-space: nowrap; cursor: pointer;
}
html:not(.design-old) .tb-room-btn:hover,
html:not(.design-old) .tb-room-btn[aria-expanded="true"] { background: var(--v2-hover); color: var(--text-hi, var(--text)); }
html:not(.design-old) .tb-room-btn:focus-visible { outline: none; box-shadow: var(--v2-focus); border-color: var(--accent); }
:where(html:not(.design-old)) .tb-caret { font-size: 11px; color: var(--text-4); }
/* 360px: the Clock row (label, time, UTC|Local, 12H|24H) fits on one line. */
html:not(.design-old) #tbRoomMenu { right: auto; left: var(--tb-room-x, 0); width: min(360px, calc(100vw - 16px)); }
:where(html:not(.design-old)) #tbRoomMenu .tb-h {
    padding: 10px 10px 4px; color: var(--text-4); font: 600 11px var(--v2-font-display); letter-spacing: .08em; text-transform: uppercase;
}
:where(html:not(.design-old)) #tbRoomMenu .tb-h:not(:nth-child(2)) { margin-top: 6px; border-top: 1px solid var(--v2-line); padding-top: 12px; }
:where(html:not(.design-old)) #tbRoomMenu .tb-slot ~ .tb-slot { margin-top: 0; padding-top: 0; border-top: 0; }
:where(html:not(.design-old)) #tbRoomMenu .top-btn[hidden] { display: none; }
:where(html:not(.design-old)) .tb-menu .tb-sheet-head { display: none; }
:where(html:not(.design-old)) #tbRoomMenu .clock-group { padding: 0; }
:where(html:not(.design-old)) #tbRoomMenu .gmt-clock { width: auto; justify-content: flex-start; padding: 0 6px; }
/* Room name: wraps to two lines before it is cut, and the tooltip (state.js) carries the whole name. */
html:not(.design-old) .top-bar.tb-in-room .room-name { max-width: 20ch; }
:where(html:not(.design-old)) .top-bar.tb-in-room .room-name-text {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    white-space: normal; overflow-wrap: anywhere; line-height: 1.15; text-align: left;
}
/* People is in the Room menu; the bar keeps name, code and copy. */
html:not(.design-old) .top-bar #roomPeopleBtn { display: none; }
@media (max-width: 820px) {
    /* In a room the logo shrinks to its mark: the room name needs the width more than the wordmark. */
    html:not(.design-old) .top-bar.tb-in-room .brand-logo-img { width: 22px; object-fit: cover; object-position: left center; }
    html:not(.design-old) .top-bar.tb-in-room .room-name { min-width: 0; max-width: none; font-size: 13px; }
    /* Both menus are full-height sheets on a phone (modal: topbar.js), the page behind them does not scroll. */
    html.tb-open { overflow: hidden; }
    html:not(.design-old) :is(#tbRoomMenu, #tbMenu) {
        position: fixed; inset: 0 0 0 auto; left: auto; width: min(360px, 100vw); max-height: none; height: 100dvh;
        border-radius: 0; padding: 0 8px 16px; overscroll-behavior: contain;
    }
    :where(html:not(.design-old)) .tb-menu .tb-sheet-head {
        display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
        min-height: 56px; margin: 0 -8px; padding: 0 8px 0 18px; background: var(--v2-overlay); border-bottom: 1px solid var(--v2-line);
        color: var(--text-hi, var(--text)); font: 650 16px var(--v2-font-display);
    }
    html:not(.design-old) .tb-menu .tb-sheet-x {
        width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none;
        color: var(--text-2); font-size: 26px; line-height: 1; cursor: pointer;
    }
    :where(html:not(.design-old)) #tbRoomMenu .tb-h:nth-child(2) { margin-top: 0; }
    :where(html:not(.design-old)) #tbRoomMenu .top-btn { height: 44px; min-height: 44px; }
    :where(html:not(.design-old)) #tbMenu .tb-sheet-head + .tb-slot:not(:empty) { margin-top: 6px; }
    /* Touch rows: nav, account and theme rows are 44px tall in the sheet. */
    html:not(.design-old) #tbMenu :is(.top-btn, .split-btn, .theme-trigger, .site-link, .user-trigger) { height: 44px; min-height: 44px; }
    html:not(.design-old) #tbMenu :is(.um-item, .theme-menu button) { min-height: 44px; }
    /* The bar keeps logo, name, Room, engineer, ☰; code, copy and People are in the Room sheet. */
    html:not(.design-old) .top-bar .room-code,
    html:not(.design-old) .top-bar .room-copy-btn { display: none; }
    html:not(.design-old) .tb-room-btn { padding: 0 8px; }
}

/* Phone: logo, room chip, engineer, hamburger. */
@media (max-width: 820px) {
    :where(html:not(.design-old)) .top-bar { gap: var(--s2); padding-left: 0; padding-right: 0; min-height: 56px; }
    :where(html:not(.design-old)) .top-bar-left { gap: var(--s2); }
    :where(html:not(.design-old)) .top-bar .brand-logo-img { height: 24px; }
    :where(html:not(.design-old)) .top-bar .room-chip { padding-left: var(--s2); }
    html:not(.design-old) .top-bar .room-name { max-width: 9ch; padding: 0 4px; }
    :where(html:not(.design-old)) .top-bar .room-name-pencil { display: none; }
    :where(html:not(.design-old)) .top-bar .room-code { font-size: 14px; }
    html:not(.design-old) .room-copy-btn { width: 32px; }
    html:not(.design-old) .top-bar .eh-btn { padding: 0 8px; }
    :where(html:not(.design-old)) .top-bar-right > .tb-more { border-left: 0; margin-left: 0; padding-left: 0; }
}
@media (max-width: 380px) {
    html:not(.design-old) .top-bar .room-name { display: none; }
}

/* Dash and Debrief bars: the same ghost controls and segmented presets. */
:where(html:not(.design-old)) .dx-bar,
:where(html:not(.design-old)) .db-bar { background: var(--v2-panel); border-bottom: 1px solid var(--v2-line); }
:where(html:not(.design-old)) .dx-btn {
    background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2);
    font-family: var(--v2-font-display); font-weight: 600;
}
html:not(.design-old) .dx-bar .eh-btn { border-color: transparent; font-family: var(--v2-font-display); font-weight: 600; }
html:not(.design-old) .dx-bar .eh-btn:hover { background: var(--v2-hover); }
:where(html:not(.design-old)) .dx-btn:hover { background: var(--v2-hover); color: var(--text-hi, var(--text)); border-color: transparent; }
:where(html:not(.design-old)) .dx-seg { padding: 2px; gap: 1px; background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); }
:where(html:not(.design-old)) .dx-seg button { border: 0; box-shadow: none; background: none; color: var(--text-3); font-family: var(--v2-font-display); font-weight: 600; border-radius: var(--v2-r-sm); }
:where(html:not(.design-old)) .dx-seg button:first-child,
:where(html:not(.design-old)) .dx-seg button:last-child { border-radius: var(--v2-r-sm); margin-left: 0; }

/* Dash on a phone: the tools are one row that scrolls sideways, so the bar
   stays short and the grid keeps its tiles. The theme menu is fixed so the
   scroller can't clip it. */
@media (max-width: 760px) {
    :where(html:not(.design-old)) .dx-tools {
        flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
        scrollbar-width: none; gap: 6px; padding-bottom: 2px;
    }
    :where(html:not(.design-old)) .dx-tools::-webkit-scrollbar { display: none; }
    :where(html:not(.design-old)) .dx-tools > * { flex: 0 0 auto; }
    html:not(.design-old) .dx-tools .theme-menu { position: fixed; top: 56px; right: 8px; }
}

/* Menus above everything on the page (sticky Plan tabs, ticker, plan strip);
   toasts and dialogs above menus. Plain prefix: these must beat the styles
   account.js and engineer-header.js inject at runtime. */
html:not(.design-old) .race-ticker { z-index: var(--z-ticker); }
html:not(.design-old) .plan-jump { z-index: var(--z-sticky); }
html:not(.design-old) .theme-menu,
html:not(.design-old) .user-dropdown,
html:not(.design-old) .eh-panel,
html:not(.design-old) .tb-menu { z-index: var(--z-dropdown); }
html:not(.design-old) #toast { z-index: var(--z-toast); }
html:not(.design-old) .cfm-back { z-index: var(--z-dialog); }

/* Ticker: the darkest strip on the page, values in the number face. */
:where(html:not(.design-old)) .race-ticker {
    background: var(--v2-inset);
    border-bottom: 1px solid var(--v2-line);
    box-shadow: inset 0 -1px 0 rgba(var(--accent-rgb), .25);
}
:where(html:not(.design-old)) .ticker-item { border-right-color: var(--v2-line); }
:where(html:not(.design-old)) .ticker-item .tk-label {
    font-family: var(--v2-font-display); font-size: 10.5px; font-weight: 600;
    letter-spacing: var(--v2-track-caps); color: var(--text-4);
}
:where(html:not(.design-old)) .ticker-item .tk-val { font-size: 16px; font-weight: 650; }

/* ======================================================================
   6. TABS AND SEGMENTED CONTROLS
   ====================================================================== */
/* Level 1 — Plan / Drivers / Race: big words, a 3px accent bar under the one you're on. */
:where(html:not(.design-old)) nav.tabs { border-bottom: 1px solid var(--v2-line); gap: var(--s2); }
:where(html:not(.design-old)) nav.tabs .tab {
    font-family: var(--v2-font-display); font-size: 18px; font-weight: 600; font-stretch: 94%;
    padding: 10px var(--s3) 9px; color: var(--text-3); border-radius: 0;
    transition: color var(--v2-fast) var(--v2-ease), box-shadow var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) nav.tabs .tab:hover { color: var(--text); }
:where(html:not(.design-old)) nav.tabs .tab.active { color: var(--text-hi, var(--text)); background: none; box-shadow: inset 0 -3px 0 var(--accent); }

/* Level 2 — segmented control: an inset track, the selected item raised. */
:where(html:not(.design-old)) .v2-seg,
:where(html:not(.design-old)) .plan-jump,
:where(html:not(.design-old)) .subtabs {
    background: var(--v2-inset);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-md);
    padding: 3px;
    gap: 2px;
}
:where(html:not(.design-old)) .plan-jump { box-shadow: 0 -8px 0 var(--v2-page); }
:where(html:not(.design-old)) .v2-seg > *,
:where(html:not(.design-old)) .plan-jump a,
:where(html:not(.design-old)) .subtab {
    font-family: var(--v2-font-display); font-size: 14px; font-weight: 600; font-stretch: 94%;
    color: var(--text-3); border-radius: var(--v2-r-sm); padding: 7px 14px;
    transition: background-color var(--v2-fast) var(--v2-ease), color var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) .v2-seg > *:hover,
:where(html:not(.design-old)) .plan-jump a:hover,
:where(html:not(.design-old)) .subtab:hover { color: var(--text); background: var(--v2-hover); }
:where(html:not(.design-old)) .v2-seg > .is-on,
:where(html:not(.design-old)) .v2-seg > [aria-pressed="true"],
:where(html:not(.design-old)) .plan-jump a.is-on,
:where(html:not(.design-old)) .subtab.active {
    color: var(--text-hi, var(--text));
    background: var(--v2-overlay);
    box-shadow: inset 0 -2px 0 var(--accent), var(--v2-shadow-1);
}

/* ======================================================================
   7. BUTTONS — primary / secondary (default) / ghost / danger
   ====================================================================== */
:where(html:not(.design-old)) button,
:where(html:not(.design-old)) .v2-btn {
    font-family: var(--v2-font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    min-height: var(--v2-h-md);
    border-radius: var(--v2-r-md);
    background: var(--v2-raise);
    border: 1px solid var(--v2-line-2);
    color: var(--text);
    box-shadow: var(--v2-shadow-1);
    transition: background-color var(--v2-fast) var(--v2-ease), border-color var(--v2-fast) var(--v2-ease),
        color var(--v2-fast) var(--v2-ease), transform var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) button:hover,
:where(html:not(.design-old)) .v2-btn:hover { background: var(--v2-overlay); border-color: var(--line-3); color: var(--text-hi, var(--text)); }
:where(html:not(.design-old)) button:focus-visible,
:where(html:not(.design-old)) .v2-btn:focus-visible { box-shadow: var(--v2-focus); border-color: var(--accent); }

:where(html:not(.design-old)) .btn-primary,
:where(html:not(.design-old)) a.btn-primary {
    background: var(--accent); border-color: var(--accent); color: var(--ink);
    font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 0, 0, .35);
}
:where(html:not(.design-old)) .btn-primary:hover,
:where(html:not(.design-old)) a.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }

:where(html:not(.design-old)) .btn-ghost,
:where(html:not(.design-old)) a.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
:where(html:not(.design-old)) .btn-ghost:hover,
:where(html:not(.design-old)) a.btn-ghost:hover { background: var(--v2-hover); border-color: transparent; color: var(--text-hi, var(--text)); }

:where(html:not(.design-old)) .btn-danger,
:where(html:not(.design-old)) a.btn-danger { background: transparent; color: var(--crit); border-color: color-mix(in srgb, var(--crit) 45%, transparent); box-shadow: none; }
:where(html:not(.design-old)) .btn-danger:hover,
:where(html:not(.design-old)) a.btn-danger:hover { background: var(--crit-dim); border-color: var(--crit); color: var(--crit); }

:where(html:not(.design-old)) a.btn-primary,
:where(html:not(.design-old)) a.btn-ghost,
:where(html:not(.design-old)) a.btn-danger,
:where(html:not(.design-old)) a.v2-btn { min-height: var(--v2-h-md); border-radius: var(--v2-r-md); font-family: var(--v2-font-display); font-weight: 600; }
:where(html:not(.design-old)) .v2-btn-sm { min-height: var(--v2-h-sm); font-size: var(--v2-fs-sm); padding: 0 10px; }
:where(html:not(.design-old)) .v2-btn-lg { min-height: var(--v2-h-lg); font-size: 16px; padding: 0 20px; }

/* Existing variants mapped onto the system */
:where(html:not(.design-old)) .room-copy-btn { background: var(--v2-wash); border: 1px solid rgba(var(--accent-rgb), .5); color: var(--accent); border-radius: var(--v2-r-sm); min-height: var(--v2-h-sm); box-shadow: none; }
:where(html:not(.design-old)) .btn-download {
    min-height: var(--v2-h-sm); border-radius: var(--v2-r-md); background: var(--v2-raise);
    border: 1px solid var(--v2-line-2); color: var(--text); font-family: var(--v2-font-display); font-size: 13px; font-weight: 600;
}
:where(html:not(.design-old)) .btn-download:hover { background: var(--v2-overlay); border-color: var(--line-3); }
:where(html:not(.design-old)) .section-act {
    min-height: var(--v2-h-sm); border-radius: var(--v2-r-sm); font-family: var(--v2-font-display);
    font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); box-shadow: none;
}
:where(html:not(.design-old)) .section-act-primary { color: var(--accent); border-color: rgba(var(--accent-rgb), .55); background: var(--v2-wash); }

@media (pointer: coarse) {
    :where(html:not(.design-old)) button,
    :where(html:not(.design-old)) .v2-btn,
    :where(html:not(.design-old)) a.btn-primary,
    :where(html:not(.design-old)) a.btn-ghost,
    :where(html:not(.design-old)) a.btn-danger,
    :where(html:not(.design-old)) .top-btn { min-height: 44px; }
}

/* ======================================================================
   8. INPUTS AND SELECTS — inset wells
   ====================================================================== */
:where(html:not(.design-old)) input[type="text"],
:where(html:not(.design-old)) input[type="number"],
:where(html:not(.design-old)) input[type="url"],
:where(html:not(.design-old)) input[type="email"],
:where(html:not(.design-old)) input[type="search"],
:where(html:not(.design-old)) input[type="password"],
:where(html:not(.design-old)) input[type="datetime-local"],
:where(html:not(.design-old)) input[type="time"],
:where(html:not(.design-old)) input[type="date"],
:where(html:not(.design-old)) select,
:where(html:not(.design-old)) textarea {
    background: var(--v2-inset);
    border: 1px solid var(--v2-line-2);
    border-radius: var(--v2-r-md);
    color: var(--text-hi, var(--text));
    font-family: var(--v2-font-display);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    min-height: 40px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
    transition: border-color var(--v2-fast) var(--v2-ease), box-shadow var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) input:hover:not(:disabled):not(:focus),
:where(html:not(.design-old)) select:hover:not(:disabled):not(:focus),
:where(html:not(.design-old)) textarea:hover:not(:disabled):not(:focus) { border-color: var(--line-3); }
:where(html:not(.design-old)) input:focus,
:where(html:not(.design-old)) select:focus,
:where(html:not(.design-old)) textarea:focus { border-color: var(--accent); box-shadow: var(--v2-focus); outline: none; }
:where(html:not(.design-old)) input::placeholder,
:where(html:not(.design-old)) select::placeholder,
:where(html:not(.design-old)) textarea::placeholder { color: var(--text-4); }
:where(html[data-theme="daylight"]:not(.design-old)) :is(input, select, textarea) { box-shadow: inset 0 1px 1px rgba(16, 32, 26, .06); }
:where(html:not(.design-old)) input[type="datetime-local"],
:where(html:not(.design-old)) input[type="time"],
:where(html:not(.design-old)) input[type="date"] { color-scheme: inherit; }
@media (pointer: coarse) {
    :where(html:not(.design-old)) input[type="text"],
    :where(html:not(.design-old)) input[type="number"],
    :where(html:not(.design-old)) input[type="datetime-local"],
    :where(html:not(.design-old)) select { min-height: 44px; }
}

/* ======================================================================
   9. TABLES — row lines only, caps headers, zebra + hover, numbers right
   ====================================================================== */
:where(html:not(.design-old)) .table-wrap {
    background: var(--v2-panel);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-md);
    box-shadow: var(--v2-shadow-1);
}
:where(html:not(.design-old)) table { background: transparent; }
:where(html:not(.design-old)) th,
:where(html:not(.design-old)) td {
    border: 0;
    border-bottom: 1px solid var(--v2-line);
    padding: 9px 12px;
}
:where(html:not(.design-old)) td { font-size: 13.5px; }
:where(html:not(.design-old)) th {
    background: var(--v2-raise);
    border-bottom-color: var(--v2-line-2);
    padding-top: 10px; padding-bottom: 10px;
    white-space: nowrap;
}
:where(html:not(.design-old)) tbody tr:last-child > td { border-bottom: 0; }
:where(html:not(.design-old) tbody tr:nth-child(even)) { background-color: var(--v2-zebra); }
:where(html:not(.design-old) tbody tr:hover) { background-color: var(--v2-hover); }
:where(html:not(.design-old)) td.num,
:where(html:not(.design-old)) th.num,
:where(html:not(.design-old)) .v2-numcol { text-align: right; font-variant-numeric: tabular-nums; }

/* ======================================================================
   10. PILLS / BADGES
   ====================================================================== */
:where(html:not(.design-old)) .v2-pill {
    display: inline-flex; align-items: center; gap: 5px;
    height: 22px; padding: 0 9px; border-radius: var(--v2-r-pill);
    font: 600 11px/1 var(--v2-font-display); letter-spacing: .06em; text-transform: uppercase;
    background: var(--v2-hover); color: var(--text-2); border: 1px solid var(--v2-line);
    white-space: nowrap;
}
:where(html:not(.design-old)) .v2-pill.is-accent { background: var(--v2-wash); color: var(--accent); border-color: rgba(var(--accent-rgb), .4); }
:where(html:not(.design-old)) .v2-pill.is-good { background: color-mix(in srgb, var(--dx-good) 14%, transparent); color: var(--dx-good); border-color: color-mix(in srgb, var(--dx-good) 40%, transparent); }
:where(html:not(.design-old)) .v2-pill.is-warn { background: var(--warn-dim); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
:where(html:not(.design-old)) .v2-pill.is-crit { background: var(--crit-dim); color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
:where(html:not(.design-old)) .v2-pill.is-info { background: var(--info-dim); color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
/* A status dot that can sit in a pill or alone. */
:where(html:not(.design-old)) .v2-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ======================================================================
   11. RACE STEPS — a sector bar: one strip, a colored bar per step
   ====================================================================== */
:where(html:not(.design-old)) .rs-row { gap: 2px; }
:where(html:not(.design-old)) .rs-step {
    border: 0; border-radius: 0;
    background: var(--v2-panel);
    box-shadow: inset 0 3px 0 var(--v2-line-2);
}
:where(html:not(.design-old)) .rs-step:first-child { border-radius: var(--v2-r-md) 0 0 var(--v2-r-md); }
:where(html:not(.design-old)) .rs-step:last-child { border-radius: 0 var(--v2-r-md) var(--v2-r-md) 0; }
:where(html:not(.design-old)) .rs-step.is-done { box-shadow: inset 0 3px 0 var(--accent); }
:where(html:not(.design-old)) .rs-step.is-need { box-shadow: inset 0 3px 0 var(--warn); }
:where(html:not(.design-old)) .rs-step.is-next { box-shadow: inset 0 3px 0 var(--accent); background: var(--v2-raise); }
:where(html:not(.design-old)) .rs-step.is-live { box-shadow: inset 0 3px 0 var(--accent); }
:where(html:not(.design-old)) .rs-go { padding: 10px var(--s3) 8px; min-height: 0; background: none; border: 0; box-shadow: none; }
:where(html:not(.design-old)) .rs-go:hover { background: var(--v2-hover); }
:where(html:not(.design-old)) .rs-label { font-family: var(--v2-font-display); font-size: 15px; font-weight: 650; }
:where(html:not(.design-old)) .rs-why { font-variant-numeric: tabular-nums; }
:where(html:not(.design-old)) .rs-mark { border-radius: var(--v2-r-sm); }

/* ======================================================================
   12. TOASTS, DIALOGS, FOOTER
   ====================================================================== */
:where(html:not(.design-old)) #toast {
    background: var(--v2-overlay);
    border-width: 1px 1px 1px 4px;
    border-radius: var(--v2-r-md);
    box-shadow: var(--v2-shadow-pop);
    font-family: var(--v2-font-display);
    font-size: 15px;
    padding: 12px 18px;
    animation: v2-rise var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) dialog,
:where(html:not(.design-old)) .vid-dlg {
    background: var(--v2-raise); color: var(--text);
    border: 0; border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
}
:where(html:not(.design-old)) dialog[open] { animation: v2-pop var(--v2-med) var(--v2-ease); }
:where(html:not(.design-old)) dialog::backdrop,
:where(html:not(.design-old)) .vid-dlg::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
/* askConfirm (toast.js) injects its own <style> later, so these need weight. */
html:not(.design-old) .cfm-back { backdrop-filter: blur(3px); }
html:not(.design-old) .cfm {
    background: var(--v2-raise); border: 0; border-top: 3px solid var(--cfm-tone, var(--warn));
    border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
    animation: v2-pop var(--v2-med) var(--v2-ease);
}
html:not(.design-old) .cfm h2 { font-size: var(--v2-fs-lg); }
html:not(.design-old) .cfm-acts button { border-radius: var(--v2-r-md); font-family: var(--v2-font-display); }

/* Sticky footer: on a short page it sits on the window's bottom edge, on a
   long one it follows the content. Only pages with a footer (not dash.html). */
:where(html:not(.design-old)) body:has(> #siteFooter) { min-height: calc(100dvh / var(--z, 1)); display: flex; flex-direction: column; }
:where(html:not(.design-old)) body:has(> #siteFooter) > #app { flex: 1 0 auto; width: 100%; }
:where(html:not(.design-old)) body > #siteFooter { margin-top: auto; }
:where(html:not(.design-old)) #siteFooter {
    background: var(--v2-inset);
    border-top: 1px solid var(--v2-line);
    color: var(--text-4);
    padding-top: var(--s4);
}
:where(html:not(.design-old)) #siteFooter .footer-links :is(a, button) {
    font-family: var(--v2-font-display); font-size: 12.5px; letter-spacing: .02em; box-shadow: none;
}

/* ======================================================================
   13. MOTION — subtle, and off for reduced motion
   ====================================================================== */
:where(html:not(.design-old)) .content.active,
:where(html:not(.design-old)) .plan-sec:not([hidden]),
:where(html:not(.design-old)) .subcontent.active {
    animation: v2-in var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) button:active:not(:disabled),
:where(html:not(.design-old)) .v2-btn:active:not(:disabled),
:where(html:not(.design-old)) .btn-download:active:not(:disabled) { transform: translateY(1px); }
@keyframes v2-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes v2-rise { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes v2-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
    :where(html:not(.design-old)) * { animation: none !important; transition: none !important; }
}

/* responsive: shell */
/* topbar.js adds .tb-tight when the bar is crowded above the phone width: same squeeze as the phone. */
html:not(.design-old) .top-bar.tb-tight .room-name { max-width: 9ch; padding: 0 4px; }
:where(html:not(.design-old)) .top-bar.tb-tight .room-name-pencil { display: none; }
/* Footer links: the Discord/coffee links keep app.css's size and weight; match the rest. */
html:not(.design-old) #siteFooter .footer-links :is(.discord-link, .bmc-link, .btn-ghost) { font-family: var(--v2-font-display); font-size: 12.5px; font-weight: inherit; letter-spacing: .02em; }
/* The footer rule above clears box-shadow, which is the focus ring. */
html:not(.design-old) #siteFooter .footer-links :is(a, button):focus-visible { box-shadow: var(--v2-focus); }

/* ======================================================================
   14. EXPLANATION — the one shared fold: <details class="explain"><summary>Explanation</summary>…</details>
   Closed by default; theme.js remembers it per data-explain-key on planner pages.
   ====================================================================== */
details.explain { margin: 10px 0 0; border: 1px solid var(--v2-line, var(--surface-3, #2a2f2a)); border-radius: var(--v2-r-md, 6px); background: transparent; min-width: 0; }
details.explain > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; margin: 0; border: 0; background: transparent;
    font: 600 var(--v2-fs-xs, 12px)/1.3 var(--v2-font-display, inherit); letter-spacing: var(--v2-track-caps, .06em); text-transform: uppercase; color: var(--text-2, #9aa39a); }
details.explain > summary::-webkit-details-marker { display: none; }
details.explain > summary::before { content: '\25b8'; color: var(--text-4, #667); transition: transform .12s ease; }
details.explain[open] > summary::before { transform: rotate(90deg); }
details.explain > summary:hover { color: var(--text-hi, var(--text, #fff)); background: var(--v2-hover, rgba(255,255,255,.04)); }
details.explain > summary:focus-visible { outline: none; box-shadow: var(--v2-focus, 0 0 0 2px var(--accent)); }
details.explain > :not(summary) { margin-left: 14px; margin-right: 14px; color: var(--text-2, #9aa39a); font-size: var(--v2-fs-sm, 13px); line-height: 1.5; overflow-wrap: anywhere; }
details.explain > :not(summary):not(.explain-body):last-child { margin-bottom: 12px; }
details.explain > .explain-body { margin: 0; padding: 4px 14px 12px; }
details.explain ul { margin: 4px 0; padding-left: 18px; }
@media (pointer: coarse) { details.explain > summary { min-height: 44px; } }
/* Headline pattern: the action first, one fact under it. */
.do-now { font: 700 28px/1.15 var(--v2-font-display, inherit); color: var(--text-hi, var(--text, #fff)); margin: 0 0 4px; letter-spacing: .01em; }
.do-now.is-urgent { color: var(--crit, #ff5a4f); }
.do-why { color: var(--text-2, #9aa39a); font-size: 14px; margin: 0 0 6px; }
/* "…" menu: the clock group as one labeled Clock row. The group never splits; short of room it wraps under its label. */
:where(html:not(.design-old)) .tb-menu .tb-zone { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 10px; color: var(--text-2); font: 600 14px var(--v2-font-display); }
:where(html:not(.design-old)) .tb-menu .tb-zone[hidden] { display: none; }
:where(html:not(.design-old)) .tb-menu .tb-clock-row { flex-wrap: wrap; row-gap: 4px; padding: 4px 10px; }
:where(html:not(.design-old)) .tb-menu .tb-clock-row > .tb-slot-time { flex-direction: row; margin-left: auto; min-width: 0; max-width: 100%; }
:where(html:not(.design-old)) .tb-menu .tb-clock-row .clock-group { flex-wrap: nowrap; padding: 0; gap: 6px; }
@media (max-width: 820px) { :where(html:not(.design-old)) .tb-menu .tb-clock-row > .tb-slot-time { margin-left: 0; } }
/* Lobby: the pitch is for newcomers; signed in, it is just the logo and your rooms (account.js sets the class). */
#lobby.is-signed-in :is(.lobby-badge, .lobby-headline, .lobby-lede, .lobby-points) { display: none; }
#lobby.is-signed-in .lobby-wrap { grid-template-columns: minmax(0, 440px); justify-content: center; gap: var(--s4); }
#lobby.is-signed-in .lobby-logo { margin: 0 auto; }
/* The card fills the 440px column, so it shares the logo's center (its 360px cap left it 40px to the left). */
#lobby.is-signed-in .lobby-card { max-width: none; }
#lobby.is-signed-in :is(.lobby-card-title, .lobby-aside) { display: none; }
#lobby:not(.is-signed-in) .lobby-quick { display: none; }
/* The demo race: a button for newcomers; signed in it is a Live demo link in .lobby-quick. */
.lobby-demo { display: flex; align-items: center; justify-content: center; margin-top: var(--s2); text-decoration: none; box-sizing: border-box; }
.lobby-demo-note { margin: var(--s2) 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.lobby-racefor { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s2); font-size: 13px; color: var(--text-3); }
.lobby-racefor[hidden] { display: none; }
.lobby-racefor select { flex: 1; min-width: 0; }
#lobby.is-signed-in :is(.lobby-demo, .lobby-demo-note) { display: none; }
/* The public demo room's banner, on the planner and the Race view (js/demo-banner.js). */
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 16px; border-bottom: 1px solid var(--accent);
    background: var(--accent-deep, var(--bg-2)); color: var(--text-hi, var(--text)); font-size: 14px; }
.demo-banner[hidden] { display: none; }
.demo-banner a { color: var(--accent); font-weight: 600; }
.demo-banner .demo-ro-note { color: var(--text-2, inherit); }
.archived-banner .archived-err { color: var(--danger, #f87171); }
.archived-banner .archived-err:empty { display: none; }
/* Read only (read-only-room.js, the demo room): fields readOnly, write controls aria-disabled. Dimmed and dashed, still
 * focusable with the normal focus ring, so a keyboard user can Tab through and read everything. */
.demo-ro [data-ro] { opacity: .6; border-style: dashed !important; cursor: not-allowed; }
.demo-ro [data-ro="text"] { opacity: .75; cursor: text; }
.demo-ro [data-ro]:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 2px; }
.demo-banner .demo-ro-lock { font-size: 15px; }
.plan-locked-badge.is-ro { background: transparent; color: var(--text-2, inherit); border: 1px dashed var(--line, currentColor); }
.demo-banner button { margin: 0 0 0 auto; min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px;
    background: var(--accent); color: var(--ink); font-weight: 700; cursor: pointer; }
.lobby-greet { margin: 0 0 var(--s3); font: 650 22px/1.2 var(--v2-font-display, inherit); color: var(--text-hi, var(--text)); }
#lobby:not(.is-signed-in) .lobby-greet { font-size: 16px; color: var(--text-2); }
.lobby-rejoin { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 var(--s3); min-height: 44px; padding: 0 14px;
    background: var(--accent-deep, transparent); border: 1px solid var(--accent); border-radius: var(--v2-r-md, 8px);
    color: var(--accent); font: 700 15px var(--v2-font-display, inherit); text-align: left; cursor: pointer; }
.lobby-rejoin[hidden] { display: none; }
.lobby-rejoin::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.lobby-quick { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 0; }
.lobby-quick a { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px;
    border: 1px solid var(--line-2); border-radius: var(--v2-r-md, 8px); color: var(--text-2); font-size: 14px; text-decoration: none; }
.lobby-quick a:hover, .lobby-quick a:focus-visible { border-color: var(--accent); color: var(--text-hi, var(--text)); }
.lobby-rooms .lr-live { margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.lobby-companion { display: flex; align-items: center; gap: 8px; margin: var(--s3) 0 0; color: var(--text-3); font-size: 13px; }
.lobby-companion[hidden] { display: none; }
.lobby-companion .lc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
#lobby .lobby-btn-secondary { margin: 0; }   /* the global button margin-right left Join short of the card edge */
.lobby-colors { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.lobby-colors > span { color: var(--text-3); font-size: 12px; }
.lobby-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.lobby-swatches .sw { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(128, 128, 128, .45) inset; }
.lobby-swatches .sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg, #000), 0 0 0 4px var(--accent); }
.lobby-swatches .sw:focus-visible { outline: 2px solid var(--text-hi, #fff); outline-offset: 3px; }
@media (pointer: coarse) { .lobby-swatches { gap: 10px; } .lobby-swatches .sw { width: 30px; height: 30px; } }

/* Companion download (lobby button, planner bar button and menu item): not useful inside the Windows app or on a phone. */
.lobby-dl { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--s2); text-decoration: none; box-sizing: border-box; }
.lobby-dl-hint { margin-top: 6px; }
html:not(.design-old) .top-bar .tb-dl { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: var(--v2-r-md); color: var(--text-2);
    font: 600 14px var(--v2-font-display); text-decoration: none; white-space: nowrap; }
html:not(.design-old) .top-bar .tb-dl:hover, html:not(.design-old) .top-bar .tb-dl:focus-visible { background: var(--v2-hover); color: var(--text-hi, var(--text)); }
html:not(.design-old) .top-bar.tb-phone .tb-dl,
html:not(.design-old) .top-bar.tb-fold .tb-dl { display: none; }   /* folded: the "..." menu item takes over */
@media (max-width: 1280px) { .tb-dl-label { display: none; } }
html.no-dl [data-companion-dl] { display: none !important; }
@media (max-width: 559px), (pointer: coarse) and (max-width: 900px) { [data-companion-dl] { display: none !important; } }

/* Lobby: the header row every page has (logo and page links), pinned to the top of the landing. */
#lobby { padding-top: 64px; box-sizing: border-box; }
#lobby .lobby-top.top-bar { position: absolute; top: 0; left: 0; right: 0; margin: 0; padding-left: 28px; padding-right: 28px; box-sizing: border-box; }
#lobby .lobby-wrap:focus { outline: none; }
@media (max-width: 820px) { #lobby { padding-top: 0; flex-direction: column; justify-content: flex-start !important; } #lobby .lobby-top.top-bar { position: relative; flex: none; align-self: stretch; padding-left: 16px; padding-right: 16px; } }
/* The demo tour (demo-banner.js): five steps under the banner, from the pit call to Start your own room. */
.demo-tour { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 16px; background: var(--bg-2);
    border-bottom: 1px solid var(--line-2); }
.demo-tour[hidden] { display: none; }
.dt-dots { display: flex; gap: 6px; flex: none; }
.dt-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.dt-dots .past { background: var(--accent-deep, var(--text-3)); outline: 1px solid var(--accent); }
.dt-dots .on { width: 22px; border-radius: 4px; background: var(--accent); }
.dt-body { flex: 1 1 320px; min-width: 0; }
.dt-step { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.demo-tour .dt-title { margin: 2px 0 2px; padding: 0; border: 0; font: 700 17px/1.25 var(--v2-font-display, inherit); color: var(--text-hi, var(--text)); }
.dt-text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2, var(--text)); max-width: 70ch; }
.dt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dt-actions button { min-height: 38px; padding: 0 16px; border-radius: 8px; font-weight: 700; cursor: pointer;
    border: 1px solid var(--line-2); background: transparent; color: var(--text-hi, var(--text)); }
.dt-actions :is(.dt-next, .dt-go) { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.dt-actions .dt-close { min-width: 38px; padding: 0; font-size: 20px; line-height: 1; }
.dt-alt { font-size: 13px; color: var(--accent); }
.demo-banner .demo-tour-open { background: transparent; color: var(--accent); border: 1px solid var(--accent); margin-left: auto; }
.demo-banner .demo-tour-open + button { margin-left: 0; }
.demo-tour-open[hidden] { display: none; }
.tab.dt-spot { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 6px; animation: dtPulse 1s ease-in-out 3 alternate; }
@keyframes dtPulse { to { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .tab.dt-spot { animation: none; } }
/* Phones: the tour is a sheet at the bottom and the banner one short line, so the race itself fills the first screen. */
@media (max-width: 600px) {
    .demo-tour { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 950; gap: 8px; padding: 12px 14px;
        border: 1px solid var(--accent); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
    .dt-dots { order: 0; }
    .dt-body { flex-basis: 100%; }
    .dt-text { font-size: 13.5px; }
    .dt-actions { width: 100%; }
    .dt-actions :is(.dt-next, .dt-go) { flex: 1; }
    .dt-alt { flex-basis: 100%; text-align: center; }
    .demo-banner { padding: 6px 12px; gap: 6px 10px; font-size: 13px; }
    .demo-banner .demo-ro-note, .demo-banner [data-demo-race] { display: none; }
    .demo-banner button { min-height: 32px; padding: 0 10px; }
    html:has(.demo-tour:not([hidden])) body { padding-bottom: 210px; }
}
/* The signed-in lobby with no rooms yet (account.js paintLobby): three first steps. */
.lobby-first { list-style: none; counter-reset: lf; display: grid; gap: 8px; margin: 8px 0 10px; padding: 0; text-align: left; }
.lobby-first li { counter-increment: lf; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-rows: auto auto;
    align-items: center; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); }
.lobby-first li::before { content: counter(lf); grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px;
    border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 800; }
.lobby-first b { color: var(--text-hi, var(--text)); font-size: 15px; }
.lobby-first span { grid-column: 2; font-size: 13px; line-height: 1.4; color: var(--text-3); }
.lobby-first :is(a, button) { grid-column: 3; grid-row: 1 / 3; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
    border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-hi, var(--text));
    font: 700 13.5px var(--v2-font-display, inherit); text-decoration: none; cursor: pointer; white-space: nowrap; min-width: 112px; justify-content: center; box-sizing: border-box; }
.lobby-first li:first-child :is(a, button) { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.lobby-first :is(a, button):hover { border-color: var(--accent); }
@media (max-width: 420px) { .lobby-first li { grid-template-columns: 30px minmax(0, 1fr); }
    .lobby-first :is(a, button) { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 6px; } }
#lobby.is-first-run .lobby-dl { display: none; }
/* The signed-out lobby (index.html): what setup asks, as a numbered track; the demo is the second choice, not a twin of Create. */
.lobby-next { list-style: none; counter-reset: ln; position: relative; display: grid; gap: 14px; margin: var(--s4) 0 0; padding: 0; }
.lobby-next::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line-2); }
.lobby-next li { counter-increment: ln; position: relative; display: grid; gap: 2px; padding-left: 42px; }
.lobby-next li::before { content: counter(ln); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 50%; background: var(--bg-2); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 13px; box-sizing: border-box; }
.lobby-next li:last-child::before { background: var(--accent); color: var(--ink); }
.lobby-next b { color: var(--text-hi, var(--text)); font-size: 15px; }
.lobby-next span { color: var(--text-3); font-size: 13.5px; line-height: 1.45; }
#lobby.is-signed-in .lobby-next { display: none; }
#lobby:not(.is-signed-in) .lobby-demo { background: transparent; color: var(--text-hi, var(--text)); border: 1px solid var(--line-2); }
#lobby:not(.is-signed-in) .lobby-demo:hover { border-color: var(--accent); }
@media (max-width: 900px) {
    #lobby:not(.is-signed-in) .lobby-card { order: -1; }
    #lobby:not(.is-signed-in) :is(.lobby-logo, .lobby-badge) { display: none; }
    .lobby-headline { font-size: 22px; }
}
/* The guide's Start here paths (guide.html .gd-paths): three common goals, three links each, one action. */
.gd-paths { margin: 0 0 24px; }
.gd-paths > ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.gd-paths > ul > li { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.gd-paths .gd-path-t { margin: 0; padding: 0; border: 0; font-size: 1.05rem; color: var(--text-hi, var(--text)); }
.gd-paths li p { margin: 0; color: var(--text-3); font-size: .9rem; }
.gd-paths ol { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 4px; flex: 1; align-content: start; font-size: .92rem; line-height: 1.35; }
.gd-paths ol a { color: var(--accent); }
.gd-path-go { align-self: flex-start; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 8px;
    border: 1px solid var(--accent); color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.gd-path-go:hover { background: var(--accent); color: var(--ink); }
@media (max-width: 720px) { .gd-paths > ul { grid-template-columns: minmax(0, 1fr); } .gd-path-go { min-height: 44px; } }
/* What's new search (js/changelog-find.js). */
.cl-find { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; max-width: 760px; margin: 14px 0 20px; padding: 10px 12px;
    border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.cl-find label { font-weight: 700; color: var(--text-hi, var(--text)); }
.cl-find input { flex: 1 1 240px; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text-hi, var(--text)); font-size: 15px; }
.cl-find input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cl-find-n { color: var(--accent); font-weight: 700; font-size: 14px; }
details.cl[hidden] { display: none; }
details.cl.cl-only-hits li:not(.cl-hit):not(:has(.cl-hit)) { display: none; }
details.cl li.cl-hit { background: var(--accent-deep, transparent); box-shadow: inset 3px 0 0 var(--accent); border-radius: 4px; padding-left: 6px; }
/* Signed-in lobby rooms as cards (account.js paintLobby). */
#lobby .lobby-rooms .lr-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; }
#lobby .lobby-rooms .lr-t { grid-column: 1; font-size: 15px; font-weight: 700; color: var(--text-hi, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby .lobby-rooms .lr-m { grid-column: 1; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby .lobby-rooms .lr-chip { grid-column: 2; grid-row: 1 / 3; margin: 0; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-3);
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
#lobby .lobby-rooms .lr-chip.lr-live { border-color: var(--accent); background: var(--accent); color: var(--ink); }
#lobby .lobby-rooms .lr-chip.lr-soon { border-color: var(--accent); color: var(--accent); }
#lobby .lobby-auth:has(.lobby-rooms) { margin-top: 14px; padding-top: 12px; }
/* Past races (account.js sectionsHtml, ROOM_ARCHIVE) */
#lobby .lobby-past > summary { cursor: pointer; }
#lobby .lobby-rooms .lr-past .lr-card { margin-bottom: 2px; }
#lobby .lobby-rooms .lr-acts { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0 0 10px; padding: 0 12px; font-size: 12.5px; color: var(--text-3); }
#lobby .lobby-rooms .lr-acts a, #lobby .lobby-rooms .lr-acts button { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
#lobby .lobby-rooms .lr-acts button { margin-left: auto; }

/* One state card for the My pages (calendar, recent races, fuel analysis): signed out, empty, error, loading. */
.state-card { margin: var(--s4) 0; padding: var(--s5) var(--s4); text-align: center; border: 1px dashed var(--line-3, var(--line-2)); border-radius: var(--radius); background: var(--panel); }
.state-card h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: var(--fs-lead, 15px); color: var(--text-hi, var(--text)); }
.state-card p { margin: 0 auto; max-width: 46ch; color: var(--text-3); }
.state-card ul { list-style: none; margin: 10px auto 0; padding: 0; display: grid; gap: 4px; max-width: 46ch; font-size: var(--fs-small); color: var(--text-2); }
.state-card .state-act { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin-top: var(--s4); }
.state-card .state-act .btn-primary, .state-card .state-act .btn-ghost { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.state-card .state-act a:not(.btn-primary):not(.btn-ghost) { color: var(--accent); font-size: var(--fs-small); }
.state-card.is-error { border-color: var(--crit); }
.state-card[aria-busy="true"] { border-style: solid; color: var(--text-3); }

/* ======================================================================
   15. PAGE LAYOUT: width tiers, gutters, the 12 column grid, rails, card grids, priority columns (site redesign, #744)
   Source: StintLabs-research/feature-demos/site-redesign/_system/system.css. Pages opt in with <main class="sl-page">
   (Standard tier, 2800 cap) or .sl-page.read (Read tier, 1100); a page without it looks as it did.
   Media queries use the window width (the html zoom does not change them): 760 phone, 1100, 1500 desktop,
   1800 wide (the mockups' 2000 tier, moved so a 1920 screen gets it).
   ====================================================================== */
:root {
    --rank-bronze: #cd8a4e; --rank-silver: #c3cbd6; --rank-gold: #e6b93d; --rank-platinum: #7fd4e6;
    --cls-hyper: #e5484d; --cls-lmp2: #3e8ef7; --cls-lmp3: #a66cff; --cls-gt3: #f2a33a; --cls-gte: #e05fa8;
    --sl-gutter: clamp(10px, 2.4vw - 14px, 36px);   /* 10 on phone and tablet, 22 in a 1400 window, 36 from 1920 */
    --sl-gap: 12px; --sl-prose: 72ch; --sl-w-read: 1100px; --sl-w-std: 2800px; --sl-rail: 320px;
}
[data-theme="daylight"] {
    --rank-bronze: #98602a; --rank-silver: #6b7885; --rank-gold: #a87a00; --rank-platinum: #1f8a82;
    --cls-gt3: #c97a10; --cls-lmp3: #7f45d6;
}
.sl-page {
    --good: var(--dx-good, #4ade80); --purple: #c084fc; --team: #3e8ef7;
    --fs-micro: 11px; --fs-small: 12px; --fs-sm: 13px; --fs-body: 14px; --fs-md: 15px; --fs-title: 26px;
    --r-md: 6px; --r-lg: 10px; --r-pill: 999px; --h-sm: 28px; --h-md: 36px; --h-lg: 44px; --caps: .08em;
    --sl-ui: var(--v2-font-ui, system-ui, sans-serif); --sl-display: var(--v2-font-display, Bahnschrift, "Arial Narrow", system-ui, sans-serif);
    --font-ui: var(--sl-ui); --font-display: var(--sl-display); --fs-lg: 20px;
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 36px; --r-sm: 3px; --topbar: 0px;
    --sl-top: calc(var(--lmu-top, 0px) + 12px);     /* sticky rails pin under the bar (the top bar scrolls away on section pages) */
}
[data-theme="daylight"] .sl-page { --good: #0b7a3d; --purple: #7a2fc0; --team: #1f5fb0; }
/* The opted-in page drops the shell caps: #app (1400, 1800), .lmu-page (1300). */
#app:has(.sl-page) { max-width: none; padding: 0; }
.sl-page, .lmu-page.sl-page { max-width: var(--sl-w-std); margin: 0 auto; padding: var(--sl-gap) var(--sl-gutter) 40px; min-width: 0; box-sizing: border-box; }
.sl-page.read { max-width: var(--sl-w-read); }
.sl-prose { max-width: var(--sl-prose); }
.sl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sl-gap); align-items: stretch; }
.sl-grid > .c3 { grid-column: span 3; } .sl-grid > .c4 { grid-column: span 4; } .sl-grid > .c5 { grid-column: span 5; } .sl-grid > .c6 { grid-column: span 6; }
.sl-grid > .c7 { grid-column: span 7; } .sl-grid > .c8 { grid-column: span 8; } .sl-grid > .c9 { grid-column: span 9; } .sl-grid > .c12 { grid-column: span 12; }
.sl-rail-layout { display: grid; gap: var(--sl-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.sl-rail-layout > * { min-width: 0; }
.sl-main, .sl-rail { display: grid; gap: var(--sl-gap); min-width: 0; align-content: start; }
.sl-cards { display: grid; gap: var(--sl-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--sl-card, 340px)), 1fr)); }
.sl-cards.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--sl-card, 340px)), 1fr)); }
.sl-page [data-pri="2"], .sl-page [data-pri="3"], .sl-page [data-pri="4"] { display: none; }
.sl-page .only-wide { display: none; }   /* before the 1800 rule on purpose: the later rule must win */
@media (max-width: 760px) {
    .sl-grid > :is(.c3, .c4, .c5, .c6, .c7, .c8, .c9) { grid-column: span 12; }
    .sl-page, .lmu-page.sl-page { padding-inline: 10px; }
}
@media (min-width: 761px) and (max-width: 1499px) {
    .sl-grid > :is(.c3, .c4, .c5, .c6, .c7, .c8, .c9) { grid-column: span 6; }
    .sl-grid > .t12 { grid-column: span 12; }
    /* a rail stacked under the main column shows its cards as a row (.sl-rail.wrap) */
    .sl-rail.wrap { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
}
@media (min-width: 1100px) { .sl-page :is(th, td)[data-pri="2"] { display: table-cell; } }
@media (min-width: 1500px) {
    .sl-rail-layout { grid-template-columns: minmax(0, 1fr) var(--sl-rail); }
    .sl-rail-layout.left { grid-template-columns: var(--sl-rail) minmax(0, 1fr); }
    .sl-rail { position: sticky; top: var(--sl-top); max-height: calc(100vh - var(--sl-top) - 12px); overflow-y: auto; scrollbar-width: thin; }
    .sl-page :is(th, td)[data-pri="3"] { display: table-cell; }
}
@media (min-width: 1800px) {
    :root { --sl-rail: 360px; --sl-gap: 14px; }
    .sl-rail-layout.both { grid-template-columns: 260px minmax(0, 1fr) var(--sl-rail); }
    .sl-page :is(th, td)[data-pri="4"] { display: table-cell; }
    .sl-page .only-wide { display: revert; }
    .sl-page .sl-rail.only-wide { display: grid; }
}
@media (max-width: 1499px) { .sl-rail-layout.left > .sl-rail { order: -1; } }

/* ======================================================================
   16. PAGE COMPONENTS AND THE COLOR PASS (opted-in pages only: everything sits under .sl-page)
   Header band, tabs, filter bar and its fold, cards, rows, explainer, buttons, chips, tags, rank chips
   and rails (LMU data-rank, StintLab data-tier), class color, tables (priority columns, sort buttons, selected rows),
   number tiles, bars, steps, the answer, empty states, team bits, the series list, the strip, motion.
   ====================================================================== */
/* header band: eyebrow with a rule, h1, one sub line, the right side for numbers or two buttons; speed lines + circuit motif */
.sl-page .sl-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: end; padding: 10px 14px 12px; border-radius: var(--r-lg); margin: 0 0 var(--sl-gap); isolation: isolate; }
.sl-page .sl-head::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), .14), rgba(var(--accent-rgb), .04) 40%, transparent 70%),
        repeating-linear-gradient(-24deg, transparent 0 18px, rgba(var(--accent-rgb), .07) 18px 19px);
    mask-image: linear-gradient(90deg, #000 30%, transparent 95%); -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent 95%); }
.sl-page .sl-head .eb { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 0; font: 700 var(--fs-micro) var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); }
.sl-page .sl-head .eb::after { content: ""; flex: 1; height: 1px; background: var(--v2-line); }
.sl-page .sl-head h1 { margin: 0; font: 600 var(--fs-title)/1.1 var(--sl-display); color: var(--text-hi); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-wrap: balance; }
.sl-page .sl-head .sub { margin: 2px 0 0; max-width: 62ch; color: var(--text-2); font-size: var(--fs-body); }
.sl-page .sl-head .right { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; justify-content: flex-end; color: var(--text-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.sl-page .sl-head .right .lmu-stats { white-space: normal; }
.sl-page .sl-head .track { display: block; position: absolute; left: 52%; top: -20px; height: 84px; width: 260px; z-index: -1; opacity: .28; color: var(--accent); pointer-events: none; }
@media (max-width: 1100px) { .sl-page .sl-head .track { display: none; } }
@media (max-width: 760px) { .sl-page .sl-head { grid-template-columns: minmax(0, 1fr); } .sl-page .sl-head .right { justify-content: flex-start; } }

/* section tabs, the second level tab row, the sticky filter bar and its fold */
.sl-page .tabs { position: relative; display: flex; gap: 2px; margin: 0 0 var(--sl-gap); border-bottom: 1px solid var(--v2-line); overflow-x: auto; scrollbar-width: none; }
.sl-page .tabs::-webkit-scrollbar { display: none; }
.sl-page .tabs :is(a, button) { flex: none; padding: 8px 14px 9px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-3); font: 650 13px var(--sl-ui); white-space: nowrap; text-decoration: none; }
.sl-page .tabs button { height: auto; min-height: 0; margin: 0 0 -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none; cursor: pointer; }
.sl-page .tabs :is(a, button):hover { color: var(--text-hi); }
.sl-page .tabs :is(a, button):is([aria-current], [aria-selected="true"]) { color: var(--text-hi); border-bottom-color: var(--accent); }
.sl-page .sl-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 var(--sl-gap); }
.sl-page .sl-sub > p { margin: 0; color: var(--text-3); font-size: var(--fs-small); }
.sl-page .bar { position: sticky; top: var(--lmu-top, 0px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 var(--sl-gap); padding: 9px 14px; border: 1px solid var(--v2-line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); }
.sl-page .bar.static { position: static; }
.sl-page .bar .l { font: 700 var(--fs-micro) var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); margin-right: -8px; }
.sl-page :is(.bar, .strip) .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sl-page .sl-fold { display: none; }       /* the folded bar under 760: <div class="sl-fold"><span class="sum">…</span><button>Filters</button></div> */
/* or: <span class="fold-sum"><span>…</span><button>Filters</button></span> and .fold groups the page opens */
.sl-page .bar .fold-sum { display: none; align-items: center; gap: 8px; width: 100%; min-width: 0; justify-content: space-between; color: var(--text-2); font-size: 13px; }
.sl-page .bar .fold-sum > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
    .sl-page .sl-fold { display: flex; align-items: center; gap: 8px; width: 100%; }
    .sl-page .sl-fold .sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: var(--fs-small); }
    .sl-page .bar.folded > :not(.sl-fold) { display: none; }
    .sl-page .bar .fold-sum { display: flex; }
    .sl-page .bar .fold { display: none; }
}
.sl-page .seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--v2-line); border-radius: var(--r-pill); background: var(--bg-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.sl-page .seg > * { flex: none; height: 24px; min-height: 0; margin: 0; padding: 0 11px; border: 0; border-radius: var(--r-pill); background: none; box-shadow: none; color: var(--text-2); font: 600 12px/24px var(--sl-ui); white-space: nowrap; }
.sl-page .seg > :is(.on, [aria-pressed="true"], [aria-selected="true"], [aria-current]) { background: var(--surface-3); color: var(--text-hi); }

/* card anatomy: .lift for the hover lift (cards that are or hold links), .hero for the page's one primary card */
.sl-page .card { position: relative; background: linear-gradient(180deg, color-mix(in srgb, #fff 2.5%, var(--v2-panel)), var(--v2-panel)); border: 1px solid var(--v2-line); border-radius: var(--r-lg); box-shadow: var(--v2-shadow-1); min-width: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; transition: transform var(--v2-med) var(--v2-ease), box-shadow var(--v2-med) var(--v2-ease), border-color var(--v2-med); }
.sl-page .card.lift:hover { transform: translateY(-1px); box-shadow: var(--v2-shadow-2); border-color: var(--v2-line-2); }
.sl-page .card.hero { background: linear-gradient(160deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), .04) 45%, var(--v2-panel) 80%); border-color: rgba(var(--accent-rgb), .35);
    box-shadow: inset 0 3px 0 var(--accent), inset 0 1px 0 rgba(255,255,255,.08), 0 0 44px -14px rgba(var(--accent-rgb), .55), var(--v2-shadow-2); }
.sl-page .card.flat { background: var(--v2-panel); box-shadow: none; }
.sl-page .eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; font: 700 var(--fs-micro) var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); }
.sl-page .eyebrow :is(a, .more) { font: 600 var(--fs-small) var(--sl-ui); letter-spacing: 0; text-transform: none; color: var(--accent-soft, var(--accent)); }
.sl-page .eyebrow .n { font-weight: 600; letter-spacing: 0; color: var(--text-4); text-transform: none; margin-left: 2px; }
.sl-page .eyebrow.loose { margin: 4px 0 8px; }
.sl-page .row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--v2-line); color: inherit; text-decoration: none; }
.sl-page .row:first-child { border-top: 0; padding-top: 2px; }
.sl-page .row .t { grid-column: 1; grid-row: 1; font: 650 14px/1.25 var(--sl-display); color: var(--text-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-page .row .m { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-page .row .r { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: 6px; }
.sl-page a.row:hover .t { color: var(--accent-soft, var(--accent)); }
.sl-page .row[data-cls] { padding-left: 10px; }
.sl-page .row[data-cls]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--cls); }
/* the explainer: a dl of terms in a card (rails) */
.sl-page .sl-explain { margin: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.sl-page .sl-explain dt { font: 650 13px var(--sl-display); color: var(--text-hi); }
.sl-page .sl-explain dd { margin: 1px 0 0; color: var(--text-2); line-height: 1.45; }

/* buttons */
.sl-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--h-md); margin: 0; padding: 0 12px; border: 1px solid var(--line-3, var(--line-2)); border-radius: var(--r-md); background: linear-gradient(180deg, color-mix(in srgb, #fff 4%, var(--bg-2)), var(--bg-2)); box-shadow: none; color: var(--text); font: 600 13px var(--sl-display); white-space: nowrap; text-decoration: none; }
.sl-page .btn:hover { border-color: var(--accent); color: var(--text-hi); }
.sl-page .btn.primary { background: linear-gradient(180deg, color-mix(in srgb, #fff 12%, var(--accent)), var(--accent)); border-color: var(--accent); color: var(--ink, #060806); font-weight: 700; box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), .9), inset 0 1px 0 rgba(255,255,255,.25); }
.sl-page .btn.primary:hover { filter: brightness(1.06); }
.sl-page .btn.lg { min-height: var(--h-lg); padding: 0 18px; font-size: 15px; }
.sl-page .btn.sm { min-height: var(--h-sm); padding: 0 9px; font-size: var(--fs-small); }
.sl-page .btn.quiet { border-color: transparent; background: none; color: var(--text-2); }
.sl-page .btn.quiet:hover { background: var(--v2-hover); }
.sl-page .btn:is(.on, [aria-pressed="true"]) { border-color: var(--accent); color: var(--accent); }

/* chips: the word always printed, one hue per state; .tag kind chips (New, Faster, Fixed, Companion; a bare .tag is dashed) */
.sl-page .chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border: 1px solid var(--line-2); border-radius: var(--r-pill); color: var(--text-3); font: 700 10.5px var(--sl-display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.sl-page .chip.live { border-color: var(--accent); background: var(--accent); color: var(--ink, #060806); box-shadow: 0 0 16px -4px rgba(var(--accent-rgb), .9); }
.sl-page .chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink, #060806); animation: sl-pulse 1.6s ease-out infinite; }
.sl-page .chip:is(.today, .rem) { border-color: var(--warn); color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.sl-page .chip.soon { border-color: var(--info); color: var(--info); background: color-mix(in srgb, var(--info) 10%, transparent); }
.sl-page .chip.team { border-color: var(--purple); color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); }
.sl-page .chip.good { border-color: var(--good); color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.sl-page .chip.crit { border-color: var(--crit); color: var(--crit); background: color-mix(in srgb, var(--crit) 12%, transparent); }
.sl-page .tag { --tg: var(--text-3); display: inline-flex; align-items: center; padding: 0 6px; border: 1px dashed color-mix(in srgb, var(--tg) 55%, transparent); border-radius: 4px; color: var(--tg); font: 700 10px/16px var(--sl-display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.sl-page .tag:is(.new, .faster, .fixed, .companion) { border-style: solid; background: color-mix(in srgb, var(--tg) 10%, transparent); }
.sl-page .tag.new { --tg: var(--accent); } .sl-page .tag.faster { --tg: var(--good); } .sl-page .tag.fixed { --tg: var(--info); } .sl-page .tag.companion { --tg: var(--purple); }
@keyframes sl-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,0,0,.35); } 100% { box-shadow: 0 0 0 7px rgba(0,0,0,0); } }

/* LMU ranks (data-rank, Bronze to Platinum) and StintLab's own ladder (data-tier, adds Diamond and Elite) set --rk */
.sl-page :is([data-rank="Bronze"], [data-tier="Bronze"]) { --rk: var(--rank-bronze); } .sl-page :is([data-rank="Silver"], [data-tier="Silver"]) { --rk: var(--rank-silver); }
.sl-page :is([data-rank="Gold"], [data-tier="Gold"]) { --rk: var(--rank-gold); } .sl-page :is([data-rank="Platinum"], [data-tier="Platinum"]) { --rk: var(--rank-platinum); }
.sl-page [data-tier="Diamond"] { --rk: #8fb4ff; } .sl-page [data-tier="Elite"] { --rk: #e879f9; }
[data-theme="daylight"] .sl-page [data-tier="Diamond"] { --rk: #2f5fc4; } [data-theme="daylight"] .sl-page [data-tier="Elite"] { --rk: #a21caf; }
.sl-page .rk { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px 0 5px; border: 1px solid color-mix(in srgb, var(--rk, var(--line-2)) 55%, transparent); border-radius: var(--r-pill); background: color-mix(in srgb, var(--rk, var(--line-2)) 14%, transparent); color: var(--text-hi); font-size: var(--fs-small); font-weight: 650; white-space: nowrap; line-height: 18px; }
.sl-page .rk::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rk, var(--line-2)); }
.sl-page .rk small { color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.sl-page .rk.lg { font-size: 14px; padding: 2px 10px 2px 8px; line-height: 20px; }
.sl-page .rk.lg::before { width: 9px; height: 9px; }
.sl-page .rail { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 6px; }
.sl-page .rail i { display: block; border-radius: 2px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.sl-page .rail i.on { background: var(--rk); box-shadow: 0 0 8px -2px var(--rk); }
.sl-page .rail i.on:last-of-type { background: color-mix(in srgb, #fff 25%, var(--rk)); }
.sl-page .rail i.plan { background: none; box-shadow: inset 0 0 0 1px var(--rk); }   /* outlined: steps the plan reaches */
.sl-page .tint[data-rank] { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--rk) 13%, transparent), transparent 60%), var(--v2-panel); }
.sl-page .pc { font: 600 22px/1 var(--sl-display); color: var(--text-hi); font-variant-numeric: tabular-nums; }
.sl-page [data-rank] .pc { color: var(--rk); }
.sl-page .pc-big { display: flex; align-items: baseline; gap: 10px; }
.sl-page .pc-big .pc { font-size: 34px; }

/* class color: data-cls on anything tied to a class; .cp is the pill (it always prints the class) */
.sl-page :is([data-cls="Hyper"], [data-cls="Hypercar"]) { --cls: var(--cls-hyper); } .sl-page [data-cls="LMP2"] { --cls: var(--cls-lmp2); }
.sl-page [data-cls="LMP3"] { --cls: var(--cls-lmp3); } .sl-page [data-cls="GT3"] { --cls: var(--cls-gt3); } .sl-page [data-cls="GTE"] { --cls: var(--cls-gte); }
.sl-page .cp { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; font: 700 10px var(--sl-display); letter-spacing: .04em; text-transform: uppercase; line-height: 15px; color: var(--text-hi); background: color-mix(in srgb, var(--cls, var(--text-3)) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cls, var(--text-3)) 55%, transparent); }
.sl-page .card[data-cls]:not(.hero) { border-color: color-mix(in srgb, var(--cls) 35%, var(--v2-line)); }
.sl-page .card[data-cls].wash { background: linear-gradient(135deg, color-mix(in srgb, var(--cls) 16%, var(--v2-panel)), var(--v2-panel) 55%); }
.sl-page .card .pic { height: 120px; margin: -10px -12px 10px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(160deg, var(--surface-3), var(--bg-3)); background-size: cover; background-position: center; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; font: 600 16px var(--sl-display); color: var(--text-hi); }
.sl-page .card[data-cls] .pic { background-image: linear-gradient(160deg, color-mix(in srgb, var(--cls) 45%, var(--bg-3)), var(--bg-3) 80%); }

/* tables: sticky head, zebra, hover, .k key column, .num right, .pick / aria-selected wash, .barc inline bar, sort buttons */
.sl-page .tbl { border: 1px solid var(--v2-line); border-radius: var(--r-lg); background: var(--v2-panel); overflow: auto; max-width: 100%; }
.sl-page .tbl table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sl-page .tbl th { position: sticky; top: 0; z-index: 1; height: 36px; padding: 0 12px; background: var(--panel-2, var(--panel)); color: var(--text-3); font: 700 11px var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line-3, var(--line-2)); white-space: nowrap; }
.sl-page .tbl th.num { text-align: right; }
.sl-page .tbl th button { min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sl-page .tbl th button:hover, .sl-page .tbl th[aria-sort] button { color: var(--text-hi); }
.sl-page .tbl th[aria-sort="ascending"] button::after { content: " \25B4"; }
.sl-page .tbl th[aria-sort="descending"] button::after { content: " \25BE"; }
.sl-page .tbl td { height: 38px; padding: 0 12px; border-bottom: 1px solid var(--v2-line); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.sl-page .tbl tr:last-child td { border-bottom: 0; }
.sl-page .tbl tr:nth-child(even) td { background: var(--v2-zebra); }
.sl-page .tbl tr:hover td { background: var(--v2-hover); }
.sl-page .tbl td.k { color: var(--text-hi); font-weight: 650; }
.sl-page .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.sl-page :is(.tbl, .kv) .up { color: var(--good); }
.sl-page :is(.tbl, .kv) .dn { color: var(--crit); }
.sl-page .tbl tr:is(.pick, [aria-selected="true"]) td { background: var(--v2-wash); }
.sl-page .tbl tr[data-cls] td:first-child { box-shadow: inset 3px 0 0 var(--cls); }
.sl-page .tbl .barc { position: relative; min-width: 140px; }
.sl-page .tbl .barc i { position: absolute; left: 12px; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--accent); opacity: .7; }
.sl-page .sl-notes { display: grid; gap: 4px; margin: 2px 2px 0; color: var(--text-3); font-size: 12px; max-width: 90ch; }
.sl-page .foot-note { margin: 8px 2px 0; color: var(--text-3); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 760px) { .sl-page .tbl :is(td.k, th:first-child) { position: sticky; left: 0; background: var(--panel); z-index: 1; } }
/* number tiles, bars, steps, the big number, the answer */
.sl-page .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.sl-page .kv > div { padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--bg-2); min-width: 0; }
.sl-page .kv .k { display: block; font: 700 10px var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-page .kv .v { display: block; margin-top: 2px; font: 600 20px/1.1 var(--sl-display); color: var(--text-hi); font-variant-numeric: tabular-nums; }
.sl-page .kv .d { display: block; margin-top: 2px; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-page .hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 54px; gap: 8px; align-items: center; font-size: 12px; color: var(--text-2); padding: 3px 0; }
.sl-page .hbar i { display: block; height: 10px; border-radius: 3px; background: var(--info); }
.sl-page .hbar .num { text-align: right; color: var(--text-3); }
.sl-page .step { display: inline-grid; place-items: center; min-width: 28px; height: 20px; padding: 0 4px; border-radius: 4px; font: 700 11px var(--sl-display); font-variant-numeric: tabular-nums; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.sl-page .step.up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--bg-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 45%, transparent); }
.sl-page .step.dn { color: var(--crit); background: color-mix(in srgb, var(--crit) 14%, var(--bg-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 45%, transparent); }
.sl-page .step.dnf { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--bg-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.sl-page .big { font: 600 30px/1 var(--sl-display); color: var(--text-hi); font-variant-numeric: tabular-nums; }
.sl-page .glow { color: var(--accent); text-shadow: 0 0 18px rgba(var(--accent-rgb), .55); }
.sl-page .answer h2 { margin: 0; font: 600 clamp(22px, 2vw, 32px)/1.2 var(--sl-display); color: var(--text-hi); text-wrap: balance; }
.sl-page .answer p { margin: 6px 0 0; max-width: 78ch; color: var(--text-2); font-size: 15px; }
/* empty, loading and error states */
.sl-page .empty { padding: 12px; border: 1px dashed var(--line-3, var(--line-2)); border-radius: var(--r-md); background: var(--bg-2); color: var(--text-3); font-size: var(--fs-sm); }
.sl-page .empty b { display: block; color: var(--text-hi); font: 600 var(--fs-md) var(--sl-display); margin-bottom: 2px; }
.sl-page .empty .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sl-page .empty.err { border-color: color-mix(in srgb, var(--crit) 40%, var(--line-2)); }
.sl-page .skel { display: block; max-width: 100%; height: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sl-shimmer 1.4s linear infinite; }
@keyframes sl-shimmer { to { background-position: -200% 0; } }
/* team color: --team on the card; the team header (teams, leaderboards) */
.sl-page .team-h { display: flex; align-items: center; gap: 10px; margin: -10px -12px 10px; padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--team) 25%, var(--v2-line)); background: linear-gradient(90deg, color-mix(in srgb, var(--team) 18%, transparent), transparent 70%); }
.sl-page .team-h .badge { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--team), color-mix(in srgb, var(--team) 55%, #000)); color: #fff; display: grid; place-items: center; font: 700 12px var(--sl-display); flex: none; }
.sl-page .team-h .n { font: 650 16px/1.15 var(--sl-display); color: var(--text-hi); }
.sl-page .team-h .g { color: var(--text-3); font-size: 12px; }
.sl-page .team-h .btn { margin-left: auto; }
/* the series list (results, leaderboards) and the strip that names the pick */
.sl-page .serlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 6px; }
@media (min-width: 1500px) { .sl-page .sl-rail .serlist { grid-template-columns: minmax(0, 1fr); } }
.sl-page .serlist :is(a, button) { display: grid; gap: 1px; padding: 7px 10px; border: 1px solid var(--v2-line); border-radius: var(--r-md); color: var(--text-hi); font: 650 13px var(--sl-ui); }
.sl-page .serlist button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0; margin: 0; background: none; box-shadow: none; text-align: left; cursor: pointer; }
.sl-page .serlist button:hover { border-color: var(--v2-line-2); }
.sl-page .serlist :is(a, button):is(.on, [aria-pressed="true"]) { border-color: var(--accent); background: var(--v2-wash); }
.sl-page .serlist .grp { grid-column: 1 / -1; margin: 8px 0 0; font: 700 10px var(--sl-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); }
.sl-page .strip { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 var(--sl-gap); padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--v2-panel); }
.sl-page .strip h2 { margin: 0; font: 600 20px/1.2 var(--sl-display); color: var(--text-hi); }
/* motion: the lift, the live pulse, the shimmer; all off for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sl-page .card, .sl-page .card.lift:hover { transition: none; transform: none; }
    .sl-page .chip.live::before, .sl-page .skel { animation: none; }
}
/* the LMU tab bar takes the .tabs look on opted-in pages */
.sl-page .lmu-tabs { border-bottom-color: var(--v2-line); margin-bottom: var(--sl-gap); }

/* ======================================================================
   17. STAGE 2 ADDITIONS (#745: when to race, your split, rank up, tracks, car and track pages)
   Tokens and components those pages use that the shared layer above does not define. Still scoped under .sl-page.
   ====================================================================== */
.sl-page .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sl-page .num { font-variant-numeric: tabular-nums; }
.sl-page .muted { color: var(--text-3); }
.sl-page .small { font-size: var(--fs-small); }
.sl-page [hidden] { display: none !important; }
.sl-page .sel { display: inline-flex; align-items: center; gap: 18px; height: 30px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: var(--r-md); background: var(--bg-2); color: var(--text); font: 600 12px var(--font-ui); white-space: nowrap; }
.sl-page .sel::after { content: "\25BE"; color: var(--text-3); font-size: 10px; }
.sl-page .inp { height: 30px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: var(--r-md); background: var(--bg-2); color: var(--text); font: 12px var(--font-ui); }
.sl-page .search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-3); border-radius: var(--r-md); background: var(--bg-2); color: var(--text-4); font-size: 13px; max-width: 620px; }
.sl-page a.row:hover { text-decoration: none; }
.sl-page .row.done .t { color: var(--text-2); }
.sl-page .row.slot { grid-template-columns: 44px minmax(0, 1fr) auto; }
.sl-page .row.slot .d { grid-column: 1; grid-row: 1 / 3; text-align: center; border-radius: 6px; background: color-mix(in srgb, var(--cls, var(--accent)) 16%, transparent); box-shadow: inset 3px 0 0 var(--cls, var(--accent)); padding: 4px 0 4px 3px; }
.sl-page .row.slot .d b { display: block; font: 700 15px/1 var(--font-display); color: var(--text-hi); }
.sl-page .row.slot .d span { display: block; font: 600 10px var(--font-display); color: var(--text-3); margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.sl-page .row.slot .t, .sl-page .row.slot .m { grid-column: 2; } .sl-page .row.slot .r { grid-column: 3; }
.sl-page .row.slot[data-cls] { padding-left: 0; } .sl-page .row.slot[data-cls]::before { display: none; }
.sl-page .rk:not([data-rank]) { --rk: var(--line-3); }
.sl-page .serlist a .cp { justify-self: start; }
.sl-page .serlist a small { font-weight: 400; color: var(--text-3); font-size: 11px; }
.sl-page .strip span { color: var(--text-2); font-size: 13px; }
.sl-page .special { padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent); border-radius: var(--r-md); background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 18%, var(--bg-2)), color-mix(in srgb, var(--warn) 4%, var(--bg-2))); box-shadow: 0 0 30px -14px color-mix(in srgb, var(--warn) 70%, transparent); }
.sl-page .special .k { display: flex; gap: 8px; align-items: center; font: 700 var(--fs-micro) var(--font-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--warn); }
.sl-page .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); flex: none; display: inline-block; }
.sl-page .dot.on { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); animation: sl-pulse-g 2s ease-out infinite; }
@keyframes sl-pulse-g { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
.sl-page .flip { animation: sl-flip 360ms var(--v2-ease); }
@keyframes sl-flip { 0% { transform: translateY(-40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .sl-page .dot.on, .sl-page .flip { animation: none; }
    .sl-page * { scroll-behavior: auto !important; }
}
[data-theme="daylight"] .sl-page .eyebrow a, [data-theme="daylight"] .sl-page .eyebrow .more { color: var(--accent); }   /* accent-soft misses AA on the light panel */

/* tracks.css */
/* tracks.css: the redesigned Tracks index (/tracks), track page (/tracks/<id>) and car page (/cars/<slug>) on top of
   v2.css section 15 (.sl-page). Design: StintLabs-research/feature-demos/site-redesign/tracks (mockup.html, notes.md).
   Markup from public/js/encyclopedia.js; charts, map, corners and race list keep their encyclopedia.css rules. */


/* index: the Show switch and its hint, then a card per circuit */
.trk-idxbar { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 var(--sl-gap); }
.trk-idxbar p { margin: 0; color: var(--text-3); font-size: var(--fs-small); }
.trk-idxbar .l { font: 700 var(--fs-micro) var(--font-display); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-3); margin-right: -8px; }
.trk-cards { --sl-card: 330px; }
.sl-page .trk-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 12px; align-items: start; color: inherit; text-decoration: none; }
.trk-card .thumb { display: block; width: 84px; height: 64px; }
.trk-card .thumb svg { display: block; width: 84px; height: 64px; }
.trk-card .thumb path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.trk-cbody { display: block; min-width: 0; }
.trk-card .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 15px/1.2 var(--font-display); color: var(--text-hi); }
.trk-card .ln { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.trk-card .st { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.trk-card .st > span { white-space: nowrap; }
.trk-card .st b { color: var(--text-hi); font-weight: 650; }
.trk-card:hover .nm { color: var(--accent-soft, var(--accent)); }
.sl-page .trk-card:focus-visible, .trk-toc a:focus-visible { outline: none; box-shadow: var(--lmu-focus); }

/* index Cars view: a card per class, two to a row from 761, three from 1800, each as tall as its rows */
.sl-page .trk-clsgrid { align-items: start; }
.trk-cls .eyebrow h2 .cp { font-size: 11px; line-height: 18px; padding: 0 8px; }
@media (min-width: 1800px) { .trk-clsgrid .c6 { grid-column: span 4; } }

/* entity header: breadcrumb above the band, meta line under the h1 */
.trk-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; color: var(--text-3); font-size: 12px; }
.trk-crumb a { color: var(--text-2); }
.trk-crumb a:hover { color: var(--text-hi); }
.trk-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.trk-meta span + span::before { content: "\00b7"; margin-right: 14px; color: var(--text-3); }

/* hero: the lead sentence and the four facts */
.trk-main { min-width: 0; }
.trk-hero { margin-bottom: var(--sl-gap); }
.trk-lead { margin: 0; max-width: 56ch; font: 500 clamp(18px, 1.5vw, 22px)/1.3 var(--font-ui); color: var(--text-2); text-wrap: balance; }
.trk-lead b { color: var(--text-hi); font-weight: 700; font-variant-numeric: tabular-nums; }
.trk-lead b.glow { color: var(--accent); font-family: var(--font-display); font-weight: 600; }
.trk-hero .kv { margin-top: 12px; }
.trk-entity .kv .v small { margin-left: 2px; font-size: 12px; color: var(--text-3); }
.trk-entity .kv .v.up { color: var(--good); }
.trk-entity .kv .v.down { color: var(--crit); }
.trk-main > .lmu-explain { margin: 0 0 var(--sl-gap); }

/* blocks: a card each, the h2 inside the eyebrow with one sentence under it; anchors land under the top bar */
.sl-page .trk-blk { scroll-margin-top: calc(var(--topbar) + 72px); }
.trk-blk .eyebrow { align-items: flex-start; flex-wrap: wrap; }
.trk-blk .eyebrow h2 { margin: 0; padding: 0; border: 0; font: inherit; color: inherit; }
.trk-blk .eyebrow .sub { display: block; margin-top: 2px; font: 400 12px var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--text-3); }
.trk-ctl { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-left: auto; max-width: 100%; font: 400 12px var(--font-ui); letter-spacing: 0; text-transform: none; }
.trk-blk .lmu-table { max-width: 100%; }
.trk-blk :is(.enc-panel, .enc-chart, .enc-map) { background: var(--bg-2); border-color: var(--v2-line); }
.trk-blk .racelist li { background: var(--bg-2); border-color: var(--v2-line); }
/* charts and the map stop growing at about 720px; the card keeps the width for its table and notes */
.trk-blk .enc-chart, .trk-blk .enc-map { max-width: 720px; }
.trk-blk .enc-map .map-line { stroke: var(--surface-3); }
.trk-blk .enc-map .map-core { stroke: var(--accent); }
/* map and corners: side by side only where the card is wide enough */
.trk-blk .enc-two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.trk-blk .enc-corners { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* rail: the jump list, then layouts or the class list */
.trk-toc a { display: block; padding: 5px 8px; border-left: 2px solid transparent; color: var(--text-2); font-size: 13px; }
.trk-toc a:hover { text-decoration: none; color: var(--text-hi); background: var(--v2-hover); border-left-color: var(--accent); }
.trk-entity .row[aria-current] .t { color: var(--accent-soft, var(--accent)); }
/* under 1500 the rail goes below the content, so the answer stays on the first screen */
@media (max-width: 1499px) { .trk-entity .sl-rail { order: 2; } }

