/*
 * v2 visual direction: "Turf Club" (brass/racing-green materiality) + "Track Lights"
 * (HUD glow/urgency) blended, restructured around a stable-management IA instead of
 * a race-day dashboard shape. Ported from the approved design exploration artifact:
 * https://claude.ai/code/artifact/6fb17f5b-3be7-462e-a8e6-daad93a9e1c0
 *
 * Scoped entirely under .v2-app so this stylesheet is safe to load only on v2 views
 * without leaking into the classic Bootstrap/modern-layout.css pages.
 */

/* Text size (Preferences -> Text size). Every size and most spacing below is in rem, so
 * scaling the root scales the whole page. Percentages keep the browser's own default. */
html.v2-text-large { font-size: 112.5%; }
html.v2-text-larger { font-size: 125%; }

.v2-app {
  --v2-bg: #0b1a12;
  --v2-surface: #142a1f;
  --v2-surface-2: #1c3325;
  --v2-line: rgba(199, 154, 63, 0.28);
  --v2-brass: #c79a3f;
  --v2-ink: #f3ead3;
  --v2-ink-soft: #9fb6a6;
  --v2-ink-faint: #829c8b;
  --v2-glow: #ffb545;
  --v2-signal: #ff7557;
  --v2-good: #5fc891;
  --v2-blue: #759fff;
  --v2-signal-soft: #ffb0a0;
  --v2-signal-bright: #ff9a86;
  --v2-ink-bright: #fff8ea;
  --v2-ink-dark: #1a1408;
  --v2-rose: #ff7fa8;
  --v2-medal-bronze: #c98a52;
  --v2-bronze-deep: #c07a4a;
  /* Material tokens (race kit). NOT status colours: turf must never read as "ready". */
  --v2-dirt: #7a5634;
  --v2-dirt-deep: #3f2b1a;
  --v2-dirt-speck: #2a1b0e;
  --v2-dirt-light: #b48a5c;
  --v2-turf: #3a6e45;
  --v2-turf-deep: #1d3d26;
  --v2-turf-stripe: #4f8f5d;
  --v2-infield: #10261a;
  --v2-rail: rgba(243, 234, 211, 0.55);
  /* Two families: serif for the logo, nav tabs and page headings, sans for everything else.
     The old names are aliases, so never add a third; --v2-font-code is only for stack traces. */
  --v2-font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --v2-font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --v2-font-code: Consolas, "SF Mono", Menlo, "Courier New", monospace;
  --v2-font-display: var(--v2-font-sans);
  --v2-font-hud: var(--v2-font-sans);
  --v2-font-body: var(--v2-font-sans);
  --v2-font-mono: var(--v2-font-sans);

  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: var(--v2-font-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.v2-app * { box-sizing: border-box; }

.v2-app a { color: inherit; text-decoration: none; }

/* Numbers must line up down a column now the data text is proportional. Browsers set form
   controls through the font shorthand, which resets both properties, so hand them on. :where()
   keeps specificity at zero so classes like .v2-input still win. */
.v2-app { font-variant-numeric: tabular-nums; }
:where(.v2-app) :where(button, input, select, textarea) { font-family: inherit; font-variant-numeric: inherit; }

/* Generic visibility utility */
.v2-hidden { display: none; }

/* ---------- HUD ribbon: replaces the topbar ---------- */
.v2-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  background: var(--v2-surface);
  border-bottom: 1px solid var(--v2-line);
  font-family: var(--v2-font-hud);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--v2-ink-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}
.v2-hud .v2-crest {
  font-family: var(--v2-font-serif);
  color: var(--v2-ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.v2-hud .v2-clock {
  font-variant-numeric: tabular-nums;
  color: var(--v2-glow);
  text-shadow: 0 0 10px rgba(255, 181, 69, 0.45);
}
.v2-hud .v2-right { display: flex; align-items: center; gap: 1.1rem; }
.v2-hud .v2-bankroll { font-variant-numeric: tabular-nums; color: var(--v2-ink); font-size: 0.85rem; }
.v2-hud .v2-right { min-width: 0; }
.v2-hud .v2-bankroll { flex: none; }
.v2-hud .v2-tab-dropdown { min-width: 0; }
.v2-hud .v2-tab-dropdown > a {
  font-variant-numeric: tabular-nums;
  color: var(--v2-ink);
  font-size: 0.85rem;
  font-family: var(--v2-font-body);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  line-height: 1.35;
  padding: 0.15rem 0.4rem 0.15rem 0.6rem;
  border: 1px solid rgba(199, 154, 63, 0.55);
  border-radius: 6px;
}
.v2-hud .v2-hud-name { min-width: 0; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-hud .v2-hud-chev { width: 1em; height: 1em; color: var(--v2-brass); }
.v2-hud .v2-tab-dropdown:hover > a,
.v2-hud .v2-tab-dropdown:focus-within > a,
.v2-hud .v2-tab-dropdown > a.on { background: rgba(199, 154, 63, 0.12); border-color: var(--v2-brass); }
.v2-hud .v2-tab-dropdown > a:active { background: rgba(199, 154, 63, 0.22); }
.v2-hud .v2-tab-dropdown > a.on .v2-hud-chev { color: var(--v2-glow); }
.v2-hud .v2-tab-dropdown:hover > a .v2-hud-chev,
.v2-hud .v2-tab-dropdown:focus-within > a .v2-hud-chev { color: var(--v2-glow); transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .v2-hud .v2-hud-chev { transition: transform 120ms ease-out; }
}
.v2-hud .v2-post-chip {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(255, 90, 54, 0.14);
  border: 1px solid rgba(255, 90, 54, 0.4);
  color: var(--v2-signal-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-variant-numeric: tabular-nums;
}
.v2-hud .v2-post-chip .v2-dot {
  width: 0.375rem; height: 0.375rem; border-radius: 50%;
  background: var(--v2-signal);
  box-shadow: 0 0 8px var(--v2-signal);
}

/* ---------- Ticket-tab nav: replaces the fixed vertical sidebar ----------
   Deliberately NOT overflow-x: auto here, even though earlier this needed horizontal
   scroll on narrow viewports: setting overflow-x to anything but visible computes
   overflow-y to auto too (CSS overflow's paired-axis rule -- you cannot get real scroll
   on one axis and true visibility on the other via the overflow shorthand/longhands on
   the same box). That silently clipped every .v2-tab-dropdown-menu below this bar
   (position: absolute; top: 100%) the instant it opened -- :hover/:focus-within still
   fired, the menu still got display: flex, it was just invisible, clipped by its own
   scroll-ancestor. Bug report: dropdowns "not firing" even though the CSS/markup were
   correct. Fixed by wrapping instead of scrolling on narrow viewports (see the 900px
   tier below) so .v2-tabs never needs a non-visible overflow value at all. */
.v2-tabs {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.3rem;
  gap: 0.4rem;
  padding: 0.8rem 1.5rem 0;
  background: var(--v2-bg);
  border-bottom: 1px solid var(--v2-line);
}
.v2-tabs a {
  font-family: var(--v2-font-serif);
  font-size: 0.85rem;
  color: var(--v2-ink-soft);
  padding: 0.55rem 1.1rem 0.65rem;
  border-radius: 8px 8px 0 0;
  position: relative;
  top: 1px;
  white-space: nowrap;
}
.v2-tabs a.on {
  color: var(--v2-ink);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-bottom-color: var(--v2-surface);
  font-weight: 700;
}

/* ---------- Tablet tier: header/nav touch comfort + defensive wrap ----------
   900px covers iPad-portrait (768px) and narrow laptop windows -- below this,
   the header/nav need touch-sized targets and defensive wrapping; above it,
   .v2-body's own width governs (see below) and nothing here is needed. The
   flex-wrap on .v2-hud is a no-op at typical widths here (crest+clock+right
   fit comfortably above ~650px) -- it's a defensive rule so an unusually long
   stable name can never force the sticky header into horizontal overflow. */
@media (max-width: 900px) {
  .v2-hud { flex-wrap: wrap; row-gap: 0.4rem; }
  .v2-tabs > a,
  .v2-tab-dropdown > a { min-height: 2.75rem; display: inline-flex; align-items: center; }
  .v2-tab-dropdown-menu a { min-height: 2.75rem; display: flex; align-items: center; }
}

/* 1440px (was 980px) -- widened so wide tables (race history's 12 columns in
   particular) fit on one line without horizontal scroll on desktop-class
   screens. Pages with their own narrower card (auth forms, etc.) set their
   own inner max-width and are unaffected. */
.v2-body {
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* ---------- Needs-attention strip ---------- */
.v2-attention {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.v2-alert {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--v2-font-body);
  font-size: 0.8rem;
  color: var(--v2-ink);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-left: 3px solid var(--v2-glow);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
}
.v2-alert.urgent { border-left-color: var(--v2-signal); }
.v2-alert b { font-variant-numeric: tabular-nums; color: var(--v2-glow); }
.v2-alert.urgent b { color: var(--v2-signal-bright); }

/* ---------- Section labels ---------- */
.v2-section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 1.8rem 0 0.6rem;
  font-family: var(--v2-font-mono);
}
.v2-section-label span:first-child {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-ink-soft);
}
.v2-section-label span:last-child {
  font-size: 0.72rem;
  color: var(--v2-brass);
}

/* ---------- Home: greeting line ---------- */
.v2-greeting {
  font-family: var(--v2-font-serif);
  font-size: 1.15rem;
  color: var(--v2-ink);
  margin: 0.2rem 0 1.4rem;
}
.v2-greeting .v2-greeting-meta {
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--v2-ink-faint);
  margin-left: 0.6rem;
}
.v2-greeting .v2-greeting-meta b { color: var(--v2-brass); font-weight: 700; }

/* ---------- Home: action deck ("Today's Orders") ---------- */
.v2-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.125rem, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}
a.v2-deck-card, .v2-deck-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-left: 3px solid var(--v2-brass);
  border-radius: 8px;
  padding: 0.9rem 1.05rem;
  position: relative;
}
a.v2-deck-card:hover { border-color: var(--v2-brass); background: rgba(199,154,63,0.06); }
.v2-deck-card .v2-deck-count {
  font-family: var(--v2-font-hud);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--v2-glow);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255,181,69,0.35);
}
.v2-deck-card .v2-deck-label {
  font-family: var(--v2-font-body);
  font-size: 0.86rem;
  color: var(--v2-ink);
}
.v2-deck-card .v2-deck-sub {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  color: var(--v2-ink-faint);
}
.v2-deck-card .v2-deck-go {
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  color: var(--v2-brass);
  margin-top: 0.35rem;
}
a.v2-deck-card:hover .v2-deck-go { color: var(--v2-glow); }
.v2-deck-card.urgent { border-left-color: var(--v2-signal); }
.v2-deck-card.urgent .v2-deck-count { color: var(--v2-signal-bright); text-shadow: 0 0 10px rgba(255,90,54,0.35); }
.v2-deck-card.good { border-left-color: var(--v2-good); }
.v2-deck-card.good .v2-deck-count { color: var(--v2-good); text-shadow: none; }

/* All-caught-up empty state */
.v2-deck-allclear {
  font-family: var(--v2-font-body);
  font-size: 0.85rem;
  color: var(--v2-good);
  background: rgba(95,200,145,0.08);
  border: 1px solid rgba(95,200,145,0.3);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}
@media (max-width: 640px) {
  .v2-deck { grid-template-columns: 1fr 1fr; }
}

/* ---------- Roster: the Home hero ---------- */
.v2-roster { display: flex; flex-direction: column; }
.v2-horse-row {
  display: grid;
  grid-template-columns: 2.625rem 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
}
.v2-horse-row .v2-badge {
  width: 2.375rem; height: 2.375rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--v2-font-display);
  font-weight: 700;
  color: var(--v2-ink-bright);
  font-size: 0.68rem;
  border: 2px solid rgba(243,234,211,0.85);
  flex: 0 0 auto;
}
.v2-horse-row .v2-who .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.95rem; display: block; }
.v2-horse-row .v2-who .v2-tag { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sr-chip { font-family: var(--v2-font-mono); font-size: 0.66rem; padding: 0.1rem 0.4rem; border: 1px solid; border-radius: 100px; display: inline-block; margin-top: 0.25rem; }
.v2-meter {
  width: 6.25rem;
  height: 0.3125rem;
  border-radius: 4px;
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  overflow: hidden;
  margin-top: 0.35rem;
}
.v2-meter i { display: block; height: 100%; background: var(--v2-glow); box-shadow: 0 0 6px rgba(255,181,69,0.6); }
.v2-status-chip {
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.26rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.v2-status-chip.ready { color: var(--v2-good); background: rgba(95, 200, 145, 0.14); border-color: rgba(95,200,145,0.35); }
.v2-status-chip.training { color: var(--v2-glow); background: rgba(255,181,69,0.14); border-color: rgba(255,181,69,0.35); }
.v2-status-chip.entered { color: var(--v2-blue); background: rgba(90,140,255,0.14); border-color: rgba(90,140,255,0.35); }
.v2-status-chip.resting { color: var(--v2-ink-faint); background: rgba(159,182,166,0.1); border-color: var(--v2-line); }
/* Retired/deceased status indicators for the public workout search page (issue #393) --
   direct copies of .training's amber / .resting's muted gray under new semantic names,
   per the design spec. No new layout properties. */
/* Revised 2026-07-26: these were byte-for-byte copies of .training's amber and
   .resting's muted gray, so four semantically distinct states rendered as two
   appearances -- a retired horse and a horse in training were indistinguishable
   on a roster. Now: filled chip = the horse is in play (ready/training/entered/
   resting), outline chip = it is not (retired/deceased). The distinction no
   longer rests on hue alone, so it survives both colour-blindness and the
   greyscale case. */
.v2-status-chip.retired { color: var(--v2-brass); background: transparent; border-color: var(--v2-brass); }
.v2-status-chip.deceased { color: var(--v2-ink-faint); background: transparent; border-color: var(--v2-line); border-style: dashed; }
.v2-horse-row .v2-go {
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  color: var(--v2-brass);
  white-space: nowrap;
}
.v2-horse-row .v2-go:hover { color: var(--v2-glow); }

/* ---------- Roster: bulk-select modifier (bulk train) ----------
   Additive modifier, NOT a change to the base .v2-horse-row rule above -- .v2-horse-row is
   used as-is (4 grid children: badge/who/status-chip/go) by v2-stable.pug, v2-training.pug,
   the v2 home roster, etc. Bulk train needs a 5th leading child (a checkbox), so it opts in
   with this separate modifier class instead of changing the shared rule for every consumer
   (see the CLAUDE.md "Design review process" note above this file's own mobile breakpoint
   fix a few hundred lines down, for why an unaccounted-for child count in a shared grid row
   is exactly the failure mode to avoid). Apply `.v2-row-selectable` alongside `.v2-horse-row`
   only on rows that actually render the checkbox. */
.v2-horse-row.v2-row-selectable { grid-template-columns: 1.5rem 2.625rem 1fr auto auto; }
.v2-horse-row.v2-row-selectable .v2-row-check {
  width: 1.125rem; height: 1.125rem;
  accent-color: var(--v2-brass);
  cursor: pointer;
}
.v2-horse-row.v2-row-selectable.v2-row-ineligible { opacity: 0.45; }
/* Work In Company (issue #141): distinct from .v2-row-ineligible. That class means the
   horse can't work at all (30-day WIC cooldown); .v2-row-capped is a transient JS-toggled
   state meaning "you've already picked your 4 horses, so this otherwise-eligible row is
   temporarily unpickable". Same dim, but pointer-events off so its checkbox can't be hit. */
.v2-horse-row.v2-row-selectable.v2-row-capped { opacity: 0.45; pointer-events: none; }

/* ---------- Program-sheet rows (Home "today at the track") ---------- */
.v2-sheet { border-top: 1px dashed var(--v2-line); }
.v2-row {
  display: grid;
  grid-template-columns: 4.75rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
}
.v2-row .v2-post {
  font-family: var(--v2-font-hud);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--v2-glow);
  font-variant-numeric: tabular-nums;
}
.v2-row .v2-post small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); font-weight: 400; }
.v2-row .v2-race-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; display: block; }
.v2-row .v2-race-cond { font-family: var(--v2-font-body); font-size: 0.75rem; color: var(--v2-ink-soft); }
.v2-row .v2-purse { font-family: var(--v2-font-mono); color: var(--v2-ink); font-variant-numeric: tabular-nums; font-size: 0.85rem; text-align: right; }

/* ---------- Program Board (Racing hub) ---------- */
.v2-hero {
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.v2-hero::before, .v2-hero::after {
  content: "";
  position: absolute;
  width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--v2-brass);
  opacity: 0.7;
}
.v2-hero::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.v2-hero::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.v2-hero .v2-eyebrow {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--v2-brass);
  margin-bottom: 0.4rem;
}
.v2-hero h3 {
  font-family: var(--v2-font-display);
  font-weight: 400;
  color: var(--v2-ink);
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}
.v2-hero .v2-facts {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  color: var(--v2-ink-soft);
}
.v2-race-hero-media {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.v2-race-banner {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--v2-line);
  background: var(--v2-surface-2);
  flex-shrink: 0;
}
.v2-hero .v2-facts .v2-purse-highlight {
  color: var(--v2-glow);
  font-weight: 700;
  font-size: 0.85rem; /* one step up from the 0.72rem sibling facts */
}
.v2-countdown {
  font-family: var(--v2-font-hud);
  font-weight: 700;
  font-size: 2.8rem;
  letter-spacing: 0.02em;
  color: var(--v2-glow);
  text-shadow: 0 0 18px rgba(255, 181, 69, 0.5);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.v2-countdown small {
  display: block;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  color: var(--v2-ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
  margin-top: 0.4rem;
  text-align: center;
}

/* Mono/tabular clock readout */
.v2-clock-readout {
  font-family: var(--v2-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--v2-ink-soft);
  font-size: 0.8rem;
}

.v2-postgroup {
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--v2-brass);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.6rem 0 0.6rem;
}
.v2-postgroup::after { content: ""; flex: 1; height: 1px; background: var(--v2-line); }

/* ---------- Stat strip (Home overview - stable-overview.pug's KPI row, HUD-ified) ---------- */
.v2-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--v2-line);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.v2-stat {
  background: var(--v2-surface);
  padding: 0.85rem 1rem;
  min-width: 0;
}
.v2-stat-label {
  display: block;
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--v2-ink-soft);
  margin-bottom: 0.3rem;
}
.v2-stat-value {
  font-family: var(--v2-font-hud);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--v2-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  overflow-wrap: anywhere;
}
.v2-stat.v2-stat-glow .v2-stat-value { color: var(--v2-glow); text-shadow: 0 0 10px rgba(255, 181, 69, 0.35); }
.v2-stat-sub {
  display: block;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  color: var(--v2-ink-faint);
  margin-top: 0.3rem;
}
.v2-stat-span2 { grid-column: span 2; }

/* ---------- Ranked rows (Home "Best Horses") ---------- */
.v2-ranked-list { display: flex; flex-direction: column; }
.v2-ranked-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
}
/* .v2-ranked-row is shared by 11 templates (leaderboards, hall-of-fame, home, horse-list,
   jockeys, market, private-listings, search-site, stables-earnings, training, graveyard) --
   most with exactly 4 direct children matching the base 4-column template above. Two pages
   need a different child count and get their own scoped modifiers instead of changing the
   shared definition (which broke the other pages' column alignment when tried -- see PR
   #220's review): graveyard adds 2 extra cells (speed-rating badge, points) via -6col;
   search-site folds its record/earnings data into the name cell instead of separate grid
   cells (season+lifetime stats don't fit a single record/earnings pair) and only needs
   rank+content via -2col. */
.v2-ranked-row.v2-ranked-row-6col {
  grid-template-columns: 1.75rem auto 1fr auto auto auto;
}
.v2-ranked-row.v2-ranked-row-2col {
  grid-template-columns: 1.75rem 1fr;
}
.v2-rank {
  font-family: var(--v2-font-hud);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--v2-brass);
  text-align: center;
}
.v2-ranked-row .v2-badge {
  font-family: var(--v2-font-display);
  font-weight: 700;
  color: var(--v2-ink-bright);
  font-size: 0.75rem;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.v2-ranked-row .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; display: block; }
.v2-ranked-row .v2-pedigree { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-record {
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  color: var(--v2-ink-soft);
  white-space: nowrap;
}
.v2-ranked-row .v2-earnings {
  font-family: var(--v2-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--v2-good);
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}
.v2-ranked-row .v2-points {
  font-family: var(--v2-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--v2-ink-soft);
  font-size: 0.82rem;
  text-align: center;
  white-space: nowrap;
}
a.v2-ranked-row:hover, a.v2-row:hover, a.v2-horse-row:hover { background: rgba(199, 154, 63, 0.06); }
.v2-name-with-image { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.v2-name-with-image .v2-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-horse-color { width: 1.75rem; height: 1.75rem; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
/* Color-only modifier (no layout impact) marking a horse currently owned outside the viewer's
   own stable -- ports the DarkOrange ForeColor used on myaccount/breeding_report.aspx's
   sire/mare labels. */
.v2-name-with-image.v2-external-horse .v2-name { color: var(--v2-glow); }

/* ---------- Buttons / links ---------- */
.v2-btn {
  display: inline-block;
  font-family: var(--v2-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--v2-brass);
  color: var(--v2-brass);
}
.v2-btn:hover { background: rgba(199,154,63,0.12); color: var(--v2-glow); }
/* `.v2-app a { color: inherit }` (0,1,1) outranks .v2-btn / .v2-btn-primary (0,1,0), so a
 * link styled as a button lost its colour: cream on brass for primary, about 2:1. Restore
 * the button colours for anchors without weakening the link reset everywhere else. */
.v2-app a.v2-btn { color: var(--v2-brass); }
.v2-app a.v2-btn:hover { color: var(--v2-glow); }
.v2-app a.v2-btn-primary, .v2-app a.v2-btn-primary:hover { color: var(--v2-ink-dark); }
/* .v2-btn sets no background, so a secondary <button> showed the browser's grey face.
 * Zero specificity: any page or .v2-btn-primary background still wins. */
:where(.v2-app button.v2-btn) { background: transparent; }

.v2-empty {
  font-family: var(--v2-font-body);
  font-size: 0.85rem;
  color: var(--v2-ink-faint);
  padding: 1.5rem 0;
  text-align: center;
  border: 1px dashed var(--v2-line);
  border-radius: 8px;
}

.v2-login-banner {
  border: 1px solid var(--v2-line);
  border-left: 3px solid var(--v2-brass);
  background: var(--v2-surface);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--v2-ink-soft);
  margin-bottom: 1.4rem;
}
.v2-login-banner a { color: var(--v2-brass); font-weight: 600; }
.v2-login-banner a:hover { color: var(--v2-glow); }

/* ---------- v2-error page ---------- */
.v2-error-card {
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  padding: 3rem 2rem;
  background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2));
  position: relative;
  text-align: center;
  margin: 2rem auto;
  max-width: 40rem;
}
.v2-error-card::before, .v2-error-card::after {
  content: "";
  position: absolute;
  width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--v2-signal);
  opacity: 0.7;
}
.v2-error-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.v2-error-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.v2-error-card .v2-eyebrow {
  display: block;
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--v2-signal);
  margin-bottom: 0.8rem;
}
.v2-error-title {
  font-family: var(--v2-font-serif);
  font-size: 1.6rem;
  color: var(--v2-ink);
  margin: 0 0 0.6rem;
}
.v2-error-sub {
  font-family: var(--v2-font-body);
  font-size: 0.9rem;
  color: var(--v2-ink-soft);
  margin: 0 0 1.6rem;
}
.v2-error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.v2-error-stack {
  margin-top: 2rem;
  text-align: left;
  font-family: var(--v2-font-code);
  font-size: 0.7rem;
  color: var(--v2-ink-faint);
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 640px) {
  /* .v2-hud has 3 flex children (crest/clock/right) with no wrap defined
     above -- combined they need roughly 560-610px, which exceeds every phone
     viewport and would drag the whole sticky header (and page) into
     horizontal scroll. Drop the bankroll/back-link group to its own line. */
  .v2-hud { padding: 0.6rem 0.9rem; gap: 0.4rem 0.6rem; }
  .v2-hud .v2-crest { font-size: 0.78rem; }
  .v2-hud .v2-clock { font-size: 0.66rem; }
  .v2-hud .v2-right { width: 100%; justify-content: space-between; gap: 0.6rem; }
  .v2-hud .v2-bankroll { font-size: 0.75rem; }

  /* .v2-row (program-sheet row: 3 grid children -- post/name-block/purse) --
     still 3 tracks for 3 children, just narrow the post column. */
  .v2-row { grid-template-columns: 2.75rem 1fr auto; }

  /* .v2-horse-row has 4 grid children (badge/who/status-chip/go). It used to
     share the .v2-row rule above, which only defines 3 columns -- the 4th
     child (.v2-go) wrapped into an unintended 2nd row starting back under the
     badge column. Same failure mode as the horse-image incident (a row's
     child count outrunning its grid-template-columns), just introduced here
     by a media query instead of new markup. Keep 4 tracks, only narrow them. */
  .v2-horse-row { grid-template-columns: 2.375rem 1fr auto auto; gap: 0.6rem; }
  .v2-horse-row .v2-meter { display: none; }

  /* Same 4->5 column story as .v2-horse-row above, just for the bulk-train modifier. */
  .v2-horse-row.v2-row-selectable { grid-template-columns: 1.25rem 2.375rem 1fr auto auto; gap: 0.5rem; }

  .v2-hero { flex-direction: column; align-items: flex-start; }

  /* .v2-ranked-row (4 grid children on every page except graveyard) had no mobile rule at
     all -- not broken, but cramped; narrow the rank column/gap for more room. */
  .v2-ranked-row { grid-template-columns: 1.375rem 1fr auto auto; gap: 0.6rem; }
  /* graveyard's 6-column modifier (rank/badge/name/record/earnings/points) gets the same
     narrowing treatment, scoped separately so it doesn't affect the other 10 pages. */
  .v2-ranked-row.v2-ranked-row-6col { grid-template-columns: 1.375rem auto 1fr auto auto auto; gap: 0.6rem; }
}

/* ---------- Tracks group (list/weather/search/details/races) ---------- */
.v2-tk-actions { display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }

.v2-tk-table-wrap { overflow-x: auto; }
.v2-tk-table { width: 100%; border-collapse: collapse; font-family: var(--v2-font-body); font-size: 0.82rem; }
.v2-tk-table th {
  text-align: left;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-ink-faint);
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--v2-line);
  white-space: nowrap;
}
.v2-tk-table td { padding: 0.55rem 0.6rem; border-bottom: 1px dashed var(--v2-line); color: var(--v2-ink); }
.v2-tk-table tbody tr:hover { background: rgba(199, 154, 63, 0.06); }
.v2-tk-daydate { display: block; color: var(--v2-ink-faint); font-weight: 400; }

.v2-tk-pill {
  display: inline-block;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--v2-line);
  color: var(--v2-ink-soft);
  white-space: nowrap;
}
/* Weather-outlook forecast icon (v2-track-weather). Matches the original's
   per-day icon rather than a raw weather_level integer -- see issue #569. Sized
   like .v2-horse-color so it sits on the same visual scale as the other inline
   row imagery, and centred because the outlook grid's cells are centre-aligned. */
.v2-weather-icon {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  flex-shrink: 0;
}

.v2-tk-pill.prestige-hi { color: var(--v2-glow); border-color: rgba(255, 181, 69, 0.4); background: rgba(255, 181, 69, 0.1); }
.v2-tk-pill.turf { color: var(--v2-good); border-color: rgba(95, 200, 145, 0.4); background: rgba(95, 200, 145, 0.1); }
.v2-tk-pill.dirt { color: var(--v2-ink-soft); }

.v2-tk-panel { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 1.2rem 1.3rem; }
.v2-tk-panel h4 { font-family: var(--v2-font-display); font-weight: 400; color: var(--v2-ink); font-size: 1.1rem; margin: 0 0 0.6rem; }
.v2-tk-meta {
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  color: var(--v2-ink-soft);
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--v2-line);
}
.v2-tk-meta:last-of-type { border-bottom: none; }
.v2-tk-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.8rem; }

.v2-tk-form { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 1.2rem; }
.v2-tk-input {
  flex: 1;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-family: var(--v2-font-body);
  font-size: 0.85rem;
}
.v2-tk-select {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-family: var(--v2-font-mono);
  font-size: 0.75rem;
}

.v2-tk-pager { display: flex; align-items: center; gap: 0.8rem; font-family: var(--v2-font-mono); font-size: 0.78rem; }
.v2-tk-gradegroup { margin: 0.9rem 0 0.4rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-tk-subhead { font-family: var(--v2-font-mono); font-size: 0.75rem; color: var(--v2-ink-soft); margin: 1rem 0 0.4rem; }
.v2-tk-note { font-family: var(--v2-font-body); font-size: 0.78rem; color: var(--v2-ink-faint); margin-top: 1rem; }

/* ---------- Static content pages (about/privacy/tos/etc.) ---------- */
.v2-prose {
  max-width: 47.5rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 1.4rem 1.7rem;
  margin-bottom: 1.6rem;
}
.v2-prose h3 {
  font-family: var(--v2-font-display);
  color: var(--v2-brass);
  font-size: 1.1rem;
  margin: 1.2rem 0 0.5rem;
}
.v2-prose h3:first-child { margin-top: 0; }
.v2-prose h4 {
  font-family: var(--v2-font-body);
  color: var(--v2-ink);
  font-size: 0.92rem;
  margin: 1rem 0 0.3rem;
}
.v2-prose p, .v2-prose li {
  color: var(--v2-ink-soft);
  font-size: 0.85rem;
  line-height: 1.6;
}
.v2-prose ul { padding-left: 1.2rem; margin: 0.4rem 0 0.8rem; }
.v2-prose b, .v2-prose strong { color: var(--v2-ink); }
.v2-prose a { color: var(--v2-glow); text-decoration: underline; }
.v2-prose .v2-prose-season { margin-bottom: 0.7rem; }

/* ================================================================
   Racing extras (Group B): filter bar, pager, data tables, entry form
   ================================================================ */

/* ---------- Filter bar (recent/upcoming/my-recent/my-upcoming) ---------- */
.v2-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  padding: 1rem 1.1rem;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: var(--v2-surface);
  margin-bottom: 1.4rem;
}
.v2-filterbar .v2-field { display: flex; flex-direction: column; gap: 0.35rem; }
.v2-filterbar label {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v2-ink-faint);
}
.v2-filterbar select {
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-family: var(--v2-font-body);
  font-size: 0.8rem;
  min-width: 8.75rem;
}
.v2-filterbar .v2-check-group { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }
.v2-filterbar .v2-check-group label {
  display: flex; align-items: center; gap: 0.3rem;
  text-transform: none; letter-spacing: 0; font-family: var(--v2-font-body);
  font-size: 0.78rem; color: var(--v2-ink-soft);
}
.v2-filterbar .v2-actions { display: flex; gap: 0.6rem; }

/* ---------- Pager ---------- */
.v2-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  color: var(--v2-ink-faint);
  flex-wrap: wrap;
  gap: 0.8rem;
}
.v2-pager .v2-pages { display: flex; gap: 0.3rem; }
.v2-pager .v2-pages a, .v2-pager .v2-pages span {
  padding: 0.3rem 0.6rem; border-radius: 5px; border: 1px solid var(--v2-line); color: var(--v2-ink-soft);
}
.v2-pager .v2-pages a:hover { color: var(--v2-ink); border-color: var(--v2-brass); }
.v2-pager .v2-pages .on { color: var(--v2-bg); background: var(--v2-brass); border-color: var(--v2-brass); font-weight: 700; }
.v2-pager .v2-pages .disabled { opacity: 0.35; pointer-events: none; }
.v2-row .v2-post small.v2-today { color: var(--v2-signal); }

/* ---------- Data tables (race details entrants/results, enter-race lists) ---------- */
.v2-table-wrap { overflow-x: auto; border: 1px solid var(--v2-line); border-radius: 8px; margin-bottom: 1.4rem; }
.v2-table { width: 100%; border-collapse: collapse; font-family: var(--v2-font-body); font-size: 0.82rem; }
.v2-table th {
  text-align: left; font-family: var(--v2-font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--v2-ink-soft); padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--v2-line); background: var(--v2-surface); white-space: nowrap;
}
/* Sortable column header link. Inherits the th's own mono/uppercase treatment so a sortable
   header reads identically to a static one until hovered -- the arrow, not the styling, is
   what marks the active column. Underline on hover/focus is the affordance; the global
   :focus-visible block at the end of this file supplies the ring. */
.v2-table th .v2-sort-link {
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.v2-table th .v2-sort-link:hover,
.v2-table th .v2-sort-link:focus-visible { color: var(--v2-brass); text-decoration: underline; }
.v2-table td { padding: 0.55rem 0.75rem; border-bottom: 1px dashed var(--v2-line); color: var(--v2-ink); vertical-align: middle; }
.v2-table tr:last-child td { border-bottom: none; }
.v2-table tbody tr:hover td { background: rgba(199, 154, 63, 0.06); }
.v2-medal-1 { color: var(--v2-glow); font-weight: 700; }
.v2-medal-2 { color: var(--v2-ink-soft); font-weight: 700; }
.v2-medal-3 { color: var(--v2-medal-bronze); font-weight: 700; }
.v2-odds-best { color: var(--v2-good); font-weight: 700; }
.v2-odds-worst { color: var(--v2-signal); font-weight: 700; }
.v2-table .v2-cell-name { font-family: var(--v2-font-display); color: var(--v2-ink); }
.v2-sex-icon { display: inline-block; margin-right: 0.3rem; font-weight: 700; }
.v2-sex-female { color: var(--v2-rose); }
.v2-sex-male { color: var(--v2-blue); }
.v2-sex-gelding { color: var(--v2-glow); }
.v2-info-icon { display: inline-block; margin-left: 0.35rem; color: var(--v2-brass); cursor: help; font-size: 0.85em; }
.v2-table .v2-cell-sub { font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-faint); display: block; }

/* ---------- Race status badge ---------- */
.v2-status-flag {
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--v2-line);
  color: var(--v2-ink-soft);
}
.v2-status-flag.completed { color: var(--v2-good); border-color: rgba(95,200,145,0.4); background: rgba(95,200,145,0.1); }
.v2-status-flag.upcoming { color: var(--v2-blue); border-color: rgba(90,140,255,0.4); background: rgba(90,140,255,0.1); }
.v2-status-flag.closed, .v2-status-flag.closed_not_processed { color: var(--v2-glow); border-color: rgba(255,181,69,0.4); background: rgba(255,181,69,0.1); }
.v2-status-flag.cancelled { color: var(--v2-signal); border-color: rgba(255,90,54,0.4); background: rgba(255,90,54,0.1); }

/* ---------- Countdown block (race-details) ---------- */
.v2-race-countdown {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  padding: 1.2rem;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2));
  margin-bottom: 1.4rem;
}
.v2-race-countdown .v2-cd-unit { text-align: center; }
.v2-race-countdown .v2-cd-num {
  font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.8rem; color: var(--v2-glow);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(255,181,69,0.4);
}
.v2-race-countdown .v2-cd-label {
  font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--v2-ink-faint);
}

/* ---------- Buttons ---------- */
.v2-btn-danger { border-color: var(--v2-signal); color: var(--v2-signal-bright); }
.v2-btn-danger:hover { background: rgba(255,90,54,0.14); color: var(--v2-signal); }
.v2-btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ---------- Enter-race entry card ---------- */
.v2-entry-hero {
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2));
  margin-bottom: 1.4rem;
}
.v2-entry-hero h3 { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 1.35rem; margin: 0 0 0.5rem; }
.v2-entry-hero .v2-facts { display: flex; gap: 1.2rem; flex-wrap: wrap; font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-stamina-bar { width: 5.625rem; height: 0.5rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; }
.v2-stamina-bar i { display: block; height: 100%; }
.v2-filter-select {
  background: var(--v2-surface-2); border: 1px solid var(--v2-line); color: var(--v2-ink);
  border-radius: 6px; padding: 0.4rem 0.6rem; font-family: var(--v2-font-body); font-size: 0.8rem;
}

@media (max-width: 640px) {
  .v2-filterbar { flex-direction: column; align-items: stretch; }
  .v2-race-countdown { flex-wrap: wrap; gap: 1rem; }

  /* .v2-filter-bar / .v2-search-form already flex-wrap at base so fields
     don't overflow, but two ~140px fields side by side are cramped and hard
     to tap precisely on a phone -- stack to full width and give every
     text/select control a comfortable tap height. */
  .v2-filter-bar, .v2-search-form { flex-direction: column; align-items: stretch; }
  .v2-filter-bar > div, .v2-search-form .v2-field { width: 100%; }
  .v2-input, .v2-select, .v2-filter-select, .v2-tk-select, .v2-tk-input,
  .v2-filterbar select, .v2-filter-bar select, .v2-filter-bar input[type="text"],
  .v2-form-input {
    min-height: 2.75rem;
  }
}

/* ---------- Group A additions: Stable / Horse / Training profile & data pages ---------- */

.v2-status-chip.untrained { color: var(--v2-ink-faint); background: rgba(159,182,166,0.08); border-color: var(--v2-line); }

.v2-pill {
  display: inline-block;
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.42rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--v2-line);
  color: var(--v2-ink-soft);
  background: var(--v2-surface-2);
}
.v2-pill:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-pill.on { color: var(--v2-bg); background: var(--v2-brass); border-color: var(--v2-brass); font-weight: 700; }
.v2-pill.gold { color: var(--v2-glow); border-color: rgba(255,181,69,0.4); background: rgba(255,181,69,0.1); }
.v2-pill.good { color: var(--v2-good); border-color: rgba(95,200,145,0.35); background: rgba(95,200,145,0.1); }

.v2-badge-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* Plain-text pedigree links (sire/dam) -- simpler than a .v2-pill badge, used directly
   under a horse's name in the hero. */
.v2-pedigree-line { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-faint); margin: 0.4rem 0 0.9rem; }
.v2-pedigree-line a { color: var(--v2-brass); }
.v2-pedigree-line a:hover { color: var(--v2-glow); }

/* Native <details>/<summary> disclosure, restyled to match the dark theme -- used to fold
   current-condition stats (as opposed to permanent career totals) behind a collapsed-by-
   default toggle. */
.v2-details { margin-bottom: 1rem; }
.v2-details summary {
  cursor: pointer;
  font-family: var(--v2-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v2-brass);
  padding: 0.5rem 0.1rem;
  list-style: none;
}
.v2-details summary::-webkit-details-marker { display: none; }
.v2-details summary::before { content: '▸ '; }
.v2-details[open] summary::before { content: '▾ '; }
.v2-details summary:hover { color: var(--v2-glow); }
.v2-details .v2-stats { margin-top: 0.5rem; }

.v2-hero-portrait { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.v2-hero-portrait img {
  width: 4rem; height: 4rem; object-fit: contain; border-radius: 50%;
  border: 2px solid var(--v2-brass); background: rgba(255,255,255,0.06); padding: 0.375rem;
}
.v2-hero-portrait h2 { font-family: var(--v2-font-serif); font-weight: 400; color: var(--v2-ink); font-size: 1.6rem; margin: 0 0 0.5rem; }
/* Age/Sex tag: inline at the end of the name rather than its own line (a standalone
   subtitle cost a full row of vertical space for two words) -- the mono HUD face at a
   fraction of the name's size reads as a tag, not part of the name itself. */
.v2-name-meta { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); vertical-align: middle; }

.v2-panel {
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: var(--v2-surface);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
}
.v2-panel-title {
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-brass);
  margin: 0 0 0.7rem;
}

/* 3D viewer canvas shell */
.v2-viewer-canvas {
  position: relative;
  width: 100%;
  height: 35rem;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  overflow: hidden;
  background: #0a0e1a;
}
.v2-viewer-canvas canvas { display: block; }

.v2-fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.875rem, 1fr)); gap: 0.9rem; }
.v2-fact-label { display: block; font-family: var(--v2-font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-soft); margin-bottom: 0.25rem; }
.v2-fact-value { font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }

/* ---------- Fact tiles (Stable Overview "Best Horses" / "Best Wins", issue #518) ----------
   .v2-fact-grid's base rule above (minmax(110px, 1fr)) is shared by 8+ other templates
   (admin billing/auction detail, v2-horse, v2-profile-stable, v2-listing-buy, etc.) for
   small label/value stat pairs -- too narrow a floor for a full tile (image + name + meta +
   pedigree). Rather than widen that shared rule and risk every other consumer (the exact
   "unaccounted-for child/column mismatch" failure this codebase has hit before -- see the
   horse-image incident and the .v2-ranked-row-6col/-2col modifiers above), this is a scoped
   additive modifier applied only where v2-stable-overview.pug opts in, same pattern as those
   .v2-ranked-row modifiers. Tile chrome follows .v2-auction-card/.v2-shop-card (surface bg,
   --v2-line border, 8px radius); the name+status-chip row follows .v2-auction-head; the
   meta line follows .v2-off-who/.v2-lead-who .v2-meta; the metric follows .v2-lead-earn/
   .v2-off-earn (mono, tabular-nums, --v2-good). */
.v2-fact-grid.v2-fact-grid-tiles { grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); }

.v2-fact-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 0.9rem 1.05rem;
}
.v2-fact-rank, .v2-fact-date {
  flex: 0 0 auto;
  min-width: 2.6rem;
  text-align: center;
  padding: 0.3rem 0.35rem;
  border-radius: 6px;
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
}
.v2-fact-rank {
  font-family: var(--v2-font-hud);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--v2-brass);
}
.v2-fact-date {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  line-height: 1.3;
  color: var(--v2-ink-faint);
}
.v2-fact-content { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; flex: 1; }
.v2-fact-name { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.v2-fact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  color: var(--v2-ink-soft);
}
.v2-fact-meta-item { white-space: nowrap; }
.v2-fact-metric {
  font-family: var(--v2-font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--v2-good);
}
.v2-fact-pedigree { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-fact-pedigree small { font-size: inherit; color: inherit; }
.v2-fact-distance { margin-top: 0.05rem; }

/* Surface/distance badges used in .v2-fact-distance -- same color language as
   .v2-tk-pill.turf/.dirt (Tracks group) reused here for these differently-named classes
   rather than renaming markup for a CSS-only pass. */
.v2-badge-turf, .v2-badge-dirt, .v2-badge-other {
  display: inline-block;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--v2-line);
  color: var(--v2-ink-soft);
  white-space: nowrap;
}
.v2-badge-turf { color: var(--v2-good); border-color: rgba(95, 200, 145, 0.4); background: rgba(95, 200, 145, 0.1); }
.v2-badge-dirt { color: var(--v2-ink-soft); border-color: var(--v2-line); background: rgba(159, 182, 166, 0.08); }
.v2-badge-other { color: var(--v2-ink-faint); border-color: var(--v2-line); }

@media (max-width: 640px) {
  .v2-fact-tile { padding: 0.8rem 0.9rem; gap: 0.65rem; }
  .v2-fact-meta { gap: 0.4rem 0.6rem; }
}

.v2-table tr.win td { background: rgba(255,181,69,0.06); color: var(--v2-ink); }
.v2-table a { color: var(--v2-brass); }
.v2-table a:hover { color: var(--v2-glow); }

/* Row-level danger flag (issue #328, admin auction escrow-reconciliation report) --
   same rgba(--v2-signal) tint used by .v2-alert.error-alert, reused here per-row so a
   nonzero `shouldzero` reconciliation discrepancy stays visually prominent even when
   scanning past the summary alert banner. */
.v2-table tr.flagged td { background: rgba(255,90,54,0.08); }

.v2-filter-bar { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; margin-bottom: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-filter-bar label { display: block; font-family: var(--v2-font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--v2-ink-soft); margin-bottom: 0.3rem; }
.v2-filter-bar select, .v2-filter-bar input[type="text"] {
  background: var(--v2-surface-2); border: 1px solid var(--v2-line); color: var(--v2-ink);
  padding: 0.4rem 0.6rem; border-radius: 6px; font-family: var(--v2-font-body); font-size: 0.8rem;
}

.v2-pager .v2-pager-links { display: flex; gap: 0.9rem; }
.v2-pager .v2-pager-links a:hover { color: var(--v2-glow); }

.v2-cross-link {
  font-family: var(--v2-font-mono);
  font-size: 0.7rem;
  color: var(--v2-brass);
}
.v2-cross-link:hover { color: var(--v2-glow); }

/* ---------- Breeding (breeding-settings / breeding-leaderboards / offspring) ---------- */
.v2-quick-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.6rem 0 0.2rem; }

.v2-subtabs { display: flex; gap: 0.5rem; margin: 1rem 0; flex-wrap: wrap; }
.v2-subtabs button, .v2-subtabs a {
  font-family: var(--v2-font-mono);
  font-size: 0.72rem;
  color: var(--v2-ink-soft);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
}
.v2-subtabs button.on, .v2-subtabs a.on {
  color: var(--v2-ink);
  border-color: var(--v2-brass);
  background: rgba(199, 154, 63, 0.12);
}

.v2-breed-list, .v2-lead-list, .v2-off-list { display: flex; flex-direction: column; }

.v2-breed-row {
  display: grid;
  grid-template-columns: 1.1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
}
.v2-breed-who { display: flex; flex-direction: column; }
.v2-breed-who .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; }
.v2-breed-who .v2-tag { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-top: 0.2rem; }
.v2-breed-earn { display: flex; flex-direction: column; gap: 0.15rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-breed-controls { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.v2-breed-input {
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  font-family: var(--v2-font-mono);
  font-size: 0.7rem;
}
.v2-breed-input-num { width: 4.375rem; }
.v2-switch { display: flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-switch input { accent-color: var(--v2-brass); }
.v2-breed-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.v2-breed-left { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-good); }
.v2-breed-left.zero { color: var(--v2-ink-faint); }
.v2-btn-accent { border-color: var(--v2-glow); color: var(--v2-glow); }
.v2-btn-accent:hover { background: rgba(255, 181, 69, 0.14); }

.v2-note-list { font-family: var(--v2-font-body); font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-note-list p { margin: 0.3rem 0; padding-left: 1rem; position: relative; }
.v2-note-list p::before { content: "—"; position: absolute; left: 0; color: var(--v2-brass); }

.v2-lead-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
}
.v2-lead-row .v2-rank { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.95rem; color: var(--v2-brass); text-align: center; }
.v2-lead-who .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; }
.v2-lead-who .v2-meta { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); display: block; margin-top: 0.15rem; }
.v2-lead-record { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-lead-earn { font-family: var(--v2-font-mono); color: var(--v2-good); font-variant-numeric: tabular-nums; font-size: 0.82rem; text-align: right; white-space: nowrap; }
.v2-lead-earn-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.v2-lead-earn-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-lead-go { font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-brass); white-space: nowrap; }
.v2-lead-go:hover { color: var(--v2-glow); }
/* Wraps two .v2-lead-go links (offspring + studbook profile, issue #512) stacked so the
   sire/mare leaderboard row's .v2-lead-row grid still only sees 5 direct children -- matches
   its 5-track grid-template-columns definition (see the horse-image-incident note above the
   mobile breakpoint for why a bare extra sibling here would misalign the grid). */
.v2-lead-go-group { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }

.v2-off-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
}
.v2-off-row .v2-rank { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.9rem; color: var(--v2-brass); text-align: center; }
.v2-off-who .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.9rem; }
.v2-off-who .v2-meta { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); display: block; margin-top: 0.15rem; }
.v2-off-record { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-off-earn { font-family: var(--v2-font-mono); color: var(--v2-good); font-variant-numeric: tabular-nums; font-size: 0.8rem; text-align: right; white-space: nowrap; }
.v2-off-status { font-family: var(--v2-font-mono); font-size: 0.66rem; text-align: center; padding: 0.2rem 0.5rem; border-radius: 100px; white-space: nowrap; }
.v2-off-status.active { color: var(--v2-good); background: rgba(95, 200, 145, 0.12); }
.v2-off-status.retired { color: var(--v2-ink-faint); background: rgba(159, 182, 166, 0.08); }

@media (max-width: 640px) {
  /* .v2-breed-row has 4 grid children (who/earn/controls/actions) collapsing
     to a single 1fr track -- each child lands on its own row, no mismatch. */
  .v2-breed-row { grid-template-columns: 1fr; }
  .v2-breed-controls, .v2-breed-actions { flex-wrap: wrap; }
  .v2-breed-input, .v2-switch { min-height: 2.5rem; }
  .v2-breed-actions .v2-btn { min-height: 2.75rem; }

  /* .v2-lead-row / .v2-off-row each have 5 grid children (rank/who/record/
     earn/go-or-status), matching their 5-track desktop definitions. This
     rule used to collapse both to 3 tracks (24px 1fr auto) -- children 4 and
     5 then wrapped into an implicit 2nd row starting back at column 1 (the
     24px rank-width track), forcing dollar-figure text into a track a
     fraction of its needed width. Same "child count vs. grid-template-
     columns mismatch" failure as the horse-image incident. Keep 5 tracks,
     narrow them, and drop the secondary earnings sub-line (least essential,
     same "hide non-essential decoration on mobile" pattern already used for
     .v2-horse-row .v2-meter) so the remaining 3 auto columns have room. */
  .v2-off-row { grid-template-columns: 1.375rem 1fr auto auto auto; gap: 0.5rem; }
  /* Five tracks cannot fit a 390px phone: the nowrap stats pushed the row 55px past the
     viewport and clipped the Profile link. Name on its own line, then record + earnings,
     then the links. Same 5 direct children, placed explicitly. */
  .v2-lead-row { grid-template-columns: 1.375rem minmax(0, 1fr) auto; gap: 0.35rem 0.5rem; }
  .v2-lead-row > .v2-rank { grid-column: 1; grid-row: 1; align-self: start; }
  .v2-lead-row > .v2-lead-who { grid-column: 2 / -1; grid-row: 1; min-width: 0; }
  .v2-lead-row > .v2-lead-record { grid-column: 2; grid-row: 2; }
  .v2-lead-row > .v2-lead-earn-wrap { grid-column: 3; grid-row: 2; }
  .v2-lead-row > .v2-lead-go, .v2-lead-row > .v2-lead-go-group { grid-column: 2 / -1; grid-row: 3; justify-self: start; }
  .v2-lead-go-group { flex-direction: row; align-items: center; gap: 1rem; }
  .v2-lead-record, .v2-off-record, .v2-lead-earn, .v2-off-earn,
  .v2-lead-go, .v2-off-status { font-size: 0.68rem; }
  .v2-lead-earn-sub { display: none; }
}

/* ---------- Market: classic-view toggle ---------- */
.v2-classic-toggle { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }

/* ---------- Market: feature link cards (Market overview, Auction "how it works") ---------- */
.v2-market-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: 0.8rem;
  margin: 0.6rem 0 1.2rem;
}
a.v2-market-link, .v2-market-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}
a.v2-market-link:hover { border-color: var(--v2-brass); background: rgba(199,154,63,0.06); }
.v2-market-link-title { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.98rem; }
.v2-market-link-sub { font-family: var(--v2-font-body); color: var(--v2-ink-soft); font-size: 0.78rem; }

/* ---------- Site search: symmetric two-panel results (Owners / Horses) ----------
   Distinct from .v2-market-layout below (asymmetric sidebar+content split) -- this is a
   plain symmetric side-by-side pair, so it gets its own small container class rather than
   reusing that one. Breakpoint matches the 640px used by every other @media block in this
   file (see e.g. .v2-ranked-row's own mobile override just above), not a new value. */
.v2-search-panels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  align-items: start;
}
@media (max-width: 640px) {
  .v2-search-panels { grid-template-columns: 1fr; }
}

/* ---------- Market: two-column ledger layout (Sales Ring) ---------- */
.v2-market-layout {
  display: grid;
  grid-template-columns: minmax(13.75rem, 20rem) 1fr;
  gap: 1.2rem;
  align-items: start;
}

/* Viewer page two-column layout (wider sidebar than .v2-market-layout needs) */
.v2-viewer-layout { display: grid; grid-template-columns: minmax(17.5rem, 22.5rem) 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) {
  .v2-viewer-layout { grid-template-columns: 1fr; }
}

.v2-panel-title-spaced { margin-top: 1.2rem; }
.v2-panel-body { font-family: var(--v2-font-body); font-size: 0.8rem; color: var(--v2-ink-soft); line-height: 1.5; }
.v2-panel-list { list-style: none; padding: 0; margin: 0; font-family: var(--v2-font-body); font-size: 0.8rem; color: var(--v2-ink); }
.v2-panel-list li { padding: 0.3rem 0; border-bottom: 1px dashed var(--v2-line); }
.v2-panel-list li:last-child { border-bottom: none; }

/* ---------- Market: purchase ticket form ---------- */
.v2-ticket { display: flex; flex-direction: column; }
.v2-form-row { margin-bottom: 1rem; }
fieldset.v2-form-row { border: 0; padding: 0; min-width: 0; }
fieldset.v2-form-row legend { padding: 0; }
.v2-form-label {
  display: block;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v2-ink-faint);
  margin-bottom: 0.35rem;
}
.v2-form-input {
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  border-radius: 6px;
  color: var(--v2-ink);
  font-family: var(--v2-font-body);
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  width: 100%;
  max-width: 16.25rem;
}
.v2-form-input-sm { width: 4.375rem; max-width: 4.375rem; text-align: center; display: inline-block; }
.v2-form-counter { display: flex; align-items: center; gap: 0.5rem; }
.v2-form-hint { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-top: 0.35rem; }
.v2-form-check { display: flex; align-items: center; font-family: var(--v2-font-body); font-size: 0.85rem; color: var(--v2-ink); }

/* Range/slider input (first one in the codebase) */
.v2-range { width: 100%; accent-color: var(--v2-brass); cursor: pointer; }
.v2-range:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Buttons: size/variant additions ---------- */
.v2-btn-sm { font-size: 0.68rem; padding: 0.32rem 0.7rem; }
.v2-btn-lg { font-size: 0.85rem; padding: 0.7rem 1.4rem; }
.v2-btn-primary { background: var(--v2-brass); color: var(--v2-ink-dark); border-color: var(--v2-brass); font-weight: 700; }
.v2-btn-primary:hover { background: var(--v2-glow); border-color: var(--v2-glow); color: var(--v2-ink-dark); }
button.v2-btn { cursor: pointer; }
button.v2-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Bulk-action results panel (bulk train) ---------- */
.v2-bulk-results { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.v2-bulk-result-line {
  font-family: var(--v2-font-body);
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
.v2-bulk-result-success { color: var(--v2-good); background: rgba(95, 200, 145, 0.14); border-color: rgba(95,200,145,0.35); }
.v2-bulk-result-failure { color: var(--v2-signal); background: rgba(255, 117, 87, 0.14); border-color: rgba(255,117,87,0.35); }

/* ---------- Market: auction card grid ---------- */
.v2-auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
  gap: 0.9rem;
}
.v2-auction-card {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.v2-auction-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.v2-auction-head .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.95rem; display: block; }
.v2-auction-head .v2-pedigree { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-auction-desc { font-family: var(--v2-font-body); font-size: 0.78rem; color: var(--v2-ink-soft); margin: 0; }
.v2-auction-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
.v2-auction-facts > div { display: flex; flex-direction: column; gap: 0.15rem; }
.v2-auction-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.3rem; }

/* ---------- Market: shop card grid ---------- */
.v2-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: 0.9rem;
}
.v2-shop-card {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.v2-shop-card-head { display: flex; justify-content: space-between; align-items: center; }
.v2-shop-desc { font-family: var(--v2-font-body); font-size: 0.78rem; color: var(--v2-ink-soft); margin: 0; flex: 1; }
.v2-shop-card-foot { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 640px) {
  .v2-market-layout { grid-template-columns: 1fr; }
}

/* ---------- Search / Leaderboards / Stats / Records book (Group F) ---------- */
.v2-preview-link {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}

.v2-search-form {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1.4rem;
}
.v2-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.v2-field label {
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-ink-soft);
}
.v2-input, .v2-select {
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
  font-family: var(--v2-font-body);
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  min-width: 8.75rem;
}
/* Keeps the brass border cue, but no longer discards the focus ring -- the
   :focus-visible rules at the end of this file supply it. Dropping `outline: none`
   here was the single line standing between keyboard users and a visible caret
   position on every v2 form. */
.v2-input:focus, .v2-select:focus { border-color: var(--v2-brass); }
.v2-checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--v2-font-body);
  font-size: 0.78rem;
  color: var(--v2-ink-soft);
  padding-bottom: 0.55rem;
}

.v2-pill-group { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.3rem; }

table.v2-table td.v2-num {
  font-family: var(--v2-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--v2-ink);
  text-align: right;
}
table.v2-table td.v2-cell-name small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
table.v2-table td small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-top: 0.1rem; }

.v2-medal { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; }
.v2-medal.gold { color: var(--v2-brass); }
.v2-medal.silver { color: var(--v2-ink-soft); }
.v2-medal.bronze { color: var(--v2-medal-bronze); }

.v2-subhead {
  font-family: var(--v2-font-display);
  font-size: 1.02rem;
  color: var(--v2-ink);
  margin: 1.4rem 0 0.6rem;
}
.v2-subhead .v2-subhead-icon { color: var(--v2-brass); margin-right: 0.35rem; }

.v2-card {
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: var(--v2-surface);
  margin-bottom: 1rem;
}
.v2-card h4 {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-brass);
  margin: 0 0 0.7rem;
}
.v2-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  gap: 1rem;
}

/* Severity variants (admin dashboard, issue #449 v2 conversion) -- same left-border-accent
   language as .v2-alert.urgent / .v2-deck-card.urgent, reused here instead of inventing a
   new pattern. .urgent = write/money-moving actions (was classic's border-danger);
   .sensitive = financially-sensitive but read-only (was classic's border-warning). */
.v2-card.urgent { border-left: 3px solid var(--v2-signal); }
.v2-card.sensitive { border-left: 3px solid var(--v2-brass); }
.v2-card-desc { color: var(--v2-ink-soft); font-size: 0.85rem; margin: 0 0 0.8rem; }
.v2-card-tag {
  display: inline-block;
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.v2-card.urgent .v2-card-tag { color: var(--v2-signal-bright); background: rgba(255, 90, 54, 0.12); }
.v2-card.sensitive .v2-card-tag { color: var(--v2-brass); background: rgba(199, 154, 63, 0.12); }

.v2-rate-row { display: flex; gap: 1.5rem; text-align: center; margin-bottom: 0.9rem; }
.v2-rate-row > div { flex: 1; }
.v2-rate-value { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.3rem; color: var(--v2-glow); }
.v2-rate-label { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--v2-ink-faint); margin-top: 0.2rem; }
.v2-bar-track { width: 100%; height: 0.375rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; margin-bottom: 0.5rem; }
.v2-bar-track i { display: block; height: 100%; background: var(--v2-glow); }

@media (max-width: 640px) {
  table.v2-table { font-size: 0.74rem; }
  table.v2-table th, table.v2-table td { padding: 0.45rem 0.55rem; }
  table.v2-tk-table { font-size: 0.74rem; }
  table.v2-tk-table th, table.v2-tk-table td { padding: 0.45rem 0.55rem; }

  /* Every .v2-table-wrap / .v2-tk-table-wrap usage already has overflow-x:auto
     on the wrapper div, but the help-content pages (v2-help-bonus-payouts,
     v2-help-entryfee, v2-help-faq, v2-help-race-categories, v2-help-wfa-
     weights) render `table.v2-table` bare, with no wrapper -- out of scope to
     add the wrapper markup in 5 templates for this CSS-only pass (flagged as
     a follow-up), but making the table itself the scroll container closes
     the gap without touching any .pug file: a blockified <table> can carry
     its own overflow-x, and this is inert (harmless, no visible change) for
     the tables that already have a wrapper div. */
  table.v2-table, table.v2-tk-table { display: block; overflow-x: auto; max-width: 100%; }

  /* ---------- Touch target sizing (WCAG 2.5.5-ish, ~44px primary / ~36-40px
     dense secondary controls) -- scoped to mobile only, desktop untouched. */
  .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; }
  .v2-btn-sm { min-height: 2.375rem; }
  .v2-pill, .v2-subtabs button, .v2-subtabs a {
    min-height: 2.5rem; display: inline-flex; align-items: center;
  }
  .v2-pager .v2-pages a, .v2-pager .v2-pages span {
    min-height: 2.25rem; min-width: 2.25rem; display: inline-flex; align-items: center; justify-content: center;
  }
  .v2-checkbox-field, .v2-filterbar .v2-check-group label { min-height: 2.25rem; }
}

/* ---------- Nav: "My Races" dropdown (top-tab-bar can't hold every destination flat) ---------- */
.v2-tab-dropdown { position: relative; display: inline-flex; }
.v2-tab-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  flex-direction: column;
  min-width: 9.375rem;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 0 8px 8px 8px;
  padding: 0.35rem;
  z-index: 30;
}
.v2-tab-dropdown:hover .v2-tab-dropdown-menu,
.v2-tab-dropdown:focus-within .v2-tab-dropdown-menu { display: flex; }
/* The account menu lives at the right end of the HUD, so a left-anchored menu opened off
 * the edge of the screen. Anchor HUD menus to their right edge and open leftwards. */
.v2-hud .v2-tab-dropdown-menu { left: auto; right: 0; border-radius: 8px 0 8px 8px; min-width: 13rem; max-width: calc(100vw - 1rem); }
.v2-hud .v2-tab-dropdown-menu a { white-space: nowrap; }
/* On phones the HUD wraps and the account link sits at the left, so open rightwards there. */
@media (max-width: 640px) {
  .v2-hud .v2-tab-dropdown-menu { left: 0; right: auto; border-radius: 0 8px 8px 8px; min-width: 0; width: 12rem; }
  .v2-hud .v2-tab-dropdown-menu a { white-space: normal; }
  /* With a bankroll beside it the trigger sits at the right, so the menu must open leftwards. */
  .v2-hud .v2-bankroll + .v2-tab-dropdown .v2-tab-dropdown-menu { left: auto; right: 0; border-radius: 8px 0 8px 8px; }
}
.v2-tab-dropdown-menu a {
  font-family: var(--v2-font-body);
  font-size: 0.8rem;
  color: var(--v2-ink-soft);
  padding: 0.45rem 0.7rem;
  border-radius: 5px;
  white-space: nowrap;
  top: 0;
}
.v2-tab-dropdown-menu a:hover { background: rgba(199,154,63,0.12); color: var(--v2-ink); }

/* ---------- Footer: about/privacy/tos links ---------- */
.v2-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  padding: 1.3rem 1.5rem 2.2rem;
  font-family: var(--v2-font-mono);
  font-size: 0.68rem;
  color: var(--v2-ink-faint);
  border-top: 1px solid var(--v2-line);
}
.v2-footer a { color: var(--v2-ink-faint); }
.v2-footer a:hover { color: var(--v2-brass); }

/* ---------- Alerts: error/success color variants (promoted from v2-register.pug's
   page-scoped <style> block so every v2 page can reuse them) ---------- */
.v2-alert.error-alert {
  background: rgba(255, 90, 54, 0.1);
  border-left-color: var(--v2-signal);
  color: var(--v2-signal-soft);
}
.v2-alert.success-alert {
  background: rgba(95, 200, 145, 0.1);
  border-left-color: var(--v2-good);
  color: var(--v2-good);
}

/* ---------- Mail: inbox / message detail / block-list rows (Group: v2 mail, issue #117) ---------- */
.v2-message-list { display: flex; flex-direction: column; }
.v2-message-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px dashed var(--v2-line);
  color: var(--v2-ink);
}
.v2-message-row:last-child { border-bottom: none; }
.v2-message-row:hover { background: rgba(199, 154, 63, 0.06); }
.v2-message-row.v2-unread { border-left: 3px solid var(--v2-brass); padding-left: 0.5rem; }
.v2-message-main { min-width: 0; flex: 1; }
.v2-message-subject { font-family: var(--v2-font-display); font-size: 0.9rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-message-from { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-faint); }
.v2-message-category { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-faint); }
.v2-message-date { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); white-space: nowrap; flex-shrink: 0; }

.v2-message-detail-header { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.v2-message-meta { font-family: var(--v2-font-body); font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-message-body { font-family: var(--v2-font-body); font-size: 0.9rem; color: var(--v2-ink); line-height: 1.6; white-space: pre-wrap; }

.v2-form-textarea {
  background: var(--v2-surface-2);
  border: 1px solid var(--v2-line);
  border-radius: 6px;
  color: var(--v2-ink);
  font-family: var(--v2-font-body);
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  width: 100%;
  min-height: 6rem;
  resize: vertical;
}

.v2-btn-muted { color: var(--v2-ink-faint); border-color: var(--v2-line); }
.v2-btn-muted:hover { background: rgba(255,255,255,0.04); color: var(--v2-ink-soft); }
.v2-footer span { color: var(--v2-ink-faint); }

/* ==========================================================================
   Accessibility + responsive pass -- impeccable "Operate" mode audit, 2026-07-26.
   Audit ran against v2-stable.pug and v2-horse.pug; every rule below is
   surface-wide rather than page-specific, which is why it lives here.
   ========================================================================== */

/* ---------- Focus visibility (was: entirely absent) ----------
   Before this block the file contained no :focus-visible rule anywhere in 1763
   lines, and `.v2-input:focus` actively discarded the native ring with
   `outline: none`. Together with `.v2-app a { text-decoration: none }` that left
   keyboard users with no visible position on any v2 page -- nav tabs, roster
   rows, cross-links, form controls alike (WCAG 2.4.7 failure).

   :focus-visible rather than :focus so mouse clicks don't leave a ring behind.
   Uses the existing --v2-glow token: brass-family, already the surface's
   attention colour, and high-contrast on every v2 background. */
.v2-app a:focus-visible,
.v2-app button:focus-visible,
.v2-app summary:focus-visible,
.v2-app [tabindex]:focus-visible {
  outline: 2px solid var(--v2-glow);
  outline-offset: 2px;
  border-radius: 3px;
}
.v2-app input:focus-visible,
.v2-app select:focus-visible,
.v2-app textarea:focus-visible {
  outline: 2px solid var(--v2-glow);
  outline-offset: 1px;
}

/* ---------- Visually-hidden text ----------
   No such helper existed in this file. Required by the condition meter's
   accessible value below, and applicable to any icon-only control.
   clip-path: inset(50%) rather than the legacy clip: rect() form. */
.v2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Condition meter: expose the value ----------
   .v2-meter encoded condition -- a number players make training and entry
   decisions on -- purely as bar width plus colour, with no text and no ARIA, so
   assistive tech announced nothing at all. .v2-meter-row pairs the bar with a
   tabular readout; the role/aria-valuenow attributes go on .v2-meter itself in
   the templates. */
.v2-meter-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.v2-meter-row .v2-meter { margin-top: 0; min-width: 0; }
.v2-meter-val {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  color: var(--v2-ink-soft);
  font-variant-numeric: tabular-nums;
  /* The bar may shrink; the number must not. tabular-nums also keeps the
     readout from reflowing as the value changes across rows. */
  flex: 0 0 auto;
}

/* ---------- Roster rows at phone widths ----------
   .v2-horse-row appeared in none of this file's 11 media blocks, so its
   `42px 1fr auto auto` grid held at every width. At a 360px viewport the 42px
   badge, three 1rem gaps and two `white-space: nowrap` children (status chip,
   action link) left roughly 84px for the 1fr column -- but .v2-meter carried a
   hard `width: 100px` and .v2-who had no `min-width: 0`, so that column's
   min-content floor exceeded the space available and the row overflowed the
   viewport horizontally.

   Deliberately NOT redefining grid-template-columns here. .v2-horse-row is
   shared by 18 templates whose direct-child counts differ: plain 4-child rows
   (v2-stable, v2-training), 5-child .v2-row-selectable rows (bulk train/retire/
   pasture, nominate, watchlist, work-in-company), and variants with no status
   chip or no action link at all. Changing the column count centrally would
   misplace children on some of them -- the shared-grid failure mode CLAUDE.md's
   design-review note warns about. These three declarations remove the overflow
   without touching column structure, so they hold for all 18.

   Follow-up, not done here: a fuller phone treatment that drops the action link
   to its own row would buy back name width, but needs a per-template design
   pass because the child count varies. */
@media (max-width: 640px) {
  .v2-horse-row { gap: 0.6rem; }
  .v2-horse-row .v2-who { min-width: 0; }
  .v2-meter { width: 100%; max-width: 8.75rem; }
}

/* ---------- Cross-link rows ----------
   v2-stable.pug carried 12 sibling nav links each with an inline
   style="margin-right:1.1rem" -- against CLAUDE.md's use-shared-classes rule --
   dropped into the second span of a .v2-section-label that is
   `justify-content: space-between; align-items: baseline`. As a flat wall it
   also gave "bulk train" (routine) the same weight as "graveyard" (rare).
   Grouped, labelled, and spaced with gap instead. */
.v2-cross-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.4rem;
  align-items: baseline;
  margin-bottom: 0.3rem;
}
.v2-cross-link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  align-items: baseline;
}
.v2-cross-label {
  font-family: var(--v2-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-ink-faint);
  flex: 0 0 auto;
}

/* ---------- Page heading ----------
   Neither v2-layout.pug nor the pages it wraps emitted a single heading element:
   v2-stable.pug's "My Stable" is a span inside .v2-section-label, and
   v2-horse.pug's first heading is an h2. Screen-reader heading navigation -- the
   primary way AT users skim a page -- had nothing to land on anywhere in v2.

   v2-layout.pug now emits `h1.v2-sr-only= title` inside .v2-body, giving all
   ~160 v2 pages exactly one h1 with zero visual change and no layout risk. The
   visible title stays the small mono .v2-section-label the design already uses.

   Follow-up, not done here: promoting each page's visible .v2-section-label to
   be the h1 would be the fuller fix, but that span sits in a flex row whose
   sibling holds the cross-links, so it is a per-page change across ~160
   templates rather than a layout-level one. */

/* ---------- Race kit (v2-race-kit.pug) ---------- */
.v2-rk-ic { width: 1.1em; height: 1.1em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.18em; }

.v2-rk-oval { display: block; width: 100%; height: auto; }
.v2-rk-infield { fill: var(--v2-infield); }
.v2-rk-course { fill: none; stroke-width: 11; }
.v2-rk-course.is-turf { stroke: var(--v2-turf); stroke-width: 9; }
.v2-rk-course.is-dirt { stroke: var(--v2-dirt); }
.v2-rk-course.is-dim { opacity: 0.35; }
.v2-rk-texture { fill: none; stroke-linecap: round; pointer-events: none; }
.v2-rk-texture.is-dirt { stroke: var(--v2-dirt-speck); stroke-width: 1.6; stroke-dasharray: 0.1 4.2; }
.v2-rk-texture.is-turf { stroke: var(--v2-turf-stripe); stroke-width: 9; stroke-dasharray: 3 3; stroke-linecap: butt; opacity: 0.55; }
.v2-rk-run { fill: none; stroke: var(--v2-glow); stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(255,181,69,0.7)); }
/* Second-lap segment: solid, thinner, inset 6 units. Its dash length comes from the attribute. */
.v2-rk-lap { fill: none; stroke: var(--v2-glow); stroke-width: 2; opacity: 0.85; }
.v2-rk-start { fill: var(--v2-bg); stroke: var(--v2-glow); stroke-width: 2; }
.v2-rk-lbl { font-family: var(--v2-font-mono); font-size: 0.5rem; letter-spacing: 0.08em; fill: var(--v2-ink); }
.v2-rk-dist { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.1875rem; fill: var(--v2-ink-bright); }
.v2-rk-oval.is-turf .v2-rk-dist { font-size: 0.9375rem; }
.v2-rk-dist-sub { font-family: var(--v2-font-mono); font-size: 0.4375rem; letter-spacing: 0.07em; fill: var(--v2-ink-soft); }

.v2-rk-surface { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-bright); padding: 0.28rem 0.7rem 0.28rem 0.3rem; border-radius: 100px; border: 1px solid rgba(243,234,211,0.25); white-space: nowrap; }
.v2-rk-swatch { width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 1px solid rgba(243,234,211,0.5); flex: 0 0 auto; }
.v2-rk-surface.is-dirt { background: var(--v2-dirt-deep); }
.v2-rk-surface.is-dirt .v2-rk-swatch { background: radial-gradient(circle at 30% 35%, var(--v2-dirt-speck) 0 1.2px, transparent 1.6px) 0 0/5px 5px, radial-gradient(circle at 70% 70%, var(--v2-dirt-light) 0 1px, transparent 1.4px) 0 0/6px 6px, var(--v2-dirt); }
.v2-rk-surface.is-turf { background: var(--v2-turf-deep); }
.v2-rk-surface.is-turf .v2-rk-swatch { background: repeating-linear-gradient(135deg, var(--v2-turf-stripe) 0 3px, var(--v2-turf) 3px 6px); }

.v2-rk-going { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink); padding: 0.28rem 0.7rem; border-radius: 100px; border: 1px solid var(--v2-line); background: rgba(243,234,211,0.05); white-space: nowrap; }
.v2-rk-going .v2-rk-ic { width: 1.25em; height: 1.25em; color: var(--v2-ink-bright); }
.v2-rk-going.is-hidden { color: var(--v2-ink-soft); font-weight: 400; border-style: dashed; }
.v2-rk-scale { display: inline-flex; gap: 2px; }
.v2-rk-scale i { width: 0.4375rem; height: 0.4375rem; border-radius: 2px; border: 1px solid var(--v2-ink-faint); }
.v2-rk-scale i.on { background: var(--v2-ink-bright); border-color: var(--v2-ink-bright); }

.v2-rk-field { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-rk-pips { display: inline-grid; grid-template-columns: repeat(10, 0.4375rem); gap: 2px; }
.v2-rk-pips i { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; border: 1px solid var(--v2-ink-faint); }
.v2-rk-pips i.on { background: var(--v2-brass); border-color: var(--v2-brass); }
.v2-rk-pips i.me { background: var(--v2-glow); border-color: var(--v2-ink-bright); box-shadow: 0 0 5px var(--v2-glow); }
/* The empty pip at the race's minimum field (rkField's `race`). */
.v2-rk-pips i.goal { border-color: var(--v2-signal-bright); }

.v2-rk-grade { display: inline-flex; align-items: center; justify-content: center; width: 1.875rem; height: 1.875rem; border-radius: 50%; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; color: var(--v2-ink-dark); border: 2px solid rgba(255,248,234,0.7); box-shadow: 0 0 0 2px rgba(0,0,0,0.35); flex: 0 0 auto; vertical-align: middle; }
.v2-rk-grade.g1 { background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); }
.v2-rk-grade.g2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c9d3cc 60%, #8b968f); }
.v2-rk-grade.g3 { background: radial-gradient(circle at 35% 30%, #f0c49c, var(--v2-medal-bronze) 60%, #7d5332); }
.v2-rk-tag { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); border: 1px solid var(--v2-brass); border-radius: 4px; padding: 0.12rem 0.45rem; white-space: nowrap; vertical-align: middle; }

/* Saddle cloths: the racing-standard post colours, scoped to this component only. */
.v2-rk-cloth { display: inline-flex; align-items: center; justify-content: center; width: 2.125rem; height: 2.5rem; border-radius: 4px 4px 9px 9px; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.05rem; border: 1px solid rgba(255,248,234,0.35); flex: 0 0 auto; }
.v2-rk-cloth.p0 { background: var(--v2-surface-2); color: var(--v2-ink-soft); border-style: dashed; }
.v2-rk-cloth.p1 { background: #c8102e; color: #fff; }   .v2-rk-cloth.p2 { background: #f4f4f4; color: #111; }
.v2-rk-cloth.p3 { background: #1f4fd1; color: #fff; }   .v2-rk-cloth.p4 { background: #f2d600; color: #111; }
.v2-rk-cloth.p5 { background: #127a3a; color: #fff; }   .v2-rk-cloth.p6 { background: #111; color: #f2d600; }
.v2-rk-cloth.p7 { background: #f28c00; color: #111; }   .v2-rk-cloth.p8 { background: #f7a1c4; color: #111; }
.v2-rk-cloth.p9 { background: #3cc6c6; color: #111; }   .v2-rk-cloth.p10 { background: #6b2fa3; color: #fff; }
.v2-rk-cloth.p11 { background: #9aa0a6; color: #b00020; } .v2-rk-cloth.p12 { background: #b6d630; color: #111; }
.v2-rk-cloth.p13 { background: #6b3e1d; color: #fff; }  .v2-rk-cloth.p14 { background: #7a1f3d; color: #f2d600; }
.v2-rk-cloth.p15 { background: #c3b091; color: #111; }  .v2-rk-cloth.p16 { background: #b87333; color: #111; }
.v2-rk-cloth.p17 { background: #1b2a5a; color: #fff; }  .v2-rk-cloth.p18 { background: #1f4d2b; color: #f2d600; }
.v2-rk-cloth.p19 { background: #d6dde3; color: #b00020; } .v2-rk-cloth.p20 { background: #c2185b; color: #f2d600; }

.v2-rk-mine { display: inline-block; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; color: var(--v2-ink-dark); background: var(--v2-glow); padding: 0.08rem 0.4rem; border-radius: 3px; margin-left: 0.45rem; vertical-align: 0.1em; flex: 0 0 auto; }
.v2-rk-portrait { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #24402f, var(--v2-surface-2)); border: 2px solid rgba(199,154,63,0.6); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.v2-rk-portrait img { width: 92%; height: auto; display: block; }
.v2-rk-portrait.is-hidden { border: 2px dashed var(--v2-line); background: transparent; align-items: center; color: var(--v2-ink-faint); font-family: var(--v2-font-display); font-size: 1.1rem; }

/* ---------- Race card (v2-race-details.pug) ---------- */
.v2-section-label .v2-rc-h { font-family: var(--v2-font-mono); font-size: 0.72rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-soft); margin: 0; }

.v2-rc-mast { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.2rem; align-items: stretch; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); margin-bottom: 1.2rem; }
.v2-rc-post { background: var(--v2-ink); color: var(--v2-ink-dark); padding: 0.9rem 1.1rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-width: 6.875rem; }
.v2-rc-post-k { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; }
.v2-rc-post-time { font-family: var(--v2-font-hud); font-size: 1.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.v2-rc-post-d { font-family: var(--v2-font-mono); font-size: 0.66rem; }
.v2-rc-title-col { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 0; min-width: 0; }
.v2-rc-banner { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--v2-line); flex: 0 0 auto; }
.v2-rc-title { font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.55rem; line-height: 1.2; margin: 0.1rem 0 0.3rem; color: var(--v2-ink-bright); display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.v2-rc-cond-line { margin: 0; font-family: var(--v2-font-display); font-style: italic; color: var(--v2-ink-soft); font-size: 0.88rem; }
.v2-rc-purse { padding: 0.9rem 1.2rem; border-left: 1px dashed var(--v2-line); display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 0.4rem; }
.v2-rc-purse-k { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rc-purse-v { font-family: var(--v2-font-hud); font-size: 1.7rem; color: var(--v2-glow); line-height: 1; font-variant-numeric: tabular-nums; }
.v2-rc-mast-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.v2-rc-mast-actions .v2-btn { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.25rem; }
.v2-rc-replay-later { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

.v2-rc-replay { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; border: 1px solid rgba(199,154,63,0.55); border-radius: 10px; padding: 0.9rem 1.2rem; margin-bottom: 1.2rem; background: radial-gradient(120% 140% at 0% 0%, rgba(199,154,63,0.16), var(--v2-surface) 60%); }
.v2-rc-replay-icon { width: 3rem; height: 3rem; border-radius: 10px; display: grid; place-items: center; color: var(--v2-brass); border: 1px solid var(--v2-line); background: rgba(0,0,0,0.2); }
.v2-rc-replay-icon .v2-rk-ic { width: 1.75rem; height: 1.75rem; stroke-width: 1.5; }
.v2-rc-replay-h { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.15rem; color: var(--v2-ink-bright); }
.v2-rc-replay-sub { margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-rc-replay-btn { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; padding: 0.7rem 1.3rem; min-height: 2.75rem; }

.v2-rc-cols { display: grid; grid-template-columns: 18.75rem minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.v2-rc-box { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rc-box-oval { padding: 0.6rem 0.8rem; background: #0f2218; border-bottom: 1px solid var(--v2-line); }
.v2-rc-dl { margin: 0; padding: 0.3rem 1rem 0.7rem; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.v2-rc-dl dt, .v2-rc-dl dd { margin: 0; padding: 0.45rem 0; min-height: 2.5rem; display: flex; align-items: center; border-bottom: 1px dashed var(--v2-line); }
.v2-rc-dl dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); padding-right: 0.8rem; }
.v2-rc-dl dd { justify-content: flex-end; text-align: right; font-size: 0.82rem; color: var(--v2-ink); }
.v2-rc-dl dd a { color: var(--v2-brass); }
.v2-rc-dl dd a:hover { color: var(--v2-glow); }
.v2-rc-cd { display: flex; justify-content: space-around; padding: 0.7rem 0.6rem; border-top: 1px solid var(--v2-line); background: rgba(0,0,0,0.15); }
.v2-rc-cd .v2-cd-unit { text-align: center; }
.v2-rc-cd .v2-cd-num { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.35rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-rc-cd .v2-cd-label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rc-main { min-width: 0; }
.v2-rc-main > .v2-section-label:first-child { margin-top: 0; }

.v2-rc-lines-head, .v2-rc-line { display: grid; grid-template-columns: 2.75rem 3rem minmax(0, 1fr) 4.5rem; gap: 0.8rem; align-items: center; }
.v2-rc-lines-head.is-result, .v2-rc-line.is-result { grid-template-columns: 3.25rem 2.5rem 2.75rem minmax(0, 1fr) 5.25rem 3.25rem 5.25rem 3.75rem; gap: 0.7rem; }
.v2-rc-lines-head { padding: 0 1rem 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rc-r { text-align: right; }
.v2-rc-lines { list-style: none; margin: 0 0 1.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-rc-line { padding: 0.6rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-rc-line:last-child { border-bottom: none; }
.v2-rc-line:hover { background: rgba(199,154,63,0.05); }
.v2-rc-line.is-mine { background: rgba(255,181,69,0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-rc-who { min-width: 0; display: flex; flex-direction: column; }
.v2-rc-name { font-family: var(--v2-font-display); font-size: 1rem; color: var(--v2-ink); display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.v2-rc-name a { color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; }
.v2-rc-name a:hover { color: var(--v2-glow); }
.v2-rc-equip { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-left: 0.45rem; flex: 0 0 auto; }
.v2-rc-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-rc-sub a { color: var(--v2-brass); }
.v2-rc-odds { text-align: right; font-family: var(--v2-font-hud); font-size: 1.1rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-rc-odds small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); letter-spacing: 0.06em; }
.v2-rc-pos { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.05rem; color: var(--v2-ink-soft); }
.v2-rc-time { text-align: right; font-family: var(--v2-font-mono); color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.v2-rc-sr { text-align: right; font-family: var(--v2-font-mono); font-size: 0.82rem; }
.v2-rc-money { display: contents; }
.v2-rc-earn { text-align: right; font-family: var(--v2-font-mono); color: var(--v2-glow); font-size: 0.82rem; }
.v2-rc-line.is-result .v2-rc-odds { font-family: var(--v2-font-mono); font-size: 0.82rem; }
.v2-rc-note { display: flex; gap: 0.4rem; align-items: center; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin: -0.9rem 0 1.4rem; }
.v2-rc-comment { margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px dashed var(--v2-line); }

/* Wire reveal */
.v2-rc-wire { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); margin-bottom: 1.2rem; }
.v2-rc-wire-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; min-height: 2.75rem; font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); }
.v2-rc-wire-sum::-webkit-details-marker { display: none; }
.v2-rc-wire-sum:hover { color: var(--v2-glow); }
.v2-rc-wire-sum-ic { display: inline-flex; color: var(--v2-brass); transition: transform 150ms ease; }
.v2-rc-wire[open] .v2-rc-wire-sum-ic { transform: rotate(90deg); }
.v2-rc-wire-sum-hide, .v2-rc-wire[open] .v2-rc-wire-sum-show { display: none; }
.v2-rc-wire[open] .v2-rc-wire-sum-hide { display: inline; }
.v2-rc-wire-sum-note { margin-left: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rc-wire-fig { margin: 0; padding: 0 1rem 0.9rem; }
.v2-rc-wire-board { border-radius: 8px; overflow: hidden; background: repeating-linear-gradient(100deg, #2d5a38 0 26px, var(--v2-turf) 26px 52px); }
.v2-rc-wire-lane, .v2-rc-wire-ticks { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: center; }
.v2-rc-wire-lane { height: 2rem; border-bottom: 1px solid rgba(243,234,211,0.07); }
.v2-rc-wire-lbl { display: flex; align-items: center; gap: 0.4rem; height: 100%; padding: 0 0.6rem; background: rgba(8,20,13,0.86); font-size: 0.74rem; color: var(--v2-ink); min-width: 0; }
.v2-rc-wire-lbl b { font-family: var(--v2-font-hud); color: var(--v2-ink-soft); width: 1.4rem; flex: 0 0 auto; }
.v2-rc-wire-lane.is-win .v2-rc-wire-lbl b { color: var(--v2-glow); }
.v2-rc-wire-name { font-family: var(--v2-font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-rc-wire-lbl em { font-style: normal; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); margin-left: auto; flex: 0 0 auto; }
.v2-rc-wire-lane.is-mine .v2-rc-wire-lbl { box-shadow: inset 3px 0 0 var(--v2-glow); }
/* Field: marker's LEFT edge = x% of (field width - marker width), so it never leaves the field.
   12px right padding reserves the wire. */
.v2-rc-wire-field { position: relative; height: 100%; margin-right: 0.75rem; }
.v2-rc-wire-lane .v2-rc-wire-field::after { content: ""; position: absolute; top: 0; bottom: 0; right: -0.5625rem; width: 0.375rem; background: repeating-linear-gradient(180deg, #fff8ea 0 4px, #1a1408 4px 8px); }
.v2-rc-wire-marker { position: absolute; top: 3px; left: calc(var(--x) * (100% - 1.625rem) / 100); width: 1.625rem; height: 1.625rem; border-radius: 50%; background: rgba(8,20,13,0.9); border: 2px solid rgba(243,234,211,0.6); display: grid; place-items: center; overflow: hidden; font-family: var(--v2-font-hud); font-size: 0.7rem; color: var(--v2-ink); }
.v2-rc-wire-marker img { width: 100%; height: auto; }
.v2-rc-wire-lane.is-win .v2-rc-wire-marker { border-color: var(--v2-glow); box-shadow: 0 0 8px rgba(255,181,69,0.6); }
.v2-rc-wire-lane.is-mine .v2-rc-wire-marker { border-color: var(--v2-glow); }
.v2-rc-wire-lane.is-off .v2-rc-wire-marker { border-style: dashed; }
.v2-rc-wire-off { position: absolute; left: 2rem; top: 0.5rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-bright); background: rgba(8,20,13,0.8); padding: 0 0.3rem; border-radius: 3px; }
.v2-rc-wire-ticks { height: 1.375rem; background: var(--v2-surface); }
.v2-rc-wire-ticks .v2-rc-wire-lbl { background: var(--v2-surface); }
.v2-rc-wire-tick { position: absolute; top: 0.25rem; left: calc(var(--x) * (100% - 1.625rem) / 100 + 0.8125rem); transform: translateX(-50%); font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-rc-wire-foot { margin: 0.5rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
@media (prefers-reduced-motion: no-preference) {
  .v2-rc-wire[open] .v2-rc-wire-marker { animation: v2-rc-wire-in 600ms ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-rc-wire-sum-ic { transition: none; }   /* chevron snaps instead of rotating */
}
@keyframes v2-rc-wire-in { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* Stack the conditions box above the lines below 1100px, not 900px: between the two, a
   300px side column leaves the 8-column result grid ~90px for the horse name. */
@media (max-width: 1100px) {
  .v2-rc-cols { grid-template-columns: 1fr; }
  .v2-rc-box { display: grid; grid-template-columns: minmax(0, 16.25rem) minmax(0, 1fr); }
  .v2-rc-box-oval { border-bottom: none; border-right: 1px solid var(--v2-line); display: flex; align-items: center; }
  .v2-rc-cd { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .v2-rc-lines-head.is-result, .v2-rc-line.is-result { grid-template-columns: 3.25rem 2.5rem minmax(0, 1fr) 5rem 3rem 4.75rem 3.5rem; }
  .v2-rc-line.is-result .v2-rc-portrait, .v2-rc-lines-head.is-result span:nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  .v2-rc-mast { grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; }
  .v2-rc-post { min-width: 5.125rem; padding: 0.7rem; }
  .v2-rc-post-time { font-size: 1.25rem; }
  .v2-rc-title-col { padding: 0.7rem 0.8rem 0.7rem 0; }
  .v2-rc-banner { display: none; }
  .v2-rc-title { font-size: 1.15rem; }
  .v2-rc-purse { grid-column: 1 / -1; border-left: none; border-top: 1px dashed var(--v2-line); flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 0.6rem 0.9rem; }
  .v2-rc-purse-v { font-size: 1.3rem; }
  .v2-rc-mast-actions { width: 100%; }
  .v2-rc-mast-actions .v2-btn { flex: 1; justify-content: center; min-height: 2.75rem; }
  .v2-rc-replay { grid-template-columns: auto minmax(0, 1fr); }
  .v2-rc-replay-btn { grid-column: 1 / -1; justify-content: center; }
  .v2-rc-box { display: block; }
  .v2-rc-box-oval { border-right: none; border-bottom: 1px solid var(--v2-line); }
  .v2-rc-box-oval .v2-rk-oval { max-width: 18.75rem; margin: 0 auto; }
  .v2-rc-lines-head { display: none; }
  .v2-rc-line { grid-template-columns: 2.125rem 2.5rem minmax(0, 1fr) 3.5rem; gap: 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-rc-line .v2-rk-cloth { width: 1.875rem; height: 2.25rem; font-size: 0.95rem; }
  .v2-rc-line .v2-rk-portrait { width: 2.5rem; height: 2.5rem; }
  .v2-rc-line.is-result { grid-template-columns: 2.125rem minmax(0, 1fr) auto; grid-template-areas: "pos who time" "pos money sr"; row-gap: 0.2rem; }
  .v2-rc-line.is-result .v2-rc-pos { grid-area: pos; }
  .v2-rc-line.is-result .v2-rk-cloth { display: none; }
  .v2-rc-line.is-result .v2-rc-who { grid-area: who; }
  .v2-rc-line.is-result .v2-rc-time { grid-area: time; }
  .v2-rc-line.is-result .v2-rc-sr { grid-area: sr; }
  .v2-rc-line.is-result .v2-rc-money { grid-area: money; display: flex; gap: 0.8rem; }
  .v2-rc-wire-lane, .v2-rc-wire-ticks { grid-template-columns: 5.2rem minmax(0, 1fr); }
  .v2-rc-wire-name { display: none; }
  .v2-rc-wire-sum-note { display: none; }
}

/* ---------- Stable yard (v2-home.pug) ---------- */
.v2-yard-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.v2-yard-hello { margin: 0; font-family: var(--v2-font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yard-hello b { color: var(--v2-brass); }
.v2-yard-stable { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.5rem; color: var(--v2-ink); }
.v2-yard-ranks { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.v2-yard-rank { display: flex; align-items: center; gap: 0.55rem; border: 1px solid var(--v2-line); border-radius: 8px; padding: 0.45rem 0.8rem; background: var(--v2-surface); }
.v2-yard-rank .v2-rk-ic { color: var(--v2-brass); width: 1.375rem; height: 1.375rem; }
.v2-yard-rank b { display: block; font-family: var(--v2-font-hud); font-size: 1.25rem; color: var(--v2-ink); line-height: 1; }
.v2-yard-rank b.is-money { color: var(--v2-glow); }
.v2-yard-rank small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--v2-ink-faint); }
.v2-yard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-yard-main > .v2-section-label:first-child, .v2-yard-side > .v2-section-label:first-child { margin-top: 0; }
.v2-yard-stalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.625rem, 1fr)); gap: 0.9rem; }
.v2-yard-stall { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.v2-yard-door { position: relative; height: 7rem; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(11,26,18,0.85)), repeating-linear-gradient(90deg, #2a2016 0 22px, #241b12 22px 23px), #2a2016; border-bottom: 2px solid var(--v2-brass); }
.v2-yard-door::before { content: ""; position: absolute; inset: 0.625rem 0.75rem auto; height: 2.75rem; border: 2px solid rgba(199,154,63,0.35); border-bottom: none; border-radius: 40px 40px 0 0; }
.v2-yard-door img { position: relative; height: 6rem; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6)); }
.v2-yard-initials { position: relative; width: 3.5rem; height: 3.5rem; margin-bottom: 1.375rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--v2-font-display); font-weight: 700; color: var(--v2-ink-bright); border: 2px solid rgba(243,234,211,0.85); }
.v2-yard-plate { position: absolute; left: 50%; bottom: -0.6875rem; transform: translateX(-50%); background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); color: var(--v2-ink-dark); font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; padding: 0.12rem 0.5rem; border-radius: 3px; white-space: nowrap; }
.v2-yard-body { padding: 1rem 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.v2-yard-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.v2-yard-name a { color: var(--v2-ink); }
.v2-yard-name a:hover { color: var(--v2-glow); }
.v2-yard-tag { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-yard-cond { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.v2-yard-ring { --p: 0; width: 2.375rem; height: 2.375rem; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: conic-gradient(var(--ring, var(--v2-glow)) calc(var(--p) * 1%), rgba(243,234,211,0.12) 0); }
.v2-yard-ring.is-ready { --ring: var(--v2-good); }
.v2-yard-ring.is-mid { --ring: var(--v2-glow); }
.v2-yard-ring.is-low { --ring: var(--v2-signal); }
.v2-yard-ring span { width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--v2-surface); display: grid; place-items: center; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-yard-act { margin-top: auto; width: 100%; min-height: 2.25rem; }
.v2-raceticket { display: grid; grid-template-columns: 6rem minmax(0, 1fr); background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; margin-bottom: 0.4rem; }
.v2-raceticket:hover { border-color: var(--v2-brass); }
.v2-raceticket-stub { background: linear-gradient(180deg, rgba(255,181,69,0.14), rgba(255,181,69,0.04)); border-right: 2px dashed var(--v2-line); display: flex; align-items: center; justify-content: center; padding: 0.8rem 0.4rem; }
.v2-countdown.v2-countdown-sm { font-size: 1.15rem; text-align: center; }
.v2-raceticket-main { padding: 0.9rem 1rem; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.v2-raceticket-title { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink); }
.v2-raceticket-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
/* .v2-facts is only styled under .v2-hero; the ticket needs the same row treatment. */
.v2-raceticket .v2-facts { display: flex; gap: 0.3rem 1rem; flex-wrap: wrap; font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-raceticket .v2-facts .v2-purse-highlight { color: var(--v2-glow); font-weight: 700; }
.v2-raceticket-runner { display: flex; align-items: center; gap: 0.55rem; font-size: 0.78rem; color: var(--v2-ink-soft); border-top: 1px dashed var(--v2-line); padding-top: 0.55rem; }
.v2-raceticket-runner .v2-rk-portrait { width: 2rem; height: 2rem; }
.v2-raceticket-runner b { font-family: var(--v2-font-display); font-weight: 400; color: var(--v2-ink); }
.v2-raceticket-cta { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-yard-clip { list-style: none; margin: 0; padding: 0.4rem 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; position: relative; }
.v2-yard-clip::before { content: ""; position: absolute; top: -0.4375rem; left: 50%; transform: translateX(-50%); width: 4rem; height: 0.75rem; border-radius: 4px; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); }
.v2-yard-clip li + li { border-top: 1px dashed var(--v2-line); }
.v2-yard-order { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.7rem 1rem; min-height: 2.75rem; }
.v2-yard-order:hover { background: rgba(199,154,63,0.06); }
.v2-yard-oi { position: relative; width: 2.125rem; height: 2.125rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--v2-line); color: var(--v2-brass); }
.v2-yard-oi b { position: absolute; top: -0.3125rem; right: -0.4375rem; min-width: 1.125rem; height: 1.125rem; padding: 0 0.25rem; border-radius: 9px; font-family: var(--v2-font-hud); font-size: 0.7rem; line-height: 1.125rem; text-align: center; background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-yard-order.urgent .v2-yard-oi { color: var(--v2-signal-bright); border-color: rgba(255,117,87,0.5); }
.v2-yard-order.urgent .v2-yard-oi b { background: var(--v2-signal); }
.v2-yard-order.good .v2-yard-oi { color: var(--v2-good); border-color: rgba(95,200,145,0.45); }
.v2-yard-order.good .v2-yard-oi b { background: var(--v2-good); }
.v2-yard-ot { min-width: 0; display: flex; flex-direction: column; }
.v2-yard-ol { font-size: 0.84rem; color: var(--v2-ink); }
.v2-yard-os { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yard-og { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); white-space: nowrap; }
.v2-yard-trophies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0.8rem; }
.v2-yard-trophy { display: grid; grid-template-columns: 2.125rem minmax(0, 1fr); gap: 0.7rem; align-items: center; height: 100%; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); border: 1px solid var(--v2-line); border-radius: 8px; padding: 0.75rem 0.9rem; }
.v2-yard-trophy:hover { border-color: var(--v2-brass); }
.v2-yard-trophy .v2-rk-ic { width: 1.875rem; height: 1.875rem; color: var(--v2-glow); }
.v2-yard-trophy b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.9rem; color: var(--v2-ink); line-height: 1.25; }
.v2-yard-trophy small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-yard-trophy em { font-style: normal; font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-glow); }

@media (max-width: 900px) {
  .v2-yard-grid { grid-template-columns: 1fr; }
  .v2-yard-side { order: -1; }
}
@media (max-width: 640px) {
  .v2-yard-ranks { width: 100%; }
  .v2-yard-rank { flex: 1 1 0; min-width: 0; padding: 0.45rem 0.55rem; }
  /* Three badges share ~340px: drop the icons and let the text column shrink, or a
     four-figure earnings value pushes the page wider than the viewport. */
  .v2-yard-rank .v2-rk-ic { display: none; }
  .v2-yard-rank > span { min-width: 0; }
  .v2-yard-rank b { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-yard-rank small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-yard-stalls { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .v2-yard-door { height: 5.75rem; }
  .v2-yard-door img { height: 5rem; }
  .v2-yard-body { padding: 0.9rem 0.6rem 0.6rem; }
  .v2-yard-act { min-height: 2.75rem; padding: 0.6rem 0.4rem; }
  .v2-raceticket { grid-template-columns: 4.875rem minmax(0, 1fr); }
}

/* ===== Racing hub (round 2) ===== */
/* v2-racing.pug, "Race Day" (SPEC-racing-m.md). Prefix .v2-rh-*. Reuses .v2-raceticket
   (base rules untouched), the race kit, .v2-postgroup, .v2-status-flag, .v2-cross-link. */

/* Status word: race is short of system_info.entrymultiplier entries (racing.aspx:342). */
.v2-status-flag.short { color: var(--v2-signal-bright); border-color: rgba(255,117,87,0.45); background: rgba(255,117,87,0.1); }

/* Day chips */
.v2-rh-days { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: stretch; margin-bottom: 1.1rem; }
.v2-rh-day { display: flex; flex-direction: column; justify-content: center; min-width: 8rem; min-height: 3rem; padding: 0.5rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.v2-rh-day:hover { border-color: var(--v2-brass); }
.v2-rh-day b { font-family: var(--v2-font-hud); font-size: 1rem; letter-spacing: 0.05em; color: var(--v2-ink); }
.v2-rh-day small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rh-day.is-today { border-color: var(--v2-brass); box-shadow: inset 0 -3px 0 var(--v2-brass); }
.v2-rh-links { margin-left: auto; display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }

/* Next-off ticket: page-local modifier adds an oval column to Home's ticket. */
.v2-raceticket.v2-rh-next { grid-template-columns: 7.5rem minmax(0, 1fr) 15.625rem; margin-bottom: 0.4rem; }
.v2-rh-next .v2-countdown-sm { font-size: 1.5rem; }
.v2-rh-next-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 1.3rem; }
.v2-rh-next .v2-raceticket-cta { margin-left: auto; }
.v2-rh-next-oval { display: flex; align-items: center; padding: 0.6rem 0.8rem; border-left: 1px dashed var(--v2-line); background: #0f2218; }

/* Board */
.v2-rh-dayblock { scroll-margin-top: 1rem; }
.v2-rh-dayblock > h2.v2-postgroup { font-weight: 400; }
.v2-rh-meets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(23.75rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.v2-rh-meet { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rh-meet-head { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.65rem 1rem; background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); border-bottom: 2px solid var(--v2-brass); }
.v2-rh-badge { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--v2-ink-dark); background: radial-gradient(circle at 35% 30%, #ecd08c, var(--v2-brass) 65%, #8a6a26); border: 2px solid rgba(255,248,234,0.6); }
.v2-rh-meet-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; line-height: 1.2; color: var(--v2-ink-bright); }
.v2-rh-meet-sub { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rh-trackcard { display: inline-flex; align-items: center; min-height: 2.75rem; }
.v2-rh-lines { list-style: none; margin: 0; padding: 0; }
.v2-rh-lines li + li { border-top: 1px dashed var(--v2-line); }
.v2-rh-race { display: grid; grid-template-columns: 4.875rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; padding: 0.65rem 1rem; min-height: 2.75rem; }
.v2-rh-race:hover { background: rgba(199,154,63,0.06); }
.v2-rh-race:focus-visible { outline-offset: -3px; }            /* the card clips an outward ring */
.v2-rh-race.is-mine { background: rgba(255,181,69,0.06); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-rh-mini { display: block; min-height: 1px; background: #0f2218; border: 1px solid var(--v2-line); border-radius: 6px; padding: 3px 0.25rem; }
.v2-rk-oval-mini .v2-rk-course { stroke-width: 14; }
.v2-rk-oval-mini .v2-rk-run { stroke-width: 7; filter: none; }
.v2-rk-oval-mini .v2-rk-lap { stroke-width: 5; }
.v2-rk-oval-mini .v2-rk-start { stroke-width: 4; }
.v2-rh-what { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.v2-rh-top { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.v2-rh-time { flex: 0 0 auto; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.05rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-rh-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); }
.v2-rh-top .v2-rk-grade { width: 1.5rem; height: 1.5rem; font-size: 0.6rem; }
.v2-rh-top .v2-rk-mine { margin-left: 0; }
.v2-rh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rh-meta .v2-rk-surface, .v2-rh-meta .v2-rk-going { font-size: 0.66rem; gap: 0.3rem; padding: 0.14rem 0.5rem 0.14rem 0.2rem; }
.v2-rh-meta .v2-rk-going { padding-left: 0.45rem; }
.v2-rh-meta .v2-rk-swatch { width: 0.8125rem; height: 0.8125rem; }
.v2-rh-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.v2-rh-purse { font-family: var(--v2-font-mono); font-size: 0.86rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-rh-end .v2-status-flag, .v2-rh-wc-pending .v2-status-flag { font-size: 0.66rem; padding: 0.22rem 0.55rem; white-space: nowrap; }

/* Winner's circle */
.v2-rh-wc { margin-top: 1.6rem; }
.v2-rh-reveal { align-items: center; flex-wrap: wrap; gap: 0.5rem; min-height: 2.75rem; padding: 0.4rem 0.9rem; margin-bottom: 0.8rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); cursor: pointer; font-family: var(--v2-font-display); color: var(--v2-ink); }
.v2-rh-reveal input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--v2-brass); }
.v2-rh-reveal:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-rh-reveal small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rh-wc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(13.125rem, 100%), 1fr)); gap: 0.9rem; }
.v2-rh-wc-card { display: flex; flex-direction: column; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rh-wc-photo { position: relative; height: 6.25rem; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(11,26,18,0.8)), repeating-linear-gradient(100deg, #2d5a38 0 26px, var(--v2-turf) 26px 52px); border-bottom: 2px solid var(--v2-brass); }
.v2-rh-wc-photo img { position: relative; height: 5.375rem; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6)); }
.v2-rh-wc-noimg { margin-bottom: 1.625rem; color: var(--v2-glow); }
.v2-rh-wc-noimg .v2-rk-ic { width: 2.5rem; height: 2.5rem; }
.v2-rh-wc-q { width: 3.25rem; height: 3.25rem; margin-bottom: 1.5rem; border-radius: 50%; border: 2px dashed rgba(243,234,211,0.6); place-items: center; font-family: var(--v2-font-display); font-size: 1.4rem; color: var(--v2-ink); background: rgba(8,20,13,0.6); }
.v2-rh-wc-plate { position: absolute; left: 50%; bottom: -0.6875rem; transform: translateX(-50%); padding: 0.12rem 0.5rem; border-radius: 3px; white-space: nowrap; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); color: var(--v2-ink-dark); font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; }
.v2-rh-wc-body { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 0.85rem 0.8rem; }
.v2-rh-wc-race { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); }
.v2-rh-wc-race:hover { color: var(--v2-glow); }
.v2-rh-wc-race .v2-rk-grade { width: 1.375rem; height: 1.375rem; font-size: 0.56rem; }
.v2-rh-wc-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rh-wc-winner { margin: 0; }
.v2-rh-wc-winner a { font-family: var(--v2-font-display); font-size: 1rem; color: var(--v2-ink-bright); }
.v2-rh-wc-winner a:hover { color: var(--v2-glow); }
.v2-rh-wc-winner small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }
.v2-rh-wc-hidden { margin: 0; padding: 0.3rem 0.5rem; border: 1px dashed var(--v2-line); border-radius: 4px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rh-wc-pending { margin: 0; }
.v2-rh-wc-acts { margin-top: auto; padding-top: 0.3rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.v2-rh-wc-acts .v2-btn { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; }

/* Spoiler reveal (SPEC §8). Baseline = no :has() support: winners SHOWN, toggle and
   placeholders hidden. Only browsers that can un-hide them get them hidden. */
.v2-rh-reveal, .v2-rh-wc-q, .v2-rh-wc-hidden { display: none; }
@supports selector(:has(*)) {
  .v2-rh-reveal { display: inline-flex; }
  .v2-rh-wc:not(:has(.v2-rh-reveal input:checked)) .v2-rh-wc-photo img,
  .v2-rh-wc:not(:has(.v2-rh-reveal input:checked)) .v2-rh-wc-noimg,
  .v2-rh-wc:not(:has(.v2-rh-reveal input:checked)) .v2-rh-wc-winner { display: none; }
  .v2-rh-wc:not(:has(.v2-rh-reveal input:checked)) .v2-rh-wc-q { display: grid; }
  .v2-rh-wc:not(:has(.v2-rh-reveal input:checked)) .v2-rh-wc-hidden { display: block; }
}

@media (max-width: 900px) {
  .v2-raceticket.v2-rh-next { grid-template-columns: 6.875rem minmax(0, 1fr); }
  .v2-rh-next-oval { grid-column: 1 / -1; justify-content: center; border-left: none; border-top: 1px dashed var(--v2-line); }
  .v2-rh-next-oval .v2-rk-oval { max-width: 18.75rem; }
}
@media (max-width: 640px) {
  .v2-rh-day { flex: 1 1 0; min-width: 0; padding: 0.45rem 0.55rem; }
  .v2-rh-day b, .v2-rh-day small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v2-rh-day b { font-size: 0.85rem; }
  .v2-rh-links { margin-left: 0; width: 100%; }
  .v2-rh-links .v2-cross-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .v2-raceticket.v2-rh-next { grid-template-columns: 5.125rem minmax(0, 1fr); }
  .v2-rh-next .v2-countdown-sm { font-size: 1.05rem; }
  .v2-rh-next-title { font-size: 1.05rem; }
  .v2-rh-next .v2-raceticket-runner { flex-wrap: wrap; }
  .v2-rh-next .v2-raceticket-cta { margin-left: 0; flex-basis: 100%; }
  .v2-rh-next-oval .v2-rk-oval { max-width: 16.25rem; }
  .v2-rh-meet-head { grid-template-columns: 2.375rem minmax(0, 1fr) auto; padding: 0.6rem 0.7rem; }
  .v2-rh-badge { width: 2.375rem; height: 2.375rem; font-size: 0.62rem; }
  .v2-rh-race { grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: 0.55rem; padding: 0.6rem 0.7rem; }
  .v2-rh-wc-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .v2-rh-wc-photo { height: 5.25rem; }
  .v2-rh-wc-photo img { height: 4.5rem; }
  .v2-rh-wc-body { padding: 0.9rem 0.6rem 0.6rem; }
  .v2-rh-wc-acts .v2-btn { flex: 1 1 100%; justify-content: center; min-height: 2.75rem; }
  .v2-rh-reveal { width: 100%; }
  .v2-rh-reveal small { flex-basis: 100%; }
}
/* ===== end Racing hub (round 2) ===== */
/* ===== Search (round 2) ===== */
/* v2-search.pug "Paddock Cards" (SPEC-search-m.md). Reuses .v2-yard-stall/-door/-plate/-body/
   -initials/-act, .v2-raceticket*, .v2-yard-trophies/-trophy, .v2-status-chip/.v2-status-flag
   and the race kit UNCHANGED. Everything below is .v2-sx-* or compounds with it. */

/* Counter: the search form */
.v2-sx-counter { position: relative; border: 1px solid var(--v2-line); border-radius: 12px; padding: 0 1.1rem 1.1rem; margin-bottom: 0.4rem; background: radial-gradient(120% 160% at 0% 0%, rgba(199,154,63,0.14), var(--v2-surface) 55%); }
.v2-sx-counter::before, .v2-sx-counter::after { content: ""; position: absolute; width: 1.125rem; height: 1.125rem; border: 2px solid var(--v2-brass); opacity: 0.7; pointer-events: none; }
.v2-sx-counter::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.v2-sx-counter::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }
.v2-sx-tabs { display: flex; margin: 0 0 1rem; padding: 0; border: 0; border-bottom: 1px solid var(--v2-line); min-width: 0; }
.v2-sx-tab { position: relative; flex: 0 0 auto; }
.v2-sx-tab input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.v2-sx-tab span { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-width: 5.75rem; min-height: 2.75rem; padding: 0.8rem 1.2rem 0.6rem; margin-bottom: -1px; border-bottom: 3px solid transparent; font-family: var(--v2-font-display); font-size: 0.85rem; color: var(--v2-ink-soft); cursor: pointer; }
.v2-sx-tab span .v2-rk-ic { width: 1.625rem; height: 1.625rem; stroke-width: 1.5; color: var(--v2-ink-faint); }
.v2-sx-tab span:hover { color: var(--v2-ink); }
/* Selected = bold + underline bar + lit icon: never colour alone. */
.v2-sx-tab input:checked + span { color: var(--v2-ink-bright); font-weight: 700; border-bottom-color: var(--v2-glow); }
.v2-sx-tab input:checked + span .v2-rk-ic { color: var(--v2-glow); }
.v2-sx-tab input:focus-visible + span { outline: 2px solid var(--v2-glow); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.v2-sx-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.6rem; }
.v2-sx-bar label { grid-column: 1 / -1; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sx-bar .v2-input { min-width: 0; width: 100%; min-height: 3rem; padding: 0.5rem 0.9rem; font-family: var(--v2-font-display); font-size: 1.15rem; background: rgba(0,0,0,0.25); }
.v2-sx-bar .v2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem; font-size: 0.82rem; }
.v2-sx-counter .v2-tk-note { margin: 0.7rem 0 0; }
.v2-sx-counter .v2-tk-note a { color: var(--v2-brass); }
.v2-sx-counter .v2-tk-note a:hover { color: var(--v2-glow); }

/* Result headline */
.v2-sx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; flex-wrap: wrap; margin: 1.6rem 0 0.8rem; }
.v2-sx-title { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.2rem; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-sx-title em { font-style: italic; color: var(--v2-glow); }
.v2-sx-sort { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* Shared card bits */
.v2-sx-stalls, .v2-sx-tickets, .v2-sx-plaques, .v2-sx-jocks, .v2-sx-room { list-style: none; margin: 0; padding: 0; }
.v2-sx-main { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.v2-sx-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; line-height: 1.2; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-sx-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sx-earn { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.15rem; line-height: 1; color: var(--v2-glow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-sx-earn small { margin-left: 0.3rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sx-medals { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; white-space: nowrap; }
.v2-sx-medals b { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.25rem; border-radius: 12px; border: 1px solid rgba(255,248,234,0.6); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; color: var(--v2-ink-dark); font-variant-numeric: tabular-nums; }
.v2-sx-medals b.m1 { background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); }
.v2-sx-medals b.m2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c9d3cc 60%, #8b968f); }
.v2-sx-medals b.m3 { background: radial-gradient(circle at 35% 30%, #f0c49c, var(--v2-medal-bronze) 60%, #7d5332); }
.v2-sx-medals-of { margin-left: 0.15rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* Horses: stall cards. Compound selector so it beats .v2-yard-stalls' 170px min at desktop;
   the phone 2-up is restated below for the same reason. */
.v2-yard-stalls.v2-sx-stalls { grid-template-columns: repeat(auto-fill, minmax(11.875rem, 1fr)); }
.v2-sx-stall { height: 100%; }
.v2-sx-stall .v2-yard-body { gap: 0.4rem; }
.v2-sx-owner { font-family: var(--v2-font-display); font-style: italic; font-size: 0.8rem; color: var(--v2-brass); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.v2-sx-owner:hover { color: var(--v2-glow); }
.v2-sx-honours { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.v2-sx-honours .v2-rk-tag { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.66rem; }
.v2-sx-honours .v2-rk-tag .v2-rk-ic { width: 0.6875rem; height: 0.6875rem; }

/* Races: tickets */
.v2-sx-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 23.75rem), 1fr)); gap: 0.8rem; }
.v2-sx-tickets .v2-raceticket { height: 100%; margin-bottom: 0; }
.v2-sx-ticket .v2-raceticket-stub { flex-direction: column; text-align: center; }
.v2-sx-stub-m { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; color: var(--v2-brass); }
.v2-sx-stub-d { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.5rem; line-height: 1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-sx-stub-t { margin-top: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-sx-tk-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.v2-sx-tk-top > div { min-width: 0; }
.v2-sx-ticket .v2-raceticket-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; overflow-wrap: anywhere; }
.v2-sx-ticket:hover .v2-raceticket-title { color: var(--v2-glow); }
.v2-sx-purse { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.1rem; color: var(--v2-glow); white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-sx-dist { display: inline-flex; align-items: center; font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink); padding: 0.28rem 0.7rem; border-radius: 100px; border: 1px solid var(--v2-line); background: rgba(243,234,211,0.05); white-space: nowrap; }

/* Stables: plaques */
.v2-sx-plaques { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20.625rem), 1fr)); gap: 0.8rem; }
.v2-sx-plaque { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.8rem; align-items: center; height: 100%; padding: 0.8rem 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); }
.v2-sx-plaque:hover, .v2-sx-jock:hover { border-color: var(--v2-brass); }
.v2-sx-plaque:hover .v2-sx-name, .v2-sx-jock:hover .v2-sx-name { color: var(--v2-glow); }
.v2-sx-avatar { width: 3.5rem; height: 3.5rem; border-radius: 8px; border: 2px solid rgba(199,154,63,0.6); overflow: hidden; background: var(--v2-surface-2); flex: 0 0 auto; }
.v2-sx-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-sx-recs { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.15rem 0.6rem; align-items: baseline; margin: 0.15rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-sx-recs dt { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sx-recs dd { margin: 0; overflow-wrap: anywhere; }
.v2-sx-recs dd.is-money { color: var(--v2-glow); text-align: right; white-space: nowrap; }

/* Jockeys: cap cards */
.v2-sx-jocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: 0.8rem; }
.v2-sx-jock { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; height: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-sx-jock .v2-sx-earn { font-size: 0.95rem; }
.v2-sx-cap { position: relative; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #2f4a3a, var(--v2-surface-2)); border: 2px solid rgba(243,234,211,0.5); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.8rem; color: var(--v2-ink-bright); }
.v2-sx-cap::after { content: ""; position: absolute; bottom: 0.375rem; left: 0.5rem; right: 0.5rem; height: 3px; border-radius: 2px; background: var(--v2-brass); opacity: 0.8; }

/* Explore: popular-searches tile (a div holding three links) */
.v2-sx-pop-links { display: flex; flex-direction: column; margin-top: 0.15rem; }
.v2-sx-pop-links a { display: inline-flex; align-items: center; min-height: 1.75rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-brass); }
.v2-sx-pop-links a:hover { color: var(--v2-glow); }

@media (max-width: 640px) {
  .v2-sx-counter { padding: 0 0.7rem 0.8rem; }
  .v2-sx-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-sx-tab span { min-width: 0; min-height: 3.5rem; padding: 0.6rem 0.2rem 0.5rem; font-size: 0.74rem; }
  .v2-sx-tab span .v2-rk-ic { width: 1.375rem; height: 1.375rem; }
  .v2-sx-bar .v2-input { font-size: 1rem; }
  .v2-sx-bar .v2-btn { padding: 0 0.9rem; }
  .v2-yard-stalls.v2-sx-stalls { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .v2-sx-medals b { min-width: 1.375rem; height: 1.375rem; font-size: 0.68rem; }
  .v2-sx-tickets .v2-raceticket { grid-template-columns: 4.375rem minmax(0, 1fr); }
  .v2-sx-plaque { grid-template-columns: 3rem minmax(0, 1fr); padding: 0.7rem 0.8rem; }
  .v2-sx-avatar { width: 3rem; height: 3rem; }
  .v2-sx-recs { grid-template-columns: auto minmax(0, 1fr); }
  .v2-sx-recs dd.is-money { grid-column: 2; text-align: left; }
  .v2-sx-pop-links a { min-height: 2.75rem; }
}
/* ===== /Search (round 2) ===== */
/* ===== Leaderboards (round 2) ===== */
/* v2-leaderboards.pug: "Form Guide" + Winner's Circle podium. See SPEC-leaderboards-m.md.
   Reuses .v2-yard-top/-hello/-stable/-ranks/-rank/-door/-initials, .v2-rk-portrait/-pips/-mine/-tag/-ic,
   .v2-status-chip.retired/.deceased, .v2-section-label .v2-rc-h, .v2-rc-r, .v2-empty.
   Does NOT use or modify .v2-ranked-row. */

/* -- header: scope switch (navigation links; aria-current marks the active one) -- */
.v2-lb-switch { display: inline-flex; border: 1px solid var(--v2-line); border-radius: 100px; padding: 3px; background: var(--v2-surface-2); }
.v2-lb-switch a { display: inline-flex; align-items: center; min-height: 2.125rem; padding: 0.3rem 0.95rem; border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-lb-switch a:hover { color: var(--v2-ink); }
.v2-lb-switch a.on { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }

/* -- board type: three event links -- */
.v2-lb-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); margin-bottom: 0.9rem; }
.v2-lb-event { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 1rem; min-height: 3.5rem; border-right: 1px dashed var(--v2-line); color: var(--v2-ink-soft); }
.v2-lb-event:last-child { border-right: none; }
.v2-lb-event .v2-rk-ic { width: 1.625rem; height: 1.625rem; color: var(--v2-brass); }
.v2-lb-event b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; color: var(--v2-ink); }
.v2-lb-event small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-lb-event:hover { background: rgba(199, 154, 63, 0.06); }
/* Selected = tint + 3px brass underline + bold label: never colour alone. */
.v2-lb-event.on { background: linear-gradient(180deg, rgba(199, 154, 63, 0.2), rgba(199, 154, 63, 0.05)); box-shadow: inset 0 -3px 0 var(--v2-brass); }
.v2-lb-event.on b { color: var(--v2-ink-bright); font-weight: 700; }
.v2-lb-event:focus-visible { outline-offset: -3px; }

/* -- four stat badges as a full-width strip (Home uses three in its header) -- */
.v2-yard-ranks.v2-lb-ranks { width: 100%; margin-bottom: 0.9rem; }
.v2-lb-ranks .v2-yard-rank { flex: 1 1 0; min-width: 0; }

/* -- your stable -- */
.v2-lb-you { display: flex; align-items: center; gap: 0.6rem 1.2rem; flex-wrap: wrap; border: 1px solid rgba(255, 181, 69, 0.4); border-radius: 10px; padding: 0.7rem 1rem; background: rgba(255, 181, 69, 0.06); margin-bottom: 1.2rem; }
.v2-lb-you p { margin: 0; font-size: 0.82rem; color: var(--v2-ink-soft); min-width: 0; }
.v2-lb-you p b { color: var(--v2-ink); font-weight: 600; }
.v2-lb-you p a { color: var(--v2-glow); }
.v2-lb-you p a:hover { text-decoration: underline; }
.v2-lb-you .v2-rk-pips { grid-template-columns: repeat(20, 0.5625rem); }
.v2-lb-you .v2-rk-pips i { width: 0.5625rem; height: 0.5625rem; }
.v2-lb-you.is-none { border-color: var(--v2-line); border-style: dashed; background: transparent; }
.v2-lb-you.is-none p a { color: var(--v2-brass); }

/* -- placing rosette: the .v2-rk-grade metals, but says "1st" and has ribbon tails, so it never reads as a G1 badge -- */
.v2-lb-rosette { position: relative; z-index: 0; display: inline-grid; place-items: center; width: 2.875rem; height: 2.875rem; border-radius: 50%; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.82rem; color: var(--v2-ink-dark); border: 2px solid rgba(255, 248, 234, 0.75); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); flex: 0 0 auto; isolation: isolate; }
.v2-lb-rosette::before, .v2-lb-rosette::after { content: ""; position: absolute; z-index: -1; top: 70%; width: 0.75rem; height: 1.25rem; background: inherit; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.v2-lb-rosette::before { left: 0.5rem; transform: rotate(14deg); }
.v2-lb-rosette::after { right: 0.5rem; transform: rotate(-14deg); }
.v2-lb-rosette.r1 { background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); }
.v2-lb-rosette.r2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c9d3cc 60%, #8b968f); }
.v2-lb-rosette.r3 { background: radial-gradient(circle at 35% 30%, #f0c49c, var(--v2-medal-bronze) 60%, #7d5332); }
.v2-lb-rosette.sm { width: 2.125rem; height: 2.125rem; font-size: 0.7rem; }
.v2-lb-rosette.sm::before, .v2-lb-rosette.sm::after { width: 0.5625rem; height: 0.875rem; }
.v2-lb-rosette.sm::before { left: 0.3125rem; }
.v2-lb-rosette.sm::after { right: 0.3125rem; }

/* -- podium: DOM order is 1, 2, 3; visual order is 2, 1, 3 -- */
.v2-lb-podium { list-style: none; margin: 0.4rem 0 0.4rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: end; }
.v2-lb-podium .p1 { order: 2; }
.v2-lb-podium .p2 { order: 1; }
.v2-lb-podium .p3 { order: 3; }
.v2-lb-step { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px 10px 0 0; overflow: hidden; }
.v2-lb-step:hover { border-color: var(--v2-brass); }
.v2-lb-step:focus-within { border-color: var(--v2-glow); }
.p1 .v2-lb-step { border-color: rgba(255, 181, 69, 0.6); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.v2-lb-step.is-mine { box-shadow: inset 0 3px 0 var(--v2-glow); }
.p1 .v2-lb-step.is-mine { box-shadow: inset 0 3px 0 var(--v2-glow), 0 12px 30px rgba(0, 0, 0, 0.35); }
.p1 .v2-yard-door { height: 8.75rem; }
.p1 .v2-yard-door img { height: 7.75rem; }
.v2-lb-step .v2-yard-initials { margin-bottom: 1.125rem; }
.v2-lb-step-body { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0 0.9rem 0.9rem; text-align: center; min-width: 0; }
.v2-lb-step-body > .v2-lb-rosette { margin: -1.4375rem 0 0.2rem; }
.v2-lb-step-body p { margin: 0; }
.v2-lb-step-name { margin: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.3rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.08rem; line-height: 1.2; overflow-wrap: anywhere; }
.p1 .v2-lb-step-name { font-size: 1.3rem; }
.v2-lb-step-name .v2-rk-mine { margin-left: 0; }
.v2-lb-step-link { color: var(--v2-ink); }
.p1 .v2-lb-step-link { color: var(--v2-ink-bright); }
/* Stretched link: the whole card is clickable without nesting the stable link inside an anchor. */
.v2-lb-step-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.v2-lb-step:hover .v2-lb-step-link { color: var(--v2-glow); }
.v2-lb-step-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0.6rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-lb-step-sub a, .v2-lb-step-tags { position: relative; z-index: 2; }
.v2-lb-step-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; }
.v2-lb-step-val { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.45rem; line-height: 1.1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-lb-step-val.is-money { color: var(--v2-glow); }
.p1 .v2-lb-step-val { font-size: 1.9rem; }
.p1 .v2-lb-step-val.is-money { text-shadow: 0 0 14px rgba(255, 181, 69, 0.35); }
.v2-lb-step-val small { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-lb-step .v2-lb-form { width: 100%; max-width: 15rem; }
.v2-lb-step-gap { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-lb-plinth { display: grid; place-items: center; height: 2.125rem; margin-top: auto; background: linear-gradient(180deg, #2a2016, #1a130c); border-top: 2px solid var(--v2-brass); font-family: var(--v2-font-display); font-size: 1.3rem; color: var(--v2-brass); }
.p1 .v2-lb-plinth { height: 4.375rem; font-size: 2rem; color: var(--v2-glow); }
.p2 .v2-lb-plinth { height: 3.125rem; font-size: 1.6rem; }

/* -- form-guide lines: own 5-column grid (pos, portrait, who, form, value) -- */
.v2-lb-lines-head, .v2-lb-line { display: grid; grid-template-columns: 3.25rem 2.75rem minmax(0, 1fr) 12.5rem 8.75rem; gap: 0.8rem; align-items: center; }
.v2-lb-lines-head { padding: 0 1rem 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-lb-lines-head i.k { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 2px; vertical-align: -1px; margin: 0 0.2rem 0 0.35rem; }
.v2-lb-lines { list-style: none; margin: 0 0 1.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-lb-line { padding: 0.6rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-lb-line:last-child { border-bottom: none; }
.v2-lb-line:hover { background: rgba(199, 154, 63, 0.05); }
/* YOURS = tint + 3px glow bar + the YOURS text tag: never colour alone. */
.v2-lb-line.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-lb-pos { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.15rem; color: var(--v2-ink-soft); text-align: center; }
.v2-lb-pos sup { font-size: 0.6em; }
.v2-lb-line .v2-rk-portrait { overflow: hidden; }
.v2-lb-initials { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--v2-font-display); font-weight: 700; font-size: 0.8rem; color: var(--v2-ink-bright); }
.v2-lb-who { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-lb-name { display: flex; align-items: center; gap: 0.4rem; min-width: 0; white-space: nowrap; font-family: var(--v2-font-display); font-size: 1rem; }
.v2-lb-name a { color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.v2-lb-name a:hover { color: var(--v2-glow); }
.v2-lb-name .v2-rk-mine { margin-left: 0; }
.v2-lb-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.6rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-lb-stable { color: var(--v2-brass); }
.v2-lb-stable:hover { color: var(--v2-glow); }
.v2-lb-sub .v2-status-chip, .v2-lb-step-tags .v2-status-chip { font-size: 0.66rem; padding: 0.06rem 0.45rem; }
.v2-lb-honour { display: inline-flex; align-items: center; gap: 0.25rem; flex: 0 0 auto; font-size: 0.66rem; padding: 0.06rem 0.35rem; }
.v2-lb-honour img { width: 0.75rem; height: 0.75rem; }
.v2-lb-form { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.v2-lb-bar { display: flex; height: 0.5rem; border-radius: 4px; overflow: hidden; background: var(--v2-surface-2); border: 1px solid var(--v2-line); }
/* Medal metals, not status colours. Decorative: the text beside the bar (and its sr-only twin) carries the numbers. */
.v2-lb-bar i.w, .v2-lb-lines-head i.k.w { background: var(--v2-brass); }
.v2-lb-bar i.p, .v2-lb-lines-head i.k.p { background: #c9d3cc; }
.v2-lb-bar i.s, .v2-lb-lines-head i.k.s { background: var(--v2-medal-bronze); }
.v2-lb-bar i + i { border-left: 1px solid var(--v2-surface); }
.v2-lb-form-t { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-lb-val { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.v2-lb-val b { font-family: var(--v2-font-hud); font-size: 1.15rem; line-height: 1.1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-lb-val b.is-money { color: var(--v2-glow); }
.v2-lb-val small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }

/* -- other leaderboards: grouped directory (the original's leaderboard/Default.aspx menu) -- */
.v2-lb-dir { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); gap: 1rem; }
.v2-lb-dir section { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.4rem 0; }
.v2-lb-dir h3 { margin: 0.5rem 1rem 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-lb-dir ul { list-style: none; margin: 0; padding: 0; }
.v2-lb-dir li + li { border-top: 1px dashed var(--v2-line); }
.v2-lb-dir a { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.75rem; padding: 0.5rem 1rem; font-family: var(--v2-font-display); font-size: 0.92rem; color: var(--v2-ink); }
.v2-lb-dir a .v2-rk-ic { color: var(--v2-brass); }
.v2-lb-dir a:hover { background: rgba(199, 154, 63, 0.06); color: var(--v2-glow); }
.v2-lb-dir a:focus-visible { outline-offset: -3px; }

@media (max-width: 900px) {
  .v2-lb-lines-head, .v2-lb-line { grid-template-columns: 3rem 2.75rem minmax(0, 1fr) 9.375rem 7.5rem; }
}
@media (max-width: 640px) {
  .v2-lb-top .v2-lb-switch { width: 100%; }
  .v2-lb-switch a { flex: 1; justify-content: center; min-height: 2.5rem; padding: 0.3rem 0.4rem; }
  .v2-lb-event { flex-direction: column; gap: 0.25rem; padding: 0.6rem 0.3rem; text-align: center; }
  .v2-lb-event b { font-size: 0.82rem; }
  .v2-lb-event small { display: none; }
  /* Four badges don't fit one 340px row: 2 x 2. Home's phone rule already hides their icons. */
  .v2-yard-ranks.v2-lb-ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .v2-lb-you .v2-rk-pips { grid-template-columns: repeat(10, 0.5625rem); }
  .v2-lb-podium { grid-template-columns: 1fr; gap: 0.6rem; }
  .v2-lb-podium .p1, .v2-lb-podium .p2, .v2-lb-podium .p3 { order: 0; }
  .v2-lb-step { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); border-radius: 10px; }
  .v2-lb-step .v2-yard-door, .p1 .v2-lb-step .v2-yard-door { height: auto; min-height: 6rem; border-bottom: none; border-right: 2px solid var(--v2-brass); }
  .v2-lb-step .v2-yard-door img, .p1 .v2-lb-step .v2-yard-door img { height: 4.875rem; }
  .v2-lb-step-body { align-items: flex-start; text-align: left; padding: 0.7rem 0.8rem; }
  .v2-lb-step-body > .v2-lb-rosette { margin: 0 0 0.2rem; width: 2.125rem; height: 2.125rem; font-size: 0.7rem; }
  .v2-lb-step-name, .v2-lb-step-sub, .v2-lb-step-tags { justify-content: flex-start; }
  .p1 .v2-lb-step-name { font-size: 1.1rem; }
  .v2-lb-step-val, .p1 .v2-lb-step-val { font-size: 1.3rem; }
  .v2-lb-plinth { display: none; }
  .v2-lb-lines-head { display: none; }
  .v2-lb-line { grid-template-columns: 2.125rem 2.375rem minmax(0, 1fr) auto; grid-template-areas: "pos por who val" "pos por form form"; gap: 0.35rem 0.55rem; padding: 0.6rem 0.7rem; }
  .v2-lb-line > .v2-lb-pos { grid-area: pos; font-size: 1rem; }
  .v2-lb-line > .v2-rk-portrait { grid-area: por; width: 2.375rem; height: 2.375rem; }
  .v2-lb-line > .v2-lb-who { grid-area: who; }
  .v2-lb-line > .v2-lb-form { grid-area: form; }
  .v2-lb-line > .v2-lb-val { grid-area: val; }
  .v2-lb-name { font-size: 0.95rem; }
  .v2-lb-val b { font-size: 1rem; }
}
/* ===== end Leaderboards (round 2) ===== */
/* ===== Stable roster (round 2) ===== */
/* views/v2-stable.pug at /stable. SPEC-stable-m.md. Reuses the Stable Yard (.v2-yard-*) card
   and kit; everything new is .v2-st-*. Never touches .v2-horse-row / .v2-roster. */

/* Author display rules (.v2-btn etc.) beat the UA [hidden] rule; JS relies on hidden. */
.v2-st-root [hidden] { display: none !important; }

.v2-status-chip.needswork { color: var(--v2-glow); background: transparent; border: 1px dashed rgba(255,181,69,0.6); }

/* Tack board */
.v2-st-tacksum { display: none; }
.v2-st-tack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 0 0 1.3rem; }
.v2-st-hook { position: relative; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 0.85rem 0.9rem 0.7rem; }
.v2-st-hook::before { content: ""; position: absolute; top: -0.375rem; left: 1.125rem; width: 1.875rem; height: 0.625rem; border-radius: 3px; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); }
.v2-st-hook h2 { margin: 0 0 0.5rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-st-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.v2-st-links a { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); border: 1px solid var(--v2-line); border-radius: 100px; padding: 0.28rem 0.65rem; white-space: nowrap; }
.v2-st-links a .v2-rk-ic { width: 0.875rem; height: 0.875rem; color: var(--v2-brass); }
.v2-st-links a:hover { color: var(--v2-glow); border-color: var(--v2-brass); }
.v2-st-links a.is-danger .v2-rk-ic { color: var(--v2-signal-bright); }

/* Status tally */
.v2-st-tally { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-st-tally a { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.125rem; border: 1px solid var(--v2-line); border-radius: 100px; padding: 0.3rem 0.75rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); background: var(--v2-surface); white-space: nowrap; }
.v2-st-tally a b { font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-ink); }
.v2-st-tally a:hover { border-color: var(--v2-brass); }
.v2-st-tally a[aria-current="true"] { border-color: var(--v2-brass); background: rgba(199,154,63,0.14); color: var(--v2-ink); }
.v2-st-dot { width: 0.5625rem; height: 0.5625rem; border-radius: 50%; flex: 0 0 auto; }
.v2-st-dot.entered { background: var(--v2-blue); }
.v2-st-dot.ready { background: var(--v2-good); }
.v2-st-dot.training { background: var(--v2-glow); }
.v2-st-dot.needswork { border: 1.5px dashed var(--v2-glow); }
.v2-st-dot.resting { border: 1.5px solid var(--v2-ink-faint); }
/* Days-off readiness, the original's dot_*.png colours (horse_functions.cs:1633-1660). These are
   the game's own legend, not theme status colours. The border keeps black and dark green visible
   on the dark theme; the text beside the dot carries the same information. */
.v2-st-rest { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-st-rest .v2-st-dot { box-shadow: 0 0 0 1px var(--v2-ink-faint); }
.v2-st-dot.rest-unraced { background: #fff; }
.v2-st-dot.rest-none { background: #000; }
.v2-st-dot.rest-red { background: #d62828; }
.v2-st-dot.rest-green { background: #2ecc40; }
.v2-st-dot.rest-darkgreen { background: #0b6623; }
.v2-st-dot.rest-yellow { background: #f4d03f; }
.v2-st-dot.rest-orange { background: #f08c00; }
.v2-st-dot.rest-purple { background: #8e44ad; }

/* Filter bar */
.v2-st-filters { display: flex; flex-wrap: wrap; gap: 0.6rem 0.8rem; align-items: flex-end; padding: 0.8rem 0.9rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; margin-bottom: 1rem; }
.v2-st-f { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-st-f > span, .v2-st-f > label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-st-fgrow { flex: 1 1 11.25rem; }
.v2-st-fgrow .v2-input { width: 100%; }
.v2-st-f .v2-select { min-width: 5.25rem; }
.v2-st-grp { display: flex; gap: 0.4rem; align-items: center; }
.v2-st-grp a { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }
.v2-st-check { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.125rem; font-size: 0.78rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-st-root input[type="checkbox"] { accent-color: var(--v2-brass); width: 1.125rem; height: 1.125rem; margin: 0; }
/* .v2-st-check also names the "Not entered" filter label (inline-flex, min-height 34px); keep the
   roster selection checkboxes that share the class at their 18px box. */
.v2-st-root input.v2-st-check { min-height: 0; display: inline-block; }
.v2-st-right { margin-left: auto; display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.v2-st-seg { align-self: flex-start; display: inline-flex; border: 1px solid var(--v2-brass); border-radius: 6px; overflow: hidden; }
.v2-st-seg a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.125rem; padding: 0.4rem 0.75rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-st-seg a + a { border-left: 1px solid var(--v2-brass); }
.v2-st-seg a[aria-current="true"] { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-st-seg .v2-rk-ic { width: 0.875rem; height: 0.875rem; }
.v2-st-filters .v2-btn .v2-rk-ic, .v2-st-bulkbar .v2-btn .v2-rk-ic { width: 0.875rem; height: 0.875rem; }
.v2-st-filters .js-st-select[aria-pressed="true"] { background: var(--v2-brass); color: var(--v2-ink-dark); }

/* Aisles */
.v2-st-aisle { margin-bottom: 1.1rem; }
.v2-st-ribbon { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; min-height: 2.75rem; padding: 0.4rem 0.6rem 0.4rem 0.3rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--v2-line); }
.v2-st-ribbon::-webkit-details-marker { display: none; }
.v2-st-rb { display: inline-flex; align-items: baseline; gap: 0.5rem; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); color: var(--v2-ink-dark); font-family: var(--v2-font-display); font-size: 0.95rem; padding: 0.25rem 1.2rem 0.25rem 0.8rem; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%); }
.v2-st-rb small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; }
.v2-st-meta { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-st-meta b { color: var(--v2-good); font-weight: 400; }
.v2-st-chev { margin-left: auto; color: var(--v2-brass); display: inline-flex; }
.v2-st-aisle[open] > .v2-st-ribbon .v2-st-chev { transform: rotate(90deg); }
.v2-st-aislesel { display: none; margin: 0 0 0.6rem; }
.v2-st-root.is-selecting .v2-st-aislesel { display: inline-flex; }

/* Compact stalls: modifier on the shipped .v2-yard-stalls / .v2-yard-stall (rules unchanged) */
.v2-yard-stalls.v2-st-compact { grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr)); gap: 0.7rem; }
.v2-st-compact .v2-yard-stall { position: relative; }
.v2-st-compact .v2-yard-door { height: 5.25rem; }
.v2-st-compact .v2-yard-door img { height: 4.5rem; }
.v2-st-compact .v2-yard-door::before { height: 2rem; }
.v2-st-compact .v2-yard-body { padding: 0.85rem 0.65rem 0.65rem; gap: 0.4rem; }
.v2-st-compact .v2-yard-name { font-size: 0.92rem; }
.v2-st-nowrap { white-space: nowrap; }
.v2-st-pick { position: absolute; top: 0.375rem; left: 0.375rem; z-index: 2; display: none; padding: 0.375rem; border-radius: 6px; background: rgba(11,26,18,0.85); border: 1px solid var(--v2-line); }
.v2-st-root.is-selecting .v2-st-pick { display: block; }
.v2-st-root.is-selecting .v2-yard-stall.v2-st-picked { outline: 2px solid var(--v2-glow); outline-offset: -2px; }

/* Ledger */
.v2-st-ledger { border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-st-lrow { display: grid; grid-template-columns: 2.125rem minmax(0, 2.2fr) 3.375rem minmax(0, 1fr) 5.25rem 3.25rem 8rem 9.375rem 7.75rem; gap: 0.75rem; align-items: center; min-height: 2.875rem; padding: 0.4rem 0.8rem; border-top: 1px dashed var(--v2-line); font-size: 0.8rem; }
.v2-st-root.is-selecting .v2-st-lrow { grid-template-columns: 1.5rem 2.125rem minmax(0, 2.2fr) 3.375rem minmax(0, 1fr) 5.25rem 3.25rem 8rem 9.375rem 7.75rem; }
.v2-st-lpick { display: none; }
.v2-st-root.is-selecting .v2-st-lpick { display: block; }
.v2-st-lrow.v2-st-picked { background: rgba(255,181,69,0.08); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-st-lhead { border-top: 0; min-height: 2.125rem; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-st-lhead a { color: var(--v2-ink-faint); }
.v2-st-lhead [aria-sort] a { color: var(--v2-brass); }
.v2-st-pic img { width: 2.125rem; height: 1.875rem; object-fit: contain; display: block; }
.v2-st-pic .v2-yard-initials { width: 1.875rem; height: 1.875rem; margin: 0; font-size: 0.6rem; border-width: 1.5px; }
.v2-st-lname { min-width: 0; display: flex; flex-direction: column; }
.v2-st-lnameline { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.v2-st-lnameline a { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-st-lnameline a:hover { color: var(--v2-glow); }
.v2-st-flag { height: 0.8125rem; width: auto; flex: 0 0 auto; }
.v2-st-note { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--v2-brass); cursor: help; }
.v2-st-note .v2-rk-ic { width: 0.8125rem; height: 0.8125rem; }
.v2-yard-name .v2-st-note { margin-left: 0.3rem; vertical-align: -0.1em; }
.v2-st-lsub, .v2-st-mobsub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-st-mobsub { display: none; }
.v2-st-lmono { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-st-lmoney { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-glow); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-st-lbar { display: flex; align-items: center; gap: 0.45rem; }
.v2-st-ltrack { flex: 1; height: 0.375rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; }
.v2-st-ltrack i { display: block; height: 100%; }
.v2-st-ltrack i.is-ready { background: var(--v2-good); }
.v2-st-ltrack i.is-mid { background: var(--v2-glow); }
.v2-st-ltrack i.is-low { background: var(--v2-signal); }
.v2-st-lbar > span:last-child { width: 2.2em; text-align: right; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.v2-st-lacts { display: flex; gap: 0.3rem; justify-content: flex-end; }
.v2-st-ib { width: 2rem; height: 2rem; display: inline-grid; place-items: center; border: 1px solid var(--v2-line); border-radius: 6px; color: var(--v2-brass); }
.v2-st-ib .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-st-ib:hover { border-color: var(--v2-brass); color: var(--v2-glow); }
.v2-st-ib.is-primary { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-st-ib.is-spent { color: var(--v2-ink-faint); border-style: dashed; }
.v2-st-ib.is-off { opacity: 0.35; }

/* Bulk bar */
.v2-st-bulkbar { position: sticky; bottom: 0; z-index: 5; margin-top: 1rem; padding: 0.7rem 0.9rem; background: #0e2117; border: 1px solid var(--v2-brass); border-radius: 10px; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); }
.v2-st-bulkbar[hidden] { display: none; }
.v2-st-bulkbar .v2-bulk-results { max-height: 30vh; overflow-y: auto; margin-bottom: 0.6rem; }
.v2-st-bulkbar .v2-bulk-results:empty { display: none; }
.v2-st-bulkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.v2-st-selcount { font-family: var(--v2-font-hud); font-weight: 700; color: var(--v2-glow); font-size: 1rem; margin-right: 0.3rem; }
.v2-st-grouppick { display: inline-flex; gap: 0.35rem; align-items: center; }
.v2-st-sp { flex: 1 1 auto; }
.v2-st-perpage { display: inline-flex; gap: 0.4rem; align-items: center; }

@media (max-width: 900px) {
  .v2-st-tack { grid-template-columns: 1fr; }
  .v2-st-lrow { grid-template-columns: 2.125rem minmax(0, 1fr) 5.25rem 3.25rem 7.25rem 7.75rem; }
  .v2-st-root.is-selecting .v2-st-lrow { grid-template-columns: 1.5rem 2.125rem minmax(0, 1fr) 5.25rem 3.25rem 7.25rem 7.75rem; }
  .v2-st-c-age, .v2-st-c-rec, .v2-st-c-chip { display: none; }
}

@media (max-width: 640px) {
  .v2-st-tacksum { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.55rem 0.8rem; margin-bottom: 0.8rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); cursor: pointer; list-style: none; }
  .v2-st-tacksum::-webkit-details-marker { display: none; }
  .v2-st-tacksum .v2-rk-ic:last-child { margin-left: auto; }
  .v2-st-tackwrap[open] > .v2-st-tacksum .v2-rk-ic:last-child { transform: rotate(90deg); }
  .v2-st-links a { min-height: 2.375rem; }
  .v2-st-tally { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.3rem; }
  .v2-st-filters { padding: 0.7rem; }
  .v2-st-f { flex: 1 1 calc(50% - 0.4rem); }
  .v2-st-f .v2-select { width: 100%; }
  .v2-st-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .v2-st-seg a { min-height: 2.75rem; }
  .v2-yard-stalls.v2-st-compact { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .v2-st-compact .v2-yard-door { height: 5.25rem; }
  .v2-st-compact .v2-yard-door img { height: 4.5rem; }
  .v2-st-pick { padding: 0.625rem; }
  .v2-st-lrow { grid-template-columns: 2.125rem minmax(0, 1fr) auto; grid-template-areas: "pic name bar" "pic name acts"; gap: 0.2rem 0.6rem; padding: 0.55rem 0.6rem; }
  .v2-st-root.is-selecting .v2-st-lrow { grid-template-columns: 1.75rem 2.125rem minmax(0, 1fr) auto; grid-template-areas: "pick pic name bar" "pick pic name acts"; }
  .v2-st-lpick { grid-area: pick; }
  .v2-st-pic { grid-area: pic; }
  .v2-st-lname { grid-area: name; }
  .v2-st-lbar { grid-area: bar; width: 5.75rem; }
  .v2-st-lacts { grid-area: acts; }
  .v2-st-c-earn, .v2-st-c-sr, .v2-st-lhead, .v2-st-lsub, .v2-st-ib-sell { display: none; }
  .v2-st-mobsub { display: block; }
  .v2-st-ib { width: 2.75rem; height: 2.75rem; }
  .v2-st-bulkrow .v2-btn { flex: 1 1 calc(33% - 0.4rem); padding-left: 0.3rem; padding-right: 0.3rem; }
  .v2-st-selcount { width: 100%; }
  .v2-st-sp { display: none; }
  .v2-st-grouppick { flex: 1 1 100%; }
  .v2-st-grouppick .v2-select { flex: 1 1 auto; }
  /* 7+ page links (large stables) must wrap rather than widen the page. */
  .v2-st-root .v2-pager .v2-pages { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) {
  .v2-st-chev, .v2-st-tacksum .v2-rk-ic { transition: transform 0.15s ease; }
}
/* ===== Sales ring (round 2) ===== */
/* v2-sales-ring.pug, Option M "Catalogue & Hammer". SPEC-sales-ring-m.md §7.
   Reuses .v2-rc-mast/.v2-rc-post/.v2-rc-purse (Race Card), .v2-yard-door/.v2-yard-plate/
   .v2-yard-stall (Stable Yard), .v2-rk-pips/.v2-rk-grade/.v2-rk-ic (kit). Every new rule is
   .v2-ring-*; nothing here restyles an existing selector except via a .v2-ring-* ancestor. */

/* Masthead stub: ring state on the cream post panel. Darker status tints because the stub is
   light; the WORD (OPEN / CLOSED / BANNED) always carries the meaning. */
.v2-ring-state { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; }
.v2-ring-post.is-open .v2-ring-state { color: #1f6f43; }
.v2-ring-post.is-shut .v2-ring-state { color: #9b2c14; }
.v2-ring-dot { width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: #1f8a50; box-shadow: 0 0 0 2px rgba(31,138,80,0.25); }
.v2-ring-sires { font-family: var(--v2-font-mono); font-style: normal; font-size: 0.7rem; color: var(--v2-brass); white-space: nowrap; }
.v2-ring-sires:hover { color: var(--v2-glow); }
.v2-ring-wallet { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.2rem 1rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ring-wallet b { color: var(--v2-ink); font-weight: 400; font-variant-numeric: tabular-nums; }

.v2-ring-gate { margin: -0.4rem 0 1.2rem; }
.v2-ring-gate a { color: var(--v2-brass); text-decoration: underline; }
.v2-ring-sale { display: flex; align-items: center; gap: 0.4rem 0.8rem; flex-wrap: wrap; padding: 0.6rem 1rem; margin: -0.4rem 0 1.2rem; border-radius: 8px; border: 1px solid rgba(255,181,69,0.5); background: repeating-linear-gradient(135deg, rgba(255,181,69,0.12) 0 14px, rgba(255,181,69,0.05) 14px 28px); font-size: 0.82rem; color: var(--v2-ink); }
.v2-ring-sale b { font-family: var(--v2-font-hud); font-size: 1rem; letter-spacing: 0.06em; color: var(--v2-glow); }

/* Layout */
.v2-ring-cols { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.2rem; align-items: start; }
.v2-ring-main { min-width: 0; }
.v2-ring-side { position: sticky; top: 4rem; }
.v2-ring-fs { border: 0; margin: 0 0 1.2rem; padding: 0; min-width: 0; }
.v2-ring-legend { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); margin-bottom: 0.5rem; padding: 0; }
.v2-ring-legend b { color: var(--v2-brass); font-weight: 400; margin-right: 0.4rem; }
.v2-ring-hint { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-top: 0.4rem; }

/* Consignment cards: an age radio group wearing Stable Yard stall-door art */
.v2-ring-cons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.v2-ring-con { position: relative; display: flex; flex-direction: column; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); cursor: pointer; }
.v2-ring-con input { position: absolute; opacity: 0; pointer-events: none; }
.v2-ring-con:hover { border-color: var(--v2-brass); }
.v2-ring-con:has(input:checked) { border-color: var(--v2-glow); box-shadow: 0 0 0 1px var(--v2-glow); }
.v2-ring-con:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 3px; }
.v2-ring-con:has(input:disabled) { cursor: not-allowed; border-style: dashed; }
.v2-ring-con:has(input:disabled) .v2-yard-door { filter: grayscale(0.7) brightness(0.6); }
.v2-ring-con .v2-yard-door { height: 7.5rem; }
.v2-ring-con .v2-yard-door img { height: 6.25rem; }
.v2-ring-con-pair { position: relative; display: flex; align-items: flex-end; }
.v2-ring-con-pair img + img { margin-left: -2.375rem; height: 5.25rem !important; opacity: 0.75; }
.v2-ring-con-b { padding: 1rem 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.2rem; }
.v2-ring-con-k { font-family: var(--v2-font-display); font-size: 1.05rem; color: var(--v2-ink); display: flex; align-items: center; gap: 0.45rem; }
.v2-ring-check { margin-left: auto; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1px solid var(--v2-ink-faint); display: grid; place-items: center; font-size: 0.72rem; color: transparent; flex: 0 0 auto; }
.v2-ring-con:has(input:checked) .v2-ring-check { background: var(--v2-glow); border-color: var(--v2-glow); color: var(--v2-ink-dark); }
.v2-ring-con:has(input:disabled) .v2-ring-check { display: none; }
.v2-ring-con-p { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.35rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-ring-con-p s { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.7rem; color: var(--v2-ink-faint); margin-left: 0.3rem; }
.v2-ring-con:has(input:disabled) .v2-ring-con-k, .v2-ring-con:has(input:disabled) .v2-ring-con-p { color: var(--v2-ink-faint); }
.v2-ring-con-n { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ring-con-lock { position: absolute; top: 0.625rem; right: 0.625rem; z-index: 2; display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-bright); background: rgba(8,20,13,0.88); border: 1px solid var(--v2-line); border-radius: 100px; padding: 0.15rem 0.5rem; }

/* Mystery lot: a real colour PNG blacked out with a brass rim (also the no-colour fallback) */
.v2-ring-mystery { filter: brightness(0) drop-shadow(0 0 1px rgba(199,154,63,0.9)) drop-shadow(0 0 6px rgba(199,154,63,0.35)) !important; opacity: 0.9; }

/* Bid: paddle + stepper + quick picks + package ladder */
.v2-ring-bid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.4rem; align-items: center; border: 1px solid var(--v2-line); border-radius: 10px; background: radial-gradient(120% 140% at 0% 0%, rgba(199,154,63,0.12), var(--v2-surface) 60%); padding: 1rem 1.2rem; }
.v2-ring-bid-ctl { min-width: 0; }
.v2-ring-paddle { display: flex; flex-direction: column; align-items: center; }
.v2-ring-paddle-head { width: 7rem; height: 7rem; border-radius: 50%; background: var(--v2-ink); border: 4px solid var(--v2-brass); box-shadow: 0 6px 16px rgba(0,0,0,0.45), inset 0 0 0 3px var(--v2-ink-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--v2-ink-dark); }
.v2-ring-paddle-head small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; }
.v2-ring-paddle-head b { font-family: var(--v2-font-hud); font-size: 2.7rem; line-height: 0.95; font-variant-numeric: tabular-nums; }
.v2-ring-paddle-stick { width: 0.875rem; height: 2.625rem; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, #5a3b20, #8a5d34, #5a3b20); margin-top: -2px; }
.v2-ring-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--v2-line); border-radius: 8px; overflow: hidden; background: var(--v2-surface-2); }
.v2-ring-stepper button { width: 2.75rem; min-height: 2.75rem; border: 0; background: transparent; color: var(--v2-brass); font-size: 1.2rem; cursor: pointer; }
.v2-ring-stepper button:hover:not(:disabled) { background: rgba(199,154,63,0.12); color: var(--v2-glow); }
.v2-ring-stepper button:disabled { opacity: 0.45; cursor: not-allowed; }
.v2-ring-stepper input { width: 4rem; border: 0; border-left: 1px solid var(--v2-line); border-right: 1px solid var(--v2-line); background: transparent; color: var(--v2-ink-bright); text-align: center; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.2rem; }
.v2-ring-stepper input:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: -2px; }
.v2-ring-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.v2-ring-quick button { font-family: var(--v2-font-mono); font-size: 0.68rem; min-height: 2.25rem; padding: 0.3rem 0.7rem; border-radius: 100px; border: 1px solid var(--v2-line); background: var(--v2-surface-2); color: var(--v2-ink-soft); cursor: pointer; }
.v2-ring-quick button small { color: var(--v2-glow); margin-left: 0.2rem; }
.v2-ring-quick button:hover:not(:disabled) { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-ring-ladder { margin-top: 0.6rem; }
.v2-ring-rail { position: relative; height: 0.5rem; border-radius: 4px; background: rgba(243,234,211,0.1); border: 1px solid var(--v2-line); margin: 0 0.625rem; }
.v2-ring-rail i { --fill: 0%; position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill); border-radius: 4px; background: linear-gradient(90deg, var(--v2-brass), var(--v2-glow)); }
.v2-ring-poles { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: center; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ring-poles li:first-child { text-align: left; }
.v2-ring-poles li:last-child { text-align: right; }
.v2-ring-poles b { display: block; font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-ring-poles li.hit b { color: var(--v2-glow); }
.v2-ring-poles li.hit small::before { content: "✓ "; }
.v2-ring-next { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--v2-ink-soft); }

/* Extras: tokens + premium */
.v2-ring-extras { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.8rem; margin-top: 1rem; }
.v2-ring-extra { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.9rem 1rem; min-width: 0; }
.v2-ring-coins { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.v2-ring-coin { position: relative; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--v2-brass); background: radial-gradient(circle at 35% 30%, #4b3b1d, #2a2112); color: var(--v2-brass); display: grid; place-items: center; cursor: pointer; }
.v2-ring-coin .v2-rk-ic { width: 1.25rem; height: 1.25rem; }
.v2-ring-coin[aria-pressed="true"] { background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); color: var(--v2-ink-dark); border-color: var(--v2-ink-bright); }
.v2-ring-coin[aria-pressed="true"]::after { content: "✓"; position: absolute; right: -0.25rem; bottom: -0.25rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--v2-ink-dark); color: var(--v2-glow); font-size: 0.6rem; display: grid; place-items: center; border: 1px solid var(--v2-glow); }
.v2-ring-coin:disabled { opacity: 0.35; cursor: not-allowed; }
.v2-ring-toggle { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; cursor: pointer; min-height: 2.75rem; }
.v2-ring-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.v2-ring-toggle:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 4px; border-radius: 6px; }
.v2-ring-toggle:has(input:disabled) { cursor: not-allowed; }
.v2-ring-toggle:has(input:disabled) .v2-rk-grade { filter: grayscale(1); opacity: 0.5; }
.v2-ring-toggle-t { display: block; font-size: 0.86rem; color: var(--v2-ink); }
.v2-ring-toggle-s { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ring-switch-wrap { display: flex; flex-direction: column; align-items: center; }
.v2-ring-switch { display: block; position: relative; width: 2.625rem; height: 1.5rem; border-radius: 12px; border: 1px solid var(--v2-ink-faint); }
.v2-ring-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--v2-ink-faint); transition: transform 150ms; }
.v2-ring-toggle:has(input:checked) .v2-ring-switch { background: var(--v2-glow); border-color: var(--v2-glow); }
.v2-ring-toggle:has(input:checked) .v2-ring-switch::after { background: var(--v2-ink-dark); transform: translateX(18px); }
.v2-ring-switch-txt { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-top: 0.15rem; }

/* "How the ring works" disclosure (same idiom as the Race Card wire reveal) */
.v2-ring-how { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); margin-top: 1rem; }
.v2-ring-how summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.6rem 1rem; font-family: var(--v2-font-display); color: var(--v2-ink); }
.v2-ring-how summary::-webkit-details-marker { display: none; }
.v2-ring-how summary .v2-rk-ic { color: var(--v2-brass); transition: transform 150ms; }
.v2-ring-how[open] summary .v2-rk-ic { transform: rotate(90deg); }
.v2-ring-how-b { padding: 0 1rem 1rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; }

/* Bill of sale. Perforated top edge = the .v2-raceticket stub metaphor. */
.v2-ring-bill { position: relative; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 1.1rem 1.2rem 1.2rem; }
.v2-ring-bill::before { content: ""; position: absolute; left: 0.625rem; right: 0.625rem; top: -1px; height: 0.5rem; background: radial-gradient(circle at 6px 0, var(--v2-bg) 4px, transparent 4.5px) 0 0 / 14px 8px repeat-x; }
.v2-ring-bill-h { margin: 0 0 0.2rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.15rem; color: var(--v2-ink-bright); }
.v2-ring-dl { margin: 0.6rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.v2-ring-dl dt, .v2-ring-dl dd { margin: 0; padding: 0.4rem 0; border-bottom: 1px dashed var(--v2-line); font-size: 0.8rem; }
.v2-ring-dl dt { color: var(--v2-ink-soft); }
.v2-ring-dl dd { text-align: right; font-family: var(--v2-font-mono); color: var(--v2-ink); font-variant-numeric: tabular-nums; padding-left: 0.8rem; }
.v2-ring-dl .total { border-bottom: none; padding-top: 0.7rem; }
.v2-ring-dl dt.total { font-family: var(--v2-font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); align-self: end; }
.v2-ring-dl dd.total { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.8rem; color: var(--v2-glow); line-height: 1; }
.v2-ring-paid { margin: 0.3rem 0 0; padding-top: 0.5rem; border-top: 1px solid var(--v2-line); font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-ring-paid.is-short { color: var(--v2-signal-bright); }
.v2-ring-get { display: flex; align-items: center; gap: 0.7rem; margin: 0.9rem 0; padding: 0.6rem 0.75rem; border-radius: 8px; background: rgba(255,181,69,0.06); border: 1px solid rgba(255,181,69,0.25); }
.v2-ring-get-n { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.6rem; color: var(--v2-ink-bright); line-height: 1; }
.v2-ring-get-t { font-size: 0.76rem; color: var(--v2-ink-soft); line-height: 1.35; min-width: 0; }
.v2-ring-get-t .v2-rk-pips { display: grid; margin-top: 0.3rem; }
.v2-ring-error { margin-bottom: 0.7rem; }
.v2-ring-buy { width: 100%; min-height: 3rem; font-size: 0.85rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.v2-ring-buy .v2-rk-ic { width: 1.25rem; height: 1.25rem; }
.v2-ring-buy:disabled { opacity: 0.45; cursor: not-allowed; }
.v2-ring-confirm { margin-top: 0.8rem; border: 1px dashed rgba(255,181,69,0.6); border-radius: 8px; padding: 0.7rem 0.8rem; background: rgba(255,181,69,0.05); }
.v2-ring-confirm p { margin: 0 0 0.5rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-ring-confirm em { font-family: var(--v2-font-display); color: var(--v2-glow); }
.v2-ring-confirm-row { display: flex; gap: 0.5rem; }
.v2-ring-confirm-row .v2-btn { flex: 1; min-height: 2.75rem; }
.v2-ring-links { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; font-family: var(--v2-font-mono); font-size: 0.66rem; }
.v2-ring-links a { color: var(--v2-brass); }
.v2-ring-links a:hover { color: var(--v2-glow); }

/* Phone-only sticky hammer bar */
.v2-ring-bar { display: none; }

/* Result: the reveal */
.v2-ring-result { margin-bottom: 1.4rem; }
/* Focus lands on the section programmatically; ring the heading, not the whole grid. Must
   out-rank the global `.v2-app [tabindex]:focus-visible` (0,3,0) rule. */
.v2-app .v2-ring-result[tabindex]:focus, .v2-app .v2-ring-result[tabindex]:focus-visible { outline: none; }
.v2-app .v2-ring-result:focus-visible .v2-ring-sold-h { outline: 2px solid var(--v2-glow); outline-offset: 4px; border-radius: 3px; }
.v2-ring-sold { display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.v2-ring-sold-h { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.5rem; color: var(--v2-ink-bright); }
.v2-ring-sold-s { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-ring-revealall { margin-left: auto; min-height: 2.5rem; }
.v2-ring-revealall[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.v2-ring-sold-link { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-ring-lots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr)); gap: 0.8rem; }
.v2-ring-lot { perspective: 900px; min-height: 14.75rem; }
.v2-ring-lot-in { position: relative; height: 100%; min-height: 14.75rem; transform-style: preserve-3d; transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.v2-ring-lot.is-down .v2-ring-lot-in { transform: rotateY(180deg); }
.v2-ring-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.v2-ring-face.is-back { transform: rotateY(180deg); }
.v2-ring-face .v2-yard-door { height: 6.5rem; }
.v2-ring-face .v2-yard-door img { height: 5.5rem; }
.v2-ring-face.is-rare { border-color: rgba(255,181,69,0.65); box-shadow: 0 0 0 1px rgba(255,181,69,0.25); }
.v2-ring-lot-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; flex-wrap: wrap; }
.v2-ring-back-b { flex: 1; display: grid; place-items: center; align-content: center; text-align: center; padding: 1rem 0.6rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ring-back-b b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.05rem; color: var(--v2-ink); }
.v2-ring-stars { font-size: 1rem; color: var(--v2-glow); letter-spacing: 0.08em; }
/* RARE keeps .v2-pill.gold's meaning; the foil is the only animated element besides the flip. */
.v2-ring-rare { display: inline-flex; align-items: center; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; color: var(--v2-ink-dark); padding: 0.1rem 0.45rem; border-radius: 3px; background: linear-gradient(110deg, #c79a3f 20%, #fff2c4 40%, #ffb545 55%, #c79a3f 80%); background-size: 250% 100%; }

@media (prefers-reduced-motion: no-preference) {
  .v2-ring-rare { animation: v2-ring-foil 2.6s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-ring-lot-in, .v2-ring-switch::after, .v2-ring-how summary .v2-rk-ic { transition: none; }
}
@keyframes v2-ring-foil { from { background-position: 100% 0; } to { background-position: -150% 0; } }

@media (max-width: 900px) {
  .v2-ring-cols { grid-template-columns: 1fr; }
  .v2-ring-side { position: static; }
}
@media (max-width: 640px) {
  .v2-ring-wallet { justify-content: flex-start; }
  .v2-ring-cons { grid-template-columns: 1fr; gap: 0.5rem; }
  .v2-ring-con { display: grid; grid-template-columns: 6rem minmax(0, 1fr); }
  .v2-ring-con .v2-yard-door { height: auto; min-height: 5.75rem; border-bottom: none; border-right: 2px solid var(--v2-brass); }
  .v2-ring-con .v2-yard-door img { height: 4.5rem; }
  .v2-ring-con-pair img + img { height: 3.75rem !important; margin-left: -1.875rem; }
  .v2-ring-con .v2-yard-plate { display: none; }
  .v2-ring-con-b { padding: 0.6rem 0.75rem; }
  .v2-ring-con-p { font-size: 1.15rem; }
  .v2-ring-con-lock { top: 0.375rem; right: 0.375rem; }
  .v2-ring-bid { grid-template-columns: 1fr; gap: 0.8rem; justify-items: center; padding: 0.9rem; }
  .v2-ring-bid-ctl { width: 100%; }
  .v2-ring-paddle-head { width: 5.75rem; height: 5.75rem; }
  .v2-ring-paddle-head b { font-size: 2.2rem; }
  .v2-ring-paddle-stick { height: 1.625rem; }
  .v2-ring-quick button { min-height: 2.75rem; }
  .v2-ring-poles { font-size: 0.66rem; }
  .v2-ring-extras { grid-template-columns: 1fr; }
  .v2-ring-how-b { grid-template-columns: 1fr; }
  .v2-ring-dl dd.total { font-size: 1.5rem; }
  .v2-ring-revealall { margin-left: 0; width: 100%; min-height: 2.75rem; }
  .v2-ring-lots { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .v2-ring-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; position: sticky; bottom: 0.5rem; z-index: 20; margin-top: 1rem; padding: 0.6rem 0.8rem; background: rgba(11,26,18,0.96); border: 1px solid var(--v2-brass); border-radius: 10px; box-shadow: 0 -6px 18px rgba(0,0,0,0.45); }
  .v2-ring-bar b { display: block; font-family: var(--v2-font-hud); font-size: 1.3rem; color: var(--v2-glow); line-height: 1; font-variant-numeric: tabular-nums; }
  .v2-ring-bar small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
  .v2-ring-bar .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; gap: 0.35rem; }
  .v2-ring-bar .v2-btn:disabled { opacity: 0.45; }
}

/* Build fixes (not in the spec's §7 block). .v2-alert sets display:flex, which beats the UA
   [hidden] rule, so the empty error box showed. .v2-eyebrow is only styled inside .v2-hero /
   .v2-error-card; give the masthead and bill eyebrows the mockup's mono brass kicker. */
.v2-ring-error[hidden] { display: none; }
.v2-ring-post ~ .v2-rc-title-col .v2-eyebrow, .v2-ring-bill .v2-eyebrow { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); margin-bottom: 0.2rem; }
/* Secondary .v2-btn on <button> has no background of its own, so the UA button face showed. */
.v2-ring-confirm-row .v2-btn:not(.v2-btn-primary), .v2-ring-revealall { background: transparent; }
.v2-ring-confirm-row .v2-btn:not(.v2-btn-primary):hover, .v2-ring-revealall:hover:not([aria-disabled="true"]) { background: rgba(199,154,63,0.12); }
/* ===== Breeding (round 2) ===== */
/* Stud Farm: views/v2-breeding-settings.pug + views/components/v2-breeding-kit.pug
   (SPEC-breeding-c.md). Every rule for that page lives between this banner and the end banner.
   Reused unchanged: .v2-yard-top/-hello/-stable/-ranks/-rank, .v2-yard-door/-plate/-initials,
   .v2-rk-ic/-surface/-swatch/-tag/-portrait, .v2-status-chip.ready/.resting, .v2-subtabs,
   .v2-breed-input, .v2-note-list, .v2-empty, .v2-btn(-primary), .v2-section-label, .v2-rc-h,
   .v2-sr-only. */

.v2-app {
  /* Material tokens: noticeboard paper. NOT status colours. */
  --v2-paper: #efe3c4;
  --v2-paper-hover: #fff2d2;
  --v2-paper-off: #d9cfb5;
  --v2-paper-ink: #1a1408;
  --v2-paper-ink-soft: #5a4a30;
  --v2-paper-icon: #6b4a1a;
  --v2-paper-pin-hi: #ffd9a0;
  --v2-paper-pin: #b97a1c;
  --v2-paper-alert: #8c2f1d;
}

/* .v2-btn sets display:inline-block, which beats the UA [hidden] rule. */
.v2-bk-farm [hidden] { display: none !important; }
/* .v2-btn sets no background, so <button class="v2-btn"> shows the UA grey. :where() keeps this at
   (0,1,0) so .v2-btn:hover, .v2-btn-primary and .v2-bk-pick[aria-pressed] still win. */
.v2-bk-farm :where(button.v2-btn:not(.v2-btn-primary)) { background: transparent; }

/* ---- small parts ---- */
.v2-bk-eyebrow { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-bk-meta { display: inline-flex; align-items: center; gap: 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-bk-sex { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-bk-glyph { font-size: 0.85rem; letter-spacing: 0; color: var(--v2-ink-bright); }
.v2-bk-genes { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.v2-bk-gene { min-width: 1.625rem; height: 1.625rem; padding: 0 0.4rem; white-space: nowrap; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid var(--v2-brass); background: rgba(199,154,63,0.12); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; color: var(--v2-ink-bright); }
.v2-bk-fee { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.v2-bk-fee .v2-rk-ic { color: var(--v2-brass); }
.v2-bk-fee-val { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.05rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-bk-fee small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-covers { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-bk-shoes { display: inline-flex; gap: 1px; color: var(--v2-brass); }
.v2-bk-shoes .v2-rk-ic { width: 0.8125rem; height: 0.8125rem; stroke-width: 2.2; }
.v2-bk-covers.zero, .v2-bk-covers.zero .v2-bk-shoes { color: var(--v2-ink-faint); }
.v2-bk-apt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.v2-bk-apt-row .v2-rk-surface { font-size: 0.66rem; padding: 0.2rem 0.55rem 0.2rem 0.25rem; }
.v2-bk-apt-row .v2-rk-swatch { width: 0.875rem; height: 0.875rem; }
.v2-bk-apt { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink); white-space: nowrap; }
.v2-bk-apt-bar { display: inline-grid; grid-template-columns: repeat(3, 0.75rem); gap: 2px; }
.v2-bk-apt-bar i { height: 0.375rem; border-radius: 2px; border: 1px solid var(--v2-ink-faint); }
.v2-bk-apt-bar i.on { background: var(--v2-ink-bright); border-color: var(--v2-ink-bright); }
.v2-bk-unset { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); border: 1px dashed var(--v2-line); border-radius: 12px; padding: 0.15rem 0.55rem; }
.v2-bk-why { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-bk-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.6rem; }
.v2-bk-honours { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin-bottom: 0.7rem; }

/* ---- hero ---- */
.v2-bk-hero { display: grid; grid-template-columns: 13.75rem minmax(0, 1.3fr) minmax(0, 1fr); border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); margin-bottom: 1.2rem; }
.v2-bk-hero .v2-yard-door { height: auto; min-height: 13.75rem; border-bottom: 0; border-right: 2px solid var(--v2-brass); }
.v2-bk-hero .v2-yard-door img { height: 10.625rem; margin-bottom: 1.875rem; }
.v2-bk-hero .v2-yard-initials { margin-bottom: 3rem; }
.v2-bk-hero .v2-yard-plate { bottom: 0.625rem; }
.v2-bk-hero-main { padding: 1.1rem 1.2rem; min-width: 0; }
.v2-bk-hero-name { margin: 0.2rem 0 0.5rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.5rem; line-height: 1.15; overflow-wrap: anywhere; }
.v2-bk-hero-name a { color: var(--v2-ink-bright); }
.v2-bk-hero-name a:hover { color: var(--v2-glow); }
.v2-bk-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0 0 0.8rem; }
.v2-bk-kv > div { border-left: 2px solid var(--v2-line); padding-left: 0.55rem; min-width: 0; }
.v2-bk-kv dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-kv dd { margin: 0; font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v2-bk-kv dd.is-money { color: var(--v2-glow); }

/* ---- pedigree ---- */
.v2-bk-ped { padding: 1.1rem 1.2rem; border-left: 1px dashed var(--v2-line); min-width: 0; }
.v2-bk-ped > .v2-bk-eyebrow { margin-bottom: 0.6rem; }
.v2-bk-ped-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "s ss" "s sd" "d ds" "d dd"; gap: 0.35rem 1.1rem; }
.v2-bk-ped-grid > .is-s { grid-area: s; }
.v2-bk-ped-grid > .is-ss { grid-area: ss; }
.v2-bk-ped-grid > .is-sd { grid-area: sd; }
.v2-bk-ped-grid > .is-d { grid-area: d; }
.v2-bk-ped-grid > .is-ds { grid-area: ds; }
.v2-bk-ped-grid > .is-dd { grid-area: dd; }
.v2-bk-ped-grid > .is-s, .v2-bk-ped-grid > .is-d { align-self: center; position: relative; }
.v2-bk-ped-grid > .is-s::after, .v2-bk-ped-grid > .is-d::after { content: ""; position: absolute; right: -0.6rem; top: -0.9rem; bottom: -0.9rem; width: 0.6rem; border: 1px solid var(--v2-brass); border-left: 0; border-radius: 0 4px 4px 0; opacity: 0.7; }
.v2-bk-ped-card { display: grid; grid-template-columns: 1.875rem minmax(0, 1fr); gap: 0.45rem; align-items: center; min-height: 2.5rem; padding: 0.3rem 0.45rem; border: 1px solid var(--v2-line); border-radius: 6px; background: rgba(11,26,18,0.5); min-width: 0; }
.v2-bk-ped-card.is-gp, .v2-bk-ped-card.is-unknown { grid-template-columns: minmax(0, 1fr); padding: 0.2rem 0.45rem; }
a.v2-bk-ped-card:hover { border-color: var(--v2-brass); }
.v2-bk-ped-card > span { min-width: 0; }
.v2-bk-ped-card .v2-rk-portrait { width: 1.875rem; height: 1.875rem; border-width: 1px; font-size: 0.8rem; }
.v2-bk-ped-card small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-ped-card b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.8rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-bk-ped-card.is-unknown b { color: var(--v2-ink-faint); font-style: italic; }
/* Inset variant: sits under other content inside a panel (breed page), not as a right-hand column. */
.v2-bk-ped.is-inset { padding: 0.8rem 0 0; border-left: 0; border-top: 1px dashed var(--v2-line); }
.v2-bk-ped.is-inset .v2-bk-ped-grid { max-width: 40rem; }

/* ---- bench + stud book wrapper ---- */
.v2-bk-play { display: flex; flex-direction: column; gap: 1.2rem; }
.v2-bk-bench { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 0.9rem; align-items: center; padding: 0.9rem 1rem; border: 1px solid var(--v2-brass); border-radius: 12px; background: radial-gradient(ellipse at 50% 0%, rgba(199,154,63,0.12), transparent 70%), var(--v2-surface); }
.v2-bk-slot { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0.6rem; align-items: center; padding: 0.5rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 8px; background: rgba(11,26,18,0.55); min-width: 0; }
.v2-bk-slot.is-empty { border-style: dashed; }
.v2-bk-slot .v2-rk-portrait { width: 3.25rem; height: 3.25rem; }
.v2-bk-slot-text { min-width: 0; display: flex; flex-direction: column; }
.v2-bk-slot-text small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-bk-slot-text b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.92rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-bk-slot.is-empty .v2-bk-slot-text b { color: var(--v2-ink-faint); }
.v2-bk-slot-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-bk-foal { display: grid; justify-items: center; gap: 0.2rem; color: var(--v2-brass); }
.v2-bk-foal .v2-rk-ic { width: 1.25rem; height: 1.25rem; }
.v2-bk-foal .v2-rk-portrait { width: 3.375rem; height: 3.375rem; }
.v2-bk-foal small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-bench-read { min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.v2-bk-bench-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.v2-bk-bench-notes:empty { display: none; }
.v2-bk-bench-notes li { font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-bk-bench-notes li b { display: inline-block; margin-right: 0.4rem; padding: 0.05rem 0.35rem; border-radius: 3px; border: 1px solid var(--v2-line); font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: var(--v2-ink-soft); }
.v2-bk-bench-notes li b.match { color: var(--v2-good); border-color: rgba(95,200,145,0.5); }
.v2-bk-bench-notes li b.mixed { color: var(--v2-glow); border-color: rgba(255,181,69,0.5); }
.v2-bk-bench-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-bk-bench-actions .v2-btn, .v2-bk-form-btns .v2-btn { text-align: center; }

/* ---- stud book ---- */
.v2-bk-book .v2-subtabs { margin: 0 0 0.8rem; }
.v2-bk-panel + .v2-bk-panel { margin-top: 1.2rem; }  /* only visible without JS (both panels shown) */
/* Stud book sort + filters: reuses .v2-filterbar; adds the search box and the count. */
.v2-bk-filters { margin-bottom: 1rem; }
.v2-bk-filters input[type="search"] {
  background: var(--v2-surface-2); border: 1px solid var(--v2-line); color: var(--v2-ink);
  border-radius: 6px; padding: 0.4rem 0.6rem; font-family: var(--v2-font-body); font-size: 0.8rem;
  min-width: 11rem;
}
.v2-bk-filters .v2-bk-shown { margin: 0 0 0.45rem auto; font-size: 0.72rem; color: var(--v2-ink-faint); }
.v2-bk-card[hidden] { display: none; }
.v2-bk-panel-head { display: flex; justify-content: flex-end; margin: 0 0 0.7rem; }
.v2-bk-flipall { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; padding: 0.4rem 0.8rem; }
.v2-bk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: 0.9rem; align-items: start; }
.v2-bk-face { border: 1px solid var(--v2-line); border-radius: 12px; background: linear-gradient(170deg, var(--v2-surface-2), var(--v2-surface) 45%); overflow: hidden; }
.v2-bk-front { display: flex; flex-direction: column; }
.v2-bk-card.is-picked .v2-bk-front { border-color: var(--v2-brass); box-shadow: 0 0 0 1px var(--v2-brass), 0 8px 18px rgba(0,0,0,0.45); }
.v2-bk-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--v2-line); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-card-top .v2-rk-tag { margin: -0.25rem 0; }  /* keep honoured and plain card tops the same height */
.v2-bk-card-art { position: relative; height: 7.375rem; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(ellipse at 50% 100%, rgba(199,154,63,0.22), transparent 65%); }
.v2-bk-card-art img { height: 6.5rem; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6)); }
.v2-bk-card-art .v2-yard-initials { margin-bottom: 1.25rem; }
.v2-bk-card-body .v2-bk-gene { min-width: 1.375rem; height: 1.375rem; font-size: 0.66rem; }
.v2-bk-card-body { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.6rem 0.75rem 0.75rem; }
.v2-bk-card-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.02rem; line-height: 1.2; overflow-wrap: anywhere; }
.v2-bk-card-name a { color: var(--v2-ink); }
.v2-bk-card-name a:hover { color: var(--v2-glow); }
.v2-bk-parents { margin-top: -0.3rem; font-family: var(--v2-font-display); font-style: italic; font-size: 0.74rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-bk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--v2-line); border: 1px solid var(--v2-line); border-radius: 6px; overflow: hidden; }
.v2-bk-stats > div { background: var(--v2-surface); padding: 0.3rem 0.45rem; min-width: 0; }
.v2-bk-stats dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-stats dd { margin: 0; font-family: var(--v2-font-hud); font-size: 0.82rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v2-bk-card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; margin-top: auto; }
.v2-bk-card-btns .v2-btn { font-size: 0.66rem; padding: 0.45rem 0.4rem; min-height: 2.25rem; text-align: center; }
.v2-bk-card-btns .v2-bk-wide { grid-column: 1 / -1; }
.v2-bk-pick[aria-pressed="true"] { background: var(--v2-brass); color: var(--v2-ink-dark); border-color: var(--v2-brass); font-weight: 700; }
.v2-bk-pick[aria-pressed="true"]::before { content: "\2713\00a0"; }

/* ---- card back: settings (disclosure mode by default) ---- */
.v2-bk-back { margin-top: 0.5rem; }
.v2-bk-back > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; padding: 0 0.85rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-brass); }
.v2-bk-back > summary::-webkit-details-marker { display: none; }
.v2-bk-back > summary::after { content: "+"; font-size: 0.95rem; }
.v2-bk-back[open] > summary::after { content: "\2212"; }
.v2-bk-form { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.3rem 0.85rem 0.85rem; }
.v2-bk-back-title { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink); }
.v2-bk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.v2-bk-field { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.v2-bk-field > span:first-child { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bk-field .v2-breed-input { width: 100%; min-height: 2.25rem; }
.v2-bk-money { position: relative; }
.v2-bk-money::after { content: "$"; position: absolute; left: 0.5rem; bottom: 0; height: 2.25rem; line-height: 2.25rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-faint); pointer-events: none; }
.v2-bk-money .v2-breed-input { padding-left: 1.2rem; }
.v2-bk-switch { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.25rem; cursor: pointer; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-bk-switch input { position: absolute; left: 0; top: 50%; width: 2.125rem; height: 1.125rem; margin: -0.5625rem 0 0; opacity: 0; cursor: pointer; }
.v2-bk-track { position: relative; flex: 0 0 auto; width: 2.125rem; height: 1.125rem; border-radius: 9px; background: var(--v2-surface-2); border: 1px solid var(--v2-ink-faint); }
.v2-bk-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--v2-ink-soft); transition: left 0.15s; }
.v2-bk-switch input:checked + .v2-bk-track { background: rgba(95,200,145,0.25); border-color: var(--v2-good); }
.v2-bk-switch input:checked + .v2-bk-track::after { left: 1.125rem; background: var(--v2-good); }
.v2-bk-switch input:focus-visible + .v2-bk-track { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-bk-on { display: none; color: var(--v2-good); }
.v2-bk-switch input:checked ~ .v2-bk-on { display: inline; }
.v2-bk-switch input:checked ~ .v2-bk-off { display: none; }
.v2-bk-form-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.v2-bk-form-btns .v2-btn { min-height: 2.25rem; }
.v2-bk-status { min-height: 1em; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }

/* ---- flip mode: only when the script adds .is-flip (JS on, motion allowed) ---- */
.v2-bk-cards.is-flip .v2-bk-card { perspective: 1200px; }
.v2-bk-cards.is-flip .v2-bk-card-in { display: grid; transform-style: preserve-3d; transition: transform 0.45s ease; }
.v2-bk-cards.is-flip .v2-bk-face { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.v2-bk-cards.is-flip .v2-bk-back { margin-top: 0; transform: rotateY(180deg); }
.v2-bk-cards.is-flip .v2-bk-back > summary { display: none; }
.v2-bk-cards.is-flip .v2-bk-form { padding-top: 0.85rem; }
.v2-bk-cards.is-flip .v2-bk-card.is-flipped .v2-bk-card-in { transform: rotateY(180deg); }

/* ---- noticeboard ---- */
.v2-bk-board { list-style: none; margin: 0; padding: 0.4rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.625rem, 1fr)); gap: 0.9rem 0.6rem; }
.v2-bk-board > li { display: flex; }
.v2-app .v2-bk-note { position: relative; flex: 1; display: grid; grid-template-columns: 2.125rem minmax(0, 1fr); gap: 0.55rem; align-items: center; min-height: 3.5rem; padding: 0.65rem 0.75rem; background: var(--v2-paper); color: var(--v2-paper-ink); border-radius: 3px; box-shadow: 0 3px 8px rgba(0,0,0,0.35); }
.v2-app .v2-bk-note::before { content: ""; position: absolute; top: -0.3125rem; left: 50%; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--v2-paper-pin-hi), var(--v2-paper-pin)); transform: translateX(-50%); }
.v2-app a.v2-bk-note:hover { background: var(--v2-paper-hover); }
.v2-app .v2-bk-note .v2-rk-ic { width: 1.5rem; height: 1.5rem; color: var(--v2-paper-icon); }
.v2-app .v2-bk-note b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.86rem; line-height: 1.2; }
.v2-app .v2-bk-note small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-paper-ink-soft); }
.v2-app .v2-bk-note em { position: absolute; top: 0.35rem; right: 0.45rem; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3125rem; border-radius: 10px; font-style: normal; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; line-height: 1.25rem; text-align: center; background: var(--v2-paper-icon); color: var(--v2-paper); }
.v2-app .v2-bk-note em.is-alert { background: var(--v2-paper-alert); color: var(--v2-ink-bright); }
.v2-app .v2-bk-note.is-off { background: var(--v2-paper-off); }

@media (prefers-reduced-motion: reduce) {
  .v2-bk-cards.is-flip .v2-bk-card-in, .v2-bk-track::after { transition: none; }
}

@media (max-width: 900px) {
  .v2-bk-hero { grid-template-columns: 11.25rem minmax(0, 1fr); }
  .v2-bk-ped { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed var(--v2-line); }
  .v2-bk-bench { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .v2-bk-bench-read { grid-column: 1 / -1; }
  .v2-bk-flipall, .v2-bk-card-btns .v2-btn, .v2-bk-form-btns .v2-btn, .v2-bk-bench-actions .v2-btn, .v2-bk-back > summary { min-height: 2.75rem; }
  .v2-bk-field .v2-breed-input, .v2-bk-switch { min-height: 2.75rem; }
  .v2-bk-money::after { height: 2.75rem; line-height: 2.75rem; }
}

@media (max-width: 640px) {
  .v2-bk-hero { grid-template-columns: 1fr; }
  .v2-bk-hero .v2-yard-door { min-height: 8.125rem; border-right: 0; border-bottom: 2px solid var(--v2-brass); }
  .v2-bk-hero .v2-yard-door img { height: 6.875rem; margin-bottom: 0; }
  .v2-bk-hero .v2-yard-initials { margin-bottom: 1.375rem; }
  .v2-bk-hero .v2-yard-plate { bottom: -0.6875rem; }
  .v2-bk-hero-main { padding-top: 1.3rem; }
  .v2-bk-hero-name { font-size: 1.25rem; }
  .v2-bk-kv { grid-template-columns: 1fr 1fr; }
  .v2-bk-ped { padding: 0.8rem; }
  .v2-bk-ped-grid { column-gap: 0.8rem; }
  .v2-bk-cards { grid-template-columns: 1fr; }
  .v2-bk-board { grid-template-columns: 1fr 1fr; }
  .v2-bk-panel-head .v2-bk-flipall { width: 100%; justify-content: center; }
  /* The bench docks as a tray while the stud book scrolls beneath it. It is LAST in the
     .v2-bk-play column here, so position:sticky; bottom:0 holds it in view for the whole
     stud book and releases it at the end of the wrapper. */
  .v2-bk-bench { order: 1; position: sticky; bottom: 0; z-index: 15; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.4rem; padding: 0.55rem; border-radius: 12px 12px 0 0; box-shadow: 0 -8px 20px rgba(0,0,0,0.5); }
  .v2-bk-slot { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 0.35rem; }
  .v2-bk-slot-text { width: 100%; align-items: center; }
  .v2-bk-slot .v2-rk-portrait, .v2-bk-foal .v2-rk-portrait { width: 2.5rem; height: 2.5rem; }
  .v2-bk-slot-text b { font-size: 0.76rem; max-width: 100%; }
  .v2-bk-slot-sub, .v2-bk-bench-notes, .v2-bk-bench-fee { display: none; }
  .v2-bk-bench-actions .v2-btn { flex: 1 1 0; }
}
/* ===== end Breeding (round 2) ===== */

/* ===== Horse finder (round 3) ===== */
/* /search Horses tab "Horse Finder" (SPEC-horse-search.md). Extends Search (round 2): the
   counter, stall cards, medals and pager are reused UNCHANGED. Every selector below is
   .v2-hs-* or compounds with one / with .v2-sx-medals b.m4. Sizes in rem (Text size pref). */

/* Conditions slip: a sentence of selects inside the counter */
.v2-hs-slip { min-width: 0; margin: 0.9rem 0 0; padding: 0.55rem 0.9rem 0.8rem; border: 1px dashed var(--v2-line); border-radius: 8px; background: rgba(0,0,0,0.18); }
.v2-hs-slip legend { padding: 0 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-hs-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.45rem; margin: 0; font-family: var(--v2-font-display); font-size: 1rem; color: var(--v2-ink-soft); }
.v2-hs-word { white-space: nowrap; }
.v2-hs-pick { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
.v2-hs-pick select { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; min-height: 2.5rem; padding: 0.3rem 1.9rem 0.3rem 0.7rem; border: 1px solid var(--v2-line); border-bottom: 2px solid var(--v2-brass); border-radius: 6px 6px 2px 2px; background: var(--v2-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%23c79a3f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.6rem center / 0.75rem; color: var(--v2-ink-bright); font-family: var(--v2-font-display); font-style: italic; font-size: 1rem; text-overflow: ellipsis; cursor: pointer; }
.v2-hs-pick select:hover { border-color: var(--v2-brass); }
.v2-hs-pick option { font-style: normal; color: var(--v2-ink); background: var(--v2-surface-2); }
/* A chosen condition reads as filled in: bold + glow underline + its own words (never colour alone). */
.v2-hs-pick select.is-set { font-weight: 700; color: var(--v2-glow); border-bottom-color: var(--v2-glow); }
.v2-hs-punct { margin-left: 0.15rem; color: var(--v2-ink-soft); }
.v2-hs-hint { margin: 0.55rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
/* The slip only means something on the Horses tab. Progressive: without :has() it just stays visible. */
.v2-sx-counter:has(.v2-sx-tab input[value="horses"]:not(:checked)) .v2-hs-slip { display: none; }

/* Conditions in use, as removable chips under the result headline */
.v2-hs-chips { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: -0.3rem 0 0.9rem; padding: 0; }
.v2-hs-chip { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2rem; padding: 0.2rem 0.35rem 0.2rem 0.75rem; border: 1px solid var(--v2-brass); border-radius: 100px; background: rgba(199,154,63,0.12); font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink); }
.v2-hs-chip span { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: rgba(0,0,0,0.3); font-size: 0.85rem; line-height: 1; color: var(--v2-brass); }
.v2-hs-chip:hover { border-color: var(--v2-glow); }
.v2-hs-chip:hover span { color: var(--v2-glow); }
.v2-hs-clear { display: inline-flex; align-items: center; min-height: 2rem; padding: 0 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); text-decoration: underline; text-underline-offset: 0.2em; }
.v2-hs-clear:hover { color: var(--v2-glow); }

/* Stall card additions: list ordinal on the door, pedigree line, 4ths disc */
.v2-hs-no { position: absolute; top: 0.4rem; left: 0.4rem; z-index: 1; padding: 0.08rem 0.4rem; border: 1px solid rgba(199,154,63,0.55); border-radius: 3px; background: rgba(11,26,18,0.85); font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: var(--v2-brass); font-variant-numeric: tabular-nums; }
.v2-hs-ped { font-family: var(--v2-font-mono); font-size: 0.66rem; line-height: 1.35; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-sx-medals b.m4 { background: transparent; color: var(--v2-ink-soft); border: 1px dashed rgba(243,234,211,0.5); }

/* Pager: the existing .v2-pager / .v2-pager-links, with real buttons */
.v2-hs-pager { margin-top: 1.1rem; padding-top: 0.8rem; border-top: 1px dashed var(--v2-line); }
.v2-hs-pager .v2-pager-links a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.9rem; border: 1px solid var(--v2-brass); border-radius: 6px; color: var(--v2-brass); }
.v2-hs-pager .v2-pager-links a:hover { color: var(--v2-glow); border-color: var(--v2-glow); }

@media (max-width: 640px) {
  .v2-hs-slip { padding: 0.5rem 0.6rem 0.7rem; }
  .v2-hs-sentence { font-size: 0.88rem; gap: 0.45rem 0.3rem; }
  .v2-hs-pick select { min-height: 2.75rem; padding: 0.25rem 1.55rem 0.25rem 0.5rem; background-position: right 0.45rem center; font-size: 0.88rem; }
  .v2-hs-chip, .v2-hs-clear { min-height: 2.75rem; }
  .v2-hs-pager .v2-pager-links { width: 100%; justify-content: space-between; }
  .v2-hs-pager .v2-pager-links a { min-height: 2.75rem; }
  /* Two equal columns at any Text size: let the grid items shrink and the two nowrap lines
     (earnings, honour tags) wrap. Without this, Larger text at 375px overflowed by up to 45px
     (a round-2 issue in the shared stall card, fixed here for the finder only). */
  .v2-hs-stalls > li { min-width: 0; }
  .v2-hs-stalls .v2-sx-earn, .v2-hs-stalls .v2-sx-honours .v2-rk-tag { white-space: normal; }
}
/* ===== end Horse finder (round 3) ===== */
/* ===== Horse profile (round 3) ===== */
/* views/v2-horse.pug at /horse/Details (SPEC-horse-profile.md, Option M "Owner's Box").
   Prefix .v2-hp-*. Every rule for that page lives between this banner and the end banner.
   Reused unchanged: .v2-yard-door/-plate/-initials/-ring/-clip/-order/-oi/-ot/-ol/-os/-og,
   .v2-raceticket*, .v2-countdown(-sm), .v2-sheet/.v2-row/.v2-post, .v2-bk-eyebrow, .v2-bk-kv,
   .v2-lb-rosette(.sm), .v2-lb-honour, .v2-rk-*, .v2-status-chip*, .v2-bar-track, .v2-subtabs,
   .v2-section-label/.v2-rc-h, .v2-sr-only, .v2-btn. Never touches .v2-horse-row / .v2-ranked-row. */

/* .v2-btn sets display:inline-block, which beats the UA [hidden] rule. */
.v2-hp-root [hidden] { display: none !important; }

/* ---- mast: stall door | identity | condition ---- */
.v2-hp-mast { display: grid; grid-template-columns: 13.75rem minmax(0, 1fr) 17.5rem; border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); margin-bottom: 1.2rem; }
/* YOURS = 3px glow bar + the YOURS text tag in the owner line: never colour alone. */
.v2-hp-mast.is-mine { box-shadow: inset 0 3px 0 var(--v2-glow); }
.v2-hp-mast .v2-yard-door { height: auto; min-height: 13.75rem; border-bottom: 0; border-right: 2px solid var(--v2-brass); }
.v2-hp-mast .v2-yard-door img { height: 10.625rem; margin-bottom: 1.875rem; }
.v2-hp-mast .v2-yard-initials { margin-bottom: 3rem; }
.v2-hp-mast .v2-yard-plate { bottom: 0.625rem; }
/* Retired / deceased: the portrait dims. The status chip carries the meaning in words. */
.v2-hp-mast.is-off .v2-yard-door img { filter: grayscale(0.8) drop-shadow(0 4px 6px rgba(0,0,0,0.6)); opacity: 0.8; }

.v2-hp-id { padding: 1.1rem 1.2rem; min-width: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.v2-hp-rename { margin: 0.35rem 0 0.5rem; font-size: 0.8rem; }
.v2-hp-rename summary { cursor: pointer; color: var(--v2-brass); font-family: var(--v2-font-mono); font-size: 0.68rem; }
.v2-hp-rename form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.v2-hp-rename .v2-input { flex: 1 1 12rem; min-width: 0; }
.v2-hp-rename-hint { margin: 0.4rem 0 0; font-size: 0.72rem; opacity: 0.8; }
.v2-hp-rename-note { margin: 0.25rem 0; font-size: 0.78rem; color: var(--v2-good); }
.v2-hp-rename-note.is-error { color: var(--v2-signal-bright); }
.v2-hp-notes { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin: 0; }
.v2-hp-notes .v2-form-textarea { min-height: 5rem; font-size: 0.85rem; line-height: 1.45; }
.v2-hp-notes .v2-form-hint { margin-top: 0; }
@media (max-width: 640px) {
  .v2-hp-notes .v2-btn { min-height: 2.75rem; }
  .v2-hp-notes .v2-form-textarea { font-size: 1rem; }
}
.v2-hp-owner { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.v2-hp-owner a { font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-brass); }
.v2-hp-owner a:hover { color: var(--v2-glow); }
.v2-hp-owner .v2-rk-mine { margin-left: 0; }
.v2-hp-name { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.85rem; line-height: 1.1; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-hp-name .v2-rk-tag { font-size: 0.66rem; }
.v2-hp-ped { margin: 0; font-family: var(--v2-font-display); font-style: italic; font-size: 0.9rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-hp-ped a { font-style: normal; color: var(--v2-brass); }
.v2-hp-ped a:hover { color: var(--v2-glow); }
.v2-hp-honours { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.v2-hp-mast .v2-bk-kv { margin: 0.25rem 0 0; }
.v2-hp-watch { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.25rem; background: transparent; cursor: pointer; }
.v2-hp-watch[aria-pressed="true"] { color: var(--v2-glow); border-color: var(--v2-glow); }

.v2-hp-cond { padding: 1.1rem 1.2rem; border-left: 1px dashed var(--v2-line); display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.v2-hp-k { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-hp-v { display: block; font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink); }
.v2-hp-ringrow { display: flex; align-items: center; gap: 0.75rem; }
.v2-yard-ring.v2-hp-ring { width: 3.5rem; height: 3.5rem; }
.v2-yard-ring.v2-hp-ring span { width: 2.75rem; height: 2.75rem; font-size: 0.95rem; }
.v2-hp-heart { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0.2rem 0.55rem; align-items: center; }
.v2-hp-heart img { width: 1.5rem; height: auto; grid-row: span 2; }
.v2-hp-heart .v2-bar-track { margin: 0; }
.v2-hp-heart b { grid-row: span 2; font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-hp-note { margin: 0; display: flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-hp-note .v2-rk-ic { color: var(--v2-ink-faint); }
.v2-hp-chip-plain { color: var(--v2-ink-soft); border-color: var(--v2-line); }

/* ---- next up + orders ---- */
.v2-hp-duo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-hp-duo > div > .v2-section-label:first-child { margin-top: 0; }
.v2-hp-stub-lock { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); text-align: center; }
.v2-hp-stub-lock .v2-rk-ic { width: 1.5rem; height: 1.5rem; }
.v2-hp-hidden-note { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-hp-root .v2-raceticket-runner .v2-rk-cloth { width: 1.625rem; height: 1.875rem; font-size: 0.85rem; }
.v2-hp-noentry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.9rem 1rem; border: 1px dashed var(--v2-line); border-radius: 10px; font-size: 0.84rem; color: var(--v2-ink-soft); }
.v2-hp-noentry a { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }

/* ---- form strip: last five runs, oldest to latest ---- */
.v2-hp-form { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; }
.v2-hp-run { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; height: 100%; padding: 0.7rem 0.4rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); text-align: center; min-width: 0; }
a.v2-hp-run:hover { border-color: var(--v2-brass); }
.v2-hp-run.is-latest { border-color: rgba(199,154,63,0.65); background: linear-gradient(180deg, rgba(199,154,63,0.1), var(--v2-surface)); }
.v2-hp-pos { display: grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: 50%; border: 1px solid var(--v2-ink-faint); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-hp-run-d { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-hp-run-c { max-width: 100%; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-hp-run-sr { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }
.v2-hp-run-tag { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }

/* ---- race history finish cell ---- */
.v2-hp-fin { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.v2-hp-fin .v2-lb-rosette.sm { width: 1.75rem; height: 1.75rem; font-size: 0.6rem; }
.v2-hp-fin .v2-lb-rosette.sm::before, .v2-hp-fin .v2-lb-rosette.sm::after { width: 0.4375rem; height: 0.6875rem; }

/* ---- training: published workouts as slips ---- */
.v2-hp-works { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.6rem; }
.v2-hp-work { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.55rem 0.7rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); min-width: 0; }
.v2-hp-work.is-top { border-color: rgba(255,181,69,0.55); }
.v2-hp-work small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-hp-work b { font-family: var(--v2-font-hud); font-size: 1.05rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-hp-work em { font-style: normal; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-hp-work.is-top em { color: var(--v2-glow); }

/* ---- horse history: timeline ---- */
.v2-hp-log { list-style: none; margin: 0 0 0.6rem; padding: 0 0 0 1.1rem; border-left: 2px solid var(--v2-line); }
.v2-hp-log li { position: relative; padding: 0.35rem 0 0.35rem 0.5rem; font-size: 0.84rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-hp-log li::before { content: ""; position: absolute; left: -1.53rem; top: 0.8rem; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--v2-bg); border: 2px solid var(--v2-brass); }
.v2-hp-log time { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
/* ---- training history: fractions + record (owner only) ---- */
.v2-hp-fracs { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-table tr.is-record td { font-weight: 700; }
.v2-hp-pb { color: var(--v2-good); white-space: nowrap; }
/* ---- growth: ability-to-max gauges + history spark (owner only) ---- */
.v2-hp-gr { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem 1.6rem; align-items: start; }
.v2-hp-gr-bars { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.v2-hp-gr-group { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.55rem; }
.v2-hp-gr-group > .v2-rk-surface { align-self: flex-start; margin-bottom: 0.1rem; }
.v2-hp-gr-row { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr) 2.25rem; align-items: center; gap: 0.6rem; min-height: 1.5rem; }
.v2-hp-gr-label { font-size: 0.8rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-hp-gr-row.is-overall .v2-hp-gr-label { font-weight: 700; color: var(--v2-ink-bright); }
.v2-hp-gr-track { display: block; height: 0.5rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; min-width: 0; }
.v2-hp-gr-row.is-overall .v2-hp-gr-track { height: 0.625rem; }
.v2-hp-gr-track i { display: block; height: 100%; background: var(--v2-glow); }
.v2-hp-gr-row.is-dirt .v2-hp-gr-track i { background: var(--v2-dirt-light); }
.v2-hp-gr-row.is-turf .v2-hp-gr-track i { background: var(--v2-turf-stripe); }
.v2-hp-gr-row.is-max .v2-hp-gr-track i { background: var(--v2-good); }
.v2-hp-gr-row.is-max .v2-hp-gr-label { color: var(--v2-good); font-style: italic; }
.v2-hp-gr-tag { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-good); }
.v2-hp-gr-key { margin: 0.6rem 0 0; font-size: 0.72rem; color: var(--v2-ink-faint); }
.v2-hp-gr-sub { font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-soft); margin: 0 0 0.5rem; }
.v2-hp-gr-hist { min-width: 0; }
.v2-hp-gr-spark { display: block; width: 100%; height: 4.5rem; overflow: visible; }
.v2-hp-gr-spark polyline { fill: none; stroke: var(--v2-good); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.v2-hp-gr-spark .v2-hp-gr-base { stroke: var(--v2-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.v2-hp-gr-dates { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-hp-gr-hist .v2-empty { margin: 0; }

@media (max-width: 900px) {
  .v2-hp-mast { grid-template-columns: 11.25rem minmax(0, 1fr); }
  .v2-hp-cond { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed var(--v2-line); display: grid; grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); align-items: center; gap: 0.8rem 1.4rem; }
  .v2-hp-duo { grid-template-columns: 1fr; }
  .v2-hp-watch, .v2-hp-noentry a { min-height: 2.75rem; }
  .v2-hp-noentry a { display: inline-flex; align-items: center; }
}
@media (max-width: 640px) {
  .v2-hp-gr { grid-template-columns: 1fr; }
  .v2-hp-gr-row { grid-template-columns: 4.5rem minmax(0, 1fr) 2rem; gap: 0.5rem; }
  .v2-hp-mast { grid-template-columns: 1fr; }
  .v2-hp-mast .v2-yard-door { min-height: 9rem; border-right: 0; border-bottom: 2px solid var(--v2-brass); }
  .v2-hp-mast .v2-yard-door img { height: 7.5rem; margin-bottom: 0; }
  .v2-hp-mast .v2-yard-initials { margin-bottom: 1.375rem; }
  .v2-hp-mast .v2-yard-plate { bottom: -0.6875rem; }
  .v2-hp-id { padding: 1.3rem 0.9rem 0.9rem; }
  .v2-hp-name { font-size: 1.4rem; }
  .v2-hp-cond { padding: 0.9rem; grid-template-columns: 1fr; }
  .v2-hp-form { gap: 0.35rem; }
  .v2-hp-run { padding: 0.55rem 0.15rem 0.5rem; }
  .v2-hp-run-c, .v2-hp-run-sr { display: none; }
  .v2-hp-works { grid-template-columns: 1fr 1fr; }
}
/* ===== end Horse profile (round 3) ===== */
/* ===== Enter race (round 3) ===== */
/* v2-enter-race.pug "Entry Box" (SPEC-enter-race.md). Prefix .v2-er-*. Reuses .v2-rc-mast/
   .v2-rc-post/.v2-rc-purse/.v2-rc-cols/.v2-rc-box/.v2-rc-dl/.v2-rc-lines/.v2-rc-line (Race
   Card), .v2-yard-stalls/.v2-yard-stall/.v2-yard-door/.v2-yard-plate/.v2-yard-body/
   .v2-yard-ring/.v2-yard-cond (Stable Yard), .v2-status-chip, .v2-status-flag and the kit
   (.v2-rk-*). Nothing above this section is edited. */

/* --- Entry terms (inside the conditions box) --- */
.v2-er-terms { border-top: 1px solid var(--v2-line); background: rgba(0,0,0,0.15); padding: 0.2rem 1rem 0.8rem; }
.v2-er-terms-h { margin: 0.7rem 0 0.1rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-er-terms .v2-rc-dl { padding: 0; }
.v2-er-terms .v2-rc-dl dd { flex-direction: column; align-items: flex-end; justify-content: center; gap: 0.15rem; }
.v2-er-terms .v2-rc-dl dd small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-er-terms .v2-rc-dl dd small a { color: var(--v2-brass); }
.v2-er-money { font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }

/* Race token chip: a material, like surface. Word + coin, never colour alone. */
.v2-er-token { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--v2-ink-bright); padding: 0.2rem 0.6rem 0.2rem 0.25rem; border-radius: 100px; border: 1px solid rgba(243,234,211,0.25); background: rgba(243,234,211,0.05); white-space: nowrap; }
.v2-er-coin { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid rgba(26,20,8,0.5); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35); flex: 0 0 auto; background: var(--v2-er-tok, #929292); }
.v2-er-token.is-l1 { --v2-er-tok: #8c7853; } .v2-er-token.is-l2 { --v2-er-tok: #929292; }
.v2-er-token.is-l3 { --v2-er-tok: #c5b358; } .v2-er-token.is-l4 { --v2-er-tok: #92b962; }
.v2-er-token.is-l5 { --v2-er-tok: #b9f2ff; }

/* Per-owner entry cap: three posts, filled = used. */
.v2-er-cap { display: inline-flex; gap: 0.25rem; }
.v2-er-cap i { width: 0.75rem; height: 1rem; border-radius: 2px 2px 4px 4px; border: 1px solid var(--v2-ink-faint); }
.v2-er-cap i.on { background: var(--v2-blue); border-color: var(--v2-blue); }
.v2-er-cap i.sel { background: var(--v2-glow); border-color: var(--v2-glow); }

/* --- Race-level notices (word + icon + fix link) --- */
.v2-er-notices { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.v2-er-notice { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.6rem 0.9rem; border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-glow); border-radius: 8px; background: var(--v2-surface); font-size: 0.82rem; }
.v2-er-notice .v2-rk-ic { width: 1.25rem; height: 1.25rem; color: var(--v2-glow); }
.v2-er-notice b { font-weight: 600; color: var(--v2-ink-bright); }
.v2-er-notice.is-block { border-left-color: var(--v2-signal); }
.v2-er-notice.is-block .v2-rk-ic { color: var(--v2-signal-bright); }
.v2-er-notice.is-info { border-left-color: var(--v2-blue); }
.v2-er-notice.is-info .v2-rk-ic { color: var(--v2-blue); }
.v2-er-notice a.v2-btn { white-space: nowrap; min-height: 2.25rem; display: inline-flex; align-items: center; }

/* --- Declared runners: Race Card program lines, plus an action column --- */
.v2-er-line { grid-template-columns: 2.75rem 3rem minmax(0, 1fr) auto; }
.v2-er-line-act { display: flex; align-items: center; gap: 0.7rem; justify-content: flex-end; }
.v2-er-wt { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); white-space: nowrap; text-align: right; }
.v2-er-wt b { display: block; font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink-bright); font-weight: 700; }
.v2-er-scratch { min-height: 2.25rem; display: inline-flex; align-items: center; gap: 0.3rem; border-color: rgba(255,117,87,0.6); color: var(--v2-signal-bright); background: transparent; cursor: pointer; }
.v2-er-scratch:hover { background: rgba(255,117,87,0.12); color: var(--v2-signal-bright); }
.v2-er-scratch.is-armed { background: var(--v2-signal); color: var(--v2-ink-dark); border-color: var(--v2-signal); font-weight: 700; }
.v2-er-wa { grid-column: 3 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding-top: 0.45rem; border-top: 1px dashed var(--v2-line); font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-er-wa label { color: var(--v2-ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.v2-er-wa select { min-height: 2.25rem; }
.v2-er-wa .v2-btn { min-height: 2.25rem; }

/* --- Ready to declare: stall cards --- */
.v2-er-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: -0.2rem 0 0.8rem; }
.v2-er-seg { display: inline-flex; border: 1px solid var(--v2-line); border-radius: 6px; overflow: hidden; }
.v2-er-seg label { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.8rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); cursor: pointer; }
.v2-er-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-er-seg label:has(input:checked) { background: rgba(199,154,63,0.18); color: var(--v2-ink-bright); }
.v2-er-seg label:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: -2px; }
.v2-er-tools select { min-height: 2.25rem; }
.v2-er-tools-note { margin-left: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

.v2-yard-stalls.v2-er-stalls { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
.v2-er-stall { position: relative; }
.v2-er-stall.is-picked { outline: 2px solid var(--v2-glow); outline-offset: -2px; box-shadow: 0 0 0 4px rgba(255,181,69,0.15); }
.v2-er-stall.is-capped { opacity: 0.72; }
.v2-er-nom { position: absolute; top: 0.45rem; right: 0.45rem; z-index: 1; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-dark); background: var(--v2-brass); border-radius: 3px; padding: 0.08rem 0.35rem; }
.v2-er-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.15rem 0.6rem; font-family: var(--v2-font-mono); font-size: 0.66rem; }
.v2-er-facts dt { color: var(--v2-ink-faint); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.66rem; align-self: center; }
.v2-er-facts dd { margin: 0; color: var(--v2-ink); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v2-er-fig { letter-spacing: 0.04em; }
.v2-er-fig b { color: var(--v2-glow); font-weight: 700; }
.v2-er-gear { display: inline-flex; gap: 0.2rem; justify-content: flex-end; flex-wrap: wrap; }
.v2-er-gear abbr { text-decoration: none; border: 1px solid var(--v2-line); border-radius: 3px; padding: 0 0.25rem; color: var(--v2-ink-soft); }
.v2-er-rest { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-er-pick { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.75rem; border: 1px solid var(--v2-brass); border-radius: 6px; font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-brass); cursor: pointer; }
.v2-er-pick:hover { background: rgba(199,154,63,0.12); color: var(--v2-glow); }
.v2-er-pick input { width: 1.125rem; height: 1.125rem; accent-color: var(--v2-glow); margin: 0; }
.v2-er-pick:has(input:checked) { background: var(--v2-glow); border-color: var(--v2-glow); color: var(--v2-ink-dark); font-weight: 700; }
.v2-er-pick:has(input:disabled) { border-style: dashed; color: var(--v2-ink-faint); cursor: not-allowed; background: transparent; }
.v2-er-pick-why { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); text-align: center; margin: -0.2rem 0 0; }

/* --- Can't run here: reasons, each with a fix --- */
.v2-er-blocks { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.4rem; }
.v2-er-block { border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-glow); border-radius: 8px; background: var(--v2-surface); padding: 0.8rem 1rem; }
.v2-er-block.is-cond { border-left-color: var(--v2-ink-faint); padding: 0; }
.v2-er-block-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 0.8rem; align-items: center; }
.v2-er-block-h { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; color: var(--v2-ink-bright); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.v2-er-block-h .v2-rk-ic { color: var(--v2-glow); width: 1.15rem; height: 1.15rem; }
.v2-er-count { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-dark); background: var(--v2-glow); border-radius: 100px; padding: 0.05rem 0.45rem; }
.v2-er-block.is-cond .v2-er-count { background: var(--v2-surface-2); color: var(--v2-ink-soft); border: 1px solid var(--v2-line); }
.v2-er-block-why { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-er-block-head .v2-btn { min-height: 2.25rem; display: inline-flex; align-items: center; white-space: nowrap; }
.v2-er-names { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.v2-er-names a, .v2-er-names span { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2rem; padding: 0.15rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 100px; font-size: 0.76rem; color: var(--v2-ink); background: rgba(243,234,211,0.03); }
.v2-er-names a:hover { border-color: var(--v2-brass); color: var(--v2-glow); }
.v2-er-names a small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }
.v2-er-names .is-more { border-style: dashed; color: var(--v2-ink-faint); font-family: var(--v2-font-mono); font-size: 0.66rem; }
.v2-er-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 2rem; padding: 0.15rem 0.6rem; border: 1px dashed var(--v2-line); border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-er-more > summary::-webkit-details-marker { display: none; }
.v2-er-more[open] > summary { display: none; }
.v2-er-more > .v2-er-names { margin-top: 0; }
.v2-er-names li:has(> .v2-er-more[open]) { flex-basis: 100%; }
.v2-er-notes { font-size: 0.72rem; color: var(--v2-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-er-msg { grid-column: 1 / -1; margin: 0; font-size: 0.78rem; color: var(--v2-signal-bright); }
.v2-er-cond-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; min-height: 2.75rem; font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); }
.v2-er-cond-sum::-webkit-details-marker { display: none; }
.v2-er-cond-sum .v2-rk-ic { color: var(--v2-brass); transition: transform 150ms ease; }
.v2-er-block[open] .v2-er-cond-sum .v2-rk-ic { transform: rotate(90deg); }
.v2-er-cond-sum small { margin-left: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-er-cond-body { padding: 0 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.8rem; }
.v2-er-cond-row h4 { margin: 0; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-soft); }
.v2-er-cond-row h4 b { color: var(--v2-ink-bright); font-weight: 400; }
.v2-er-elsewhere { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }

/* --- Declaration slip (sticky ticket) --- */
.v2-er-slip { position: sticky; bottom: 0; z-index: 5; margin-top: 1.2rem; display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; background: var(--v2-surface-2); border: 1px solid var(--v2-brass); border-radius: 10px 10px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.45); }
.v2-er-slip-stub { border-right: 2px dashed var(--v2-line); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.6rem 0.4rem; background: linear-gradient(180deg, rgba(255,181,69,0.14), rgba(255,181,69,0.04)); }
.v2-er-slip-n { font-family: var(--v2-font-hud); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-er-slip-k { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); text-align: center; }
.v2-er-slip-main { padding: 0.7rem 1rem; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.v2-er-slip-who { margin: 0; font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-er-slip-who.is-empty { color: var(--v2-ink-faint); font-style: italic; }
.v2-er-bill { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-er-bill dt { min-width: 0; }
.v2-er-bill dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--v2-ink); }
.v2-er-bill .is-total { border-top: 1px dashed var(--v2-line); padding-top: 0.25rem; color: var(--v2-ink-bright); font-weight: 700; }
.v2-er-bill dd.is-total { color: var(--v2-glow); }
.v2-er-bill .is-after { color: var(--v2-ink-faint); }
.v2-er-bill .is-short { color: var(--v2-signal-bright); }
.v2-er-slip-sum { display: none; margin: 0; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-er-slip-sum b { color: var(--v2-glow); }
.v2-er-slip-go { padding: 0.7rem 1rem; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 0.35rem; border-left: 1px dashed var(--v2-line); min-width: 13.75rem; }
.v2-er-slip-go .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.v2-er-slip-go .v2-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.v2-er-slip-note { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); text-align: center; }
.v2-er-slip-note a { color: var(--v2-brass); }

/* Confirm + result states (the slip grows a panel; no window.confirm / alert) */
.v2-er-confirm { grid-column: 1 / -1; border-top: 1px dashed var(--v2-line); padding: 0.8rem 1rem 0.9rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem 1.2rem; align-items: end; }
.v2-er-confirm p { margin: 0; font-size: 0.85rem; color: var(--v2-ink); }
.v2-er-confirm p b { color: var(--v2-ink-bright); }
.v2-er-confirm-acts { display: flex; gap: 0.5rem; }
.v2-er-confirm-acts .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; }
.v2-er-results { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0.7rem 1rem; border-top: 1px dashed var(--v2-line); display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; }
.v2-er-results li { display: flex; gap: 0.5rem; align-items: baseline; }
.v2-er-results .v2-status-chip { flex: 0 0 auto; }

/* [hidden] must win over the display rules above (confirm panel, results, filtered stalls, messages). */
[class*="v2-er-"][hidden] { display: none; }
/* <button class="v2-btn"> has no background in the theme; keep secondary buttons transparent. */
.v2-er-wa button.v2-btn, .v2-er-confirm button.v2-btn:not(.v2-btn-primary), .v2-er-results button.v2-btn, .v2-empty button.v2-btn { background: transparent; }
.v2-er-wa button.v2-btn:hover, .v2-er-confirm button.v2-btn:not(.v2-btn-primary):hover, .v2-er-results button.v2-btn:hover, .v2-empty button.v2-btn:hover { background: rgba(199,154,63,0.12); }

@media (max-width: 900px) {
  .v2-er-slip { grid-template-columns: 4.875rem minmax(0, 1fr); }
  .v2-er-slip-go { grid-column: 1 / -1; border-left: none; border-top: 1px dashed var(--v2-line); min-width: 0; }
}
@media (max-width: 640px) {
  .v2-er-notice { grid-template-columns: 1.25rem minmax(0, 1fr); }
  .v2-er-notice a.v2-btn { grid-column: 2; justify-self: start; min-height: 2.75rem; }
  .v2-er-line { grid-template-columns: 2.125rem 2.5rem minmax(0, 1fr); row-gap: 0.4rem; }
  .v2-er-line-act { grid-column: 2 / -1; justify-content: space-between; }
  /* Phone: let the name, YOURS tag, gear and sub-line wrap rather than ellipse the name and "cond N%". */
  .v2-er-line .v2-rc-name { flex-wrap: wrap; white-space: normal; column-gap: 0.35rem; }
  .v2-er-line .v2-rc-sub { white-space: normal; }
  .v2-er-scratch { min-height: 2.75rem; }
  .v2-er-wa { grid-column: 1 / -1; }
  .v2-er-tools-note { margin-left: 0; flex-basis: 100%; }
  .v2-yard-stalls.v2-er-stalls { grid-template-columns: 1fr; }
  .v2-er-stall { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); }
  .v2-er-stall .v2-yard-door { height: auto; min-height: 100%; align-items: center; padding-bottom: 1.25rem; border-bottom: none; border-right: 2px solid var(--v2-brass); }
  .v2-er-stall .v2-yard-door::before { inset: 0.5rem 0.5rem auto; }
  .v2-er-stall .v2-yard-door img { height: 5rem; }
  .v2-er-stall .v2-yard-plate { bottom: 0.5rem; }
  .v2-er-stall .v2-yard-body { padding: 0.75rem; }
  .v2-er-block-head { grid-template-columns: minmax(0, 1fr); }
  .v2-er-block-head .v2-btn { justify-self: start; min-height: 2.75rem; }
  .v2-er-names a, .v2-er-names span, .v2-er-more > summary { min-height: 2.75rem; }
  /* Full-bleed: .v2-body pads 1.5rem at every width (it has no phone override). */
  .v2-er-slip { grid-template-columns: 4rem minmax(0, 1fr); border-radius: 10px 10px 0 0; margin-left: -1.5rem; margin-right: -1.5rem; }
  .v2-er-slip-n { font-size: 1.6rem; }
  .v2-er-slip-main { padding: 0.55rem 0.75rem; }
  .v2-er-bill { display: none; }
  .v2-er-slip-sum { display: block; }
  .v2-er-slip-go { padding: 0.55rem 0.75rem 0.7rem; }
  .v2-er-confirm { grid-template-columns: minmax(0, 1fr); }
  .v2-er-confirm .v2-er-bill { display: grid; }
  .v2-er-confirm-acts .v2-btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-er-cond-sum .v2-rk-ic { transition: none; }
}
/* ===== end Enter race (round 3) ===== */
/* ===== Training (round 3) ===== */
/* views/v2-training.pug (/training) + views/v2-training-horse.pug (/training/horse/:id).
   SPEC-training.md. Reuses the Stable Yard (.v2-yard-*), Stable roster (.v2-st-tally,
   .v2-st-filters, .v2-st-f, .v2-st-aisle/.v2-st-ribbon/.v2-st-rb/.v2-st-meta/.v2-st-chev,
   .v2-st-bulkbar) and the race kit. Everything new is .v2-tg-*. Never touches .v2-horse-row. */

.v2-tg-root [hidden] { display: none !important; }
/* (secondary <button> background now handled globally by :where(.v2-app button.v2-btn)) */
.v2-tg-root input[type="checkbox"], .v2-tg-root input[type="radio"] { accent-color: var(--v2-brass); width: 1.125rem; height: 1.125rem; margin: 0; flex: 0 0 auto; }

/* ---------- Hub ---------- */
.v2-tg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18.75rem; grid-template-rows: auto 1fr; grid-template-areas: "main orders" "main more"; gap: 0 1.4rem; align-items: start; }
.v2-tg-main { grid-area: main; }
.v2-tg-side { grid-area: orders; }
.v2-tg-more-side { grid-area: more; }
.v2-tg-main > .v2-section-label:first-child, .v2-tg-side > .v2-section-label:first-child { margin-top: 0; }

.v2-tg-dot { width: 0.5625rem; height: 0.5625rem; border-radius: 50%; flex: 0 0 auto; }
.v2-tg-dot.todo { background: var(--v2-glow); }
.v2-tg-dot.done { background: var(--v2-good); }
.v2-tg-dot.needswork { border: 1.5px dashed var(--v2-glow); }
.v2-tg-dot.low { background: var(--v2-signal); }
.v2-tg-dot.entered { background: var(--v2-blue); }

.v2-tg-string .v2-st-rb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tg-selstring { display: none; margin: 0 0 0.6rem; }
.v2-tg-root.is-selecting .v2-tg-selstring { display: inline-flex; }
.v2-tg-selstring .v2-rk-ic, .v2-tg-root .js-select .v2-rk-ic, .v2-tg-bulkbar .v2-btn .v2-rk-ic { width: 0.875rem; height: 0.875rem; margin-right: 0.35rem; }
.v2-tg-more { margin: 0.5rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

.v2-tg-lots { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-tg-lot { display: grid; grid-template-columns: 2.5rem minmax(0, 1.7fr) 2.375rem minmax(0, 0.9fr) minmax(0, 1.4fr) 5.25rem; grid-template-areas: "pic who cond runs last act"; gap: 0.75rem; align-items: center; min-height: 3.5rem; padding: 0.5rem 0.8rem; border-top: 1px dashed var(--v2-line); }
.v2-tg-lot:first-child { border-top: 0; }
.v2-tg-root.is-selecting .v2-tg-lot { grid-template-columns: 1.25rem 2.5rem minmax(0, 1.7fr) 2.375rem minmax(0, 0.9fr) minmax(0, 1.4fr) 5.25rem; grid-template-areas: "pick pic who cond runs last act"; }
.v2-tg-pick { grid-area: pick; display: none; }
.v2-tg-root.is-selecting .v2-tg-pick { display: block; }
.v2-tg-root.is-selecting .v2-tg-lot:has(.v2-tg-pick:checked) { background: rgba(255,181,69,0.08); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-tg-pic { grid-area: pic; }
.v2-tg-pic img { width: 2.5rem; height: 2.25rem; object-fit: contain; display: block; }
.v2-tg-pic .v2-yard-initials { width: 2.125rem; height: 2.125rem; margin: 0; font-size: 0.62rem; border-width: 1.5px; }
.v2-tg-who { grid-area: who; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-tg-root a.v2-tg-name { font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tg-root a.v2-tg-name:hover { color: var(--v2-glow); }
.v2-tg-sub, .v2-tg-mobsub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tg-mobsub { display: none; }
.v2-tg-flags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.v2-tg-flags .v2-status-chip { font-size: 0.66rem; padding: 0.12rem 0.45rem; }
.v2-tg-flag { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); border: 1px dashed var(--v2-line); border-radius: 100px; padding: 0.12rem 0.45rem; white-space: nowrap; }
.v2-tg-flag .v2-rk-ic { width: 0.75rem; height: 0.75rem; }
.v2-tg-cond { grid-area: cond; }
.v2-tg-root .v2-tg-lot.is-done a.v2-tg-name { color: var(--v2-ink-soft); }

.v2-tg-runs { grid-area: runs; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-tg-pips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.v2-tg-pips i { width: 0.75rem; height: 0.75rem; border-radius: 50%; border: 1.5px solid var(--v2-ink-faint); }
.v2-tg-pips i.is-left { background: var(--v2-glow); border-color: var(--v2-glow); }
.v2-tg-pips i.is-used { background: transparent; border-style: solid; opacity: 0.7; }
.v2-tg-runword { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-glow); white-space: nowrap; }
.v2-tg-runword.is-done { color: var(--v2-good); }
.v2-tg-runword .v2-rk-ic { width: 0.8rem; height: 0.8rem; }

.v2-tg-last { grid-area: last; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-tg-last b { font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-tg-last em { font-style: normal; color: var(--v2-brass); white-space: nowrap; }
.v2-tg-last small { display: block; color: var(--v2-ink-faint); font-size: 0.66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tg-vt { display: inline-block; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; color: var(--v2-ink-soft); border: 1px solid var(--v2-line); border-radius: 3px; padding: 0.02rem 0.3rem; vertical-align: 0.1em; white-space: nowrap; }
.v2-tg-vt.is-track { color: var(--v2-ink-bright); border-color: rgba(243,234,211,0.5); }
.v2-tg-act { grid-area: act; justify-content: center; gap: 0.2rem; white-space: nowrap; }
.v2-tg-act .v2-rk-ic { width: 0.8rem; height: 0.8rem; }

.v2-tg-bulkbar { margin-top: 1rem; }
.v2-tg-bulknote { margin: 0.45rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

.v2-tg-hooks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.v2-tg-hooks a { display: flex; align-items: center; gap: 0.65rem; min-height: 2.75rem; padding: 0.5rem 0.8rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.v2-tg-hooks a:hover { border-color: var(--v2-brass); }
.v2-tg-hooks .v2-rk-ic { width: 1.25rem; height: 1.25rem; color: var(--v2-brass); }
.v2-tg-hooks b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.9rem; color: var(--v2-ink); }
.v2-tg-hooks small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

.v2-tg-top { list-style: none; margin: 0; padding: 0.3rem 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-tg-top li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; min-height: 2.75rem; padding: 0.3rem 0.8rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-tg-top li + li { border-top: 1px dashed var(--v2-line); }
.v2-tg-topn { font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-brass); }
.v2-tg-top .v2-name { font-family: var(--v2-font-display); font-size: 0.85rem; color: var(--v2-ink); }

/* ---------- Horse page: lot nav + header ---------- */
.v2-tg-lotnav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; font-family: var(--v2-font-mono); font-size: 0.68rem; }
.v2-tg-lotnav a { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; max-width: 100%; padding: 0.35rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 100px; color: var(--v2-ink-soft); }
.v2-tg-lotnav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tg-lotnav a:hover { border-color: var(--v2-brass); color: var(--v2-glow); }
.v2-tg-lotnav a.is-nextwork { border-color: var(--v2-brass); color: var(--v2-brass); margin-left: auto; }
.v2-tg-lotnav .v2-rk-ic { width: 0.9rem; height: 0.9rem; flex: 0 0 auto; }
.v2-tg-lotpos { flex: 1 1 auto; text-align: center; color: var(--v2-ink-faint); }

.v2-tg-hhead { display: grid; grid-template-columns: 10rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; }
.v2-tg-hhead .v2-yard-door { height: 100%; min-height: 8.5rem; border-bottom: 0; border-right: 2px solid var(--v2-brass); }
.v2-tg-hhead .v2-yard-plate { bottom: 0.5rem; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.v2-tg-hwho { min-width: 0; padding: 0.9rem 0; }
.v2-tg-hname { margin: 0.1rem 0 0.35rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.75rem; line-height: 1.15; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-tg-hfacts { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-tg-hfacts .v2-sr-chip { margin-top: 0; }
.v2-tg-gauges { display: flex; gap: 1.1rem; padding: 0.9rem 1.2rem 0.9rem 0; }
.v2-tg-gauge { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.3rem; min-width: 4.75rem; text-align: center; }
.v2-tg-gauge b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink); }
.v2-tg-gauge small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yard-ring.v2-tg-ring-lg { width: 4.25rem; height: 4.25rem; }
.v2-yard-ring.v2-tg-ring-lg span { width: 3.5rem; height: 3.5rem; font-size: 1.1rem; }
.v2-tg-pips-lg i { width: 1.125rem; height: 1.125rem; }
.v2-tg-gnum { font-size: 1.6rem !important; line-height: 1; }
.v2-tg-gnum span { font-size: 0.8rem; color: var(--v2-ink-faint); margin-left: 0.1rem; }

/* ---------- Horse page: work order ticket ---------- */
.v2-tg-hgrid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.4rem; margin-top: 1.4rem; align-items: start; }
.v2-tg-ticket { position: relative; background: var(--v2-surface); border: 1px solid var(--v2-brass); border-radius: 10px; padding: 1.2rem 1.2rem 1.1rem; }
.v2-tg-ticket::before { content: ""; position: absolute; top: -0.4375rem; left: 50%; transform: translateX(-50%); width: 4rem; height: 0.75rem; border-radius: 4px; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); }
.v2-tg-th { margin: 0 0 0.9rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.2rem; color: var(--v2-ink); }
.v2-tg-fs { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.v2-tg-fs legend { padding: 0; margin-bottom: 0.45rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-tg-venues { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.v2-tg-venue { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.75rem 0.85rem; min-height: 2.75rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); cursor: pointer; }
.v2-tg-venue:has(input:checked) { border-color: var(--v2-brass); background: rgba(199,154,63,0.12); box-shadow: inset 3px 0 0 var(--v2-brass); }
.v2-tg-venue > .v2-rk-ic { width: 1.375rem; height: 1.375rem; color: var(--v2-brass); margin-top: 0.05rem; }
.v2-tg-venue b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink); }
.v2-tg-venue small { display: block; font-size: 0.72rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-tg-venue.is-off { cursor: not-allowed; border-style: dashed; background: transparent; }
.v2-tg-venue.is-off b, .v2-tg-venue.is-off > .v2-rk-ic { color: var(--v2-ink-faint); }
.v2-tg-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.v2-tg-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.55rem 0.6rem; min-height: 2.75rem; border: 1px solid var(--v2-line); border-radius: 8px; cursor: pointer; }
.v2-tg-opt:has(input:checked) { border-color: var(--v2-brass); background: rgba(199,154,63,0.12); }
.v2-tg-opt .v2-rk-going { padding: 0.2rem 0.5rem; }
.v2-tg-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-tg-chip { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0.3rem 0.75rem 0.3rem 0.5rem; border: 1px solid var(--v2-line); border-radius: 100px; cursor: pointer; font-family: var(--v2-font-mono); color: var(--v2-ink-soft); }
.v2-tg-chip b { font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink); }
.v2-tg-chip small { font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-chip:has(input:checked) { border-color: var(--v2-brass); background: rgba(199,154,63,0.14); }
.v2-tg-preview { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; align-items: center; margin: 0 0 1rem; }
.v2-tg-preview p { margin: 0; font-size: 0.75rem; color: var(--v2-ink-soft); }
.v2-tg-preview b { color: var(--v2-ink); font-weight: 600; }
.v2-tg-ovals { min-width: 0; }
.v2-tg-root a.v2-tg-race { color: var(--v2-ink); }
.v2-tg-root a.v2-tg-race:hover span { color: var(--v2-glow); }
.v2-tg-go { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.8rem; padding-top: 0.9rem; border-top: 1px dashed var(--v2-line); }
.v2-tg-runsin { display: flex; flex-direction: column; gap: 0.3rem; }
.v2-tg-runsin label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-tg-runsin small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-step { display: inline-flex; align-items: center; gap: 0.3rem; }
.v2-tg-step .v2-btn { min-width: 2.75rem; min-height: 2.75rem; justify-content: center; }
.v2-tg-step .v2-input { width: 3.75rem; text-align: center; min-height: 2.75rem; }
.v2-tg-send { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; }
.v2-tg-send .v2-rk-ic { width: 1.1rem; height: 1.1rem; }
.v2-tg-result { margin-top: 1rem; padding: 0.8rem 0.9rem; border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-good); border-radius: 8px; background: var(--v2-surface-2); }
.v2-tg-result:empty { display: none; }
.v2-tg-result.is-error { border-left-color: var(--v2-signal); }
.v2-tg-result p { margin: 0; }
.v2-tg-rh { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-tg-rh .v2-rk-ic { color: var(--v2-good); }
.v2-tg-rh span { margin-left: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-rline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin: 0.35rem 0 0.6rem !important; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-tg-rline > b { font-family: var(--v2-font-hud); font-size: 1.4rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-tg-ract { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.v2-tg-ract .v2-btn { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.5rem; }
.v2-tg-ract .v2-rk-ic { width: 0.85rem; height: 0.85rem; }
.v2-tg-root .is-ready { color: var(--v2-good); }
.v2-tg-root .is-mid { color: var(--v2-glow); }
.v2-tg-root .is-low { color: var(--v2-signal-bright); }

/* side panels */
.v2-tg-hside { display: grid; gap: 0.8rem; }
.v2-tg-panel { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 0.85rem 1rem; }
.v2-tg-panel h2 { margin: 0 0 0.55rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-tg-none, .v2-tg-pnote { margin: 0; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-tg-none a, .v2-tg-pnote a { color: var(--v2-brass); }
.v2-tg-pnote { margin-top: 0.5rem; }
/* farm rotation options + editable preferences */
.v2-tg-rot { display: grid; gap: 0.4rem; margin-bottom: 0.45rem; }
.v2-tg-rot[hidden], .v2-tg-hint[hidden], .v2-tg-ovalrot[hidden] { display: none; }
.v2-tg-rotlab { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-chip.is-rot { border-style: dashed; }
.v2-tg-chip.is-rot:has(input:checked) { border-style: solid; }
.v2-tg-hint { margin: -0.4rem 0 1rem; font-size: 0.75rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-tg-hint a { color: var(--v2-brass); }
.v2-tg-ovalrot { display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; min-height: 6rem; padding: 0.6rem; border: 1px dashed var(--v2-line); border-radius: 8px; text-align: center; }
.v2-tg-ovalrot small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-ovalrot b { font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink); }
.v2-tg-prefs .v2-tg-fs { margin-bottom: 0.8rem; }
.v2-tg-prefs-ok { margin: 0 0 0.7rem; }
.v2-tg-psets { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.4rem 0.6rem; }
.v2-tg-pset { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.v2-tg-psets > .v2-tg-pset:only-child { flex-direction: row; flex-wrap: wrap; column-gap: 0.9rem; }
.v2-tg-psetlab { font-size: 0.72rem; font-weight: 600; color: var(--v2-ink-soft); }
.v2-tg-pchk { display: flex; align-items: center; gap: 0.45rem; min-height: 2rem; font-size: 0.8rem; color: var(--v2-ink); cursor: pointer; }
.v2-tg-psave { margin-top: 0.7rem; min-height: 2.75rem; }
@media (max-width: 640px) {
  .v2-tg-pchk { min-height: 2.75rem; }
  .v2-tg-hint { margin-top: -0.2rem; }
}
.v2-tg-tack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-tg-tack li { display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); border: 1px dashed var(--v2-line); border-radius: 100px; padding: 0.22rem 0.6rem; }
.v2-tg-tack li.is-on { color: var(--v2-ink); border-style: solid; border-color: rgba(199,154,63,0.55); }
.v2-tg-tack li.is-on .v2-rk-ic { color: var(--v2-good); width: 0.85rem; height: 0.85rem; }
.v2-tg-off { width: 0.85rem; text-align: center; }
.v2-tg-race { display: grid; gap: 0.15rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-tg-race small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* ---------- Horse page: clockings ---------- */
.v2-tg-clocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.v2-tg-clock { display: grid; grid-template-columns: 4rem minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr); grid-template-areas: "date where time delta verdict"; gap: 0.9rem; align-items: center; padding: 0.65rem 0.9rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-tg-cdate { grid-area: date; display: flex; flex-direction: column; font-family: var(--v2-font-mono); }
.v2-tg-cdate b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink); white-space: nowrap; }
.v2-tg-cdate small { font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-cwhere { grid-area: where; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; min-width: 0; }
.v2-tg-cwhere .v2-rk-surface { padding: 0.18rem 0.55rem 0.18rem 0.25rem; font-size: 0.66rem; }
.v2-tg-cwhere .v2-rk-swatch { width: 0.875rem; height: 0.875rem; }
.v2-tg-cdist { font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-tg-ctime { grid-area: time; display: flex; flex-direction: column; min-width: 0; }
.v2-tg-ctime b { font-family: var(--v2-font-hud); font-size: 1.35rem; line-height: 1.1; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-tg-ctime small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-tg-delta { grid-area: delta; display: flex; flex-direction: column; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); min-width: 0; }
.v2-tg-delta b { font-family: var(--v2-font-hud); font-size: 0.9rem; }
.v2-tg-delta small { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-dbar { display: block; height: 0.375rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; }
.v2-tg-dbar i { display: block; height: 100%; }
.v2-tg-dbar i.is-ready { background: var(--v2-good); }
.v2-tg-dbar i.is-mid { background: var(--v2-glow); }
.v2-tg-dbar i.is-low { background: var(--v2-signal); }
.v2-tg-verdict { grid-area: verdict; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-tg-verdict b { font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink); }
.v2-tg-verdict .v2-rk-ic { width: 1rem; height: 1rem; color: var(--v2-brass); align-self: center; }
.v2-tg-verdict small { flex-basis: 100%; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-tg-verdict a { color: inherit; }
.v2-tg-verdict a:hover b { color: var(--v2-glow); }

.v2-tg-pbs th[scope="row"] { font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-ink); white-space: nowrap; }
.v2-tg-pbs th[scope="row"] small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-left: 0.3rem; }
.v2-tg-pbt { font-family: var(--v2-font-mono); font-variant-numeric: tabular-nums; color: var(--v2-ink); }
.v2-tg-pbn { color: var(--v2-ink-faint); }
/* Containing block for the cells' .v2-sr-only spans, so the scroll box clips them instead of the page widening (same as .v2-fs-wrap). */
.v2-tg-root .v2-table-wrap { position: relative; }
.v2-tg-detail { margin-top: 0.4rem; }
.v2-tg-detail > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-brass); }
.v2-tg-detail > summary::-webkit-details-marker { display: none; }
.v2-tg-detail[open] > summary .v2-rk-ic { transform: rotate(90deg); }

@media (max-width: 900px) {
  .v2-tg-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "orders" "main" "more"; }
  .v2-tg-side { margin-bottom: 0.4rem; }
  .v2-tg-lot { grid-template-columns: 2.5rem minmax(0, 1.5fr) 2.375rem minmax(0, 1fr) 5.25rem; grid-template-areas: "pic who cond runs act"; }
  .v2-tg-root.is-selecting .v2-tg-lot { grid-template-columns: 1.25rem 2.5rem minmax(0, 1.5fr) 2.375rem minmax(0, 1fr) 5.25rem; grid-template-areas: "pick pic who cond runs act"; }
  .v2-tg-last { display: none; }
  .v2-tg-mobsub { display: block; }
  .v2-tg-hhead { grid-template-columns: 8rem minmax(0, 1fr); }
  .v2-tg-gauges { grid-column: 1 / -1; padding: 0 1rem 1rem; justify-content: space-around; }
  .v2-tg-hgrid { grid-template-columns: minmax(0, 1fr); }
  .v2-tg-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-tg-clock { grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "date where where" "date time delta" "date verdict verdict"; }
}

@media (max-width: 640px) {
  .v2-tg-lot { grid-template-columns: 2.25rem minmax(0, 1fr) 2.375rem; grid-template-areas: "pic who cond" "pic runs act"; gap: 0.35rem 0.6rem; padding: 0.6rem; }
  .v2-tg-root.is-selecting .v2-tg-lot { grid-template-columns: 1.5rem 2.25rem minmax(0, 1fr) 2.375rem; grid-template-areas: "pick pic who cond" "pick pic runs act"; }
  .v2-tg-pick { align-self: center; }
  .v2-tg-root.is-selecting .v2-tg-pick { width: 1.375rem; height: 1.375rem; }
  .v2-tg-act { min-height: 2.75rem; min-width: 5.25rem; justify-self: end; }
  .v2-tg-runs { flex-direction: row; align-items: center; gap: 0.45rem; }
  /* The Work button (min 5.25rem) overhangs its 2.375rem column leftwards into "runs"; keep the run word clear of it (it wrapped under the button at Larger text). */
  .v2-tg-runs { padding-right: 2.9rem; flex-wrap: wrap; row-gap: 0.2rem; }
  .v2-tg-runword { white-space: normal; }
  .v2-tg-hooks a, .v2-tg-top li { min-height: 2.75rem; }
  .v2-tg-lotnav { gap: 0.4rem; }
  .v2-tg-lotnav a { min-height: 2.75rem; flex: 1 1 calc(50% - 0.4rem); justify-content: center; }
  .v2-tg-lotnav a.is-nextwork { flex-basis: 100%; margin-left: 0; order: 3; }
  .v2-tg-lotpos { flex-basis: 100%; order: -1; text-align: left; }
  .v2-tg-hhead { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.8rem; }
  .v2-tg-hhead .v2-yard-door { min-height: 6.5rem; }
  .v2-tg-hhead .v2-yard-door img { height: 4.5rem; }
  .v2-tg-hhead .v2-yard-plate { display: none; }
  .v2-tg-hname { font-size: 1.35rem; }
  .v2-tg-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; padding: 0 0.6rem 0.9rem; }
  .v2-tg-gauge { min-width: 0; }
  .v2-tg-gauge small { font-size: 0.5rem; letter-spacing: 0.03em; }
  .v2-yard-ring.v2-tg-ring-lg { width: 3.25rem; height: 3.25rem; }
  .v2-yard-ring.v2-tg-ring-lg span { width: 2.6rem; height: 2.6rem; font-size: 0.9rem; }
  .v2-tg-gnum { font-size: 1.25rem !important; }
  .v2-tg-ticket { padding: 1.1rem 0.8rem 0.9rem; }
  .v2-tg-venues { grid-template-columns: 1fr; }
  .v2-tg-opts { grid-template-columns: 1fr 1fr; }
  .v2-tg-opt { flex-direction: column; align-items: flex-start; }
  .v2-tg-preview { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.6rem; }
  .v2-tg-go { flex-direction: column; align-items: stretch; }
  .v2-tg-send { justify-content: center; }
  .v2-tg-clock { grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem 0.7rem; padding: 0.6rem 0.7rem; }
  .v2-tg-ctime b { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .v2-tg-detail > summary .v2-rk-ic { transition: transform 0.15s ease; }
  .v2-tg-result { animation: v2-tg-in 0.25s ease-out; }
  @keyframes v2-tg-in { from { opacity: 0; transform: translateY(0.25rem); } to { opacity: 1; transform: none; } }
}
/* ===== end Training (round 3) ===== */
/* ===== Morning work (round 3) ===== */
/* views/v2-stable-bulk-train.pug, v2-training-bulk-public.pug, v2-work-in-company.pug.
   SPEC-training-ops.md. Reuses .v2-st-aisle/.v2-st-ribbon/.v2-st-rb/.v2-st-meta/.v2-st-chev,
   .v2-st-lbar/.v2-st-ltrack, .v2-st-seg, .v2-st-ib, .v2-yard-hello/.v2-yard-stable and the kit.
   Never touches .v2-horse-row / .v2-roster. */
/* (The secondary <button class="v2-btn"> background fix this spec carried already ships, line ~671.) */

.v2-mw-root [hidden] { display: none !important; }
.v2-mw-root input[type="checkbox"], .v2-mw-root input[type="radio"] { accent-color: var(--v2-brass); width: 1.125rem; height: 1.125rem; margin: 0; }
.v2-mw-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.v2-mw-top .v2-yard-stable { margin-top: 0.15rem; }
.v2-mw-modes { align-self: flex-end; }
.v2-mw-modes a[aria-current="page"] { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-mw-modes .v2-rk-ic { width: 0.875rem; height: 0.875rem; }
.v2-mw-closed { margin-bottom: 1rem; }

.v2-mw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 1.4rem; align-items: start; }
.v2-mw-tools { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: flex-end; padding: 0.75rem 0.85rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; margin-bottom: 0.9rem; }
.v2-mw-find { flex: 1 1 11rem; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-mw-find .v2-input { width: 100%; min-width: 0; }
.v2-mw-f { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-mw-f > label, .v2-mw-find > label, .v2-mw-qlbl { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-mw-f .v2-select { min-width: 5.5rem; }
.v2-mw-quick { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.v2-mw-q { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.125rem; padding: 0.3rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 100px; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); cursor: pointer; white-space: nowrap; }
.v2-mw-q b { font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink); }
.v2-mw-q:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-mw-q[aria-pressed="true"] { border-color: var(--v2-brass); background: rgba(199,154,63,0.16); color: var(--v2-ink); }
.v2-mw-q.is-clear { background: transparent; color: var(--v2-ink-faint); }
.v2-mw-aisle { margin-bottom: 0.6rem; }
.v2-mw-aisle > .v2-st-ribbon { margin-bottom: 0.45rem; }
.v2-mw-aislepick { margin: 0 0 0.5rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.v2-mw-aislepick .v2-rk-ic { width: 0.875rem; height: 0.875rem; }
.v2-mw-aislepick[aria-pressed="true"] { background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-mw-list { list-style: none; margin: 0 0 0.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-mw-row { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 6.5rem 7.5rem 3.25rem 8.25rem 2rem; gap: 0.75rem; align-items: center; min-height: 3.125rem; padding: 0.45rem 0.8rem; border-top: 1px dashed var(--v2-line); font-size: 0.8rem; }
.v2-mw-list > .v2-mw-row:first-child { border-top: 0; }
.v2-mw-head { min-height: 2rem; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-mw-who { min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.v2-mw-who .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; }
.v2-mw-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 2.25rem; }
.v2-mw-sr { font-family: var(--v2-font-mono); font-size: 0.66rem; border: 1px solid; border-radius: 100px; padding: 0 0.35rem; margin-left: 0.35rem; flex: 0 0 auto; }
.v2-mw-row.is-picked { background: rgba(255,181,69,0.08); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-mw-row.is-off > :not(.v2-mw-view):not(.v2-mw-chip), .v2-mw-row.is-capped > :not(.v2-mw-view):not(.v2-mw-chip) { opacity: 0.5; }
.v2-mw-row.is-off .v2-mw-who { cursor: default; }
.v2-mw-skill { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.v2-mw-skbar { position: relative; flex: 1; height: 0.375rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); }
.v2-mw-sk { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px 0 0 4px; background: var(--v2-ink-soft); }
.v2-mw-pot { position: absolute; top: -0.2rem; bottom: -0.2rem; width: 2px; margin-left: -1px; background: var(--v2-ink-bright); }
.v2-mw-sktx { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-mw-sktx small { font-weight: 400; color: var(--v2-ink-faint); font-size: 0.66rem; }
.v2-mw-sktx b { color: var(--v2-glow); font-weight: 700; font-size: 0.66rem; }
.v2-mw-runs { display: inline-flex; gap: 0.25rem; }
.v2-mw-runs i { width: 0.625rem; height: 0.625rem; border-radius: 50%; border: 1.5px solid var(--v2-brass); }
.v2-mw-runs i.on { background: var(--v2-brass); }
.v2-mw-after { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.8rem; color: var(--v2-signal-bright); font-variant-numeric: tabular-nums; justify-self: end; }
.v2-mw-chip { justify-self: start; }
.v2-mw-view { justify-self: end; }
.v2-mw-match { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-dark); background: var(--v2-good); border-radius: 3px; padding: 0.05rem 0.35rem; margin-left: 0.4rem; flex: 0 0 auto; }

/* top: 4rem clears the sticky .v2-hud (~2.9rem tall); the spec had 1rem, which slid under it. */
.v2-mw-order { position: sticky; top: 4rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 1.15rem 1rem 1rem; }
.v2-mw-order::before { content: ""; position: absolute; top: -0.4375rem; left: 50%; transform: translateX(-50%); width: 4rem; height: 0.75rem; border-radius: 4px; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); }
.v2-mw-oh { margin: 0 0 0.8rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink); display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.v2-mw-oh small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-mw-otoggle { display: none; }
.v2-mw-fs { border: 0; padding: 0; margin: 0 0 0.85rem; min-width: 0; }
.v2-mw-fs legend, .v2-mw-lbl { display: block; padding: 0; margin-bottom: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-mw-surfs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.v2-mw-surf { position: relative; display: block; }
.v2-mw-surf input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.v2-mw-surf > span { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; padding: 0.45rem 0.5rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); min-height: 3.75rem; }
.v2-mw-surf .v2-rk-going { padding: 0.12rem 0.45rem; font-size: 0.66rem; border: 0; background: transparent; }
.v2-mw-surf .v2-rk-surface { font-size: 0.66rem; }
.v2-mw-surf input:checked + span { border-color: var(--v2-glow); background: rgba(255,181,69,0.1); box-shadow: inset 0 0 0 1px var(--v2-glow); }
.v2-mw-surf input:checked + span::after { content: "\2713  Selected"; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--v2-glow); }
.v2-mw-surf input:focus-visible + span { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-mw-dist { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }
.v2-mw-dist .v2-rk-oval { max-width: 13.5rem; margin: 0 auto; }
.v2-mw-dist .v2-select { width: 100%; min-width: 0; }
.v2-mw-track { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink); display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.85rem; }
.v2-mw-track .v2-rk-ic { color: var(--v2-brass); }
.v2-mw-going-out { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0; border-top: 1px dashed var(--v2-line); border-bottom: 1px dashed var(--v2-line); margin-bottom: 0.7rem; }
.v2-mw-n { font-family: var(--v2-font-hud); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-mw-nl { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); line-height: 1.3; }
.v2-mw-nl b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.9rem; color: var(--v2-ink); }
.v2-mw-faces { margin-left: auto; display: flex; align-items: center; }
.v2-mw-faces img { width: 1.75rem; height: 1.75rem; object-fit: contain; border-radius: 50%; background: var(--v2-surface-2); border: 1.5px solid var(--v2-surface); margin-left: -0.55rem; }
.v2-mw-faces span { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); margin-left: 0.3rem; }
.v2-mw-prev { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.8rem; margin: 0 0 0.75rem; font-size: 0.78rem; }
.v2-mw-prev dt { color: var(--v2-ink-soft); }
.v2-mw-prev dd { margin: 0; text-align: right; font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-mw-prev dd small { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mw-prev dd.is-up { color: var(--v2-good); }
.v2-mw-prev dd.is-down { color: var(--v2-signal-bright); }
.v2-mw-prev dd.is-money { color: var(--v2-glow); }
.v2-mw-note { font-size: 0.74rem; color: var(--v2-ink-soft); border-left: 3px solid var(--v2-glow); background: rgba(243,234,211,0.04); padding: 0.4rem 0.6rem; border-radius: 4px; margin: 0 0 0.6rem; }
.v2-mw-note b { color: var(--v2-ink); }
.v2-mw-note.is-warn { border-left-color: var(--v2-signal); }
.v2-mw-go { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; }
.v2-mw-fine { margin: 0.55rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); line-height: 1.5; }
.v2-mw-fine a { color: var(--v2-brass); }
.v2-mw-fine + .v2-mw-racts { margin-top: 0.6rem; }
.v2-mw-addon { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.78rem; color: var(--v2-ink-soft); margin: 0 0 0.7rem; }
.v2-mw-addon b { color: var(--v2-glow); font-family: var(--v2-font-mono); font-weight: 400; }
.v2-mw-confirm { border: 1px solid var(--v2-brass); background: var(--v2-surface-2); border-radius: 8px; padding: 0.7rem 0.75rem; margin-bottom: 0.6rem; }
.v2-mw-confirm p { margin: 0 0 0.55rem; font-size: 0.8rem; }
.v2-mw-confirm div { display: flex; gap: 0.4rem; }
.v2-mw-confirm .v2-btn { flex: 1; justify-content: center; display: inline-flex; min-height: 2.5rem; align-items: center; }
.v2-mw-report h3 { margin: 0 0 0.5rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; }
.v2-mw-tally { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 0.6rem; padding: 0; list-style: none; }
.v2-mw-tally li { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; padding: 0.25rem 0.6rem; border-radius: 100px; border: 1px solid var(--v2-line); color: var(--v2-ink-soft); }
.v2-mw-tally li b { font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-ink); }
.v2-mw-tally li.is-ok { border-color: rgba(95,200,145,0.45); }
.v2-mw-tally li.is-ok .v2-rk-ic { color: var(--v2-good); }
.v2-mw-tally li.is-skip { border-color: rgba(255,117,87,0.45); }
.v2-mw-tally li.is-skip .v2-rk-ic { color: var(--v2-signal-bright); }
.v2-mw-tally li.is-gain .v2-rk-ic { color: var(--v2-glow); }
.v2-mw-rlist { list-style: none; margin: 0 0 0.7rem; padding: 0; max-height: 20rem; overflow-y: auto; border-top: 1px dashed var(--v2-line); }
.v2-mw-rlist li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.4rem 0.1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-mw-rlist img { width: 1.75rem; height: 1.75rem; object-fit: contain; }
.v2-mw-rn { min-width: 0; display: flex; flex-direction: column; }
.v2-mw-rn b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-mw-rn small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mw-rn small em { font-style: normal; color: var(--v2-glow); }
.v2-mw-out { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; padding: 0.15rem 0.45rem; border-radius: 100px; white-space: nowrap; }
.v2-mw-out.is-ok { color: var(--v2-good); background: rgba(95,200,145,0.14); }
.v2-mw-out.is-skip { color: var(--v2-signal-bright); background: rgba(255,117,87,0.14); }
.v2-mw-out .v2-rk-ic { width: 0.8rem; height: 0.8rem; }
.v2-mw-racts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.v2-mw-racts .v2-btn { flex: 1 1 auto; justify-content: center; display: inline-flex; min-height: 2.5rem; align-items: center; }
.v2-mw-gate { list-style: none; margin: 0 0 0.7rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.v2-mw-stall { display: grid; grid-template-columns: 2.125rem minmax(0, 1fr) 2rem; gap: 0.55rem; align-items: center; min-height: 3rem; padding: 0.25rem 0.35rem 0.25rem 0.25rem; border: 1px solid var(--v2-line); border-radius: 8px; background: linear-gradient(90deg, rgba(199,154,63,0.1), transparent 60%); }
.v2-mw-stall.is-empty { border-style: dashed; background: transparent; }
.v2-mw-stall.is-empty .v2-rk-cloth { opacity: 0.45; }
.v2-mw-stall-n { min-width: 0; display: flex; flex-direction: column; }
.v2-mw-stall-n b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-mw-stall-n small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mw-stall.is-empty .v2-mw-stall-n { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mw-x { width: 2rem; height: 2rem; display: inline-grid; place-items: center; border: 1px solid var(--v2-line); border-radius: 6px; background: transparent; color: var(--v2-ink-soft); cursor: pointer; font-size: 1rem; line-height: 1; }
.v2-mw-x:hover { border-color: var(--v2-signal); color: var(--v2-signal-bright); }
/* Result chart for work in company: styled now, rendered once the WIC race step exists (§13 Q1). */
.v2-mw-chart { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin-bottom: 0.6rem; }
.v2-mw-chart caption { text-align: left; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); padding-bottom: 0.35rem; }
.v2-mw-chart th { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); text-align: left; padding: 0.2rem 0.3rem; }
.v2-mw-chart td { padding: 0.3rem; border-top: 1px dashed var(--v2-line); vertical-align: middle; }
.v2-mw-chart td.n { font-family: var(--v2-font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.v2-mw-chart .v2-rk-cloth { width: 1.6rem; height: 1.9rem; font-size: 0.82rem; }
.v2-mw-chart .pos { font-family: var(--v2-font-hud); font-weight: 700; color: var(--v2-glow); }

@media (max-width: 900px) {
  .v2-mw-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-mw-row { grid-template-columns: 1.5rem minmax(0, 1fr) 6rem 7rem 3.25rem 2rem; }
  .v2-mw-chip { display: none; }
  .v2-mw-order { position: sticky; top: auto; bottom: 0; z-index: 5; border-color: var(--v2-brass); box-shadow: 0 -10px 30px rgba(0,0,0,0.5); padding: 0.6rem 0.8rem; max-height: 75vh; overflow-y: auto; }
  .v2-mw-order::before { display: none; }
  .v2-mw-otoggle { display: flex; width: 100%; align-items: center; gap: 0.6rem; min-height: 2.75rem; background: transparent; border: 0; color: var(--v2-ink); padding: 0; cursor: pointer; font-family: var(--v2-font-mono); font-size: 0.72rem; text-align: left; }
  .v2-mw-otoggle b { font-family: var(--v2-font-hud); font-size: 1.25rem; color: var(--v2-glow); }
  .v2-mw-otoggle .v2-rk-ic:last-child { margin-left: auto; color: var(--v2-brass); transform: rotate(-90deg); }
  .v2-mw-otoggle[aria-expanded="true"] .v2-rk-ic:last-child { transform: rotate(90deg); }
  .v2-mw-order.is-collapsed .v2-mw-obody { display: none; }
  .v2-mw-order .v2-mw-oh { display: none; }
}
@media (max-width: 640px) {
  .v2-mw-tools { padding: 0.65rem; }
  .v2-mw-f { flex: 1 1 calc(33% - 0.6rem); }
  .v2-mw-f .v2-select { width: 100%; min-width: 0; }
  .v2-mw-quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; }
  .v2-mw-q { min-height: 2.5rem; }
  .v2-mw-head { display: none; }
  .v2-mw-row { grid-template-columns: 1.75rem minmax(0, 1fr) minmax(0, 1fr) 2.75rem; grid-template-areas: "pick who who view" "pick stam skill runs"; gap: 0.3rem 0.6rem; padding: 0.55rem 0.6rem; }
  .v2-mw-row > input { grid-area: pick; align-self: start; margin-top: 0.3rem; width: 1.375rem; height: 1.375rem; }
  .v2-mw-who { grid-area: who; }
  .v2-mw-row .v2-st-lbar { grid-area: stam; }
  .v2-mw-skill { grid-area: skill; }
  .v2-mw-runs, .v2-mw-after { grid-area: runs; justify-self: end; }
  .v2-mw-view { grid-area: view; }
  .v2-mw-view.v2-st-ib { width: 2.75rem; height: 2.75rem; }
  .v2-mw-sub { padding-left: 0; white-space: normal; }
  /* Two half-width cells: drop the skill bar, keep its numbers, so Large/Larger text can't collide. */
  /* v2-theme's Stable 640px block sets .v2-st-lbar { width: 5.75rem } (unscoped); undo it here. */
  .v2-mw-row .v2-st-lbar { width: auto; grid-area: stam; }
  .v2-mw-row .v2-st-lbar, .v2-mw-skill { min-width: 0; }
  .v2-mw-skbar { display: none; }
  /* Let the SR chip drop under a long name instead of ellipsing the name to "Bri..." (found at Larger text). */
  .v2-mw-who .v2-name-with-image { flex-wrap: wrap; row-gap: 0.15rem; }
  .v2-mw-who .v2-name { white-space: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: no-preference) {
  .v2-mw-otoggle .v2-rk-ic:last-child { transition: transform 0.15s ease; }
}
/* ===== end Morning work (round 3) ===== */
/* ===== My Races (round 3) ===== */
/* v2-my-upcoming-races.pug + v2-my-recent-races.pug, "Race Diary" (SPEC-my-races.md).
   Prefix .v2-mr-*. Reuses, untouched: .v2-yard-ranks/-rank (Home badges), .v2-raceticket +
   .v2-rh-next (Race Day next-off ticket), .v2-postgroup, .v2-rh-mini/-what/-top/-nm/-meta/
   -fieldrow/-end/-purse, .v2-rh-reveal, .v2-status-flag (+ .short), .v2-rc-who/-name/-sub/
   -odds/-pos/-time/-sr/-earn, .v2-medal-1/2/3, the race kit, .v2-countdown, .v2-cross-link. */

/* Page root (wraps both templates' content). The shared pager does not wrap; at Larger text
   seven page links overflow a 375px screen. Same local fix as .v2-st-root (Stable roster). */
.v2-mr-page .v2-pager .v2-pages { flex-wrap: wrap; }

/* Header: title + Home's rank badges, then the Upcoming / Results switch */
.v2-mr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.v2-mr-eyebrow { margin: 0; font-family: var(--v2-font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-mr-title { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.5rem; color: var(--v2-ink); }
.v2-mr-bar { display: flex; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.v2-mr-switch { display: inline-flex; padding: 0.2rem; border: 1px solid var(--v2-line); border-radius: 100px; background: var(--v2-surface); }
.v2-mr-switch a { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 100px; font-family: var(--v2-font-hud); font-size: 0.9rem; letter-spacing: 0; color: var(--v2-ink-soft); }
.v2-mr-switch a:hover { color: var(--v2-ink-bright); }
.v2-mr-switch a[aria-current='page'] { background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-mr-switch small { font-family: var(--v2-font-mono); font-size: 0.66rem; opacity: 0.85; }

/* Filters: today's v2FilterBar, folded into a disclosure */
.v2-mr-filter { margin-left: auto; }
.v2-mr-filter > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid var(--v2-line); border-radius: 8px; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-mr-filter > summary::-webkit-details-marker { display: none; }
.v2-mr-filter > summary:hover { color: var(--v2-glow); border-color: var(--v2-brass); }
.v2-mr-filter > summary b { color: var(--v2-ink-dark); background: var(--v2-brass); border-radius: 9px; padding: 0 0.4rem; font-weight: 700; }
.v2-mr-filter[open] { flex-basis: 100%; }
.v2-mr-filter[open] > summary { margin-bottom: 0.6rem; }

/* Diary: day -> post-time slot -> race cards */
.v2-mr-day { scroll-margin-top: 1rem; }
.v2-mr-day > h2.v2-postgroup { font-weight: 400; }
.v2-mr-day > h2.v2-postgroup small { font-size: 0.66rem; color: var(--v2-ink-faint); letter-spacing: 0.04em; }
.v2-mr-slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.v2-mr-slot { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.9rem; align-items: start; }
.v2-mr-slot-time { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.7rem 0.3rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(180deg, rgba(255,181,69,0.12), rgba(255,181,69,0.03)); text-align: center; }
.v2-mr-slot-time > b { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.25rem; line-height: 1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-mr-slot-time .v2-countdown { font-size: 0.95rem; text-shadow: none; }
.v2-mr-slot-time .v2-countdown small { margin-top: 0.15rem; font-size: 0.66rem; }
.v2-mr-slot-time > small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--v2-ink-faint); }
.v2-mr-slot-cards { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }

.v2-mr-card { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-mr-card-head { display: grid; grid-template-columns: 4.875rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; padding: 0.65rem 1rem; background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); border-bottom: 2px solid var(--v2-brass); }
.v2-mr-card-head .v2-rh-nm a:hover { color: var(--v2-glow); }
.v2-mr-track { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); white-space: nowrap; }
.v2-mr-ran { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* Your runners in the race (upcoming) */
.v2-mr-runners { list-style: none; margin: 0; padding: 0; }
.v2-mr-runner { display: grid; grid-template-columns: 2.125rem 2.75rem minmax(0, 1fr) 3.75rem auto; gap: 0.75rem; align-items: center; padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-mr-runner:last-child { border-bottom: none; }
.v2-mr-runner .v2-rk-cloth { width: 1.875rem; height: 2.25rem; font-size: 0.95rem; }
.v2-mr-acts { display: flex; gap: 0.4rem; justify-content: flex-end; flex-wrap: wrap; }
.v2-mr-acts .v2-btn { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; }
/* .v2-btn sets no background, so a <button> gets the UA's white fill (same on v2-enter-race's Scratch).
   Page-scoped (covers Scratch and the filter bar's Apply); :where() keeps .v2-btn:hover winning. */
.v2-mr-page :where(button.v2-btn:not(.v2-btn-primary)) { background: transparent; }
.v2-mr-acts button.v2-btn-danger:hover { background: rgba(255,90,54,0.14); }
.v2-mr-locked { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); display: inline-flex; align-items: center; gap: 0.3rem; }

/* Your runners' results (recent): pos | post | portrait | who | margin | time | SR | earned */
.v2-mr-runner.is-result { grid-template-columns: 3.25rem 2.125rem 2.75rem minmax(0, 1fr) 10rem 4.5rem 2.75rem 4.5rem; gap: 0.7rem; }
.v2-mr-margin { font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-ink-soft); line-height: 1.25; }
.v2-mr-margin b { display: block; font-weight: 400; color: var(--v2-ink-bright); }
.v2-mr-runner.is-won .v2-mr-margin b { color: var(--v2-glow); }
.v2-mr-won { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-glow); }

/* Mini wire: one lane, the whole field as dots, yours as portraits (decorative; the lines
   above carry the same facts as text). x = 0..100, 100 = the wire. */
.v2-mr-wire { margin: 0; padding: 0.55rem 1rem 0.7rem; border-top: 1px dashed var(--v2-line); }
.v2-mr-wire-lane { position: relative; height: 2.25rem; margin-right: 0.75rem; border-radius: 6px; background: repeating-linear-gradient(100deg, #2d5a38 0 26px, var(--v2-turf) 26px 52px); }
.v2-mr-wire-lane::after { content: ""; position: absolute; top: 0; bottom: 0; right: -0.5625rem; width: 0.375rem; background: repeating-linear-gradient(180deg, #fff8ea 0 4px, #1a1408 4px 8px); }
.v2-mr-wire-dot { position: absolute; top: 50%; left: calc(var(--x) * (100% - 0.625rem) / 100); width: 0.625rem; height: 0.625rem; margin-top: -0.3125rem; border-radius: 50%; background: rgba(243,234,211,0.55); border: 1px solid rgba(8,20,13,0.8); }
.v2-mr-wire-dot.is-win { background: var(--v2-ink-bright); box-shadow: 0 0 6px rgba(255,248,234,0.8); }
.v2-mr-wire-me { position: absolute; top: 0.25rem; left: calc(var(--x) * (100% - 1.75rem) / 100); width: 1.75rem; height: 1.75rem; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(8,20,13,0.9); border: 2px solid var(--v2-glow); box-shadow: 0 0 6px rgba(255,181,69,0.6); font-family: var(--v2-font-hud); font-size: 0.7rem; color: var(--v2-ink); z-index: 1; }
.v2-mr-wire-me img { width: 100%; height: auto; }
.v2-mr-wire-key { display: flex; justify-content: space-between; gap: 0.6rem; margin: 0.3rem 0.75rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

.v2-mr-card-foot { display: flex; align-items: center; gap: 0.4rem 1rem; flex-wrap: wrap; padding: 0.35rem 1rem; border-top: 1px dashed var(--v2-line); background: rgba(0,0,0,0.12); }
.v2-mr-card-foot .v2-cross-link { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.75rem; }
.v2-mr-card-foot .v2-btn { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.25rem; margin-left: auto; }

/* Spoiler: results hidden until "Show my results" is ticked. Baseline (no :has()) = shown. */
.v2-mr-results .v2-rh-reveal { display: none; }
.v2-mr-q { display: none; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); border: 1px dashed var(--v2-line); border-radius: 4px; padding: 0.15rem 0.45rem; justify-self: start; white-space: nowrap; }
@supports selector(:has(*)) {
  .v2-mr-results .v2-rh-reveal { display: inline-flex; }
  .v2-mr-results:not(:has(.v2-rh-reveal input:checked)) :is(.v2-mr-spoil, .v2-mr-wire) { display: none; }
  .v2-mr-results:not(:has(.v2-rh-reveal input:checked)) .v2-mr-q { display: inline-block; }
  .v2-mr-results:not(:has(.v2-rh-reveal input:checked)) .v2-mr-runner.is-result { grid-template-columns: 3.25rem 2.125rem 2.75rem minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .v2-mr-results:has(.v2-rh-reveal input:checked) .v2-mr-wire-me { animation: v2-rc-wire-in 600ms ease-out both; }
}

@media (max-width: 900px) {
  .v2-mr-slot { grid-template-columns: 4.875rem minmax(0, 1fr); gap: 0.7rem; }
  .v2-mr-runner.is-result { grid-template-columns: 3.25rem 2.125rem minmax(0, 1fr) 8.5rem 4.25rem 2.5rem 4.25rem; }
  .v2-mr-runner.is-result .v2-rk-portrait { display: none; }
  .v2-mr-results:not(:has(.v2-rh-reveal input:checked)) .v2-mr-runner.is-result { grid-template-columns: 3.25rem 2.125rem minmax(0, 1fr) auto; }
}
@media (max-width: 640px) {
  .v2-mr-title { font-size: 1.2rem; }
  .v2-mr-switch { width: 100%; }
  .v2-mr-switch a { flex: 1 1 0; justify-content: center; padding: 0 0.6rem; }
  .v2-mr-filter { margin-left: 0; width: 100%; }
  .v2-mr-filter > summary { width: 100%; justify-content: center; }
  .v2-mr-slot { grid-template-columns: 1fr; gap: 0.4rem; }
  .v2-mr-slot-time { flex-direction: row; justify-content: flex-start; gap: 0.7rem; padding: 0.45rem 0.8rem; }
  .v2-mr-slot-time .v2-countdown small { display: inline; margin-left: 0.3rem; }
  .v2-mr-card-head { grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: 0.55rem; padding: 0.6rem 0.7rem; }
  .v2-mr-runner { grid-template-columns: 2.125rem 2.5rem minmax(0, 1fr) auto; gap: 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-mr-runner .v2-rk-portrait { width: 2.5rem; height: 2.5rem; }
  .v2-mr-runner .v2-mr-acts { grid-column: 1 / -1; justify-content: stretch; }
  .v2-mr-runner .v2-mr-acts .v2-btn { flex: 1 1 0; justify-content: center; min-height: 2.75rem; }
  .v2-mr-runner.is-result,
  .v2-mr-results:not(:has(.v2-rh-reveal input:checked)) .v2-mr-runner.is-result { grid-template-columns: 2.75rem minmax(0, 1fr) auto; grid-template-areas: "pos who time" "pos margin earn"; row-gap: 0.15rem; }
  .v2-mr-runner.is-result .v2-rc-pos { grid-area: pos; }
  .v2-mr-runner.is-result .v2-rk-cloth, .v2-mr-runner.is-result .v2-rk-portrait, .v2-mr-runner.is-result .v2-rc-sr { display: none; }
  .v2-mr-runner.is-result .v2-rc-who { grid-area: who; }
  .v2-mr-runner.is-result .v2-rc-time { grid-area: time; }
  .v2-mr-runner.is-result .v2-mr-margin { grid-area: margin; }
  .v2-mr-runner.is-result .v2-rc-earn { grid-area: earn; }
  .v2-mr-runner.is-result .v2-mr-q { grid-area: margin; }
  .v2-mr-wire { padding: 0.5rem 0.7rem 0.6rem; }
  .v2-mr-card-foot { padding: 0.3rem 0.7rem 0.6rem; }
  .v2-mr-card-foot .v2-btn { margin-left: 0; flex: 1 1 100%; justify-content: center; min-height: 2.75rem; }
}
/* ===== end My Races (round 3) ===== */
/* ===== Race lists (round 3) ===== */
/* v2-upcoming-races.pug, v2-recent-races.pug, v2-results-feed.pug (SPEC-race-lists.md).
   Prefix .v2-rl-*. Reuses the Racing hub board unchanged: .v2-rh-days/.v2-rh-day,
   .v2-rh-links, .v2-rh-dayblock, .v2-postgroup, .v2-rh-meets, .v2-rh-meet(-head/-name/-sub),
   .v2-rh-badge, .v2-rh-trackcard, .v2-rh-lines, .v2-rh-race and its children,
   .v2-rh-reveal, .v2-rh-wc-pending, plus the race kit and .v2-status-flag. */

/* Sub-nav shared by the three pages */
.v2-rl-tabs { display: flex; flex-wrap: wrap; gap: 0 0.15rem; margin: 0 0 1.1rem; border-bottom: 1px solid var(--v2-line); }
.v2-rl-tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.85rem; margin-bottom: -1px; border-bottom: 3px solid transparent; font-family: var(--v2-font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-soft); }
.v2-rl-tabs a:hover { color: var(--v2-ink); }
.v2-rl-tabs a[aria-current="page"] { color: var(--v2-ink-bright); font-weight: 700; border-bottom-color: var(--v2-brass); }
.v2-rl-tabs a:focus-visible { outline-offset: -3px; }

/* Masthead: title + honest tally (whole-list totals vs "this page" are labelled) */
.v2-rl-mast { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-bottom: 1rem; }
.v2-rl-eyebrow { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-rl-title { margin: 0.1rem 0 0; font-family: var(--v2-font-serif); font-size: 1.6rem; line-height: 1.15; color: var(--v2-ink-bright); }
.v2-rl-tally { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.1rem; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rl-tally b { font-family: var(--v2-font-hud); font-size: 1.1rem; font-weight: 700; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-rl-tally .is-purse b { color: var(--v2-glow); }

/* Condition book (the filter form) */
.v2-rl-book { margin-bottom: 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-rl-book-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); color: var(--v2-brass); }
.v2-rl-book-head .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-rl-book-h { margin: 0; font-family: var(--v2-font-mono); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-rl-book-head small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rl-book-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(10.5rem, 100%), 1fr)); gap: 0.9rem 1.1rem; align-items: start; padding: 0.9rem 1rem; }
.v2-rl-fs { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.v2-rl-fs legend, .v2-rl-fs > label { padding: 0; margin-bottom: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rl-fs > label { margin-bottom: 0; }
.v2-rl-fs .v2-select, .v2-rl-fs .v2-input { width: 100%; min-width: 0; min-height: 2.75rem; }
.v2-rl-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.v2-rl-chip { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0 0.75rem 0 0.6rem; border: 1px solid var(--v2-line); border-radius: 100px; background: var(--v2-surface-2); font-size: 0.8rem; color: var(--v2-ink-soft); cursor: pointer; }
.v2-rl-chip input { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--v2-brass); }
.v2-rl-chip.is-pill { padding-right: 0.35rem; }
.v2-rl-chip.is-pill .v2-rk-surface { font-size: 0.66rem; padding: 0.16rem 0.55rem 0.16rem 0.2rem; }
.v2-rl-chip:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-rl-chip:has(input:checked) { border-color: var(--v2-brass); background: rgba(199,154,63,0.14); color: var(--v2-ink-bright); }
.v2-rl-chip:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-rl-book-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-top: 1px dashed var(--v2-line); }
.v2-rl-book-foot .v2-btn { display: inline-flex; align-items: center; min-height: 2.75rem; }
.v2-rl-active { flex: 1 1 16rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rl-active a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2rem; padding: 0 0.6rem; border: 1px solid var(--v2-brass); border-radius: 100px; font-size: 0.68rem; color: var(--v2-ink); }
.v2-rl-active a:hover { color: var(--v2-glow); }
.v2-rl-active a span { font-size: 0.9rem; line-height: 1; }

/* Day strip: the hub's day chips, plus a selected state (word "showing" + glow rule) */
.v2-rl-days .v2-rh-day { min-height: 2.75rem; }
.v2-rl-days .v2-rh-day[aria-current="page"] { border-color: var(--v2-glow); box-shadow: inset 0 -3px 0 var(--v2-glow); background: var(--v2-surface-2); }
.v2-rl-days .v2-rh-day[aria-current="page"] small { color: var(--v2-ink-soft); }
.v2-rl-datejump { display: flex; align-items: flex-end; gap: 0.4rem; flex-wrap: wrap; }
.v2-rl-datejump label { width: 100%; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rl-datejump .v2-input { min-width: 0; min-height: 2.75rem; }
.v2-rl-datejump .v2-btn { min-height: 2.75rem; }

/* Wider meeting cards than the hub: lines here carry a second action */
.v2-rl-meets { grid-template-columns: repeat(auto-fill, minmax(min(30rem, 100%), 1fr)); }

/* A board line that carries a second action (Enter / Replay) beside the race link */
.v2-rl-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.v2-rl-line > .v2-rh-race { min-width: 0; }
.v2-rl-line:has(> .v2-rh-race.is-mine) { background: rgba(255,181,69,0.06); }
.v2-rl-enter { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.75rem; margin-right: 1rem; }
.v2-rl-enter .v2-rk-ic { width: 0.9rem; height: 0.9rem; }
.v2-rl-token { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-soft); border: 1px dashed var(--v2-line); border-radius: 100px; padding: 0.12rem 0.5rem; }

/* Result inside a board line */
.v2-rl-res, .v2-rl-res-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; min-width: 0; }
.v2-rl-res .v2-rk-portrait, .v2-rl-res-hidden .v2-rk-portrait { width: 2rem; height: 2rem; font-size: 0.85rem; }
.v2-rl-res-nm { min-width: 0; display: flex; flex-direction: column; }
.v2-rl-res-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink-bright); }
.v2-rl-res-nm small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }
.v2-rl-res-hidden { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rl-board-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; }
.v2-rl-board-bar .v2-rh-reveal { margin-bottom: 0.2rem; }

/* Results-by-day race (one per line in a meeting card) */
.v2-rl-feed { margin-top: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(30rem, 100%), 1fr)); }
.v2-rl-fr { display: grid; grid-template-columns: 4.875rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: start; padding: 0.75rem 1rem; }
.v2-rl-fr-oval { margin-top: 0.15rem; }
.v2-rl-fr-body { min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.v2-rl-fr-race { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; min-height: 1.75rem; font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); }
.v2-rl-fr-race:hover span { color: var(--v2-glow); }
.v2-rl-fr-race .v2-rk-grade { width: 1.5rem; height: 1.5rem; font-size: 0.6rem; }
.v2-rl-fr-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.v2-rl-fr-end .v2-status-flag { font-size: 0.66rem; padding: 0.22rem 0.55rem; }
.v2-rl-fr-end .v2-btn { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; white-space: nowrap; }
.v2-rl-podium { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.55rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 8px; background: #0f2218; }
/* wrap: at 375px with Larger text the name column was squeezed to one character */
.v2-rl-place { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; margin: 0; }
.v2-rl-pos { flex: 0 0 2.1rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-brass); }
.v2-rl-place .v2-rk-cloth { width: 1.6rem; height: 1.9rem; font-size: 0.85rem; }
.v2-rl-place .v2-rk-portrait { width: 2.25rem; height: 2.25rem; }
.v2-rl-place-nm { min-width: 0; flex: 1 1 7rem; display: flex; flex-direction: column; }
.v2-rl-place-nm a { font-family: var(--v2-font-display); font-size: 1rem; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-rl-place-nm a:hover { color: var(--v2-glow); }
.v2-rl-place-nm small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rl-place.is-2 .v2-rl-place-nm a { font-size: 0.86rem; color: var(--v2-ink); }
.v2-rl-call { margin: 0.2rem 0 0; padding: 0.45rem 0 0; border-top: 1px dashed var(--v2-line); }
.v2-rl-call-lbl { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.15rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-rl-call-lbl .v2-rk-ic { width: 0.8rem; height: 0.8rem; }
.v2-rl-call blockquote { margin: 0; }
.v2-rl-call p { margin: 0; font-family: var(--v2-font-display); font-style: italic; font-size: 0.88rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-rl-podium-hidden { display: none; align-items: center; gap: 0.5rem; margin: 0; padding: 0.5rem 0.6rem; border: 1px dashed var(--v2-line); border-radius: 8px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rl-podium-hidden .v2-rk-portrait { width: 2rem; height: 2rem; font-size: 0.85rem; }

/* Pager: the shared .v2-pages row never wraps and overflows at 375px with Larger text */
.v2-rl-pager .v2-pages { flex-wrap: wrap; }
.v2-rl-pager .v2-pages a, .v2-rl-pager .v2-pages span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; }

/* Spoiler gate (same contract as the hub's Winner's circle, SPEC-racing-m.md §8):
   no :has() support = everything shown and the toggle hidden. */
.v2-rl-spoil-hidden { display: none; }
@supports selector(:has(*)) {
  .v2-rl-board:not(:has(.v2-rh-reveal input:checked)) .v2-rl-spoil { display: none; }
  .v2-rl-board:not(:has(.v2-rh-reveal input:checked)) .v2-rl-spoil-hidden { display: flex; }
  /* the YOURS rail would give away a winner, so it is gated too */
  .v2-rl-board:not(:has(.v2-rh-reveal input:checked)) .v2-rh-race.is-mine { background: transparent; box-shadow: none; }
  .v2-rl-board:not(:has(.v2-rh-reveal input:checked)) .v2-rh-race.is-mine:hover { background: rgba(199,154,63,0.06); }
  .v2-rl-board:not(:has(.v2-rh-reveal input:checked)) .v2-rl-line:has(> .v2-rh-race.is-mine) { background: transparent; }
}

@media (max-width: 900px) {
  .v2-rl-feed { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .v2-rl-tabs a { padding: 0 0.55rem; font-size: 0.66rem; letter-spacing: 0.05em; }
  .v2-rl-title { font-size: 1.25rem; }
  .v2-rl-book-body { grid-template-columns: 1fr 1fr; padding: 0.8rem 0.7rem; }
  .v2-rl-book-body > fieldset { grid-column: 1 / -1; }
  .v2-rl-book-foot { padding: 0.6rem 0.7rem; }
  .v2-rl-book-foot .v2-btn { flex: 1 1 40%; justify-content: center; }
  .v2-rl-line { grid-template-columns: 1fr; }
  .v2-rl-enter { justify-self: end; margin: -0.35rem 0.7rem 0.55rem 0; }
  .v2-rl-fr { grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0.55rem; padding: 0.7rem; }
  .v2-rl-fr-end { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
  .v2-rl-days .v2-rh-day { flex: 1 1 calc(33.33% - 0.6rem); }
  .v2-rl-datejump { width: 100%; }
  .v2-rl-datejump .v2-input { flex: 1 1 auto; }
}
/* ===== end Race lists (round 3) ===== */
/* ===== Mail (round 3) =====
   The Stable Office: /mail, /mail/message/:id, /mail/compose, /mail/block. See SPEC-mail.md.
   Reused unchanged: .v2-yard-top/-hello/-stable/-ranks/-rank, .v2-rk-ic, .v2-section-label, .v2-rc-h,
   .v2-name-with-image/.v2-horse-color/.v2-name, .v2-btn(-primary/-sm/-danger/-muted), .v2-alert,
   .v2-form-row/-label/-input/-hint, .v2-form-textarea, .v2-empty, .v2-eyebrow, .v2-sr-only.
   New classes are all .v2-ml-*. Status colours: --v2-glow = "needs you", nothing else. Unread is
   brass + the word NEW, never colour alone. */

/* Buttons rendered as <button> inherit the UA grey background; .v2-btn never set one. Scoped here. */
.v2-ml button.v2-btn { background: transparent; font: inherit; font-family: var(--v2-font-mono); font-size: 0.75rem; }
.v2-ml button.v2-btn.v2-btn-primary, .v2-ml a.v2-btn.v2-btn-primary { background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-ml button.v2-btn.v2-btn-primary:hover, .v2-ml a.v2-btn.v2-btn-primary:hover { background: var(--v2-glow); color: var(--v2-ink-dark); }
.v2-ml a.v2-btn { color: var(--v2-brass); }
.v2-ml a.v2-btn.v2-btn-danger, .v2-ml button.v2-btn.v2-btn-danger { color: var(--v2-signal-bright); }
.v2-ml .v2-btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; }
.v2-ml .v2-btn .v2-rk-ic { width: 1rem; height: 1rem; }

/* ---------- Office layout: pigeonhole rail + day's post ---------- */
.v2-ml-office { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-ml-rail { position: sticky; top: 4.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.v2-ml-holes { list-style: none; margin: 0; padding: 0.5rem; display: grid; gap: 0.35rem; background: repeating-linear-gradient(90deg, #2a2016 0 22px, #241b12 22px 23px), #2a2016; border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-ml-hole { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; min-height: 2.75rem; padding: 0.4rem 0.6rem; border-radius: 6px; background: rgba(11, 26, 18, 0.82); border: 1px solid transparent; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.35); }
.v2-ml-hole:hover { border-color: var(--v2-line); }
.v2-ml-hole[aria-current='page'] { border-color: var(--v2-brass); background: var(--v2-surface-2); }
.v2-ml-hole .v2-rk-ic { width: 1.25rem; height: 1.25rem; color: var(--v2-brass); justify-self: center; }
.v2-ml-hole-t { min-width: 0; display: flex; flex-direction: column; }
.v2-ml-hole-t b { font-weight: 400; font-size: 0.85rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-ml-hole-t small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ml-hole-n { min-width: 1.5rem; padding: 0 0.35rem; height: 1.25rem; border-radius: 0.625rem; font-family: var(--v2-font-hud); font-size: 0.72rem; line-height: 1.25rem; text-align: center; background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-ml-hole-n.is-zero { background: transparent; color: var(--v2-ink-faint); border: 1px solid var(--v2-line); }
.v2-ml-railacts { display: grid; gap: 0.45rem; }
.v2-ml-railacts .v2-btn { justify-content: center; }

/* Toolbar: Unread/All switch + clear-out actions */
.v2-ml-tools { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.v2-ml-seg { display: inline-flex; border: 1px solid var(--v2-line); border-radius: 6px; overflow: hidden; }
.v2-ml-seg a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.85rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-ml-seg a + a { border-left: 1px solid var(--v2-line); }
.v2-ml-seg a[aria-current='page'] { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-ml-clear { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.v2-ml-clear form { margin: 0; }

/* Day groups (the original's date sub-headers, inbox.aspx.cs:95-134) */
.v2-ml-day + .v2-ml-day { margin-top: 1.1rem; }
.v2-ml-dayhead { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.4rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-ml-dayhead::after { content: ""; flex: 1; border-top: 1px dashed var(--v2-line); }
.v2-ml-list { list-style: none; margin: 0; padding: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; }
.v2-ml-list > li + li { border-top: 1px dashed var(--v2-line); }

/* One letter. 6 direct children: pick, seal, open, ref, go, time. */
.v2-ml-item { position: relative; display: grid; grid-template-columns: 1.75rem 2.25rem minmax(0, 1fr) minmax(0, 12rem) 8.5rem 3.25rem; grid-template-areas: "pick seal open ref go time"; gap: 0.7rem; align-items: center; padding: 0.6rem 0.9rem 0.6rem 0.7rem; min-height: 3.5rem; border-left: 3px solid transparent; }
.v2-ml-item:hover { background: rgba(199, 154, 63, 0.05); }
.v2-ml-item.is-unread { border-left-color: var(--v2-brass); background: rgba(199, 154, 63, 0.06); }
.v2-ml-pick { grid-area: pick; display: grid; place-items: center; min-width: 1.75rem; min-height: 2.75rem; cursor: pointer; }
.v2-ml-pick input { width: 1.05rem; height: 1.05rem; accent-color: var(--v2-brass); margin: 0; }
.v2-ml-seal { grid-area: seal; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--v2-line); color: var(--v2-brass); background: var(--v2-bg); }
.v2-ml-seal .v2-rk-ic { width: 1.1rem; height: 1.1rem; }
.v2-ml-item.is-player .v2-ml-seal { border-color: var(--v2-brass); background: rgba(199, 154, 63, 0.14); }
.v2-ml-open { grid-area: open; min-width: 0; display: flex; flex-direction: column; gap: 0.05rem; }
.v2-ml-open::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.v2-ml-pick, .v2-ml-ref, .v2-ml-go { position: relative; z-index: 1; }
.v2-ml-meta { display: flex; align-items: center; gap: 0.45rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ml-meta b { font-weight: 400; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-ml-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-ml-new { flex-shrink: 0; font-family: var(--v2-font-hud); font-size: 0.66rem; letter-spacing: 0.06em; padding: 0 0.35rem; border-radius: 3px; background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-ml-due { flex-shrink: 0; font-family: var(--v2-font-hud); font-size: 0.66rem; letter-spacing: 0.06em; padding: 0 0.35rem; border-radius: 3px; border: 1px solid var(--v2-glow); color: var(--v2-glow); }
.v2-ml-subj { font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-ml-item.is-unread .v2-ml-subj { font-weight: 700; color: var(--v2-ink-bright); }
.v2-ml-snip { font-size: 0.74rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-ml-ref { grid-area: ref; min-width: 0; font-size: 0.8rem; color: var(--v2-ink); }
.v2-ml-ref .v2-name { font-family: var(--v2-font-display); }
.v2-ml-ref.is-race { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-ml-ref.is-race .v2-rk-ic { width: 1rem; height: 1rem; color: var(--v2-brass); }
.v2-ml-go { grid-area: go; justify-self: end; display: inline-flex; align-items: center; min-height: 2.75rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-brass); white-space: nowrap; }
.v2-ml-go:hover { color: var(--v2-glow); }
.v2-ml-go.is-due { color: var(--v2-glow); }
/* .v2-app a { color: inherit } (0,1,1) outranks the single-class rules above for the link form. */
.v2-ml a.v2-ml-go { color: var(--v2-brass); }
.v2-ml a.v2-ml-go:hover, .v2-ml a.v2-ml-go.is-due { color: var(--v2-glow); }
.v2-ml-time { grid-area: time; justify-self: end; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; }

/* Bundle: 3+ consecutive same-desk, same-category notices on one day collapse into one row. */
.v2-ml-bundle > details > summary { list-style: none; cursor: pointer; }
.v2-ml-bundle > details > summary::-webkit-details-marker { display: none; }
.v2-ml-bundle .v2-ml-item.is-sum { grid-template-areas: "pick seal open open go time"; }
.v2-ml-stack { position: relative; }
.v2-ml-stack::before, .v2-ml-stack::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--v2-line); background: var(--v2-bg); }
.v2-ml-stack::before { transform: translate(3px, -3px); }
.v2-ml-stack::after { transform: translate(6px, -6px); }
.v2-ml-stack .v2-rk-ic { position: relative; z-index: 1; }
.v2-ml-stack-n { position: absolute; z-index: 2; top: -0.45rem; right: -0.65rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.25rem; border-radius: 0.6rem; font-family: var(--v2-font-hud); font-size: 0.68rem; line-height: 1.15rem; text-align: center; background: var(--v2-surface-2); color: var(--v2-ink); border: 1px solid var(--v2-brass); }
.v2-ml-chev { display: inline-flex; width: 1rem; height: 1rem; margin-left: 0.3rem; transition: transform 0.15s ease; }
.v2-ml-chev .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-ml-bundle details[open] .v2-ml-chev { transform: rotate(90deg); }
.v2-ml-bundle details > ol { list-style: none; margin: 0; padding: 0 0 0.3rem 2.6rem; border-top: 1px dashed var(--v2-line); background: rgba(0, 0, 0, 0.12); }
.v2-ml-bundle details > ol > li + li { border-top: 1px dashed rgba(199, 154, 63, 0.16); }
.v2-ml-bundle details > ol .v2-ml-item { grid-template-columns: 1.75rem minmax(0, 1fr) minmax(0, 12rem) 8.5rem 3.25rem; grid-template-areas: "pick open ref go time"; min-height: 3rem; }
.v2-ml-bundle details > ol .v2-ml-seal { display: none; }

.v2-ml-pager { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 1rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-faint); }
.v2-ml-bulkbar { position: sticky; bottom: 0.75rem; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; padding: 0.55rem 0.8rem; background: var(--v2-surface-2); border: 1px solid var(--v2-brass); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink); }
.v2-ml-bulkbar[hidden] { display: none; }
.v2-ml-bulkbar div { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ---------- The letter (/mail/message/:id) ---------- */
.v2-ml-lnav { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 0.8rem; }
.v2-ml-lnav a { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.75rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-ml-lnav a[aria-disabled='true'] { color: var(--v2-ink-faint); pointer-events: none; }
.v2-ml-lnav .v2-rk-ic { width: 0.9rem; height: 0.9rem; }
.v2-ml-lnav .is-back .v2-rk-ic, .v2-ml-lnav .is-prev { transform: rotate(180deg); }
.v2-ml-lnav div { display: flex; gap: 1rem; }
.v2-ml-letter { max-width: 46rem; margin: 0 auto; background: linear-gradient(180deg, rgba(243, 234, 211, 0.04), rgba(243, 234, 211, 0) 8rem), var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); }
/* Letterhead rule: a short brass bar inside the padding (no thick top border on a rounded card). */
.v2-ml-letter::before, .v2-ml-paper::before { content: ""; display: block; width: 3rem; height: 2px; background: var(--v2-brass); }
.v2-ml-letter::before { margin: 1.1rem 0 0 1.5rem; }
.v2-ml-paper::before { margin: 0 0 1rem; }
.v2-ml-lhead { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 0.9rem 1.5rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-ml-lhead .v2-ml-seal, .v2-ml-who .v2-ml-seal { grid-area: auto; }
.v2-ml-lhead .v2-ml-seal { width: 3.5rem; height: 3.5rem; border: 2px solid var(--v2-brass); background: radial-gradient(circle at 35% 30%, rgba(199, 154, 63, 0.35), rgba(199, 154, 63, 0.08)); }
.v2-ml-lhead .v2-ml-seal .v2-rk-ic { width: 1.6rem; height: 1.6rem; }
.v2-ml-lhead .v2-eyebrow { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-ml-ltitle { margin: 0.15rem 0 0.35rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.45rem; line-height: 1.25; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-ml-lmeta { margin: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-faint); }
.v2-ml-lmeta div { display: flex; gap: 0.35rem; }
.v2-ml-lmeta dt { color: var(--v2-ink-faint); }
.v2-ml-lmeta dd { margin: 0; color: var(--v2-ink-soft); }
.v2-ml-lmeta a { color: var(--v2-brass); text-decoration: underline; text-underline-offset: 2px; }
.v2-ml-lbody { padding: 1.3rem 1.5rem; font-family: var(--v2-font-display); font-size: 1.02rem; line-height: 1.7; color: var(--v2-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-ml-lbody a { color: var(--v2-glow); text-decoration: underline; text-underline-offset: 2px; }
.v2-ml-refs { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.5rem 1.2rem; }
.v2-ml-refs > a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.3rem 0.8rem 0.3rem 0.4rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-bg); font-size: 0.82rem; color: var(--v2-ink); }
.v2-ml-refs > a:hover { border-color: var(--v2-brass); }
.v2-ml-refs > a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.v2-ml-refs small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ml-refs .is-race .v2-rk-ic { width: 1.4rem; height: 1.4rem; color: var(--v2-brass); margin-left: 0.3rem; }
.v2-ml-lacts { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 1rem 1.5rem 1.3rem; border-top: 1px dashed var(--v2-line); background: rgba(0, 0, 0, 0.14); border-radius: 0 0 10px 10px; }
.v2-ml-lacts form { margin: 0; }
.v2-ml-lacts .v2-ml-spacer { flex: 1; }
.v2-ml-note { margin: 0.8rem auto 0; max-width: 46rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); text-align: center; }

/* ---------- Writing desk (/mail/compose) ---------- */
.v2-ml-deskgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 1.4rem; align-items: start; }
.v2-ml-paper { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 1.2rem 1.4rem; }
.v2-ml-paper .v2-form-label { display: flex; justify-content: space-between; gap: 0.5rem; }
.v2-ml-paper .v2-form-input, .v2-ml-paper .v2-form-textarea { width: 100%; max-width: none; min-height: 2.75rem; font-size: 1rem; }
.v2-ml-paper .v2-form-textarea { min-height: 11rem; font-family: var(--v2-font-display); line-height: 1.6; background-image: repeating-linear-gradient(180deg, transparent 0 1.55rem, rgba(199, 154, 63, 0.12) 1.55rem 1.6rem); background-attachment: local; }
.v2-ml-count { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.v2-ml-count.is-near { color: var(--v2-glow); }
.v2-ml-sendrow { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.v2-ml-quote { margin: 0; padding: 0.2rem 0 0.2rem 1rem; border-left: 2px solid var(--v2-line); }
.v2-ml-quote h2 { margin: 0 0 0.4rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-ml-quote p { margin: 0 0 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-ml-quote blockquote { margin: 0.5rem 0 0; font-family: var(--v2-font-display); font-size: 0.9rem; line-height: 1.6; color: var(--v2-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-ml-tips { margin: 0; padding: 0.9rem 1rem; border: 1px dashed var(--v2-line); border-radius: 8px; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-ml-tips h2 { margin: 0 0 0.4rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-ml-tips ul { margin: 0; padding-left: 1rem; }

/* ---------- Refused senders (/mail/block) ---------- */
.v2-ml-blockgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-ml-find { display: flex; gap: 0.5rem; }
.v2-ml-find .v2-form-input { flex: 1; min-width: 0; max-width: none; min-height: 2.75rem; }
.v2-ml-who { list-style: none; margin: 0; padding: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; }
.v2-ml-who > li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.55rem 0.9rem; min-height: 3.5rem; }
.v2-ml-who > li + li { border-top: 1px dashed var(--v2-line); }
.v2-ml-who form { margin: 0; }
.v2-ml-who-t { min-width: 0; display: flex; flex-direction: column; }
.v2-ml-who-t a, .v2-ml-who-t b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-ml-who-t small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-ml-who .v2-ml-seal .v2-rk-ic { width: 1.1rem; height: 1.1rem; }
.v2-ml-who.is-refused .v2-ml-seal { color: var(--v2-signal-bright); border-color: rgba(255, 117, 87, 0.45); }

@media (max-width: 900px) {
  .v2-ml-office { grid-template-columns: minmax(0, 1fr); }
  .v2-ml-rail { position: static; }
  .v2-ml-holes { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
  .v2-ml-railacts { grid-template-columns: 1fr 1fr; }
  .v2-ml-item { grid-template-columns: 1.75rem 2.25rem minmax(0, 1fr) auto 3.25rem; grid-template-areas: "pick seal open go time" ". . ref ref ref"; row-gap: 0.15rem; }
  .v2-ml-ref:empty { display: none; }
  .v2-ml-bundle details > ol .v2-ml-item { grid-template-columns: 1.75rem minmax(0, 1fr) auto 3.25rem; grid-template-areas: "pick open go time" ". ref ref ref"; }
  .v2-ml-deskgrid, .v2-ml-blockgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .v2-ml-holes { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); padding: 0.4rem; gap: 0.3rem; }
  .v2-ml-hole { grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0.4rem; padding: 0.35rem 0.45rem; }
  .v2-ml-hole-t small { display: none; }
  .v2-ml-hole-t b { white-space: normal; font-size: 0.8rem; line-height: 1.2; }
  .v2-ml-item { grid-template-columns: 1.75rem 2rem minmax(0, 1fr) 3rem; grid-template-areas: "pick seal open time" ". . ref ref" ". . go go"; gap: 0.15rem 0.55rem; padding: 0.55rem 0.6rem 0.55rem 0.4rem; }
  .v2-ml-seal { width: 2rem; height: 2rem; }
  .v2-ml-go { justify-self: start; min-height: 2.75rem; }
  .v2-ml-snip { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .v2-ml-bundle .v2-ml-item.is-sum { grid-template-areas: "pick seal open time" ". . go go"; }
  .v2-ml-bundle details > ol { padding-left: 0.6rem; }
  .v2-ml-bundle details > ol .v2-ml-item { grid-template-columns: 1.75rem minmax(0, 1fr) 3rem; grid-template-areas: "pick open time" ". ref ref" ". go go"; }
  .v2-ml-tools { flex-direction: column; align-items: stretch; }
  .v2-ml-seg { align-self: flex-start; }
  .v2-ml-letter::before { margin: 0.9rem 0 0 1rem; }
  .v2-ml-lhead { grid-template-columns: 2.75rem minmax(0, 1fr); padding: 0.75rem 1rem 1rem; gap: 0.75rem; }
  .v2-ml-lhead .v2-ml-seal { width: 2.75rem; height: 2.75rem; }
  .v2-ml-ltitle { font-size: 1.2rem; }
  .v2-ml-lbody { padding: 1rem; font-size: 0.98rem; }
  .v2-ml-refs { padding: 0 1rem 1rem; }
  .v2-ml-lacts { padding: 0.9rem 1rem 1rem; }
  .v2-ml-lacts .v2-ml-spacer { display: none; }
  .v2-ml-lacts > * { flex: 1 1 calc(50% - 0.5rem); }
  .v2-ml-lacts > * .v2-btn, .v2-ml-lacts > .v2-btn { width: 100%; justify-content: center; }
  .v2-ml-paper { padding: 1rem; }
  .v2-ml-sendrow .v2-btn { flex: 1 1 auto; justify-content: center; }
  .v2-ml-who > li { grid-template-columns: 2rem minmax(0, 1fr) auto; padding: 0.5rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-ml-chev { transition: none; }
}
/* ===== end Mail (round 3) ===== */

/* ===== Account office (round 3) ===== */
/* The Stable Office: views/v2-account-home.pug + views/v2-account-prefs.pug +
   views/components/v2-office-kit.pug (SPEC-account.md). Every rule for those pages lives
   between this banner and the end banner.
   Reused unchanged: .v2-yard-top/-hello/-stable, .v2-rk-ic, .v2-section-label, .v2-rc-h,
   .v2-btn(-primary), .v2-status-chip, .v2-sr-only, .v2-form-hint, the :focus-visible block. */

.v2-app {
  /* Material tokens: token coins. NOT status colours. */
  --v2-coin-bronze: #c98a52;
  --v2-coin-silver: #c9ccd1;
  --v2-coin-gold: #e2b64a;
  --v2-coin-plat: #a9c9d2;
  --v2-coin-diamond: #bfe6ff;
  --v2-coin-horse: #c79a3f;
  --v2-coin-rare: #d9a3ff;
}

/* .v2-btn sets display:inline-block, which beats the UA [hidden] rule. */
.v2-of-root [hidden] { display: none !important; }
.v2-of-root :where(button.v2-btn:not(.v2-btn-primary)) { background: transparent; }
.v2-of-root .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }

/* ---- header ---- */
.v2-of-sub { margin: 0.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-of-sub span { display: inline-flex; align-items: center; gap: 0.3rem; }
.v2-of-sub .v2-rk-ic { color: var(--v2-brass); }
.v2-of-back { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.75rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); }
.v2-of-back .v2-rk-ic { transform: rotate(180deg); }
.v2-of-back:hover { color: var(--v2-glow); }

/* ---- the desk: three cards ---- */
.v2-of-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.v2-of-card { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.v2-of-h { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink); }
.v2-of-h .v2-rk-ic { color: var(--v2-brass); width: 1.25rem; height: 1.25rem; }
.v2-of-eyebrow { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }

/* ---- colours & crest (identity) ---- */
.v2-of-crest-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.v2-of-crest { position: relative; width: 6.5rem; height: 6.5rem; border-radius: 8px; border: 2px solid var(--v2-brass); background: radial-gradient(circle at 50% 35%, var(--v2-surface-2), var(--v2-bg)); padding: 0.3rem; }
.v2-of-crest img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.v2-of-crest .v2-yard-plate { bottom: -0.6875rem; }
.v2-of-silks { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.v2-of-silk { width: 4.5rem; height: 4.5rem; flex: 0 0 auto; }
.v2-of-silk .v2-of-silk-body, .v2-of-silk .v2-of-silk-cap { stroke: rgba(0,0,0,0.55); stroke-width: 1.2; stroke-linejoin: round; }
.v2-of-silk .v2-of-silk-shade { fill: rgba(0,0,0,0.18); }
.v2-of-silk-t { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.v2-of-silk-t b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink); }
.v2-of-silk-t small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-of-hex { display: inline-flex; align-items: center; gap: 0.25rem; }
.v2-of-hex i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; border: 1px solid rgba(243,234,211,0.5); }

.v2-of-facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 0.9rem; font-size: 0.84rem; }
.v2-of-facts dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); padding-top: 0.15rem; }
.v2-of-facts dd { margin: 0; color: var(--v2-ink); min-width: 0; overflow-wrap: anywhere; }
.v2-of-facts dd small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-facts dd a { color: var(--v2-glow); }
.v2-of-facts dd a:hover { text-decoration: underline; }

/* card link list (chevron rows) */
.v2-of-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--v2-line); }
.v2-of-links li + li { border-top: 1px dashed var(--v2-line); }
.v2-of-links a { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; padding: 0.35rem 0.1rem; font-size: 0.85rem; color: var(--v2-ink); }
.v2-of-links a > span { flex: 1; min-width: 0; }
.v2-of-links a small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-links .v2-rk-ic { color: var(--v2-brass); }
.v2-of-links .v2-rk-ic:last-child { color: var(--v2-ink-faint); }
.v2-of-links a:hover { color: var(--v2-glow); }
.v2-of-links a:hover .v2-rk-ic:last-child { color: var(--v2-glow); }
.v2-of-links a:focus-visible { outline-offset: -2px; }

/* ---- strongbox (money + tokens) ---- */
.v2-of-box { background: linear-gradient(180deg, var(--v2-surface-2), var(--v2-surface) 55%); border-color: rgba(199,154,63,0.55); }
.v2-of-purse { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0.8rem; padding: 0.8rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 8px; background: rgba(11,26,18,0.55); }
.v2-of-fig { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.v2-of-fig small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-of-fig b { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.85rem; line-height: 1.05; color: var(--v2-glow); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v2-of-fig.is-bonus b { font-size: 1.35rem; color: var(--v2-ink); }
.v2-of-fig em { font-style: normal; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.v2-of-acts .v2-btn { flex: 1 1 8rem; }

.v2-of-eyebrow + .v2-of-tray { margin-top: -0.5rem; }
.v2-of-tray { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); gap: 0.6rem 0.4rem; }
.v2-of-coin { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; min-width: 0; }
.v2-of-disc { --metal: var(--v2-coin-horse); position: relative; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.55), var(--metal) 45%, rgba(0,0,0,0.45) 100%); border: 2px solid var(--metal); box-shadow: inset 0 0 0 3px rgba(0,0,0,0.22); font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink-dark); font-variant-numeric: tabular-nums; }
.v2-of-coin.is-zero .v2-of-disc { background: transparent; border-style: dashed; box-shadow: none; color: var(--v2-ink-faint); }
.v2-of-coin small { font-family: var(--v2-font-mono); font-size: 0.66rem; line-height: 1.25; color: var(--v2-ink-soft); }
.v2-of-coin a { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-glow); text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; min-height: 1.5rem; }
.v2-of-coin.m-horse .v2-of-disc { --metal: var(--v2-coin-horse); }
.v2-of-coin.m-rare .v2-of-disc { --metal: var(--v2-coin-rare); }
.v2-of-coin.m-bronze .v2-of-disc { --metal: var(--v2-coin-bronze); }
.v2-of-coin.m-silver .v2-of-disc { --metal: var(--v2-coin-silver); }
.v2-of-coin.m-gold .v2-of-disc { --metal: var(--v2-coin-gold); }
.v2-of-coin.m-plat .v2-of-disc { --metal: var(--v2-coin-plat); }
.v2-of-coin.m-diamond .v2-of-disc { --metal: var(--v2-coin-diamond); border-radius: 0.5rem; transform: rotate(45deg); }
.v2-of-coin.m-diamond .v2-of-disc > span { transform: rotate(-45deg); }

/* recent ledger */
.v2-of-ledger-h { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.v2-of-ledger-h a { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); display: inline-flex; align-items: center; min-height: 2.75rem; }
.v2-of-ledger-h a:hover { color: var(--v2-glow); }
.v2-of-ledger { list-style: none; margin: -0.6rem 0 0; padding: 0; }
.v2-of-ledger li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: baseline; padding: 0.45rem 0; border-top: 1px dashed var(--v2-line); }
.v2-of-ledger time { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-of-ledger .v2-of-tx { min-width: 0; font-size: 0.8rem; color: var(--v2-ink); }
.v2-of-ledger .v2-of-tx small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-of-amt { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--v2-ink-soft); }
.v2-of-amt.is-in { color: var(--v2-glow); }
.v2-of-amt.is-nil { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-none { margin: 0; font-size: 0.8rem; color: var(--v2-ink-faint); }

/* ---- membership pass ---- */
.v2-of-pass { position: relative; border-radius: 10px; padding: 0.9rem 1rem 1rem; background: linear-gradient(135deg, #2a2112 0%, #3a2c14 45%, #241b0e 100%); border: 1px solid var(--v2-brass); box-shadow: inset 0 0 0 3px rgba(199,154,63,0.12); display: flex; flex-direction: column; gap: 0.55rem; overflow: hidden; }
.v2-of-pass::after { content: ""; position: absolute; right: -2.5rem; top: -2.5rem; width: 7rem; height: 7rem; border-radius: 50%; border: 2px solid rgba(199,154,63,0.25); pointer-events: none; }
.v2-of-pass-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.v2-of-pass-lvl { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; color: var(--v2-ink-bright); }
.v2-of-pass-price { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); white-space: nowrap; }
.v2-of-cap { display: flex; flex-direction: column; gap: 0.3rem; }
.v2-of-cap-t { display: flex; justify-content: space-between; gap: 0.5rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-of-cap-t b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-of-bar { height: 0.5rem; border-radius: 0.25rem; background: rgba(243,234,211,0.12); overflow: hidden; }
.v2-of-bar i { display: block; height: 100%; width: calc(var(--p) * 1%); background: var(--v2-brass); border-radius: inherit; }
.v2-of-pass.is-near .v2-of-bar i { background: var(--v2-glow); }
.v2-of-pass.is-full .v2-of-bar i { background: var(--v2-signal); }
.v2-of-renew { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-of-renew .v2-rk-ic { color: var(--v2-brass); }
.v2-of-flag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.45rem; border-radius: 100px; border: 1px solid currentColor; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; white-space: nowrap; }
.v2-of-flag.is-warn { color: var(--v2-glow); }
.v2-of-flag.is-alert { color: var(--v2-signal-bright); }
.v2-of-pass.is-none { background: var(--v2-surface-2); border-style: dashed; box-shadow: none; }
.v2-of-pass.is-none .v2-of-pass-lvl { font-size: 1.2rem; color: var(--v2-ink-soft); }

/* ---- pigeonholes (records & settings) ---- */
.v2-of-holes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.7rem; }
.v2-of-hole { position: relative; height: 100%; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; min-height: 4rem; padding: 0.7rem 0.9rem; background: linear-gradient(180deg, var(--v2-surface-2), var(--v2-surface)); border: 1px solid var(--v2-line); border-radius: 8px; box-shadow: inset 0 0.25rem 0.5rem rgba(0,0,0,0.25); color: var(--v2-ink); }
.v2-of-hole:hover { border-color: var(--v2-brass); }
.v2-of-hole:hover b { color: var(--v2-glow); }
.v2-of-hi { position: relative; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--v2-line); color: var(--v2-brass); background: rgba(11,26,18,0.5); }
.v2-of-hi .v2-rk-ic { width: 1.2rem; height: 1.2rem; }
.v2-of-hi .v2-of-n { position: absolute; top: -0.35rem; right: -0.45rem; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; border-radius: 0.625rem; display: grid; place-items: center; background: var(--v2-brass); color: var(--v2-ink-dark); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; }
.v2-of-ht { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-of-ht b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; line-height: 1.2; }
.v2-of-ht small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-of-hole > .v2-rk-ic { color: var(--v2-ink-faint); }
.v2-of-hole.is-due .v2-of-hi { border-color: var(--v2-glow); color: var(--v2-glow); }
.v2-of-hole.is-due .v2-of-hi .v2-of-n { background: var(--v2-glow); }
.v2-of-hole.is-due .v2-of-ht small { color: var(--v2-glow); }
.v2-of-hole.is-alert .v2-of-hi { border-color: rgba(255,117,87,0.6); color: var(--v2-signal-bright); }
.v2-of-hole.is-alert .v2-of-ht small { color: var(--v2-signal-bright); }
.v2-of-hole:focus-visible { outline-offset: 2px; }

/* ================= Preferences ================= */
.v2-of-prefs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 1rem; align-items: start; }

/* scope tag: which kind of setting this card holds. Icon + words, never colour alone. */
.v2-of-scope { margin: 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; border: 1px solid var(--v2-line); color: var(--v2-ink-soft); background: rgba(11,26,18,0.5); }
.v2-of-scope .v2-rk-ic { color: var(--v2-brass); }
.v2-of-scope b { color: var(--v2-ink); font-weight: 700; }
.v2-of-device { border-style: dashed; }
.v2-of-lede { margin: -0.4rem 0 0; font-size: 0.8rem; color: var(--v2-ink-soft); }

/* text size: three tiles */
.v2-of-sizes { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.v2-of-size { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.2rem; min-height: 6rem; padding: 0.6rem 0.3rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-bg); cursor: pointer; text-align: center; }
.v2-of-size input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-of-aa { font-family: var(--v2-font-display); line-height: 1; color: var(--v2-ink-soft); }
.v2-of-size.s-standard .v2-of-aa { font-size: 1.5rem; }
.v2-of-size.s-large .v2-of-aa { font-size: 1.6875rem; }
.v2-of-size.s-larger .v2-of-aa { font-size: 1.875rem; }
.v2-of-size b { font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 400; color: var(--v2-ink); }
.v2-of-size small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-size:hover { border-color: var(--v2-brass); }
.v2-of-size:has(input:checked) { border: 2px solid var(--v2-brass); background: rgba(199,154,63,0.12); }
.v2-of-size:has(input:checked) .v2-of-aa { color: var(--v2-ink-bright); }
.v2-of-size:has(input:checked)::after { content: "✓"; position: absolute; top: 0.3rem; right: 0.4rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--v2-brass); color: var(--v2-ink-dark); font-size: 0.65rem; font-weight: 700; }
.v2-of-size:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-of-live { margin: 0; display: flex; align-items: center; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); min-height: 1.25rem; }
.v2-of-live .v2-rk-ic { color: var(--v2-brass); }

/* stable preferences: grouped switches */
.v2-of-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.v2-of-group + .v2-of-group { border-top: 1px solid var(--v2-line); padding-top: 0.8rem; }
.v2-of-group legend { float: left; width: 100%; padding: 0; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-of-group legend + * { clear: both; }
.v2-of-group legend .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-of-field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.4rem 0; }
.v2-of-field-t { display: block; font-size: 0.86rem; color: var(--v2-ink); }
.v2-of-field-s { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--v2-brass); border-radius: 6px; overflow: hidden; }
.v2-of-seg label { position: relative; display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.4rem; font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-brass); cursor: pointer; font-variant-numeric: tabular-nums; }
.v2-of-seg label + label { border-left: 1px solid var(--v2-line); }
.v2-of-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-of-seg label:has(input:checked) { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-of-seg label:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: -3px; }

.v2-of-toggle { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; min-height: 2.75rem; padding: 0.35rem 0; cursor: pointer; }
.v2-of-toggle + .v2-of-toggle { border-top: 1px dashed var(--v2-line); }
.v2-of-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-of-toggle:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 3px; border-radius: 6px; }
.v2-of-sw { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.v2-of-sw i { display: block; position: relative; width: 2.625rem; height: 1.5rem; border-radius: 0.75rem; border: 1px solid var(--v2-ink-faint); }
.v2-of-sw i::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--v2-ink-faint); transition: transform 150ms; }
.v2-of-sw em { font-style: normal; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-of-sw em::before { content: "Off"; }
.v2-of-toggle:has(input:checked) .v2-of-sw i { background: var(--v2-brass); border-color: var(--v2-brass); }
.v2-of-toggle:has(input:checked) .v2-of-sw i::after { background: var(--v2-ink-dark); transform: translateX(1.125rem); }
.v2-of-toggle:has(input:checked) .v2-of-sw em { color: var(--v2-ink); }
.v2-of-toggle:has(input:checked) .v2-of-sw em::before { content: "On"; }

.v2-of-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0 -1.1rem -1.1rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--v2-line); border-radius: 0 0 10px 10px; background: var(--v2-surface-2); }
.v2-of-state { margin: 0; display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-of-state::before { content: "✓"; color: var(--v2-good); }
.v2-of-state.is-dirty { color: var(--v2-glow); }
.v2-of-state.is-dirty::before { content: "●"; color: var(--v2-glow); }
.v2-of-state.is-error { color: var(--v2-signal-bright); }
.v2-of-state.is-error::before { content: "!"; color: var(--v2-signal-bright); font-weight: 700; }
.v2-of-state.is-busy::before { content: "…"; color: var(--v2-ink-soft); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .v2-of-desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v2-of-box { grid-column: 1 / -1; order: -1; }
  .v2-of-prefs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .v2-of-desk { grid-template-columns: minmax(0, 1fr); }
  .v2-of-card { padding: 0.9rem 0.9rem 1rem; }
  .v2-of-savebar { margin: 0 -0.9rem -1rem; padding: 0.7rem 0.9rem; }
  .v2-of-purse { grid-template-columns: minmax(0, 1fr); }
  .v2-of-fig b { font-size: 1.6rem; }
  .v2-of-crest-row { grid-template-columns: 5rem minmax(0, 1fr); gap: 0.8rem; }
  .v2-of-crest { width: 5rem; height: 5rem; }
  .v2-of-silk { width: 3.5rem; height: 3.5rem; }
  .v2-of-holes { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .v2-of-hole { min-height: 3.5rem; }
  .v2-of-savebar .v2-btn { flex: 1 1 100%; }
  .v2-of-field { flex-direction: column; align-items: stretch; }
  .v2-of-seg { width: 100%; }
  .v2-of-seg label { flex: 1 1 0; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-of-sw i::after { transition: none; }
}
/* ===== end Account office (round 3) ===== */
/* ===== Stable profile (round 3) ===== */
/* v2-profile-stable*.pug + components/v2-stable-profile.pug: "Colours & Honours Board".
   See SPEC-stable-profile.md. Reuses .v2-yard-grid/-ranks/-rank/-stalls/-stall/-door/-plate/-body/
   -name/-tag/-act/-clip/-order/-oi/-ot/-ol/-os/-og/-trophies/-trophy, .v2-lb-ranks/-switch/-rosette/
   -bar/-honour, .v2-bk-kv/-eyebrow, .v2-rk-portrait/-tag/-ic/-mine/-surface, .v2-status-chip.retired/
   .deceased, .v2-section-label .v2-rc-h. Never touches .v2-horse-row / .v2-ranked-row. */

/* -- masthead: colours panel | identity | visitor clipboard -- */
.v2-sp-mast { --sp-silk: #c79a3f; --sp-cap: #222222; position: relative; display: grid; grid-template-columns: 10rem minmax(0, 1fr) minmax(0, 17.5rem); gap: 1.4rem; align-items: stretch; border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); padding: 0.375rem 1.2rem 0 0; margin-bottom: 0.9rem; }
/* The colours ribbon: silk | cap, decorative (the silks figure carries the same colours, and nothing reads from it). */
.v2-sp-mast::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 0.375rem; background: linear-gradient(90deg, var(--sp-silk) 0 72%, var(--sp-cap) 72% 100%); }
.v2-sp-colours { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem 0.6rem 1.4rem; background: repeating-linear-gradient(90deg, #2a2016 0 22px, #241b12 22px 23px), #2a2016; border-right: 2px solid var(--v2-brass); }
.v2-sp-silks { width: 7.5rem; height: 7.5rem; display: block; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55)); }
.v2-sp-silks .sp-body, .v2-sp-silks .sp-sleeve { fill: var(--sp-silk); stroke: rgba(243, 234, 211, 0.85); stroke-width: 1.5; stroke-linejoin: round; }
.v2-sp-silks .sp-capdome, .v2-sp-silks .sp-peak { fill: var(--sp-cap); stroke: rgba(243, 234, 211, 0.85); stroke-width: 1.5; stroke-linejoin: round; }
.v2-sp-silks .sp-pat { fill: var(--sp-cap); stroke: none; }
.v2-sp-silks .sp-pat-line { fill: none; stroke: var(--sp-cap); stroke-width: 4; }
.v2-sp-silks .sp-pat-line.is-thin { stroke-width: 2; }
.v2-sp-silks .sp-shine { fill: rgba(255, 255, 255, 0.12); stroke: none; }
.v2-sp-colours .v2-yard-plate { bottom: 0.45rem; }
.v2-sp-id { min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; padding: 1.1rem 0 1rem; }
.v2-sp-idrow { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.v2-sp-badge { width: 4.25rem; height: 4.25rem; flex: 0 0 auto; border-radius: 8px; border: 2px solid rgba(199, 154, 63, 0.6); overflow: hidden; background: var(--v2-surface-2); }
.v2-sp-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-sp-name { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-sp-name .v2-rk-mine { font-size: 0.66rem; }
.v2-sp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sp-level { display: inline-flex; align-items: center; gap: 0.4rem; }
.v2-sp-level b { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; color: var(--v2-ink-dark); background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); padding: 0.12rem 0.5rem; border-radius: 3px; }
.v2-sp-id .v2-bk-kv { margin: 0.3rem 0 0; }
.v2-sp-act { display: flex; flex-direction: column; justify-content: center; padding: 1.2rem 0 1rem; min-width: 0; }
.v2-sp-act .v2-yard-order { padding: 0.55rem 0.8rem; }
.v2-sp-act .v2-yard-os { white-space: normal; }

/* -- compact masthead on the four sub-tabs -- */
.v2-sp-mast.is-compact { grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: center; }
.v2-sp-mast.is-compact .v2-sp-colours { padding: 0.6rem 0.4rem 0.9rem; align-self: stretch; }
.v2-sp-mast.is-compact .v2-sp-silks { width: 4rem; height: 4rem; }
.v2-sp-mast.is-compact .v2-sp-id { padding: 0.8rem 0; gap: 0.3rem; }
.v2-sp-mast.is-compact .v2-sp-name { font-size: 1.45rem; }
.v2-sp-mast.is-compact .v2-sp-badge { width: 3rem; height: 3rem; }
.v2-sp-quick { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; padding: 0.8rem 0; }
.v2-sp-quick .v2-btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; }

/* -- section tabs: links, aria-current marks the page; selected = tint + 3px underline + bold -- */
.v2-sp-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--v2-line); margin: 0 0 1.2rem; }
.v2-sp-tab { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.4rem 1rem; font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-ink-soft); border-radius: 8px 8px 0 0; }
.v2-sp-tab small { font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sp-tab:hover { color: var(--v2-ink); background: rgba(199, 154, 63, 0.06); }
.v2-sp-tab[aria-current="page"] { color: var(--v2-ink-bright); font-weight: 700; background: linear-gradient(180deg, rgba(199, 154, 63, 0.05), rgba(199, 154, 63, 0.18)); box-shadow: inset 0 -3px 0 var(--v2-brass); }
.v2-sp-tab:focus-visible { outline-offset: -3px; }

/* -- honours board -- */
.v2-sp-board { position: relative; border: 2px solid var(--v2-brass); border-radius: 10px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35)), repeating-linear-gradient(180deg, #2a2016 0 28px, #261d13 28px 29px), #2a2016; padding: 1.5rem 1rem 1rem; box-shadow: inset 0 0 0 4px rgba(26, 20, 8, 0.6); }
.v2-sp-board-plate { position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%); margin: 0; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); color: var(--v2-ink-dark); font-family: var(--v2-font-display); font-weight: 400; font-size: 0.82rem; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.15rem 1rem; border-radius: 3px; white-space: nowrap; }
.v2-sp-honours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.2rem 0.8rem; }
.v2-sp-honour { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; padding: 0.55rem 0.3rem; border-bottom: 1px dashed rgba(199, 154, 63, 0.3); min-width: 0; }
.v2-sp-honour img { width: 1.125rem; height: auto; justify-self: center; }
.v2-sp-honour .v2-rk-ic { width: 1.375rem; height: 1.375rem; justify-self: center; color: var(--v2-brass); }
.v2-sp-honour span { font-family: var(--v2-font-display); font-size: 0.92rem; color: var(--v2-ink); min-width: 0; overflow-wrap: anywhere; }
.v2-sp-honour b { font-family: var(--v2-font-hud); font-size: 1.5rem; line-height: 1; color: #f2cf7a; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
/* A zero is printed as "none yet": the word carries it, the fade is extra. */
.v2-sp-honour.is-none b { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; color: var(--v2-ink-faint); text-shadow: none; }
.v2-sp-honour.is-none img, .v2-sp-honour.is-none .v2-rk-ic { opacity: 0.45; }
.v2-sp-agewins { width: 100%; margin-top: 0.8rem; border-collapse: collapse; font-family: var(--v2-font-mono); font-size: 0.72rem; }
.v2-sp-agewins caption { text-align: left; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); padding-bottom: 0.3rem; }
.v2-sp-agewins th, .v2-sp-agewins td { padding: 0.3rem 0.5rem; text-align: right; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-sp-agewins thead th { font-size: 0.66rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sp-agewins tbody th { text-align: left; font-weight: 400; color: var(--v2-ink-soft); }
.v2-sp-agewins tbody tr + tr { border-top: 1px dashed rgba(199, 154, 63, 0.3); }

/* -- major wins: Home's trophy shelf; the class tag sits under the race name -- */
.v2-sp-trophies { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.v2-sp-trophies .v2-rk-tag { display: inline-block; margin: 0.2rem 0 0.15rem; font-size: 0.66rem; }

/* -- stars of the stable: Home's stall cards, plus honour flags -- */
.v2-sp-group { margin: 0.2rem 0 0.5rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-sp-group + .v2-yard-stalls { margin-bottom: 0.9rem; }
.v2-yard-stalls.v2-sp-stalls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-sp-flags { display: flex; flex-wrap: wrap; gap: 0.25rem; min-height: 1.1rem; }
.v2-sp-bred { margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-sp-bred a { color: var(--v2-brass); }
.v2-sp-bred a:hover { color: var(--v2-glow); }
.v2-sp-bred b { color: var(--v2-ink); font-weight: 600; }

/* -- side: recent form pips -- */
.v2-sp-form { list-style: none; margin: 0; padding: 0.8rem 0.9rem; display: flex; flex-wrap: wrap; gap: 0.6rem 0.45rem; align-items: center; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-sp-pos { display: inline-grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: 50%; border: 1px dashed var(--v2-line); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-sp-form-cap { width: 100%; display: flex; justify-content: space-between; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* -- side: medal rack (achievements). Earned = filled medal + "Earned" word; not yet = outline + "Not yet". -- */
.v2-sp-medals { list-style: none; margin: 0; padding: 0.2rem 0.4rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.5rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-sp-medal { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.5rem; align-items: center; padding: 0.45rem 0.3rem; border-bottom: 1px dashed var(--v2-line); }
.v2-sp-medal:nth-last-child(-n+2) { border-bottom: none; }
.v2-sp-disc { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--v2-line); color: var(--v2-ink-faint); }
.v2-sp-disc .v2-rk-ic { width: 0.85rem; height: 0.85rem; }
.v2-sp-medal.is-won .v2-sp-disc { border: 2px solid #b97a1c; background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); color: var(--v2-ink-dark); }
.v2-sp-medal > span:last-child { display: flex; flex-direction: column; min-width: 0; font-size: 0.74rem; line-height: 1.25; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-sp-medal.is-won > span:last-child { color: var(--v2-ink); }
.v2-sp-medal small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sp-medal.is-won small { color: var(--v2-good); }

/* -- side: rank by category, recent dealings -- */
.v2-sp-cats { margin: 0; padding: 0.6rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-sp-cats dt { margin: 0.35rem 0 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-sp-cats dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.v2-sp-cat { display: inline-flex; align-items: baseline; gap: 0.35rem; min-height: 2rem; padding: 0.3rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-sp-cat b { font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-ink); }
.v2-sp-cat:hover { border-color: var(--v2-brass); color: var(--v2-glow); }
.v2-sp-deals { list-style: none; margin: 0; padding: 0.2rem 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-sp-deal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.6rem; padding: 0.5rem 0.9rem; }
.v2-sp-deal + .v2-sp-deal { border-top: 1px dashed var(--v2-line); }
.v2-sp-deal a { color: var(--v2-ink); }
.v2-sp-deal a:hover { color: var(--v2-glow); }
.v2-sp-deal-h { font-family: var(--v2-font-display); font-size: 0.88rem; min-width: 0; overflow-wrap: anywhere; }
.v2-sp-deal-p { font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-glow); text-align: right; }
.v2-sp-deal-s { grid-column: 1 / -1; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sp-deal-s a { color: var(--v2-brass); }

/* -- Horses tab: the string -- */
.v2-sp-strhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.v2-sp-strhead .v2-lb-switch { flex-wrap: wrap; border-radius: 12px; }
.v2-sp-strhead .v2-lb-switch small { margin-left: 0.3rem; font-weight: 400; opacity: 0.8; }
.v2-sp-string { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-sp-hrow { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 11.25rem 6.5rem 8.25rem; gap: 0.8rem; align-items: center; padding: 0.6rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-sp-hrow:last-child { border-bottom: none; }
.v2-sp-hrow:hover { background: rgba(199, 154, 63, 0.05); }
.v2-sp-hwho { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-sp-hname { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; font-family: var(--v2-font-display); font-size: 1rem; }
.v2-sp-hname a { color: var(--v2-ink); }
.v2-sp-hname a:hover { color: var(--v2-glow); }
.v2-sp-hsub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-sp-hearn { font-family: var(--v2-font-hud); font-size: 1.05rem; color: var(--v2-glow); text-align: right; font-variant-numeric: tabular-nums; }
.v2-sp-hgo { display: flex; justify-content: flex-end; }
.v2-sp-hgo .v2-btn { min-height: 2.5rem; display: inline-flex; align-items: center; }
.v2-sp-hgo .v2-rk-tag { white-space: nowrap; }
.v2-sp-pager { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 0.8rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-faint); }
.v2-sp-pager a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.6rem; color: var(--v2-brass); }

/* -- Recent races tab: results by day -- */
.v2-sp-day { margin: 1rem 0 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-sp-day:first-of-type { margin-top: 0; }
.v2-sp-runs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-sp-run { display: grid; grid-template-columns: 3rem 2.75rem minmax(0, 1fr) 5.5rem 6rem; gap: 0.8rem; align-items: center; padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-sp-run:last-child { border-bottom: none; }
.v2-sp-run.is-win { background: rgba(255, 181, 69, 0.06); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-sp-run > .v2-lb-rosette, .v2-sp-run > .v2-sp-pos { justify-self: center; }
.v2-sp-rwho { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-sp-rwho > a { font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); }
.v2-sp-rwho > a:hover { color: var(--v2-glow); }
.v2-sp-rrace { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-sp-rrace a { color: var(--v2-ink-soft); }
.v2-sp-rrace a:hover { color: var(--v2-glow); }
.v2-sp-rtime { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); text-align: right; }
.v2-sp-rtime small { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sp-rearn { font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-glow); text-align: right; font-variant-numeric: tabular-nums; }
.v2-sp-rearn.is-nil { color: var(--v2-ink-faint); }

/* -- Stats tab: form-guide bars per split -- */
.v2-sp-splits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.v2-sp-split { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.4rem 0 0.2rem; min-width: 0; }
.v2-sp-split.is-wide { grid-column: 1 / -1; }
.v2-sp-split h2 { margin: 0.4rem 1rem 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-sp-srow { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 3.25rem 3.25rem 6.5rem; gap: 0.7rem; align-items: center; padding: 0.45rem 1rem; border-top: 1px dashed var(--v2-line); }
.v2-sp-srow.is-head { border-top: none; padding-top: 0; padding-bottom: 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sp-slabel { font-family: var(--v2-font-display); font-size: 0.9rem; color: var(--v2-ink); min-width: 0; overflow-wrap: anywhere; }
.v2-sp-sform { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-sp-sform .v2-lb-form-t { font-size: 0.66rem; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
/* Half-width splits are too narrow for a big stable's record ("14,208: 1,161-1,203-...") below ~1100px: stack them. */
@media (max-width: 1100px) { .v2-sp-splits { grid-template-columns: 1fr; } }
.v2-sp-pct { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink); text-align: right; font-variant-numeric: tabular-nums; }
.v2-sp-pct.is-money { color: var(--v2-glow); }
.v2-sp-split .v2-sp-srow.is-head .v2-sp-pct { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* -- Track records tab: one board per distance -- */
.v2-sp-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.v2-sp-recbox { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; min-width: 0; }
.v2-sp-recbox h2 { margin: 0; display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); border-bottom: 1px solid var(--v2-line); font-family: var(--v2-font-display); font-weight: 400; font-size: 1.05rem; color: var(--v2-ink); }
.v2-sp-recbox h2 .v2-rk-ic { color: var(--v2-brass); }
.v2-sp-recbox h2 small { margin-left: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sp-rec { display: grid; grid-template-columns: 4.75rem 2.375rem minmax(0, 1fr); gap: 0.7rem; align-items: center; padding: 0.5rem 1rem; }
.v2-sp-rec + .v2-sp-rec { border-top: 1px dashed var(--v2-line); }
.v2-sp-rec time { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.15rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-sp-rec .v2-rk-portrait { width: 2.375rem; height: 2.375rem; }

@media (max-width: 900px) {
  .v2-sp-mast { grid-template-columns: 8.5rem minmax(0, 1fr); padding-right: 1rem; }
  .v2-sp-act { grid-column: 1 / -1; padding: 0 0 1rem 1rem; }
  .v2-sp-silks { width: 6rem; height: 6rem; }
  .v2-sp-hrow { grid-template-columns: 2.75rem minmax(0, 1fr) 9rem 6rem; }
  .v2-sp-hrow > .v2-sp-hgo { grid-column: 2 / -1; justify-content: flex-start; }
  .v2-sp-splits { grid-template-columns: 1fr; }
  /* Home lifts its side column above the main one; on a profile the honours come first. */
  .v2-sp-grid > .v2-yard-side { order: 0; }
}
@media (max-width: 640px) {
  .v2-sp-mast { grid-template-columns: 5.75rem minmax(0, 1fr); gap: 0.8rem; padding-right: 0.8rem; }
  .v2-sp-colours { padding: 0.8rem 0.3rem 1.2rem; }
  .v2-sp-silks { width: 4.5rem; height: 4.5rem; }
  .v2-sp-name { font-size: 1.45rem; }
  .v2-sp-badge { width: 3rem; height: 3rem; }
  .v2-sp-idrow { gap: 0.6rem; }
  /* kv strip leaves the narrow identity column and spans the card */
  .v2-sp-id .v2-bk-kv { grid-template-columns: 1fr 1fr; }
  .v2-sp-act { padding: 0 0 0.8rem 0.8rem; }
  .v2-sp-mast.is-compact { grid-template-columns: 4.25rem minmax(0, 1fr); }
  .v2-sp-mast.is-compact .v2-sp-silks { width: 3.25rem; height: 3.25rem; }
  .v2-sp-mast.is-compact .v2-sp-name { font-size: 1.2rem; }
  .v2-sp-quick { grid-column: 1 / -1; justify-content: stretch; padding: 0 0 0.8rem 0.8rem; }
  .v2-sp-quick .v2-btn { flex: 1 1 0; justify-content: center; padding: 0.5rem 0.3rem; min-height: 2.75rem; }
  .v2-sp-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-sp-tab { justify-content: center; padding: 0.4rem 0.2rem; font-size: 0.68rem; text-align: center; border-radius: 6px 6px 0 0; }
  .v2-sp-tab small { display: none; }
  .v2-sp-honours { grid-template-columns: 1fr 1fr; gap: 0 0.6rem; }
  .v2-sp-honour { grid-template-columns: 1.25rem minmax(0, 1fr) auto; gap: 0.4rem; }
  .v2-sp-honour span { font-size: 0.8rem; }
  .v2-sp-honour b { font-size: 1.2rem; }
  .v2-sp-board { padding: 1.4rem 0.7rem 0.8rem; }
  .v2-yard-stalls.v2-sp-stalls { grid-template-columns: 1fr 1fr; }
  .v2-sp-stalls > :nth-child(3) { display: none; }          /* 2 per group on phones; "all horses" link stays */
  .v2-sp-trophies > li:nth-child(n+5) { display: none; }    /* 4 trophies on phones */
  .v2-sp-strhead .v2-lb-switch { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-sp-strhead .v2-lb-switch a { justify-content: center; padding: 0.3rem 0.2rem; flex-wrap: wrap; min-width: 0; white-space: normal; text-align: center; }  /* Larger text: "Home-bred 6,779" must wrap, not clip */
  .v2-sp-hrow { grid-template-columns: 2.375rem minmax(0, 1fr) auto; grid-template-areas: "por who earn" "por form form" "por go go"; gap: 0.35rem 0.6rem; padding: 0.6rem 0.7rem; }
  .v2-sp-hrow > .v2-rk-portrait { grid-area: por; width: 2.375rem; height: 2.375rem; }
  .v2-sp-hrow > .v2-sp-hwho { grid-area: who; }
  .v2-sp-hrow > .v2-lb-form { grid-area: form; }
  .v2-sp-hrow > .v2-sp-hearn { grid-area: earn; }
  .v2-sp-hrow > .v2-sp-hgo { grid-area: go; justify-content: stretch; }
  .v2-sp-hgo .v2-btn { flex: 1; justify-content: center; }
  .v2-sp-run { grid-template-columns: 2.25rem 2.375rem minmax(0, 1fr) auto; grid-template-areas: "pos por who earn" "pos por who time"; gap: 0.15rem 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-sp-run > :nth-child(1) { grid-area: pos; }
  .v2-sp-run > .v2-rk-portrait { grid-area: por; width: 2.375rem; height: 2.375rem; }
  .v2-sp-run > .v2-sp-rwho { grid-area: who; }
  .v2-sp-run > .v2-sp-rtime { grid-area: time; }
  .v2-sp-run > .v2-sp-rearn { grid-area: earn; }
  .v2-sp-run .v2-lb-rosette.sm, .v2-sp-run .v2-sp-pos { width: 1.875rem; height: 1.875rem; font-size: 0.64rem; }
  .v2-sp-srow { grid-template-columns: minmax(0, 1fr) 2.75rem 2.75rem 4.75rem; grid-template-areas: "lab win itm earn" "form form form form"; gap: 0.25rem 0.5rem; padding: 0.45rem 0.7rem; }
  .v2-sp-srow > .v2-sp-slabel { grid-area: lab; }
  .v2-sp-srow > .v2-sp-sform { grid-area: form; }
  .v2-sp-srow.is-head > :nth-child(2) { display: none; }
  .v2-sp-rec { grid-template-columns: 4.25rem 2.125rem minmax(0, 1fr); gap: 0.5rem; padding: 0.5rem 0.7rem; }
  .v2-sp-rec .v2-rk-portrait { width: 2.125rem; height: 2.125rem; }
  .v2-sp-rec time { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-sp-tab, .v2-sp-cat { transition: none; }
}
/* ===== end Stable profile (round 3) ===== */
/* ===== Intro (round 3) ===== */
/* New-player intro "Debut Day": logged-out /v2 gate, /intro/v2 name / reveal / race, /help/newplayer/v2. SPEC-intro.md §8. */
.v2-intro-eyebrow { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-intro-eyebrow a { color: var(--v2-brass); }
.v2-intro-eyebrow a:hover { color: var(--v2-glow); }
.v2-intro-h1 { margin: 0.25rem 0 0.45rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 2.1rem; line-height: 1.15; color: var(--v2-ink-bright); max-width: 34rem; }
.v2-intro-h2 { margin: 0.2rem 0 0.4rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-intro-lede { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--v2-ink); max-width: 36rem; }
.v2-intro-note { margin: 0.4rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-intro-cta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.v2-intro-cta .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; }

.v2-intro-pole { position: relative; z-index: 1; flex: 0 0 auto; width: 2.05rem; height: 2.05rem; border-radius: 50%; display: grid; place-items: center; background: var(--v2-bg); border: 2px solid var(--v2-ink-faint); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-intro-plateline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: stretch; }
.v2-intro-plateline .v2-form-input { flex: 1 1 14rem; max-width: 24rem; min-height: 2.75rem; font-family: var(--v2-font-display); font-size: 1.05rem; }
.v2-intro-plateline .v2-btn { min-height: 2.75rem; }

/* furlong-pole rail. The dirt band is a MATERIAL token, not status. */
.v2-intro-rail { list-style: none; margin: 0 0 1.4rem; padding: 0 1.6rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.v2-intro-rail::before { content: ""; position: absolute; left: 1rem; right: 1.2rem; top: 0.84rem; height: 0.375rem; border-radius: 3px; background: radial-gradient(circle at 30% 35%, var(--v2-dirt-speck) 0 1px, transparent 1.4px) 0 0/5px 5px, var(--v2-dirt); }
.v2-intro-rail::after { content: ""; position: absolute; right: 0.7rem; top: 0.15rem; width: 0.5rem; height: 1.7rem; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--v2-ink-bright) 0 4px, var(--v2-ink-dark) 4px 8px); }
.v2-intro-rail li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; min-width: 0; }
.v2-intro-rail li.is-done .v2-intro-pole { border-color: var(--v2-good); color: var(--v2-good); }
.v2-intro-rail li.is-now .v2-intro-pole { background: var(--v2-brass); border-color: var(--v2-ink-bright); color: var(--v2-ink-dark); box-shadow: 0 0 0 4px rgba(199,154,63,0.28); }
.v2-intro-rail-t { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); max-width: 100%; }
.v2-intro-rail-t a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.v2-intro-rail-t small { display: block; text-transform: none; letter-spacing: 0; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-intro-rail li.is-now .v2-intro-rail-t { color: var(--v2-ink); }
.v2-intro-rail li.is-done .v2-intro-rail-t small { color: var(--v2-good); }

/* stage 0: the gate */
.v2-intro-gate { position: relative; display: flex; align-items: flex-end; min-height: 19rem; margin-bottom: 1.2rem; border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; background: var(--v2-surface) url("https://cdn.sportofkings.us/images/background/SOKViewer.jpg") center 60% / cover no-repeat; }
.v2-intro-gate::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,26,18,0.1) 0%, rgba(11,26,18,0.72) 48%, rgba(11,26,18,0.97) 100%); }
.v2-intro-gate-in { position: relative; width: 100%; padding: 1.6rem 1.8rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.v2-intro-gate-copy { min-width: 0; flex: 1 1 24rem; }
.v2-intro-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.v2-intro-how li { display: grid; grid-template-columns: 2.05rem minmax(0, 1fr); gap: 0.7rem; align-items: start; padding: 0.9rem 1rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-intro-how b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; color: var(--v2-ink); }
.v2-intro-how p { margin: 0.2rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-intro-pair { margin-top: 1.8rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.v2-intro-pair > div > .v2-section-label:first-child { margin-top: 0; }
.v2-intro-pair .v2-yard-trophies { grid-template-columns: 1fr; }
.v2-intro-record { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-intro-record b { color: var(--v2-ink); font-weight: 600; }

/* stage 1: name */
.v2-intro-name { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 1.4rem; align-items: stretch; padding: 1.2rem; border: 1px solid var(--v2-line); border-radius: 12px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); }
.v2-intro-name .v2-yard-door { height: 9rem; }
.v2-intro-unknown { position: relative; width: 4.75rem; height: 4.75rem; margin-bottom: 1.5rem; border-radius: 50%; border: 2px dashed rgba(243,234,211,0.5); display: grid; place-items: center; font-family: var(--v2-font-display); font-size: 2rem; color: var(--v2-ink-soft); }
.v2-intro-name .v2-yard-plate { max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.v2-intro-form { display: flex; flex-direction: column; justify-content: center; gap: 0.75rem; min-width: 0; }
.v2-intro-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-intro-perks .v2-pill { font-size: 0.66rem; padding: 0.2rem 0.6rem; color: var(--v2-ink-soft); }
.v2-intro-perks .v2-pill.good { color: var(--v2-good); }
.v2-intro-debuts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.8rem; }
.v2-intro-debut { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.7rem; align-items: center; height: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 8px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); }
.v2-intro-debut:hover { border-color: var(--v2-brass); }
.v2-intro-debut b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.92rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-intro-debut small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-intro-debut em { font-style: normal; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-glow); }

/* stage 2: reveal */
.v2-intro-reveal { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-intro-reveal .v2-yard-door { height: 10.5rem; }
.v2-intro-reveal .v2-yard-door img { height: 9.25rem; }
.v2-intro-card { padding: 1.2rem 1.3rem; border: 1px solid var(--v2-line); border-radius: 12px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.v2-intro-card .v2-fact-grid { padding: 0.8rem 0; border-top: 1px dashed var(--v2-line); border-bottom: 1px dashed var(--v2-line); }
@media (prefers-reduced-motion: no-preference) {
  .v2-intro-reveal .v2-yard-door img { animation: v2-intro-arrive 700ms ease-out both; }
}
@keyframes v2-intro-arrive { from { opacity: 0; transform: translateY(0.75rem) scale(0.96); } to { opacity: 1; transform: none; } }

/* stage 3: tickets (a div .v2-raceticket: two actions, not one big link) */
.v2-intro-tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.v2-intro-ticket { margin: 0; }
.v2-intro-ticket .v2-raceticket-stub { flex-direction: column; gap: 0.45rem; }
.v2-intro-ticket .v2-rk-oval-mini { width: 4.6rem; }
.v2-intro-ticket-acts { display: flex; gap: 0.4rem; flex-wrap: wrap; border-top: 1px dashed var(--v2-line); padding-top: 0.55rem; }
.v2-intro-ticket-acts .v2-btn { min-height: 2.25rem; display: inline-flex; align-items: center; }
.v2-intro-status { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-intro-status.is-short { color: var(--v2-glow); }
.v2-intro-callout { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; align-items: start; margin: 0.8rem 0 0; padding: 0.7rem 0.9rem; border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-brass); border-radius: 6px; background: var(--v2-surface); font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-intro-callout .v2-rk-ic { width: 1.4rem; height: 1.4rem; color: var(--v2-brass); }
.v2-intro-callout b { color: var(--v2-ink); font-weight: 600; }

/* help: field guide */
.v2-intro-guide { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-intro-toc { position: sticky; top: 4rem; list-style: none; margin: 0; padding: 0.4rem 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-intro-toc a { display: flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; padding: 0.35rem 0.8rem; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-intro-toc a:hover { color: var(--v2-glow); background: rgba(199,154,63,0.06); }
.v2-intro-toc .v2-intro-pole { width: 1.6rem; height: 1.6rem; font-size: 0.72rem; border-width: 1px; }
.v2-intro-guide-step { margin: 0 0 1rem; scroll-margin-top: 1rem; }
.v2-intro-guide-step > header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.v2-intro-guide-step > header .v2-intro-pole { border-color: var(--v2-brass); color: var(--v2-brass); }
.v2-intro-guide-step h2 { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.25rem; color: var(--v2-ink-bright); }
.v2-intro-guide-step .v2-prose { max-width: none; margin: 0; }
.v2-intro-guide-go { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.8rem; }
.v2-intro-guide-go .v2-btn { min-height: 2.5rem; display: inline-flex; align-items: center; }

@media (max-width: 900px) {
  .v2-intro-pair { grid-template-columns: 1fr; }
  .v2-intro-guide { grid-template-columns: 1fr; }
  .v2-intro-toc { position: static; display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.4rem; }
  .v2-intro-toc li { flex: 1 1 10rem; }
  .v2-intro-tickets { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .v2-intro-h1 { font-size: 1.55rem; }
  .v2-intro-h2 { font-size: 1.3rem; }
  .v2-intro-gate { min-height: 23rem; background-position: 30% 60%; }
  .v2-intro-gate-in { padding: 1.1rem 1rem; }
  /* Build deviation: on phones the copy sits high on the photo (sky), so darken the top of the scrim to keep the brass eyebrow legible, and let the gate CTAs size to their labels instead of 50/50 so "Create your stable" never wraps inside the button. */
  .v2-intro-gate::before { background: linear-gradient(180deg, rgba(11,26,18,0.6) 0%, rgba(11,26,18,0.82) 30%, rgba(11,26,18,0.97) 100%); }
  .v2-intro-gate .v2-intro-cta .v2-btn { flex: 1 1 auto; white-space: nowrap; }
  .v2-intro-cta { width: 100%; }
  .v2-intro-cta .v2-btn { flex: 1 1 0; }
  .v2-intro-how { grid-template-columns: 1fr; }
  .v2-intro-plateline .v2-btn { flex: 1 1 100%; }
  .v2-intro-rail { padding-right: 1.2rem; }
  .v2-intro-rail-t { font-size: 0.66rem; letter-spacing: 0.03em; }
  .v2-intro-rail-t small { display: none; }
  .v2-intro-rail li.is-now .v2-intro-rail-t small { display: block; }
  .v2-intro-name { grid-template-columns: 1fr; padding: 0.9rem; }
  .v2-intro-name .v2-yard-stall { max-width: 15rem; width: 100%; margin: 0 auto; }
  .v2-intro-reveal { grid-template-columns: 1fr; }
  .v2-intro-reveal .v2-yard-stall { max-width: 16rem; width: 100%; margin: 0 auto; }
  .v2-intro-card { padding: 1rem; }
  .v2-intro-card .v2-intro-cta .v2-btn { flex: 1 1 100%; }
  .v2-intro-ticket { grid-template-columns: 5.25rem minmax(0, 1fr); }
  .v2-intro-ticket-acts .v2-btn { flex: 1 1 0; min-height: 2.75rem; justify-content: center; }
  .v2-intro-guide-go .v2-btn { flex: 1 1 100%; justify-content: center; min-height: 2.75rem; }
}
/* ===== end Intro (round 3) ===== */
/* ===== Tracks (round 3) ===== */
/* v2-tracks-list / v2-track-details / v2-track-races / v2-track-weather ("Racecourses",
   SPEC-tracks.md). Prefix .v2-trk-*. Reuses the race kit and the Race Day hub's meeting card
   (.v2-rh-meet, .v2-rh-meet-head, .v2-rh-badge, .v2-rh-lines, .v2-rh-race, .v2-rh-days,
   .v2-rh-reveal) UNCHANGED; anything page-specific is a .v2-trk-* compound. */

.v2-trk-mast { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.6rem 1.2rem; margin-bottom: 1.1rem; }
.v2-trk-mast-h { margin: 0.15rem 0 0.2rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; color: var(--v2-ink-bright); }
.v2-trk-tally { margin: 0; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-trk-tools { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.v2-trk-tools .v2-cross-link { display: inline-flex; align-items: center; min-height: 2.25rem; }

/* Prestige ladder: 5 posts of rising height + the number. The number carries the meaning. */
.v2-trk-prestige { display: inline-flex; align-items: flex-end; gap: 2px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-trk-prestige i { width: 0.3125rem; border-radius: 1px; border: 1px solid var(--v2-ink-faint); }
.v2-trk-prestige i:nth-child(1) { height: 0.375rem; } .v2-trk-prestige i:nth-child(2) { height: 0.5rem; }
.v2-trk-prestige i:nth-child(3) { height: 0.625rem; } .v2-trk-prestige i:nth-child(4) { height: 0.75rem; }
.v2-trk-prestige i:nth-child(5) { height: 0.875rem; }
.v2-trk-prestige i.on { background: var(--v2-brass); border-color: var(--v2-brass); }
.v2-trk-prestige b { margin-left: 0.3rem; font-weight: 700; color: var(--v2-ink); }

/* ---------- /tracks: course cards ---------- */
.v2-trk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.v2-trk-course { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; display: flex; flex-direction: column; }
.v2-trk-course .v2-rh-meet-head .v2-status-flag { font-size: 0.66rem; padding: 0.22rem 0.55rem; white-space: nowrap; }
.v2-trk-course-body { display: flex; flex-direction: column; gap: 0.55rem; padding: 0.75rem 1rem 0.8rem; }
.v2-trk-goingrow { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; }
.v2-trk-pair { display: inline-flex; align-items: center; gap: 0.3rem; }
.v2-trk-pair .v2-rk-surface, .v2-trk-pair .v2-rk-going { font-size: 0.66rem; gap: 0.3rem; padding: 0.14rem 0.5rem 0.14rem 0.2rem; }
.v2-trk-pair .v2-rk-going { padding-left: 0.45rem; }
.v2-trk-pair .v2-rk-swatch { width: 0.8125rem; height: 0.8125rem; }
.v2-trk-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin: 0; padding: 0; list-style: none; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-trk-facts b { color: var(--v2-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-trk-facts .is-next b { color: var(--v2-glow); }
.v2-trk-course-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; padding: 0.6rem 1rem 0.75rem; border-top: 1px dashed var(--v2-line); }
.v2-trk-course-acts .v2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem; }

/* Closed courses, grouped by region */
.v2-trk-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); gap: 0 1.4rem; align-items: start; }
.v2-trk-region > h3.v2-postgroup { font-weight: 400; margin-top: 1.1rem; }
.v2-trk-minis { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-trk-minis li + li { border-top: 1px dashed var(--v2-line); }
.v2-trk-mini { display: grid; grid-template-columns: 2.375rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.5rem 0.9rem; min-height: 2.75rem; }
.v2-trk-mini .v2-rh-badge { width: 2.375rem; height: 2.375rem; font-size: 0.6rem; }
.v2-trk-mini-nm { display: block; font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); }
.v2-trk-mini-nm:hover { color: var(--v2-glow); }
.v2-trk-mini-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-mini-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); text-align: right; }
.v2-trk-mini-end .v2-cross-link { display: inline-flex; align-items: center; min-height: 2.25rem; }

/* ---------- /tracks/:id: course guide ---------- */
.v2-trk-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(13rem, 18rem); gap: 1.2rem; align-items: center; padding: 1.1rem 1.2rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); border-bottom: 2px solid var(--v2-brass); margin-bottom: 1.2rem; }
.v2-trk-hero > .v2-rh-badge { width: 4.5rem; height: 4.5rem; font-size: 1.05rem; align-self: start; }
.v2-trk-hero-main { min-width: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.v2-trk-title { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; color: var(--v2-ink-bright); }
.v2-trk-where { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-trk-where .v2-status-flag { font-size: 0.66rem; padding: 0.22rem 0.55rem; }
.v2-trk-dl { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.45rem 0.8rem; margin: 0; align-items: center; }
.v2-trk-dl dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-trk-dl dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink); }
.v2-trk-trip { padding: 0.1rem 0.4rem; border: 1px solid var(--v2-line); border-radius: 4px; font-variant-numeric: tabular-nums; }
.v2-trk-week { display: inline-flex; gap: 0.25rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.v2-trk-week li { min-width: 2.25rem; padding: 0.12rem 0.3rem; text-align: center; border-radius: 4px; font-size: 0.66rem; letter-spacing: 0.04em; }
.v2-trk-week li.on { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; border: 1px solid var(--v2-brass); }
.v2-trk-week li.off { border: 1px dashed var(--v2-line); color: var(--v2-ink-faint); text-decoration: line-through; }
.v2-trk-map { display: flex; flex-direction: column; gap: 0.4rem; align-items: stretch; }
.v2-trk-map .v2-rk-oval { background: #0f2218; border: 1px solid var(--v2-line); border-radius: 8px; padding: 0.3rem; }
.v2-trk-map-lbl { font-family: var(--v2-font-mono); font-size: 0.42rem; letter-spacing: 0.07em; fill: var(--v2-ink-soft); }
.v2-trk-map-nm { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; fill: var(--v2-ink-bright); }
.v2-trk-hero-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.v2-trk-hero-acts .v2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem; }

/* Section heads inside the guide */
.v2-trk-sec { margin-top: 1.6rem; }
.v2-trk-sec > .v2-section-label { margin-top: 0; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }

/* Going board: lanes x 20 days */
.v2-trk-goingboard { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.7rem 0.9rem 0.8rem; }
.v2-trk-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0 0 0.6rem; padding: 0; list-style: none; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-trk-legend li { display: inline-flex; align-items: center; gap: 0.3rem; }
.v2-trk-legend .v2-rk-ic { width: 1rem; height: 1rem; color: var(--v2-ink-bright); }
.v2-trk-legend .is-fc { display: inline-block; width: 1.4rem; height: 0.8rem; border: 1px dashed var(--v2-ink-faint); border-radius: 3px; }
.v2-trk-lane { display: grid; grid-template-columns: 5rem repeat(20, minmax(0, 1fr)); gap: 3px; align-items: stretch; }
.v2-trk-lane + .v2-trk-lane { margin-top: 3px; }
.v2-trk-lane-h { display: flex; align-items: center; }
.v2-trk-lane-h .v2-rk-surface { font-size: 0.66rem; gap: 0.3rem; padding: 0.14rem 0.5rem 0.14rem 0.2rem; }
.v2-trk-lane-h .v2-rk-swatch { width: 0.8125rem; height: 0.8125rem; }
.v2-trk-gc { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; padding: 0.25rem 0.1rem; min-height: 3.6rem; border-radius: 5px; border: 1px solid rgba(199,154,63,0.18); background: rgba(255,248,234,0.03); text-align: center; }
a.v2-trk-gc:hover { border-color: var(--v2-brass); background: rgba(199,154,63,0.08); }
.v2-trk-gc small { max-width: 100%; font-family: var(--v2-font-mono); font-size: 0.48rem; line-height: 1.15; letter-spacing: 0.04em; color: var(--v2-ink-faint); overflow-wrap: break-word; }
.v2-trk-gc .v2-rk-ic { width: 1.05rem; height: 1.05rem; color: var(--v2-ink-bright); }
.v2-trk-gc b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-family: var(--v2-font-mono); font-size: 0.52rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--v2-ink); }
.v2-trk-gc.is-none { background: transparent; border-color: transparent; }
.v2-trk-gc.is-none b { color: var(--v2-ink-faint); font-weight: 400; }
.v2-trk-gc.is-past { opacity: 0.8; --v2-ink-faint: var(--v2-ink-soft); }
.v2-trk-gc.is-future { border-style: dashed; }
.v2-trk-gc.is-today { border: 2px solid var(--v2-brass); background: rgba(199,154,63,0.12); opacity: 1; }
.v2-trk-gc.is-today small { color: var(--v2-glow); }

/* Today's card inside the guide: the hub meeting card, full width */
.v2-trk-today .v2-rh-meet-head > div { min-width: 0; }

/* Feature races */
.v2-trk-stakes { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.v2-trk-panel { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-trk-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; padding: 0.6rem 1rem; border-bottom: 2px solid var(--v2-brass); background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); }
.v2-trk-panel-h h3 { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.05rem; color: var(--v2-ink-bright); display: flex; align-items: center; gap: 0.45rem; }
.v2-trk-panel-h .v2-cross-link { display: inline-flex; align-items: center; min-height: 2.25rem; }
.v2-trk-fixtures { list-style: none; margin: 0; padding: 0; }
.v2-trk-fixtures li + li { border-top: 1px dashed var(--v2-line); }
.v2-trk-fx { display: grid; grid-template-columns: 4.25rem 1.875rem minmax(0, 1fr); gap: 0.7rem; align-items: center; padding: 0.55rem 1rem; }
.v2-trk-fx-when { display: flex; flex-direction: column; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.v2-trk-fx-when b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-glow); letter-spacing: 0.02em; }
.v2-trk-fx-nm { display: block; font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); }
.v2-trk-fx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-top: 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-trk-fx-meta .v2-rk-surface { font-size: 0.66rem; gap: 0.3rem; padding: 0.1rem 0.45rem 0.1rem 0.2rem; }
.v2-trk-fx-meta .v2-rk-swatch { width: 0.75rem; height: 0.75rem; }
.v2-trk-fx .v2-rk-tag { justify-self: start; }
.v2-trk-heritage { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0.75rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-trk-heritage li { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.6rem 0.3rem 0.35rem; border: 1px solid var(--v2-line); border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-trk-heritage b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-trk-heritage .v2-rk-grade { width: 1.5rem; height: 1.5rem; font-size: 0.56rem; }
.v2-trk-honours { list-style: none; margin: 0; padding: 0; }
.v2-trk-honours li + li { border-top: 1px dashed var(--v2-line); }
.v2-trk-hon { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.5rem 1rem; }
.v2-trk-hon-nm { font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink-bright); }
.v2-trk-hon-nm:hover, .v2-trk-hon-race:hover { color: var(--v2-glow); }
.v2-trk-hon-race { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-trk-hon-race .v2-rk-grade { width: 1.25rem; height: 1.25rem; font-size: 0.5rem; }
.v2-trk-hon-end { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-hon-end b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-trk-panel .v2-empty { margin: 0.8rem 1rem; }

/* Course records */
.v2-trk-tabs { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.v2-trk-tabs a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.8rem; border: 1px solid var(--v2-line); border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-soft); }
.v2-trk-tabs a:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-trk-tabs a[aria-current='page'] { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-trk-recgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.v2-trk-grade { margin: 0; padding: 0.4rem 1rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); border-bottom: 1px dashed var(--v2-line); }
.v2-trk-recs { list-style: none; margin: 0; padding: 0; }
.v2-trk-recs li + li { border-top: 1px dashed var(--v2-line); }
.v2-trk-rec { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.5rem 1rem; }
.v2-trk-rec-trip { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.82rem; color: var(--v2-ink-bright); }
.v2-trk-rec-trip .v2-rh-mini { width: 100%; }
.v2-trk-rec-who { min-width: 0; }
.v2-trk-rec-who .v2-name-with-image { display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; }
.v2-trk-rec-who .v2-name { font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-trk-rec-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-rec-meta a { color: var(--v2-ink-soft); }
.v2-trk-rec-meta a:hover { color: var(--v2-glow); }
.v2-trk-rec-time { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.25rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; text-shadow: 0 0 8px rgba(255,181,69,0.35); }

/* Coming up: next three race days as meeting cards, then the fixture calendar */
.v2-trk-ahead { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(23.75rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.v2-trk-datebadge { width: 2.75rem; height: 2.75rem; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--v2-ink); color: var(--v2-ink-dark); font-family: var(--v2-font-mono); font-size: 0.5rem; letter-spacing: 0.08em; }
.v2-trk-datebadge b { font-family: var(--v2-font-hud); font-size: 1.15rem; letter-spacing: 0; }
.v2-trk-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(7.25rem, 100%), 1fr)); gap: 0.4rem; list-style: none; margin: 0.7rem 0 0; padding: 0; }
.v2-trk-cal a { display: flex; flex-direction: column; justify-content: center; min-height: 2.75rem; padding: 0.35rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.v2-trk-cal a:hover { border-color: var(--v2-brass); }
.v2-trk-cal b { font-family: var(--v2-font-hud); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--v2-ink); }
.v2-trk-cal small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* ---------- /tracks/:id/races: the track card ---------- */
.v2-trk-days .v2-rh-day[aria-current='page'] { border-color: var(--v2-brass); box-shadow: inset 0 -3px 0 var(--v2-brass); background: var(--v2-surface-2); }
.v2-trk-days .v2-rh-day .v2-rk-ic { width: 0.9rem; height: 0.9rem; }
.v2-trk-card { margin-bottom: 1rem; }
.v2-trk-card .v2-rh-meet-name { font-size: 1.35rem; }
.v2-trk-cardgoing { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); background: rgba(15,34,24,0.6); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-trk-part { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); background: rgba(255,248,234,0.02); }
.v2-trk-part h3 { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-trk-part .v2-rh-reveal { margin: 0; min-height: 2.25rem; padding: 0.2rem 0.7rem; }
.v2-trk-card .v2-rh-lines + .v2-trk-part { border-top: 1px dashed var(--v2-line); }
.v2-trk-rno { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; height: 1.375rem; padding: 0 0.3rem; border-radius: 4px; background: var(--v2-ink); color: var(--v2-ink-dark); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; }
.v2-trk-podium { list-style: none; margin: 0; padding: 0 1rem 0.65rem 6.675rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.v2-trk-podium li { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-podium .v2-trk-pos { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-trk-podium li:first-child .v2-trk-pos { color: var(--v2-glow); }
.v2-trk-podium .v2-rk-cloth { width: 1.375rem; height: 1.625rem; font-size: 0.7rem; }
.v2-trk-podium .v2-rk-portrait { width: 1.875rem; height: 1.875rem; }
.v2-trk-podium a { font-family: var(--v2-font-display); font-size: 0.86rem; color: var(--v2-ink); }
.v2-trk-podium a:hover { color: var(--v2-glow); }
.v2-trk-podium-hidden { display: none; margin: 0 1rem 0.65rem 6.675rem; padding: 0.25rem 0.5rem; border: 1px dashed var(--v2-line); border-radius: 4px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-card .v2-rh-reveal { display: none; }
@supports selector(:has(*)) {
  .v2-trk-card .v2-rh-reveal { display: inline-flex; }
  .v2-trk-card:not(:has(.v2-rh-reveal input:checked)) .v2-trk-podium { display: none; }
  .v2-trk-card:not(:has(.v2-rh-reveal input:checked)) .v2-trk-podium-hidden { display: block; }
}
.v2-trk-next { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }

/* ---------- /tracks/weather: going forecast ---------- */
.v2-trk-fc { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.v2-trk-fc th { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); text-align: center; padding: 0.3rem 0.2rem; }
.v2-trk-fc thead th:first-child { text-align: left; width: 13rem; }
.v2-trk-fc thead th b { display: block; font-family: var(--v2-font-hud); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--v2-ink); }
.v2-trk-fc thead th.is-today b { color: var(--v2-glow); }
.v2-trk-fc tbody th { text-align: left; padding: 0.3rem 0.4rem 0.3rem 0; }
.v2-trk-fc-track { display: grid; grid-template-columns: 2.375rem minmax(0, 1fr); gap: 0.6rem; align-items: center; min-height: 2.75rem; }
.v2-trk-fc-track .v2-rh-badge { width: 2.375rem; height: 2.375rem; font-size: 0.6rem; }
.v2-trk-fc-track span:last-child { min-width: 0; font-family: var(--v2-font-display); font-size: 0.95rem; text-transform: none; letter-spacing: 0; color: var(--v2-ink); }
.v2-trk-fc-track:hover span:last-child { color: var(--v2-glow); }
.v2-trk-fc td { padding: 0; vertical-align: stretch; }
.v2-trk-fc-cell { display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; height: 100%; min-height: 3.6rem; padding: 0.35rem 0.5rem; border: 1px solid rgba(199,154,63,0.2); border-radius: 6px; background: var(--v2-surface); }
a.v2-trk-fc-cell:hover { border-color: var(--v2-brass); background: var(--v2-surface-2); }
.v2-trk-fc-cell.is-none { background: transparent; border-style: dashed; border-color: rgba(199,154,63,0.14); align-items: center; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-fc-top { display: flex; align-items: center; justify-content: space-between; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-trk-fc-top .v2-rk-ic { width: 1.35rem; height: 1.35rem; color: var(--v2-ink-bright); }
.v2-trk-fc-day { display: none; }
.v2-trk-fc-g { display: flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--v2-ink); white-space: nowrap; }
.v2-trk-fc-g .v2-rk-swatch { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1px solid rgba(243,234,211,0.5); }
.v2-trk-fc-g.is-dirt .v2-rk-swatch { background: radial-gradient(circle at 30% 35%, var(--v2-dirt-speck) 0 1.2px, transparent 1.6px) 0 0/5px 5px, var(--v2-dirt); }
.v2-trk-fc-g.is-turf .v2-rk-swatch { background: repeating-linear-gradient(135deg, var(--v2-turf-stripe) 0 3px, var(--v2-turf) 3px 6px); }
.v2-trk-fc-g.is-hidden { font-weight: 400; color: var(--v2-ink-soft); }
.v2-trk-quiet { margin: 0.8rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-trk-quiet a { color: var(--v2-ink); border-bottom: 1px dotted var(--v2-line); }
.v2-trk-quiet a:hover { color: var(--v2-glow); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .v2-trk-hero { grid-template-columns: auto minmax(0, 1fr); }
  .v2-trk-map { grid-column: 1 / -1; max-width: 22rem; }
  .v2-trk-stakes, .v2-trk-recgrid { grid-template-columns: minmax(0, 1fr); }
  .v2-trk-lane { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .v2-trk-lane-h { grid-column: 1 / -1; }
  .v2-trk-fc thead th:first-child { width: 9.5rem; }
}
@media (max-width: 640px) {
  .v2-trk-mast-h { font-size: 1.3rem; }
  .v2-trk-tools { width: 100%; }
  .v2-trk-tools .v2-cross-link, .v2-trk-mini-end .v2-cross-link, .v2-trk-panel-h .v2-cross-link { min-height: 2.75rem; }
  .v2-trk-course-acts .v2-btn, .v2-trk-hero-acts .v2-btn { flex: 1 1 0; min-height: 2.75rem; }
  .v2-trk-mini { padding: 0.5rem 0.7rem; }
  .v2-trk-hero { grid-template-columns: minmax(0, 1fr); padding: 0.9rem; gap: 0.8rem; }
  .v2-trk-hero > .v2-rh-badge { width: 3.25rem; height: 3.25rem; font-size: 0.78rem; }
  .v2-trk-title { font-size: 1.4rem; }
  .v2-trk-dl { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .v2-trk-dl dd { margin-bottom: 0.35rem; }
  .v2-trk-lane { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .v2-trk-gc { min-height: 3.4rem; padding-inline: 0; }
  .v2-trk-gc small { letter-spacing: 0; }
  .v2-trk-fx { grid-template-columns: 3.5rem 1.875rem minmax(0, 1fr); gap: 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-trk-hon { padding: 0.5rem 0.7rem; }
  .v2-trk-rec { grid-template-columns: 3.5rem minmax(0, 1fr); padding: 0.5rem 0.7rem; }
  .v2-trk-rec-time { grid-column: 2; font-size: 1.05rem; }
  .v2-trk-tabs a { min-height: 2.75rem; }
  .v2-trk-podium, .v2-trk-podium-hidden { padding-left: 0.7rem; margin-left: 0; }
  .v2-trk-podium-hidden { margin-left: 0.7rem; }
  .v2-trk-podium { flex-direction: column; }
  .v2-trk-part { padding: 0.5rem 0.7rem; }
  .v2-trk-part .v2-rh-reveal { min-height: 2.75rem; }
  .v2-trk-cardgoing { padding: 0.5rem 0.7rem; }
  /* forecast table -> one card per course */
  .v2-trk-fc, .v2-trk-fc tbody { display: block; }
  .v2-trk-fc thead { display: none; }
  .v2-trk-fc tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin-bottom: 0.8rem; }
  .v2-trk-fc tbody th { grid-column: 1 / -1; padding: 0; }
  .v2-trk-fc td { display: block; }
  .v2-trk-fc-day { display: inline; }
  .v2-trk-fc-cell { padding: 0.35rem 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-trk-gc, .v2-trk-fc-cell, .v2-trk-cal a { transition: none; }
}
/* ===== end Tracks (round 3) ===== */
/* ===== Market (round 3) ===== */
/* v2-market.pug (hub), v2-auction-house.pug, v2-listing-buy.pug, v2-listings.pug,
   v2-private-listings.pug, v2-offers.pug, v2-offer-new.pug. Option M "The Sales Complex".
   See SPEC-market.md. Reuses .v2-rc-mast/.v2-rc-post/.v2-rc-purse (Race Card), .v2-yard-*
   (Stable Yard: door, plate, stall, clip, order, grid), .v2-ring-* (Sales Ring: wallet, state,
   dot, stepper, bill, dl, paid, confirm, how) and the kit (.v2-rk-ic, .v2-rk-mine, .v2-rk-pips).
   Every new rule is .v2-mkt-*; nothing here restyles a shared selector except via a
   .v2-mkt-* ancestor. */

/* --- Shared bits ------------------------------------------------------------------------ */
.v2-mkt-eyebrow { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); margin-bottom: 0.2rem; }
.v2-mkt-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-top: 0.35rem; }
.v2-mkt-links a { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); white-space: nowrap; }
.v2-mkt-links a:hover { color: var(--v2-glow); }
.v2-mkt-back { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); margin-bottom: 0.6rem; }
.v2-mkt-back .v2-rk-ic { transform: rotate(180deg); }
.v2-mkt-back:hover { color: var(--v2-glow); }

/* Status word chip. The WORD carries the meaning; colour follows the v2 status vocabulary:
   is-good = open / you lead, is-due = waiting on you (glow), is-urgent = outbid / closing
   (signal), is-busy = processing (blue), default = neutral. */
.v2-mkt-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.14rem 0.5rem; border-radius: 100px; border: 1px solid var(--v2-line); color: var(--v2-ink-soft); background: rgba(8,20,13,0.88); white-space: nowrap; align-self: flex-start; }
.v2-mkt-chip .v2-rk-ic { width: 0.9rem; height: 0.9rem; }
.v2-mkt-chip.is-good { color: var(--v2-good); border-color: rgba(95,200,145,0.45); }
.v2-mkt-chip.is-due { color: var(--v2-glow); border-color: rgba(255,181,69,0.5); }
.v2-mkt-chip.is-urgent { color: var(--v2-signal-bright); border-color: rgba(255,117,87,0.55); }
.v2-mkt-chip.is-busy { color: var(--v2-blue); border-color: rgba(117,159,255,0.5); }

/* Masthead stub variants (cream post panel => darker status tints, same as .v2-ring-post) */
.v2-mkt-post .v2-rc-post-time { font-size: 1.45rem; }
.v2-mkt-post .v2-ring-state { font-size: 0.66rem; }
.v2-mkt-post.is-open .v2-ring-state { color: #1f6f43; }
.v2-mkt-post.is-shut .v2-ring-state { color: #5a4a2a; }
.v2-mkt-mast .v2-rc-title-col > div { min-width: 0; }

.v2-mkt-due { margin: -0.4rem 0 1.2rem; }
.v2-mkt-due a { color: var(--v2-glow); text-decoration: underline; margin-left: auto; white-space: nowrap; }

/* --- Hub: venues ----------------------------------------------------------------------- */
.v2-mkt-venues { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; margin-bottom: 1.6rem; }
.v2-mkt-venue { position: relative; display: flex; flex-direction: column; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); color: var(--v2-ink); text-decoration: none; }
.v2-mkt-venue:hover { border-color: var(--v2-brass); }
.v2-mkt-venue:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: 3px; }
.v2-mkt-venue .v2-yard-door { height: 6.5rem; }
.v2-mkt-venue .v2-yard-door img { height: 5.5rem; }
.v2-mkt-venue-ic { position: relative; margin-bottom: 1.2rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; color: var(--v2-brass); border: 2px solid rgba(199,154,63,0.6); background: rgba(0,0,0,0.25); }
.v2-mkt-venue-ic .v2-rk-ic { width: 1.9rem; height: 1.9rem; stroke-width: 1.5; }
.v2-mkt-venue-ic b { position: absolute; top: -0.35rem; right: -0.5rem; min-width: 1.4rem; height: 1.4rem; padding: 0 0.3rem; border-radius: 0.7rem; font-family: var(--v2-font-hud); font-size: 0.8rem; line-height: 1.4rem; text-align: center; background: var(--v2-glow); color: var(--v2-ink-dark); }
.v2-mkt-venue-b { padding: 1rem 0.9rem 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.v2-mkt-venue-t { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink-bright); display: flex; align-items: center; gap: 0.45rem; }
.v2-mkt-venue-t .v2-rk-ic { margin-left: auto; color: var(--v2-brass); }
.v2-mkt-venue-s { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); line-height: 1.45; }
.v2-mkt-venue-s b { color: var(--v2-ink); font-weight: 400; }

/* --- Stall cards for horses for sale (hub, yard, /v2/sales) ---------------------------- */
.v2-mkt-stalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 0.9rem; list-style: none; margin: 0; padding: 0; }
.v2-mkt-stall .v2-yard-plate.is-price { font-family: var(--v2-font-hud); font-size: 0.8rem; letter-spacing: 0.02em; padding: 0.1rem 0.6rem; }
.v2-mkt-stall .v2-mkt-chip { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; }
.v2-mkt-meta { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mkt-meta b { color: var(--v2-ink-soft); font-weight: 400; }
.v2-mkt-stall .v2-yard-act { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; }
/* Yard page: the side bill starts at the top of .v2-ring-cols, so give the columns their own gap
   from the For-sale stalls above (the main column's section label margin doesn't cover the aside). */
.v2-mkt-stalls + .v2-ring-cols, .v2-mkt-empty + .v2-ring-cols { margin-top: 1.6rem; }

.v2-mkt-empty { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 1rem; align-items: center; border: 1px dashed var(--v2-line); border-radius: 10px; padding: 1.1rem 1.2rem; background: rgba(0,0,0,0.12); }
.v2-mkt-empty > .v2-rk-ic { grid-row: span 2; width: 2.5rem; height: 2.5rem; color: var(--v2-brass); stroke-width: 1.4; }
.v2-mkt-empty h3 { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink-bright); }
.v2-mkt-empty p { margin: 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-mkt-empty-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.v2-mkt-empty-acts .v2-btn { min-height: 2.5rem; display: inline-flex; align-items: center; }

/* --- Last hammer (results of the last player auction) ---------------------------------- */
.v2-mkt-hammer { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-mkt-hammer li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; align-items: center; padding: 0.6rem 1rem; }
.v2-mkt-hammer li + li { border-top: 1px dashed var(--v2-line); }
.v2-mkt-hammer .v2-name-with-image { min-width: 0; }
.v2-mkt-hammer-p { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.15rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-mkt-hammer-who { grid-column: 1 / -1; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }

/* --- Offers desk (hub preview + /v2/offers) -------------------------------------------- */
.v2-mkt-desk-h { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 0.9rem 0 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yard-clip > .v2-mkt-desk-h { margin: 0; padding: 0.6rem 1rem 0.2rem; font-size: 0.66rem; line-height: 1.3; }
.v2-mkt-offer .v2-yard-ol b { font-family: var(--v2-font-hud); color: var(--v2-glow); font-weight: 700; }
/* The expiry is a money deadline: let the sub-line wrap instead of ellipsizing it away (phones, Larger text). */
.v2-mkt-offer .v2-yard-os { white-space: normal; overflow-wrap: anywhere; }
.v2-mkt-offer.is-out .v2-yard-oi { color: var(--v2-ink-soft); }
.v2-mkt-offer-acts { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.v2-mkt-offer-acts .v2-btn { min-height: 2.5rem; background: transparent; }
.v2-mkt-offer-acts .v2-btn:hover { background: rgba(199,154,63,0.12); }
.v2-mkt-offer-confirm { grid-column: 1 / -1; }
.v2-mkt-offer-confirm[hidden] { display: none; }
.v2-mkt-offer-res { grid-column: 1 / -1; font-family: var(--v2-font-mono); font-size: 0.7rem; }
.v2-mkt-offer-res:empty { display: none; }
.v2-mkt-offer-res.is-ok { color: var(--v2-good); }
.v2-mkt-offer-res.is-bad { color: var(--v2-signal-bright); }
.v2-mkt-clip-empty { padding: 0.8rem 1rem; font-size: 0.78rem; color: var(--v2-ink-soft); }

/* --- Market counter (secondary tools) -------------------------------------------------- */
.v2-mkt-counter { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-mkt-counter li { border-bottom: 1px dashed var(--v2-line); min-width: 0; }
.v2-mkt-counter li:nth-last-child(-n+2) { border-bottom: none; }
.v2-mkt-tool { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.6rem 1rem; min-height: 2.75rem; color: var(--v2-ink); text-decoration: none; }
.v2-mkt-tool:hover { background: rgba(199,154,63,0.06); }
.v2-mkt-tool:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: -2px; }
.v2-mkt-tool > .v2-rk-ic { width: 1.4rem; height: 1.4rem; color: var(--v2-brass); justify-self: center; }
.v2-mkt-tool b { display: block; font-weight: 400; font-size: 0.86rem; }
.v2-mkt-tool small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mkt-tool > .v2-rk-ic:last-child { width: 0.9rem; height: 0.9rem; color: var(--v2-ink-faint); }

/* --- Auction ring: sale window rail ---------------------------------------------------- */
.v2-mkt-window { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.9rem 1.2rem 0.7rem; margin-bottom: 1.2rem; }
.v2-mkt-window-rail { position: relative; height: 0.5rem; border-radius: 4px; background: rgba(243,234,211,0.1); border: 1px solid var(--v2-line); margin: 0.4rem 0.5rem 0; }
.v2-mkt-window-rail i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill, 0%); border-radius: 4px; background: linear-gradient(90deg, var(--v2-brass), var(--v2-glow)); }
.v2-mkt-window-now { position: absolute; top: 50%; left: var(--fill, 0%); width: 0.9rem; height: 0.9rem; transform: translate(-50%, -50%); border-radius: 50%; background: var(--v2-ink-bright); border: 2px solid var(--v2-glow); }
.v2-mkt-window ol { list-style: none; margin: 0.45rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mkt-window ol li:last-child { text-align: right; }
.v2-mkt-window ol b { display: block; font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-mkt-window ol li.hit b { color: var(--v2-glow); }
.v2-mkt-window-line { margin: 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-mkt-window-line b { color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }

/* --- Auction ring: filter bar ---------------------------------------------------------- */
.v2-mkt-filters { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; margin-bottom: 1rem; }
.v2-mkt-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--v2-line); border-radius: 100px; overflow: hidden; margin: 0; padding: 0; }
.v2-mkt-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.v2-mkt-seg label { position: relative; cursor: pointer; }
.v2-mkt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.v2-mkt-seg span { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; padding: 0.25rem 0.8rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-mkt-seg label + label span { border-left: 1px solid var(--v2-line); }
.v2-mkt-seg input:checked + span { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-mkt-seg input:focus-visible + span { outline: 2px solid var(--v2-glow); outline-offset: -2px; }
.v2-mkt-seg small { font-size: 0.66rem; opacity: 0.8; }
.v2-mkt-search { min-height: 2.25rem; min-width: 0; width: 12rem; padding: 0.3rem 0.7rem; border-radius: 100px; border: 1px solid var(--v2-line); background: var(--v2-surface-2); color: var(--v2-ink); font-family: var(--v2-font-body); font-size: 0.8rem; }
.v2-mkt-search:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: 1px; }
.v2-mkt-count { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); margin-left: auto; }

/* --- Auction ring: lot cards ----------------------------------------------------------- */
.v2-mkt-lots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.v2-mkt-lot { position: relative; display: flex; flex-direction: column; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); height: 100%; }
.v2-mkt-lot.is-lead { border-color: rgba(95,200,145,0.55); }
.v2-mkt-lot.is-outbid { border-color: rgba(255,117,87,0.55); }
.v2-mkt-lot[hidden] { display: none; }
.v2-mkt-lot .v2-yard-door { height: 7.5rem; }
.v2-mkt-lot .v2-yard-door img { height: 6.5rem; }
.v2-mkt-lot-tags { position: absolute; top: 0.5rem; left: 0.5rem; right: 0.5rem; z-index: 2; display: flex; justify-content: space-between; gap: 0.4rem; flex-wrap: wrap; }
.v2-mkt-lot-b { padding: 1rem 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.v2-mkt-lot-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.v2-mkt-lot-name a { color: var(--v2-ink-bright); }
.v2-mkt-lot-name a:hover { color: var(--v2-glow); }
.v2-mkt-ped { font-family: var(--v2-font-display); font-style: italic; font-size: 0.8rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-mkt-ped a { color: inherit; }
.v2-mkt-ped a:hover { color: var(--v2-glow); }
.v2-mkt-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-mkt-facts div { display: flex; gap: 0.3rem; }
.v2-mkt-facts dt { margin: 0; }
.v2-mkt-facts dd { margin: 0; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-mkt-note { margin: 0.1rem 0 0; padding: 0.45rem 0.7rem; border-left: 2px solid var(--v2-brass); background: rgba(199,154,63,0.07); border-radius: 0 6px 6px 0; font-family: var(--v2-font-display); font-style: italic; font-size: 0.82rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-mkt-note cite { display: block; font-family: var(--v2-font-mono); font-style: normal; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); margin-top: 0.2rem; }
.v2-mkt-bid { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; align-items: end; padding-top: 0.6rem; border-top: 1px dashed var(--v2-line); }
.v2-mkt-bid-k { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-mkt-bid-v { display: block; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-mkt-bid-who { grid-column: 1 / -1; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-mkt-bid-who b { color: var(--v2-good); font-weight: 600; }
.v2-mkt-bid-who em { font-style: normal; color: var(--v2-ink-faint); }
.v2-mkt-lot-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.v2-mkt-lot-acts .v2-btn { flex: 1; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; }
.v2-mkt-lot-acts .v2-btn:not(.v2-btn-primary) { background: transparent; }
.v2-mkt-lot-acts .v2-btn:not(.v2-btn-primary):hover { background: rgba(199,154,63,0.12); }
.v2-mkt-bidform { border: 1px dashed rgba(255,181,69,0.6); border-radius: 8px; padding: 0.7rem 0.8rem; background: rgba(255,181,69,0.05); display: flex; flex-direction: column; gap: 0.5rem; }
.v2-mkt-bidform[hidden] { display: none; }
.v2-mkt-bidform label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-mkt-bidform .v2-ring-stepper input { width: 5.5rem; }
.v2-mkt-bidform p { margin: 0; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-mkt-bidform p em { font-style: normal; font-family: var(--v2-font-display); color: var(--v2-glow); }
.v2-mkt-bidres { font-family: var(--v2-font-mono); font-size: 0.7rem; }
.v2-mkt-bidres:empty { display: none; }
.v2-mkt-bidres.is-ok { color: var(--v2-good); }
.v2-mkt-bidres.is-bad { color: var(--v2-signal-bright); }
.v2-mkt-nomatch { margin-top: 0.8rem; }
.v2-mkt-nomatch[hidden] { display: none; }

/* --- Bill of sale page (listing buy) + offer slip -------------------------------------- */
.v2-mkt-papers { display: grid; grid-template-columns: 15rem minmax(0, 1fr); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-mkt-papers .v2-yard-door { height: auto; min-height: 13rem; border-bottom: none; border-right: 2px solid var(--v2-brass); }
.v2-mkt-papers .v2-yard-door img { height: 10.5rem; }
.v2-mkt-papers-b { padding: 1.1rem 1.3rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.v2-mkt-papers-h { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.15; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-mkt-papers .v2-fact-grid { margin: 0.2rem 0; }
.v2-mkt-root .v2-ring-confirm-row { flex-wrap: wrap; }
.v2-mkt-root .v2-ring-confirm-row .v2-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; background: transparent; }
.v2-mkt-root .v2-ring-confirm-row .v2-btn.v2-btn-primary { background: var(--v2-brass); }
.v2-mkt-papers .v2-yard-plate { bottom: 0.6rem; }
.v2-mkt-bill-note { margin: 0.6rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); line-height: 1.5; }
.v2-mkt-bill-note a { color: var(--v2-brass); }
.v2-mkt-root .v2-ring-bill .v2-form-input { width: 100%; max-width: none; box-sizing: border-box; }
.v2-mkt-gone { text-align: center; padding: 2rem 1rem; }
.v2-mkt-gone .v2-rk-ic { width: 2.5rem; height: 2.5rem; color: var(--v2-brass); }
.v2-mkt-gone h2 { margin: 0.4rem 0; font-family: var(--v2-font-display); font-weight: 400; color: var(--v2-ink-bright); }

@media (max-width: 900px) {
  .v2-mkt-venues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-mkt-papers { grid-template-columns: 11rem minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .v2-mkt-venues { grid-template-columns: 1fr; gap: 0.55rem; }
  .v2-mkt-venue { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); }
  .v2-mkt-venue .v2-yard-door { height: auto; min-height: 5.5rem; border-bottom: none; border-right: 2px solid var(--v2-brass); }
  .v2-mkt-venue .v2-yard-door img { height: 4.25rem; }
  .v2-mkt-venue .v2-yard-plate { display: none; }
  .v2-mkt-venue-ic { margin-bottom: 0.9rem; width: 2.75rem; height: 2.75rem; }
  .v2-mkt-venue-ic .v2-rk-ic { width: 1.45rem; height: 1.45rem; }
  .v2-mkt-venue-b { padding: 0.65rem 0.75rem; }
  .v2-mkt-stalls { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .v2-mkt-stalls .v2-yard-door { height: 5.5rem; }
  .v2-mkt-stalls .v2-yard-door img { height: 4.5rem; }
  .v2-mkt-stall .v2-mkt-chip { top: 0.3rem; right: 0.3rem; }
  .v2-mkt-counter { grid-template-columns: minmax(0, 1fr); }
  .v2-mkt-counter li:nth-last-child(2) { border-bottom: 1px dashed var(--v2-line); }
  .v2-mkt-empty { grid-template-columns: 1fr; }
  .v2-mkt-empty > .v2-rk-ic { grid-row: auto; }
  .v2-mkt-empty-acts { grid-column: 1; }
  .v2-mkt-empty-acts .v2-btn { flex: 1; min-height: 2.75rem; justify-content: center; }
  /* Masthead: the cream stub becomes a band across the top so the title gets the full width
     (the shipped 2-column phone mast is too tight at Larger text). Scoped to .v2-mkt-mast. */
  .v2-mkt-mast { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .v2-mkt-mast .v2-rc-post { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 0.2rem 0.7rem; min-width: 0; padding: 0.5rem 0.9rem; }
  .v2-mkt-mast .v2-ring-state { margin-top: 0; }
  .v2-mkt-mast .v2-rc-title-col { padding: 0.75rem 0.9rem; }
  .v2-mkt-filters { gap: 0.5rem; }
  .v2-mkt-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.25rem, 1fr)); width: 100%; border-radius: 8px; }
  .v2-mkt-seg span { justify-content: center; height: 100%; }
  .v2-mkt-seg span { min-height: 2.75rem; padding: 0.25rem 0.65rem; }
  /* Each radio cell fills its grid track, so the checked fill covers the whole cell. */
  .v2-mkt-seg label { display: flex; }
  .v2-mkt-seg label span { flex: 1; }
  .v2-mkt-search { width: 100%; min-height: 2.75rem; }
  .v2-mkt-count { margin-left: 0; }
  .v2-mkt-lots { grid-template-columns: 1fr; }
  .v2-mkt-window { padding: 0.8rem 0.9rem 0.6rem; }
  .v2-mkt-papers { grid-template-columns: 1fr; }
  .v2-mkt-papers .v2-yard-door { min-height: 9rem; border-right: none; border-bottom: 2px solid var(--v2-brass); }
  .v2-mkt-papers .v2-yard-door img { height: 7.5rem; }
  .v2-mkt-papers-h { font-size: 1.4rem; }
  .v2-mkt-offer-acts { grid-column: 1 / -1; justify-content: stretch; }
  .v2-mkt-offer-acts .v2-btn { flex: 1; min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-mkt-window-rail i { transition: none; }
}
/* .v2-ring-buy / .v2-ring-confirm(-row) set display, which beats the UA [hidden] rule. */
.v2-mkt-root .v2-ring-buy[hidden], .v2-mkt-root .v2-ring-confirm[hidden], .v2-mkt-root .v2-ring-confirm-row[hidden] { display: none; }
/* ===== end Market (round 3) ===== */
/* ===== Jockeys (round 3) ===== */
/* v2-jockeys.pug ("The Weighing Room") + v2-jockey-details.pug ("Valet's Board"). See SPEC-jockeys.md.
   Reuses .v2-yard-top/-hello/-stable/-ranks/-rank/-door/-plate, .v2-lb-switch/-ranks/-podium/-step* /-plinth/
   -rosette/-pos/-who/-name/-sub/-val/-form/-bar/-form-t, .v2-sx-cap, .v2-rk-*, .v2-rc-pos/-name/-sub/-time/-earn,
   .v2-medal-1/2/3, .v2-section-label .v2-rc-h, .v2-pager, .v2-empty.
   Does NOT use or modify .v2-ranked-row, .v2-horse-row, .v2-lb-line or .v2-rc-line. */

/* -- jockey cap: the search page's .v2-sx-cap, scaled up for the podium door and the hero -- */
.v2-jk-cap { width: 2.75rem; height: 2.75rem; }
.v2-jk-cap.is-lg { width: 4.75rem; height: 4.75rem; font-size: 1.35rem; margin-bottom: 1.25rem; border-width: 3px; }
.v2-jk-cap.is-lg::after { bottom: 0.75rem; left: 0.9rem; right: 0.9rem; height: 0.3rem; }
.v2-jk-cap.is-xl { width: 6.5rem; height: 6.5rem; font-size: 1.9rem; border-width: 3px; }
.v2-jk-cap.is-xl::after { bottom: 1rem; left: 1.2rem; right: 1.2rem; height: 0.4rem; }

/* -- last-10 form figures (oldest -> newest). Medal metals for 1st-3rd, never status colours;
      the digit is always printed, so colour is never the only signal. -- */
.v2-jk-f10 { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 0.1875rem; list-style: none; margin: 0; padding: 0; }
.v2-jk-f10 li { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 3px; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.68rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--v2-ink-soft); background: var(--v2-surface-2); border: 1px solid var(--v2-line); }
.v2-jk-f10 li.f1 { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-jk-f10 li.f2 { background: #c9d3cc; border-color: #c9d3cc; color: var(--v2-ink-dark); }
.v2-jk-f10 li.f3 { background: var(--v2-medal-bronze); border-color: var(--v2-medal-bronze); color: var(--v2-ink-dark); }
.v2-jk-f10 li:last-child { box-shadow: 0 0 0 2px var(--v2-bg), 0 0 0 3px var(--v2-ink-faint); }

/* -- season trend word: arrow + word, neutral ink (it is form, not a status) -- */
.v2-jk-trend { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-jk-trend b { font-weight: 400; font-size: 0.7em; }
.v2-jk-trend.is-up { color: var(--v2-ink-bright); }
.v2-jk-trend.is-up b { color: var(--v2-brass); }
.v2-jk-trend.is-down { color: var(--v2-ink-faint); }

/* -- podium additions (the step itself is .v2-lb-step) -- */
.v2-jk-door { height: 7rem; }
.p1 .v2-jk-door { height: 8.75rem; }
.v2-lb-step .v2-jk-f10 { margin-top: 0.15rem; }

/* -- the weighing-room lines: own 6-column grid (pos, cap, who, last 10, strike rate, winnings).
      Last-10 column is 14.5rem: 10 cells x 1.25rem + 9 gaps x 0.1875rem = 14.19rem, plus the ring. -- */
.v2-jk-lines-head, .v2-jk-line { display: grid; grid-template-columns: 3.25rem 2.75rem minmax(0, 1fr) 14.5rem 7.5rem 8.75rem; gap: 0.8rem; align-items: center; }
.v2-jk-lines-head { padding: 0 1rem 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-jk-lines { list-style: none; margin: 0 0 1.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-jk-line { padding: 0.6rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-jk-line:last-child { border-bottom: none; }
.v2-jk-line:hover { background: rgba(199, 154, 63, 0.05); }
.v2-jk-strike { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.v2-jk-strike b { font-family: var(--v2-font-hud); font-size: 1.05rem; line-height: 1.1; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-jk-strike small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-jk-lastten { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }

/* ============ details: the valet's board ============ */
.v2-jk-back { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 0.9rem; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-brass); min-height: 2.75rem; }
.v2-jk-back:hover { color: var(--v2-glow); }
.v2-jk-back .v2-rk-ic { transform: rotate(180deg); }

.v2-jk-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; border: 1px solid var(--v2-line); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(11, 26, 18, 0.9)), repeating-linear-gradient(90deg, #2a2016 0 22px, #241b12 22px 23px), #2a2016; border-bottom: 3px solid var(--v2-brass); }
.v2-jk-peg { position: relative; display: grid; justify-items: center; padding-bottom: 0.9rem; }
.v2-jk-peg .v2-yard-plate { bottom: -0.2rem; }
.v2-jk-hero-name { margin: 0.1rem 0 0.35rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-jk-hero-tags { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-jk-hero-tags a { color: var(--v2-brass); }
.v2-jk-hero-tags a:hover { color: var(--v2-glow); }
.v2-jk-standing { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; text-align: center; }
.v2-jk-standing small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.v2-jk-standing .v2-lb-rosette { margin-bottom: 0.6rem; }
.v2-jk-standing-n { display: grid; place-items: center; width: 2.875rem; height: 2.875rem; margin-bottom: 0.2rem; border-radius: 50%; border: 2px solid var(--v2-line); font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink); }

.v2-yard-ranks.v2-jk-ranks { width: 100%; margin-bottom: 1rem; }
.v2-jk-ranks .v2-yard-rank { flex: 1 1 0; min-width: 0; }

/* rosette shelf: lifetime placings */
.v2-jk-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; list-style: none; margin: 0 0 0.4rem; padding: 0.9rem 0.9rem 0.7rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(180deg, var(--v2-surface), #3a2a17 92%, #5a4222); border-bottom: 4px solid #8a6a26; }
.v2-jk-shelf li { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.v2-jk-shelf b { display: block; font-family: var(--v2-font-hud); font-size: 1.35rem; line-height: 1.05; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-jk-shelf small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
/* 4th: a plain ribbon in the house green, so it never reads as a medal */
.v2-jk-r4 { background: radial-gradient(circle at 35% 30%, #7fb08e, var(--v2-turf) 60%, var(--v2-turf-deep)); color: var(--v2-ink-bright); }
.v2-jk-shelf-note { margin: 0 0 1.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* two columns: riding profile | where he wins */
.v2-jk-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-bottom: 0.6rem; }
.v2-jk-box { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.4rem 1rem 0.9rem; min-width: 0; }
.v2-jk-box .v2-section-label { flex-wrap: wrap; gap: 0.2rem 0.8rem; margin-top: 0.9rem; }
.v2-jk-box h3 { margin: 0.7rem 0 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-jk-box > p { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-jk-box > p b { color: var(--v2-ink); font-weight: 600; }

/* rating meters: 10 notches, rating printed beside it */
.v2-jk-meters { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto 2rem; gap: 0.35rem 0.7rem; align-items: center; }
.v2-jk-meters dt { min-width: 0; font-size: 0.82rem; color: var(--v2-ink); }
.v2-jk-meters dt small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-jk-meters dd { margin: 0; }
.v2-jk-notches { display: grid; grid-template-columns: repeat(10, 0.6875rem); gap: 0.125rem; }
.v2-jk-notches i { height: 0.75rem; border-radius: 2px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); }
.v2-jk-notches i.on { background: var(--v2-brass); border-color: var(--v2-brass); }
.v2-jk-num { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.95rem; color: var(--v2-ink); text-align: right; font-variant-numeric: tabular-nums; }
.v2-jk-best { margin-left: 0.35rem; font-size: 0.66rem; padding: 0.04rem 0.3rem; vertical-align: 0.15em; }

/* where he wins: track lines with a win-% bar */
.v2-jk-tracks { list-style: none; margin: 0; padding: 0; }
.v2-jk-track { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 3.75rem; gap: 0.6rem; align-items: center; min-height: 2.5rem; border-bottom: 1px dashed var(--v2-line); }
.v2-jk-track:last-child { border-bottom: none; }
.v2-jk-track a { display: flex; align-items: center; gap: 0.45rem; min-width: 0; font-family: var(--v2-font-display); font-size: 0.92rem; color: var(--v2-ink); }
.v2-jk-track a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-jk-track a:hover { color: var(--v2-glow); }
.v2-jk-track a small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); flex: 0 0 auto; }
.v2-jk-pctbar { display: block; height: 0.5rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; }
.v2-jk-pctbar i { display: block; height: 100%; background: var(--v2-brass); }
.v2-jk-pct { text-align: right; font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-jk-pct small { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-jk-track.is-thin a, .v2-jk-track.is-thin .v2-jk-pct { opacity: 0.7; }

/* surface / going / trip tiles */
.v2-jk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.v2-jk-tile { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.5rem 0.6rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); min-width: 0; }
.v2-jk-tile b { font-family: var(--v2-font-hud); font-size: 1.15rem; line-height: 1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-jk-tile small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-jk-tile.is-best { border-color: var(--v2-brass); box-shadow: inset 0 3px 0 var(--v2-brass); }
.v2-jk-tile .v2-rk-going, .v2-jk-tile .v2-rk-surface { align-self: flex-start; }
.v2-jk-trip { font-family: var(--v2-font-display); font-size: 0.9rem; color: var(--v2-ink); }

/* recent rides: own 8-column grid (date, finish, post, portrait, who, conditions, time, earned) */
.v2-jk-rides-head, .v2-jk-ride { display: grid; grid-template-columns: 3.5rem 3.75rem 2.25rem 2.75rem minmax(0, 1fr) 12.5rem 4.25rem 4.5rem; gap: 0.7rem; align-items: center; }
.v2-jk-rides-head { padding: 0 1rem 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-jk-rides { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-jk-ride { padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-jk-ride:last-child { border-bottom: none; }
.v2-jk-ride:hover { background: rgba(199, 154, 63, 0.05); }
.v2-jk-ride.is-win { background: rgba(199, 154, 63, 0.07); box-shadow: inset 3px 0 0 var(--v2-brass); }
.v2-jk-date { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-jk-fin { display: flex; flex-direction: column; line-height: 1.1; }
.v2-jk-fin small { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-jk-ride .v2-rk-cloth { width: 1.875rem; height: 2.25rem; font-size: 0.95rem; }
.v2-jk-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.45rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }

/* stables he rides for: silks jersey + counts */
.v2-jk-stables { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.6rem; list-style: none; margin: 0 0 1.4rem; padding: 0; }
.v2-jk-stable { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.7rem; align-items: center; padding: 0.6rem 0.8rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); min-width: 0; }
.v2-jk-stable.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-jk-silk { width: 2.75rem; height: 2.75rem; }
.v2-jk-silk .jersey { stroke: rgba(243, 234, 211, 0.6); stroke-width: 1.2; }
.v2-jk-silk .cap { stroke: rgba(243, 234, 211, 0.6); stroke-width: 1.2; }
.v2-jk-stable-nm { display: flex; align-items: center; min-width: 0; font-family: var(--v2-font-display); font-size: 0.95rem; }
.v2-jk-stable-nm a { color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-jk-stable-nm a:hover { color: var(--v2-glow); }
.v2-jk-stable small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

@media (max-width: 900px) {
  .v2-jk-lines-head, .v2-jk-line { grid-template-columns: 3rem 2.75rem minmax(0, 1fr) 14.5rem 6.25rem 7.5rem; gap: 0.6rem; }
  .v2-jk-cols { grid-template-columns: minmax(0, 1fr); }
  .v2-jk-rides-head, .v2-jk-ride { grid-template-columns: 3.5rem 3.75rem 2.25rem minmax(0, 1fr) 11rem 4.25rem 4.5rem; }
  .v2-jk-rides-head span:nth-child(4), .v2-jk-ride > .v2-rk-portrait { display: none; }
  .v2-jk-hero { grid-template-columns: auto minmax(0, 1fr); }
  .v2-jk-standing { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 0.6rem; }
  .v2-jk-standing .v2-lb-rosette, .v2-jk-standing-n { margin-bottom: 0; }
}
@media (max-width: 640px) {
  .v2-jk-lines-head { display: none; }
  .v2-jk-line { grid-template-columns: 2.125rem 2.375rem minmax(0, 1fr) auto; grid-template-areas: "pos cap who val" "pos cap strike strike" "pos cap ten ten"; gap: 0.3rem 0.55rem; padding: 0.6rem 0.7rem; }
  .v2-jk-line > .v2-lb-pos { grid-area: pos; font-size: 1rem; }
  .v2-jk-line > .v2-sx-cap { grid-area: cap; width: 2.375rem; height: 2.375rem; font-size: 0.7rem; }
  .v2-jk-line > .v2-lb-who { grid-area: who; }
  .v2-jk-line > .v2-jk-lastten { grid-area: ten; }
  .v2-jk-line > .v2-jk-strike { grid-area: strike; flex-direction: row; align-items: baseline; gap: 0.4rem; text-align: left; }
  .v2-jk-line > .v2-jk-strike b { font-size: 0.85rem; }
  .v2-jk-line > .v2-lb-val { grid-area: val; }
  .v2-jk-line .v2-lb-form-t { display: none; }
  .v2-jk-f10 { gap: 0.125rem; }
  .v2-jk-f10 li { width: 1.0625rem; height: 1.125rem; font-size: 0.6rem; }
  .v2-lb-step .v2-jk-door, .p1 .v2-lb-step .v2-jk-door { height: auto; min-height: 6rem; }
  .v2-jk-cap.is-lg { width: 3.5rem; height: 3.5rem; font-size: 1rem; margin-bottom: 0; }
  .v2-jk-hero { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 0.9rem; gap: 0.7rem; }
  .v2-jk-peg { grid-template-columns: auto; }
  .v2-jk-cap.is-xl { width: 4.5rem; height: 4.5rem; font-size: 1.3rem; }
  .v2-jk-hero-name { font-size: 1.5rem; }
  .v2-yard-ranks.v2-jk-ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .v2-jk-shelf { grid-template-columns: 1fr 1fr; gap: 0.8rem 0.5rem; }
  .v2-jk-shelf li { gap: 0.45rem; }
  .v2-jk-shelf .v2-lb-rosette { width: 2.125rem; height: 2.125rem; font-size: 0.7rem; }
  .v2-jk-shelf .v2-lb-rosette::before, .v2-jk-shelf .v2-lb-rosette::after { width: 0.5625rem; height: 0.875rem; }
  .v2-jk-shelf b { font-size: 1.1rem; }
  .v2-jk-meters { grid-template-columns: minmax(0, 1fr) auto 1.75rem; }
  .v2-jk-notches { grid-template-columns: repeat(10, 0.5rem); }
  .v2-jk-track { grid-template-columns: minmax(0, 1fr) 4rem 3.5rem; }
  .v2-jk-rides-head { display: none; }
  .v2-jk-ride { grid-template-columns: 2.75rem minmax(0, 1fr) auto; grid-template-areas: "fin who time" "fin cond earn" "fin date date"; gap: 0.2rem 0.6rem; padding: 0.6rem 0.7rem; }
  .v2-jk-ride > .v2-jk-fin { grid-area: fin; align-self: start; }
  .v2-jk-ride > .v2-rk-cloth { display: none; }
  .v2-jk-ride > .v2-rc-who { grid-area: who; }
  .v2-jk-ride > .v2-jk-cond { grid-area: cond; }
  .v2-jk-ride > .v2-rc-time { grid-area: time; }
  .v2-jk-ride > .v2-rc-earn { grid-area: earn; }
  .v2-jk-ride > .v2-jk-date { grid-area: date; }
  .v2-jk-stables { grid-template-columns: minmax(0, 1fr); }
  /* Large/Larger text on a phone: the label column gets too narrow for "Colts & geldings  Best" and
     track names, so the label takes its own row and the notches / bar sit under it. */
  html.v2-text-large .v2-jk-meters, html.v2-text-larger .v2-jk-meters { grid-template-columns: minmax(0, 1fr) 1.75rem; row-gap: 0.15rem; }
  html.v2-text-large .v2-jk-meters dt, html.v2-text-larger .v2-jk-meters dt { grid-column: 1 / -1; margin-top: 0.3rem; }
  html.v2-text-large .v2-jk-track, html.v2-text-larger .v2-jk-track { grid-template-columns: minmax(0, 1fr) 4rem; row-gap: 0.15rem; padding: 0.35rem 0; }
  html.v2-text-large .v2-jk-track > a, html.v2-text-larger .v2-jk-track > a { grid-column: 1 / -1; }
}
/* ===== end Jockeys (round 3) ===== */
/* ===== Stable books (round 3) ===== */
/* views/v2-stable-overview.pug ("Racing office") and views/v2-stable-stats.pug ("Season books").
   SPEC-stable-overview.md. Reused unchanged: .v2-yard-top/-hello/-stable/-ranks/-rank/-grid/-main/
   -side/-door/-initials/-trophies/-trophy, .v2-lb-switch/-ranks/-podium/-step* /-rosette/-plinth/
   -lines/-line/-pos/-who/-name/-sub/-form/-bar/-form-t/-val, .v2-st-hook/-links, .v2-sheet/.v2-row,
   .v2-bk-kv, .v2-rk-*, .v2-status-chip, .v2-section-label, .v2-rc-h, .v2-empty, .v2-sr-only.
   Never touches .v2-horse-row / .v2-ranked-row / .v2-fact-*. */

/* -- header: the Office / Season books switch sits right of the stable name -- */
.v2-sb-root .v2-yard-top { align-items: flex-end; }
.v2-sb-root .v2-lb-switch a { gap: 0.4rem; }
.v2-sb-root .v2-lb-switch .v2-rk-ic { width: 0.875rem; height: 0.875rem; }

/* -- a rank badge that is also a link (stretched) -- */
.v2-sb-rank-go { position: relative; }
.v2-sb-rank-go:hover { border-color: var(--v2-brass); }
.v2-sb-rank-go a { color: inherit; }
.v2-sb-rank-go a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.v2-sb-rank-go small b { display: inline; font-family: inherit; font-size: inherit; color: var(--v2-brass); }

/* -- generic card -- */
.v2-sb-card { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; margin-bottom: 1.2rem; }
.v2-sb-card-pad { padding: 0.9rem 1rem; }
.v2-sb-more { display: flex; justify-content: flex-end; margin: -0.6rem 0 1.2rem; font-family: var(--v2-font-mono); font-size: 0.68rem; }
.v2-sb-more a { color: var(--v2-brass); }
.v2-sb-more a:hover { color: var(--v2-glow); }

/* -- Season vs career scorecard (a real table) -- */
.v2-sb-score { width: 100%; border-collapse: collapse; }
.v2-sb-score th, .v2-sb-score td { padding: 0.6rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px dashed var(--v2-line); }
.v2-sb-score tbody tr:last-child > * { border-bottom: none; }
.v2-sb-score thead th { padding-top: 0.75rem; padding-bottom: 0.5rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sb-score thead th.v2-sb-c-now { color: var(--v2-glow); }
.v2-sb-score tbody th { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.92rem; color: var(--v2-ink-soft); width: 9rem; }
/* This-season column: tint + a 3px glow rule on its header, never colour alone (the header says "Season 44"). */
.v2-sb-score .v2-sb-c-now { background: rgba(255, 181, 69, 0.05); }
.v2-sb-score thead .v2-sb-c-now { box-shadow: inset 0 3px 0 var(--v2-glow); }
.v2-sb-n { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.25rem; line-height: 1.1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-sb-n.is-money { color: var(--v2-glow); }
.v2-sb-n small { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-score .v2-lb-form { max-width: 13rem; }
.v2-sb-d-mob { display: none; }

/* -- trend chip: arrow + word, status colour only as reinforcement -- */
.v2-sb-delta { display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); border: 1px solid var(--v2-line); border-radius: 100px; padding: 0.12rem 0.55rem; white-space: nowrap; }
.v2-sb-delta.is-up { color: var(--v2-good); border-color: rgba(95, 200, 145, 0.45); }
.v2-sb-delta.is-down { color: var(--v2-signal-soft); border-color: rgba(255, 117, 87, 0.45); }
.v2-sb-delta.is-flat { border-style: dashed; }

/* -- Takings & outgoings ledger -- */
.v2-sb-ledger { padding: 0.9rem 1rem 0.8rem; box-shadow: inset 3px 0 0 var(--v2-brass); }
.v2-sb-lg-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 0.3rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-sb-lg-h + .v2-sb-lg-list { margin-bottom: 0.8rem; }
.v2-sb-lg-list { list-style: none; margin: 0; padding: 0; }
.v2-sb-lg-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: baseline; padding: 0.32rem 0; border-bottom: 1px dotted rgba(199, 154, 63, 0.3); }
.v2-sb-lg-l { min-width: 0; font-size: 0.84rem; color: var(--v2-ink); }
.v2-sb-lg-l small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-lg-a { font-family: var(--v2-font-mono); font-size: 0.82rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.v2-sb-lg-list.is-out .v2-sb-lg-a { color: var(--v2-ink-soft); }
.v2-sb-lg-tot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; margin-top: 0.2rem; padding-top: 0.55rem; border-top: 3px double var(--v2-brass); }
.v2-sb-lg-tot > span:first-child { font-family: var(--v2-font-display); font-size: 0.95rem; color: var(--v2-ink); }
.v2-sb-lg-net { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.v2-sb-lg-net b { font-family: var(--v2-font-hud); font-size: 1.3rem; line-height: 1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
/* Takings vs outgoings proportion: decorative, the two totals beside it carry the numbers. */
.v2-sb-split { display: flex; height: 0.5rem; margin: 0.7rem 0 0.35rem; border-radius: 4px; overflow: hidden; border: 1px solid var(--v2-line); background: var(--v2-surface-2); }
.v2-sb-split i.in { background: var(--v2-brass); }
.v2-sb-split i.out { background: repeating-linear-gradient(135deg, var(--v2-ink-faint) 0 3px, transparent 3px 6px); }
.v2-sb-split-k { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-note { margin: 0.6rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; line-height: 1.5; color: var(--v2-ink-faint); }
.v2-sb-note a { color: var(--v2-brass); }
.v2-sb-note a:hover { color: var(--v2-glow); }

/* -- Stars of the season: podium + form lines reuse Leaderboards; only the header switch row is new -- */
.v2-sb-board-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 1.8rem 0 0.7rem; }
.v2-sb-board-head .v2-rc-h { font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); margin: 0; }
.v2-sb-board-head .v2-lb-switch a { min-height: 2rem; font-size: 0.66rem; padding: 0.25rem 0.8rem; }
.v2-sb-root .v2-lb-podium { margin-bottom: 0.9rem; }
.v2-sb-root .v2-lb-lines { margin-bottom: 0.6rem; }
.v2-sb-tally { margin: 0 0 0.9rem; font-size: 0.66rem; }
/* Trophy shelf: the special-class tag sits after the race name. */
.v2-sb-root .v2-yard-trophy b .v2-rk-tag, .v2-sb-root .v2-yard-trophy b .v2-rk-grade { margin-left: 0.35rem; }
.v2-sb-root .v2-yard-trophy b .v2-rk-grade { width: 1.375rem; height: 1.375rem; font-size: 0.56rem; }

/* -- Latest winners: Home's program-sheet rows, date stub instead of post time -- */
.v2-sb-root .v2-row .v2-post { font-size: 1rem; text-transform: uppercase; }
.v2-sb-root .v2-row .v2-race-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.v2-sb-root .v2-row .v2-rk-surface { font-size: 0.66rem; padding: 0.12rem 0.5rem 0.12rem 0.2rem; }
.v2-sb-root .v2-row .v2-rk-swatch { width: 0.875rem; height: 0.875rem; }

/* -- Stable tools: the roster's tack hooks, stacked in the side column -- */
.v2-sb-tools { display: grid; gap: 0.8rem; }

/* -- Special events (date-gated) -- */
.v2-sb-event { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: 0.9rem 1rem; border-color: rgba(255, 181, 69, 0.45); }
.v2-sb-event-logo { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; }
.v2-sb-event-logo img { max-width: 100%; height: 3.75rem; width: auto; object-fit: contain; }
.v2-sb-event-logo small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-event-logo b { font-family: var(--v2-font-hud); font-size: 1.1rem; color: var(--v2-glow); }
.v2-sb-event h2 { margin: 0 0 0.3rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.15rem; color: var(--v2-ink-bright); }

/* -- Season books: earnings by season (bar list, decorative bars + visible values) -- */
.v2-sb-trend { list-style: none; margin: 0 0 0.4rem; padding: 1rem 1rem 0.7rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.45rem; align-items: stretch; height: 14rem; }
.v2-sb-trend li { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.v2-sb-well { flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 0; }
.v2-sb-bar-v { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); margin-bottom: 0.2rem; white-space: nowrap; }
.v2-sb-bar { width: 100%; max-width: 2.75rem; height: calc(var(--h, 0) * 1%); min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); }
.v2-sb-trend li.is-best .v2-sb-bar { box-shadow: 0 0 12px rgba(255, 181, 69, 0.45); background: linear-gradient(180deg, #ffe3a3, var(--v2-glow)); }
.v2-sb-trend li.is-best .v2-sb-bar-v { color: var(--v2-glow); font-weight: 700; }
/* Season in progress: hatched + dashed outline + "to date" text. */
.v2-sb-trend li.is-now .v2-sb-bar { background: repeating-linear-gradient(135deg, rgba(255, 181, 69, 0.5) 0 4px, rgba(255, 181, 69, 0.15) 4px 8px); border: 1px dashed var(--v2-glow); border-bottom: none; }
.v2-sb-bar-s { margin-top: 0.35rem; padding-top: 0.3rem; width: 100%; border-top: 1px solid var(--v2-line); text-align: center; font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; color: var(--v2-ink); }
.v2-sb-bar-s small { display: block; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-sb-trend-key { display: flex; gap: 0.4rem 1.1rem; flex-wrap: wrap; padding: 0 1rem 0.8rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-trend-key i { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; background: var(--v2-brass); }
.v2-sb-trend-key i.best { background: var(--v2-glow); }
.v2-sb-trend-key i.now { background: repeating-linear-gradient(135deg, rgba(255, 181, 69, 0.6) 0 2px, transparent 2px 4px); border: 1px dashed var(--v2-glow); }

/* -- Season books: season ledger table -- */
.v2-sb-seasons { width: 100%; border-collapse: collapse; }
.v2-sb-seasons th, .v2-sb-seasons td { padding: 0.55rem 0.8rem; text-align: left; vertical-align: middle; border-bottom: 1px dashed var(--v2-line); }
.v2-sb-seasons tbody tr:last-child > * { border-bottom: none; }
.v2-sb-seasons thead th { font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-sb-seasons .is-r { text-align: right; }
.v2-sb-seasons tbody th { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink); white-space: nowrap; }
.v2-sb-seasons tbody th small { display: block; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-seasons td { font-family: var(--v2-font-mono); font-size: 0.78rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; }
.v2-sb-seasons td.is-money { color: var(--v2-glow); }
.v2-sb-seasons .v2-lb-form { min-width: 9rem; }
.v2-sb-seasons tr.is-now { background: rgba(255, 181, 69, 0.06); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-sb-seasons tr.is-best th::after { content: "best"; margin-left: 0.4rem; font-family: var(--v2-font-mono); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-dark); background: var(--v2-glow); padding: 0.05rem 0.35rem; border-radius: 3px; vertical-align: 0.15em; }
.v2-sb-seasons .v2-sb-nil { color: var(--v2-ink-faint); }
.v2-sb-mob { display: none; }

/* -- Season books: retired string -- */
.v2-sb-retired .v2-bk-kv { margin-bottom: 0.7rem; }
.v2-sb-retired .v2-lb-form { max-width: 26rem; }

@media (max-width: 900px) {
  /* Home's rule is 1fr (min-content floor); a long ledger line must not widen the page. */
  .v2-sb-root .v2-yard-grid { grid-template-columns: minmax(0, 1fr); }
  /* Home lifts its side column above the stalls; here the scorecard and stars lead. */
  .v2-sb-root .v2-yard-side { order: 0; }
  .v2-sb-score tbody th { width: 7.5rem; }
  .v2-sb-trend { gap: 0.3rem; }
  .v2-sb-bar-v { font-size: 0.66rem; }
  .v2-sb-seasons .v2-sb-c-run { display: none; }
}
@media (max-width: 640px) {
  .v2-sb-root .v2-yard-top .v2-lb-switch { width: 100%; }
  .v2-sb-root .v2-lb-switch a { flex: 1; justify-content: center; }
  /* Scorecard: three columns; the trend chip moves under the season value. */
  .v2-sb-score th, .v2-sb-score td { padding: 0.5rem 0.55rem; }
  .v2-sb-score { table-layout: fixed; }
  .v2-sb-score thead th:first-child, .v2-sb-score tbody th { width: 28%; font-size: 0.82rem; }
  .v2-sb-score td { overflow-wrap: anywhere; }
  .v2-sb-score .v2-sb-c-delta { display: none; }
  .v2-sb-d-mob { display: block; margin-top: 0.3rem; }
  .v2-sb-n { font-size: 1.05rem; }
  .v2-sb-score .v2-lb-form-t { white-space: normal; }
  .v2-sb-event { grid-template-columns: 1fr; }
  .v2-sb-event-logo { flex-direction: row; justify-content: flex-start; text-align: left; }
  .v2-sb-event-logo img { height: 2.75rem; }
  /* Trend: last 8 seasons only (the table below lists all of them). */
  .v2-sb-trend { grid-template-columns: repeat(8, minmax(0, 1fr)); height: 12rem; padding: 0.8rem 0.6rem 0.6rem; }
  .v2-sb-trend li.v2-sb-old { display: none; }
  .v2-sb-bar-v { display: none; }
  .v2-sb-trend li.is-best .v2-sb-bar-v, .v2-sb-trend li.is-now .v2-sb-bar-v { display: block; }
  .v2-sb-trend-key { padding: 0 0.6rem 0.7rem; }
  /* Season table: 3 visible columns; win %, per start and runners fold into sub-lines. */
  .v2-sb-seasons th, .v2-sb-seasons td { padding: 0.5rem 0.5rem; }
  .v2-sb-seasons .v2-sb-c-run, .v2-sb-seasons .v2-sb-c-pct, .v2-sb-seasons .v2-sb-c-per, .v2-sb-seasons .v2-sb-c-net { display: none; }
  .v2-sb-seasons .v2-lb-form { min-width: 0; }
  .v2-sb-seasons .v2-lb-form-t { white-space: normal; }
  .v2-sb-seasons td.is-money { white-space: normal; }
  .v2-sb-bar-s small { display: none; }
  .v2-sb-trend li.is-best .v2-sb-bar-s small, .v2-sb-trend li.is-now .v2-sb-bar-s small { display: block; }
  .v2-sb-score .v2-lb-form { max-width: none; }
  .v2-sb-root .v2-section-label { flex-wrap: wrap; gap: 0.2rem 0.8rem; }
  .v2-sb-mob { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
}
@media (prefers-reduced-motion: reduce) {
  .v2-sb-root * { transition: none !important; }
}
.v2-sb-root .v2-row .v2-purse small.v2-sb-won { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-sb-foot { margin-top: 1.2rem; }
/* An unbroken stable name (no spaces) must wrap, not widen the page at 375. */
.v2-sb-root .v2-yard-top > div:first-child { min-width: 0; }
.v2-sb-root .v2-yard-stable { overflow-wrap: anywhere; }
/* Phone scorecard: the trend chip sits in a narrow cell; let it wrap instead of spilling into Career. */
@media (max-width: 640px) {
  .v2-sb-d-mob .v2-sb-delta { display: inline-block; white-space: normal; border-radius: 0.6rem; line-height: 1.35; }
  .v2-sb-d-mob .v2-sb-delta > span[aria-hidden] { margin-right: 0.3rem; }
}
.v2-sb-root .v2-empty + .v2-sb-tally { margin-top: 0.6rem; }
/* ===== end Stable books (round 3) ===== */
/* ===== Big Races (round 3) ===== */
/* Stakes hub + every prestige-series page (SPEC-stakes.md). Prefix .v2-br-*.
   Reuses .v2-yard-top/-hello/-stable/-ranks/-rank, .v2-raceticket + .v2-rh-next(-oval/-title),
   .v2-countdown, the race kit (.v2-rk-*), .v2-lb-rosette, .v2-lb-dir, .v2-name-with-image,
   .v2-horse-color, .v2-table, .v2-filter-bar, .v2-section-label, .v2-cross-link, .v2-empty.
   Does NOT touch .v2-horse-row, .v2-ranked-row or any kit rule. */

.v2-br-sec { margin-top: 1.6rem; }
.v2-br-note { margin: 0.6rem 0 0; font-size: 0.78rem; color: var(--v2-ink-faint); }
.v2-br-note b { color: var(--v2-ink); }
.v2-br-none { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* -- hub header jump links -- */
.v2-br-jump { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-family: var(--v2-font-mono); font-size: 0.7rem; }
.v2-br-jump a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--v2-brass); }
.v2-br-jump a:hover { color: var(--v2-glow); }

/* -- series crest: brass rosette + monogram (+ honour flag) -- */
.v2-br-crest { position: relative; z-index: 0; isolation: isolate; display: inline-grid; place-items: center; flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #24402f, var(--v2-surface-2) 70%); border: 2px solid var(--v2-brass); box-shadow: inset 0 0 0 3px var(--v2-surface), inset 0 0 0 4px rgba(199, 154, 63, 0.5), 0 0 0 2px rgba(0, 0, 0, 0.35); }
.v2-br-crest::before, .v2-br-crest::after { content: ""; position: absolute; z-index: -1; top: 72%; width: 0.7rem; height: 1.15rem; background: var(--v2-brass); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.v2-br-crest::before { left: 0.45rem; transform: rotate(16deg); }
.v2-br-crest::after { right: 0.45rem; transform: rotate(-16deg); }
.v2-br-crest-mono { font-family: var(--v2-font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; color: #f0d48e; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.v2-br-crest-flag { position: absolute; right: -0.3rem; top: -0.3rem; width: 1rem; height: 1rem; border-radius: 3px; background: var(--v2-bg); box-shadow: 0 0 0 2px var(--v2-bg); }
/* The two finals series wear the gold ring (medal metal, not a status colour). */
.v2-br-crest.is-triple-crown, .v2-br-crest.is-breeders-cup { border-color: #e7b85a; box-shadow: inset 0 0 0 3px var(--v2-surface), inset 0 0 0 4px rgba(255, 227, 163, 0.6), 0 0 0 2px rgba(0, 0, 0, 0.35), 0 0 14px rgba(231, 184, 90, 0.25); }
.v2-br-crest.lg { width: 4.75rem; height: 4.75rem; }
.v2-br-crest.lg .v2-br-crest-mono { font-size: 1.55rem; }
.v2-br-crest.lg::before, .v2-br-crest.lg::after { width: 1rem; height: 1.7rem; }
.v2-br-crest.lg::before { left: 0.8rem; }
.v2-br-crest.lg::after { right: 0.8rem; }
.v2-br-crest.lg .v2-br-crest-flag { width: 1.25rem; height: 1.25rem; right: -0.15rem; top: -0.15rem; }
.v2-br-crest.sm { width: 1.75rem; height: 1.75rem; border-width: 1px; box-shadow: inset 0 0 0 2px var(--v2-surface); }
.v2-br-crest.sm::before, .v2-br-crest.sm::after { display: none; }
.v2-br-crest.sm .v2-br-crest-mono { font-size: 0.66rem; }

/* -- status: icon + word + detail -- */
.v2-br-state { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.4rem; max-width: 100%; border: 1px solid var(--v2-line); border-radius: 100px; padding: 0.15rem 0.65rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-br-state .v2-rk-ic { width: 0.9rem; height: 0.9rem; }
.v2-br-state b { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.v2-br-state.is-live { border-color: rgba(95, 200, 145, 0.45); background: rgba(95, 200, 145, 0.1); }
.v2-br-state.is-live b, .v2-br-state.is-live .v2-rk-ic { color: var(--v2-good); }
.v2-br-state.is-soon { border-color: rgba(255, 181, 69, 0.45); background: rgba(255, 181, 69, 0.08); }
.v2-br-state.is-soon b, .v2-br-state.is-soon .v2-rk-ic { color: var(--v2-glow); }
.v2-br-state.is-rest { border-style: dashed; }
.v2-br-state.is-rest b, .v2-br-state.is-rest .v2-rk-ic { color: var(--v2-ink-faint); }

/* -- family strip -- */
.v2-br-family { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.v2-br-fam { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.3rem 0.85rem 0.3rem 0.4rem; border: 1px solid var(--v2-line); border-radius: 100px; background: var(--v2-surface); font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-br-fam > .v2-rk-ic { width: 1.75rem; height: 1.1rem; color: var(--v2-brass); }
.v2-br-fam:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
/* Current = tint + brass underline + bold: never colour alone. */
.v2-br-fam.on { background: linear-gradient(180deg, rgba(199, 154, 63, 0.22), rgba(199, 154, 63, 0.06)); border-color: var(--v2-brass); box-shadow: inset 0 -3px 0 var(--v2-brass); color: var(--v2-ink-bright); font-weight: 700; }

/* -- banner (every series page) -- */
.v2-br-banner { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 22rem); gap: 1.2rem 1.4rem; align-items: center; padding: 1.3rem 1.4rem 1.6rem; margin-bottom: 1.2rem; border: 1px solid var(--v2-line); border-radius: 12px; background: radial-gradient(120% 140% at 0% 0%, rgba(199, 154, 63, 0.16), rgba(199, 154, 63, 0) 55%), var(--v2-surface); overflow: hidden; }
/* Running rail along the foot of the banner: rail + posts. Decorative. */
.v2-br-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.45rem; height: 0.55rem; background: linear-gradient(var(--v2-rail), var(--v2-rail)) top / 100% 2px no-repeat, repeating-linear-gradient(90deg, var(--v2-rail) 0 2px, transparent 2px 2.5rem); opacity: 0.35; pointer-events: none; }
.v2-br-banner-txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.v2-br-banner .v2-yard-hello a { color: var(--v2-brass); }
.v2-br-banner .v2-yard-hello a:hover { color: var(--v2-glow); }
.v2-br-title { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--v2-ink-bright); }
.v2-br-blurb { margin: 0; max-width: 34rem; font-size: 0.86rem; color: var(--v2-ink-soft); }
.v2-br-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.v2-br-facts .v2-yard-rank { min-width: 0; background: rgba(11, 26, 18, 0.55); }
.v2-br-facts .v2-yard-rank > span { min-width: 0; }
.v2-br-banner.is-s { grid-template-columns: auto minmax(0, 1fr); }

/* -- countdown ticket: Racing hub's next-off ticket, unchanged; a little space after -- */
.v2-br-ticket { margin-top: 0.4rem; }
.v2-br-then { list-style: none; margin: 0.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-faint); }
.v2-br-then-h { letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-br-then a { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; color: var(--v2-ink); }
.v2-br-then a b { color: var(--v2-glow); font-weight: 700; }
.v2-br-then a:hover span { color: var(--v2-glow); }
.v2-br-then small { margin-left: 0.35rem; font-size: 0.66rem; color: var(--v2-ink-faint); }

/* -- season calendar -- */
.v2-br-cal-wrap { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.4rem 0.6rem 0.6rem; }
.v2-br-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.v2-br-cal th, .v2-br-cal td { padding: 0; text-align: center; }
.v2-br-cal thead th { height: 2.4rem; vertical-align: bottom; padding-bottom: 0.3rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.58rem; color: var(--v2-ink-faint); border-bottom: 1px solid var(--v2-line); }
.v2-br-cal thead th:first-child { width: 9.5rem; }
.v2-br-cal thead th.is-month .v2-br-cal-wk { color: var(--v2-ink-soft); }
.v2-br-cal-wk { display: block; white-space: nowrap; }
.v2-br-cal-now { display: block; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-glow); }
.v2-br-cal tbody th { text-align: left; padding: 0.35rem 0.5rem 0.35rem 0; font-weight: 400; }
.v2-br-cal tbody th a { display: block; font-family: var(--v2-font-display); font-size: 0.86rem; color: var(--v2-ink); }
.v2-br-cal tbody th a:hover { color: var(--v2-glow); }
.v2-br-cal tbody th small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-cal tbody tr + tr > * { border-top: 1px dashed var(--v2-line); }
.v2-br-cal td { height: 2.6rem; border-left: 1px dashed rgba(199, 154, 63, 0.14); }
.v2-br-cal .is-today { background: rgba(255, 181, 69, 0.08); box-shadow: inset 2px 0 0 rgba(255, 181, 69, 0.55), inset -2px 0 0 rgba(255, 181, 69, 0.55); }
.v2-br-cal td.is-past .v2-br-pip { opacity: 0.45; }
.v2-br-pip { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.2rem; border-radius: 100px; border: 1px solid var(--v2-brass); background: var(--v2-surface-2); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; color: var(--v2-ink); }
/* Finals lane: the medal-gold pip (the same metal as a G1 rosette), plus the lane label says "finals". */
.v2-br-cal tr.is-final .v2-br-pip, .v2-br-pip.is-fin, .v2-br-l-wall li.is-final .v2-br-pip { background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); border-color: rgba(255, 248, 234, 0.75); color: var(--v2-ink-dark); }
.v2-br-key { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.5rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-pip.is-key { min-width: 1.15rem; height: 1.15rem; font-size: 0.58rem; }
.v2-br-key-now { display: inline-block; width: 0.9rem; height: 0.9rem; margin-left: 0.4rem; border-left: 2px solid rgba(255, 181, 69, 0.55); border-right: 2px solid rgba(255, 181, 69, 0.55); background: rgba(255, 181, 69, 0.08); }

/* -- series gates (hub) -- */
.v2-br-gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.9rem; }
.v2-br-gates > li { min-width: 0; }
.v2-br-gate { position: relative; height: 100%; display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem 1rem 0.8rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-br-gate:hover { border-color: var(--v2-brass); }
.v2-br-gate:focus-within { border-color: var(--v2-glow); }
.v2-br-gate.is-rest { background: transparent; border-style: dashed; }
.v2-br-gate-head { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.v2-br-gate-head > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.v2-br-gate-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.15rem; line-height: 1.2; }
.v2-br-gate-link { color: var(--v2-ink); }
/* Stretched link: the whole card opens the series page; inner links sit above it. */
.v2-br-gate-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 10px; }
.v2-br-gate:hover .v2-br-gate-link { color: var(--v2-glow); }
.v2-br-gate-link:focus-visible { outline: none; }
.v2-br-gate-link:focus-visible::after { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-br-gate-blurb { margin: 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-br-gate-facts { margin: 0; display: grid; gap: 0.45rem; }
.v2-br-gate-facts > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; }
.v2-br-gate-facts dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-br-gate-facts dd { margin: 0; min-width: 0; font-size: 0.82rem; color: var(--v2-ink); }
.v2-br-gate-facts dd a, .v2-br-gate-facts .v2-br-winner { position: relative; z-index: 2; }
.v2-br-gate-facts dd > a { color: var(--v2-brass); }
.v2-br-gate-facts dd > a:hover { color: var(--v2-glow); }
.v2-br-gate-cta { margin-top: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }

/* -- winner line -- */
.v2-br-winner { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.45rem; min-width: 0; max-width: 100%; }
.v2-br-winner .v2-name-with-image { color: var(--v2-ink); font-family: var(--v2-font-display); }
.v2-br-winner .v2-name-with-image:hover .v2-name { color: var(--v2-glow); }
.v2-br-winner .v2-name { overflow-wrap: anywhere; }
.v2-br-winner .v2-rk-mine { margin-left: 0; }
.v2-br-winner-stable { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* -- named stakes list (hub) -- */
.v2-br-stakes { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-br-stakes li + li { border-top: 1px dashed var(--v2-line); }
.v2-br-stake { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; padding: 0.65rem 1rem; min-height: 2.75rem; }
.v2-br-stake:hover { background: rgba(199, 154, 63, 0.06); }
.v2-br-stake:focus-visible { outline-offset: -3px; }
.v2-br-stake-day b { display: block; font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-ink); }
.v2-br-stake-day small, .v2-br-stake-purse small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-stake-what { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.v2-br-stake-top { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.v2-br-stake-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); }
.v2-br-stake-top .v2-rk-grade { width: 1.5rem; height: 1.5rem; font-size: 0.6rem; }
.v2-br-stake-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-br-stake-purse { display: flex; flex-direction: column; align-items: flex-end; }
.v2-br-stake-purse b { font-family: var(--v2-font-hud); font-size: 1.05rem; color: var(--v2-glow); }
.v2-br-empty a { color: var(--v2-brass); }

/* -- the road -- */
.v2-br-road { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.8rem; }
/* The rail the stations sit on: top rail + posts. Decorative. */
.v2-br-road::before { content: ""; position: absolute; left: 1.2rem; right: 1.2rem; top: 0.95rem; height: 0.55rem; background: linear-gradient(var(--v2-rail), var(--v2-rail)) top / 100% 2px no-repeat, repeating-linear-gradient(90deg, var(--v2-rail) 0 2px, transparent 2px 1.25rem); opacity: 0.5; }
.v2-br-stop { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.v2-br-pin { position: relative; z-index: 1; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 2px solid var(--v2-brass); background: var(--v2-surface-2); font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink); }
.v2-br-pin .v2-rk-ic { width: 1.2rem; height: 1.2rem; }
.v2-br-stop-card { width: 100%; flex: 1; margin-top: 0.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; min-width: 0; padding: 0.75rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-br-stop-label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-br-stop-name { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.05rem; line-height: 1.2; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-br-stop-name a { color: var(--v2-ink); }
.v2-br-stop-name a:hover { color: var(--v2-glow); }
.v2-br-stop-when { font-family: var(--v2-font-hud); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--v2-ink); }
.v2-br-stop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.45rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-br-stop-oval { display: block; width: 3.75rem; background: #0f2218; border: 1px solid var(--v2-line); border-radius: 6px; padding: 2px 0.2rem; }
.v2-br-stop-detail { font-size: 0.76rem; color: var(--v2-ink-soft); }
.v2-br-stop-state b { display: inline-block; border: 1px solid var(--v2-line); border-radius: 4px; padding: 0.05rem 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-soft); }
.v2-br-stop-cd { text-align: left; }
.v2-br-stop-link { font-size: 0.7rem; }
/* States: pin + card + the printed word. */
.v2-br-stop.is-run .v2-br-pin { background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-br-stop.is-next .v2-br-pin { border-color: var(--v2-glow); box-shadow: 0 0 0 4px rgba(255, 181, 69, 0.18); color: var(--v2-glow); }
.v2-br-stop.is-next .v2-br-stop-card { border-color: rgba(255, 181, 69, 0.55); box-shadow: inset 0 3px 0 var(--v2-glow); }
.v2-br-stop.is-next .v2-br-stop-state b { color: var(--v2-glow); border-color: rgba(255, 181, 69, 0.5); }
.v2-br-stop.is-live .v2-br-pin { border-color: var(--v2-good); color: var(--v2-good); }
.v2-br-stop.is-live .v2-br-stop-state b { color: var(--v2-good); border-color: rgba(95, 200, 145, 0.45); }
.v2-br-stop.is-off .v2-br-pin, .v2-br-stop.is-rule .v2-br-pin { border-style: dashed; color: var(--v2-ink-faint); background: var(--v2-bg); }
.v2-br-stop.is-off .v2-br-stop-card { background: transparent; border-style: dashed; }
.v2-br-stop.is-end .v2-br-pin { width: 2.6rem; height: 2.6rem; margin-top: -0.175rem; border-color: rgba(255, 248, 234, 0.75); background: radial-gradient(circle at 35% 30%, #ffe3a3, var(--v2-glow) 60%, #b97a1c); color: var(--v2-ink-dark); }
.v2-br-stop.is-end .v2-br-stop-card { background: linear-gradient(180deg, rgba(199, 154, 63, 0.14), rgba(199, 154, 63, 0.03)); border-color: rgba(199, 154, 63, 0.55); }
.v2-br-quiet { display: flex; align-items: flex-start; gap: 0.7rem; margin-top: 0.9rem; padding: 0.8rem 1rem; border: 1px dashed var(--v2-line); border-radius: 10px; }
.v2-br-quiet .v2-rk-ic { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; color: var(--v2-ink-faint); margin-top: 0.1rem; }
.v2-br-quiet p { margin: 0; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-br-quiet b { color: var(--v2-ink); font-weight: 600; }

/* -- honours board: walnut board, gilt lettering -- */
.v2-br-board { padding: 0.9rem 1.1rem 1rem; border: 2px solid var(--v2-brass); border-radius: 10px; background: linear-gradient(180deg, var(--v2-dirt-deep), var(--v2-dirt-speck)); box-shadow: inset 0 0 0 4px rgba(26, 20, 8, 0.55), inset 0 0 0 5px rgba(199, 154, 63, 0.3); }
.v2-br-honours { width: 100%; border-collapse: collapse; }
.v2-br-honours thead th { padding: 0.3rem 0.6rem 0.6rem; text-align: left; vertical-align: bottom; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.98rem; color: #f0d48e; border-bottom: 1px solid rgba(240, 212, 142, 0.4); }
.v2-br-honours thead th small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-dirt-light); }
.v2-br-honours tbody th, .v2-br-honours tbody td { padding: 0.7rem 0.6rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(240, 212, 142, 0.16); }
.v2-br-honours tbody tr:last-child > * { border-bottom: none; }
.v2-br-honours tbody th { width: 7.5rem; font-weight: 400; }
.v2-br-honours.is-grid tbody th { font-family: var(--v2-font-display); font-size: 0.95rem; color: #f0d48e; width: 9rem; }
.v2-br-season { display: block; font-family: var(--v2-font-display); font-size: 1.7rem; line-height: 1; color: #f0d48e; }
.v2-br-season::before { content: "Season "; display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-dirt-light); }
.v2-br-board .v2-br-winner .v2-name-with-image { color: var(--v2-ink-bright); }
.v2-br-board .v2-br-winner-stable { color: var(--v2-dirt-light); flex-basis: 100%; }
.v2-br-board .v2-br-none { color: var(--v2-dirt-light); }
.v2-br-board-race { display: block; margin-top: 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-dirt-light); }
.v2-br-board-race:hover { color: #f0d48e; text-decoration: underline; }
.v2-br-flagword { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.4rem; border: 1px solid #f0d48e; border-radius: 4px; padding: 0.05rem 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: #f0d48e; }
.v2-br-flagword .v2-rk-ic { width: 0.8rem; height: 0.8rem; }
.v2-br-flagword.is-near { border-style: dashed; }
.v2-br-honours tr.is-sweep > * { background: rgba(255, 227, 163, 0.08); }
.v2-br-honours caption { caption-side: top; padding: 0 0.6rem 0.4rem; text-align: left; font-family: var(--v2-font-display); font-size: 1.05rem; color: #f0d48e; }
.v2-br-board + .v2-br-board { margin-top: 0.9rem; }
.v2-br-extra { list-style: none; margin: 0.6rem 0 0; padding: 0; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-br-extra a { color: var(--v2-brass); }

/* -- records plaques -- */
.v2-br-records { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0.6rem; }
.v2-br-records li { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; padding: 0.65rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.v2-br-records small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-br-records b, .v2-br-records a { font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; color: var(--v2-ink); }
.v2-br-records a:hover .v2-name { color: var(--v2-glow); }
.v2-br-records span:last-child { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-brass); }

/* -- full results / ledgers -- */
.v2-br-more { margin-top: 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-br-more > summary { display: flex; align-items: center; gap: 0.8rem; min-height: 2.75rem; padding: 0.5rem 1rem; cursor: pointer; font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); }
.v2-br-more > summary small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-more[open] > summary { border-bottom: 1px dashed var(--v2-line); }
.v2-br-more > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.v2-br-more > :last-child { margin-bottom: 1rem; }
.v2-br-more-h { margin: 0.9rem 0 0.5rem; font-family: var(--v2-font-hud); font-size: 0.95rem; letter-spacing: 0.03em; color: var(--v2-ink); }
.v2-br-more .v2-table td a { color: var(--v2-brass); }

/* -- conditions (race-conditions-book page) -- */
.v2-br-conditions { margin-top: 1.4rem; padding: 0.9rem 1.1rem; border-left: 3px solid var(--v2-brass); border-radius: 0 10px 10px 0; background: var(--v2-surface); }
.v2-br-conditions h2 { margin: 0 0 0.4rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-br-conditions p, .v2-br-conditions li { margin: 0 0 0.45rem; font-size: 0.82rem; color: var(--v2-ink-soft); }

.v2-br-cond-sub { margin: 0.9rem 0 0.4rem; font-family: var(--v2-font-hud); font-weight: 400; font-size: 0.9rem; letter-spacing: 0.03em; color: var(--v2-ink); }
.v2-br-cond-sub:first-of-type { margin-top: 0.2rem; }
.v2-br-paybar { display: inline-block; width: 6rem; height: 0.45rem; margin-left: 0.5rem; vertical-align: middle; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; }
.v2-br-paybar i { display: block; height: 100%; background: var(--v2-brass); }

/* -- finals card (Breeders' Cup) -- */
.v2-br-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0.9rem; }
.v2-br-day { min-width: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-br-day-h { margin: 0; padding: 0.6rem 1rem; font-family: var(--v2-font-hud); font-size: 0.95rem; letter-spacing: 0.06em; color: var(--v2-ink); background: rgba(199, 154, 63, 0.08); border-bottom: 1px solid var(--v2-line); }
.v2-br-day-races { list-style: none; margin: 0; padding: 0; }
.v2-br-day-races li + li { border-top: 1px dashed var(--v2-line); }
.v2-br-final { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.55rem 0.9rem; min-height: 2.75rem; }
.v2-br-final:hover { background: rgba(199, 154, 63, 0.06); }
.v2-br-final:focus-visible { outline-offset: -3px; }
.v2-br-final-oval { display: block; background: #0f2218; border: 1px solid var(--v2-line); border-radius: 6px; padding: 2px 0.15rem; }
.v2-br-final-what { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.v2-br-final-what > b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink); }
.v2-br-final-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.45rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-br-final-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.v2-br-final-end > b { font-family: var(--v2-font-hud); font-size: 0.98rem; color: var(--v2-glow); }

/* -- division chips + standings -- */
.v2-br-divs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.8rem; }
.v2-br-divs a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.2rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 100px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-br-divs a:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-br-divs a.on { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-br-split { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1rem; align-items: start; }
.v2-br-stand { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-br-stand-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 9rem) 3.5rem; gap: 0.7rem; align-items: center; padding: 0.55rem 1rem; }
.v2-br-stand-row + .v2-br-stand-row { border-top: 1px dashed var(--v2-line); }
.v2-br-stand-row.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-br-stand-pos { display: grid; place-items: center; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink-soft); }
.v2-br-stand-who { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.45rem; }
.v2-br-stand-who .v2-name-with-image { font-family: var(--v2-font-display); color: var(--v2-ink); }
.v2-br-stand-who .v2-name-with-image:hover .v2-name { color: var(--v2-glow); }
.v2-br-stand-who small { flex-basis: 100%; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-stand-who .v2-rk-mine { margin-left: 0; }
.v2-br-stand-bar { display: block; height: 0.5rem; border-radius: 4px; background: var(--v2-surface-2); border: 1px solid var(--v2-line); overflow: hidden; }
.v2-br-stand-bar i { display: block; height: 100%; background: var(--v2-brass); }
.v2-br-stand-pts { display: flex; align-items: baseline; justify-content: flex-end; gap: 0.2rem; }
.v2-br-stand-pts b { font-family: var(--v2-font-hud); font-size: 1.1rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-br-stand-pts small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-cutline { position: relative; padding: 0.15rem 1rem; text-align: center; border-top: 1px dashed var(--v2-brass); border-bottom: 1px dashed var(--v2-brass); background: rgba(199, 154, 63, 0.08); }
.v2-br-cutline span { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-br-noms { padding: 0.8rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-br-noms h3 { margin: 0 0 0.5rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-br-noms ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.v2-br-noms li { display: flex; flex-direction: column; align-items: center; padding: 0.4rem 0.2rem; border: 1px solid var(--v2-line); border-radius: 8px; }
.v2-br-noms b { font-family: var(--v2-font-hud); font-size: 1.3rem; color: var(--v2-ink-bright); }
.v2-br-noms small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-br-noms p { margin: 0.5rem 0 0; font-size: 0.72rem; color: var(--v2-ink-faint); }
.v2-br-seasonpick { margin-bottom: 0.8rem; }

@media (max-width: 900px) {
  .v2-br-banner { grid-template-columns: auto minmax(0, 1fr); }
  .v2-br-facts { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-br-cal thead th:first-child { width: 7.5rem; }
  .v2-br-road { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
  .v2-br-road::before { display: none; }
  .v2-br-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .v2-br-jump { display: none; }
  /* Family strip: crests only, names kept for screen readers; the current one keeps its name. */
  .v2-br-fam { padding: 0.3rem; }
  .v2-br-fam:not(.on) .v2-br-fam-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .v2-br-fam.on { padding-right: 0.8rem; }
  .v2-br-banner { gap: 0.8rem; padding: 1rem 0.9rem 1.4rem; }
  .v2-br-crest.lg { width: 3.5rem; height: 3.5rem; align-self: start; }
  .v2-br-crest.lg .v2-br-crest-mono { font-size: 1.15rem; }
  .v2-br-title { font-size: 1.5rem; }
  .v2-br-blurb { font-size: 0.8rem; }
  .v2-br-facts { grid-template-columns: 1fr 1fr; }
  /* Calendar: narrow label column, month-start labels only, smaller pips. */
  .v2-br-cal-wrap { padding: 0.3rem 0.35rem 0.5rem; }
  .v2-br-cal thead th:first-child { width: 5.6rem; }
  .v2-br-cal thead th:not(.is-month):not(.is-today) .v2-br-cal-wk { visibility: hidden; }
  .v2-br-cal-wk { font-size: 0.5rem; }
  .v2-br-cal-now { font-size: 0.46rem; }
  .v2-br-cal tbody th a { font-size: 0.72rem; line-height: 1.2; }
  .v2-br-cal tbody th small { display: none; }
  .v2-br-cal td { height: 2.2rem; }
  .v2-br-pip { min-width: 1.05rem; height: 1.05rem; padding: 0; font-size: 0.55rem; }
  .v2-br-gate-facts > div { grid-template-columns: 5rem minmax(0, 1fr); }
  .v2-br-stake { grid-template-columns: minmax(0, 1fr) auto; padding: 0.6rem 0.7rem; }
  .v2-br-stake-day { grid-column: 1 / -1; display: flex; gap: 0.5rem; align-items: baseline; }
  /* Road: vertical, rail down the left. */
  .v2-br-road { grid-template-columns: 1fr; gap: 0.6rem; }
  .v2-br-road::before { display: block; left: 1.05rem; right: auto; top: 1rem; bottom: 1rem; width: 0.55rem; height: auto; background: linear-gradient(var(--v2-rail), var(--v2-rail)) left / 2px 100% no-repeat, repeating-linear-gradient(180deg, var(--v2-rail) 0 2px, transparent 2px 1.25rem); }
  .v2-br-stop { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.6rem; align-items: start; }
  .v2-br-stop-card { margin-top: 0; }
  .v2-br-stop.is-end .v2-br-pin { width: 2.25rem; height: 2.25rem; margin-top: 0; }
  /* Honours board: each season / division becomes a stacked block. */
  .v2-br-board { padding: 0.6rem 0.7rem; }
  .v2-br-honours, .v2-br-honours tbody, .v2-br-honours tr, .v2-br-honours th, .v2-br-honours td { display: block; width: auto; }
  .v2-br-honours thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .v2-br-honours tbody tr { padding: 0.5rem 0; border-bottom: 1px solid rgba(240, 212, 142, 0.25); }
  .v2-br-honours tbody tr:last-child { border-bottom: none; }
  .v2-br-honours tbody th, .v2-br-honours tbody td { border-bottom: none; padding: 0.3rem 0.2rem; }
  .v2-br-honours tbody th { width: auto; display: flex; align-items: center; gap: 0.6rem; }
  .v2-br-honours.is-grid tbody th { width: auto; }
  .v2-br-season { display: flex; align-items: baseline; gap: 0.4rem; font-size: 1.3rem; }
  .v2-br-season::before { display: inline; }
  .v2-br-flagword { margin-top: 0; }
  .v2-br-honours td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.5rem; align-items: start; }
  .v2-br-honours td::before { content: attr(data-leg); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-dirt-light); padding-top: 0.35rem; }
  .v2-br-honours td > .v2-br-board-race { grid-column: 2; margin-top: -0.3rem; }
  .v2-br-final { grid-template-columns: 2.75rem minmax(0, 1fr) auto; padding: 0.55rem 0.7rem; gap: 0.5rem; }
  .v2-br-final-end .v2-rk-field-txt { display: none; }
  .v2-br-final-end .v2-rk-pips { display: none; }
  .v2-br-stand-row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; grid-template-areas: "pos who pts" "pos bar bar"; gap: 0.3rem 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-br-stand-pos { grid-area: pos; }
  .v2-br-stand-who { grid-area: who; }
  .v2-br-stand-bar { grid-area: bar; }
  .v2-br-stand-pts { grid-area: pts; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-br-gate, .v2-br-fam { transition: none; }
}
/* ===== end Big Races (round 3) ===== */
/* ===== Clockers' board (round 3) ===== */
/* v2-public-works.pug, v2-public-works-search.pug, v2-public-workouts.pug,
   v2-training-results-daily.pug. See SPEC-public-works.md.
   Reuses .v2-yard-top/-hello/-stable, .v2-st-tally, .v2-st-filters/.v2-st-f/.v2-st-right,
   .v2-lb-you(.is-none), .v2-lb-who/-name/-sub/-stable, .v2-rk-portrait/-surface/-going/-oval/
   -oval-mini/-mine/-cloth/-ic, .v2-status-chip.retired/.deceased, .v2-btn, .v2-select,
   .v2-input, .v2-cross-link, .v2-empty, .v2-sr-only.
   Does NOT use or modify .v2-horse-row, .v2-ranked-row or .v2-table. */

.v2-pw-root h1.v2-yard-stable { margin: 0; }
.v2-pw-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.3rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; }
.v2-pw-links a { color: var(--v2-brass); }
.v2-pw-links a:hover { color: var(--v2-glow); }

/* -- day ticket: prev | today | next, plus a native date picker (GET) -- */
.v2-pw-daybox { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.v2-pw-day { display: flex; align-items: stretch; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-pw-step { display: flex; align-items: center; gap: 0.3rem; min-height: 2.75rem; padding: 0.35rem 0.8rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-pw-step:hover { background: rgba(199, 154, 63, 0.08); color: var(--v2-ink); }
.v2-pw-step .v2-rk-ic { width: 0.9rem; height: 0.9rem; color: var(--v2-brass); }
.v2-pw-step.is-prev .v2-rk-ic { transform: scaleX(-1); }
.v2-pw-step:focus-visible { outline-offset: -3px; }
.v2-pw-now { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0.3rem 1.1rem; border-left: 1px dashed var(--v2-line); border-right: 1px dashed var(--v2-line); background: linear-gradient(180deg, rgba(199, 154, 63, 0.16), rgba(199, 154, 63, 0.04)); }
.v2-pw-now b { font-family: var(--v2-font-display); font-weight: 400; font-size: 1.05rem; color: var(--v2-ink-bright); white-space: nowrap; }
.v2-pw-now small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-pw-pick { display: flex; align-items: center; gap: 0.4rem; }
.v2-pw-pick .v2-input { width: auto; min-height: 2.25rem; padding: 0.25rem 0.5rem; font-size: 0.78rem; color-scheme: dark; }
.v2-pw-pick .v2-btn { min-height: 2.25rem; }

/* -- tally chip extras (the chips are the shipped .v2-st-tally) -- */
/* The tally scrolls on phones (overflow-x: auto); make it the containing block so the
   absolutely-positioned .v2-sr-only "(n yours)" text is clipped with it instead of
   widening the page (26px overflow at 375px + Larger text). */
.v2-pw-root .v2-st-tally { position: relative; }
.v2-st-tally a .v2-pw-tdot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--v2-glow); box-shadow: 0 0 0 2px rgba(255, 181, 69, 0.25); }

/* -- a distance board: the trip column + the lines -- */
.v2-pw-board { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); border: 1px solid var(--v2-line); border-radius: 12px; background: var(--v2-surface); overflow: hidden; margin-bottom: 1.2rem; scroll-margin-top: 5rem; }
.v2-pw-trip { display: flex; flex-direction: column; gap: 0.65rem; padding: 0.9rem 1rem 1rem; border-right: 1px dashed var(--v2-line); background: linear-gradient(180deg, rgba(199, 154, 63, 0.09), transparent 70%); min-width: 0; }
.v2-pw-trip-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.55rem; margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; color: var(--v2-ink-bright); }
.v2-pw-trip-h small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--v2-ink-faint); }
.v2-pw-trip-meta { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-pw-trip-meta b { color: var(--v2-ink); font-weight: 700; }
.v2-pw-trip .v2-rk-oval { max-width: 11.5rem; }

/* bullet card: the fastest work at the distance. Brass = medal metal, not a status colour. */
.v2-pw-bullet { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic k" "ic t" "ic n"; gap: 0 0.55rem; align-items: center; padding: 0.55rem 0.7rem; border: 1px solid rgba(199, 154, 63, 0.55); border-radius: 10px; background: rgba(199, 154, 63, 0.08); }
.v2-pw-bullet > .v2-rk-ic { grid-area: ic; width: 1.75rem; height: 1.75rem; color: var(--v2-brass); stroke-width: 1.6; }
.v2-pw-bullet-k { grid-area: k; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-pw-bullet-t { grid-area: t; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.55rem; line-height: 1.05; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-pw-bullet-n { grid-area: n; min-width: 0; font-family: var(--v2-font-display); font-size: 0.86rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-pw-bullet-n:hover { color: var(--v2-glow); }

/* -- clocker lines: own 5-column grid (rank, portrait, who, where, time) -- */
.v2-pw-lines { list-style: none; margin: 0; padding: 0; min-width: 0; }
.v2-pw-lines-head, .v2-pw-line { display: grid; grid-template-columns: 3rem 2.75rem minmax(0, 1fr) minmax(0, 13rem) 6.75rem; gap: 0.8rem; align-items: center; }
.v2-pw-line.has-splits, .v2-pw-lines-head.has-splits { grid-template-columns: 3rem 2.75rem minmax(0, 1fr) minmax(0, 11rem) 7.5rem 6.75rem; }
.v2-pw-lines-head { padding: 0.6rem 1rem 0.4rem; border-bottom: 1px solid var(--v2-line); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-pw-lines-head span:last-child { text-align: right; }
.v2-pw-line { padding: 0.55rem 1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-pw-line:last-child { border-bottom: none; }
.v2-pw-line:hover { background: rgba(199, 154, 63, 0.05); }
/* YOURS = tint + 3px glow bar + the YOURS tag (same treatment as .v2-lb-line.is-mine). */
.v2-pw-line.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-pw-line .v2-rk-portrait { width: 2.5rem; height: 2.5rem; }

.v2-pw-rank { display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.15rem; color: var(--v2-ink-soft); }
.v2-pw-rank sup { font-size: 0.6em; }
.v2-pw-rank small { margin-top: 0.2rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-pw-line.is-bullet .v2-pw-rank { color: var(--v2-brass); }

.v2-pw-where { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.35rem; min-width: 0; }
.v2-pw-where .v2-rk-surface { padding: 0.16rem 0.5rem 0.16rem 0.22rem; font-size: 0.66rem; gap: 0.3rem; }
.v2-pw-where .v2-rk-swatch { width: 0.8rem; height: 0.8rem; }
.v2-pw-where .v2-rk-going { padding: 0.16rem 0.5rem; font-size: 0.66rem; gap: 0.3rem; }
.v2-pw-where .v2-rk-going .v2-rk-ic { width: 1em; height: 1em; }
.v2-pw-trk { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: var(--v2-ink-soft); text-decoration: underline; text-decoration-color: var(--v2-line); text-underline-offset: 2px; }
.v2-pw-trk:hover { color: var(--v2-glow); }

/* tack + company tags: the clocker's shorthand, spelled out for screen readers */
.v2-pw-tags { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.v2-pw-tag { display: inline-block; min-width: 1.25rem; text-align: center; font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; color: var(--v2-ink-soft); border: 1px solid var(--v2-line); border-radius: 3px; padding: 0.04rem 0.28rem; white-space: nowrap; text-decoration: none; cursor: help; }
.v2-pw-co { display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink); border: 1px solid rgba(243, 234, 211, 0.4); border-radius: 3px; padding: 0.04rem 0.35rem 0.04rem 0.04rem; white-space: nowrap; }
.v2-pw-co .v2-rk-cloth { width: 1.05rem; height: 1.2rem; font-size: 0.6rem; border-radius: 2px 2px 4px 4px; }
.v2-pw-co b { font-weight: 700; }

.v2-pw-splits { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; }
.v2-pw-splits small { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
/* The column head says "Splits" on desktop; the in-line label is for screen readers there and shows from 900px down. */
.v2-pw-splits small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* stopwatch time + gap to the bullet */
.v2-pw-time { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 0; }
.v2-pw-time b { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.25rem; line-height: 1.1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-pw-time small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* The "bullet" dot is the trade's own mark for the fastest work; the word "bullet" sits under it. */
.v2-pw-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--v2-brass); box-shadow: 0 0 0 2px rgba(199, 154, 63, 0.3); flex: 0 0 auto; }
.v2-pw-line.is-bullet .v2-pw-time small { color: var(--v2-brass); letter-spacing: 0.08em; text-transform: uppercase; }

.v2-pw-notes { font-style: italic; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* key under the boards */
.v2-pw-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: -0.4rem 0 1.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-pw-key span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* filters: shipped .v2-st-filters; this only adds the result count line */
.v2-pw-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin: 0 0 0.6rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-pw-count b { font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-ink); }
.v2-pw-board.is-flat { grid-template-columns: minmax(0, 1fr); }

/* not-yet-searched state */
.v2-pw-ready { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.2rem; border: 1px dashed var(--v2-line); border-radius: 12px; color: var(--v2-ink-soft); font-size: 0.86rem; }
.v2-pw-ready .v2-rk-ic { width: 2rem; height: 2rem; color: var(--v2-brass); stroke-width: 1.5; }
.v2-pw-ready p { margin: 0; }

@media (max-width: 900px) {
  .v2-pw-board { grid-template-columns: minmax(0, 1fr); }
  .v2-pw-trip { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; grid-template-areas: "h oval" "meta oval" "bullet bullet"; gap: 0.4rem 0.9rem; border-right: none; border-bottom: 1px dashed var(--v2-line); }
  .v2-pw-trip-h { grid-area: h; }
  .v2-pw-trip-meta { grid-area: meta; }
  .v2-pw-trip .v2-rk-oval { grid-area: oval; max-width: 8.5rem; align-self: center; }
  .v2-pw-bullet { grid-area: bullet; }
  .v2-pw-lines-head { display: none; }
  .v2-pw-line, .v2-pw-line.has-splits { grid-template-columns: 2.75rem 2.5rem minmax(0, 1fr) auto; grid-template-areas: "rank por who time" "rank por where time"; gap: 0.3rem 0.7rem; }
  .v2-pw-line.has-splits { grid-template-areas: "rank por who time" "rank por where time" "rank por splits splits"; }
  .v2-pw-line > .v2-pw-rank { grid-area: rank; }
  .v2-pw-line > .v2-rk-portrait { grid-area: por; }
  .v2-pw-line > .v2-lb-who { grid-area: who; }
  .v2-pw-line > .v2-pw-where { grid-area: where; }
  .v2-pw-line > .v2-pw-splits { grid-area: splits; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
  .v2-pw-splits small { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .v2-pw-line > .v2-pw-time { grid-area: time; align-self: start; }
}
@media (max-width: 640px) {
  .v2-pw-daybox { width: 100%; align-items: stretch; }
  .v2-pw-day { width: 100%; }
  .v2-pw-step { flex: 1 1 0; justify-content: center; padding: 0.35rem 0.4rem; }
  .v2-pw-now { flex: 1.4 1 0; padding: 0.3rem 0.5rem; }
  .v2-pw-now b { font-size: 0.95rem; }
  .v2-pw-pick .v2-input { flex: 1 1 auto; }
  .v2-pw-trip { grid-template-columns: minmax(0, 1fr) 6.5rem; padding: 0.75rem 0.8rem 0.8rem; }
  .v2-pw-trip .v2-rk-oval { max-width: 6.5rem; }
  .v2-pw-trip-h { font-size: 1.45rem; }
  .v2-pw-line, .v2-pw-line.has-splits { grid-template-columns: 2.25rem 2.125rem minmax(0, 1fr) auto; grid-template-areas: "rank por who time" "rank por where where"; gap: 0.3rem 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-pw-line.has-splits { grid-template-areas: "rank por who time" "rank por where where" "rank por splits splits"; }
  .v2-pw-line .v2-rk-portrait { width: 2.125rem; height: 2.125rem; align-self: start; }
  .v2-pw-rank { font-size: 1rem; }
  .v2-pw-time b { font-size: 1.1rem; }
  .v2-pw-ready { align-items: flex-start; }
}
/* ===== end Clockers' board (round 3) ===== */
/* ===== Bloodlines (round 3) ===== */
/* Bloodstock Book: v2-offspring, v2-sire-profile, v2-historical-sires, v2-genetics-cert
   (SPEC-bloodlines.md). The mast reuses Stud Farm's .v2-bk-hero grid, kv strip, pedigree
   tree and card faces unchanged; everything here is page-prefixed .v2-bl-*. */
.v2-bl-book [hidden] { display: none !important; }
.v2-bl-book :where(button.v2-btn:not(.v2-btn-primary)) { background: transparent; }

/* ---- mast: availability strip (sits inside .v2-bk-hero-main) ---- */
.v2-bl-stand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; padding: 0.6rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 8px; background: rgba(11,26,18,0.45); }
.v2-bl-stand.is-open { border-color: var(--v2-brass); background: radial-gradient(ellipse at 0% 0%, rgba(199,154,63,0.14), transparent 70%), rgba(11,26,18,0.45); }
.v2-bl-stand-state { display: flex; flex-direction: column; min-width: 0; }
.v2-bl-stand-state b { font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink); }
.v2-bl-stand.is-open .v2-bl-stand-state b { color: var(--v2-good); }
.v2-bl-stand-state small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-bl-stand-state small a { color: var(--v2-brass); }
.v2-bl-stand-go { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-bl-stand-go .v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.25rem; }

/* ---- page switch under the mast ---- */
.v2-bl-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0 0 1.2rem; }
.v2-bl-tabs-note { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* ---- progeny form lines ---- */
.v2-bl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; margin: 0 0 0.6rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-bl-lines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-bl-lines > li + li { border-top: 1px dashed var(--v2-line); }
.v2-bl-line { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 6.5rem 5.75rem; gap: 0.4rem 0.8rem; align-items: center; min-height: 3.25rem; padding: 0.55rem 0.9rem; }
.v2-bl-line.is-stakes { background: linear-gradient(90deg, rgba(199,154,63,0.16), transparent 65%); }
.v2-bl-line.is-stakes::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--v2-brass); }
.v2-bl-rank { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.9rem; color: var(--v2-brass); text-align: center; font-variant-numeric: tabular-nums; }
.v2-bl-who { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.v2-bl-who .v2-name { font-family: var(--v2-font-display); font-size: 0.92rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-bl-who a.v2-name-with-image:hover .v2-name { color: var(--v2-glow); }
.v2-bl-meta { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-bl-meta a { color: var(--v2-ink-soft); }
.v2-bl-meta a:hover { color: var(--v2-glow); }
.v2-bl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.v2-bl-tags:empty { display: none; }
.v2-rk-tag.v2-bl-sw { color: var(--v2-ink-dark); background: var(--v2-brass); font-weight: 700; font-size: 0.66rem; padding: 0.06rem 0.4rem; }
.v2-rk-tag.v2-bl-win { color: var(--v2-good); border-color: rgba(95,200,145,0.5); font-size: 0.66rem; padding: 0.06rem 0.4rem; }
.v2-rk-tag.v2-bl-certified { color: var(--v2-ink-soft); border-color: var(--v2-line); font-size: 0.66rem; padding: 0.06rem 0.4rem; }
.v2-bl-unraced { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-bl-earn { font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.95rem; color: var(--v2-glow); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-bl-earn.is-zero { color: var(--v2-ink-faint); font-weight: 400; }
.v2-bl-line .v2-status-chip { justify-self: end; }
.v2-bl-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.7rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-bl-more .v2-btn { min-height: 2.25rem; display: inline-flex; align-items: center; }

/* ---- stud record: sales ledger ---- */
.v2-bl-ledger { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.6rem; }
.v2-bl-sale { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0.7rem; align-items: center; height: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 8px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); }
.v2-bl-hammer { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding-right: 0.6rem; border-right: 1px dashed var(--v2-line); }
.v2-bl-hammer b { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.15rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-bl-hammer small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }

/* ---- stud record: recent runs ---- */
.v2-bl-run { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto 4.5rem; gap: 0.4rem 0.8rem; align-items: center; min-height: 3.25rem; padding: 0.55rem 0.9rem; }
.v2-bl-pos { display: inline-grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: 50%; border: 1px solid var(--v2-line); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-bl-race { color: var(--v2-brass); }
.v2-bl-race:hover { color: var(--v2-glow); }
.v2-bl-cond { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-bl-cond span { border: 1px solid var(--v2-line); border-radius: 4px; padding: 0.1rem 0.4rem; }
.v2-bl-eq { display: inline-flex; gap: 0.2rem; }
.v2-bl-eq abbr { text-decoration: none; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); border: 1px solid var(--v2-line); border-radius: 3px; padding: 0 0.25rem; cursor: help; }
.v2-bl-runend { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.v2-bl-sr { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-bl-sr b { font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink); }

/* ---- stallion register (historical sires) ---- */
.v2-bl-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem 1.4rem; align-items: center; padding: 1rem 1.2rem; margin-bottom: 1.2rem; border: 1px solid var(--v2-brass); border-radius: 12px; background: radial-gradient(ellipse at 0% 0%, rgba(199,154,63,0.16), transparent 60%), var(--v2-surface); }
.v2-bl-intro h1, .v2-bl-intro h2 { margin: 0.15rem 0 0.35rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.5rem; color: var(--v2-ink-bright); }
.v2-bl-intro p { margin: 0; font-size: 0.84rem; color: var(--v2-ink-soft); max-width: 46rem; }
.v2-bl-intro-go { display: flex; flex-direction: column; gap: 0.4rem; }
.v2-bl-intro-go .v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.25rem; }
.v2-bl-card .v2-bk-card-art { height: 6.25rem; }
.v2-bl-card .v2-bk-card-art img { height: 5.5rem; }
.v2-bl-card .v2-bk-stats dd.is-money { color: var(--v2-glow); }
.v2-bl-card-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; margin-top: auto; padding-top: 0.2rem; font-family: var(--v2-font-mono); font-size: 0.66rem; }
.v2-bl-card-links a { display: inline-flex; align-items: center; min-height: 1.75rem; color: var(--v2-brass); }
.v2-bl-card-links a:hover { color: var(--v2-glow); }
.v2-bl-pool { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }

/* ---- genetics certificate ---- */
.v2-bl-lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 1.2rem; align-items: start; }
.v2-app .v2-bl-cert { position: relative; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem 1.2rem; padding: 1.4rem 1.5rem; background: var(--v2-paper); color: var(--v2-paper-ink); border: 4px double rgba(122,90,30,0.55); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.v2-app .v2-bl-cert-art { display: grid; place-items: center; align-self: start; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff6df, #e2d2a8); border: 2px solid rgba(122,90,30,0.5); }
.v2-app .v2-bl-cert-art img { width: 88%; height: auto; }
.v2-app .v2-bl-cert-kicker { margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-paper-ink-soft); }
.v2-app .v2-bl-cert h2 { margin: 0.2rem 0 0.2rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; color: var(--v2-paper-ink); overflow-wrap: anywhere; }
.v2-app .v2-bl-cert-line { margin: 0 0 0.7rem; font-family: var(--v2-font-display); font-style: italic; font-size: 0.86rem; color: var(--v2-paper-ink-soft); }
.v2-app .v2-bl-cert dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0 0 0.8rem; }
.v2-app .v2-bl-cert dl > div { border-left: 2px solid rgba(122,90,30,0.35); padding-left: 0.5rem; min-width: 0; }
.v2-app .v2-bl-cert dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-paper-ink-soft); }
.v2-app .v2-bl-cert dd { margin: 0; font-family: var(--v2-font-hud); font-size: 1rem; color: var(--v2-paper-ink); }
.v2-app .v2-bl-cert-note { margin: 0 0 0.9rem; font-size: 0.8rem; color: var(--v2-paper-ink-soft); }
.v2-app .v2-bl-cert-result { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; min-height: 2.75rem; padding: 0.6rem 0.8rem; border: 1px dashed rgba(122,90,30,0.55); border-radius: 4px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-paper-ink-soft); }
.v2-app .v2-bl-cert-result .v2-bk-gene { height: auto; min-height: 1.75rem; color: var(--v2-paper-ink); border-color: rgba(122,90,30,0.7); background: rgba(199,154,63,0.22); font-size: 0.82rem; }
.v2-app .v2-bl-cert-result .v2-alert { margin: 0; flex: 1 1 100%; }
.v2-app .v2-bl-seal { position: absolute; top: 0.9rem; right: 1rem; width: 4.25rem; height: 4.25rem; border-radius: 50%; display: grid; place-items: center; text-align: center; transform: rotate(-12deg); border: 2px dashed rgba(122,90,30,0.6); font-family: var(--v2-font-mono); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.08em; line-height: 1.3; color: rgba(122,90,30,0.85); }
.v2-app .v2-bl-seal.is-done { border-style: solid; color: #7a1f1f; border-color: rgba(122,31,31,0.7); }
.v2-bl-pick { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-bl-pick label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-bl-pick .v2-form-input { width: 100%; min-height: 2.25rem; }
.v2-bl-pick .v2-btn { min-height: 2.25rem; }
.v2-bl-pick p { margin: 0; font-size: 0.78rem; color: var(--v2-ink-soft); }

@media (max-width: 900px) {
  .v2-bl-line { grid-template-columns: 1.75rem minmax(0, 1fr) auto 5.75rem; }
  .v2-bl-line .v2-status-chip { grid-column: 2; grid-row: 2; justify-self: start; }
  .v2-bl-stand-go .v2-btn, .v2-bl-more .v2-btn, .v2-bl-intro-go .v2-btn, .v2-bl-pick .v2-btn, .v2-bl-pick .v2-form-input { min-height: 2.75rem; }
  .v2-bl-card-links a { min-height: 2.75rem; }
  .v2-bl-lab { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .v2-bl-stand-go { margin-left: 0; width: 100%; }
  .v2-bl-stand-go .v2-btn { flex: 1 1 100%; }
  .v2-bl-tabs .v2-lb-switch { width: 100%; }
  .v2-bl-tabs .v2-lb-switch a { flex: 1 1 0; justify-content: center; min-height: 2.75rem; }
  .v2-bl-line { grid-template-columns: 1.5rem minmax(0, 1fr) auto; grid-template-areas: "r w w" "r m e" "r s s"; gap: 0.35rem 0.6rem; padding: 0.6rem 0.7rem; }
  .v2-bl-line > .v2-bl-rank { grid-area: r; align-self: start; padding-top: 0.15rem; }
  .v2-bl-line > .v2-bl-who { grid-area: w; }
  .v2-bl-line > .v2-sx-medals, .v2-bl-line > .v2-bl-unraced { grid-area: m; }
  .v2-bl-line > .v2-bl-earn { grid-area: e; }
  .v2-bl-line > .v2-status-chip { grid-area: s; grid-column: auto; grid-row: auto; justify-self: start; }
  .v2-bl-run { grid-template-columns: 2.25rem minmax(0, 1fr) auto; grid-template-areas: "p w w" "p c e"; padding: 0.6rem 0.7rem; }
  .v2-bl-run > :nth-child(1) { grid-area: p; align-self: start; }
  .v2-bl-run > :nth-child(2) { grid-area: w; }
  .v2-bl-run > :nth-child(3) { grid-area: c; justify-content: flex-start; white-space: normal; }
  .v2-bl-run > :nth-child(4) { grid-area: e; }
  .v2-bl-ledger { grid-template-columns: 1fr; }
  .v2-bl-intro { grid-template-columns: 1fr; padding: 0.9rem; }
  .v2-bl-intro h2 { font-size: 1.25rem; }
  .v2-app .v2-bl-cert { grid-template-columns: 1fr; padding: 1.1rem; justify-items: start; }
  .v2-app .v2-bl-cert-art { width: 5.5rem; height: 5.5rem; }
  .v2-app .v2-bl-cert h2 { font-size: 1.3rem; padding-right: 4.5rem; }
  .v2-app .v2-bl-cert dl { grid-template-columns: 1fr 1fr; }
  .v2-app .v2-bl-cert .v2-btn { width: 100%; }
}
/* ===== end Bloodlines (round 3) ===== */
/* ===== Yard office (round 3) ===== */
/* Stable bulk tools + housekeeping lists. SPEC-stable-bulk.md. Reuses .v2-st-aisle/.v2-st-ribbon/
   .v2-st-rb/.v2-st-meta/.v2-st-chev, .v2-st-lbar/.v2-st-ltrack, .v2-st-seg, .v2-st-ib, .v2-st-flag,
   .v2-yard-hello/.v2-yard-stable, .v2-yard-stalls/.v2-yard-stall (+ .v2-st-compact), .v2-raceticket,
   .v2-status-chip and the race kit. Everything new is .v2-yo-*. Never touches .v2-horse-row /
   .v2-ranked-row / .v2-roster. */

.v2-yo-root [hidden] { display: none !important; }
.v2-yo-root input[type="checkbox"], .v2-yo-root input[type="radio"] { accent-color: var(--v2-brass); width: 1.125rem; height: 1.125rem; margin: 0; }

/* ---- Heading + tool switch ---- */
.v2-yo-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8rem 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.v2-yo-top .v2-yard-stable { margin-top: 0.15rem; }
.v2-yo-switch { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.v2-yo-switch .v2-st-seg { display: inline-flex; flex-wrap: nowrap; }
.v2-yo-switch .v2-st-seg a { white-space: nowrap; }
.v2-yo-switch .v2-st-seg a[aria-current="page"] { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-yo-switch .v2-st-seg a.is-danger:not([aria-current]) .v2-rk-ic { color: var(--v2-signal-bright); }
.v2-yo-rule { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 1rem; padding: 0.6rem 0.8rem; border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-brass); border-radius: 8px; background: var(--v2-surface); font-size: 0.82rem; color: var(--v2-ink-soft); max-width: 60rem; }
.v2-yo-rule .v2-rk-ic { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; color: var(--v2-brass); margin-top: 0.1rem; }
.v2-yo-rule b { color: var(--v2-ink); font-weight: 600; }
.v2-yo-rule.is-danger { border-left-color: var(--v2-signal); }
.v2-yo-rule.is-danger .v2-rk-ic { color: var(--v2-signal-bright); }

/* ---- Two-column tool layout: the string + the docket ---- */
.v2-yo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 1.4rem; align-items: start; }
.v2-yo-tools { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: flex-end; padding: 0.75rem 0.85rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; margin-bottom: 0.9rem; }
.v2-yo-find { flex: 1 1 11rem; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-yo-find .v2-input { width: 100%; min-width: 0; }
.v2-yo-find > label, .v2-yo-qlbl, .v2-yo-f > label { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yo-f { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.v2-yo-only { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.125rem; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-yo-quick { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.v2-yo-q { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.125rem; padding: 0.3rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 100px; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); cursor: pointer; white-space: nowrap; }
.v2-yo-q b { font-family: var(--v2-font-hud); font-size: 0.85rem; color: var(--v2-ink); }
.v2-yo-q:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-yo-q[aria-pressed="true"] { border-color: var(--v2-brass); background: rgba(199,154,63,0.16); color: var(--v2-ink); }
.v2-yo-q.is-clear { background: transparent; color: var(--v2-ink-faint); }

.v2-yo-aisle { margin-bottom: 0.6rem; }
.v2-yo-aisle > .v2-st-ribbon { margin-bottom: 0.45rem; }
.v2-yo-aisle .v2-st-meta i { font-style: normal; color: var(--v2-glow); }
/* Group colour from color_schemes.color, as a swatch before the ribbon text (never a status). */
.v2-yo-sw { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; border: 1px solid rgba(26,20,8,0.55); vertical-align: -0.05rem; }
.v2-yo-aislepick { margin: 0 0 0.5rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.v2-yo-aislepick .v2-rk-ic { width: 0.875rem; height: 0.875rem; }
.v2-yo-aislepick[aria-pressed="true"] { background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-yo-list { list-style: none; margin: 0 0 0.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }

/* Row: pick | who | stamina | figure | status | view. Page-local grid -- not .v2-horse-row. */
.v2-yo-row { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 6.5rem 6.25rem 9.5rem 2rem; gap: 0.75rem; align-items: center; min-height: 3.125rem; padding: 0.45rem 0.8rem; border-top: 1px dashed var(--v2-line); font-size: 0.8rem; }
.v2-yo-list > .v2-yo-row:first-child { border-top: 0; }
.v2-yo-head { min-height: 2rem; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yo-who { min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.v2-yo-who .v2-name-with-image { min-width: 0; }
.v2-yo-who .v2-name { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; }
.v2-yo-sub { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 2.25rem; }
.v2-yo-eval { display: block; margin-top: 0.2rem; padding-left: 2.25rem; font-size: 0.75rem; line-height: 1.35; color: var(--v2-ink-soft); white-space: normal; }
.v2-yo-eval b { color: var(--v2-brass); font-weight: 600; }
.v2-yo-sr { font-family: var(--v2-font-mono); font-size: 0.66rem; border: 1px solid; border-radius: 100px; padding: 0 0.35rem; margin-left: 0.35rem; flex: 0 0 auto; }
.v2-yo-fig { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-ink-soft); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-yo-fig.is-money { color: var(--v2-glow); }
.v2-yo-chip { justify-self: start; min-width: 0; max-width: 100%; }
.v2-yo-chip .v2-status-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yo-view { justify-self: end; }
.v2-yo-row.is-picked { background: rgba(255,181,69,0.08); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-yo-row.is-off > :not(.v2-yo-view):not(.v2-yo-chip) { opacity: 0.5; }
.v2-yo-row.is-off .v2-yo-who { cursor: default; }
.v2-yo-row.is-done { background: rgba(199,154,63,0.06); }
.v2-yo-row.is-done > input { visibility: hidden; }
.v2-yo-row.is-flash { box-shadow: inset 3px 0 0 var(--v2-brass); outline: 2px solid var(--v2-brass); outline-offset: -2px; }
/* Equipment: three tack toggles in the figure + status slots */
.v2-yo-tack { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.v2-yo-tog { position: relative; display: inline-flex; }
.v2-yo-tog input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.v2-yo-tog span { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 1.75rem; padding: 0.15rem 0.5rem; border: 1px solid var(--v2-line); border-radius: 6px; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-yo-tog input:checked + span { border-color: var(--v2-brass); background: rgba(199,154,63,0.18); color: var(--v2-ink); }
.v2-yo-tog input:checked + span::before { content: "\2713"; color: var(--v2-brass); }
.v2-yo-tog input:focus-visible + span { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-yo-tog.is-changed span { border-style: dashed; border-color: var(--v2-glow); }
.v2-yo-row.is-tack { grid-template-columns: 1.5rem minmax(0, 1fr) 15.5rem 8.5rem 2rem; }

/* ---- The docket (clipboard) ---- */
.v2-yo-docket { position: sticky; top: 4rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 1.15rem 1rem 1rem; }
.v2-yo-docket::before { content: ""; position: absolute; top: -0.4375rem; left: 50%; transform: translateX(-50%); width: 4rem; height: 0.75rem; border-radius: 4px; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); }
.v2-yo-docket.is-danger { border-color: rgba(255,117,87,0.45); }
.v2-yo-dh { margin: 0 0 0.8rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink); display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.v2-yo-dh small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-brass); }
.v2-yo-docket.is-danger .v2-yo-dh small { color: var(--v2-signal-bright); }
.v2-yo-dtoggle { display: none; }
.v2-yo-fs { border: 0; padding: 0; margin: 0 0 0.85rem; min-width: 0; }
.v2-yo-fs legend, .v2-yo-lbl { display: block; padding: 0; margin-bottom: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yo-fs .v2-select { width: 100%; min-width: 0; }
.v2-yo-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.v2-yo-dir label { position: relative; }
.v2-yo-dir input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.v2-yo-dir span { display: flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 2.5rem; padding: 0.3rem 0.5rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); text-align: center; }
.v2-yo-dir input:checked + span { border-color: var(--v2-glow); background: rgba(255,181,69,0.1); color: var(--v2-ink); box-shadow: inset 0 0 0 1px var(--v2-glow); }
.v2-yo-dir input:focus-visible + span { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-yo-count { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0; border-top: 1px dashed var(--v2-line); border-bottom: 1px dashed var(--v2-line); margin-bottom: 0.7rem; }
.v2-yo-n { font-family: var(--v2-font-hud); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-yo-nl { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); line-height: 1.3; min-width: 0; }
.v2-yo-nl b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.9rem; color: var(--v2-ink); }
.v2-yo-faces { margin-left: auto; display: flex; align-items: center; flex: 0 0 auto; }
.v2-yo-faces img { width: 1.75rem; height: 1.75rem; object-fit: contain; border-radius: 50%; background: var(--v2-surface-2); border: 1.5px solid var(--v2-surface); margin-left: -0.55rem; }
.v2-yo-faces span { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); margin-left: 0.3rem; }
.v2-yo-prev { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.8rem; margin: 0 0 0.75rem; font-size: 0.78rem; }
.v2-yo-prev dt { color: var(--v2-ink-soft); }
.v2-yo-prev dd { margin: 0; text-align: right; font-family: var(--v2-font-mono); font-size: 0.74rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-yo-prev dd small { display: block; font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-yo-prev dd.is-ok { color: var(--v2-good); }
.v2-yo-prev dd.is-skip { color: var(--v2-signal-bright); }
.v2-yo-prev dd.is-money { color: var(--v2-glow); }
.v2-yo-skips { list-style: none; margin: 0 0 0.75rem; padding: 0.45rem 0.6rem; border-radius: 6px; background: rgba(255,117,87,0.07); border: 1px solid rgba(255,117,87,0.3); font-size: 0.74rem; color: var(--v2-ink-soft); max-height: 9rem; overflow-y: auto; }
.v2-yo-skips li { display: flex; gap: 0.4rem; justify-content: space-between; padding: 0.15rem 0; }
.v2-yo-skips li b { color: var(--v2-ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yo-skips li span { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-signal-bright); white-space: nowrap; }
.v2-yo-warn { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.74rem; color: var(--v2-ink-soft); border-left: 3px solid var(--v2-signal); background: rgba(243,234,211,0.04); padding: 0.45rem 0.6rem; border-radius: 4px; margin: 0 0 0.7rem; }
.v2-yo-warn b { color: var(--v2-ink); }
.v2-yo-warn .v2-rk-ic { flex: 0 0 auto; width: 1rem; height: 1rem; color: var(--v2-signal-bright); }
.v2-yo-note { font-size: 0.74rem; color: var(--v2-ink-soft); border-left: 3px solid var(--v2-brass); background: rgba(243,234,211,0.04); padding: 0.4rem 0.6rem; border-radius: 4px; margin: 0 0 0.7rem; }
.v2-yo-go { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; }
.v2-yo-go .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-yo-fine { margin: 0.55rem 0 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); line-height: 1.5; }
.v2-yo-fine a { color: var(--v2-brass); }
.v2-yo-split { border-top: 1px dashed var(--v2-line); margin: 0.9rem 0 0.8rem; padding-top: 0.8rem; }
.v2-yo-confirm { border: 1px solid var(--v2-signal); background: var(--v2-surface-2); border-radius: 8px; padding: 0.7rem 0.75rem; margin-bottom: 0.6rem; }
.v2-yo-confirm.is-calm { border-color: var(--v2-brass); }
.v2-yo-confirm p { margin: 0 0 0.55rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-yo-confirm p:focus { outline: none; }
.v2-yo-confirm p:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-yo-confirm div { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.v2-yo-confirm .v2-btn { flex: 1 1 auto; justify-content: center; display: inline-flex; min-height: 2.5rem; align-items: center; }
/* The second, deliberate click is the only filled danger button in the family. #1a1408 on #ff7557 = 7.3:1. */
.v2-yo-confirm .v2-btn-danger { background: var(--v2-signal); border-color: var(--v2-signal); color: var(--v2-ink-dark); font-weight: 700; }
.v2-yo-confirm .v2-btn-danger:hover { background: var(--v2-signal-bright); color: var(--v2-ink-dark); }
.v2-yo-report h3 { margin: 0 0 0.5rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; }
.v2-yo-tally { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 0.6rem; padding: 0; list-style: none; }
.v2-yo-tally li { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--v2-font-mono); font-size: 0.66rem; padding: 0.25rem 0.6rem; border-radius: 100px; border: 1px solid var(--v2-line); color: var(--v2-ink-soft); }
.v2-yo-tally li b { font-family: var(--v2-font-hud); font-size: 0.9rem; color: var(--v2-ink); }
.v2-yo-tally li.is-ok { border-color: rgba(95,200,145,0.45); }
.v2-yo-tally li.is-ok .v2-rk-ic { color: var(--v2-good); }
.v2-yo-tally li.is-skip { border-color: rgba(255,117,87,0.45); }
.v2-yo-tally li.is-skip .v2-rk-ic { color: var(--v2-signal-bright); }
.v2-yo-tally .v2-rk-ic { width: 0.85rem; height: 0.85rem; }
.v2-yo-rlist { list-style: none; margin: 0 0 0.7rem; padding: 0; max-height: 20rem; overflow-y: auto; border-top: 1px dashed var(--v2-line); }
.v2-yo-rlist li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.4rem 0.1rem; border-bottom: 1px dashed var(--v2-line); }
.v2-yo-rlist img { width: 1.75rem; height: 1.75rem; object-fit: contain; }
.v2-yo-rn { min-width: 0; display: flex; flex-direction: column; }
.v2-yo-rn b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yo-rn small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow-wrap: anywhere; }
.v2-yo-out { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--v2-font-mono); font-size: 0.66rem; padding: 0.15rem 0.45rem; border-radius: 100px; white-space: nowrap; }
.v2-yo-out.is-ok { color: var(--v2-good); background: rgba(95,200,145,0.14); }
.v2-yo-out.is-skip { color: var(--v2-signal-bright); background: rgba(255,117,87,0.14); }
.v2-yo-out .v2-rk-ic { width: 0.8rem; height: 0.8rem; }
.v2-yo-racts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.v2-yo-racts .v2-btn { flex: 1 1 auto; justify-content: center; display: inline-flex; min-height: 2.5rem; align-items: center; }

/* ---- Aisle signs (groups editor) ---- */
.v2-yo-signs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.v2-yo-sign { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 9rem 5.5rem auto; gap: 0.6rem; align-items: center; padding: 0.5rem 0.7rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-yo-sign .v2-st-rb { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yo-move { display: inline-flex; flex-direction: column; gap: 0.15rem; }
.v2-yo-move .v2-btn { min-height: 1.6rem; padding: 0 0.45rem; line-height: 1; }
.v2-yo-sign .v2-input, .v2-yo-sign .v2-select { width: 100%; min-width: 0; }
.v2-yo-signn { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-yo-sacts { display: flex; gap: 0.3rem; justify-content: flex-end; }
.v2-yo-sedit { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 9rem auto; gap: 0.5rem; align-items: center; }

/* ---- Lists: shared head strip ---- */
.v2-yo-figs { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.v2-yo-figs li { display: flex; flex-direction: column; }
.v2-yo-figs b { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1.35rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.v2-yo-figs b.is-money { color: var(--v2-glow); }
.v2-yo-figs small { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yo-bar { display: flex; flex-wrap: wrap; gap: 0.6rem 0.8rem; align-items: flex-end; padding: 0.7rem 0.85rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; margin-bottom: 1rem; }
.v2-yo-bar .v2-yo-sp { flex: 1 1 auto; }
.v2-yo-links { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.v2-yo-links a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.125rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); border: 1px solid var(--v2-line); border-radius: 100px; padding: 0.25rem 0.65rem; white-space: nowrap; }
.v2-yo-links a:hover { color: var(--v2-glow); border-color: var(--v2-brass); }
.v2-yo-links .v2-rk-ic { width: 0.875rem; height: 0.875rem; color: var(--v2-brass); }

/* Retired paddock: modifier on the shipped stall card -- a field gate instead of a stable door. */
.v2-yo-paddock .v2-yard-door { background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(11,26,18,0.85)), linear-gradient(180deg, transparent 0 1.6rem, #6b5434 1.6rem 1.85rem, transparent 1.85rem 2.9rem, #6b5434 2.9rem 3.15rem, transparent 3.15rem), linear-gradient(180deg, #24432f, #1a3324); }
.v2-yo-paddock .v2-yard-door::before { display: none; }
.v2-yo-paddock .v2-yard-plate { letter-spacing: 0.08em; }
.v2-yo-pline { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-yo-pline .is-money { color: var(--v2-glow); }
.v2-yo-pline .v2-st-flag { height: 0.8125rem; }

/* Ledger rows for the lists: pic | name | record | earnings | SR | last ran | view */
.v2-yo-ledger { border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-yo-lrow { display: grid; grid-template-columns: 2.125rem minmax(0, 2fr) 7rem 6.5rem 3.5rem 6.5rem 2rem; gap: 0.75rem; align-items: center; min-height: 2.875rem; padding: 0.4rem 0.8rem; border-top: 1px dashed var(--v2-line); font-size: 0.8rem; }
.v2-yo-ledger > .v2-yo-lrow:first-child { border-top: 0; }
.v2-yo-lrow.v2-yo-lhead { min-height: 2.125rem; background: var(--v2-surface-2); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-yo-lrow img.v2-yo-pic { width: 2.125rem; height: 1.875rem; object-fit: contain; display: block; }
.v2-yo-lname { min-width: 0; display: flex; flex-direction: column; }
.v2-yo-lname a { font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yo-lname a:hover { color: var(--v2-glow); }
.v2-yo-lname small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-yo-lmono { font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-yo-lmoney { font-family: var(--v2-font-mono); font-size: 0.72rem; color: var(--v2-glow); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Graveyard: the memorial garden. Quiet by design: no status colours, no glow. */
.v2-yo-garden-head { text-align: center; margin: 0.4rem auto 1.4rem; max-width: 36rem; }
.v2-yo-garden-head .v2-yard-hello { letter-spacing: 0.07em; }
.v2-yo-garden-head .v2-yard-stable { font-size: 1.7rem; margin: 0.2rem 0 0.4rem; }
.v2-yo-epitaph { margin: 0; font-family: var(--v2-font-display); font-style: italic; font-size: 0.95rem; color: var(--v2-ink-soft); }
.v2-yo-garden-head .v2-yo-figs { justify-content: center; margin-top: 0.9rem; }
.v2-yo-garden-head .v2-yo-figs b { font-size: 1.05rem; color: var(--v2-ink-soft); }
.v2-yo-garden { list-style: none; margin: 0; padding: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 1.4rem 1rem; }
.v2-yo-stone { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; padding: 1.4rem 0.9rem 1.1rem; min-height: 15rem; color: var(--v2-ink-soft); background: linear-gradient(180deg, #46504a, #313934 70%, #2a312d); border: 1px solid rgba(243,234,211,0.14); border-radius: 6.25rem 6.25rem 0.4rem 0.4rem / 3.75rem 3.75rem 0.4rem 0.4rem; box-shadow: inset 0 0 0 0.35rem rgba(0,0,0,0.12), inset 0 0 0 0.45rem rgba(243,234,211,0.06), 0 0.6rem 0 -0.1rem #1d3d26; }
.v2-yo-stone:hover, .v2-yo-stone:focus-within { border-color: rgba(199,154,63,0.6); }
.v2-yo-stone .v2-name-with-image { flex-direction: column; gap: 0.35rem; }
.v2-yo-stone .v2-horse-color { width: 3rem; height: 2.5rem; object-fit: contain; opacity: 0.9; }
.v2-yo-stone a { color: var(--v2-ink); text-decoration: none; }
.v2-yo-stone a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.v2-yo-stone a:focus-visible { outline: none; }
.v2-yo-stone a:focus-visible::after { outline: 2px solid var(--v2-glow); outline-offset: 3px; }
.v2-yo-stone .v2-name { font-family: var(--v2-font-display); font-size: 1.02rem; line-height: 1.2; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-yo-years { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; color: var(--v2-ink-soft); }
.v2-yo-ped { font-family: var(--v2-font-display); font-style: italic; font-size: 0.74rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-yo-rule2 { width: 2.5rem; height: 1px; background: rgba(243,234,211,0.25); margin: 0.2rem 0; }
.v2-yo-epi { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); line-height: 1.55; font-variant-numeric: tabular-nums; }
.v2-yo-epi b { color: var(--v2-ink); font-weight: 400; }
.v2-yo-hon { display: flex; gap: 0.3rem; justify-content: center; margin-top: auto; padding-top: 0.3rem; }
.v2-yo-hon img { height: 0.85rem; width: auto; opacity: 0.85; }

/* Watch list: rail watch */
.v2-yo-sect { margin: 1.4rem 0 0.6rem; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.v2-yo-sect h2 { margin: 0; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.05rem; color: var(--v2-ink); }
.v2-yo-sect span { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-yo-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 0.8rem; }
.v2-yo-tickets .v2-raceticket { margin: 0; position: relative; }
.v2-yo-wpick { position: absolute; top: 0.45rem; right: 0.45rem; z-index: 2; padding: 0.375rem; border-radius: 6px; background: rgba(11,26,18,0.85); border: 1px solid var(--v2-line); display: none; }
.v2-yo-root.is-selecting .v2-yo-wpick { display: block; }
.v2-yo-root.is-selecting .is-picked { outline: 2px solid var(--v2-glow); outline-offset: -2px; }
.v2-yo-wrow { grid-template-columns: 2.125rem minmax(0, 2fr) minmax(0, 1.2fr) 6.5rem 6.5rem 2rem; }
.v2-yo-root.is-selecting .v2-yo-wrow { grid-template-columns: 1.5rem 2.125rem minmax(0, 2fr) minmax(0, 1.2fr) 6.5rem 6.5rem 2rem; }
.v2-yo-lpick { display: none; }
.v2-yo-root.is-selecting .v2-yo-lpick { display: block; }
.v2-yo-selbar { position: sticky; bottom: 0; z-index: 5; margin-top: 1rem; padding: 0.7rem 0.9rem; background: #0e2117; border: 1px solid var(--v2-brass); border-radius: 10px; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.v2-yo-selbar .v2-yo-n { font-size: 1.25rem; }
.v2-yo-selbar .v2-yo-sp { flex: 1 1 auto; }
.v2-yo-selbar .v2-yo-confirm { flex: 1 1 100%; margin: 0; }

.v2-yo-stub { flex-direction: column; gap: 0.1rem; text-decoration: none; }
.v2-yo-stub span { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; color: var(--v2-ink-soft); }
.v2-yo-stub b { font-family: var(--v2-font-hud); font-size: 1.6rem; line-height: 1; color: var(--v2-glow); }
.v2-yo-tickets .v2-raceticket-title a { color: inherit; }

@media (max-width: 900px) {
  .v2-yo-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-yo-row { grid-template-columns: 1.5rem minmax(0, 1fr) 6.25rem 9.5rem 2rem; }
  .v2-yo-row > .v2-st-lbar, .v2-yo-head > .v2-yo-c-stam { display: none; }
  .v2-yo-row.is-tack { grid-template-columns: 1.5rem minmax(0, 1fr) 15.5rem 2rem; }
  .v2-yo-row.is-tack > .v2-yo-chip { display: none; }
  .v2-yo-docket { position: sticky; top: auto; bottom: 0; z-index: 5; border-color: var(--v2-brass); box-shadow: 0 -10px 30px rgba(0,0,0,0.5); padding: 0.6rem 0.8rem; max-height: 75vh; overflow-y: auto; }
  .v2-yo-docket.is-danger { border-color: var(--v2-signal); }
  .v2-yo-docket::before { display: none; }
  .v2-yo-dtoggle { display: flex; width: 100%; align-items: center; gap: 0.6rem; min-height: 2.75rem; background: transparent; border: 0; color: var(--v2-ink); padding: 0; cursor: pointer; font-family: var(--v2-font-mono); font-size: 0.72rem; text-align: left; }
  .v2-yo-dtoggle b { font-family: var(--v2-font-hud); font-size: 1.25rem; color: var(--v2-glow); }
  .v2-yo-dtoggle .v2-rk-ic { width: 1rem; height: 1rem; }
  .v2-yo-dtoggle .v2-rk-ic:last-child { margin-left: auto; color: var(--v2-brass); transform: rotate(-90deg); }
  .v2-yo-dtoggle[aria-expanded="true"] .v2-rk-ic:last-child { transform: rotate(90deg); }
  .v2-yo-docket.is-collapsed .v2-yo-dbody { display: none; }
  .v2-yo-docket .v2-yo-dh { display: none; }
  /* Dockets without a toggle (aisle signs' New aisle) stay a normal panel under the list. */
  .v2-yo-docket:not(:has(.v2-yo-dtoggle)) { position: static; box-shadow: none; max-height: none; }
  .v2-yo-docket:not(:has(.v2-yo-dtoggle)) .v2-yo-dh { display: flex; }
  .v2-yo-lrow { grid-template-columns: 2.125rem minmax(0, 1fr) 6.5rem 6.5rem 2rem; }
  .v2-yo-lrow > .v2-yo-c-rec, .v2-yo-lrow > .v2-yo-c-sr { display: none; }
  .v2-yo-wrow, .v2-yo-root.is-selecting .v2-yo-wrow { grid-template-columns: 2.125rem minmax(0, 1fr) 6.5rem 2rem; }
  .v2-yo-root.is-selecting .v2-yo-wrow { grid-template-columns: 1.5rem 2.125rem minmax(0, 1fr) 6.5rem 2rem; }
  .v2-yo-wrow > .v2-yo-c-stable, .v2-yo-wrow > .v2-yo-c-rec { display: none; }
  .v2-yo-sign { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .v2-yo-sign > .v2-yo-signn { display: none; }
}
@media (max-width: 640px) {
  .v2-yo-tools, .v2-yo-bar { padding: 0.65rem; }
  .v2-yo-quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; }
  .v2-yo-q { min-height: 2.5rem; }
  .v2-yo-head { display: none; }
  .v2-yo-row { grid-template-columns: 1.75rem minmax(0, 1fr) auto 2.75rem; grid-template-areas: "pick who who view" "pick chip fig fig"; gap: 0.3rem 0.6rem; padding: 0.55rem 0.6rem; }
  .v2-yo-row > input { grid-area: pick; align-self: start; margin-top: 0.3rem; width: 1.375rem; height: 1.375rem; }
  .v2-yo-who { grid-area: who; }
  .v2-yo-chip { grid-area: chip; }
  .v2-yo-fig { grid-area: fig; justify-self: end; }
  .v2-yo-view { grid-area: view; }
  .v2-yo-view.v2-st-ib { width: 2.75rem; height: 2.75rem; }
  .v2-yo-row.is-tack { grid-template-columns: 1.75rem minmax(0, 1fr) 2.75rem; grid-template-areas: "pick who view" "pick tack tack"; }
  .v2-yo-row.is-tack > .v2-yo-tack { grid-area: tack; }
  .v2-yo-tog span { min-height: 2.5rem; padding: 0.3rem 0.7rem; }
  .v2-yo-sub { padding-left: 0; white-space: normal; }
  .v2-yo-who .v2-name-with-image { flex-wrap: wrap; row-gap: 0.15rem; }
  .v2-yo-who .v2-name { white-space: normal; overflow-wrap: anywhere; }
  .v2-yo-figs { gap: 0.5rem 1.1rem; }
  .v2-yo-figs b { font-size: 1.1rem; }
  .v2-yo-lrow { grid-template-columns: 2.125rem minmax(0, 1fr) auto 2.75rem; grid-template-areas: "pic name money view" "pic name last view"; gap: 0.15rem 0.6rem; padding: 0.55rem 0.6rem; }
  .v2-yo-lrow.v2-yo-lhead { display: none; }
  .v2-yo-lrow > .v2-yo-pic { grid-area: pic; }
  .v2-yo-lrow > .v2-yo-lname { grid-area: name; }
  .v2-yo-lrow > .v2-yo-lmoney { grid-area: money; }
  .v2-yo-lrow > .v2-yo-c-last { grid-area: last; justify-self: end; }
  .v2-yo-lrow > .v2-st-ib { grid-area: view; width: 2.75rem; height: 2.75rem; }
  .v2-yo-wrow, .v2-yo-root.is-selecting .v2-yo-wrow { grid-template-columns: 2.125rem minmax(0, 1fr) 2.75rem; grid-template-areas: "pic name view" "pic chip view"; }
  .v2-yo-root.is-selecting .v2-yo-wrow { grid-template-columns: 1.75rem 2.125rem minmax(0, 1fr) 2.75rem; grid-template-areas: "pick pic name view" "pick pic chip view"; }
  .v2-yo-wrow > .v2-yo-lpick { grid-area: pick; }
  .v2-yo-wrow > .v2-yo-pic { grid-area: pic; }
  .v2-yo-wrow > .v2-yo-lname { grid-area: name; }
  .v2-yo-wrow > .v2-yo-c-chip { grid-area: chip; }
  .v2-yo-wrow > .v2-st-ib { grid-area: view; width: 2.75rem; height: 2.75rem; }
  .v2-yo-tickets { grid-template-columns: minmax(0, 1fr); }
  .v2-yo-garden { grid-template-columns: 1fr 1fr; gap: 1.1rem 0.6rem; }
  .v2-yo-stone { min-height: 13.5rem; padding: 1.2rem 0.55rem 0.9rem; border-radius: 4.5rem 4.5rem 0.4rem 0.4rem / 2.75rem 2.75rem 0.4rem 0.4rem; }
  .v2-yo-stone .v2-name { font-size: 0.92rem; }
  .v2-yo-sign { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .v2-yo-sign > .v2-yo-sacts { grid-column: 1 / -1; justify-content: flex-start; }
  .v2-yo-sedit { grid-template-columns: minmax(0, 1fr); }
  .v2-yo-selbar .v2-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .v2-yo-dtoggle .v2-rk-ic:last-child { transition: transform 0.15s ease; }
  .v2-yo-row.is-done { transition: background-color 0.4s ease; }
}
/* Build addition (not in the mockup): placeholder cell when a ledger horse has no colour image. */
.v2-yo-lrow span.v2-yo-pic { display: block; width: 2.125rem; height: 1.875rem; }
/* Build additions: stones and pager must never widen the page (found at 375px, both text sizes). */
.v2-yo-stone { min-width: 0; }
.v2-yo-stone .v2-name-with-image { max-width: 100%; }
.v2-yo-stone .v2-name { white-space: normal; }
.v2-yo-root .v2-pager .v2-pages { flex-wrap: wrap; }
/* Watch list: the last-race link sits inside the mono sub-line, not in the display name style. */
.v2-yo-lname small a { font: inherit; color: var(--v2-brass); white-space: nowrap; }
.v2-yo-lname small a:hover { color: var(--v2-glow); }
@media (max-width: 640px) {
  .v2-yo-garden { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ===== end Yard office (round 3) ===== */
/* ===== Auth (round 3) ===== */
/* Owners' Entrance: login, register, forgot/reset, verify, resend, change password.
   The scene uses the same image and fade as the logged-out /v2 gate (.v2-intro-gate)
   but is written out here, so this section depends on nothing from the Intro section. */
.v2-auth { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); grid-template-areas: "copy door" "wire door"; gap: 1.4rem 2.2rem; align-items: end; min-height: 36rem; max-width: 72rem; margin: 0 auto; padding: 2rem; border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; background: var(--v2-surface) url("https://cdn.sportofkings.us/images/background/SOKViewer.jpg") 30% 60% / cover no-repeat; }
.v2-auth::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,26,18,0.15) 0%, rgba(11,26,18,0.7) 52%, rgba(11,26,18,0.96) 100%), linear-gradient(90deg, rgba(11,26,18,0.78) 0%, rgba(11,26,18,0.35) 45%, rgba(11,26,18,0) 62%); }
.v2-auth.is-plain { grid-template-columns: minmax(0, 28rem); grid-template-areas: "copy" "door"; justify-content: center; align-items: start; min-height: 0; background: none; border: 0; padding: 0.5rem 0 0; overflow: visible; }
.v2-auth.is-plain::before { display: none; }
/* The logged-out auth pages hide the game's tab bar (five of the nine tabs bounce back to this login),
   so the form sits in the first screen on a phone. Change password (.is-plain) keeps it.
   CSS-only so v2-layout.pug, which other round-3 builds edit, is untouched. */
.v2-app:has(.v2-auth:not(.is-plain)) > .v2-tabs { display: none; }
.v2-auth.is-quiet { grid-template-areas: "copy door"; align-items: center; min-height: 30rem; }

.v2-auth-copy { grid-area: copy; min-width: 0; align-self: end; max-width: 36rem; display: flex; flex-direction: column; gap: 0.5rem; }
.v2-auth-copy > * { margin: 0; }
.v2-auth-eyebrow { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-app .v2-auth-eyebrow a { color: var(--v2-brass); }
.v2-app .v2-auth-eyebrow a:hover { color: var(--v2-glow); }
.v2-auth-h1 { font-family: var(--v2-font-serif); font-weight: 400; font-size: 2.1rem; line-height: 1.15; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-auth-lede { font-size: 0.95rem; line-height: 1.55; color: var(--v2-ink); max-width: 34rem; }
.v2-auth-pulse { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; list-style: none; padding: 0; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-auth-pulse b { font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink-bright); margin-right: 0.25rem; }

.v2-auth-steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.4rem; }
.v2-auth-steps li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.6rem; align-items: start; font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-auth-steps b { display: block; color: var(--v2-ink); font-weight: 600; }
.v2-auth-pole { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--v2-bg); border: 2px solid var(--v2-brass); font-family: var(--v2-font-hud); font-weight: 700; font-size: 0.78rem; color: var(--v2-brass); }

/* the live wire: last winner + next post. Cards sit on the scene, so they get a solid-ish fill. */
.v2-auth-wire { grid-area: wire; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; min-width: 0; }
.v2-auth-wire-card { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: 0.65rem; align-items: center; height: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 8px; background: rgba(11,26,18,0.82); }
a.v2-auth-wire-card:hover { border-color: var(--v2-brass); }
.v2-auth-wire-card .v2-rk-ic { width: 1.75rem; height: 1.75rem; color: var(--v2-glow); }
.v2-auth-wire-card small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-auth-wire-card b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 0.95rem; color: var(--v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-auth-wire-card span.v2-auth-wire-meta { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-auth-wire-card .v2-countdown { display: inline; font-size: 0.95rem; }
.v2-auth-wire-card .v2-countdown small { display: inline; margin-left: 0.3rem; text-transform: none; letter-spacing: 0; }

/* the door: the form card, headed by a stall-door lintel and a brass name plate */
.v2-auth-door { grid-area: door; align-self: center; min-width: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 48px rgba(0,0,0,0.45); }
.v2-auth-lintel { position: relative; height: 4.25rem; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(11,26,18,0.75)), repeating-linear-gradient(90deg, #2a2016 0 22px, #241b12 22px 23px), #2a2016; border-bottom: 2px solid var(--v2-brass); }
.v2-auth-lintel::before { content: ""; position: absolute; inset: 0.6rem 0.75rem auto; height: 2.6rem; border: 2px solid rgba(199,154,63,0.35); border-bottom: none; border-radius: 40px 40px 0 0; }
.v2-auth-plate { position: relative; transform: translateY(50%); max-width: 88%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); color: var(--v2-ink-dark); font-family: var(--v2-font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.2rem 0.75rem; border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.v2-auth-form { display: flex; flex-direction: column; gap: 1rem; padding: 1.9rem 1.5rem 1.4rem; margin: 0; }
.v2-auth-form-h { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.3rem; color: var(--v2-ink-bright); }
.v2-auth-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.v2-auth-field .v2-form-label { margin: 0; color: var(--v2-ink-soft); }
.v2-auth-field .v2-form-hint { margin: 0; }
.v2-auth-field .v2-form-input { max-width: none; width: 100%; min-height: 2.75rem; padding: 0.6rem 0.8rem; font-size: 1rem; background: var(--v2-bg); }
.v2-auth-field .v2-form-input::placeholder { color: var(--v2-ink-faint); }
.v2-auth-field .v2-form-input[aria-invalid="true"] { border-color: var(--v2-signal); }
.v2-auth-ferr { display: flex; gap: 0.35rem; align-items: baseline; font-family: var(--v2-font-mono); font-size: 0.7rem; color: var(--v2-signal-soft); }
.v2-auth-ferr::before { content: "!"; flex: 0 0 auto; width: 1rem; height: 1rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--v2-signal); color: var(--v2-ink-dark); font-weight: 700; font-size: 0.66rem; }
.v2-auth-pw { position: relative; }
.v2-auth-pw .v2-form-input { padding-right: 4.5rem; }
.v2-auth-reveal { position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); min-height: 2.25rem; padding: 0 0.65rem; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--v2-brass); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.v2-auth-reveal:hover { color: var(--v2-glow); border-color: var(--v2-line); }
.v2-auth-check { display: flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; margin: -0.4rem 0; font-size: 0.88rem; color: var(--v2-ink-soft); cursor: pointer; }
.v2-auth-check input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--v2-brass); cursor: pointer; }
.v2-auth-submit { width: 100%; min-height: 2.875rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.v2-auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; margin: -0.3rem 0 0; padding: 0; list-style: none; font-size: 0.82rem; }
.v2-app .v2-auth-links a, .v2-app .v2-auth-inline { color: var(--v2-brass); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(199,154,63,0.5); }
.v2-app .v2-auth-links a:hover, .v2-app .v2-auth-inline:hover { color: var(--v2-glow); }
.v2-auth-links a { display: inline-flex; align-items: center; min-height: 2.25rem; }
.v2-auth-legal { margin: 0; font-size: 0.75rem; color: var(--v2-ink-faint); }
.v2-auth-foot { display: flex; flex-direction: column; gap: 0.55rem; padding: 1rem 1.5rem 1.3rem; border-top: 1px dashed var(--v2-line); background: rgba(11,26,18,0.35); }
.v2-auth-foot p { margin: 0; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-auth-foot .v2-auth-links { margin: 0; }
.v2-auth-foot .v2-btn { width: 100%; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; }

/* notices: the status vocabulary. Each kind has its own glyph and title text, so colour is never alone. */
.v2-auth-note { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; align-items: start; padding: 0.75rem 0.85rem; border: 1px solid var(--v2-line); border-left-width: 3px; border-radius: 6px; font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-auth-note b { display: block; color: var(--v2-ink-bright); font-weight: 600; }
.v2-auth-note p { margin: 0.15rem 0 0; }
.v2-auth-note-ic { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: var(--v2-ink-dark); }
.v2-auth-note-ic .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-auth-note.is-error { border-color: rgba(255,117,87,0.45); border-left-color: var(--v2-signal); background: rgba(255,90,54,0.1); }
.v2-auth-note.is-error .v2-auth-note-ic { background: var(--v2-signal); }
.v2-auth-note.is-warn { border-color: rgba(255,181,69,0.4); border-left-color: var(--v2-glow); background: rgba(255,181,69,0.08); }
.v2-auth-note.is-warn .v2-auth-note-ic { background: var(--v2-glow); }
.v2-auth-note.is-ok { border-color: rgba(95,200,145,0.4); border-left-color: var(--v2-good); background: rgba(95,200,145,0.1); }
.v2-auth-note.is-ok .v2-auth-note-ic { background: var(--v2-good); }
.v2-auth-note.is-info { border-color: rgba(117,159,255,0.4); border-left-color: var(--v2-blue); background: rgba(90,140,255,0.1); }
.v2-auth-note.is-info .v2-auth-note-ic { background: var(--v2-blue); }

@media (max-width: 900px) {
  .v2-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: 1.2rem 1.4rem; padding: 1.5rem; min-height: 0; }
  .v2-auth-wire { grid-template-columns: 1fr; }
  .v2-auth-h1 { font-size: 1.75rem; }
}
@media (max-width: 640px) {
  .v2-auth { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "door" "wire"; gap: 1rem; padding: 0; border: 0; border-radius: 0; overflow: visible; background: none; align-items: start; }
  .v2-auth::before { display: none; }
  .v2-auth.is-quiet { grid-template-areas: "copy" "door"; min-height: 0; }
  .v2-auth-copy { padding: 2.4rem 0.9rem 0.9rem; gap: 0.35rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(180deg, rgba(11,26,18,0.5) 0%, rgba(11,26,18,0.92) 70%), var(--v2-surface) url("https://cdn.sportofkings.us/images/background/SOKViewer.jpg") 30% 45% / cover no-repeat; }
  .v2-auth.is-plain .v2-auth-copy { padding: 0; border: 0; background: none; }
  .v2-auth-h1 { font-size: 1.5rem; }
  .v2-auth-lede { font-size: 0.88rem; }
  .v2-auth-pulse, .v2-auth-steps { display: none; }
  .v2-auth-lintel { height: 3rem; }
  .v2-auth-lintel::before { display: none; }
  .v2-auth-form { padding: 1.6rem 1rem 1.1rem; gap: 0.9rem; }
  .v2-auth-foot { padding: 0.9rem 1rem 1.1rem; }
  .v2-auth-links { flex-direction: column; gap: 0; }
  .v2-auth-links a { min-height: 2.75rem; }
}
/* ===== end Auth (round 3) ===== */

/* ===== Integration fixes (round 3) ===== */
/* Race names on the Race Day hub and race lists were cut to one letter on phones
 * ("J…") at Larger text. Let them wrap to a second line instead of truncating. */
@media (max-width: 640px) {
  .v2-rh-nm { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
}
/* ===== end Integration fixes (round 3) ===== */
/* ===== Records & history (round 3) ===== */
/* The Trophy Room: v2-hall-of-fame, v2-records-book, v2-season-records, v2-speed-ratings,
   v2-rankings, v2-statistics, v2-season-preview. See SPEC-records.md.
   Reuses .v2-yard-top/-hello/-stable/-ranks/-rank/-door/-initials, .v2-lb-switch/-podium/-step/-step-body/-step-name/-step-link/-step-val/-step-gap/
   -plinth/-rosette/-line/-lines/-lines-head/-pos/-who/-name/-sub/-stable/-form/-bar/-val/-honour,
   .v2-rk-portrait/-tag/-mine/-ic/-surface/-going/-grade/-oval-mini, .v2-status-chip.retired/.deceased,
   .v2-section-label .v2-rc-h, .v2-filterbar, .v2-field, .v2-select, .v2-pager, .v2-empty.
   Does NOT modify any of them, and never touches .v2-ranked-row / .v2-horse-row. */

/* -- the "Records room" wing nav shared by all seven pages -- */
.v2-rec-wings { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-rec-wings li + li { border-left: 1px dashed var(--v2-line); }
.v2-rec-wings a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; min-height: 3.5rem; padding: 0.5rem 0.3rem; text-align: center; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0; color: var(--v2-ink-soft); }
.v2-rec-wings a .v2-rk-ic { width: 1.25rem; height: 1.25rem; color: var(--v2-brass); }
.v2-rec-wings a:hover { background: rgba(199, 154, 63, 0.06); color: var(--v2-ink); }
/* Current wing = tint + 3px brass underline + bold label: never colour alone. */
.v2-rec-wings a[aria-current='page'] { background: linear-gradient(180deg, rgba(199, 154, 63, 0.2), rgba(199, 154, 63, 0.05)); box-shadow: inset 0 -3px 0 var(--v2-brass); color: var(--v2-ink-bright); font-weight: 700; }
.v2-rec-wings a:focus-visible { outline-offset: -3px; }

/* -- filter chips (links; aria-current marks the active one). Wraps, so any count fits 375px -- */
.v2-rec-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.v2-rec-chips a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.25rem; padding: 0.3rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 100px; background: var(--v2-surface); font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-rec-chips a:hover { color: var(--v2-ink); border-color: var(--v2-brass); }
.v2-rec-chips a[aria-current='true'], .v2-rec-chips a[aria-current='page'] { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-rec-chips small { font-size: 0.66rem; opacity: 0.8; }
.v2-rec-chips-label { width: 100%; margin: 0 0 0.1rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }

/* -- the record-board time tile ("split-flap" digits). The digits are real text. -- */
.v2-rec-time { display: inline-flex; align-items: center; padding: 0.2rem 0.45rem; border-radius: 5px; background: linear-gradient(180deg, #14100a 0 49%, #0b0906 51%); border: 1px solid rgba(199, 154, 63, 0.45); box-shadow: inset 0 1px 0 rgba(255, 248, 234, 0.08); font-family: var(--v2-font-mono); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--v2-glow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-rec-time.is-lg { font-size: 1.45rem; padding: 0.25rem 0.55rem; }
.v2-rec-time.is-fig { color: var(--v2-ink-bright); min-width: 3.6rem; justify-content: center; }

/* -- short line: pos | portrait | who | value. Its own grid (does not reuse .v2-lb-line's 5 columns) -- */
.v2-rec-slines { list-style: none; margin: 0; padding: 0; }
.v2-rec-sline { display: grid; grid-template-columns: 2.5rem 2.375rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.5rem 0.9rem; border-bottom: 1px dashed var(--v2-line); }
.v2-rec-sline:last-child { border-bottom: none; }
.v2-rec-sline:hover { background: rgba(199, 154, 63, 0.05); }
.v2-rec-sline.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-rec-sline.no-art { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
.v2-rec-sline > .v2-rk-portrait { width: 2.375rem; height: 2.375rem; }
.v2-rec-sline .v2-lb-pos { font-size: 1rem; }
.v2-rec-sline .v2-lb-pos .v2-lb-rosette { margin: 0 auto; }
.v2-rec-sval { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; text-align: right; min-width: 0; }
.v2-rec-sval b { font-family: var(--v2-font-hud); font-size: 1.05rem; line-height: 1.1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-rec-sval b.is-money { color: var(--v2-glow); }
.v2-rec-sval small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-rec-sval a { color: var(--v2-glow); }
.v2-rec-sval a:hover { text-decoration: underline; }

/* -- shelves: a titled box holding short lines (season honours, speed lists, statistics) -- */
.v2-rec-shelves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.v2-rec-shelf { min-width: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rec-shelf-h { display: flex; align-items: center; gap: 0.55rem; margin: 0; padding: 0.65rem 0.9rem; border-bottom: 2px solid var(--v2-brass); background: linear-gradient(180deg, #2a2016, #1f180f); font-family: var(--v2-font-display); font-weight: 400; font-size: 1rem; color: var(--v2-ink); }
.v2-rec-shelf-h .v2-rk-ic { width: 1.25rem; height: 1.25rem; color: var(--v2-glow); }
.v2-rec-shelf-h small { margin-left: auto; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-shelf .v2-empty { margin: 0.8rem; padding: 1rem 0.5rem; }

/* -- Hall of Fame: the plaque wall -- */
.v2-rec-wall { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.v2-rec-wall > li { min-width: 0; }
.v2-rec-wall > li.is-top { grid-column: 1 / -1; }
.v2-rec-plaque { position: relative; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); height: 100%; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #241c12, #17120b 70%); border: 1px solid rgba(199, 154, 63, 0.55); box-shadow: inset 0 0 0 4px #17120b, inset 0 0 0 5px rgba(199, 154, 63, 0.35); }
.v2-rec-plaque:hover { border-color: var(--v2-brass); }
.v2-rec-plaque:focus-within { border-color: var(--v2-glow); }
.v2-rec-plaque.is-mine { box-shadow: inset 0 0 0 4px #17120b, inset 0 0 0 5px rgba(199, 154, 63, 0.35), inset 0 3px 0 var(--v2-glow); }
/* brass screw heads, decorative */
.v2-rec-plaque::before, .v2-rec-plaque::after { content: ""; position: absolute; top: 0.55rem; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0d79a, #8a6a2a); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.v2-rec-plaque::before { right: 0.55rem; }
.v2-rec-plaque::after { right: 1.35rem; opacity: 0; }
.v2-rec-plaque .v2-yard-door { height: auto; min-height: 100%; border-bottom: none; border-right: 2px solid var(--v2-brass); }
.v2-rec-plaque .v2-yard-door img { height: 6.5rem; }
.v2-rec-plaque .v2-yard-initials { margin-bottom: 1.2rem; }
.v2-rec-plaque-body { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; padding: 0.8rem 1.1rem 0.9rem 0.95rem; }
.v2-rec-plaque-no { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-brass); }
.v2-rec-plaque-no b { font-family: var(--v2-font-display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0; color: var(--v2-brass); text-transform: none; }
.v2-rec-plaque-name { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.v2-rec-plaque-name a { color: var(--v2-ink-bright); }
/* Stretched link: the whole plaque opens the horse; the stable / sire / dam links sit above it. */
.v2-rec-plaque-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.v2-rec-plaque:hover .v2-rec-plaque-name a { color: var(--v2-glow); }
.v2-rec-plaque-name .v2-rk-mine { margin-left: 0; }
.v2-rec-plaque-sub, .v2-rec-plaque-ped { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; margin: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-plaque-ped { font-family: var(--v2-font-display); font-style: italic; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-rec-plaque-ped a { color: var(--v2-ink); }
.v2-rec-plaque-ped a:hover { color: var(--v2-glow); }
.v2-rec-plaque-sub a, .v2-rec-plaque-ped a { position: relative; z-index: 2; }
.v2-rec-plaque-sub .v2-status-chip { font-size: 0.66rem; padding: 0.06rem 0.45rem; }
.v2-rec-plaque .v2-lb-form { max-width: 18rem; }
.v2-rec-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0.25rem 0 0; }
.v2-rec-fig { min-width: 0; padding: 0.35rem 0.5rem; border: 1px solid rgba(199, 154, 63, 0.3); border-radius: 6px; background: rgba(11, 9, 6, 0.5); }
.v2-rec-fig dt { font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rec-fig dd { margin: 0; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v2-rec-fig dd.is-money { color: var(--v2-glow); }
/* The ranked-by figure: brass frame + "ranked by" word in its label, never colour alone. */
.v2-rec-fig.is-key { border-color: var(--v2-brass); box-shadow: inset 0 -2px 0 var(--v2-brass); }
.v2-rec-fig.is-key dt { color: var(--v2-brass); }
.is-top .v2-rec-plaque { grid-template-columns: 11rem minmax(0, 1fr); }
.is-top .v2-rec-plaque .v2-yard-door img { height: 9rem; }
.is-top .v2-rec-plaque-name { font-size: 1.6rem; }
.is-top .v2-rec-fig dd { font-size: 1.3rem; }
.is-top .v2-rec-plaque::after { opacity: 1; }

/* -- Records Book: the record board, one line per trip -- */
.v2-rec-board { list-style: none; margin: 0 0 1.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-rec-bhead, .v2-rec-bline { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr) minmax(0, 1fr); }
.v2-rec-bhead { padding: 0.45rem 0; background: linear-gradient(180deg, #2a2016, #1f180f); border-bottom: 2px solid var(--v2-brass); font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rec-bhead span { padding: 0 1rem; }
.v2-rec-bline { border-bottom: 1px dashed var(--v2-line); }
.v2-rec-bline:last-child { border-bottom: none; }
.v2-rec-plate { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border-right: 1px solid var(--v2-line); background: rgba(11, 9, 6, 0.35); }
.v2-rec-plate .v2-rk-oval-mini { width: 3.25rem; height: auto; flex: 0 0 auto; }
.v2-rec-plate b { display: block; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.15rem; color: var(--v2-ink-bright); line-height: 1.1; white-space: nowrap; }
.v2-rec-plate small { display: block; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); white-space: nowrap; }
.v2-rec-cell { display: grid; grid-template-columns: auto 2.375rem minmax(0, 1fr); grid-template-areas: "time por who" "time por meta"; gap: 0.1rem 0.6rem; align-items: center; padding: 0.6rem 0.9rem; min-width: 0; }
.v2-rec-cell + .v2-rec-cell { border-left: 1px dashed var(--v2-line); }
.v2-rec-cell > .v2-rec-time { grid-area: time; }
.v2-rec-cell > .v2-rk-portrait { grid-area: por; width: 2.375rem; height: 2.375rem; }
.v2-rec-cell > .v2-rec-who { grid-area: who; }
.v2-rec-cell > .v2-rec-meta { grid-area: meta; }
.v2-rec-cell.is-empty { display: flex; align-items: center; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-who { display: flex; align-items: center; flex-wrap: wrap; gap: 0.1rem 0.5rem; min-width: 0; }
.v2-rec-who > a:first-child { font-family: var(--v2-font-display); font-size: 0.98rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-rec-who > a:first-child:hover { color: var(--v2-glow); }
.v2-rec-who .v2-rk-mine, .v2-rec-who .v2-rk-tag { margin-left: 0; }
.v2-rec-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.55rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-meta a { color: var(--v2-brass); }
.v2-rec-meta a:hover { color: var(--v2-glow); }
.v2-rec-meta .v2-rk-surface { font-size: 0.66rem; padding: 0.12rem 0.5rem 0.12rem 0.2rem; }
.v2-rec-meta .v2-rk-swatch { width: 0.8rem; height: 0.8rem; }
/* The quicker of the two sexes holds the outright record: a word tag + brass inset, never colour alone. */
.v2-rec-cell.is-outright { background: rgba(199, 154, 63, 0.07); box-shadow: inset 0 -2px 0 var(--v2-brass); }

/* -- Clocker's list: pos | time | portrait | who | trip | weight -- */
.v2-rec-clock-head, .v2-rec-cline { display: grid; grid-template-columns: 2.75rem 6rem 2.375rem minmax(0, 1fr) 11rem 5rem; gap: 0.7rem; align-items: center; }
.v2-rec-clock-head { padding: 0 0.9rem 0.4rem; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-rec-clock { list-style: none; margin: 0 0 1.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-rec-cline { padding: 0.5rem 0.9rem; border-bottom: 1px dashed var(--v2-line); }
.v2-rec-cline:last-child { border-bottom: none; }
.v2-rec-cline:hover { background: rgba(199, 154, 63, 0.05); }
.v2-rec-cline.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-rec-cline > .v2-rk-portrait { width: 2.375rem; height: 2.375rem; }
.v2-rec-cline .v2-lb-pos { font-size: 1rem; }
.v2-rec-trip { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rec-trip > span { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.v2-rec-trip .v2-rk-surface { font-size: 0.66rem; padding: 0.12rem 0.5rem 0.12rem 0.2rem; }
.v2-rec-trip .v2-rk-swatch { width: 0.8rem; height: 0.8rem; }
.v2-rec-wt { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; font-family: var(--v2-font-hud); font-size: 0.95rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-rec-wt .v2-rk-tag { font-size: 0.66rem; padding: 0.06rem 0.3rem; }

/* -- filter form on the clocker's list: reuses .v2-filterbar; only the checkbox row is new -- */
.v2-rec-check { display: flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; font-family: var(--v2-font-mono); font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-rec-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--v2-brass); }

/* -- Season Preview: the form guide lines -- */
.v2-rec-day { margin: 1.4rem 0 0.5rem; display: flex; align-items: baseline; gap: 0.7rem; font-family: var(--v2-font-display); font-weight: 400; font-size: 1.1rem; color: var(--v2-ink); }
.v2-rec-day small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-plines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-rec-pline { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 12.5rem 5.5rem; gap: 0.7rem; align-items: center; padding: 0.55rem 0.9rem; border-bottom: 1px dashed var(--v2-line); }
.v2-rec-pline:last-child { border-bottom: none; }
.v2-rec-pline.is-feature { background: rgba(199, 154, 63, 0.06); box-shadow: inset 3px 0 0 var(--v2-brass); }
.v2-rec-ptime { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; }
.v2-rec-prace { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.v2-rec-prace > span { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.45rem; min-width: 0; }
.v2-rec-prace b { font-family: var(--v2-font-display); font-weight: 400; font-size: 0.98rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-rec-prace small { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-ptrip { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; }
.v2-rec-ptrip .v2-rk-surface, .v2-rec-ptrip .v2-rk-going { font-size: 0.66rem; padding: 0.12rem 0.5rem 0.12rem 0.25rem; }
.v2-rec-ptrip .v2-rk-swatch { width: 0.8rem; height: 0.8rem; }
.v2-rec-pdist { font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink); }
.v2-rec-ppurse { text-align: right; font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-rec-ppurse small { display: block; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; color: var(--v2-ink-faint); }

/* -- small helpers -- */
.v2-rec-wt-inline { display: none; }
.v2-rec-note { margin: 0.6rem 0 1rem; font-family: var(--v2-font-mono); font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-rec-note a { color: var(--v2-brass); }
.v2-rec-stable-img { width: 100%; height: 100%; object-fit: cover; }
.v2-rec-podium-img { position: relative; width: min(6rem, 90%); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 0.5rem; }
.v2-rec-unbeaten .v2-rk-ic { width: 1.4rem; height: 1.4rem; color: var(--v2-glow); }

@media (max-width: 900px) {
  .v2-rec-wings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-rec-wings li + li { border-left: none; }
  .v2-rec-wings li { border-right: 1px dashed var(--v2-line); border-bottom: 1px dashed var(--v2-line); }
  .v2-rec-wall { grid-template-columns: 1fr; }
  .v2-rec-bhead, .v2-rec-bline { grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 1fr); }
  .v2-rec-cell { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time time" "who who" "meta meta"; }
  .v2-rec-cell > .v2-rk-portrait { display: none; }
  .v2-rec-clock-head, .v2-rec-cline { grid-template-columns: 2.5rem 5.5rem 2.375rem minmax(0, 1fr) 8.5rem 4rem; }
  .v2-rec-pline { grid-template-columns: 3.25rem minmax(0, 1fr) 10rem 5rem; }
}
@media (max-width: 640px) {
  .v2-rec-wings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-rec-wings a { min-height: 3.1rem; font-size: 0.66rem; }
  .v2-rec-shelves { grid-template-columns: 1fr; }
  .v2-rec-plaque, .is-top .v2-rec-plaque { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .v2-rec-plaque .v2-yard-door img, .is-top .v2-rec-plaque .v2-yard-door img { height: 4.75rem; }
  .v2-rec-plaque-body { padding: 0.7rem 0.8rem; }
  .is-top .v2-rec-plaque-name { font-size: 1.25rem; }
  .v2-rec-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-top .v2-rec-fig dd { font-size: 1.05rem; }
  .v2-rec-bhead { display: none; }
  .v2-rec-bline { grid-template-columns: 1fr; }
  .v2-rec-plate { border-right: none; border-bottom: 1px solid var(--v2-line); padding: 0.5rem 0.8rem; }
  .v2-rec-cell { grid-template-columns: auto 2.375rem minmax(0, 1fr); grid-template-areas: "time por who" "time por meta"; padding: 0.55rem 0.8rem; }
  .v2-rec-cell > .v2-rk-portrait { display: flex; }
  .v2-rec-cell + .v2-rec-cell { border-left: none; border-top: 1px dashed var(--v2-line); }
  .v2-rec-cell::before { content: attr(data-sex); grid-column: 1 / -1; font-family: var(--v2-font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
  .v2-rec-cell { grid-template-areas: "lbl lbl lbl" "time por who" "time por meta"; }
  .v2-rec-cell::before { grid-area: lbl; }
  .v2-rec-clock-head { display: none; }
  .v2-rec-cline { grid-template-columns: 2.25rem auto minmax(0, 1fr); grid-template-areas: "pos time who" "pos trip trip"; gap: 0.3rem 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-rec-cline > .v2-lb-pos { grid-area: pos; }
  .v2-rec-cline > .v2-rec-time { grid-area: time; }
  .v2-rec-cline > .v2-rk-portrait { display: none; }
  .v2-rec-cline > .v2-rec-who { grid-area: who; }
  .v2-rec-cline > .v2-rec-trip { grid-area: trip; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
  .v2-rec-cline > .v2-rec-wt { display: none; }
  .v2-rec-trip .v2-rec-wt-inline { display: inline; }
  .v2-rec-sline { padding: 0.5rem 0.7rem; gap: 0.5rem; }
  .v2-rec-pline { grid-template-columns: 3rem minmax(0, 1fr) auto; grid-template-areas: "time race purse" "time trip trip"; gap: 0.3rem 0.55rem; padding: 0.55rem 0.7rem; }
  .v2-rec-pline > .v2-rec-ptime { grid-area: time; }
  .v2-rec-pline > .v2-rec-prace { grid-area: race; }
  .v2-rec-pline > .v2-rec-ptrip { grid-area: trip; }
  .v2-rec-pline > .v2-rec-ppurse { grid-area: purse; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-rec-plaque, .v2-rec-wings a, .v2-rec-chips a { transition: none; }
}
/* Statistics badges (v2-statistics.pug ul.v2-rec-stats): the shipped yard strip ellipsises at <=640px,
   which cut the W · P · S badge to "4,822 · 5,628 · 5,…". Wrap instead, on this page only. */
@media (max-width: 640px) {
  .v2-rec-stats .v2-yard-rank b, .v2-rec-stats .v2-yard-rank small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .v2-rec-stats .v2-yard-rank b { line-height: 1.15; }
}
/* ===== end Records & history (round 3) ===== */

/* ===== Auction rooms (round 4) ===== */
/* v2-auction-sm.pug "The Stable Manager's Sale" (.v2-sm-*) and v2-auction-history.pug "The Sale
   Book" (.v2-abk-*). SPEC-auctions.md. Everything else on these pages is reused from Market
   (round 3), Sales ring (round 2) and Race Card: .v2-rc-mast, .v2-mkt-*, .v2-ring-*, .v2-yard-*.
   No shared selector is restyled except through .v2-sm-root / .v2-abk-root. */
.v2-sm-root .v2-mkt-chip, .v2-abk-root .v2-mkt-chip, .v2-sm-root .v2-mkt-bidform label { letter-spacing: 0.07em; }
.v2-sm-root .v2-mkt-note cite, .v2-abk-root .v2-mkt-note cite { letter-spacing: 0; text-transform: none; }
.v2-sm-root .v2-section-label a { font-size: 0.7rem; color: var(--v2-brass); }
.v2-sm-root .v2-section-label a:hover { color: var(--v2-glow); }

/* Labels read as ink-soft on these pages. */
.v2-sm-root .v2-mkt-bid-k, .v2-sm-root .v2-mkt-facts dt, .v2-sm-root .v2-rc-purse-k, .v2-sm-root .v2-ring-wallet, .v2-sm-root .v2-mkt-bidform label, .v2-sm-root .v2-mkt-note cite, .v2-sm-root .v2-mkt-meta, .v2-abk-root .v2-mkt-bid-k, .v2-abk-root .v2-mkt-facts dt, .v2-abk-root .v2-rc-purse-k, .v2-abk-root .v2-ring-wallet, .v2-abk-root .v2-mkt-note cite, .v2-abk-root .v2-mkt-meta { color: var(--v2-ink-soft); }

/* SM: window + paddle rack */
.v2-sm-board { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1rem; margin-bottom: 1.2rem; align-items: stretch; }
.v2-sm-board .v2-mkt-window { margin-bottom: 0; }
.v2-sm-cap { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.9rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.v2-sm-cap-h { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.7rem; }
.v2-sm-cap-h b { font-family: var(--v2-font-hud); font-size: 1.1rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-sm-cap p { margin: 0; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-sm-paddles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.25rem; max-width: 16.5rem; }
.v2-sm-paddles li { position: relative; aspect-ratio: 1; max-width: 1.35rem; margin-bottom: 0.55rem; border-radius: 50%; border: 2px solid var(--v2-ink-faint); }
.v2-sm-paddles li::after { content: ""; position: absolute; left: 50%; top: 100%; width: 0.22rem; height: 0.55rem; transform: translateX(-50%); background: var(--v2-ink-faint); border-radius: 0 0 2px 2px; }
.v2-sm-paddles li.on { background: var(--v2-ink); border-color: var(--v2-brass); }
.v2-sm-paddles li.on::after { background: var(--v2-brass); }

/* SM: my bids */
.v2-sm-clip { margin-bottom: 1.2rem; }
.v2-sm-mybid-h { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem; }
.v2-sm-mybid .v2-yard-os { white-space: normal; overflow-wrap: anywhere; }
.v2-sm-mybid .v2-yard-os b { color: var(--v2-ink); font-weight: 400; }
.v2-sm-mybid .v2-mkt-chip { align-self: center; }
.v2-sm-mybid .v2-yard-og { color: var(--v2-brass); }
.v2-sm-mybid .v2-yard-og:hover { color: var(--v2-glow); }
.v2-sm-mybid-all { grid-column: 2 / -1; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-sm-mybid-all summary { cursor: pointer; color: var(--v2-brass); min-height: 1.75rem; display: flex; align-items: center; }
.v2-sm-mybid-all ul { list-style: none; margin: 0.2rem 0 0; padding: 0; font-variant-numeric: tabular-nums; }
.v2-sm-mybid-all li { padding: 0.1rem 0; border: 0; }
.v2-sm-age { width: auto; min-height: 2.25rem; }
.v2-sm-none { margin: 0; border: 1px dashed var(--v2-line); border-radius: 10px; }
.v2-sm-root .v2-mkt-lot { scroll-margin-top: 4rem; }
.v2-sm-root .v2-mkt-lot:target { outline: 2px solid var(--v2-glow); outline-offset: 2px; }

/* Sale Book: choose a sale */
.v2-abk-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; margin-bottom: 1.2rem; }
.v2-abk-seg { display: inline-flex; border: 1px solid var(--v2-line); border-radius: 100px; overflow: hidden; }
.v2-abk-seg a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.25rem 1rem; font-size: 0.74rem; color: var(--v2-ink-soft); text-decoration: none; }
.v2-abk-seg a + a { border-left: 1px solid var(--v2-line); }
.v2-abk-seg a:hover { color: var(--v2-ink-bright); }
.v2-abk-seg a.on { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-abk-seg a:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: -2px; }
.v2-abk-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; min-width: 0; }
.v2-abk-root .v2-abk-step { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.4rem; font-size: 0.74rem; color: var(--v2-brass); white-space: nowrap; }
.v2-abk-root a.v2-abk-step:hover { color: var(--v2-glow); }
.v2-abk-root .v2-abk-step.is-off { color: var(--v2-ink-faint); }
.v2-abk-pick { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.v2-abk-pick .v2-select { width: auto; max-width: 100%; min-height: 2.75rem; }
.v2-abk-pick .v2-btn { min-height: 2.75rem; background: transparent; }
.v2-abk-pick .v2-btn:hover { background: rgba(199,154,63,0.12); }

/* Sale Book: top three */
.v2-abk-cards { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.v2-abk-card { position: relative; }
.v2-abk-card.is-first { border-color: var(--v2-brass); }
.v2-abk-card .v2-yard-door { height: 7.5rem; }
.v2-abk-card .v2-yard-door img { height: 6.5rem; }
.v2-abk-card .v2-yard-body { gap: 0.45rem; }
.v2-abk-who { font-size: 0.74rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-abk-root .v2-abk-who b { color: var(--v2-ink); font-weight: 400; }
.v2-abk-root [data-abk-row][hidden] { display: none; }

/* Sale Book: the rest of the sale */
.v2-abk-ledger { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-abk-row { display: grid; grid-template-columns: 2rem minmax(0, 1.5fr) minmax(7.5rem, 0.8fr) minmax(0, 1.2fr); gap: 0.2rem 0.9rem; align-items: center; padding: 0.6rem 1rem; }
.v2-abk-row + .v2-abk-row { border-top: 1px dashed var(--v2-line); }
.v2-abk-row.is-mine { box-shadow: inset 3px 0 0 var(--v2-good); }
.v2-abk-rank { font-size: 0.78rem; color: var(--v2-ink-faint); font-variant-numeric: tabular-nums; }
.v2-abk-horse, .v2-abk-deal, .v2-abk-price { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.v2-abk-horse .v2-name { color: var(--v2-ink); }
/* These rows have room to wrap: a sale record must show the whole horse name. */
.v2-abk-horse .v2-name-with-image .v2-name, .v2-sm-root .v2-mkt-hammer .v2-name-with-image .v2-name, .v2-sm-mybid .v2-name-with-image .v2-name { white-space: normal; overflow-wrap: anywhere; }
.v2-abk-horse a:hover .v2-name { color: var(--v2-glow); }
.v2-abk-note { font-size: 0.74rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-abk-price b { font-family: var(--v2-font-hud); font-weight: 700; font-size: 1rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-abk-bar { display: block; height: 0.3rem; border-radius: 0 2px 2px 0; background: rgba(243,234,211,0.08); position: relative; }
.v2-abk-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 0 2px 2px 0; background: var(--v2-brass); }
.v2-abk-deal .v2-mkt-chip { margin-top: 0.1rem; }

@media (max-width: 900px) {
  .v2-sm-board { grid-template-columns: minmax(0, 1fr); }
  .v2-abk-row { grid-template-columns: 2rem minmax(0, 1fr) minmax(7rem, auto); }
  .v2-abk-deal { grid-column: 2 / -1; }
}
@media (max-width: 640px) {
  .v2-sm-age { width: 100%; min-height: 2.75rem; }
  .v2-sm-mybid { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .v2-sm-mybid .v2-yard-og { grid-column: 2; min-height: 2.75rem; display: inline-flex; align-items: center; }
  .v2-sm-mybid-all { grid-column: 2; }
  .v2-sm-mybid-all summary { min-height: 2.75rem; }
  .v2-abk-nav { flex-direction: column; align-items: stretch; }
  .v2-abk-seg { display: grid; grid-template-columns: 1fr 1fr; border-radius: 8px; }
  .v2-abk-seg a { justify-content: center; }
  .v2-abk-pager { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .v2-abk-pick .v2-select { flex: 1; min-width: 0; width: 100%; }
  .v2-abk-pick .v2-btn { display: none; }
  .v2-abk-cards { grid-template-columns: minmax(0, 1fr); }
  .v2-abk-row { grid-template-columns: 1.6rem minmax(0, 1fr) auto; padding: 0.6rem 0.8rem; gap: 0.2rem 0.6rem; }
  .v2-abk-price { align-items: flex-end; text-align: right; }
  .v2-abk-bar { width: 4.5rem; }
  /* Larger type on a phone: no room for three columns or a one-line pager. */
  html.v2-text-large .v2-abk-row, html.v2-text-larger .v2-abk-row { grid-template-columns: 1.6rem minmax(0, 1fr); }
  html.v2-text-large .v2-abk-deal, html.v2-text-larger .v2-abk-deal { grid-column: 2; }
  html.v2-text-large .v2-abk-price, html.v2-text-larger .v2-abk-price { grid-column: 2; align-items: flex-start; text-align: left; }
  html.v2-text-large .v2-abk-pager, html.v2-text-larger .v2-abk-pager { grid-template-columns: 1fr 1fr; }
  html.v2-text-large .v2-abk-pick, html.v2-text-larger .v2-abk-pick { grid-column: 1 / -1; grid-row: 1; }
  html.v2-text-large .v2-abk-pager > :last-child, html.v2-text-larger .v2-abk-pager > :last-child { justify-self: end; }
  html.v2-text-large .v2-sm-root .v2-mkt-hammer li, html.v2-text-larger .v2-sm-root .v2-mkt-hammer li { grid-template-columns: minmax(0, 1fr); }
  html.v2-text-large .v2-sm-root .v2-mkt-seg, html.v2-text-larger .v2-sm-root .v2-mkt-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 901px) and (pointer: fine) {
  .v2-abk-seg a { min-height: 2.25rem; }
  .v2-abk-root .v2-abk-step { min-height: 2.25rem; }
  .v2-abk-pick .v2-select, .v2-abk-pick .v2-btn { min-height: 2.25rem; }
}
/* ===== end Auction rooms (round 4) ===== */
/* ===== Instant Racing (round 4) ===== */
/* v2-instant-racing.pug, v2-stable-instant-racing.pug. "The Starting Gates". See
   SPEC-instant-racing.md. Reused unchanged: .v2-rc-mast/.v2-rc-post/.v2-rc-purse (Race Card),
   .v2-mkt-back/.v2-mkt-eyebrow/.v2-mkt-chip (Market), .v2-ring-wallet/.v2-ring-confirm (Sales
   Ring), .v2-mr-switch (My Races), .v2-yard-clip (Stable Yard), .v2-yo-* tools and docket (Yard
   office), .v2-rh-race and friends (Racing hub), the kit (.v2-rk-*). New rules are .v2-ir-*. */
.v2-ir-root .v2-mkt-chip, .v2-ir-root .v2-rk-mine, .v2-ir-docket .v2-yo-dh small { letter-spacing: 0.06em; }
.v2-ir-mast { margin-bottom: 0.9rem; }
.v2-ir-mast .v2-rc-post-d { max-width: 6rem; line-height: 1.25; }

/* --- How it works --- */
.v2-ir-how { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem 1rem; }
.v2-ir-how li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.8rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-ir-how b { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--v2-brass); color: var(--v2-ink-dark); font-size: 0.78rem; }
.v2-ir-how strong { color: var(--v2-ink); font-weight: 600; }
.v2-ir-switch { margin-bottom: 1.1rem; }
.v2-ir-off { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.v2-ir-off a { margin-left: auto; color: var(--v2-glow); text-decoration: underline; white-space: nowrap; }
.v2-ir-off .v2-rk-ic { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; }

/* --- Your entries --- */
.v2-ir-tray { margin-bottom: 1.2rem; }
.v2-ir-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; padding: 0.55rem 0.9rem; }
.v2-ir-entry-t { flex: 1 1 8rem; min-width: 0; display: flex; flex-direction: column; }
.v2-ir-entry-t b { font-weight: 600; color: var(--v2-ink); font-size: 0.9rem; }
.v2-ir-entry-t small { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-ir-entry .v2-ir-confirm { flex: 1 1 100%; margin-top: 0.2rem; }
.v2-ir-res { margin: 0; font-size: 0.78rem; flex: 1 1 100%; }
.v2-ir-res:empty { display: none; }
.v2-ir-res.is-ok { color: var(--v2-good); }
.v2-ir-res.is-bad { color: var(--v2-signal-bright); }
.v2-ir-root [hidden] { display: none !important; }

/* --- The six gates. Page-local grid. Material colour only: dirt/turf, never a status. --- */
.v2-ir-gates { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.v2-ir-gate { display: flex; flex-direction: column; min-width: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 0.8rem; }
.v2-ir-gate [data-ir-live] { flex: 1 1 auto; }
.v2-ir-gate-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 0.6rem; align-items: center; margin-bottom: 0.65rem; }
.v2-ir-gate-t { margin: 0; font-family: var(--v2-font-sans); font-weight: 700; font-size: 1.05rem; color: var(--v2-ink-bright); }
.v2-ir-gate-top .v2-rk-surface { font-size: 0.66rem; gap: 0.3rem; padding: 0.14rem 0.5rem 0.14rem 0.2rem; }
.v2-ir-gate-top .v2-rk-swatch { width: 0.8125rem; height: 0.8125rem; }
.v2-ir-dists { grid-column: 1 / -1; font-size: 0.74rem; color: var(--v2-ink-soft); }

.v2-ir-stalls { list-style: none; margin: 0; padding: 0.3rem 0.25rem 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.2rem; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)) top / 100% 0.3rem no-repeat, rgba(0,0,0,0.25); border-radius: 6px 6px 0 0; }
.v2-ir-stall { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-width: 0; padding-top: 0.25rem; }
.v2-ir-stall .v2-rk-cloth { width: 100%; max-width: 1.5rem; height: 1.45rem; font-size: 0.72rem; border-radius: 3px 3px 6px 6px; }
.v2-ir-door { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 3rem; border: 1px solid var(--v2-line); border-bottom: 0; border-radius: 3px 3px 0 0; background: repeating-linear-gradient(0deg, transparent 0 0.5rem, rgba(199,154,63,0.22) 0.5rem 0.5625rem); }
.v2-ir-stall.is-in .v2-ir-door { background: var(--v2-surface-2); border-color: var(--v2-brass); }
.v2-ir-stall.is-me .v2-ir-door { border-color: var(--v2-blue); box-shadow: inset 0 0 0 1px var(--v2-blue); }
.v2-ir-silk { width: 100%; max-width: 1.9rem; height: 1.9rem; display: block; }
.v2-ir-door em { font-style: normal; font-size: 0.66rem; font-weight: 700; line-height: 1; color: var(--v2-ink-bright); }
.v2-ir-track { height: 0.5rem; margin-bottom: 0.65rem; border-radius: 0 0 4px 4px; }
.is-dirt .v2-ir-track { background: radial-gradient(circle at 30% 40%, var(--v2-dirt-speck) 0 1px, transparent 1.4px) 0 0 / 5px 5px, var(--v2-dirt); }
.is-turf .v2-ir-track { background: repeating-linear-gradient(90deg, var(--v2-turf-stripe) 0 0.6rem, var(--v2-turf) 0.6rem 1.2rem); }

.v2-ir-state { margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.v2-ir-counts { margin: 0; display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-ir-counts b { font-size: 1.05rem; color: var(--v2-ink-bright); }
.v2-ir-line { margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--v2-ink-soft); }

.v2-ir-who { margin-top: 0.45rem; font-size: 0.78rem; }
.v2-ir-who summary, .v2-ir-other summary { display: flex; align-items: center; gap: 0.3rem; min-height: 2rem; cursor: pointer; color: var(--v2-brass); list-style: none; }
.v2-ir-who summary::-webkit-details-marker, .v2-ir-other summary::-webkit-details-marker { display: none; }
.v2-ir-who summary .v2-rk-ic, .v2-ir-other summary .v2-rk-ic { width: 0.85rem; height: 0.85rem; }
.v2-ir-who[open] summary .v2-rk-ic, .v2-ir-other[open] summary .v2-rk-ic { transform: rotate(90deg); }
.v2-ir-who ol { list-style: none; margin: 0.15rem 0 0; padding: 0; }
.v2-ir-who li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto; gap: 0.4rem; align-items: baseline; padding: 0.2rem 0; border-top: 1px dashed var(--v2-line); }
.v2-ir-who-n { color: var(--v2-ink-soft); }
.v2-ir-who-s { min-width: 0; overflow-wrap: anywhere; color: var(--v2-ink); }
.v2-ir-who small { font-size: 0.7rem; color: var(--v2-ink-soft); white-space: nowrap; }

.v2-ir-act { margin-top: 0.7rem; }
.v2-ir-join { width: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 0.45rem; min-height: 2.5rem; }
.v2-ir-join .v2-rk-ic { width: 1rem; height: 1rem; }
.v2-ir-confirm { margin-top: 0; }
.v2-ir-confirm p:focus { outline: none; }
.v2-ir-act .v2-ir-res { margin-top: 0.45rem; }
.v2-ir-gate.is-sprung { border-color: var(--v2-good); }

/* --- Stable: gate picker + roster. Page-local grid, not .v2-horse-row. --- */
.v2-ir-picks { border: 0; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; min-width: 0; }
.v2-ir-pick { position: relative; display: block; min-width: 0; cursor: pointer; }
.v2-ir-pick input { position: absolute; top: 0.6rem; left: 0.55rem; width: 1rem; height: 1rem; margin: 0; accent-color: var(--v2-brass); }
.v2-ir-pick-b { display: flex; flex-direction: column; gap: 0.2rem; min-height: 3.75rem; height: 100%; padding: 0.5rem 0.55rem 0.5rem 2rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.v2-ir-pick-b b { font-weight: 600; font-size: 0.88rem; color: var(--v2-ink); }
.v2-ir-pick-b small { font-size: 0.7rem; color: var(--v2-ink-soft); line-height: 1.35; }
.v2-ir-pick input:checked + .v2-ir-pick-b { border-color: var(--v2-brass); background: rgba(199,154,63,0.12); box-shadow: inset 0 0 0 1px var(--v2-brass); }
.v2-ir-pick input:focus-visible + .v2-ir-pick-b { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-ir-pips { display: grid; grid-template-columns: repeat(8, 0.5rem); gap: 2px; margin-bottom: 0.2rem; }
.v2-ir-pips i { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1px solid var(--v2-ink-faint); }
.v2-ir-pips i.on { background: var(--v2-brass); border-color: var(--v2-brass); }
.v2-ir-pips i.me { background: var(--v2-blue); border-color: var(--v2-ink-bright); }

.v2-ir-row { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto 2rem; gap: 0.75rem; align-items: center; min-height: 3.125rem; padding: 0.45rem 0.8rem; border-top: 1px dashed var(--v2-line); }
.v2-ir-roster > .v2-ir-row:first-child { border-top: 0; }
.v2-ir-row > input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--v2-brass); }
.v2-ir-row.is-picked { background: rgba(255,181,69,0.08); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-ir-row.is-full > .v2-yo-who { opacity: 0.55; cursor: default; }
.v2-ir-row.is-off .v2-name { color: var(--v2-ink-soft); }
.v2-ir-row .v2-status-chip { white-space: nowrap; }
.v2-ir-row .v2-yo-sub { color: var(--v2-ink-soft); }
.v2-ir-other { margin: 0.4rem 0 1.2rem; font-size: 0.82rem; }
.v2-ir-other summary { min-height: 2.75rem; }
.v2-ir-docket .v2-bulk-results { margin: 0.6rem 0 0; }
.v2-ir-docket .v2-bulk-results:empty { display: none; }
.v2-ir-root .v2-yo-grid { margin-bottom: 1.6rem; }
.v2-ir-root .v2-yo-confirm p { margin: 0 0 0.5rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-ir-root .v2-yo-confirm p:focus { outline: none; }
.v2-ir-root .v2-yo-confirm > div { display: flex; gap: 0.5rem; }
.v2-ir-root .v2-yo-confirm .v2-btn { flex: 1; min-height: 2.75rem; }

/* --- Recent races (.v2-rh-race grid from the Racing hub) --- */
.v2-ir-recent-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-ir-recent-list > li + li { border-top: 1px dashed var(--v2-line); }
.v2-ir-recent-list .v2-rh-race { color: inherit; text-decoration: none; }
.v2-ir-win, .v2-ir-win-hid { display: flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-ir-win .v2-rk-portrait, .v2-ir-win-hid .v2-rk-portrait { width: 2rem; height: 2rem; flex: 0 0 auto; overflow: hidden; }
.v2-ir-win-t { min-width: 0; display: flex; flex-direction: column; }
.v2-ir-win-t b { font-weight: 600; color: var(--v2-ink); }
.v2-ir-win-t small { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-ir-win-hid { display: none; }
@supports selector(:has(*)) {
  .v2-ir-recent .v2-rh-reveal { display: inline-flex; }
  .v2-ir-recent:not(:has(.v2-rh-reveal input:checked)) .v2-ir-win { display: none; }
  .v2-ir-recent:not(:has(.v2-rh-reveal input:checked)) .v2-ir-win-hid { display: flex; }
}

@media (max-width: 900px) {
  .v2-ir-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-ir-how { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
}
@media (max-width: 640px) {
  .v2-ir-gates { grid-template-columns: minmax(0, 1fr); }
  .v2-ir-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-ir-switch { display: flex; }
  .v2-ir-switch a { flex: 1 1 0; justify-content: center; padding: 0 0.5rem; text-align: center; font-size: 0.82rem; }
  .v2-ir-join { min-height: 2.75rem; }
  .v2-ir-row { grid-template-columns: 1.75rem minmax(0, 1fr) 2.75rem; grid-template-areas: "pick who view" "pick chip view"; gap: 0.2rem 0.6rem; padding: 0.55rem 0.6rem; }
  .v2-ir-row > :nth-child(1) { grid-area: pick; align-self: start; margin-top: 0.3rem; width: 1.375rem; height: 1.375rem; }
  .v2-ir-row > .v2-yo-who { grid-area: who; }
  .v2-ir-row > .v2-status-chip { grid-area: chip; justify-self: start; }
  .v2-ir-row > .v2-yo-view { grid-area: view; width: 2.75rem; height: 2.75rem; }
  .v2-ir-row .v2-name { white-space: normal; overflow-wrap: anywhere; }
  .v2-ir-row .v2-yo-sub { padding-left: 0; }
  .v2-ir-entry .v2-btn { min-height: 2.75rem; }
  .v2-ir-who summary { min-height: 2.75rem; }
  /* Deviation from the spec: the hub row's auto purse column squeezed the race name to one letter per line. */
  .v2-ir-recent-list .v2-rh-race { grid-template-columns: 3.25rem minmax(0, 1fr); }
  .v2-ir-recent-list .v2-rh-top { flex-wrap: wrap; gap: 0.1rem 0.5rem; }
  .v2-ir-recent-list .v2-rh-end { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 901px) and (pointer: fine) {
  .v2-ir-switch { padding: 0.125rem; }
  .v2-ir-switch a { min-height: 1.875rem; padding: 0 0.95rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .v2-ir-stall.is-in .v2-ir-door { animation: v2IrIn 0.35s ease-out; }
  .v2-ir-gate.is-sprung .v2-ir-door { transition: transform 0.45s ease-in; transform: scaleY(0.05); transform-origin: top; }
  @keyframes v2IrIn { from { opacity: 0; transform: translateY(0.25rem); } to { opacity: 1; transform: none; } }
}
/* ===== end Instant Racing (round 4) ===== */
/* ===== Breeding rights and results (round 4) ===== */
/* views/components/v2-breeding-deals-kit.pug + six templates (SPEC-breeding-deals.md).
   Reuses .v2-yard-top/-rank/-stall/-door/-clip/-order, .v2-bk-card/-stats/-cards/-meta/-sex/-why/-genes,
   .v2-bl-card/-card-links, .v2-ring-confirm, .v2-lb-switch, .v2-rk-portrait, .v2-name-with-image. */
.v2-bd-root [hidden] { display: none !important; }
.v2-bd-root :where(button.v2-btn:not(.v2-btn-primary)) { background: transparent; }
/* Reused labels are wider than the round-4 tracking limit; on these pages only. */
.v2-bd-root .v2-bk-sex, .v2-bd-root .v2-rk-tag, .v2-bd-root .v2-bk-stats dt { letter-spacing: 0.06em; }
.v2-bd-root .v2-bk-stats dt { color: var(--v2-ink-soft); }
.v2-bd-lede { margin: 0 0 0.6rem; max-width: 46rem; font-size: 0.84rem; line-height: 1.5; color: var(--v2-ink-soft); }
.v2-bd-out-link { font-size: 0.74rem; color: var(--v2-brass); }
.v2-bd-out-link:hover { color: var(--v2-glow); }

/* ---- stud office tabs ---- */
.v2-bd-tabs { display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0 0 1.1rem; border-bottom: 1px solid var(--v2-line); }
.v2-bd-tabs a { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0 0.85rem; margin-bottom: -1px; border-bottom: 3px solid transparent; font-size: 0.8rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-bd-tabs a:hover { color: var(--v2-ink-bright); }
.v2-bd-tabs a[aria-current='page'] { color: var(--v2-ink-bright); font-weight: 700; border-bottom-color: var(--v2-brass); }
.v2-bd-tabs a:focus-visible { outline-offset: -3px; }
.v2-bd-tabs .v2-rk-ic { color: var(--v2-brass); }
.v2-bd-tabs em { min-width: 1.15rem; padding: 0 0.3rem; border-radius: 10px; font-style: normal; font-size: 0.7rem; font-weight: 700; line-height: 1.15rem; text-align: center; background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-bd-tabs em.is-alert { background: var(--v2-glow); }

/* ---- paper: certificates, tickets, the offer draft ---- */
.v2-app .v2-bd-paper { position: relative; background: var(--v2-paper); color: var(--v2-paper-ink); border-radius: 3px; box-shadow: 0 3px 10px rgba(0,0,0,0.4); }
.v2-app .v2-bd-paper::before { content: ""; position: absolute; top: -0.3125rem; left: 50%; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--v2-paper-pin-hi), var(--v2-paper-pin)); transform: translateX(-50%); }
.v2-app .v2-bd-paper a:not(.v2-btn) { color: var(--v2-paper-ink); text-decoration: underline; text-decoration-color: rgba(107,74,26,0.5); }
.v2-app .v2-bd-paper a:not(.v2-btn):hover { color: var(--v2-paper-alert); }
.v2-app .v2-bd-paper :focus-visible { outline: 2px solid var(--v2-paper-ink); outline-offset: 2px; }
.v2-app .v2-bd-paper .v2-btn:not(.v2-btn-primary) { color: var(--v2-paper-ink); border-color: var(--v2-paper-icon); background: transparent; }
.v2-app .v2-bd-paper .v2-btn:not(.v2-btn-primary):hover { background: rgba(107,74,26,0.12); }
.v2-app .v2-bd-paper .v2-btn-danger:not(.v2-btn-primary) { color: var(--v2-paper-alert); border-color: var(--v2-paper-alert); }
.v2-app .v2-bd-paper .v2-btn-primary { background: var(--v2-paper-icon); border-color: var(--v2-paper-icon); color: var(--v2-paper); }
.v2-app .v2-bd-paper .v2-btn-primary:hover { background: var(--v2-paper-ink); border-color: var(--v2-paper-ink); color: var(--v2-paper); }
.v2-app .v2-bd-paper .v2-btn[disabled] { opacity: 1; color: var(--v2-paper-ink-soft); border-style: dashed; }
.v2-app .v2-bd-paper .v2-bk-sex, .v2-app .v2-bd-paper .v2-bk-glyph { color: var(--v2-paper-ink-soft); }
.v2-bd-kicker { margin: 0; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-paper-ink-soft); }

.v2-bd-certs { list-style: none; margin: 0 0 1.2rem; padding: 0.4rem 0 0; display: grid; gap: 0.9rem; }
.v2-bd-cert { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr) 13.5rem; gap: 0 1rem; padding: 0.85rem 0 0.85rem 1rem; align-items: center; }
.v2-bd-art { width: 5.25rem; height: 5.25rem; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff6df, #e2d2a8); border: 2px solid rgba(122,90,30,0.5); color: var(--v2-paper-ink-soft); }
.v2-bd-art img { width: 88%; height: auto; display: block; }
.v2-bd-cert-main { min-width: 0; }
.v2-bd-cert-name { margin: 0.1rem 0 0.15rem; font-size: 1.1rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.v2-app .v2-bd-paper .v2-bd-cert-name a { text-decoration: none; }
.v2-bd-cert-line { margin: 0 0 0.25rem; font-size: 0.86rem; line-height: 1.35; }
.v2-bd-cert-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.45rem; margin: 0; font-size: 0.72rem; color: var(--v2-paper-ink-soft); }
.v2-bd-cert-meta:empty { display: none; }
.v2-bd-flag { display: inline-block; padding: 0.04rem 0.4rem; border: 1px solid var(--v2-paper-alert); border-radius: 3px; font-size: 0.68rem; font-weight: 600; color: var(--v2-paper-alert); }
.v2-bd-stub { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0.25rem; padding: 0 1rem; border-left: 2px dashed rgba(107,74,26,0.45); min-width: 0; }
.v2-bd-stub-sum { font-size: 1.3rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.v2-bd-stub-terms { font-size: 0.72rem; color: var(--v2-paper-ink-soft); }
.v2-bd-stub-acts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.v2-bd-stub-acts .v2-btn { min-height: 2.25rem; }
.v2-bd-confirm { grid-column: 1 / -1; margin: 0.7rem 1rem 0 0; }
.v2-app .v2-bd-paper .v2-bd-confirm { background: rgba(107,74,26,0.08); border-color: var(--v2-paper-icon); }
.v2-app .v2-bd-paper .v2-bd-confirm p { color: var(--v2-paper-ink); }
.v2-yard-order .v2-bd-confirm { margin: 0.3rem 0 0; }
.v2-bd-res { grid-column: 1 / -1; margin: 0.4rem 0 0; font-size: 0.8rem; font-weight: 600; }
.v2-bd-res:empty { display: none; }
.v2-app .v2-bd-paper .v2-bd-res { color: var(--v2-paper-alert); }
.v2-yard-order .v2-bd-res { color: var(--v2-signal-bright); }

/* ---- tickets and counterfoils ---- */
.v2-bd-shoes { display: inline-flex; flex-wrap: wrap; gap: 2px; color: var(--v2-paper-icon); }
.v2-bd-shoes i { display: inline-flex; font-style: normal; }
.v2-bd-shoes .v2-rk-ic { width: 1rem; height: 1rem; stroke-width: 2.2; }
.v2-bd-shoes i.is-used { opacity: 0.32; }
.v2-app .v2-bd-ticket.is-spent { background: var(--v2-paper-off); }
.v2-bd-ticket.is-spent .v2-bd-art img { filter: grayscale(0.6); }
.v2-yard-order.v2-bd-line { grid-template-columns: 2.75rem minmax(0, 1fr) auto; }
.v2-bd-line .v2-yard-ol a { color: var(--v2-ink-bright); }
.v2-bd-line .v2-yard-ol a:hover { color: var(--v2-glow); }
.v2-bd-line .v2-yard-ol b { color: var(--v2-glow); font-weight: 700; }
.v2-bd-line .v2-yard-os { color: var(--v2-ink-soft); white-space: normal; }
.v2-bd-line > .v2-bd-confirm, .v2-bd-line > .v2-bd-res { grid-column: 1 / -1; }
.v2-bd-line-use { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.v2-bd-line-use .v2-bd-shoes { color: var(--v2-brass); }
.v2-bd-line-use small { font-size: 0.68rem; color: var(--v2-ink-soft); white-space: nowrap; }

/* ---- empty desk ---- */
.v2-bd-empty { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.8rem; align-items: start; margin: 0.2rem 0 1.2rem; padding: 0.9rem 1rem; border: 1px dashed var(--v2-line); border-radius: 10px; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-bd-empty > .v2-rk-ic { width: 2rem; height: 2rem; color: var(--v2-brass); }
.v2-bd-empty p { margin: 0 0 0.4rem; }
.v2-bd-empty-h { font-weight: 600; font-size: 0.92rem; color: var(--v2-ink); }
.v2-bd-empty-go { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }

/* ---- offer draft ---- */
.v2-bd-draftwrap { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.2rem; align-items: start; padding-top: 0.4rem; }
.v2-bd-stud .v2-yard-door { height: 9.5rem; }
.v2-bd-stud .v2-yard-door img { height: 8.5rem; }
.v2-app .v2-bd-draft { padding: 1.2rem 1.3rem; border: 4px double rgba(122,90,30,0.55); display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; min-width: 0; }
.v2-bd-draft-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.8rem; width: 100%; }
.v2-bd-draft-f { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.74rem; font-weight: 600; color: var(--v2-paper-ink-soft); min-width: 0; }
.v2-bd-draft-f.is-wide { grid-column: 1 / -1; }
.v2-bd-draft-f input, .v2-bd-draft-f select { box-sizing: border-box; width: 100%; min-height: 2.5rem; padding: 0.3rem 0.55rem; font: inherit; font-size: 0.95rem; font-weight: 400; color: var(--v2-paper-ink); background: var(--v2-paper-hover); border: 1px solid var(--v2-paper-icon); border-radius: 4px; }
.v2-bd-draft-f input::placeholder { color: var(--v2-paper-ink-soft); }
.v2-bd-draft-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; width: 100%; margin: 0; padding: 0.6rem 0; border-top: 1px dashed rgba(107,74,26,0.5); border-bottom: 1px dashed rgba(107,74,26,0.5); }
.v2-bd-draft-sum dt { font-size: 0.68rem; color: var(--v2-paper-ink-soft); }
.v2-bd-draft-sum dd { margin: 0; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.v2-bd-draft-notes { margin: 0; padding-left: 1.1rem; font-size: 0.78rem; line-height: 1.45; color: var(--v2-paper-ink-soft); }
.v2-bd-draft > .v2-btn { min-height: 2.5rem; padding-left: 1.4rem; padding-right: 1.4rem; }

/* ---- Stallion parade ---- */
.v2-bd-spent { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; padding: 0.6rem 0.8rem; border: 1px solid var(--v2-brass); border-radius: 8px; font-size: 0.82rem; color: var(--v2-ink); }
.v2-bd-spent .v2-rk-ic { color: var(--v2-brass); }
.v2-bd-sortbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0 0 0.9rem; }
.v2-bd-sort { display: inline-flex; border: 1px solid var(--v2-line); border-radius: 100px; padding: 2px; background: var(--v2-surface-2); }
.v2-bd-sort button { min-height: 1.875rem; padding: 0 0.85rem; border: 0; border-radius: 100px; background: transparent; font: inherit; font-size: 0.74rem; color: var(--v2-ink-soft); cursor: pointer; white-space: nowrap; }
.v2-bd-sort button:hover { color: var(--v2-ink-bright); }
.v2-bd-sort button.on { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-bd-sire-stats > div:last-child { grid-column: 1 / -1; }
.v2-bd-buy { border-top: 1px dashed var(--v2-line); padding-top: 0.55rem; }
.v2-bd-buy > summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.25rem; padding: 0 0.7rem; border-radius: 4px; background: var(--v2-brass); color: var(--v2-ink-dark); font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.v2-bd-buy > summary::-webkit-details-marker { display: none; }
.v2-bd-buy > summary:hover { background: var(--v2-glow); }
.v2-bd-buy[open] > summary { background: transparent; color: var(--v2-brass); box-shadow: inset 0 0 0 1px var(--v2-brass); }
.v2-bd-buy form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; }
.v2-bd-buy .v2-checkbox-field { font-size: 0.78rem; }
.v2-bd-buy .v2-btn { min-height: 2.25rem; }

/* ---- results ladder ---- */
.v2-bd-ladder { list-style: none; margin: 0 0 1.2rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-bd-rung { display: grid; grid-template-columns: 4rem minmax(0, 1fr); column-gap: 1rem; align-items: center; padding: 0.7rem 1rem; }
.v2-bd-rung + .v2-bd-rung { border-top: 1px dashed var(--v2-line); }
.v2-bd-grade { grid-row: 1 / span 2; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 2px solid var(--v2-brass); background: rgba(199,154,63,0.12); font-size: 1.15rem; font-weight: 700; color: var(--v2-ink-bright); }
.v2-bd-bar { grid-column: 2; display: grid; grid-template-columns: 5.5rem 3.25rem minmax(0, 1fr) 8rem; gap: 0.6rem; align-items: center; min-height: 1.6rem; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-bd-bar-who { white-space: nowrap; }
.v2-bd-stars { color: var(--v2-glow); letter-spacing: 0.04em; white-space: nowrap; }
.v2-bd-bar-track { height: 0.6rem; border-radius: 3px; background: rgba(159,182,166,0.14); overflow: hidden; }
.v2-bd-bar-track i { display: block; height: 100%; background: repeating-linear-gradient(135deg, var(--v2-ink-soft) 0 3px, rgba(159,182,166,0.55) 3px 6px); }
.v2-bd-bar.is-mine .v2-bd-bar-track i { background: var(--v2-brass); }
.v2-bd-bar.is-mine { color: var(--v2-ink); }
.v2-bd-bar-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-bd-bar-none { grid-column: 2 / -1; font-style: italic; }

/* ---- fee book ---- */
.v2-bd-earners { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.v2-bd-earners li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.55rem 0.75rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.v2-bd-earner-t { display: flex; flex-direction: column; min-width: 0; font-size: 0.88rem; }
.v2-bd-earner-t a { color: var(--v2-ink-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-bd-earner-t a.is-out { color: var(--v2-glow); }
.v2-bd-earner-t small { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-bd-earners b { font-size: 1rem; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-bd-month { margin: 0 0 0.6rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-bd-month > summary { display: flex; align-items: center; gap: 0.7rem; min-height: 2.5rem; padding: 0.35rem 1rem; cursor: pointer; background: var(--v2-surface-2); }
.v2-bd-month-name { font-size: 0.9rem; font-weight: 600; color: var(--v2-ink); }
.v2-bd-month-n { font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-bd-month > summary b { margin-left: auto; color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-bd-ledger { list-style: none; margin: 0; padding: 0; }
.v2-bd-ledger li { display: grid; grid-template-columns: 3.75rem 4.25rem 4.5rem minmax(0, 1fr); gap: 0.7rem; align-items: center; min-height: 2.6rem; padding: 0.3rem 1rem; border-top: 1px dashed var(--v2-line); font-size: 0.8rem; }
.v2-bd-led-date, .v2-bd-led-type { color: var(--v2-ink-soft); white-space: nowrap; }
.v2-bd-led-fee { color: var(--v2-glow); font-variant-numeric: tabular-nums; }
.v2-bd-led-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.6rem; align-items: center; min-width: 0; }
.v2-bd-led-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.4rem; min-width: 0; }
.v2-bd-led-h .v2-name-with-image { min-width: 0; }
.v2-bd-led-x { color: var(--v2-brass); }
.v2-bd-outside { font-size: 0.68rem; color: var(--v2-ink-soft); }

@media (max-width: 900px) {
  .v2-bd-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 1px 0 0 1px; border-bottom: 0; }
  .v2-bd-tabs a { justify-content: center; min-height: 2.75rem; padding: 0 0.4rem; margin: -1px 0 0 -1px; border: 1px solid var(--v2-line); background: var(--v2-surface); }
  .v2-bd-tabs a[aria-current='page'] { background: var(--v2-brass); color: var(--v2-ink-dark); border-color: var(--v2-brass); }
  .v2-bd-tabs a[aria-current='page'] .v2-rk-ic { color: var(--v2-ink-dark); }
  .v2-bd-tabs a[aria-current='page'] em { background: var(--v2-ink-dark); color: var(--v2-ink-bright); }
  .v2-bd-cert { grid-template-columns: 4.5rem minmax(0, 1fr) 12rem; }
  .v2-bd-art { width: 4.5rem; height: 4.5rem; }
  .v2-bd-stub-acts .v2-btn, .v2-bd-buy > summary, .v2-bd-buy .v2-btn, .v2-bd-line .v2-btn, .v2-bd-empty-go .v2-btn { min-height: 2.75rem; }
  .v2-bd-sort button { min-height: 2.5rem; }
  .v2-bd-draftwrap { grid-template-columns: 14rem minmax(0, 1fr); }
  .v2-bd-earners { grid-template-columns: 1fr; }
  .v2-bd-bar { grid-template-columns: 5.5rem 3.25rem minmax(0, 1fr) 7rem; }
}
@media (max-width: 640px) {
  .v2-bd-tabs .v2-rk-ic { display: none; }
  .v2-bd-tabs a { font-size: 0.78rem; }
  .v2-bd-cert { grid-template-columns: 3.75rem minmax(0, 1fr); gap: 0 0.7rem; padding: 0.8rem 0.8rem 0; }
  .v2-bd-art { width: 3.75rem; height: 3.75rem; align-self: start; }
  .v2-bd-stub { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 0.6rem; margin: 0.7rem -0.8rem 0; padding: 0.6rem 0.8rem 0.75rem; border-left: 0; border-top: 2px dashed rgba(107,74,26,0.45); }
  .v2-bd-stub-acts { flex: 1 1 100%; margin-top: 0.2rem; }
  .v2-bd-stub-acts .v2-btn { flex: 1; text-align: center; }
  .v2-bd-confirm { margin: 0.5rem 0 0.8rem; }
  .v2-yard-order.v2-bd-line { grid-template-columns: 2.5rem minmax(0, 1fr); padding: 0.7rem 0.8rem; }
  .v2-bd-line > .v2-btn, .v2-bd-line > .v2-bd-line-use { grid-column: 2; justify-self: start; align-items: flex-start; }
  .v2-bd-draftwrap { grid-template-columns: 1fr; }
  .v2-bd-stud .v2-yard-door { height: 7rem; }
  .v2-bd-stud .v2-yard-door img { height: 6rem; }
  .v2-app .v2-bd-draft { padding: 1rem; }
  .v2-bd-draft-sum dd { font-size: 0.95rem; }
  .v2-bd-rung { grid-template-columns: 3rem minmax(0, 1fr); column-gap: 0.65rem; padding: 0.7rem 0.75rem; }
  .v2-bd-grade { width: 2.75rem; height: 2.75rem; font-size: 1rem; align-self: start; }
  .v2-bd-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.5rem; padding-bottom: 0.3rem; }
  .v2-bd-bar-who { grid-column: 1; }
  .v2-bd-stars { grid-column: 2; grid-row: 1; }
  .v2-bd-bar-track { grid-column: 1 / -1; }
  .v2-bd-bar-n { grid-column: 1 / -1; text-align: left; }
  .v2-bd-bar-none { grid-column: 1 / -1; }
  .v2-bd-ledger li { grid-template-columns: auto auto minmax(0, 1fr); gap: 0.15rem 0.6rem; padding: 0.5rem 0.8rem; }
  .v2-bd-led-pair { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 0.15rem; }
  .v2-bd-led-x { display: none; }
  .v2-bd-led-type { justify-self: end; }
  /* Larger text: badges wrap whole instead of cutting a money figure or date short ("$27..."). */
  .v2-bd-root .v2-yard-rank { flex: 1 1 auto; }
  .v2-bd-root .v2-yard-rank b, .v2-bd-root .v2-yard-rank small { overflow: visible; text-overflow: clip; }
}
/* ===== end Breeding rights and results (round 4) ===== */
/* ===== Racing office (round 4) ===== */
/* v2-race-search, v2-condition-book, v2-named-race-schedule, v2-race-category-analysis,
   v2-races-by-category, v2-race-schedule, v2-race-commentary (SPEC-race-directory.md).
   Prefix .v2-rd-*. Reuses .v2-rec-wings, .v2-rec-chips, .v2-yard-top/-hello/-stable, the Racing
   hub board (.v2-rh-*), the race-list book and lines (.v2-rl-*), .v2-trk-prestige and the race kit.
   Never touches .v2-horse-row, .v2-ranked-row or any kit mixin. */
.v2-rd-top { margin-bottom: 0.9rem; }
.v2-rd-tally { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-rd-top-side { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: center; }
.v2-rd-top-side .v2-cross-link { display: inline-flex; align-items: center; min-height: 2.25rem; }

/* Wings: six, not the Records room's seven. */
.v2-rec-wings.v2-rd-wings { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Chip rows with a label in front */
.v2-rd-filter { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.35rem 0.6rem; align-items: start; margin: 0 0 0.6rem; }
.v2-rd-filter-lbl { padding-top: 0.55rem; font-size: 0.72rem; font-weight: 600; color: var(--v2-ink-soft); }
.v2-rd-filter .v2-rec-chips { margin: 0; }
.v2-rd-filter .v2-rec-chips a { font-size: 0.72rem; }

/* Race finder */
.v2-rd-finder { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 0.6rem; align-items: center; margin-bottom: 1.2rem; padding: 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); }
.v2-rd-finder-in { display: flex; align-items: center; gap: 0.6rem; min-width: 0; padding: 0 0.85rem; min-height: 3rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-bg); color: var(--v2-brass); }
.v2-rd-finder-in:focus-within { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-rd-finder-in .v2-rk-ic { flex: 0 0 auto; width: 1.2rem; height: 1.2rem; }
.v2-rd-finder-in input { flex: 1; min-width: 0; min-height: 2.75rem; border: 0; outline: 0; background: transparent; color: var(--v2-ink-bright); font-size: 1.05rem; }
.v2-app .v2-rd-finder-in input:focus-visible { outline: none; }  /* the label draws the ring */
.v2-rd-finder-in input::placeholder { color: var(--v2-ink-soft); opacity: 1; }
.v2-rd-finder .v2-btn { min-height: 3rem; padding: 0 1.4rem; }
.v2-rd-finder-grades { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; margin: 0; padding: 0; border: 0; }
.v2-rd-finder-grades legend { float: left; margin-right: 0.3rem; padding: 0; font-size: 0.72rem; font-weight: 600; color: var(--v2-ink-soft); }
.v2-rd-sec { margin-bottom: 1.5rem; }
.v2-rd-sec > .v2-section-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; }
.v2-rd-cap-note { font-size: 0.72rem; color: var(--v2-ink-soft); text-transform: none; letter-spacing: 0; font-weight: 400; }
.v2-rd-try { padding: 1rem; border: 1px dashed var(--v2-line); border-radius: 10px; }
.v2-rd-try h2 { margin: 0 0 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--v2-ink-soft); }
.v2-rd-try .v2-rec-chips { margin: 0; }
.v2-rd-try .v2-rec-chips a { font-size: 0.75rem; }
.v2-rd-conds { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-rd-mtp { font-size: 0.68rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-rd-sex { display: inline-flex; align-items: center; min-height: 1.15rem; padding: 0 0.35rem; border: 1px solid var(--v2-line); border-radius: 4px; font-size: 0.66rem; font-weight: 700; color: var(--v2-ink); }

/* One full-width meeting per day: results here rarely fill a day. */
.v2-rd-board .v2-rl-meets { grid-template-columns: minmax(0, 1fr); }
.v2-rd-board .v2-rh-nm { white-space: normal; }
/* A long name takes its own row rather than squeezing beside the post time. */
.v2-rd-board .v2-rh-top { flex-wrap: wrap; }
/* 0.66rem floor, and tracking no wider than 0.07em: the shared rules for these are outside this section. */
.v2-rd-board .v2-rh-top .v2-rk-grade { font-size: 0.66rem; }
.v2-rd-stake-head .v2-rk-tag, .v2-rd-cat-head .v2-rk-tag, .v2-rd-tabs a { letter-spacing: 0.07em; }

/* Past lines */
.v2-rd-pls { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rd-pl { display: grid; grid-template-columns: 5.6rem 4.875rem minmax(0, 1fr) minmax(0, 15rem) 6.5rem; gap: 0.8rem; align-items: center; padding: 0.65rem 1rem; }
.v2-rd-pl + .v2-rd-pl { border-top: 1px dashed var(--v2-line); }
.v2-rd-pl:hover { background: rgba(199, 154, 63, 0.05); }
.v2-rd-pl-when { display: flex; flex-direction: column; font-size: 0.72rem; color: var(--v2-ink-soft); line-height: 1.35; }
.v2-rd-pl-when b { color: var(--v2-ink); font-size: 0.78rem; font-weight: 600; }
.v2-rd-pl-when a { color: var(--v2-brass); font-weight: 600; width: fit-content; }
.v2-rd-pl-when a:hover { color: var(--v2-glow); }
.v2-rd-pl-when small { font-size: 0.68rem; }
.v2-rd-pl-race { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.v2-rd-pl-nm { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.95rem; color: var(--v2-ink); }
.v2-rd-pl-nm a:hover { color: var(--v2-glow); }
.v2-rd-pl-nm .v2-rk-grade { width: 1.5rem; height: 1.5rem; font-size: 0.66rem; }
.v2-rd-pl-win { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-rd-pl-win .v2-name-with-image { min-width: 0; font-size: 0.9rem; color: var(--v2-ink-bright); }
.v2-rd-pl-win .v2-name-with-image:hover { color: var(--v2-glow); }
.v2-rd-pl-win small { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-rd-pl-end { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.3; }
.v2-rd-pl-end small { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-rd-pl-end a { font-size: 0.72rem; color: var(--v2-brass); }
.v2-rd-pl-end a:hover { color: var(--v2-glow); }

/* Condition book: one month card per track */
.v2-rd-cals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.v2-rd-calhead, .v2-rd-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.2rem; padding: 0 0.6rem; }
.v2-rd-calhead { padding-top: 0.5rem; font-size: 0.68rem; text-align: center; color: var(--v2-ink-soft); }
.v2-rd-cal { list-style: none; margin: 0; padding-top: 0.25rem; padding-bottom: 0.7rem; }
.v2-rd-cal li > span, .v2-rd-cal li > a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 2.75rem; border-radius: 6px; line-height: 1.1; }
.v2-rd-cal li > span { color: var(--v2-ink-faint); font-size: 0.72rem; }
.v2-rd-cal li > span b { font-weight: 400; }
.v2-rd-cal li > a { border: 1px solid rgba(199, 154, 63, 0.55); background: rgba(199, 154, 63, 0.14); color: var(--v2-ink-bright); }
.v2-rd-cal li > a:hover { background: var(--v2-brass); color: var(--v2-ink-dark); }
.v2-rd-cal li > a b { font-size: 0.85rem; font-weight: 700; }
.v2-rd-cal li > a small { font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rd-cal li > a:hover small { color: var(--v2-ink-dark); }
/* Already run: dashed and hollow, and the small figure says "run". Shape and word, not colour. */
.v2-rd-cal li.is-past > a { border-style: dashed; border-color: var(--v2-line); background: transparent; color: var(--v2-ink-soft); }
.v2-rd-cal li.is-past > a b { font-weight: 400; }
.v2-rd-cal li.is-today > a, .v2-rd-cal li.is-today > span { box-shadow: 0 0 0 2px var(--v2-glow); }
.v2-rd-cal-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0 0 0.9rem; padding: 0; list-style: none; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-rd-cal-key li { display: inline-flex; align-items: center; gap: 0.4rem; }
.v2-rd-cal-key i { width: 1rem; height: 1rem; border-radius: 3px; border: 1px solid rgba(199, 154, 63, 0.55); background: rgba(199, 154, 63, 0.14); }
.v2-rd-cal-key i.is-past { border: 1px dashed var(--v2-line); background: transparent; }
.v2-rd-cal-key i.is-today { background: transparent; border: 0; box-shadow: 0 0 0 2px var(--v2-glow); }

/* Stakes schedule */
.v2-rd-week { margin-bottom: 1.3rem; }
.v2-rd-week-h { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-weight: 400; }
.v2-rd-now { display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border: 1px solid var(--v2-glow); border-radius: 100px; font-size: 0.68rem; font-weight: 700; color: var(--v2-glow); }
.v2-rd-stakes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19.5rem, 100%), 1fr)); gap: 0.8rem; }
.v2-rd-stake { display: flex; flex-direction: column; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rd-stake-head { display: flex; gap: 0.6rem; align-items: center; padding: 0.65rem 0.85rem; background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); border-bottom: 1px solid var(--v2-line); }
.v2-rd-stake-head > div { min-width: 0; }
.v2-rd-stake-head .v2-rk-grade { flex: 0 0 auto; }
.v2-rd-stake-nm { margin: 0; font-family: var(--v2-font-sans); font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--v2-ink-bright); }
.v2-rd-stake-nm a:hover { color: var(--v2-glow); }
.v2-rd-stake-sub { margin: 0.1rem 0 0; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-rd-stake-sub a { color: var(--v2-brass); }
.v2-rd-stake-sub a:hover { color: var(--v2-glow); }
.v2-rd-stake-body { flex: 1; display: grid; grid-template-columns: 4.875rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.65rem 0.85rem; }
.v2-rd-stake-money { margin: 0; display: flex; flex-direction: column; gap: 0.25rem; text-align: right; }
.v2-rd-stake-money dt { font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rd-stake-money dd { margin: 0; font-size: 0.86rem; color: var(--v2-ink); }
.v2-rd-stake-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.2rem 0.6rem; min-height: 2.75rem; padding: 0.4rem 0.85rem; border-top: 1px dashed var(--v2-line); }
.v2-rd-stake-lbl { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-rd-stake-foot a.v2-rd-stake-lbl:hover { color: var(--v2-glow); }
.v2-rd-stake-foot .v2-name-with-image { min-width: 0; font-size: 0.85rem; color: var(--v2-ink); }
.v2-rd-stake-foot .v2-name-with-image:hover { color: var(--v2-glow); }

/* Race categories */
.v2-rd-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(23rem, 100%), 1fr)); gap: 0.9rem; align-items: start; }
.v2-rd-cat { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rd-cat-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.85rem; background: linear-gradient(160deg, var(--v2-surface-2), var(--v2-surface)); border-bottom: 2px solid var(--v2-brass); }
.v2-rd-cat-head > div { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.5rem; }
.v2-app a.v2-rd-cat-id { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.6rem; border-radius: 6px; background: var(--v2-brass); color: var(--v2-ink-dark); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.v2-app a.v2-rd-cat-id:hover { background: var(--v2-glow); }
.v2-rd-cat-nm { margin: 0; font-family: var(--v2-font-sans); font-size: 0.95rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-rd-cat-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.v2-rd-cat-grid th { padding: 0.4rem 0.5rem; font-size: 0.72rem; font-weight: 600; color: var(--v2-ink-soft); text-align: left; }
.v2-rd-cat-grid thead th:first-child, .v2-rd-cat-grid tbody th { width: 4.6rem; padding-left: 0.85rem; }
.v2-rd-cat-grid thead th .v2-rk-surface { font-size: 0.66rem; padding: 0.14rem 0.5rem 0.14rem 0.2rem; }
.v2-rd-cat-grid tbody tr { border-top: 1px dashed var(--v2-line); }
.v2-rd-cat-grid td { padding: 0.4rem 0.5rem; vertical-align: top; }
.v2-rd-cat-grid td b { font-size: 1.05rem; color: var(--v2-ink-bright); }
.v2-rd-cat-grid td small { display: block; font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rd-meter { display: block; height: 0.3rem; margin: 0.15rem 0; border-radius: 2px; background: rgba(243, 234, 211, 0.1); overflow: hidden; }
.v2-rd-meter i { display: block; height: 100%; border-radius: 2px; background: var(--v2-brass); }
.v2-rd-cat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.9rem; padding: 0.45rem 0.85rem; border-top: 1px solid var(--v2-line); font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-rd-cat-foot b { color: var(--v2-ink); font-weight: 600; }
.v2-rd-cat-foot .v2-cross-link { margin-left: auto; display: inline-flex; align-items: center; min-height: 2.25rem; }
.v2-rd-sortlink { display: inline-flex; align-items: center; gap: 0.2rem; color: inherit; }
.v2-rd-sortlink:hover { color: var(--v2-glow); }

/* Purse money. Chart hues are their own validated set, never the status colours. */
.v2-rd-chart { --rd-c1: #b58628; --rd-c2: #4a8fe0; --rd-c3: #c9629f; --rd-c4: #7f9c3a; margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-rd-chart .c1 { background: var(--rd-c1); }
.v2-rd-chart .c2 { background: var(--rd-c2); }
.v2-rd-chart .c3 { background: var(--rd-c3); }
.v2-rd-chart .c4 { background: var(--rd-c4); }
.v2-rd-chart-h { margin: 0; font-family: var(--v2-font-sans); font-size: 1rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-rd-chart-note { margin: 0.1rem 0 0; font-size: 0.75rem; color: var(--v2-ink-soft); }
.v2-rd-legend { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-size: 0.75rem; color: var(--v2-ink); }
.v2-rd-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.v2-rd-legend i { width: 0.75rem; height: 0.75rem; border-radius: 2px; }
.v2-rd-plot { position: relative; margin-top: 0.8rem; padding-left: 2.6rem; }
.v2-rd-ticks { position: absolute; left: 0; right: 0; top: 0; height: 12rem; pointer-events: none; }
.v2-rd-ticks span { position: absolute; left: 0; right: 0; transform: translateY(50%); display: flex; align-items: center; gap: 0.3rem; font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rd-ticks span::after { content: ''; flex: 1; height: 1px; background: rgba(243, 234, 211, 0.12); }
.v2-rd-cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.v2-rd-col { position: relative; display: flex; flex-direction: column; align-items: center; border-radius: 6px; cursor: default; }
.v2-rd-col:hover .v2-rd-bar, .v2-rd-col:focus-visible .v2-rd-bar { background: rgba(243, 234, 211, 0.05); }
.v2-rd-bar { position: relative; width: 100%; height: 12rem; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-radius: 4px; }
.v2-rd-cap { margin-bottom: 0.15rem; font-size: 0.7rem; color: var(--v2-ink); white-space: nowrap; }
.v2-rd-stack { display: flex; flex-direction: column; flex: 0 0 auto; gap: 2px; width: min(1.5rem, 70%); border-radius: 4px 4px 0 0; overflow: hidden; }
.v2-rd-stack i { display: block; min-height: 1px; }
/* Scheduled months: diagonal hatch plus the words "to come" under the month. */
.v2-rd-col.is-future .v2-rd-stack i { background-image: repeating-linear-gradient(135deg, rgba(11, 26, 18, 0.5) 0 2px, transparent 2px 5px); }
.v2-rd-tick { display: flex; flex-direction: column; align-items: center; min-height: 2.1rem; margin-top: 0.3rem; font-size: 0.72rem; color: var(--v2-ink); line-height: 1.15; }
.v2-rd-tick small { font-size: 0.66rem; color: var(--v2-ink-soft); }
.v2-rd-tip { position: absolute; z-index: 3; left: 50%; bottom: 3.2rem; transform: translateX(-50%); display: none; flex-direction: column; gap: 0.1rem; width: max-content; max-width: 12rem; padding: 0.45rem 0.6rem; border: 1px solid var(--v2-brass); border-radius: 6px; background: var(--v2-bg); font-size: 0.72rem; color: var(--v2-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.v2-rd-tip span { display: flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.v2-rd-tip i { width: 0.6rem; height: 0.6rem; border-radius: 2px; }
.v2-rd-tip em { font-style: normal; font-weight: 600; }
.v2-rd-col.is-l .v2-rd-tip { left: 0; transform: none; }
.v2-rd-col.is-r .v2-rd-tip { left: auto; right: 0; transform: none; }
.v2-rd-col:hover .v2-rd-tip, .v2-rd-col:focus .v2-rd-tip { display: flex; }
.v2-rd-tbl { margin-top: 0.7rem; }
.v2-rd-tbl > summary { display: inline-flex; align-items: center; min-height: 2.25rem; font-size: 0.78rem; color: var(--v2-brass); cursor: pointer; }
.v2-rd-tbl th.v2-num, .v2-rd-tbl td.v2-num { text-align: right; }
.v2-rd-ages { list-style: none; margin: 0.8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.v2-rd-age { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; font-size: 0.82rem; }
.v2-rd-age > span:first-child { color: var(--v2-ink); }
.v2-rd-age-bar { display: block; height: 1rem; }
.v2-rd-age-bar i { display: block; height: 100%; min-width: 2px; background: var(--rd-c1); border-radius: 0 4px 4px 0; }
.v2-rd-age-val { text-align: right; color: var(--v2-ink); }
.v2-rd-age-val small { display: block; font-size: 0.68rem; color: var(--v2-ink-soft); }

/* Race talk */
.v2-rd-talks { display: flex; flex-direction: column; gap: 0.9rem; }
.v2-rd-talk { display: flex; gap: 1rem; padding: 0.9rem 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-rd-talk-photo { flex: 0 0 auto; align-self: flex-start; width: 11rem; height: auto; border: 1px solid var(--v2-line); border-radius: 6px; }
.v2-rd-talk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.v2-rd-talk-head { width: 100%; display: flex; justify-content: space-between; gap: 0.8rem; }
.v2-rd-talk-nm { margin: 0; font-family: var(--v2-font-sans); font-size: 1rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-rd-talk-nm a:hover { color: var(--v2-glow); }
.v2-rd-talk-sub { margin: 0; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-rd-talk-sub a { color: var(--v2-brass); }
.v2-rd-says { list-style: none; width: 100%; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.v2-rd-say { display: flex; gap: 0.6rem; align-items: flex-start; }
.v2-rd-say > img { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; object-fit: cover; border-radius: 50%; border: 1px solid var(--v2-line); }
.v2-rd-say > div { min-width: 0; padding: 0.35rem 0.65rem; border-radius: 2px 10px 10px 10px; background: var(--v2-surface-2); }
.v2-rd-say a { font-size: 0.72rem; font-weight: 600; color: var(--v2-brass); }
.v2-rd-say a:hover { color: var(--v2-glow); }
.v2-rd-say p { margin: 0; font-size: 0.85rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-rd-more { width: 100%; }
.v2-rd-more > summary { display: inline-flex; align-items: center; min-height: 2.25rem; font-size: 0.75rem; color: var(--v2-brass); cursor: pointer; }
.v2-rd-talk-main > .v2-cross-link { display: inline-flex; align-items: center; min-height: 2.25rem; }

@media (max-width: 900px) {
  .v2-rec-wings.v2-rd-wings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-rd-pl { grid-template-columns: 5.6rem 4.875rem minmax(0, 1fr) 6.5rem; }
  .v2-rd-pl-win { grid-column: 3 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; }
  .v2-rd-talk-photo { width: 8rem; }
  /* Touch: 44px targets on phones and tablets. */
  .v2-rd-filter .v2-rec-chips a, .v2-rd-try .v2-rec-chips a { min-height: 2.75rem; }
  .v2-rd-top-side .v2-cross-link, .v2-rd-cat-foot .v2-cross-link, .v2-app a.v2-rd-cat-id { min-height: 2.75rem; }
  .v2-rd-more > summary, .v2-rd-talk-main > .v2-cross-link, .v2-rd-tbl > summary { min-height: 2.75rem; }
}
@media (max-width: 640px) {
  .v2-rd-filter { grid-template-columns: minmax(0, 1fr); }
  .v2-rd-filter-lbl { padding-top: 0; }
  .v2-rd-finder { grid-template-columns: minmax(0, 1fr); padding: 0.8rem; }
  .v2-rd-finder .v2-btn { width: 100%; }
  .v2-rd-finder-grades legend { float: none; width: 100%; }
  /* Money and status drop under the race, so the name keeps the width. */
  .v2-rd-board .v2-rh-race { grid-template-columns: 3.25rem minmax(0, 1fr); }
  .v2-rd-board .v2-rh-end { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
  .v2-rd-pl { grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0.35rem 0.55rem; padding: 0.65rem 0.7rem; }
  .v2-rd-pl-when { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 0.6rem; }
  .v2-rd-pl-when a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .v2-rd-pl-race { grid-column: 2; }
  .v2-rd-pl-win { grid-column: 1 / -1; }
  .v2-rd-pl-end { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 0.6rem; text-align: left; }
  .v2-rd-pl-end a { display: inline-flex; align-items: center; min-height: 2.75rem; margin-left: auto; }
  .v2-rd-stake-body { grid-template-columns: 3.25rem minmax(0, 1fr) auto; }
  .v2-rd-cat-foot .v2-cross-link { margin-left: 0; }
  .v2-rd-plot { padding-left: 2.3rem; }
  .v2-rd-cap { font-size: 0.66rem; }
  .v2-rd-age { grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 0.45rem; }
  .v2-rd-talk { flex-direction: column; padding: 0.75rem; }
  .v2-rd-talk-photo { width: 100%; max-width: 16rem; }
}
/* Mouse users get compact controls, like the Typography pass. */
@media (min-width: 901px) and (pointer: fine) {
  .v2-rd-cal li > span, .v2-rd-cal li > a { min-height: 2.5rem; }
  .v2-rd-finder-grades .v2-rl-chip, .v2-rd-book .v2-rl-chip { min-height: 2.25rem; }
  .v2-rd-book .v2-btn { min-height: 2.25rem; }
  .v2-rd-book .v2-rl-book-body { padding: 0.6rem 1rem; }
}
/* ===== end Racing office (round 4) ===== */
/* ===== Stable news, race office, reclaim barn (round 4) ===== */
/* v2-stable-news.pug, v2-buy-race.pug, v2-reclaimed-horses.pug. See SPEC-news-buy-reclaimed.md.
   Reuses .v2-rc-mast/-post/-title/-purse, .v2-mkt-mast/-post/-root/-seg/-empty/-facts/-chip/-links,
   .v2-ring-cols/-main/-side/-bill/-dl/-paid/-get/-buy/-confirm/-stepper/-quick/-bar/-how/-legend,
   .v2-yard-stall/-door/-plate/-body/-name/-tag/-act, .v2-rk-*, .v2-name-with-image, .v2-filter-bar,
   .v2-pager. Every new rule is .v2-news-*, .v2-br-* or .v2-rec-*. */

/* --- The Stable News: a sheet of newsprint. Cream is --v2-ink, the same stock as the race-card
       stub. Status colours are not used here; links and rules get their own darker tints. ---- */
.v2-news-sheet { --v2-news-soft: #5a4a2a; --v2-news-link: #1f5a38; --v2-news-rule: rgba(26,20,8,0.3); background: var(--v2-ink); color: var(--v2-ink-dark); border-radius: 4px; padding: 1.4rem 1.6rem 1.2rem; box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
.v2-news-sheet a { color: var(--v2-news-link); }
.v2-news-sheet a:hover { text-decoration: underline; }
.v2-news-sheet a:focus-visible { outline: 2px solid var(--v2-news-link); outline-offset: 2px; }
.v2-news-plate { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; padding-bottom: 0.5rem; }
.v2-news-title { margin: 0; font-family: var(--v2-font-serif); font-weight: 700; font-size: 3rem; line-height: 1.05; text-align: center; color: var(--v2-ink-dark); }
.v2-news-ear { font-size: 0.72rem; line-height: 1.35; color: var(--v2-news-soft); }
.v2-news-ear.is-right { text-align: right; }
.v2-news-dateline { margin: 0 0 1rem; padding: 0.3rem 0; border-top: 3px double var(--v2-ink-dark); border-bottom: 1px solid var(--v2-ink-dark); font-size: 0.78rem; font-weight: 600; text-align: center; color: var(--v2-ink-dark); }
.v2-news-lead { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1.4rem; align-items: start; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--v2-ink-dark); }
.v2-news-kicker { margin: 0 0 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--v2-news-soft); }
.v2-news-head { margin: 0 0 0.5rem; font-family: var(--v2-font-serif); font-weight: 700; font-size: 2.1rem; line-height: 1.12; color: var(--v2-ink-dark); overflow-wrap: anywhere; }
.v2-news-deck { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--v2-ink-dark); }
.v2-news-photo { margin: 0; }
.v2-news-cut { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 8.5rem; overflow: hidden; border: 1px solid var(--v2-ink-dark); background: #ddd3bb; }
.v2-news-cut img { height: 7.75rem; width: auto; filter: grayscale(1) contrast(1.15); }
.v2-news-cut::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(26,20,8,0.28) 0.5px, transparent 0.8px) 0 0 / 3px 3px; pointer-events: none; }
.v2-news-photo figcaption { margin-top: 0.3rem; font-size: 0.72rem; line-height: 1.35; color: var(--v2-news-soft); overflow-wrap: anywhere; }
.v2-news-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.2rem 0; }
.v2-news-col { min-width: 0; padding: 0 1.1rem; border-left: 1px solid var(--v2-news-rule); grid-column: span 2; }
.v2-news-col.is-winners, .v2-news-col.is-foals { padding-left: 0; border-left: none; }
.v2-news-col.is-sales, .v2-news-col.is-retired { padding-right: 0; }
.v2-news-col.is-foals, .v2-news-col.is-retired { grid-column: span 3; padding-top: 1rem; border-top: 1px solid var(--v2-ink-dark); }
.v2-news-h { margin: 0 0 0.5rem; padding-bottom: 0.25rem; border-bottom: 2px solid var(--v2-ink-dark); font-size: 0.95rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: var(--v2-ink-dark); }
.v2-news-tables { display: grid; gap: 0.9rem; }
.v2-news-sub { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.35rem; font-size: 0.8rem; font-weight: 700; color: var(--v2-ink-dark); }
.v2-news-sub .v2-rk-grade { width: 1.5rem; height: 1.5rem; font-size: 0.66rem; }
.v2-news-sub .v2-rk-ic { width: 1.1rem; height: 1.1rem; color: var(--v2-news-soft); }
.v2-news-wins { list-style: none; margin: 0; padding: 0; }
.v2-news-wins li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.3rem; align-items: baseline; padding: 0.25rem 0; border-bottom: 1px dotted var(--v2-news-rule); font-size: 0.85rem; overflow-wrap: anywhere; }
.v2-news-wins b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.v2-news-box { margin-top: 1rem; padding: 0.6rem 0.75rem; border: 1px solid var(--v2-ink-dark); }
.v2-news-names { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.v2-news-names li { padding: 0.15rem 0; overflow-wrap: anywhere; }
.v2-news-none { margin: 0; font-size: 0.82rem; font-style: italic; color: var(--v2-news-soft); }
.v2-news-list { list-style: none; margin: 0; padding: 0; }
.v2-news-list > li { padding: 0.5rem 0; border-bottom: 1px dotted var(--v2-news-rule); }
.v2-news-list > li:last-child { border-bottom: none; }
.v2-news-deal-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: start; }
.v2-news-horses { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.v2-news-sheet .v2-name-with-image { min-height: 1.75rem; }
.v2-news-sheet .v2-name-with-image .v2-name { white-space: normal; overflow-wrap: anywhere; font-weight: 600; font-size: 0.88rem; color: var(--v2-news-link); }
.v2-news-price { font-size: 0.95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-news-price small { font-size: 0.68rem; font-weight: 400; color: var(--v2-news-soft); }
.v2-news-line { margin: 0.1rem 0 0; font-size: 0.82rem; line-height: 1.4; color: var(--v2-ink-dark); overflow-wrap: anywhere; }
.v2-news-meta { margin: 0.1rem 0 0; font-size: 0.72rem; line-height: 1.35; color: var(--v2-news-soft); overflow-wrap: anywhere; }
.v2-news-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.4rem; margin-top: 1rem; padding-top: 0.5rem; border-top: 3px double var(--v2-ink-dark); font-size: 0.78rem; font-weight: 600; }
.v2-news-foot a { display: inline-flex; align-items: center; min-height: 2.25rem; }

/* --- The race office ---------------------------------------------------------------------- */
.v2-br-root { display: block; }
.v2-br-fs { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); margin: 0 0 0.9rem; padding: 0.9rem 1rem 1rem; min-width: 0; }
.v2-br-fs > .v2-ring-legend { float: left; width: 100%; margin-bottom: 0.6rem; }
.v2-br-fs > .v2-ring-legend + * { clear: both; }
.v2-br-seg { max-width: 100%; }
.v2-br-seg span { font-size: 0.8rem; }
.v2-br-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; clear: both; }
.v2-br-card { position: relative; cursor: pointer; min-width: 0; }
.v2-br-card input { position: absolute; opacity: 0; pointer-events: none; }
.v2-br-card-b { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; height: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); }
.v2-br-card:hover .v2-br-card-b { border-color: var(--v2-brass); }
.v2-br-card input:checked + .v2-br-card-b { border-color: var(--v2-glow); box-shadow: inset 0 0 0 1px var(--v2-glow); }
.v2-br-card input:checked + .v2-br-card-b::after { content: "✓"; position: absolute; top: 0.4rem; right: 0.55rem; color: var(--v2-glow); font-weight: 700; }
.v2-br-card input:focus-visible + .v2-br-card-b { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-br-card-k { font-size: 0.92rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-br-card-t { font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-br-card-t::first-letter { text-transform: uppercase; }
.v2-br-card-f { font-size: 0.72rem; color: var(--v2-ink-soft); margin-top: auto; }
.v2-br-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-top: 0.8rem; }
.v2-br-rating .v2-ring-legend { margin: 0; }
.v2-br-rating .v2-select { width: auto; min-height: 2.25rem; }
.v2-br-rating .v2-select:disabled { opacity: 0.55; cursor: not-allowed; }
.v2-br-hint { font-size: 0.74rem; color: var(--v2-ink-soft); margin: 0; }
.v2-br-fs > .v2-br-hint { margin-top: 0.5rem; }
.v2-br-fs .v2-ring-quick button[aria-pressed="true"] { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-br-spec { list-style: none; margin: 0.2rem 0 0; padding: 0; font-size: 0.76rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-br-spec li { padding: 0.1rem 0; overflow-wrap: anywhere; }
.v2-br-root .v2-ring-get .v2-rk-ic { flex: 0 0 auto; color: var(--v2-brass); width: 1.5rem; height: 1.5rem; }
.v2-br-root .v2-ring-get-t b { color: var(--v2-glow); font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-br-result:empty { display: none; }
.v2-br-result { margin-top: 0.7rem; }
.v2-br-result .v2-alert { overflow-wrap: anywhere; }
.v2-br-result-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.v2-br-result-acts .v2-btn { display: inline-flex; align-items: center; min-height: 2.5rem; }

/* --- The reclaim barn --------------------------------------------------------------------- */
.v2-rec-how { margin: 0 0 1rem; }
.v2-rec-how-b { padding: 0 1rem 0.6rem; }
.v2-rec-search input { width: 14rem; max-width: 100%; }
#reclaimedAlert:focus { outline: none; }
#reclaimedAlert:empty { display: none; }
.v2-rec-alert { flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-bottom: 0.9rem; overflow-wrap: anywhere; }
.v2-rec-alert span { flex: 1 1 14rem; min-width: 0; }
.v2-rec-alert a { color: var(--v2-glow); text-decoration: underline; white-space: nowrap; }
.v2-rec-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; margin-bottom: 0.8rem; }
.v2-rec-count { font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-rec-count b { font-size: 1.05rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-rec-sort { display: flex; flex-wrap: wrap; gap: 0.1rem 0.3rem; font-size: 0.76rem; }
.v2-rec-sort a { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.25rem; padding: 0 0.6rem; border-radius: 100px; color: var(--v2-ink-soft); }
.v2-rec-sort a:hover { color: var(--v2-glow); }
.v2-rec-sort a:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: 1px; }
.v2-rec-sort a[aria-current] { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-rec-stalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.9rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.v2-rec-stall { position: relative; }
.v2-rec-stall .v2-mkt-chip { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; }
.v2-rec-stall .v2-yard-plate { font-size: 0.8rem; padding: 0.1rem 0.6rem; }
.v2-rec-rate { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-rec-pips { display: inline-flex; gap: 2px; }
.v2-rec-pips i { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1px solid var(--v2-ink-faint); }
.v2-rec-pips i.on { background: var(--v2-brass); border-color: var(--v2-brass); }
.v2-rec-stall .v2-yard-act { display: inline-flex; align-items: center; justify-content: center; }
.v2-rec-stall .v2-yard-act[hidden] { display: none; }
.v2-rec-stall .v2-yard-act:disabled { opacity: 0.55; cursor: not-allowed; }
.v2-rec-stall .v2-ring-confirm { margin-top: auto; }
.v2-rec-stall .v2-ring-confirm p { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .v2-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-news-col, .v2-news-col.is-foals, .v2-news-col.is-retired { grid-column: span 1; padding: 0 0 0 1rem; border-left: 1px solid var(--v2-news-rule); border-top: none; }
  .v2-news-col.is-winners { grid-column: 1 / -1; padding-left: 0; border-left: none; }
  .v2-news-col.is-claims, .v2-news-col.is-foals { padding: 0 1rem 0 0; border-left: none; }
  .v2-news-col.is-foals, .v2-news-col.is-retired { padding-top: 1rem; border-top: 1px solid var(--v2-ink-dark); }
  .v2-news-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
  .v2-br-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .v2-news-sheet { padding: 0.9rem 0.9rem 0.8rem; border-radius: 2px; }
  .v2-news-plate { grid-template-columns: 1fr 1fr; gap: 0.2rem 0.6rem; }
  .v2-news-title { grid-column: 1 / -1; grid-row: 1; font-size: 2.1rem; }
  .v2-news-head { font-size: 1.5rem; }
  .v2-news-deck { font-size: 0.88rem; }
  .v2-news-lead { grid-template-columns: minmax(0, 1fr); }
  .v2-news-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-news-col, .v2-news-col.is-claims, .v2-news-col.is-foals, .v2-news-col.is-retired, .v2-news-col.is-winners { grid-column: auto; padding: 0; border-left: none; border-top: none; }
  .v2-news-tables { grid-template-columns: minmax(0, 1fr); }
  .v2-news-foot a { min-height: 2.75rem; }
  .v2-br-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .v2-br-rating .v2-select { width: 100%; min-height: 2.75rem; }
  .v2-br-card-b { min-height: 2.75rem; }
  .v2-br-root .v2-ring-quick button { min-height: 2.75rem; }
  .v2-rec-stalls { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .v2-rec-stall { display: grid; grid-template-columns: 6rem minmax(0, 1fr); }
  .v2-rec-stall .v2-yard-door { height: auto; min-height: 7rem; border-bottom: none; border-right: 2px solid var(--v2-brass); }
  .v2-rec-stall .v2-yard-door img { height: 5rem; margin-bottom: 1.2rem; }
  .v2-rec-stall .v2-yard-plate { bottom: 0.35rem; }
  .v2-rec-stall .v2-mkt-chip { top: 0.3rem; left: 0.3rem; right: auto; }
  .v2-rec-stall .v2-yard-act { min-height: 2.75rem; }
  .v2-rec-sort { width: 100%; }
  .v2-rec-sort a { min-height: 2.75rem; }
  .v2-rec-search, .v2-rec-search input { width: 100%; }
  .v2-rec-root .v2-filter-bar select, .v2-rec-root .v2-filter-bar input[type="text"] { min-height: 2.75rem; }
  .v2-rec-root .v2-filter-bar .v2-actions .v2-btn { min-height: 2.75rem; }
}
/* Shared kit parts ship at 0.08em tracking; the round-4 limit is 0.07em. Scoped, not redefined. */
.v2-news-sheet .v2-rk-mine, .v2-br-root .v2-ring-legend, .v2-br-root .v2-ring-dl dt.total, .v2-rec-root .v2-mkt-chip { letter-spacing: 0.07em; }
/* The .v2-ring-how chevron is the only motion on these pages. */
@media (prefers-reduced-motion: reduce) {
  .v2-rec-how summary .v2-rk-ic { transition: none; }
}
/* ===== end Stable news, race office, reclaim barn (round 4) ===== */

/* ===== Claiming (round 4) ===== */
/* v2-claims.pug, v2-claim-race.pug, v2-account-claims-history.pug. "The Claim Box". See
   SPEC-claims.md. Reuses .v2-rc-mast/.v2-rc-post/.v2-rc-purse (Race Card), .v2-mkt-* (Market),
   .v2-ring-cols/-bill/-dl/-paid/-confirm/-how (Sales Ring), .v2-yard-clip/-order (Stable Yard) and
   the kit (.v2-rk-cloth, -portrait, -ic, -pips). Every new rule is .v2-cl-*. Sizes in rem. */

/* --- The tag ---------------------------------------------------------------------------- */
.v2-cl-tag { position: relative; display: inline-flex; align-items: center; justify-self: start; align-self: center; min-height: 2rem; padding: 0.2rem 0.65rem 0.2rem 1.15rem; background: linear-gradient(180deg, #d8ad55, var(--v2-brass)); color: var(--v2-ink-dark); font-family: var(--v2-font-sans); font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; clip-path: polygon(0.6rem 0, 100% 0, 100% 100%, 0.6rem 100%, 0 50%); border-radius: 0 4px 4px 0; }
.v2-cl-tag::before { content: ""; position: absolute; left: 0.5rem; top: 50%; width: 0.36rem; height: 0.36rem; margin-top: -0.18rem; border-radius: 50%; background: var(--v2-bg); }
.v2-cl-tag.is-lg { min-height: 2.75rem; padding: 0.25rem 0.9rem 0.25rem 1.5rem; font-size: 1.35rem; clip-path: polygon(0.8rem 0, 100% 0, 100% 100%, 0.8rem 100%, 0 50%); }
.v2-cl-tag.is-lg::before { left: 0.65rem; width: 0.46rem; height: 0.46rem; margin-top: -0.23rem; }

/* --- Status word: mixed case, no tracking. The word carries the meaning. ------------------ */
.v2-cl-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--v2-font-sans); font-size: 0.72rem; font-weight: 600; padding: 0.14rem 0.55rem; border-radius: 100px; border: 1px solid var(--v2-line); color: var(--v2-ink-soft); background: rgba(8,20,13,0.88); white-space: nowrap; align-self: flex-end; }
.v2-cl-chip .v2-rk-ic { width: 0.9rem; height: 0.9rem; }
.v2-cl-chip.is-good { color: var(--v2-good); border-color: rgba(95,200,145,0.45); }
.v2-cl-chip.is-due { color: var(--v2-glow); border-color: rgba(255,181,69,0.5); }
.v2-cl-chip.is-busy { color: var(--v2-blue); border-color: rgba(117,159,255,0.5); }

/* --- Masthead ----------------------------------------------------------------------------- */
.v2-cl-mast .v2-rc-title a { color: inherit; }
.v2-cl-mast .v2-rc-title a:hover { color: var(--v2-glow); }
.v2-cl-mast .v2-rc-post-time { font-size: 1.45rem; }
.v2-cl-lede { margin: 0; font-size: 0.86rem; line-height: 1.4; color: var(--v2-ink-soft); max-width: 34rem; }
.v2-cl-mast-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.8rem; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-cl-held { font-size: 0.74rem; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-cl-how { margin: 0 0 1.2rem; }
.v2-cl-root .v2-section-label > a { font-size: 0.74rem; color: var(--v2-brass); }
.v2-cl-root .v2-ring-main > .v2-section-label:first-child { margin-top: 0; }
.v2-cl-root .v2-rk-mine, .v2-cl-root .v2-ring-dl dt.total { letter-spacing: 0.07em; }
.v2-cl-mast + .v2-cl-how, .v2-cl-mast + .v2-cl-state { margin-top: 0.9rem; }
.v2-cl-rules { margin: 0; padding: 0 1rem 1rem 2.2rem; font-size: 0.82rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-cl-rules li + li { margin-top: 0.35rem; }

/* --- State line: what you can do on this page ---------------------------------------------- */
.v2-cl-state { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem; align-items: start; padding: 0.7rem 1rem; margin-bottom: 1rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); font-size: 0.86rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-cl-state b { color: var(--v2-ink-bright); font-weight: 600; }
.v2-cl-state a { color: var(--v2-brass); }
.v2-cl-state > .v2-rk-ic { width: 1.25rem; height: 1.25rem; margin-top: 0.05rem; color: var(--v2-ink-soft); }
.v2-cl-state.is-open { border-color: rgba(95,200,145,0.5); }
.v2-cl-state.is-open > .v2-rk-ic { color: var(--v2-good); }
.v2-cl-state.is-sealed { border-color: rgba(255,181,69,0.5); border-style: dashed; }
.v2-cl-state.is-sealed > .v2-rk-ic { color: var(--v2-glow); }

/* --- Race list ---------------------------------------------------------------------------- */
.v2-cl-filter .v2-actions { display: flex; align-items: center; gap: 0.8rem; }
.v2-cl-clear { font-size: 0.78rem; color: var(--v2-brass); }
.v2-cl-races { list-style: none; margin: 0 0 1.2rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-cl-race { display: grid; grid-template-columns: 5.75rem 5rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 0.7rem 1rem; }
.v2-cl-race + .v2-cl-race { border-top: 1px dashed var(--v2-line); }
.v2-cl-race:hover { background: rgba(199,154,63,0.05); }
.v2-cl-race.is-sealed .v2-cl-tag { background: none; background-color: rgba(199,154,63,0.18); color: var(--v2-ink); }
.v2-cl-mini { align-self: center; }
.v2-cl-race-what { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.v2-cl-race-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.7rem; }
.v2-cl-race-time { font-size: 0.76rem; font-weight: 600; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-cl-race-nm { font-size: 1rem; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-cl-race-nm:hover { color: var(--v2-glow); }
.v2-cl-race-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.7rem; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-cl-race-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.8rem; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-cl-race-warn { color: var(--v2-glow); }
.v2-cl-race-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.v2-cl-race-end .v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 2.25rem; white-space: nowrap; }
.v2-cl-race-end .v2-btn:not(.v2-btn-primary) { background: transparent; }
.v2-cl-slips { margin-bottom: 1.4rem; }
.v2-cl-slips .v2-yard-ol b { color: var(--v2-glow); font-weight: 700; }
.v2-cl-slip-os { white-space: normal; overflow-wrap: anywhere; }
.v2-cl-empty p b { color: var(--v2-ink-bright); font-weight: 600; }

/* --- The field ----------------------------------------------------------------------------- */
.v2-cl-sort { font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-cl-sealed { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding: 0.8rem 1rem; margin-bottom: 0.8rem; border: 1px dashed var(--v2-line); border-radius: 10px; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-cl-lines { list-style: none; margin: 0 0 1.4rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-cl-line { display: grid; grid-template-columns: 2.25rem 2.75rem minmax(0, 1fr) auto; gap: 0.3rem 0.8rem; align-items: center; padding: 0.65rem 1rem; }
.v2-cl-line + .v2-cl-line { border-top: 1px dashed var(--v2-line); }
.v2-cl-line:hover { background: rgba(199,154,63,0.05); }
.v2-cl-line.is-mine { background: rgba(255,181,69,0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-cl-line.is-pending { box-shadow: inset 3px 0 0 var(--v2-blue); }
.v2-cl-line.is-claimed { box-shadow: inset 3px 0 0 var(--v2-good); }
.v2-cl-who { gap: 0.1rem; }
.v2-cl-who .v2-rc-name { white-space: normal; flex-wrap: wrap; gap: 0.1rem 0.5rem; }
.v2-cl-who .v2-rc-name a { overflow-wrap: anywhere; }
.v2-cl-sub { font-size: 0.76rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-cl-sub a { color: var(--v2-brass); }
.v2-cl-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.9rem; margin-top: 0.15rem; font-size: 0.76rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cl-stats > span { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.v2-cl-k { color: var(--v2-ink-soft); }
.v2-cl-form { list-style: none; display: inline-flex; gap: 0.15rem; margin: 0; padding: 0; }
.v2-cl-form li { min-width: 1.15rem; padding: 0 0.15rem; border: 1px solid var(--v2-line); border-radius: 3px; text-align: center; font-size: 0.72rem; line-height: 1.15rem; color: var(--v2-ink); }
.v2-cl-form li.is-win { border-color: var(--v2-brass); background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-cl-act { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; min-width: 8.5rem; max-width: 12rem; text-align: right; }
.v2-cl-claim { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 2.25rem; white-space: nowrap; background: transparent; }
.v2-cl-claim:hover:not(:disabled) { background: rgba(199,154,63,0.14); }
.v2-cl-claim:disabled { opacity: 0.55; cursor: not-allowed; background: transparent; }
.v2-cl-why { font-size: 0.74rem; line-height: 1.3; color: var(--v2-ink-soft); }
.v2-cl-why a { color: var(--v2-brass); }
.v2-cl-why.is-bad { color: var(--v2-signal-bright); }
.v2-cl-confirm { grid-column: 1 / -1; margin-top: 0.35rem; }
.v2-cl-confirm[hidden] { display: none; }
.v2-cl-res { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; text-align: right; }
.v2-cl-res:empty { display: none; }
.v2-cl-res.is-ok { color: var(--v2-good); }
.v2-cl-res.is-bad { color: var(--v2-signal-bright); }
.v2-cl-root .v2-ring-side .v2-cl-how { margin: 1rem 0 0; }

/* --- Claims history ------------------------------------------------------------------------ */
.v2-cl-tally { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.v2-cl-tally li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.05rem 0.7rem; align-items: center; padding: 0.8rem 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-cl-tally .v2-rk-ic { grid-row: span 3; width: 1.6rem; height: 1.6rem; color: var(--v2-brass); }
.v2-cl-tally-k { font-size: 0.76rem; color: var(--v2-ink-soft); }
.v2-cl-tally b { font-size: 1.5rem; line-height: 1.15; font-weight: 700; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-cl-tally-s { font-size: 0.76rem; color: var(--v2-ink-soft); }
.v2-cl-histfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.v2-cl-histfilter[hidden] { display: none; }
.v2-cl-root .v2-mkt-seg span, .v2-cl-root .v2-mkt-count { font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-cl-root .v2-mkt-seg input:checked + span { color: var(--v2-ink-dark); }
.v2-cl-year[hidden] { display: none; }
.v2-cl-year-h { margin: 1.2rem 0 0.4rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.15rem; color: var(--v2-ink-bright); }
.v2-cl-ledger { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-cl-entry { display: grid; grid-template-columns: 3.75rem minmax(0, 1.2fr) minmax(0, 1.5fr) auto; gap: 0.2rem 0.9rem; align-items: center; padding: 0.55rem 1rem; }
.v2-cl-entry[hidden] { display: none; }
.v2-cl-entry + .v2-cl-entry { border-top: 1px dashed var(--v2-line); }
.v2-cl-entry:hover { background: rgba(199,154,63,0.05); }
.v2-cl-entry-date { font-size: 0.78rem; color: var(--v2-ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-cl-entry .v2-name-with-image { min-width: 0; }
.v2-cl-entry .v2-name { white-space: normal; overflow-wrap: anywhere; }
.v2-cl-entry-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.5rem; min-width: 0; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-cl-entry-who .v2-cl-chip { align-self: center; }
.v2-cl-entry-who a { color: var(--v2-brass); overflow-wrap: anywhere; }
.v2-cl-entry-money { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.74rem; }
.v2-cl-entry-money b { font-size: 0.95rem; font-weight: 700; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cl-entry.is-out .v2-cl-entry-money b { color: var(--v2-ink-bright); }
.v2-cl-entry-money a { color: var(--v2-brass); white-space: nowrap; }

/* Focus */
.v2-cl-race-nm:focus-visible, .v2-cl-entry a:focus-visible, .v2-cl-line a:focus-visible, .v2-cl-clear:focus-visible, .v2-cl-state a:focus-visible, .v2-cl-why a:focus-visible, .v2-cl-mast .v2-rc-title a:focus-visible { outline: 2px solid var(--v2-glow); outline-offset: 2px; }

@media (max-width: 900px) {
  .v2-cl-race { grid-template-columns: 5.75rem minmax(0, 1fr) auto; }
  .v2-cl-mini { display: none; }
  .v2-cl-tally li { grid-template-columns: minmax(0, 1fr); }
  .v2-cl-tally .v2-rk-ic { display: none; }
}
@media (max-width: 640px) {
  .v2-cl-race { grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem 0.7rem; padding: 0.7rem 0.8rem; }
  .v2-cl-race .v2-cl-tag { align-self: start; }
  .v2-cl-race-end { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .v2-cl-race-end .v2-btn { min-height: 2.75rem; flex: 1; }
  .v2-cl-race-end .v2-cl-chip { align-self: center; }
  .v2-cl-line { grid-template-columns: 2.125rem 2.5rem minmax(0, 1fr); gap: 0.4rem 0.55rem; padding: 0.65rem 0.7rem; }
  .v2-cl-line .v2-rk-cloth { width: 1.875rem; height: 2.25rem; font-size: 0.95rem; }
  .v2-cl-line .v2-rk-portrait { width: 2.5rem; height: 2.5rem; }
  .v2-cl-act { grid-column: 1 / -1; max-width: none; min-width: 0; align-items: stretch; text-align: left; }
  .v2-cl-act .v2-cl-chip { align-self: flex-start; }
  .v2-cl-claim { min-height: 2.75rem; }
  .v2-cl-res { text-align: left; }
  .v2-filter-bar.v2-cl-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .v2-filter-bar.v2-cl-filter > div { width: auto; min-width: 0; }
  .v2-cl-filter select { width: 100%; min-width: 0; }
  .v2-cl-filter .v2-actions { grid-column: 1 / -1; }
  .v2-cl-filter .v2-actions .v2-btn { flex: 1; min-height: 2.75rem; }
  .v2-cl-tally { grid-template-columns: 1fr; gap: 0.5rem; }
  .v2-cl-tally li { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-cl-tally b { grid-column: 2; grid-row: 1 / span 2; font-size: 1.3rem; }
  .v2-cl-entry { grid-template-columns: minmax(0, 1fr) auto; padding: 0.6rem 0.8rem; }
  .v2-cl-entry-date { grid-column: 1 / -1; }
  .v2-cl-entry .v2-name-with-image { grid-column: 1; grid-row: 2; }
  .v2-cl-entry-money { grid-column: 2; grid-row: 2 / span 2; }
  .v2-cl-entry-who { grid-column: 1; grid-row: 3; }
  .v2-cl-histfilter .v2-mkt-seg { width: 100%; }
  .v2-cl-how summary { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-cl-how summary .v2-rk-ic { transition: none; }
}
/* ===== end Claiming (round 4) ===== */
/* ===== Stable identity (round 4) ===== */
/* views/v2-account-{stable-info,silks,stable-image,stable-notes,referrals,invitations,
   rare-sire-token,sales-ring-ban}.pug + components/v2-identity-kit.pug (SPEC-stable-identity.md).
   Every page sits in .v2-of-root and reuses .v2-of-card/-h/-scope/-lede/-state/-savebar/-back/-eyebrow/-disc,
   .v2-yard-top/-door/-plate, .v2-sp-tabs/-tab/-badge, .v2-rk-*. Status colours keep their meaning:
   glow = waiting or unsaved, good = done, signal = refused. */

/* ---- shared ---- */
a.v2-sp-tab.v2-id-tab-end { margin-left: auto; }
.v2-id-tab-end .v2-rk-ic { width: 1rem; height: 1rem; color: var(--v2-brass); }
.v2-id-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.v2-id-two.is-crest, .v2-id-two.is-ref { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.v2-id-form { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.v2-id-form .v2-btn { margin-top: 0.3rem; }
.v2-id-input { width: 100%; max-width: 26rem; min-height: 2.75rem; padding: 0.5rem 0.7rem; background: var(--v2-bg); border: 1px solid var(--v2-line); border-radius: 6px; color: var(--v2-ink); font-size: 0.92rem; }
.v2-id-input:hover { border-color: var(--v2-brass); }
.v2-id-input[aria-invalid="true"] { border: 2px solid var(--v2-signal); }
.v2-id-input[type="file"] { padding: 0.45rem 0.5rem; font-size: 0.8rem; }
.v2-id-input::file-selector-button { margin-right: 0.6rem; padding: 0.3rem 0.7rem; background: transparent; border: 1px solid var(--v2-brass); border-radius: 4px; color: var(--v2-brass); cursor: pointer; }
.v2-of-root button.v2-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.v2-id-msg { margin: 0; display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.55rem 0.7rem; border-radius: 6px; border: 1px solid var(--v2-line); font-size: 0.86rem; line-height: 1.35; color: var(--v2-ink); }
.v2-id-msg::before { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: var(--v2-ink-dark); }
.v2-id-msg.is-good { border-color: var(--v2-good); background: rgba(95, 200, 145, 0.1); }
.v2-id-msg.is-good::before { content: "✓"; background: var(--v2-good); }
.v2-id-msg.is-warn { border-color: var(--v2-glow); background: rgba(255, 181, 69, 0.1); }
.v2-id-msg.is-warn::before { content: "!"; background: var(--v2-glow); }
.v2-id-msg.is-bad { border: 2px solid var(--v2-signal); background: rgba(255, 117, 87, 0.14); color: var(--v2-ink-bright); font-weight: 600; }
.v2-id-msg.is-bad::before { content: "!"; background: var(--v2-signal-bright); }

.v2-id-confirm { padding: 0.8rem 0.9rem; border: 1px solid var(--v2-glow); border-radius: 8px; background: rgba(255, 181, 69, 0.08); font-size: 0.9rem; }
.v2-id-confirm p { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.v2-id-confirm b { color: var(--v2-ink-bright); }
.v2-id-confirm-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.v2-id-rule { margin: 0; font-size: 0.74rem; color: var(--v2-ink-soft); }

.v2-id-seg { display: inline-flex; border: 1px solid var(--v2-brass); border-radius: 6px; overflow: hidden; }
.v2-id-seg label { position: relative; display: inline-grid; place-items: center; min-height: 2.75rem; padding: 0 0.8rem; font-size: 0.78rem; color: var(--v2-brass); cursor: pointer; text-transform: none; letter-spacing: 0; }
.v2-id-seg label + label { border-left: 1px solid var(--v2-line); }
.v2-id-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-id-seg label:has(input:checked) { background: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-id-seg label:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: -3px; }

/* ---- the shirt: panels of the CDN silk atlas (1024 wide; default.png has the same layout at 410) ---- */
.v2-id-shirt { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; filter: drop-shadow(0 0 1px rgba(243, 234, 211, 0.55)); }
.v2-id-p { position: absolute; display: block; overflow: hidden; background: var(--silk); }
.v2-id-p img { position: absolute; display: block; max-width: none; height: auto; mix-blend-mode: multiply; filter: grayscale(1); }
.v2-id-p.is-to { left: 24%; top: 16%; width: 52%; aspect-ratio: 274 / 390; clip-path: polygon(10.9% 9.5%, 26.3% 4.1%, 30.7% 8.2%, 40.9% 10%, 59.1% 10%, 70.8% 6.2%, 76.6% 1%, 95.6% 6.7%, 89.1% 21%, 89.8% 45.4%, 97.8% 50.5%, 99.3% 67.2%, 93.8% 80%, 81% 99.2%, 50% 94.1%, 13.5% 96.7%, 6.2% 85.1%, 1.8% 69.7%, 0.7% 53.1%, 4.4% 47.9%, 14.6% 45.4%, 17.2% 21%); }
.v2-id-p.is-to img { width: 373.7%; left: -10.2%; top: -4.6%; }
.v2-id-p.is-sl { left: 2%; top: 22%; width: 30%; aspect-ratio: 233 / 225; clip-path: polygon(0% 25.3%, 10.7% 12%, 45.1% 0.9%, 88% 0.9%, 100% 10.7%, 90.1% 23.1%, 77.3% 56.4%, 75.1% 96.4%, 34.3% 99.6%, 23.6% 72.9%, 7.3% 36.4%); transform: rotate(-14deg); }
.v2-id-p.is-sl img { width: 439.5%; left: -255.4%; top: -43.6%; }
.v2-id-p.is-sr { right: 2%; top: 22%; width: 30%; aspect-ratio: 228 / 216; clip-path: polygon(45.2% 0.9%, 78.1% 3.7%, 82.5% 25.5%, 93.4% 55.6%, 100% 82.4%, 80.3% 94.9%, 40.8% 99.5%, 12.3% 98.1%, 0% 87%, 14.5% 64.8%, 32% 32.4%); transform: rotate(14deg); }
.v2-id-p.is-sr img { width: 449.1%; left: -332%; top: -55.6%; }
.v2-id-cap { position: absolute; left: 39%; top: 1%; width: 22%; height: 16%; border-radius: 50% 50% 8% 8% / 80% 80% 10% 10%; background: var(--cap); }
.v2-id-cap::after { content: ""; position: absolute; left: 75%; bottom: 0; width: 45%; height: 22%; border-radius: 0 60% 60% 0; background: var(--cap); }

/* ---- colours room ---- */
.v2-id-room { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.v2-id-stage { position: sticky; top: 3.5rem; min-width: 0; display: flex; flex-direction: column; gap: 0.7rem; padding: 0.8rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-id-3d { position: relative; height: 21rem; border: 1px solid var(--v2-line); border-radius: 8px; overflow: hidden; background: radial-gradient(circle at 50% 35%, var(--v2-surface-2), var(--v2-bg)); }
.v2-id-3d-still { position: absolute; inset: 1.2rem; display: grid; place-items: center; }
.v2-id-3d-still .v2-id-shirt { width: auto; height: 100%; }
.v2-id-3d-mount { position: absolute; inset: 0; }
.v2-id-3d-mount canvas { display: block; }
.v2-id-3d .v2-yard-plate { bottom: 0.5rem; max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.v2-id-note { margin: 0; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-id-colour { display: grid; grid-template-columns: 5.5rem minmax(0, 11rem) minmax(0, 1fr); gap: 0.3rem 0.6rem; align-items: center; }
.v2-id-colour-row { display: flex; gap: 0.4rem; align-items: center; min-width: 0; }
.v2-id-pick { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 6px; background: none; cursor: pointer; }
.v2-id-hex { min-width: 0; text-transform: uppercase; }
.v2-id-swatches { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.v2-id-swatch { width: 1.5rem; height: 1.5rem; padding: 0; border: 1px solid rgba(243, 234, 211, 0.5); border-radius: 4px; cursor: pointer; }
.v2-id-swatch:hover { border-color: var(--v2-ink-bright); }

.v2-id-rack { min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.v2-id-fam { border: 0; margin: 0; padding: 0; min-width: 0; }
.v2-id-fam legend { padding: 0; margin-bottom: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--v2-ink-soft); }
.v2-id-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: 0.45rem; }
.v2-id-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.4rem 0.3rem 0.45rem; background: var(--v2-surface-2); border: 1px solid var(--v2-line); border-radius: 8px; cursor: pointer; text-align: center; }
.v2-id-tile:hover { border-color: var(--v2-brass); }
.v2-id-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-id-tile-t { font-size: 0.7rem; line-height: 1.2; color: var(--v2-ink-soft); }
.v2-id-tile:has(input:checked) { border-color: var(--v2-brass); box-shadow: inset 0 0 0 1px var(--v2-brass); background: rgba(199, 154, 63, 0.14); }
.v2-id-tile:has(input:checked) .v2-id-tile-t { color: var(--v2-ink-bright); font-weight: 600; }
.v2-id-tile:has(input:checked)::after { content: "✓"; position: absolute; top: 0.2rem; right: 0.25rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; display: grid; place-items: center; background: var(--v2-brass); color: var(--v2-ink-dark); font-size: 0.66rem; font-weight: 700; }
.v2-id-tile:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-id-now { font-size: 0.66rem; color: var(--v2-glow); }

.v2-id-savebar { grid-column: 1 / -1; margin: 0; border: 1px solid var(--v2-line); border-radius: 10px; z-index: 5; box-shadow: 0 -0.4rem 1rem rgba(0, 0, 0, 0.35); }
.v2-id-mini { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex: 1 1 13rem; }
.v2-id-mini > span:first-child { flex: 0 0 3.25rem; }
.v2-id-mini > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.v2-id-mini b { font-size: 0.92rem; color: var(--v2-ink); }
.v2-id-receipt { flex: 1 1 13rem; font-size: 0.86rem; color: var(--v2-ink-soft); }
.v2-id-receipt b { color: var(--v2-ink); }
.v2-id-receipt small { display: block; font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-id-receipt a { color: var(--v2-glow); text-decoration: underline; }
.v2-id-receipt .is-short b { color: var(--v2-signal-bright); }
.v2-id-savebar .v2-id-msg { flex: 1 1 100%; }

/* ---- name & country ---- */
.v2-id-door, .v2-id-wall { border: 1px solid var(--v2-line); border-radius: 8px; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(11,26,18,0.7)), repeating-linear-gradient(90deg, #2a2016 0 1.375rem, #241b12 1.375rem 1.4375rem), #2a2016; }
.v2-id-door { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.6rem; min-height: 9.5rem; padding: 1rem 1rem 1.1rem; }
.v2-id-door-crest { height: 4.5rem; max-width: 60%; object-fit: contain; filter: drop-shadow(0 0.25rem 0.375rem rgba(0,0,0,0.6)); }
.v2-id-plate { max-width: 100%; padding: 0.3rem 1rem; border-radius: 4px; background: linear-gradient(180deg, #e3bd6a, var(--v2-brass)); box-shadow: 0 2px 0 rgba(0,0,0,0.45), inset 0 0 0 1px rgba(26,20,8,0.35); color: var(--v2-ink-dark); font-family: var(--v2-font-serif); font-size: 1.25rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.v2-id-stamp { position: absolute; top: 0.6rem; right: 0.6rem; padding: 0.15rem 0.5rem; border: 2px solid var(--v2-signal-bright); border-radius: 4px; background: var(--v2-bg); color: var(--v2-signal-bright); font-size: 0.74rem; font-weight: 700; transform: rotate(-4deg); }
.v2-id-country { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--v2-ink-bright); }

/* ---- stable image ---- */
.v2-id-wall { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; padding: 1rem; }
.v2-id-frame { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; }
.v2-id-frame img { display: block; width: 9rem; height: 9rem; object-fit: contain; padding: 0.4rem; border: 3px solid var(--v2-brass); border-radius: 6px; background: repeating-conic-gradient(#20382b 0% 25%, #182c21 0% 50%) 0 0 / 1rem 1rem; box-shadow: 0 0.4rem 0.8rem rgba(0,0,0,0.5); }
.v2-id-frame figcaption { font-size: 0.74rem; color: var(--v2-ink); }
.v2-id-frame.is-new img { border-color: var(--v2-glow); }
.v2-id-seen { display: flex; align-items: center; gap: 0.7rem; margin-top: -0.5rem; min-width: 0; }
.v2-id-seen-name { font-family: var(--v2-font-serif); font-size: 1.35rem; line-height: 1.15; color: var(--v2-ink-bright); overflow-wrap: anywhere; min-width: 0; }
.v2-id-steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.v2-id-steps > li, .v2-id-how li { counter-increment: st; position: relative; padding-left: 2.2rem; }
.v2-id-steps > li { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.v2-id-steps > li::before, .v2-id-how li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--v2-brass); color: var(--v2-brass); font-weight: 700; font-size: 0.8rem; }
.v2-id-steps b, .v2-id-how b { font-size: 0.92rem; color: var(--v2-ink); }
.v2-id-steps a { color: var(--v2-glow); text-decoration: underline; }
.v2-id-bill { margin: 0; font-size: 0.86rem; color: var(--v2-ink); }
.v2-id-bill small { display: block; font-size: 0.72rem; color: var(--v2-ink-soft); }

/* ---- notes ---- */
.v2-id-book { max-width: 56rem; }
.v2-id-paper { display: block; width: 100%; min-height: 22rem; padding: 0 1rem 0 3rem; resize: vertical; border: 1px solid var(--v2-line); border-radius: 6px; color: var(--v2-ink); font-size: 0.95rem; line-height: 1.75rem; background: linear-gradient(90deg, transparent 2.2rem, rgba(199,154,63,0.5) 2.2rem, rgba(199,154,63,0.5) 2.28rem, transparent 2.28rem), repeating-linear-gradient(180deg, var(--v2-bg) 0 calc(1.75rem - 1px), rgba(199,154,63,0.14) calc(1.75rem - 1px) 1.75rem); background-attachment: local; }
.v2-id-paper::placeholder { color: var(--v2-ink-soft); }

/* ---- referrals ---- */
.v2-id-copy { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: -0.5rem; }
.v2-id-copy .v2-id-input { flex: 1 1 14rem; max-width: none; min-width: 0; font-size: 0.8rem; }
.v2-id-how { list-style: none; counter-reset: st; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-id-how b { display: block; }
.v2-id-tally { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.v2-id-tally dt { font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-id-tally dd { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: var(--v2-ink); }
.v2-id-tally .is-money, .v2-id-invite-kv .is-money, .v2-id-sire-kv .is-money { color: var(--v2-glow); }
.v2-id-recruits { list-style: none; margin: 0; padding: 0; }
.v2-id-recruit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.8rem; align-items: center; padding: 0.5rem 0; border-top: 1px dashed var(--v2-line); }
.v2-id-recruit-n { min-width: 0; }
.v2-id-recruit-n a { display: block; font-size: 0.9rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-id-recruit-n a:hover { color: var(--v2-glow); }
.v2-id-recruit-n small { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-id-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.v2-id-ladder li { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.45rem; border: 1px dashed var(--v2-line); border-radius: 100px; font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-id-ladder li.is-done { border-style: solid; border-color: rgba(95,200,145,0.5); color: var(--v2-good); }
.v2-id-ladder li.is-done::before { content: "✓"; font-weight: 700; }
.v2-id-ladder li.is-wait { border-style: solid; border-color: var(--v2-glow); color: var(--v2-glow); }
.v2-id-more summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; font-size: 0.8rem; color: var(--v2-brass); border-top: 1px dashed var(--v2-line); }

/* ---- invitations ---- */
.v2-id-lede { margin: 0 0 0.9rem; }
.v2-id-invites { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.v2-id-invite { display: grid; grid-template-columns: 8rem minmax(0, 1fr); border: 1px solid var(--v2-brass); border-radius: 10px; overflow: hidden; background: var(--v2-surface); box-shadow: inset 0 0 0 3px rgba(199,154,63,0.12); }
.v2-id-invite .v2-yard-door { height: auto; min-height: 100%; align-items: center; border-bottom: none; border-right: 2px solid var(--v2-brass); }
.v2-id-invite .v2-yard-door::before { display: none; }
.v2-id-invite .v2-yard-door img { height: 6rem; }
.v2-id-invite .v2-yard-plate { bottom: 0.5rem; }
.v2-id-invite-b { min-width: 0; padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; }
a.v2-id-invite-h { font-size: 1.1rem; font-weight: 600; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
a.v2-id-invite-h:hover, .v2-id-invite-to a:hover { color: var(--v2-glow); }
.v2-id-invite-to { margin: -0.3rem 0 0; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-id-invite-to a { display: block; font-size: 0.95rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-id-invite-race { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-id-invite-kv, .v2-id-sire-kv { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.v2-id-invite-kv dt, .v2-id-sire-kv dt { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-id-invite-kv dd, .v2-id-sire-kv dd { margin: 0; font-size: 0.92rem; font-weight: 600; color: var(--v2-ink); }
.v2-id-noinvite { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 2.5rem 1rem; border: 1px dashed var(--v2-line); border-radius: 10px; text-align: center; color: var(--v2-ink-soft); }
.v2-id-noinvite p { margin: 0; font-size: 0.95rem; }
.v2-id-noinvite > .v2-rk-ic { width: 2rem; height: 2rem; color: var(--v2-brass); }

/* ---- rare sire book ---- */
.v2-id-purse { flex-direction: row; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.v2-id-purse .v2-of-coin { flex: 0 0 auto; }
.v2-id-purse .v2-of-disc { width: 4rem; height: 4rem; font-size: 1.5rem; }
.v2-id-purse-t { margin: 0 0 0.4rem; font-size: 1.25rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-id-purse .v2-of-lede { margin: 0; }
.v2-of-root > .v2-id-msg { margin-bottom: 1rem; }
.v2-id-confirmcard { border-color: var(--v2-glow); margin-bottom: 1rem; }
.v2-id-confirmcard b { color: var(--v2-ink-bright); }
.v2-id-confirmcard .v2-of-lede { margin: -0.3rem 0 0; }
.v2-id-bookhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.v2-id-sires { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.8rem; }
.v2-id-sire { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-id-sire .v2-yard-door { height: 6.5rem; }
.v2-id-sire .v2-yard-door img { height: 5.75rem; }
.v2-id-sire-b { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.7rem 0.8rem 0.8rem; }
a.v2-id-sire-n { font-size: 1rem; font-weight: 600; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
a.v2-id-sire-n:hover { color: var(--v2-glow); }
.v2-id-sire-acts { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; }
.v2-id-sire-acts .v2-btn { flex: 1 1 auto; }
a.v2-id-learn { font-size: 0.74rem; color: var(--v2-glow); text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---- take a break: deliberately plain ---- */
.v2-id-break { max-width: 40rem; }
.v2-id-lengths { border: 0; margin: 0 0 0.7rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; min-width: 0; }
.v2-id-lengths legend { padding: 0; margin-bottom: 0.4rem; }
.v2-id-length { position: relative; display: flex; flex-direction: column; gap: 0.15rem; min-height: 4.5rem; padding: 0.7rem 0.8rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-bg); cursor: pointer; }
.v2-id-length:hover { border-color: var(--v2-ink-soft); }
.v2-id-length input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-id-length b { font-size: 1.05rem; color: var(--v2-ink); }
.v2-id-length small { font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-id-length:has(input:checked) { border-color: var(--v2-ink); box-shadow: inset 0 0 0 1px var(--v2-ink); background: var(--v2-surface-2); }
.v2-id-length:has(input:checked)::after { content: "✓"; position: absolute; top: 0.4rem; right: 0.5rem; font-weight: 700; color: var(--v2-ink); }
.v2-id-length:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-id-until { margin: 0; }
.v2-id-until b { display: block; font-size: 1.25rem; color: var(--v2-ink-bright); }
.v2-id-until small { font-size: 0.8rem; color: var(--v2-ink-soft); }
#v2BanForm .v2-id-rule { margin-bottom: 0.7rem; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .v2-id-two, .v2-id-two.is-crest, .v2-id-two.is-ref { grid-template-columns: minmax(0, 1fr); }
  .v2-id-room { grid-template-columns: minmax(0, 1fr); }
  .v2-id-stage { position: static; }
  .v2-id-swatch { width: 2.75rem; height: 2.75rem; }
}
@media (max-width: 640px) {
  a.v2-sp-tab.v2-id-tab-end { margin-left: 0; }
  .v2-id-3d { height: 17rem; }
  .v2-id-colour { grid-template-columns: minmax(0, 1fr); }
  .v2-id-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-id-swatch { width: 100%; }
  .v2-id-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-id-savebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.6rem; padding: 0.5rem 0.7rem; }
  .v2-id-mini { grid-column: 1; grid-row: 1; }
  .v2-id-savebar .v2-btn { grid-column: 2; grid-row: 1; padding-inline: 0.8rem; }
  .v2-id-receipt, .v2-id-savebar .v2-id-msg { grid-column: 1 / -1; }
  /* Larger text: Register no longer fits beside the pick, so it moves down beside the fee. */
  html.v2-text-large .v2-id-mini, html.v2-text-larger .v2-id-mini { grid-column: 1 / -1; }
  html.v2-text-large .v2-id-savebar .v2-btn, html.v2-text-larger .v2-id-savebar .v2-btn { grid-row: 2; align-self: center; }
  html.v2-text-large .v2-id-receipt, html.v2-text-larger .v2-id-receipt { grid-column: 1; grid-row: 2; }
  html.v2-text-larger .v2-id-receipt { grid-column: 1 / -1; }
  html.v2-text-larger .v2-id-savebar .v2-btn { grid-column: 1 / -1; grid-row: 3; }
  .v2-id-receipt b, .v2-id-receipt small { display: inline; margin-right: 0.3rem; }
  .v2-id-receipt small + small { display: none; }
  .v2-id-sire { flex-direction: row; }
  .v2-id-sire .v2-yard-door { flex: 0 0 5.5rem; height: auto; align-items: center; border-bottom: none; border-right: 2px solid var(--v2-brass); }
  .v2-id-sire .v2-yard-door::before { display: none; }
  .v2-id-sire .v2-yard-door img { height: 4.5rem; }
  .v2-id-sire-b { min-width: 0; }
  .v2-id-recruit { grid-template-columns: minmax(0, 1fr); }
  .v2-id-tally { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .v2-id-tally dd { font-size: 1.25rem; }
  .v2-id-invite { grid-template-columns: minmax(0, 1fr); }
  .v2-id-invite .v2-yard-door { height: 6.5rem; min-height: 0; border-right: none; border-bottom: 2px solid var(--v2-brass); }
  .v2-id-invite .v2-yard-door img { height: 5.75rem; }
  .v2-id-lengths { grid-template-columns: minmax(0, 1fr); }
  .v2-id-paper { min-height: 18rem; }
  .v2-id-purse { align-items: flex-start; }
}
@media (min-width: 901px) and (pointer: fine) {
  .v2-id-seg label { min-height: 2.25rem; }
}
/* ===== end Stable identity (round 4) ===== */
/* ===== Form sheet (round 4) ===== */
/* v2-past-performances-page.pug (SPEC-past-performances.md). A printed racing form on the noticeboard
   paper tokens. Reused unchanged: .v2-rk-cloth, .v2-rk-mine, .v2-rk-oval, .v2-rk-surface, .v2-rk-going,
   .v2-name-with-image, .v2-horse-color, .v2-sr-only. Nothing here touches a shared grid. */
.v2-fs-sheet {
  --v2-fs-rule: rgba(26, 20, 8, 0.26);
  --v2-fs-gold: #e2b64a;
  --v2-fs-silver: #c9ccd1;
  --v2-fs-bronze: #c98a52;
  color: var(--v2-paper-ink);
  background: var(--v2-paper);
  border-radius: 4px;
  padding: 1.1rem 1.4rem 1.4rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  font-size: 0.85rem;
  line-height: 1.35;
}
.v2-fs-sheet p { margin: 0; }
.v2-fs-sheet a { color: var(--v2-paper-icon); }
.v2-fs-sheet a:hover { color: var(--v2-paper-ink); text-decoration: underline; }
.v2-fs-sheet a:focus-visible, .v2-fs-sheet summary:focus-visible, .v2-fs-wrap:focus-visible { outline: 2px solid var(--v2-paper-ink); outline-offset: 2px; border-radius: 2px; }
.v2-fs-sheet abbr[title] { text-decoration: none; cursor: help; }
.v2-fs-k { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--v2-paper-ink-soft); }

/* Speed figures: the band colours from getSpeedRatingTextColor, redefined on this span only so each
   band stays 4.5:1 on paper. Same four bands, same meaning. */
.v2-fs-sr { --v2-signal: #a3260f; --v2-glow: #7a4d00; --v2-ink-faint: #4d5a50; --v2-blue: #1c48b0; font-weight: 700; }

/* Masthead */
.v2-fs-mast { display: grid; grid-template-columns: minmax(0, 1fr) auto 11.5rem; gap: 0.6rem 1.4rem; align-items: center; border-top: 4px double var(--v2-paper-ink); border-bottom: 4px double var(--v2-paper-ink); padding: 0.7rem 0; }
.v2-fs-kicker { font-size: 0.74rem; font-weight: 600; color: var(--v2-paper-ink-soft); }
.v2-fs-title { font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.9rem; line-height: 1.12; margin: 0.1rem 0 0.15rem; color: var(--v2-paper-ink); overflow-wrap: anywhere; }
.v2-fs-when { font-size: 0.92rem; font-weight: 600; }
.v2-fs-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.8rem; margin-top: 0.35rem !important; font-size: 0.8rem; color: var(--v2-paper-ink-soft); }
.v2-fs-cond .v2-rk-going { color: var(--v2-paper-ink); background: transparent; border-color: var(--v2-fs-rule); }
.v2-fs-cond .v2-rk-going .v2-rk-ic { color: var(--v2-paper-ink); }
.v2-fs-cond .v2-rk-going.is-hidden { color: var(--v2-paper-ink-soft); }
.v2-fs-mast-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; text-align: right; }
.v2-fs-stamp { display: inline-block; border: 2px solid currentColor; border-radius: 3px; padding: 0.12rem 0.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; transform: rotate(-2.5deg); }
.v2-fs-stamp.is-pre { color: var(--v2-paper-alert); }
.v2-fs-stamp.is-run { color: var(--v2-paper-ink); }
.v2-fs-purse b { display: block; font-size: 1.25rem; line-height: 1.1; }
.v2-fs-card { font-size: 0.8rem; font-weight: 600; }
.v2-fs-oval { background: var(--v2-infield); border-radius: 6px; padding: 0.25rem; }
.v2-fs-oval .v2-rk-oval { display: block; width: 100%; height: auto; }
.v2-fs-notice { margin-top: 0.6rem !important; font-size: 0.8rem; font-style: italic; color: var(--v2-paper-ink-soft); }

/* The field */
.v2-fs-index { margin-top: 0.9rem; scroll-margin-top: 5rem; }
.v2-fs-h { font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.15rem; margin: 0 0 0.3rem; color: var(--v2-paper-ink); }
.v2-fs-board { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.v2-fs-board th { padding: 0.15rem 0.45rem; font-size: 0.68rem; font-weight: 600; color: var(--v2-paper-ink-soft); text-align: left; border-bottom: 1px solid var(--v2-paper-ink); white-space: nowrap; }
.v2-fs-board td { padding: 0.2rem 0.45rem; border-bottom: 1px solid var(--v2-fs-rule); white-space: nowrap; vertical-align: middle; color: var(--v2-paper-ink); }
.v2-fs-board .is-n { text-align: right; }
.v2-fs-board tbody tr:hover td { background: var(--v2-paper-hover); }
.v2-fs-board .v2-rk-cloth { width: 1.625rem; height: 1.875rem; font-size: 0.85rem; }
.v2-fs-board .v2-fs-nmrow { display: flex; align-items: center; min-height: 2.3rem; }
.v2-fs-board .c-nm a { color: var(--v2-paper-ink); font-weight: 600; }
.v2-fs-board tr.is-mine td, .v2-fs-entrant.is-mine { background: rgba(185, 122, 28, 0.16); }
.v2-fs-sheet .v2-rk-mine { background: var(--v2-paper-ink); color: var(--v2-paper); letter-spacing: 0.05em; }

/* Finish figures */
.v2-fs-figs { display: inline-flex; gap: 0.15rem; }
.v2-fs-fig, .v2-fs-fin { display: inline-block; min-width: 1.2rem; text-align: center; border-radius: 3px; font-weight: 700; font-size: 0.76rem; line-height: 1.2rem; }
.v2-fs-fig { border: 1px solid var(--v2-fs-rule); }
.v2-fs-fig.is-1, .v2-fs-fin.is-1 { background: var(--v2-fs-gold); border-color: #7a5a10; }
.v2-fs-fig.is-2, .v2-fs-fin.is-2 { background: var(--v2-fs-silver); border-color: #6f7378; }
.v2-fs-fig.is-3, .v2-fs-fin.is-3 { background: var(--v2-fs-bronze); border-color: #71491f; }
.v2-fs-debut { font-size: 0.76rem; font-weight: 700; font-style: italic; }

/* Key */
.v2-fs-key { margin-top: 0.5rem; font-size: 0.78rem; color: var(--v2-paper-ink-soft); }
.v2-fs-key summary { display: inline-flex; align-items: center; min-height: 1.75rem; cursor: pointer; font-weight: 600; color: var(--v2-paper-icon); }
.v2-fs-key ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; }
.v2-fs-key b { color: var(--v2-paper-ink); }

/* Entrant */
.v2-fs-entrant { margin-top: 1rem; padding: 0.6rem 0.5rem 0.4rem; border-top: 3px solid var(--v2-paper-ink); scroll-margin-top: 5rem; }
.v2-fs-entrant:target { outline: 2px solid var(--v2-paper-alert); outline-offset: 2px; }
.v2-fs-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.5rem 1rem; align-items: start; margin-bottom: 0.45rem; }
.v2-fs-ident { min-width: 0; }
.v2-fs-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.5rem; margin: 0; font-family: var(--v2-font-sans); font-size: 1.15rem; font-weight: 700; line-height: 1.25; color: var(--v2-paper-ink); }
.v2-fs-name .v2-name-with-image { color: var(--v2-paper-ink); }
.v2-fs-flag { width: 1rem; height: 1rem; }
.v2-fs-honour { font-size: 0.72rem; font-weight: 600; color: var(--v2-paper-ink-soft); cursor: help; }
.v2-fs-gem { font-size: 0.85rem; color: var(--v2-paper-icon); cursor: help; }
.v2-fs-meta { display: flex; flex-wrap: wrap; gap: 0 0.8rem; margin-top: 0.1rem !important; font-size: 0.8rem; color: var(--v2-paper-ink-soft); }
.v2-fs-meta b { color: var(--v2-paper-ink); }
.v2-fs-ped { font-size: 0.8rem; color: var(--v2-paper-ink-soft); }
.v2-fs-glance { display: flex; gap: 1rem; }
.v2-fs-wt, .v2-fs-formbox { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.v2-fs-wt b { font-size: 1.5rem; line-height: 1; }
.v2-fs-wt-eq { font-size: 0.76rem; font-weight: 600; }
.v2-fs-mini { font-size: 0.72rem; color: var(--v2-paper-ink-soft); white-space: nowrap; }

/* Record */
.v2-fs-record { border-collapse: collapse; font-size: 0.72rem; }
.v2-fs-record th { padding: 0 0.35rem; font-size: 0.66rem; font-weight: 600; color: var(--v2-paper-ink-soft); text-align: right; }
.v2-fs-record thead th { border-bottom: 1px solid var(--v2-paper-ink); }
.v2-fs-record tbody th { text-align: left; }
.v2-fs-record td { padding: 0 0.35rem; text-align: right; color: var(--v2-paper-ink); }
.v2-fs-record tbody tr:first-child td, .v2-fs-record tbody tr:first-child th { font-weight: 700; }

/* Running lines */
.v2-fs-wrap { position: relative; overflow-x: auto; } /* containing block for the .v2-sr-only spans */
.v2-fs-lines { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.v2-fs-lines th { padding: 0.1rem 0.28rem; font-size: 0.66rem; font-weight: 600; color: var(--v2-paper-ink-soft); text-align: left; border-bottom: 1px solid var(--v2-paper-ink); white-space: nowrap; }
.v2-fs-lines td { padding: 0.14rem 0.28rem; border-bottom: 1px solid var(--v2-fs-rule); white-space: nowrap; vertical-align: baseline; color: var(--v2-paper-ink); }
.v2-fs-lines .is-n { text-align: right; }
.v2-fs-lines .gs { border-left: 1px solid var(--v2-fs-rule); }
.v2-fs-lines tbody tr:hover td { background: var(--v2-paper-hover); }
.v2-fs-lines tr.is-win td { background: rgba(226, 182, 74, 0.22); }
.v2-fs-lines th.c-date, .v2-fs-lines td.c-date { position: sticky; left: 0; z-index: 1; background: var(--v2-paper); } /* stays put while the columns scroll sideways, 901px up */
.v2-fs-lines tr.is-win td.c-date { background: #ecd9a9; }
.v2-fs-entrant.is-mine .v2-fs-lines td.c-date, .v2-fs-entrant.is-mine .v2-fs-lines th.c-date { background: #e6d2a9; }
.v2-fs-lines tbody tr:hover td.c-date { background: var(--v2-paper-hover); }
.v2-fs-lines .c-top { white-space: normal; min-width: 11rem; font-size: 0.72rem; color: var(--v2-paper-ink-soft); }
.v2-fs-lines .c-tf { color: var(--v2-turf-deep); }
.v2-fs-lines .c-race a { font-weight: 600; }
.v2-fs-sup { font-size: 0.66rem; line-height: 0; vertical-align: super; margin-left: 0.06em; color: var(--v2-paper-ink-soft); }
.v2-fs-nextwin { color: var(--v2-paper-ink); font-weight: 600; }
.v2-fs-lines tr.v2-fs-sep td { font-size: 0.74rem; color: var(--v2-paper-ink-soft); background: transparent; }
.v2-fs-none { font-size: 0.8rem; font-style: italic; color: var(--v2-paper-ink-soft); }
.v2-fs-empty { padding: 1.5rem 0.5rem; color: var(--v2-paper-ink-soft); }

/* Works */
.v2-fs-works { list-style: none; display: flex; flex-wrap: wrap; gap: 0.1rem 1rem; margin: 0.3rem 0 0; padding: 0; font-size: 0.74rem; color: var(--v2-paper-ink); }
.v2-fs-works-k { font-weight: 700; }
.v2-fs-bullet { font-weight: 700; font-size: 1rem; line-height: 0; margin-right: 0.15rem; }
.v2-fs-works i { color: var(--v2-paper-ink-soft); }

/* Hops */
.v2-fs-hop { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.2rem; font-size: 0.74rem; font-weight: 600; }
.v2-fs-hop a { display: inline-flex; align-items: center; min-height: 1.5rem; }

@media (max-width: 900px) {
  .v2-fs-sheet { padding: 0.9rem 1rem 1.1rem; }
  .v2-fs-mast { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-fs-oval { display: none; }
  .v2-fs-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .v2-fs-recwrap { grid-column: 1 / -1; }
  .v2-fs-record { width: 100%; }

  /* The field: each row becomes a small card. */
  .v2-fs-board, .v2-fs-board tbody { display: block; }
  .v2-fs-board thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .v2-fs-board tbody tr { display: grid; grid-template-columns: 2.4rem repeat(8, minmax(0, 1fr)); gap: 0.15rem 0.25rem; align-items: end; padding: 0.35rem 0.25rem; border-bottom: 1px solid var(--v2-fs-rule); }
  .v2-fs-board td, .v2-fs-board td.is-n { display: block; padding: 0; border: 0; text-align: left; white-space: normal; background: transparent; }
  .v2-fs-board tbody tr:hover td, .v2-fs-board tr.is-mine td { background: transparent; }
  .v2-fs-board tr.is-mine { background: rgba(185, 122, 28, 0.16); }
  .v2-fs-board .c-pp { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 0.4rem; }
  .v2-fs-board .c-nm { grid-column: 2 / span 4; }
  .v2-fs-board .c-fg { grid-column: 6 / -1; grid-row: 1; align-self: center; justify-self: end; }
  .v2-fs-board [data-l] { grid-column: span 1; order: 2; }
  .v2-fs-board [data-l]::before { content: attr(data-l); display: block; font-size: 0.66rem; font-weight: 600; line-height: 1.1; color: var(--v2-paper-ink-soft); }

  /* Running lines become labelled cards. The roles in the markup keep them a table for AT. */
  .v2-fs-wrap { overflow: visible; }
  .v2-fs-lines, .v2-fs-lines tbody { display: block; }
  .v2-fs-lines thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .v2-fs-lines tbody tr { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.1rem 0.25rem; padding: 0.35rem 0; border-bottom: 1px solid var(--v2-fs-rule); }
  .v2-fs-lines td, .v2-fs-lines td.is-n, .v2-fs-lines .gs { display: block; padding: 0; border: 0; white-space: normal; text-align: left; background: transparent; }
  .v2-fs-lines td.c-date, .v2-fs-lines tr.is-win td.c-date, .v2-fs-lines tbody tr:hover td.c-date, .v2-fs-entrant.is-mine .v2-fs-lines td.c-date { position: static; grid-column: span 4; font-weight: 700; background: transparent; }
  .v2-fs-lines .c-tf { grid-column: span 1; }
  .v2-fs-lines .c-cnd { grid-column: span 1; }
  .v2-fs-lines .c-dst { grid-column: span 2; }
  .v2-fs-lines .c-race { grid-column: span 4; text-align: right; overflow-wrap: anywhere; } /* long stakes names have no break points */
  .v2-fs-lines [data-l] { grid-column: span 2; }
  .v2-fs-lines [data-l]::before { content: attr(data-l); display: block; font-size: 0.66rem; font-weight: 600; line-height: 1.1; color: var(--v2-paper-ink-soft); }
  /* Order: fractions + SR + Fld, then PP + calls + Fin, then Jky Wt Eqp, then top three. */
  .v2-fs-lines .c-f1 { order: 1; } .v2-fs-lines .c-f2 { order: 2; } .v2-fs-lines .c-f3 { order: 3; } .v2-fs-lines .c-tm { order: 4; }
  .v2-fs-lines .c-sr { order: 5; } .v2-fs-lines .c-fd { order: 6; }
  .v2-fs-lines .c-pp2 { order: 7; } .v2-fs-lines .c-1c { order: 8; } .v2-fs-lines .c-2c { order: 9; } .v2-fs-lines .c-3c { order: 10; } .v2-fs-lines .c-st { order: 11; } .v2-fs-lines .c-fin { order: 12; }
  .v2-fs-lines .c-jk { order: 13; } .v2-fs-lines .c-wt2 { order: 14; } .v2-fs-lines .c-eq { order: 15; }
  .v2-fs-lines .c-top { order: 16; grid-column: span 6; min-width: 0; }
  .v2-fs-lines tr.is-win { background: rgba(226, 182, 74, 0.22); }
  .v2-fs-lines tbody tr:hover td, .v2-fs-lines tr.is-win td { background: transparent; }
  .v2-fs-lines tr.v2-fs-sep { display: block; padding: 0.2rem 0; }
}
@media (max-width: 640px) {
  .v2-fs-sheet { padding: 0.8rem 0.75rem 1rem; margin: 0 -0.5rem; }
  .v2-fs-mast { grid-template-columns: minmax(0, 1fr); }
  .v2-fs-mast-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
  .v2-fs-title { font-size: 1.5rem; }
  .v2-fs-card { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .v2-fs-key summary { min-height: 2.75rem; }
  .v2-fs-hop a { min-height: 2.75rem; }
  .v2-fs-entrant { padding-left: 0.2rem; padding-right: 0.2rem; scroll-margin-top: 7rem; }
  .v2-fs-index { scroll-margin-top: 7rem; }

  /* Board rows: cloth + name, figures, Wt Best Last Off Early, then the three records. Five figures
     and three values can't share a line at 375 without colliding, so the figures get their own. */
  .v2-fs-board .c-pp { grid-row: 1 / span 4; }
  .v2-fs-board tbody tr { grid-template-columns: 2.4rem repeat(10, minmax(0, 1fr)); }
  .v2-fs-board .c-nm { grid-column: 2 / -1; }
  .v2-fs-board .v2-fs-nmrow { min-height: 2.75rem; }
  .v2-fs-board .c-fg { grid-column: 2 / -1; grid-row: auto; order: 1; justify-self: start; align-self: end; }
  .v2-fs-board [data-l] { grid-column: span 2; }
  .v2-fs-board td.c-li, .v2-fs-board td.c-su { grid-column: span 3; white-space: nowrap; }
  .v2-fs-board td.c-di { grid-column: span 4; white-space: nowrap; }

  .v2-fs-head { grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 0.6rem; }
  .v2-fs-glance { grid-column: 1 / -1; justify-content: space-between; }
  /* Date 4 + Tf 1 + Cnd 2 + Dist 2 + Race 3: Cnd needs two columns or it runs into Dist at Larger text. */
  .v2-fs-lines .c-cnd { grid-column: span 2; }
  .v2-fs-lines .c-dst { grid-column: span 2; }
  .v2-fs-lines .c-race { grid-column: span 3; }
}
/* ===== end Form sheet (round 4) ===== */

/* ===== Breeders & ratings (round 4) ===== */
/* /leaderboards (+ /sires, /mares), /leaderboards/legends, /leaderboards/ratings. See SPEC-breeders-legends.md.
   Reuses .v2-yard-top/-hello/-stable/-ranks/-rank/-door, .v2-lb-top/-switch/-events/-event/-ranks/-you/-podium/-step* /-plinth/-rosette/-pos/-who/-name/-sub/-stable/-form/-bar/-val/-honour/-dir,
   .v2-rec-chips/-wings/-shelf/-shelves/-sline/-slines/-sval/-note, .v2-br-*, .v2-rk-portrait/-pips/-mine/-tag/-ic, .v2-status-chip, .v2-section-label .v2-rc-h, .v2-name-with-image, .v2-horse-color.
   Does NOT modify any of them, and never touches .v2-ranked-row / .v2-horse-row / .v2-lb-line. */

.v2-bd-board { margin-bottom: 1.6rem; }
.v2-bd-board .v2-lb-podium { margin-bottom: 0.9rem; }

/* -- the facts under a podium step or beside a line -- */
.v2-bd-facts { display: flex; flex-direction: column; gap: 0.05rem; font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-bd-facts .is-stud { color: var(--v2-good); font-weight: 600; }

/* -- champion foal: one named horse, following the horse-image rule -- */
.v2-bd-champ { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.v2-bd-champ small { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-bd-champ small:first-child { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--v2-brass); }
.v2-bd-champ .v2-name-with-image { color: var(--v2-ink); font-size: 0.86rem; font-weight: 600; }
.v2-bd-champ .v2-name-with-image:hover .v2-name { color: var(--v2-glow); }

/* -- the links a row keeps. 2.75rem targets on touch, tighter with a mouse (below) -- */
.v2-bd-go { display: flex; flex-wrap: wrap; gap: 0 0.9rem; }
.v2-bd-go a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.72rem; color: var(--v2-brass); }
.v2-bd-go a:hover { color: var(--v2-glow); text-decoration: underline; }
.v2-bd-go a.is-bench { color: var(--v2-glow); font-weight: 600; }

/* -- inside a podium step: links sit above the stretched card link -- */
.v2-lb-step-body .v2-bd-facts { align-items: center; margin-top: 0.3rem; text-align: center; }
.v2-lb-step-body .v2-bd-champ { position: relative; z-index: 2; align-items: center; width: 100%; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--v2-line); text-align: center; }
.v2-lb-step-body .v2-bd-champ .v2-name-with-image { max-width: 100%; }
.v2-lb-step-body .v2-bd-go { position: relative; z-index: 2; justify-content: center; }

/* -- lines from 4th: pos | portrait | who | foals' record | best foal | value -- */
.v2-bd-lines { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-bd-line { display: grid; grid-template-columns: 3rem 2.75rem minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.95fr) 7.5rem; gap: 0.8rem; align-items: center; padding: 0.55rem 1rem 0.25rem; border-bottom: 1px dashed var(--v2-line); }
.v2-bd-line:last-child { border-bottom: none; }
.v2-bd-line:hover { background: rgba(199, 154, 63, 0.05); }
.v2-bd-line.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); --v2-ink-faint: var(--v2-ink-soft); }
.v2-bd-line .v2-rk-portrait { overflow: hidden; }
.v2-bd-line .v2-lb-sub .v2-status-chip { font-size: 0.66rem; padding: 0.06rem 0.45rem; }
.v2-bd-own { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-bd-stud { font-size: 0.7rem; font-weight: 600; color: var(--v2-good); }
.v2-bd-get { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.v2-bd-more { margin: 0 0 1.4rem; text-align: center; }

/* -- directory: Form Guide's, with the second label the old cards carried -- */
.v2-bd-dir a span small { display: block; font-size: 0.68rem; color: var(--v2-ink-soft); }

/* -- legends -- */
.v2-lg-greats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.8rem; }
.v2-lg-great { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-lg-great:first-child { border-color: rgba(255, 181, 69, 0.6); }
.v2-lg-great.is-mine { box-shadow: inset 0 3px 0 var(--v2-glow); }
.v2-lg-great-body { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.6rem 0.7rem 0.7rem; text-align: center; }
.v2-lg-great-name { font-size: 0.98rem; font-weight: 600; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
.v2-lg-great-name:hover { color: var(--v2-glow); }
.v2-lg-great b { font-size: 0.82rem; color: var(--v2-glow); }
.v2-lg-great small { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-lg-honours tbody td { font-size: 0.82rem; color: var(--v2-ink); }
.v2-lg-honours tbody td:last-child { white-space: nowrap; }
.v2-lg-about { font-size: 0.85rem; color: var(--v2-ink); }

/* -- ratings: ladder + side column -- */
.v2-rt-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-bottom: 1.4rem; }
.v2-rt-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; padding-top: 1.95rem; }
.v2-rt-zone { margin-bottom: 0.7rem; border: 1px solid var(--v2-line); border-left: 4px solid var(--v2-brass); border-radius: 10px; background: var(--v2-surface); overflow: hidden; }
.v2-rt-zone.is-top { border-left-color: var(--v2-glow); background: linear-gradient(90deg, rgba(255, 181, 69, 0.08), transparent 40%), var(--v2-surface); }
.v2-rt-zone.is-low { border-left-color: var(--v2-medal-bronze); }
.v2-rt-zone-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.1rem 0.6rem; padding: 0.55rem 0.9rem; border-bottom: 1px dashed var(--v2-line); }
.v2-rt-zone-h h3 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-rt-range { font-size: 0.82rem; font-weight: 600; color: var(--v2-glow); }
.v2-rt-zone-h small { margin-left: auto; font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-rt-rungs { list-style: none; margin: 0; padding: 0.3rem 0; }
.v2-rt-rung { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr) 3rem 4.25rem; gap: 0.1rem 0.6rem; align-items: center; min-height: 2rem; padding: 0.1rem 0.9rem; }
.v2-rt-rung:hover { background: rgba(199, 154, 63, 0.05); }
.v2-rt-label { font-size: 0.82rem; font-weight: 600; color: var(--v2-ink); }
.v2-rt-track { display: block; height: 0.75rem; border-bottom: 1px solid var(--v2-line); }
.v2-rt-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--v2-brass); }
.v2-rt-n { font-size: 0.82rem; text-align: right; color: var(--v2-ink); }
.v2-rt-yours { justify-self: start; display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0 0.4rem; border: 1px solid rgba(255, 181, 69, 0.55); border-radius: 100px; font-size: 0.66rem; font-weight: 600; color: var(--v2-glow); white-space: nowrap; }
.v2-rt-yours:hover { background: rgba(255, 181, 69, 0.12); }
/* The starting mark dwarfs everything else: its bar is hatched and torn so it can't be read on the shared scale. */
.v2-rt-rung.is-mark .v2-rt-track i { border-radius: 0; background: repeating-linear-gradient(135deg, var(--v2-brass) 0 0.35rem, rgba(199, 154, 63, 0.45) 0.35rem 0.6rem); clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%); }
.v2-rt-rung.is-mark .v2-rt-n { font-weight: 700; color: var(--v2-ink-bright); }
.v2-rt-note { grid-column: 2 / -1; padding-bottom: 0.25rem; font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-rt-how { border: 1px solid var(--v2-line); border-radius: 10px; padding: 0.7rem 0.9rem; background: var(--v2-surface); }
.v2-rt-how h2 { margin: 0 0 0.35rem; font-size: 0.95rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-rt-how ul { margin: 0; padding-left: 1.05rem; font-size: 0.8rem; color: var(--v2-ink); }
.v2-rt-how li + li { margin-top: 0.3rem; }
.v2-rt-more { margin: 0; padding: 0.5rem 0.9rem; color: var(--v2-ink-soft); }
.v2-rt-shelves { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.v2-rt-classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.9rem; }

/* Tighter row links with a mouse, as the Typography pass does for switches. */
@media (min-width: 901px) and (pointer: fine) {
  .v2-bd-go a { min-height: 1.75rem; }
}
@media (max-width: 900px) {
  .v2-bd-line { grid-template-columns: 2.5rem 2.5rem minmax(0, 1fr) 7rem; grid-template-areas: "pos por who val" "pos por get get" "pos por champ champ"; gap: 0.35rem 0.6rem; padding-bottom: 0.5rem; }
  .v2-bd-line > .v2-lb-pos { grid-area: pos; align-self: start; }
  .v2-bd-line > .v2-rk-portrait { grid-area: por; align-self: start; }
  .v2-bd-line > .v2-lb-who { grid-area: who; }
  .v2-bd-line > .v2-lb-val { grid-area: val; align-self: start; }
  .v2-bd-line > .v2-bd-get { grid-area: get; }
  .v2-bd-line > .v2-bd-champ { grid-area: champ; }
  .v2-rt-layout { grid-template-columns: minmax(0, 1fr); }
  .v2-rt-side { padding-top: 0; }
}
@media (max-width: 640px) {
  .v2-bd-page .v2-rec-chips a { min-height: 2.75rem; }
  /* These labels carry the meaning, so they wrap instead of taking the shipped phone ellipsis. */
  .v2-rt-facts .v2-yard-rank small, .v2-lg-banner .v2-yard-rank small { white-space: normal; overflow: visible; text-overflow: clip; }
  .v2-bd-line { grid-template-columns: 2rem 2.375rem minmax(0, 1fr) auto; grid-template-areas: "pos por who who" "pos por val val" "get get get get" "champ champ champ champ"; padding: 0.6rem 0.7rem; }
  .v2-bd-line > .v2-lb-val { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 0.5rem; text-align: left; }
  .v2-bd-line > .v2-rk-portrait { width: 2.375rem; height: 2.375rem; }
  .v2-bd-line .v2-lb-name { white-space: normal; }
  .v2-lb-step-body .v2-bd-facts { align-items: flex-start; text-align: left; }
  .v2-lb-step-body .v2-bd-champ { align-items: flex-start; text-align: left; }
  .v2-lb-step-body .v2-bd-go { justify-content: flex-start; }
  .v2-lg-greats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-rt-rung { grid-template-columns: 3.2rem minmax(0, 1fr) 2.6rem 3.6rem; gap: 0.1rem 0.4rem; min-height: 2.75rem; padding: 0.1rem 0.7rem; }
  /* The chip stays small; its target grows to 44px. */
  .v2-rt-yours { position: relative; }
  .v2-rt-yours::after { content: ""; position: absolute; inset: -0.65rem 0; }
  .v2-rt-note { grid-column: 1 / -1; }
  .v2-rt-zone-h small { margin-left: 0; flex-basis: 100%; }
}
/* ===== end Breeders & ratings (round 4) ===== */

/* ===== Cashier's Window (round 4) ===== */
/* The owner's money pages: views/v2-account-deposit, -deposit-result, -withdrawal, -transactions,
   -subscription, -cards, -billing-details, -bonus-progress + views/components/v2-money-kit.pug
   (SPEC-money.md). Every rule for them lives between this banner and the end banner.
   Reused unchanged: .v2-yard-top/-hello/-stable, .v2-of-back/-links/-pass and -cap families/-bar/-renew/-flag/
   -eyebrow/-none, .v2-rk-ic, .v2-section-label, .v2-rc-h, .v2-btn(-primary/-danger), .v2-form-row/
   -label/-input/-hint, .v2-subtabs, .v2-table(-wrap), .v2-pager, .v2-empty, .v2-sr-only.
   Status colours keep their meaning: --v2-good done/fine, --v2-glow needs attention,
   --v2-signal-bright problem or money leaving. Every one also carries an icon or words. */

/* .v2-btn sets display:inline-block, which beats the UA [hidden] rule. */
.v2-cw-root [hidden] { display: none !important; }
.v2-cw-root .v2-btn { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.v2-cw-root a:not(.v2-btn):not(.v2-of-back) { text-underline-offset: 2px; }
.v2-cw-root .v2-form-input { max-width: none; min-height: 2.75rem; }
.v2-cw-root .v2-form-label { font-size: 0.72rem; letter-spacing: 0; text-transform: none; color: var(--v2-ink-soft); }
.v2-cw-root .v2-form-hint { font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-cw-root .v2-form-row { margin-bottom: 0.8rem; min-width: 0; }
.v2-cw-root .v2-of-eyebrow { color: var(--v2-ink-soft); }
.v2-cw-root .v2-of-none { color: var(--v2-ink-soft); font-size: 0.85rem; }

/* ---- the till: balances + the seven money pages ---- */
.v2-cw-till { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem 1.6rem; align-items: center; margin-bottom: 1.1rem; padding: 0.9rem 1.1rem; background: linear-gradient(180deg, var(--v2-surface-2), var(--v2-surface)); border: 1px solid rgba(199,154,63,0.55); border-radius: 10px; }
.v2-cw-purse { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.8rem; }
.v2-cw-purse dt { font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-cw-purse dd { margin: 0; }
.v2-cw-cash { font-weight: 700; font-size: 1.75rem; line-height: 1.1; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-cw-bonus { font-weight: 700; font-size: 1.15rem; line-height: 1.3; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cw-fine { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-cw-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; min-width: 0; }
.v2-cw-nav a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; padding: 0 0.65rem; border: 1px solid var(--v2-line); border-radius: 6px; font-size: 0.78rem; color: var(--v2-ink); }
.v2-cw-nav a .v2-rk-ic { width: 1rem; height: 1rem; color: var(--v2-brass); flex: 0 0 auto; }
.v2-cw-nav a:hover { border-color: var(--v2-brass); color: var(--v2-glow); }
.v2-cw-nav a.on { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }
.v2-cw-nav a.on .v2-rk-ic { color: var(--v2-ink-dark); }

/* ---- cards and the two-column desk ---- */
.v2-cw-desk { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.v2-cw-card, .v2-cw-slip { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.v2-cw-root > .v2-cw-card { margin-bottom: 1rem; }
.v2-cw-slip { background: var(--v2-bg); border-color: rgba(199,154,63,0.55); border-style: dashed; }
.v2-cw-h { margin: 0; font-weight: 700; font-size: 0.95rem; color: var(--v2-ink); }
.v2-cw-sub { margin: 0.2rem 0 -0.3rem; font-weight: 700; font-size: 0.8rem; color: var(--v2-ink); }
.v2-cw-note { margin: 0; font-size: 0.78rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-cw-lede { margin: 0 0 0.4rem; font-size: 0.88rem; color: var(--v2-ink-soft); }
.v2-cw-lede a, .v2-cw-then a, .v2-cw-facts a, .v2-cw-warn a, .v2-cw-more a, .v2-cw-closed-p a { color: var(--v2-glow); text-decoration: underline; }
.v2-cw-go { width: 100%; }
.v2-cw-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.8rem; }
.v2-cw-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 0.8rem; }
.v2-cw-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.v2-cw-set legend { float: left; width: 100%; padding: 0; margin-bottom: 0.45rem; font-weight: 700; font-size: 0.8rem; color: var(--v2-ink); }
.v2-cw-set legend + * { clear: both; }
.v2-cw-set + .v2-cw-set { border-top: 1px dashed var(--v2-line); padding-top: 0.8rem; }
.v2-cw-acts { margin: 0.8rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.v2-cw-also { margin-bottom: 1rem; }

/* ---- result + status messages ---- */
.v2-cw-msg { margin: 0 0 1rem; padding: 0.6rem 0.85rem; border: 1px solid var(--v2-line); border-left-width: 3px; border-radius: 6px; font-size: 0.85rem; background: var(--v2-surface); color: var(--v2-ink); }
.v2-cw-msg::before { font-weight: 700; margin-right: 0.4rem; }
.v2-cw-msg.is-ok { border-left-color: var(--v2-good); }
.v2-cw-msg.is-ok::before { content: "✓"; color: var(--v2-good); }
.v2-cw-msg.is-err { border-left-color: var(--v2-signal); }
.v2-cw-msg.is-err::before { content: "!"; color: var(--v2-signal-bright); }
.v2-cw-card .v2-cw-msg, .v2-cw-slip .v2-cw-msg { margin: 0; }
.v2-cw-state { margin: 0; display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; line-height: 1.45; color: var(--v2-ink); }
.v2-cw-state .v2-rk-ic { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; }
.v2-cw-state.is-ok .v2-rk-ic, .v2-cw-state.is-ok b { color: var(--v2-good); }
.v2-cw-state.is-warn .v2-rk-ic, .v2-cw-state.is-warn b { color: var(--v2-glow); }
.v2-cw-state.is-alert .v2-rk-ic, .v2-cw-state.is-alert b { color: var(--v2-signal-bright); }
.v2-cw-inline { margin: -0.3rem 0 0; font-size: 0.8rem; color: var(--v2-signal-bright); }
.v2-cw-inline:empty { display: none; }

/* ---- the closed sign (Stripe not configured) and the plain result panel ---- */
.v2-cw-closed, .v2-cw-result { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; padding: 1.2rem 1.3rem; background: var(--v2-surface); border: 1px solid rgba(199,154,63,0.55); border-radius: 10px; }
.v2-cw-closed-ic { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--v2-brass); color: var(--v2-brass); background: var(--v2-bg); }
.v2-cw-closed-ic .v2-rk-ic { width: 1.4rem; height: 1.4rem; }
.v2-cw-closed-h { margin: 0 0 0.3rem; font-weight: 700; font-size: 1.1rem; color: var(--v2-ink-bright); }
.v2-cw-closed-p { margin: 0 0 0.9rem; font-size: 0.9rem; line-height: 1.45; color: var(--v2-ink); max-width: 38rem; }
.v2-cw-facts { list-style: none; margin: 1rem 0 0; padding: 0.8rem 0 0; border-top: 1px dashed var(--v2-line); display: flex; flex-direction: column; gap: 0.45rem; }
.v2-cw-facts li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-cw-facts b { color: var(--v2-ink); }
.v2-cw-facts .v2-rk-ic { flex: 0 0 auto; width: 1rem; height: 1rem; color: var(--v2-good); margin-top: 0.1rem; }

/* ---- deposit ---- */
.v2-cw-tiles { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.v2-cw-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-height: 4rem; padding: 0.5rem 0.3rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-bg); cursor: pointer; text-align: center; }
.v2-cw-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-cw-tile b { font-size: 1.05rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cw-tile small { font-size: 0.7rem; color: var(--v2-ink-soft); }
.v2-cw-tile:hover { border-color: var(--v2-brass); }
.v2-cw-tile:has(input:checked) { border: 2px solid var(--v2-brass); background: rgba(199,154,63,0.12); }
.v2-cw-tile:has(input:checked)::after { content: "✓"; position: absolute; top: 0.25rem; right: 0.35rem; color: var(--v2-brass); font-size: 0.75rem; font-weight: 700; }
.v2-cw-tile:has(input:focus-visible) { outline: 2px solid var(--v2-glow); outline-offset: 2px; }
.v2-cw-offers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.v2-cw-offers li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.82rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-cw-offers .v2-rk-ic { flex: 0 0 auto; color: var(--v2-brass); }
.v2-cw-offers b { display: block; color: var(--v2-ink); }
.v2-cw-tiers, .v2-cw-rules { border-collapse: collapse; font-size: 0.8rem; width: 100%; }
.v2-cw-tiers { margin-top: 0.4rem; }
.v2-cw-tiers th, .v2-cw-rules thead th { text-align: left; font-weight: 400; font-size: 0.72rem; color: var(--v2-ink-soft); padding: 0.25rem 0.6rem 0.25rem 0; }
.v2-cw-tiers td, .v2-cw-rules td, .v2-cw-rules tbody th { text-align: left; padding: 0.3rem 0.6rem 0.3rem 0; border-top: 1px dashed var(--v2-line); color: var(--v2-ink); font-weight: 400; font-variant-numeric: tabular-nums; }

/* ---- receipt lines (deposit, withdrawal) ---- */
.v2-cw-lines { margin: 0; display: flex; flex-direction: column; }
.v2-cw-lines > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.42rem 0; border-top: 1px dashed var(--v2-line); }
.v2-cw-lines > div:first-child { border-top: 0; }
.v2-cw-lines dt { font-size: 0.85rem; color: var(--v2-ink); }
.v2-cw-lines dd { margin: 0; font-weight: 700; font-size: 1rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-cw-lines .is-minor dt, .v2-cw-lines .is-minor dd { font-weight: 400; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-cw-lines > .is-total { border-top: 2px solid var(--v2-brass); padding: 0.55rem 0; }
.v2-cw-lines .is-total dt { font-weight: 700; }
.v2-cw-lines .is-total dd { font-size: 1.35rem; color: var(--v2-ink-bright); }
.v2-cw-then { list-style: disc; margin: 0; padding-left: 1.05rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-cw-address { margin: -0.4rem 0 0; display: flex; flex-direction: column; font-style: normal; font-size: 0.82rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-cw-address a { margin-top: 0.15rem; font-size: 0.75rem; color: var(--v2-glow); text-decoration: underline; }

/* ---- withdrawal: pending and more ---- */
.v2-cw-pending { list-style: none; margin: 0; padding: 0; }
.v2-cw-pending li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.4rem 1rem; align-items: center; padding: 0.6rem 0; border-top: 1px dashed var(--v2-line); }
.v2-cw-pending li:first-child { border-top: 0; padding-top: 0; }
.v2-cw-big { font-weight: 700; font-size: 1.15rem; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-cw-meta { font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-cw-more { margin-bottom: 1rem; padding: 0.3rem 1.1rem; border: 1px solid var(--v2-line); border-radius: 10px; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-cw-more summary { display: flex; align-items: center; min-height: 2.75rem; cursor: pointer; color: var(--v2-ink); }
.v2-cw-more summary::before { content: "▸"; margin-right: 0.5rem; color: var(--v2-brass); }
.v2-cw-more[open] summary::before { content: "▾"; }
.v2-cw-more p { margin: 0 0 0.8rem; line-height: 1.45; }

/* ---- transactions ---- */
.v2-cw-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; margin-bottom: 0.8rem; }
.v2-cw-filter .v2-form-label { margin: 0; }
.v2-cw-filter .v2-form-input { width: auto; flex: 0 1 20rem; min-width: 0; }
.v2-cw-clear { font-size: 0.8rem; color: var(--v2-glow); text-decoration: underline; }
.v2-cw-count { margin: 0 0 0 auto; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-cw-ledger-card { padding: 0; overflow: hidden; }
.v2-cw-ledger { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.v2-cw-ledger thead th { padding: 0.6rem 1.1rem; text-align: left; font-weight: 400; font-size: 0.72rem; color: var(--v2-ink-soft); border-bottom: 1px solid var(--v2-line); }
.v2-cw-ledger td { padding: 0.5rem 1.1rem; vertical-align: top; border-top: 1px dashed var(--v2-line); color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cw-ledger .is-num { text-align: right; white-space: nowrap; }
.v2-cw-day th { padding: 0.45rem 1.1rem; text-align: left; font-weight: 700; font-size: 0.78rem; color: var(--v2-ink); background: var(--v2-surface-2); }
.v2-cw-entry { min-width: 0; overflow-wrap: anywhere; }
.v2-cw-entry b { display: block; font-weight: 400; color: var(--v2-ink); }
.v2-cw-entry small, .v2-cw-sm { display: block; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-cw-amt { font-weight: 700; color: var(--v2-ink); }
.v2-cw-amt.is-in { color: var(--v2-good); }
.v2-cw-amt.is-out { color: var(--v2-signal-bright); }
.v2-cw-amt.is-nil { font-weight: 400; color: var(--v2-ink-soft); }
.v2-cw-bchip { display: block; font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-cw-root .v2-yo-fine { color: var(--v2-ink-soft); font-size: 0.72rem; }

/* ---- membership ---- */
.v2-cw-member { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 1.2rem; }
.v2-cw-root .v2-of-pass::after { display: none; } /* the hub's ornament crosses the price here */
.v2-cw-root .v2-of-pass .v2-of-eyebrow { color: var(--v2-ink); }
.v2-cw-root .v2-of-renew, .v2-cw-root .v2-of-pass-price { font-size: 0.74rem; }
.v2-cw-levels { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-cw-level { display: grid; grid-template-columns: minmax(8rem, 1.1fr) 4.5rem 6rem minmax(0, 2.4fr) 9.5rem; gap: 0.5rem 1rem; align-items: center; padding: 0.65rem 1.1rem; border-top: 1px dashed var(--v2-line); }
.v2-cw-level:first-child { border-top: 0; }
.v2-cw-level.is-current { background: rgba(199,154,63,0.1); box-shadow: inset 3px 0 0 var(--v2-brass); }
.v2-cw-lv-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.v2-cw-lv-name b { font-size: 0.98rem; color: var(--v2-ink-bright); }
.v2-cw-lv-cap b, .v2-cw-lv-price b { display: block; font-size: 0.98rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cw-lv-cap small, .v2-cw-lv-price small { font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-cw-lv-today { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.82rem; line-height: 1.4; color: var(--v2-ink); min-width: 0; }
.v2-cw-warn { display: flex; align-items: flex-start; gap: 0.3rem; font-size: 0.76rem; color: var(--v2-glow); }
.v2-cw-warn .v2-rk-ic { flex: 0 0 auto; width: 0.95rem; height: 0.95rem; }
.v2-cw-lv-acts { display: flex; flex-direction: column; gap: 0.3rem; align-items: stretch; }
.v2-cw-stop { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.5rem; }
.v2-cw-stop > div { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }

/* ---- cards ---- */
.v2-cw-plastics { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.v2-cw-plastic { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; padding: 0.7rem 0.85rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); font-size: 0.88rem; color: var(--v2-ink); }
.v2-cw-plastic .v2-rk-ic { color: var(--v2-brass); }
.v2-cw-pan { font-variant-numeric: tabular-nums; }
.v2-cw-plastic .v2-cw-meta { margin-left: auto; }
.v2-cw-stripe { padding: 0.8rem; border-radius: 6px; background: var(--v2-paper, #efe3c4); }

/* ---- bonus progress ---- */
.v2-cw-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.v2-cw-ladders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.v2-cw-ladders li { display: flex; flex-direction: column; gap: 0.3rem; }
.v2-cw-lad-top, .v2-cw-lad-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.1rem 0.8rem; font-size: 0.82rem; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-cw-lad-bot { font-size: 0.76rem; color: var(--v2-ink-soft); }
.v2-cw-lad-bot b { color: var(--v2-ink); }
.v2-cw-ladders .v2-of-bar { display: block; }
.v2-cw-ladders .is-max .v2-of-bar i { background: var(--v2-good); }
.v2-cw-ladders .is-max .v2-cw-lad-bot { color: var(--v2-good); }

/* ---- responsive ---- */
@media (min-width: 901px) and (pointer: fine) {
  .v2-cw-root .v2-btn, .v2-cw-root .v2-form-input, .v2-cw-nav a, .v2-cw-more summary { min-height: 2.25rem; }
}
@media (max-width: 900px) {
  .v2-cw-till { grid-template-columns: minmax(0, 1fr); }
  .v2-cw-nav { justify-content: flex-start; }
  .v2-cw-desk, .v2-cw-member { grid-template-columns: minmax(0, 1fr); }
  .v2-cw-level { grid-template-columns: minmax(0, 1fr) 4rem 5.5rem; }
  .v2-cw-lv-today, .v2-cw-lv-acts { grid-column: 1 / -1; }
  .v2-cw-lv-acts { flex-direction: row; flex-wrap: wrap; }
  .v2-cw-lv-acts .v2-btn { flex: 1 1 8rem; }
}
@media (max-width: 640px) {
  .v2-cw-till { padding: 0.8rem 0.9rem; }
    .v2-cw-nav a { flex: 1 1 auto; justify-content: center; font-size: 0.75rem; padding: 0 0.5rem; }
  .v2-cw-card, .v2-cw-slip { padding: 0.9rem 0.9rem 1rem; }
  .v2-cw-ledger-card { padding: 0; }
  .v2-cw-closed, .v2-cw-result { grid-template-columns: minmax(0, 1fr); padding: 1rem 0.9rem; gap: 0.7rem; }
  .v2-cw-closed .v2-btn, .v2-cw-result .v2-btn { width: 100%; }
  .v2-cw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-cw-row2 { grid-template-columns: minmax(0, 1fr); }
  /* Year needs four digits, including at Larger text. */
  .v2-cw-row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 0 0.5rem; }
  .v2-cw-row3 .v2-form-input { padding-left: 0.5rem; padding-right: 0.25rem; }
  .v2-cw-pair { grid-template-columns: minmax(0, 1fr); }
  .v2-cw-pending li { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-cw-pending .v2-cw-meta { grid-column: 1 / -1; grid-row: 2; }
  .v2-cw-pending .v2-btn { grid-column: 1 / -1; }
  .v2-cw-count { margin-left: 0; width: 100%; }
  .v2-cw-filter .v2-form-input { flex: 1 1 12rem; }
  /* ledger table becomes stacked rows; the table stays a table for screen readers */
  .v2-cw-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .v2-cw-ledger tr:not(.v2-cw-day) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.8rem; padding: 0.55rem 0.9rem; border-top: 1px dashed var(--v2-line); }
  .v2-cw-ledger td { display: block; padding: 0; border: 0; }
  .v2-cw-ledger .v2-cw-entry { grid-column: 1 / -1; }
  .v2-cw-ledger td[data-label]::before { content: attr(data-label); display: block; font-size: 0.68rem; font-weight: 400; color: var(--v2-ink-soft); }
  .v2-cw-ledger td.is-num { text-align: left; white-space: normal; }
  .v2-cw-ledger td.is-num:last-child { text-align: right; }
  .v2-cw-day th { padding: 0.4rem 0.9rem; }
  .v2-cw-ledger .v2-cw-day { display: table-row; }
  .v2-cw-level { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-cw-lv-name { grid-column: 1 / -1; }
  .v2-cw-stop .v2-btn { width: 100%; }
  .v2-cw-plastic .v2-cw-meta { margin-left: 0; }
}
/* ===== end Cashier's Window (round 4) ===== */

/* ===== About and legal (round 5) ===== */
/* v2-about.pug, v2-tos.pug, v2-privacy.pug. See SPEC-about-legal.md.
   Reused unchanged: .v2-rc-mast/-post/-post-k/-title-col/-title, .v2-mr-switch, .v2-rk-ic.
   Every new rule is .v2-lg-*. Never touches .v2-horse-row / .v2-ranked-row. */
.v2-lg-root { max-width: 59rem; margin: 0 auto; }
.v2-lg-mast { align-items: center; }
.v2-lg-post { align-self: stretch; gap: 0.25rem; min-width: 5.5rem; }
.v2-lg-post .v2-rk-ic { width: 1.5rem; height: 1.5rem; }
.v2-lg-switch { margin-right: 0.9rem; }
.v2-lg-cols { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.v2-lg-rail { position: sticky; top: 4rem; max-height: calc(100vh - 5rem); overflow-y: auto; padding-right: 0.3rem; }
.v2-lg-toc-group { margin: 0.9rem 0 0.25rem; font-size: 0.72rem; font-weight: 600; color: var(--v2-brass); line-height: 1.3; }
.v2-lg-toc-group:first-child { margin-top: 0; }
.v2-lg-rail ul, .v2-lg-toc-m ul { list-style: none; margin: 0; padding: 0; }
.v2-lg-rail li a, .v2-lg-toc-m li a { display: flex; gap: 0.4rem; padding: 0.22rem 0.35rem; border-radius: 4px; font-size: 0.78rem; line-height: 1.3; color: var(--v2-ink-soft); text-decoration: none; }
.v2-lg-rail li a:hover, .v2-lg-toc-m li a:hover { color: var(--v2-ink-bright); background: var(--v2-surface-2); }
.v2-lg-rail li b, .v2-lg-toc-m li b { flex: 0 0 2.1rem; font-weight: 600; color: var(--v2-brass); }
.v2-lg-toc-m { display: none; }
.v2-lg-contact .v2-lg-h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.v2-lg-contact ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.6; color: var(--v2-ink-soft); }
.v2-lg-contact a { color: var(--v2-glow); text-decoration: underline; overflow-wrap: anywhere; }
.v2-lg-sheet { min-width: 0; max-width: 42rem; padding: 1.6rem 2rem 1.8rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; color: var(--v2-ink); }
.v2-lg-part + .v2-lg-part { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--v2-line); }
.v2-lg-h2 { margin: 0 0 0.9rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.35rem; line-height: 1.25; color: var(--v2-ink-bright); }
.v2-lg-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.55rem; margin: 1.5rem -0.6rem 0.35rem calc(-0.6rem - 3px); padding: 0.15rem 0.6rem; border-left: 3px solid transparent; border-radius: 0 4px 4px 0; scroll-margin-top: 4.5rem; font-family: var(--v2-font-sans); font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--v2-ink-bright); }
.v2-lg-h:target { border-left-color: var(--v2-brass); background: var(--v2-surface-2); }
.v2-app a.v2-lg-num { flex: none; font-size: 0.8rem; font-weight: 700; color: var(--v2-brass); text-decoration: none; }
.v2-app a.v2-lg-num:hover { color: var(--v2-glow); text-decoration: underline; }
.v2-lg-sheet p, .v2-lg-sheet li { font-size: 0.95rem; line-height: 1.65; color: var(--v2-ink); }
.v2-lg-sheet p { margin: 0 0 0.8rem; }
.v2-lg-sheet ul:not(.v2-lg-ledger) { margin: 0.3rem 0 0.9rem; padding-left: 1.2rem; }
.v2-lg-sheet a:not(.v2-lg-num):not(.v2-lg-back) { color: var(--v2-glow); text-decoration: underline; }
.v2-lg-ledger { list-style: none; margin: 1.1rem 0 0; padding: 0; border-top: 1px solid var(--v2-line); }
.v2-lg-ledger li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--v2-line); }
.v2-lg-ledger b { font-size: 0.85rem; font-weight: 700; line-height: 1.8; color: var(--v2-brass); }
.v2-lg-back { display: none; }
@media (max-width: 900px) {
  .v2-lg-switch { grid-column: 1 / -1; width: auto; margin: 0 0.6rem 0.6rem; }
  .v2-lg-switch a { flex: 1 1 0; justify-content: center; }
  .v2-lg-cols { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .v2-lg-rail { display: none; }
  .v2-lg-contact { padding: 0 0.2rem; }
  .v2-lg-toc-m { display: block; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; scroll-margin-top: 4.5rem; }
  .v2-lg-toc-m > summary { min-height: 2.75rem; display: flex; align-items: center; padding: 0 0.9rem; font-size: 0.9rem; font-weight: 600; color: var(--v2-ink-bright); cursor: pointer; }
  .v2-lg-toc-m > nav { padding: 0 0.9rem 0.8rem; }
  .v2-lg-toc-m li a { min-height: 2.75rem; align-items: center; font-size: 0.875rem; }
  .v2-lg-sheet { max-width: none; }
  .v2-app a.v2-lg-back { display: inline-flex; align-items: center; position: sticky; bottom: 0.75rem; float: right; min-height: 2.75rem; padding: 0 1rem; margin-top: 0.75rem; background: var(--v2-surface-2); border: 1px solid var(--v2-brass); border-radius: 100px; font-size: 0.85rem; color: var(--v2-ink-bright); text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.45); }
}
@media (max-width: 640px) {
  .v2-lg-sheet { padding: 1.1rem 1rem 1.3rem; }
  .v2-lg-h { margin-left: calc(-0.4rem - 3px); margin-right: -0.4rem; padding-left: 0.4rem; padding-right: 0.4rem; }
  .v2-lg-ledger li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .v2-lg-ledger b { line-height: 1.4; }
}
/* ===== end About and legal (round 5) ===== */
/* ===== Market services (round 5) ===== */
.v2-sv-root .v2-ring-legend, .v2-sv-root .v2-mkt-chip, .v2-sv-root .v2-ring-dl dt.total, .v2-sv-root .v2-bl-pick label { letter-spacing: 0.07em; color: var(--v2-ink-soft); }
.v2-sv-root .v2-bl-cert dt { letter-spacing: 0.07em; color: var(--v2-paper-ink-soft); }
.v2-sv-root .v2-mkt-chip.is-due { color: var(--v2-glow); }
.v2-sv-root .v2-ring-wallet, .v2-sv-root .v2-rc-purse-k, .v2-sv-root .v2-mkt-bill-note, .v2-sv-root .v2-yard-tag { color: var(--v2-ink-soft); }
.v2-sv-root .v2-bl-seal { font-size: 0.66rem; letter-spacing: 0; }
.v2-sv-root [hidden] { display: none !important; }
.v2-sv-fee-u { font-size: 0.66rem; margin-top: 0.2rem; text-align: center; }
.v2-sv-gap { margin-top: 1.1rem; }
.v2-sv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 0.7rem; }
.v2-sv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v2-line); border-radius: 10px; overflow: hidden; background: var(--v2-surface); }
.v2-sv-horse { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-top: 1px dashed var(--v2-line); }
.v2-sv-horse:first-child { border-top: 0; }
.v2-sv-horse[hidden] { display: none; }
.v2-sv-horse:has(input:checked) { background: rgba(199,154,63,0.12); box-shadow: inset 3px 0 0 var(--v2-brass); }
.v2-sv-pick { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto; grid-template-areas: "c n p" "c s p"; gap: 0.05rem 0.7rem; align-items: center; padding: 0.5rem 0.8rem; min-width: 0; cursor: pointer; }
.v2-sv-pick > input { grid-area: c; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--v2-brass); }
.v2-sv-pick > .v2-name-with-image { grid-area: n; min-width: 0; }
.v2-sv-pick > .v2-sv-sub { grid-area: s; }
.v2-sv-pick > .v2-sv-cost { grid-area: p; }
.v2-sv-sub { font-size: 0.72rem; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-sv-flag { height: 0.9rem; width: auto; margin-left: 0.35rem; vertical-align: -0.1rem; }
.v2-sv-cost { font-size: 0.85rem; font-weight: 700; color: var(--v2-ink-bright); font-variant-numeric: tabular-nums; }
.v2-app a.v2-sv-go { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.8rem; font-size: 0.72rem; color: var(--v2-brass); white-space: nowrap; }
.v2-app a.v2-sv-go:hover { color: var(--v2-glow); }
.v2-sv-picked { list-style: none; margin: 0.3rem 0 0; padding: 0; font-size: 0.76rem; color: var(--v2-ink); }
.v2-sv-picked li { overflow-wrap: anywhere; }
.v2-br-cards.v2-sv-asks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-sv-portrait { display: flex; align-items: center; gap: 0.7rem; }
.v2-sv-portrait img { width: 3.75rem; height: 4.75rem; object-fit: cover; border-radius: 6px; }
.v2-sv-portrait > div { min-width: 0; }
.v2-sv-note { margin-bottom: 1rem; padding: 0.9rem 1.1rem; background: var(--v2-paper); color: var(--v2-paper-ink); border: 4px double rgba(122,90,30,0.55); border-radius: 4px; }
.v2-sv-note h3 { margin: 0 0 0.3rem; font-size: 0.95rem; font-weight: 700; }
.v2-sv-note p { margin: 0; font-size: 0.92rem; }
.v2-app .v2-sv-note-f { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; margin-top: 0.5rem; font-size: 0.76rem; color: var(--v2-paper-ink-soft); }
.v2-app .v2-sv-note-f a { color: var(--v2-paper-ink); text-decoration: underline; }
.v2-sv-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 900px) {
  .v2-app a.v2-sv-go { min-height: 2.75rem; }
  .v2-sv-pick { min-height: 2.75rem; }
  /* The shipped .v2-ring-bar only appears at 640px; a long horse list needs it on tablets too. */
  .v2-sv-root .v2-ring-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; position: sticky; bottom: 0.5rem; z-index: 20; margin-top: 1rem; padding: 0.6rem 0.8rem; background: rgba(11,26,18,0.96); border: 1px solid var(--v2-brass); border-radius: 10px; }
  .v2-sv-root .v2-ring-bar b { display: block; font-size: 1.3rem; color: var(--v2-glow); line-height: 1; font-variant-numeric: tabular-nums; }
  .v2-sv-root .v2-ring-bar small { font-size: 0.66rem; color: var(--v2-ink-soft); }
  .v2-sv-root .v2-ring-bar .v2-btn { min-height: 2.75rem; }
}
@media (max-width: 640px) {
  .v2-br-cards.v2-sv-asks { grid-template-columns: 1fr; }
  .v2-sv-tools .v2-mkt-seg { width: 100%; }
  .v2-sv-tools .v2-select { width: 100%; }
  .v2-app a.v2-sv-go { padding: 0 0.7rem 0 0; }
  .v2-sv-pick { padding-right: 0.5rem; gap: 0.05rem 0.55rem; }
}
/* ===== end Market services (round 5) ===== */

/* ---- breeding shed (v2-breeding-breed.pug) ---- */
.v2-bs-picked { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.2rem; }
.v2-bs-picked-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.v2-bs-picked-art { height: 5rem; width: auto; flex: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6)); }
.v2-bs-picked-main { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.v2-bs-picked .v2-bk-row { justify-content: flex-start; flex-wrap: wrap; gap: 0.7rem; }
.v2-bs-stats { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); background: var(--v2-surface); }
.v2-bs-stats > div { outline: 1px solid var(--v2-line); }
.v2-bs-progeny summary { cursor: pointer; font-family: var(--v2-font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-brass); }
.v2-bs-progeny .v2-table-wrap { margin-top: 0.7rem; }
.v2-bs-foal { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.2rem; border-color: var(--v2-brass); }
.v2-bs-foal > div { flex: 1 1 16rem; min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.v2-bs-cost { margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.v2-bs-cost > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.8rem; }
.v2-bs-cost dt { color: var(--v2-ink-soft); }
.v2-bs-cost dd { margin: 0; color: var(--v2-ink); font-family: var(--v2-font-hud); font-variant-numeric: tabular-nums; }
.v2-bs-cost .is-total { padding-top: 0.25rem; border-top: 1px dashed var(--v2-line); font-weight: 700; }
.v2-bs-cost .is-total dt, .v2-bs-cost .is-total dd { color: var(--v2-glow); }
.v2-bs-stars { margin-bottom: 0.7rem; }
.v2-bs-stars dt { color: var(--v2-brass); }
.v2-bs-final { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.v2-bs-final .v2-panel { margin-bottom: 0; }
.v2-bs-form { display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start; }
.v2-bs-form .v2-bk-field { width: 100%; }
.v2-bs-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: var(--v2-ink); }
.v2-bs-check input { margin-top: 0.2rem; }
.v2-bs-basics { margin-top: 1rem; }
.v2-bs-basics summary { cursor: pointer; font-family: var(--v2-font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v2-brass); }
.v2-bs-basics p { margin: 0.6rem 0 0; }

/* ---- prospective foal pedigree (breed page) ---- */
.v2-bs-fp { --fp-cgap: 1.25rem; --fp-rgap: 0.3rem; }
.v2-bs-fp-shared { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.v2-bs-fp-shared li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-bs-fp-shared b { color: var(--v2-glow); font-weight: 700; }
.v2-bs-fp-clear { margin: 0 0 0.9rem; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-bs-fp-tree { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 0.85fr) repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: var(--fp-rgap) var(--fp-cgap); }
.v2-bs-fp-node { position: relative; display: flex; align-items: center; min-width: 0; }
.v2-bs-fp-node > .v2-bk-ped-card { flex: 1 1 auto; position: relative; }
.v2-bs-fp-node.is-foal { grid-column: 1; grid-row: 1 / 9; }
.v2-bs-fp-node.is-s { grid-column: 2; grid-row: 1 / 5; }
.v2-bs-fp-node.is-d { grid-column: 2; grid-row: 5 / 9; }
.v2-bs-fp-node.is-ss { grid-column: 3; grid-row: 1 / 3; }
.v2-bs-fp-node.is-sd { grid-column: 3; grid-row: 3 / 5; }
.v2-bs-fp-node.is-ds { grid-column: 3; grid-row: 5 / 7; }
.v2-bs-fp-node.is-dd { grid-column: 3; grid-row: 7 / 9; }
.v2-bs-fp-node.is-sss { grid-column: 4; grid-row: 1; }
.v2-bs-fp-node.is-ssd { grid-column: 4; grid-row: 2; }
.v2-bs-fp-node.is-sds { grid-column: 4; grid-row: 3; }
.v2-bs-fp-node.is-sdd { grid-column: 4; grid-row: 4; }
.v2-bs-fp-node.is-dss { grid-column: 4; grid-row: 5; }
.v2-bs-fp-node.is-dsd { grid-column: 4; grid-row: 6; }
.v2-bs-fp-node.is-dds { grid-column: 4; grid-row: 7; }
.v2-bs-fp-node.is-ddd { grid-column: 4; grid-row: 8; }
/* Brass bracket connectors (same idea as .v2-bk-ped-grid > .is-s::after): a stub out of the
   parent's card, then a "[" whose arms land on its two children's centres. */
.v2-bs-fp-node.is-g0::before, .v2-bs-fp-node.is-g1::before, .v2-bs-fp-node.is-g2::before { content: ""; position: absolute; top: 50%; left: 100%; width: calc(var(--fp-cgap) / 2); border-top: 1px solid var(--v2-brass); opacity: 0.7; }
.v2-bs-fp-node.is-g0::after, .v2-bs-fp-node.is-g1::after, .v2-bs-fp-node.is-g2::after { content: ""; position: absolute; left: calc(100% + var(--fp-cgap) / 2); top: calc(25% - var(--fp-rgap) / 4); bottom: calc(25% - var(--fp-rgap) / 4); width: calc(var(--fp-cgap) / 2); border: 1px solid var(--v2-brass); border-right: 0; border-radius: 4px 0 0 4px; opacity: 0.7; }
.v2-bs-fp-foal { border-style: dashed; border-color: var(--v2-brass); }
/* Shared ancestor: colour + heavier ring + lettered badge + sr text, never colour alone. */
.v2-bs-fp-node.is-shared > .v2-bk-ped-card { border-color: var(--v2-glow); box-shadow: inset 0 0 0 1px var(--v2-glow); background: rgba(255,181,69,0.10); padding-right: 1.6rem; }
.v2-bs-fp-node.is-shared > a.v2-bk-ped-card:hover { border-color: var(--v2-glow); }
.v2-bs-fp-mark { position: absolute; top: 50%; right: 0.35rem; transform: translateY(-50%); width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--v2-glow); color: var(--v2-ink-dark); font-family: var(--v2-font-mono); font-size: 0.66rem; font-weight: 700; line-height: 1.05rem; text-align: center; }
.v2-bs-fp-shared .v2-bs-fp-mark { position: static; transform: none; flex: none; margin-top: 0.05rem; }
@media (max-width: 900px) {
  .v2-bs-fp { --fp-cgap: 1rem; }
  .v2-bs-fp-tree { grid-template-columns: minmax(0, 0.7fr) repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .v2-bs-final { grid-template-columns: minmax(0, 1fr); }
  /* Foal pedigree becomes an indented outline (DOM is depth-first): no in-component scroll needed. */
  .v2-bs-fp-tree { display: flex; flex-direction: column; gap: var(--fp-rgap); }
  .v2-bs-fp-node.is-g0::after, .v2-bs-fp-node.is-g1::after, .v2-bs-fp-node.is-g2::after, .v2-bs-fp-node.is-g0::before { content: none; }
  .v2-bs-fp-node.is-g1 { --fp-ind: 0.9rem; }
  .v2-bs-fp-node.is-g2 { --fp-ind: 1.8rem; }
  .v2-bs-fp-node.is-g3 { --fp-ind: 2.7rem; }
  .v2-bs-fp-node.is-g1, .v2-bs-fp-node.is-g2, .v2-bs-fp-node.is-g3 { padding-left: var(--fp-ind); }
  .v2-bs-fp-node.is-g1::before, .v2-bs-fp-node.is-g2::before, .v2-bs-fp-node.is-g3::before { content: ""; position: absolute; left: calc(var(--fp-ind) - 0.6rem); top: calc(-1 * var(--fp-rgap)); bottom: 50%; width: 0.45rem; border: 0; border-left: 1px solid var(--v2-brass); border-bottom: 1px solid var(--v2-brass); border-radius: 0 0 0 4px; opacity: 0.7; }
}

/* ===== Token shop, vouchers and premium ===== */
.v2-sh-till { margin-bottom: 1rem; }
.v2-sh-tokens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.v2-sh-coin { display: inline-block; flex: 0 0 auto; width: 1rem; height: 1rem; margin-right: 0.4rem; border-radius: 50%; background: var(--coin, var(--v2-brass)); border: 1px solid rgba(255, 255, 255, 0.35); vertical-align: -0.1rem; }
.v2-sh-held { margin: 0; font-size: 0.86rem; color: var(--v2-ink-soft); }
.v2-sh-held b { color: var(--v2-ink); font-family: var(--v2-font-mono); font-variant-numeric: tabular-nums; }
.v2-sh-buy { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; margin-top: auto; }
.v2-sh-qty { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.7rem; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-sh-buy .v2-sh-qty { margin-bottom: 0; }
.v2-sh-buy .v2-input { min-width: 0; width: 5.5rem; min-height: 2.75rem; box-sizing: border-box; }
.v2-sh-exchange .v2-btn { white-space: normal; text-align: left; }
.v2-sh-count { font-family: var(--v2-font-mono); font-variant-numeric: tabular-nums; }
.v2-sh-none { color: var(--v2-ink-faint); }
.v2-sh-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; align-items: start; }
.v2-sh-cols .v2-table { font-size: 0.8rem; }

.v2-pm-plans { border: 0; margin: 0 0 0.9rem; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.v2-pm-plan { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; padding: 0.4rem 0.7rem; border: 1px solid var(--v2-line); border-radius: 6px; cursor: pointer; }
.v2-pm-plan:hover { border-color: var(--v2-brass); }
.v2-pm-plan:has(input:checked) { border-color: var(--v2-brass); background: rgba(199, 154, 63, 0.1); }
.v2-pm-plan-t { flex: 1 1 auto; color: var(--v2-ink); }
.v2-pm-plan-p { font-family: var(--v2-font-mono); font-variant-numeric: tabular-nums; color: var(--v2-glow); }
.v2-pm-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.v2-pm-perks li { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.84rem; color: var(--v2-ink-soft); }
.v2-pm-perks b, .v2-pm-perks a { color: var(--v2-ink); font-weight: 600; }
.v2-pm-perks a { color: var(--v2-brass); }

.v2-pm-stars { font-size: 0.72rem; white-space: nowrap; letter-spacing: 0.04em; }
.v2-pm-stars.is-top5 { color: var(--v2-good); }
.v2-pm-stars.is-top25 { color: var(--v2-blue); }
.v2-pm-stars.is-top50 { color: var(--v2-glow); }
.v2-pm-stars.is-locked { color: var(--v2-ink-faint); }

.v2-pm-gauge { position: relative; display: block; width: 3.125rem; height: 0.5rem; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.v2-pm-gauge i { display: block; height: 100%; background: var(--v2-good); }
.v2-pm-gauge.is-max { background: #dbdbdb; }
.v2-pm-gauge.is-max i { background: #8f8f8f; }
.v2-pm-surface > * { margin: 0.2rem 0; display: block; font-size: 0.72rem; line-height: 0.75rem; }
.v2-pm-surface > .v2-pm-gauge { height: 0.5rem; margin: 0.32rem 0; }
.v2-pm-group { font-family: var(--v2-font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--v2-ink-soft); text-align: left; }
.v2-pm-scroll { max-height: 18rem; overflow-y: auto; }
.v2-pm-stat dt, .v2-pm-stat dd { min-height: 0; }
.v2-pm-stat dd { font-family: var(--v2-font-mono); font-variant-numeric: tabular-nums; }
.v2-pm-listh { margin: 0.8rem 0 0.3rem; font-family: var(--v2-font-mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v2-ink-faint); }
.v2-pm-times { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.v2-pm-times li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.3rem 0; border-bottom: 1px dashed var(--v2-line); font-size: 0.82rem; }
.v2-pm-times li:last-child { border-bottom: 0; }
.v2-pm-wic { margin-top: 1.2rem; }
.v2-pm-wic .v2-pm-times { margin: 0; }
.v2-er-terms > .v2-of-lede { margin: 0.2rem 0 0.8rem; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-er-terms > .v2-pm-times + .v2-of-lede, .v2-er-terms > h3 + .v2-of-lede { margin-top: 0; }
.v2-of-root > .v2-of-lede { margin: 0 0 0.9rem; }
.v2-of-root > .v2-filterbar { margin-top: 0.9rem; }
.v2-of-root > .v2-table-wrap { margin-top: 0; }
/* ===== end Token shop, vouchers and premium ===== */
/* ===== Help desk (round 5) ===== */
/* v2-help*.pug. See SPEC-help-hub.md. Reuses .v2-yard-top, .v2-intro-eyebrow/-h1/-h2/-lede/-pole/-gate*,
   .v2-prose, .v2-table(-wrap), .v2-section-label, .v2-btn*, .v2-input, .v2-pill, .v2-rk-ic.
   Every new rule is .v2-help-*. The same shell serves the reference guides. */
.v2-help-lede { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--v2-ink-soft); max-width: 44rem; }
.v2-help-shell { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.v2-help-main { min-width: 0; max-width: 54rem; }
.v2-help-main > .v2-prose { max-width: none; }
.v2-help-main > .v2-prose > p { margin: 0; }
.v2-help-back { margin: 1rem 0 0; font-size: 0.8rem; }
.v2-help-back a { color: var(--v2-brass); text-decoration: underline; text-underline-offset: 2px; }

/* Side rail */
.v2-help-rail { position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow-y: auto; display: grid; gap: 0.8rem; }
.v2-help-rail ul { list-style: none; margin: 0; padding: 0; }
.v2-help-toc, .v2-help-rail-pages { border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); padding: 0.4rem 0; }
.v2-help-rail-h { margin: 0; padding: 0.35rem 0.8rem; font-size: 0.72rem; font-weight: 600; color: var(--v2-ink-soft); }
.v2-help-rail a { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.25rem; padding: 0.25rem 0.8rem; border-left: 3px solid transparent; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-help-rail a:hover { color: var(--v2-glow); background: rgba(199,154,63,0.06); }
.v2-help-rail a[aria-current] { color: var(--v2-ink-bright); font-weight: 600; border-left-color: var(--v2-brass); background: rgba(199,154,63,0.1); }
.v2-help-rail small { font-size: 0.72rem; color: var(--v2-ink-soft); }

/* Hub */
.v2-help-gate { min-height: 15rem; }
.v2-help-ask { flex: 0 1 22rem; min-width: 0; }
.v2-help-ask label { display: block; margin-bottom: 0.3rem; font-size: 0.78rem; font-weight: 600; color: var(--v2-ink); }
.v2-help-ask-row { display: flex; gap: 0.4rem; }
.v2-help-ask-row .v2-input { flex: 1 1 auto; min-width: 0; min-height: 2.5rem; }
.v2-help-ask-row .v2-btn { min-height: 2.5rem; }
.v2-help-topics { list-style: none; margin: 0 0 0.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v2-help-topics .v2-pill { display: inline-flex; align-items: center; min-height: 2.25rem; }
.v2-help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.v2-help-card { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 1rem; gap: 0.7rem; align-items: center; height: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); }
.v2-help-card:hover { border-color: var(--v2-brass); }
.v2-help-card:hover b { color: var(--v2-glow); }
.v2-help-card > .v2-rk-ic { color: var(--v2-ink-soft); }
.v2-help-card-ic { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--v2-brass); color: var(--v2-brass); background: var(--v2-bg); }
.v2-help-card-ic .v2-rk-ic { width: 1.2rem; height: 1.2rem; }
.v2-help-card-txt b { display: block; font-size: 0.95rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-help-card-txt span { display: block; margin-top: 0.1rem; font-size: 0.8rem; line-height: 1.4; color: var(--v2-ink-soft); }
.v2-help-more { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0; font-size: 0.85rem; }
.v2-help-more a { display: inline-flex; align-items: center; min-height: 2.25rem; color: var(--v2-brass); text-decoration: underline; text-underline-offset: 2px; }

/* FAQ */
.v2-help-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.7rem; margin-bottom: 1rem; }
.v2-help-tools[hidden], .v2-help-none[hidden], .v2-help-sec[hidden], .v2-help-q[hidden] { display: none; }
.v2-help-tools .v2-input { flex: 1 1 16rem; min-width: 0; min-height: 2.5rem; }
.v2-help-tools .v2-btn { min-height: 2.25rem; }
.v2-help-count { margin: 0; font-size: 0.78rem; color: var(--v2-ink-soft); }
.v2-help-none { margin: 0 0 1rem; padding: 0.8rem 1rem; border: 1px dashed var(--v2-line); border-radius: 8px; font-size: 0.85rem; color: var(--v2-ink-soft); }
.v2-help-none a { color: var(--v2-glow); text-decoration: underline; }
.v2-help-sec { margin: 0 0 1.6rem; scroll-margin-top: 4.5rem; }
.v2-help-sec-h { position: relative; display: flex; align-items: center; gap: 0.7rem; padding-bottom: 0.7rem; margin-bottom: 0.5rem; }
.v2-help-sec-h::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.3rem; border-radius: 3px; background: radial-gradient(circle at 30% 35%, var(--v2-dirt-speck) 0 1px, transparent 1.4px) 0 0/5px 5px, var(--v2-dirt); }
.v2-help-sec-h .v2-intro-pole { border-color: var(--v2-brass); color: var(--v2-brass); }
.v2-help-sec-h h2 { margin: 0; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.3rem; color: var(--v2-ink-bright); }
.v2-help-sec-h small { margin-left: auto; font-size: 0.75rem; color: var(--v2-ink-soft); }
.v2-help-q { border-bottom: 1px dashed var(--v2-line); scroll-margin-top: 4.5rem; }
.v2-help-q summary { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-height: 2.75rem; padding: 0.45rem 0.4rem; cursor: pointer; list-style: none; }
.v2-help-q summary::-webkit-details-marker { display: none; }
.v2-help-q summary:hover { background: rgba(199,154,63,0.06); }
.v2-help-q summary:hover h3 { color: var(--v2-glow); }
.v2-help-q h3 { margin: 0; font-family: var(--v2-font-sans); font-size: 0.95rem; font-weight: 600; line-height: 1.35; color: var(--v2-ink); }
.v2-help-q summary .v2-rk-ic { color: var(--v2-brass); transition: transform 150ms ease; }
.v2-help-q[open] summary .v2-rk-ic { transform: rotate(90deg); }
.v2-help-q[open] h3 { color: var(--v2-ink-bright); }
.v2-help-a { padding: 0.2rem 0.4rem 0.9rem; max-width: 46rem; font-size: 0.88rem; line-height: 1.6; color: var(--v2-ink); }
.v2-help-a p { margin: 0 0 0.6rem; }
.v2-help-a ul { margin: 0.3rem 0 0.8rem; padding-left: 1.2rem; }
.v2-help-a li { margin-bottom: 0.25rem; }
.v2-help-a a { color: var(--v2-glow); text-decoration: underline; }
.v2-help-a b, .v2-help-a strong { color: var(--v2-ink-bright); }
.v2-help-a > b { display: block; margin: 0.6rem 0 0.3rem; }
.v2-help-a h4 { margin: 1rem 0 0.4rem; font-size: 0.9rem; font-weight: 700; color: var(--v2-brass); }
.v2-help-a .v2-table-wrap { margin: 0.4rem 0 0.9rem; }
.v2-help-a a.v2-help-q-link { display: inline-flex; align-items: center; min-height: 2rem; font-size: 0.75rem; color: var(--v2-ink-soft); }
.v2-help-tosec { display: none; }

/* Updates */
.v2-help-year { margin: 0 0 1.4rem; scroll-margin-top: 4.5rem; }
.v2-help-year-h { margin: 0 0 0.6rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.3rem; color: var(--v2-ink-bright); }
.v2-help-months { columns: 2; column-gap: 0.8rem; }
.v2-help-month { break-inside: avoid; margin: 0 0 0.8rem; padding: 0.8rem 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); }
.v2-help-month h3 { margin: 0 0 0.4rem; font-size: 0.9rem; font-weight: 700; color: var(--v2-brass); }
.v2-help-month ul { margin: 0; padding-left: 1.1rem; }
.v2-help-month li { margin-bottom: 0.3rem; font-size: 0.84rem; line-height: 1.45; color: var(--v2-ink); }

/* Player blogs */
.v2-help-blogs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.v2-help-blog { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1rem 1.1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: linear-gradient(160deg, var(--v2-surface), var(--v2-surface-2)); }
.v2-help-blog > img { width: 4.5rem; height: auto; border-radius: 4px; }
.v2-help-blog > .v2-help-card-ic { width: 3rem; height: 3rem; }
.v2-help-blog h2 { margin: 0 0 0.3rem; font-size: 1rem; font-weight: 600; color: var(--v2-ink-bright); }
.v2-help-blog p { margin: 0 0 0.6rem; font-size: 0.88rem; line-height: 1.5; color: var(--v2-ink); }
.v2-help-blog .v2-btn { display: inline-flex; align-items: center; min-height: 2.25rem; overflow-wrap: anywhere; }
.v2-help-offline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; }
.v2-help-offline small { font-size: 0.75rem; color: var(--v2-ink-soft); }
.v2-help-offline b { font-size: 0.82rem; font-weight: 600; color: var(--v2-ink-soft); }

/* How to read / reference charts */
.v2-help-facts { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--v2-ink); }
.v2-help-dist { white-space: nowrap; }
.v2-help-dist tbody th { position: sticky; left: 0; background: var(--v2-surface); text-align: left; font-weight: 600; color: var(--v2-ink-bright); }
.v2-help-conv { max-width: 22rem; }
.v2-help-dist th, .v2-help-dist td { padding-left: 0.5rem; padding-right: 0.5rem; }
.v2-help-dist thead th { white-space: normal; }
.v2-help-dist tbody th, .v2-help-conv tbody th { text-transform: none; letter-spacing: 0; font-size: 0.82rem; }

@media (min-width: 901px) and (pointer: fine) {
  .v2-help-rail a { min-height: 2rem; }
  .v2-help-q summary { min-height: 2.5rem; }
  .v2-help-topics .v2-pill { min-height: 2rem; }
}
@media (max-width: 900px) {
  .v2-help-shell { grid-template-columns: minmax(0, 1fr); }
  .v2-help-rail { position: static; max-height: none; overflow: visible; }
  .v2-help-rail-pages { display: none; }
  .v2-help-toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 0.3rem; }
  .v2-help-rail a { min-height: 2.75rem; }
  .v2-help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-help-tosec { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.8rem; color: var(--v2-brass); text-decoration: underline; }
  .v2-help-tools .v2-btn { min-height: 2.75rem; }
  .v2-help-topics .v2-pill, .v2-help-blog .v2-btn { min-height: 2.75rem; }
}
@media (max-width: 640px) {
  .v2-help-gate { min-height: 0; }
  .v2-help-ask { flex: 1 1 100%; }
  .v2-help-cards { grid-template-columns: minmax(0, 1fr); }
  .v2-help-months { columns: 1; }
  .v2-help-blog { grid-template-columns: 3rem minmax(0, 1fr); gap: 0.7rem; padding: 0.8rem; }
  .v2-help-blog > img { width: 3rem; }
  .v2-help-sec-h h2 { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-help-q summary .v2-rk-ic { transition: none; }
}
/* The site header is sticky, so anchors must land below it. It wraps to two rows on phones. */
#distance-conversions, #helpTop { scroll-margin-top: 4.5rem; }
@media (max-width: 640px) {
  .v2-help-sec, .v2-help-q, .v2-help-year, #distance-conversions, #helpTop { scroll-margin-top: 7rem; }
}
/* ===== end Help desk (round 5) ===== */

/* ===== Help reference guides (round 5) ===== */
/* Reuses .v2-subtabs(.on), .v2-sr-only. New: .v2-hr-*. Deliberately not .v2-table: that class turns
   into a scrolling block at 640px. */
.v2-hr-root { max-width: 62rem; margin: 1rem auto 1.6rem; }
.v2-hr-back { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.82rem; }
.v2-app a.v2-hr-back { color: var(--v2-glow); text-decoration: underline; }
.v2-hr-h1 { margin: 0.1rem 0 0.5rem; font-family: var(--v2-font-serif); font-weight: 400; font-size: 1.8rem; line-height: 1.2; color: var(--v2-ink-bright); }
/* Furlong poles along a rail. Decorative. */
.v2-hr-rail { height: 0.5rem; border-bottom: 2px solid var(--v2-brass); background: repeating-linear-gradient(90deg, var(--v2-rail) 0 2px, transparent 2px 2.5rem); }
.v2-hr-index { margin: 0.8rem 0 1.3rem; }
.v2-hr-h2 { margin: 0 0 0.5rem; font-family: var(--v2-font-sans); font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--v2-brass); }
.v2-hr-h3 { margin: 0 0 0.45rem; min-height: 2.5em; font-family: var(--v2-font-sans); font-weight: 600; font-size: 0.86rem; line-height: 1.25; color: var(--v2-ink); }
.v2-hr-text { margin: 0 0 0.8rem; max-width: 46rem; font-size: 0.88rem; line-height: 1.6; color: var(--v2-ink-soft); }
.v2-hr-unit { margin: 0 0 0.8rem; font-size: 0.82rem; color: var(--v2-ink-soft); }
.v2-hr-foot { margin: 1.2rem 0 0; }

.v2-hr-plate { background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 8px; overflow-x: auto; }
.v2-hr-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.v2-hr-table thead th { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--v2-brass); font-size: 0.74rem; font-weight: 600; line-height: 1.25; text-align: left; vertical-align: bottom; color: var(--v2-ink-soft); }
.v2-hr-table thead td { border-bottom: 1px solid var(--v2-brass); }
.v2-hr-table tbody th, .v2-hr-table tbody td { padding: 0.42rem 0.7rem; border-bottom: 1px solid rgba(199, 154, 63, 0.14); color: var(--v2-ink); text-align: left; }
.v2-hr-table tbody th { font-weight: 600; white-space: nowrap; }
.v2-hr-table tbody tr:nth-child(even) { background: rgba(243, 234, 211, 0.035); }
.v2-hr-table tbody tr:last-child th, .v2-hr-table tbody tr:last-child td { border-bottom: 0; }
.v2-hr-table thead th.v2-hr-n, .v2-hr-table tbody td.v2-hr-n { text-align: right; }
.v2-hr-table thead th.v2-hr-c { text-align: center; border-bottom: 1px solid var(--v2-line); }
.v2-hr-table tbody td.v2-hr-key { font-weight: 600; color: var(--v2-brass); }
@media (hover: hover) { .v2-hr-table tbody tr:hover { background: rgba(199, 154, 63, 0.09); } }

.v2-hr-meter { display: block; height: 0.2rem; margin-top: 0.2rem; border-radius: 2px; background: rgba(243, 234, 211, 0.1); overflow: hidden; }
.v2-hr-meter i { display: block; height: 100%; margin-left: auto; background: var(--v2-brass); }

.v2-hr-split { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.v2-hr-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem; align-items: start; }
.v2-hr-duo .v2-hr-plate + .v2-hr-text { margin-top: 0.8rem; }

.v2-hr-range { display: flex; align-items: center; gap: 0.7rem; }
.v2-hr-range-t { flex: 0 0 2.6rem; }
.v2-hr-track { position: relative; flex: 1 1 auto; min-width: 4rem; height: 0.35rem; border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(243, 234, 211, 0.22) 0 1px, transparent 1px 25%), rgba(243, 234, 211, 0.07); }
.v2-hr-track i { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--v2-brass); }
.v2-hr-track i.is-open { border-radius: 2px 0 0 2px; background: linear-gradient(90deg, var(--v2-brass) 70%, transparent); }

.v2-hr-terms { list-style: none; margin: 0; padding: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 8px; }
.v2-hr-terms li { padding: 0.42rem 0.7rem; border-bottom: 1px solid rgba(199, 154, 63, 0.14); font-size: 0.86rem; font-weight: 600; line-height: 1.4; color: var(--v2-ink); }
.v2-hr-terms li:last-child { border-bottom: 0; }
.v2-hr-terms span { font-weight: 400; color: var(--v2-ink-soft); }
.v2-app .v2-hr-terms a { color: var(--v2-glow); text-decoration: underline; }

.v2-hr-ladders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 1rem 0.75rem; margin-top: 1rem; align-items: start; }

.v2-hr-wfa-tall { display: none; max-width: 28rem; }
.v2-hr-wfa-wide .v2-hr-table { font-size: 0.82rem; }
.v2-hr-wfa-wide .v2-hr-table th, .v2-hr-wfa-wide .v2-hr-table td { padding-left: 0.45rem; padding-right: 0.45rem; }

@media (min-width: 901px) and (pointer: fine) { .v2-hr-back { min-height: 1.75rem; } }
@media (max-width: 900px) {
  .v2-hr-split, .v2-hr-duo { grid-template-columns: minmax(0, 1fr); }
  .v2-hr-wfa-wide { display: none; }
  .v2-hr-wfa-tall { display: block; }
}
@media (max-width: 640px) {
  .v2-hr-h1 { font-size: 1.5rem; }
  .v2-hr-table { font-size: 0.82rem; }
  .v2-hr-table thead th, .v2-hr-table tbody th, .v2-hr-table tbody td { padding-left: 0.4rem; padding-right: 0.4rem; }
  .v2-hr-table tbody th, .v2-hr-table tbody td { padding-top: 0.5rem; padding-bottom: 0.5rem; }
}
/* ===== end Help reference guides (round 5) ===== */

/* ===== Stable boards (round 5) ===== */
.v2-sb-wings { margin-bottom: 1rem; }
.v2-lb-events.v2-sb-events { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v2-sb-events .v2-lb-event > span { min-width: 0; }
.v2-sb-events .v2-lb-event small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-sb-share { width: 100%; max-width: 15rem; height: 0.375rem; margin-top: 0.15rem; }
.v2-sb-star { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; width: 100%; margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px dashed var(--v2-line); }
.v2-sb-star small { font-size: 0.68rem; color: var(--v2-ink-soft); }
.v2-sb-star .v2-name { font-size: 0.86rem; color: var(--v2-ink); }
.v2-sb-star a:hover .v2-name { color: var(--v2-glow); }
.v2-sb-facts { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem 0.8rem; margin: 0; min-width: 0; }
.v2-sb-facts div { min-width: 0; }
.v2-sb-facts dt { font-size: 0.66rem; font-weight: 400; color: var(--v2-ink-soft); white-space: nowrap; }
.v2-sb-facts dd { margin: 0; font-size: 0.82rem; color: var(--v2-ink); white-space: nowrap; }
.v2-lb-step-body > .v2-sb-facts { width: 100%; margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px dashed var(--v2-line); }
.v2-sb-line { display: grid; grid-template-columns: 2.5rem 2.375rem minmax(0, 1fr) minmax(0, 36rem) 7.5rem; gap: 0.6rem; align-items: center; padding: 0.55rem 0.9rem; border-bottom: 1px dashed var(--v2-line); }
.v2-sb-line:last-child { border-bottom: none; }
.v2-sb-line:hover { background: rgba(199, 154, 63, 0.05); }
.v2-sb-line.is-mine { background: rgba(255, 181, 69, 0.07); box-shadow: inset 3px 0 0 var(--v2-glow); }
.v2-sb-line > .v2-rk-portrait { width: 2.375rem; height: 2.375rem; }
.v2-sb-line > .v2-sb-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.v2-sb-line .v2-lb-pos { font-size: 1rem; }
.v2-sb-line .v2-lb-pos .v2-lb-rosette { margin: 0 auto; }
.v2-sb-ladder { margin-bottom: 1.2rem; }
.v2-sb-root .v2-bd-more { margin-top: 0.8rem; }
.v2-sb-season { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.9rem; }
.v2-sb-season .v2-select { width: auto; min-width: 10rem; }
@media (min-width: 901px) and (pointer: fine) {
  .v2-sb-season .v2-select, .v2-sb-season .v2-btn { min-height: 2.25rem; }
}
@media (max-width: 1100px) {
  .v2-sb-line { grid-template-columns: 2.5rem 2.375rem minmax(0, 1fr) auto; grid-template-areas: "pos por who val" "facts facts facts facts"; }
  .v2-sb-line > .v2-lb-pos { grid-area: pos; }
  .v2-sb-line > .v2-rk-portrait { grid-area: por; }
  .v2-sb-line > .v2-lb-who { grid-area: who; }
  .v2-sb-line > .v2-sb-facts { grid-area: facts; }
  .v2-sb-line > .v2-rec-sval { grid-area: val; }
}
@media (max-width: 900px) {
  .v2-lb-events.v2-sb-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-sb-events .v2-lb-event:nth-child(2) { border-right: none; }
  .v2-sb-events .v2-lb-event:nth-child(-n+2) { border-bottom: 1px dashed var(--v2-line); }
  .v2-sb-wings a { min-height: 2.75rem; }
}
@media (max-width: 640px) {
  .v2-sb-root .v2-rec-chips a { min-height: 2.75rem; }
  .v2-sb-season .v2-btn { min-height: 2.75rem; }
  .v2-sb-season .v2-select { flex: 1 1 8rem; min-height: 2.75rem; }
  .v2-sb-line { padding: 0.55rem 0.7rem; }
  .v2-sb-wings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-sb-wings a { justify-content: center; white-space: normal; text-align: center; }
  .v2-sb-wings a:last-child { grid-column: 1 / -1; }
  .v2-sb-line > .v2-sb-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-sb-root .v2-rec-sline .v2-lb-name, .v2-sb-line .v2-lb-name { white-space: normal; flex-wrap: wrap; }
  .v2-sb-root .v2-lb-step .v2-yard-door, .v2-sb-root .p1 .v2-lb-step .v2-yard-door { align-items: center; }
}
/* Large text on a phone: the value drops under the name, so long stable names keep their width. */
@media (max-width: 640px) {
  html.v2-text-large .v2-sb-root .v2-rec-sline, html.v2-text-larger .v2-sb-root .v2-rec-sline { grid-template-columns: 2.5rem 2.375rem minmax(0, 1fr); }
  html.v2-text-large .v2-sb-root .v2-rec-sline > .v2-rec-sval, html.v2-text-larger .v2-sb-root .v2-rec-sline > .v2-rec-sval { grid-column: 3; align-items: flex-start; text-align: left; }
  html.v2-text-large .v2-sb-root .v2-sb-line, html.v2-text-larger .v2-sb-root .v2-sb-line { grid-template-columns: 2.5rem 2.375rem minmax(0, 1fr); grid-template-areas: "pos por who" "pos por val" "facts facts facts"; }
  html.v2-text-large .v2-sb-root .v2-sb-line > .v2-rec-sval, html.v2-text-larger .v2-sb-root .v2-sb-line > .v2-rec-sval { align-items: flex-start; text-align: left; }
}
/* Narrow podium steps: labels and horse names wrap rather than collide or clip. */
@media (max-width: 640px) {
  .v2-lb-step-body > .v2-sb-facts dt { white-space: normal; }
  .v2-sb-star a { max-width: 100%; }
  .v2-sb-star .v2-name { min-width: 0; white-space: normal; }
  html.v2-text-large .v2-lb-step-body > .v2-sb-facts, html.v2-text-larger .v2-lb-step-body > .v2-sb-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ===== end Stable boards (round 5) ===== */

/* ===== Stable archives (round 5) ===== */
/* views/v2-stable-retired.pug, -graveyard.pug, -stats.pug. SPEC-stable-archives.md. Reuses the Yard
   office and Stable books classes. Every new rule is .v2-ar-*; shared grids are never redefined. */

/* Stones are lighter than the page, so soft ink needs a lighter value to reach 4.5:1. */
.v2-yo-root .v2-yo-stone { --v2-ink-soft: #d6dccd; }
/* Round-5 tracking cap on the labels these pages show. */
.v2-yo-paddock .v2-yard-plate, .v2-sb-seasons thead th, .v2-sb-seasons tr.is-best th::after { letter-spacing: 0.07em; }
.v2-sb-root .v2-bk-kv dt { letter-spacing: 0.07em; }
.v2-sb-root .v2-section-label > a { font-size: 0.72rem; color: var(--v2-brass); }
.v2-sb-root .v2-section-label > a:hover { color: var(--v2-glow); }

/* ---- Best day: the one race a horse is remembered for ---- */
.v2-ar-day { display: block; font-size: 0.72rem; line-height: 1.35; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-ar-day b { font-weight: 600; color: var(--v2-ink); }
.v2-ar-day a { position: relative; z-index: 1; color: inherit; text-decoration: underline; text-decoration-color: rgba(243, 234, 211, 0.4); text-underline-offset: 0.15em; }
.v2-ar-day a:hover { color: var(--v2-ink-bright); text-decoration-color: currentColor; }
.v2-ar-k { display: block; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--v2-ink-soft); }

/* ---- Retired: Pride of the paddock ---- */
.v2-ar-pride { display: grid; grid-template-columns: 15rem minmax(0, 1fr); margin-bottom: 1.2rem; background: var(--v2-surface); border: 1px solid var(--v2-brass); border-radius: 10px; overflow: hidden; }
.v2-ar-pride .v2-yard-door { height: auto; min-height: 11.5rem; }
.v2-ar-pride .v2-yard-door img { height: 10rem; }
.v2-ar-pride .v2-yard-plate { bottom: 0.5rem; }
.v2-ar-pride-b { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; padding: 1rem 1.2rem; }
.v2-ar-pride-b h3 { margin: 0; font-family: var(--v2-font-sans); font-weight: 600; font-size: 1.5rem; line-height: 1.15; overflow-wrap: anywhere; }
.v2-ar-pride-b h3 a { color: var(--v2-ink-bright); }
.v2-ar-pride-b h3 a:hover { color: var(--v2-glow); }
.v2-ar-pride-b .v2-ar-day { font-size: 0.86rem; }
.v2-ar-paddock.v2-yard-stalls { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }

/* ---- Graveyard: the three greatest stand at the front. Quiet: brass only, no status colour. ---- */
.v2-ar-legends { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1rem; align-items: end; }
.v2-ar-legend.v2-yo-stone { min-height: 20rem; border-color: rgba(199, 154, 63, 0.6); }
.v2-ar-legend.is-first { min-height: 23rem; }
.v2-ar-legend .v2-horse-color { width: 5rem; height: 4.25rem; }
.v2-ar-legend.is-first .v2-horse-color { width: 6.5rem; height: 5.5rem; }
.v2-ar-legend .v2-name { font-size: 1.2rem; }
.v2-ar-legend.is-first .v2-name { font-size: 1.5rem; }
.v2-yo-stone .v2-ar-day { text-align: center; max-width: 15rem; }

/* ---- Season books: the annals ---- */
.v2-ar-annals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.v2-ar-annal { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; padding: 0.85rem 1rem; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-ar-annal .v2-name-with-image { min-width: 0; }
.v2-ar-big { font-weight: 700; font-size: 1.15rem; line-height: 1.2; color: var(--v2-ink-bright); overflow-wrap: anywhere; }
a.v2-ar-big:hover { color: var(--v2-glow); }
.v2-ar-sub { font-size: 0.74rem; line-height: 1.35; color: var(--v2-ink-soft); overflow-wrap: anywhere; }
.v2-ar-sub .is-money { color: var(--v2-glow); }
.v2-ar-star { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.35rem; margin-top: 0.3rem; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-ar-star a { color: var(--v2-ink); }
.v2-ar-star a:hover { color: var(--v2-glow); }
.v2-ar-star .v2-horse-color { width: 1.5rem; height: 1.25rem; object-fit: contain; }

/* ---- Season books: where they went ---- */
.v2-ar-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 0.9rem; }
.v2-ar-door { display: flex; gap: 0.8rem; align-items: center; min-height: 4.5rem; padding: 0.7rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-2); color: var(--v2-ink); }
.v2-ar-door:hover { border-color: var(--v2-brass); }
.v2-ar-door > .v2-rk-ic { width: 1.75rem; height: 1.75rem; color: var(--v2-brass); }
.v2-ar-door > span { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.v2-ar-door b { font-size: 1rem; font-weight: 600; }
.v2-ar-door small { font-size: 0.74rem; color: var(--v2-ink-soft); }
.v2-ar-tile small a { color: var(--v2-brass); }
.v2-ar-tile small a:hover { color: var(--v2-glow); }

@media (max-width: 900px) {
  .v2-ar-annals { grid-template-columns: minmax(0, 1fr); }
  .v2-ar-legends { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
  .v2-ar-legend.v2-yo-stone, .v2-ar-legend.is-first { min-height: 18rem; }
  .v2-ar-legend .v2-name, .v2-ar-legend.is-first .v2-name { font-size: 1.05rem; }
}
@media (max-width: 640px) {
  .v2-ar-pride { grid-template-columns: minmax(0, 1fr); }
  .v2-ar-pride .v2-yard-door { min-height: 9rem; }
  .v2-ar-pride .v2-yard-door img { height: 8rem; }
  .v2-ar-pride .v2-yard-plate { bottom: -0.6875rem; }
  .v2-ar-pride .v2-yard-door { overflow: visible; }
  .v2-ar-pride-b { padding: 1.2rem 0.85rem 0.85rem; }
  .v2-ar-pride-b h3 { font-size: 1.25rem; }
  .v2-ar-paddock.v2-yard-stalls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-ar-legends { grid-template-columns: minmax(0, 1fr); }
  .v2-ar-legend.v2-yo-stone, .v2-ar-legend.is-first { min-height: 0; }
  .v2-ar-doors { grid-template-columns: minmax(0, 1fr); }
  .v2-yard-rank.v2-ar-tile small { white-space: normal; overflow: visible; text-overflow: clip; }
}
/* ===== end Stable archives (round 5) ===== */

/* ===== Season preview and Preferences polish (round 5) ===== */
.v2-sv-poster { position: relative; display: grid; grid-template-columns: 11rem minmax(0, 1fr); margin: 0 0 1.1rem; border: 1px solid var(--v2-brass); border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--v2-surface), var(--v2-bg)); }
.v2-sv-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; padding: 1.4rem 0.8rem; text-align: center; border-right: 2px dashed var(--v2-line); background: rgba(199, 154, 63, 0.09); }
.v2-sv-stub .v2-countdown { font-size: 1.9rem; }
.v2-sv-stub-when { margin: 0; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-sv-body { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; padding: 1.2rem 1.3rem 1.1rem; }
.v2-sv-eyebrow { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-sv-title { margin: 0; font-family: var(--v2-font-sans); font-weight: 400; font-size: 1.65rem; line-height: 1.2; color: var(--v2-ink-bright); }
.v2-sv-lede { margin: 0; max-width: 40rem; font-size: 0.9rem; line-height: 1.45; color: var(--v2-ink-soft); }
.v2-sv-facts { list-style: none; margin: 0.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; }
.v2-sv-facts b { display: block; font-size: 1.25rem; font-weight: 700; color: var(--v2-ink); }
.v2-sv-facts .is-money b { color: var(--v2-glow); }
.v2-sv-facts small { font-size: 0.72rem; color: var(--v2-ink-soft); }

.v2-sv-rail { margin-top: 0.3rem; }
.v2-sv-rail-track { position: relative; display: flex; height: 0.5rem; border-radius: 100px; background: var(--v2-turf-deep); box-shadow: inset 0 0 0 1px var(--v2-line); }
.v2-sv-rail-track i { flex: 1; border-right: 1px solid rgba(243, 234, 211, 0.22); }
.v2-sv-rail-track i:last-of-type { border-right: 0; }
.v2-sv-rail-run { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 100px; background: var(--v2-brass); }
.v2-sv-rail-pin { position: absolute; top: 50%; width: 1rem; height: 1rem; margin: -0.5rem 0 0 -0.5rem; border-radius: 50%; border: 2px solid var(--v2-ink-dark); background: var(--v2-glow); }
.v2-sv-rail-t { margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-sv-rail-t b { color: var(--v2-ink); font-weight: 600; }

.v2-sv-sec { margin: 0 0 1.2rem; }
.v2-sv-heads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.v2-sv-head { display: flex; flex-direction: column; gap: 0.45rem; height: 100%; padding: 0.85rem 1rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); box-shadow: inset 0 3px 0 var(--v2-brass); }
.v2-sv-head-day { margin: 0; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-sv-head-name { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.45rem; font-size: 1.02rem; font-weight: 400; color: var(--v2-ink); overflow-wrap: anywhere; }
.v2-sv-head-trip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--v2-ink); }
.v2-sv-head-trip .v2-rk-surface, .v2-sv-head-trip .v2-rk-going { font-size: 0.66rem; padding: 0.12rem 0.5rem 0.12rem 0.25rem; }
.v2-sv-head-trip .v2-rk-swatch { width: 0.8rem; height: 0.8rem; }
.v2-sv-head-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 0.6rem; font-size: 0.72rem; color: var(--v2-ink-soft); }
.v2-sv-head-foot b { font-size: 1.05rem; color: var(--v2-glow); }
.v2-sv-track { color: var(--v2-ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.v2-sv-track:hover { color: var(--v2-glow); }

.v2-sv-months { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.7rem; }
.v2-sv-month { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.95rem; border: 1px solid var(--v2-line); border-radius: 100px; font-size: 0.8rem; color: var(--v2-ink-soft); }
.v2-sv-month:hover { border-color: var(--v2-brass); color: var(--v2-ink); }
.v2-sv-month[aria-current='true'] { background: var(--v2-brass); border-color: var(--v2-brass); color: var(--v2-ink-dark); font-weight: 700; }

.v2-sv-doors { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.v2-sv-doors a { display: flex; align-items: center; gap: 0.6rem; min-height: 3.25rem; padding: 0.5rem 0.9rem; border: 1px solid var(--v2-line); border-radius: 10px; background: var(--v2-surface); font-size: 0.9rem; color: var(--v2-ink); }
.v2-sv-doors a:hover { border-color: var(--v2-brass); }
.v2-sv-doors .v2-rk-ic { color: var(--v2-brass); }
.v2-sv-doors span { flex: 1; }

.v2-of-group legend { letter-spacing: 0.06em; }

@media (min-width: 901px) and (pointer: fine) {
  .v2-sv-month { min-height: 2.25rem; }
  .v2-of-seg label { min-height: 2.25rem; min-width: 2.5rem; }
}
@media (min-width: 901px) {
  .v2-of-device { position: sticky; top: 1rem; }
}
@media (max-width: 900px) {
  .v2-sv-heads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .v2-sv-poster { grid-template-columns: minmax(0, 1fr); }
  .v2-sv-stub { flex-direction: row; justify-content: space-between; padding: 0.8rem 1rem; border-right: 0; border-bottom: 2px dashed var(--v2-line); text-align: left; }
  .v2-sv-stub .v2-countdown { font-size: 1.5rem; }
  .v2-sv-body { padding: 1rem; }
  .v2-sv-title { font-size: 1.35rem; }
  .v2-sv-heads, .v2-sv-doors { grid-template-columns: minmax(0, 1fr); }
  .v2-sv-facts { gap: 0.5rem 1.2rem; }
  .v2-sv-card .v2-pager .v2-pages { flex-wrap: wrap; }
}
/* ===== end Season preview and Preferences polish (round 5) ===== */

/* ===== Typography pass ===== */
/* These rows tint the background enough to take the faint ink under 4.5:1. */
.v2-rc-line.is-mine, .v2-lb-line.is-mine, .v2-st-lrow.v2-st-picked, .v2-mw-row.is-picked, .v2-yo-row.is-picked { --v2-ink-faint: var(--v2-ink-soft); }

/* Segmented controls: 44px touch targets stay on phones and tablets, 36px with a mouse. The
   switch counts its own padding and border, so its links are shorter to reach 36px overall.
   min-height in rem, so Large and Larger text still grow them. */
@media (min-width: 901px) and (pointer: fine) {
  .v2-mr-switch { padding: 0.125rem; }
  .v2-mr-switch a { min-height: 1.875rem; padding: 0 0.95rem; }
  .v2-mr-filter > summary { min-height: 2.25rem; }
  .v2-rl-tabs a { min-height: 2.25rem; }
  .v2-ml-seg a { min-height: 2.25rem; }
  .v2-sp-tab { min-height: 2.25rem; }
  .v2-br-divs a { min-height: 2.25rem; }
}
/* ===== end Typography pass ===== */

/* ---------- HUD stable-notes button + panel (v2-layout.pug, v2-notes-drawer.js) ----------
   The panel is absolutely positioned against the sticky .v2-hud (its containing block), so it
   drops under the header at every width without JS. z 25 sits under the HUD account menu (30). */
.v2-hud .v2-notes-btn { flex: none; position: relative; display: inline-grid; place-items: center; width: 1.875rem; height: 1.875rem; color: var(--v2-brass); border: 1px solid rgba(199, 154, 63, 0.55); border-radius: 6px; }
.v2-hud .v2-notes-btn .v2-rk-ic { width: 1.1rem; height: 1.1rem; }
.v2-hud .v2-notes-btn:hover,
.v2-hud .v2-notes-btn.on,
.v2-hud .v2-notes-btn[aria-expanded="true"] { background: rgba(199, 154, 63, 0.12); border-color: var(--v2-brass); color: var(--v2-glow); }
.v2-hud .v2-notes-btn:active { background: rgba(199, 154, 63, 0.22); }
.v2-hud .v2-notes-btn.has-draft::after { content: ""; position: absolute; top: -0.25rem; right: -0.25rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--v2-glow); box-shadow: 0 0 0 2px var(--v2-surface); }
.v2-hud.is-notes-open { z-index: 40; }
.v2-notes-panel { position: absolute; top: calc(100% + 0.35rem); right: 1.5rem; z-index: 25; width: min(26rem, calc(100vw - 1rem)); max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem); overflow: auto; display: flex; flex-direction: column; gap: 0.55rem; padding: 0.85rem 0.9rem 0.8rem; background: var(--v2-surface); border: 1px solid var(--v2-brass); border-radius: 10px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55); color: var(--v2-ink); font-size: 0.85rem; letter-spacing: 0; }
.v2-notes-panel[hidden], .v2-notes-panel [hidden] { display: none !important; }
.v2-notes-head { display: flex; align-items: center; gap: 0.5rem; }
.v2-notes-h { margin: 0; font-weight: 700; font-size: 0.95rem; color: var(--v2-ink-bright); }
.v2-notes-scope { font-size: 0.66rem; color: var(--v2-ink-faint); }
.v2-notes-x { margin-left: auto; display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: 0; background: transparent; border: 0; border-radius: 6px; color: var(--v2-ink-soft); cursor: pointer; }
.v2-notes-x:hover { background: rgba(199, 154, 63, 0.12); color: var(--v2-ink); }
.v2-notes-panel form { display: flex; flex-direction: column; gap: 0.45rem; margin: 0; }
.v2-notes-panel .v2-id-paper { min-height: 10rem; height: 14rem; }
.v2-notes-panel .v2-form-hint { margin-top: 0; }
.v2-notes-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.v2-notes-foot .v2-of-state { flex: 1 1 auto; min-width: 0; }
.v2-app a.v2-notes-full { font-size: 0.72rem; color: var(--v2-brass); text-decoration: underline; }
.v2-app a.v2-notes-full:hover { color: var(--v2-glow); }
@media (max-width: 900px) {
  .v2-hud .v2-notes-btn { width: 2.75rem; height: 2.75rem; }
  .v2-notes-x { width: 2.75rem; height: 2.75rem; }
  .v2-app a.v2-notes-full { min-height: 2.75rem; display: inline-flex; align-items: center; }
}
@media (max-width: 640px) {
  .v2-hud .v2-notes-btn { margin-left: auto; }
  .v2-hud .v2-notes-btn ~ .v2-tab-dropdown .v2-tab-dropdown-menu { left: auto; right: 0; border-radius: 8px 0 8px 8px; }
  .v2-notes-panel { top: 100%; left: 0.5rem; right: 0.5rem; width: auto; border-radius: 0 0 10px 10px; max-height: calc(100vh - 7rem); max-height: calc(100dvh - 7rem); }
  .v2-notes-panel .v2-id-paper { min-height: 8rem; height: min(14rem, 38dvh); padding-left: 2.6rem; }
  .v2-notes-foot .v2-of-state { flex-basis: 100%; }
  .v2-notes-foot .v2-btn { margin-left: auto; }
}

/* ---- Race details page design pass (v2-race-details.pug only) ----
   Owner feedback: "a lot of one color and all the boxes seem to blend together". Panels sat 1.18:1
   off the page and every box shared one brass outline. Layout is unchanged; three moves, all scoped
   with .v2-rcd-* so the other templates sharing .v2-rc-* / .v2-panel are untouched:
   1. elevation: panels lift with a shadow, the field sits highest, hairlines replace dashes;
   2. zoning: a strip per area (surface colour for conditions, brass for the field, blue for the
      wire reveal) and neutral owner/track links, so gold means the field and the money;
   3. finished races print the order of finish as a cream race programme (status colours re-tuned
      for paper below). */
:root {
  --v2-rcd-elev: 0 1px 0 rgba(255,248,234,0.05) inset, 0 8px 22px rgba(0,0,0,0.45);
  --v2-rcd-hair: rgba(243,234,211,0.08);
  --v2-rcd-lift: #1f3c2c;
}
.v2-rcd-mast { border-color: transparent; box-shadow: var(--v2-rcd-elev); }
.v2-rcd-mast .v2-rc-purse { border-left: 1px solid var(--v2-rcd-hair); }

/* Conditions box: lifted, with a strip in the race's surface colour */
.v2-rcd-box { --v2-rcd-surf: var(--v2-brass); border: 0; border-top: 3px solid var(--v2-rcd-surf); box-shadow: var(--v2-rcd-elev); }
.v2-rcd-box[data-surface="turf"] { --v2-rcd-surf: var(--v2-turf-stripe); }
.v2-rcd-box[data-surface="dirt"] { --v2-rcd-surf: var(--v2-dirt-light); }
.v2-rcd-box .v2-rc-box-oval { background: color-mix(in srgb, var(--v2-rcd-surf) 10%, #0f2218); border-bottom-color: var(--v2-rcd-hair); }
.v2-rcd-box .v2-rc-dl dt, .v2-rcd-box .v2-rc-dl dd { border-bottom: 1px solid var(--v2-rcd-hair); }
.v2-rcd-box .v2-rc-dl dt { color: color-mix(in srgb, var(--v2-rcd-surf) 55%, var(--v2-ink-soft)); }
.v2-rcd-box .v2-rc-dl dd a { color: var(--v2-ink-soft); text-decoration: underline dotted; text-underline-offset: 3px; }
.v2-rcd-box .v2-rc-dl dd a:hover { color: var(--v2-glow); }
.v2-rcd-box .v2-rc-cd { background: rgba(255,181,69,0.09); border-top: 1px solid rgba(255,181,69,0.4); }

/* Field: highest surface, brass strip, hairlines */
.v2-rcd-main > .v2-section-label .v2-rc-h { color: var(--v2-brass); }
.v2-rcd-main > .v2-section-label#comments .v2-rc-h, .v2-rcd-main > .v2-section-label#comments-pre .v2-rc-h { color: var(--v2-ink-soft); }
.v2-rcd-main .v2-rc-lines { background: var(--v2-rcd-lift); border: 0; border-top: 3px solid var(--v2-brass); box-shadow: var(--v2-rcd-elev); }
.v2-rcd-main .v2-rc-line { border-bottom: 1px solid var(--v2-rcd-hair); }
.v2-rcd-main .v2-rc-line:last-child { border-bottom: none; }
.v2-rcd-main .v2-rc-line:hover { background: rgba(255,248,234,0.05); }
.v2-rcd-main .v2-rc-sub a { color: var(--v2-ink-soft); text-decoration: underline dotted; text-underline-offset: 3px; }
.v2-rcd-main .v2-rc-wire { border: 0; border-top: 3px solid var(--v2-blue); box-shadow: var(--v2-rcd-elev); }

/* Results as a cream race programme. The status tokens are re-tuned for paper so speed-rating
   bands (inline var() colours), best/worst odds and medals keep their meaning at >= 4.5:1. */
.v2-rcd-main .v2-rcd-program {
  --v2-ink: var(--v2-paper-ink); --v2-ink-bright: var(--v2-paper-ink); --v2-ink-soft: var(--v2-paper-ink-soft); --v2-ink-faint: var(--v2-paper-ink-soft);
  --v2-signal: #a3261a; --v2-glow: #8a4f00; --v2-blue: #2747a8; --v2-good: #1f6b43; --v2-brass: #7a5a17;
  --v2-rcd-hair: rgba(26,20,8,0.16);
  background: var(--v2-paper); color: var(--v2-paper-ink); border-top-color: #c79a3f;
}
.v2-rcd-main .v2-rcd-program .v2-rc-line:hover { background: var(--v2-paper-hover); }
.v2-rcd-main .v2-rcd-program .v2-rc-line.is-mine { background: var(--v2-paper-pin-hi); box-shadow: inset 4px 0 0 var(--v2-paper-pin); }
.v2-rcd-main .v2-rcd-program .v2-rc-name a { font-weight: 600; }
.v2-rcd-main .v2-rcd-program .v2-rc-earn { font-weight: 600; }
.v2-rcd-main .v2-rcd-program .v2-rk-cloth { border-color: rgba(26,20,8,0.35); }
.v2-rcd-main .v2-rcd-program .v2-rk-mine { color: var(--v2-paper-ink); background: #ffb545; }
.v2-rcd-main .v2-rcd-program .v2-medal-1, .v2-rcd-main .v2-rcd-program .v2-medal-2, .v2-rcd-main .v2-rcd-program .v2-medal-3 { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 3px; color: var(--v2-paper-ink); font-size: 0.8rem; }
.v2-rcd-main .v2-rcd-program .v2-medal-1 { background: #e2b64a; }
.v2-rcd-main .v2-rcd-program .v2-medal-2 { background: #c9ccd1; }
.v2-rcd-main .v2-rcd-program .v2-medal-3 { background: #c98a52; }

/* Comments: lifted, no box-in-a-box */
.v2-rcd-main .v2-rcd-comments { border: 0; border-top: 3px solid rgba(243,234,211,0.22); box-shadow: var(--v2-rcd-elev); }
.v2-rcd-main .v2-rcd-comments > .v2-empty { border: 0; padding: 0.3rem 0; background: none; }
.v2-rcd-main .v2-rcd-comments .v2-rc-comment { border-bottom: 1px solid var(--v2-rcd-hair); }

@media (max-width: 1100px) {
  .v2-rcd-box .v2-rc-box-oval { border-right-color: var(--v2-rcd-hair); }
}
@media (max-width: 640px) {
  .v2-rcd-mast .v2-rc-purse { border-top: 1px solid var(--v2-rcd-hair); }
  .v2-rcd-box .v2-rc-box-oval { border-bottom-color: var(--v2-rcd-hair); }
}
