/* ═══════════════════════════════════════════════════════
   RACE EXPLORER — light-mode stylesheet
   ──────────────────────────────────────────────────────
   The hero strip at the top uses the shared .sb-hero--dark
   cinematic pattern from scoreboard_theme.css (midnight +
   gold + Playfair). The body below is paper-cream with
   white panels — same visual register as /sr-rating/,
   /steamers/, /leaderboard/ et al. so Race Explorer reads
   as part of the family.

   Token contract (extend, don't override):
     --rx-paper        page background (cream)
     --rx-card         white panel surface
     --rx-card-warm    slightly tinted panel
     --rx-rule         panel border / divider
     --rx-ink          primary ink (dark on cream)
     --rx-ink-70 / 40  secondary / tertiary ink
     --rx-gold         class / ability accent
     --rx-gold-deep    deeper gold for hover / active
     --rx-emerald      positive (in-form, value)
     --rx-rust         negative (out-of-form, drift)
     --rx-amber        warning / live / pending
═══════════════════════════════════════════════════════ */

.page-explorer {
  --rx-paper:      #FAFAF7;
  --rx-card:       #FFFFFF;
  --rx-card-warm:  #FFFCF6;
  --rx-rule:       rgba(17,21,31,0.10);
  --rx-rule-soft:  rgba(17,21,31,0.05);
  --rx-ink:        #11151F;
  --rx-ink-70:     rgba(17,21,31,0.70);
  --rx-ink-40:     rgba(17,21,31,0.40);
  --rx-ink-20:     rgba(17,21,31,0.20);
  --rx-gold:       #D4AF37;
  --rx-gold-deep:  #9C7B12;
  --rx-gold-wash:  #FAF1D7;
  --rx-emerald:    #1A7D4A;
  --rx-emerald-soft: rgba(26,125,74,0.08);
  --rx-rust:       #C0392B;
  --rx-rust-soft:  rgba(192,57,43,0.08);
  --rx-amber:      #d4862a;
  --rx-cyan:       #1E4FBE;

  background: var(--rx-paper);
  color: var(--rx-ink);
  position: relative;
}

/* Paper-grain texture — same SVG noise overlay we use on
 * /sr-rating/. Multiply-blends with the cream body so the
 * cards stop floating on a flat surface. */
.page-explorer::before {
  content: "";
  position: fixed; inset: var(--nav-h, 60px) 0 0 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.08 0 0 0 0 0.12 0 0 0 0.025 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
/* Soft gold corner vignettes — keep the cream from reading as
 * blank Notion paper. Two top-corner glows + one bottom centre. */
.page-explorer::after {
  content: "";
  position: fixed; inset: var(--nav-h, 60px) 0 0 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 40% 30% at 0% 0%,    rgba(212,175,55,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 100% 0%,  rgba(192,57,43,0.05)  0%, transparent 60%),
    radial-gradient(ellipse 60% 25% at 50% 100%, rgba(212,175,55,0.04) 0%, transparent 65%);
}
.page-explorer .rx,
.page-explorer .sb-hero { position: relative; z-index: 1; }

/* ── HERO — overrides on top of .sb-hero--dark ─────────
 * The hero sits BEFORE the .rx wrapper. To close the cream
 * gap caused by .site-main's 60px top padding (which reserves
 * room for the fixed navbar), we zero that padding for this
 * page and bump the hero's own top padding by the same amount
 * so the eyebrow + title stay clear of the floating nav. */
.page-explorer .site-main { padding-top: 0; }
.page-explorer.has-notif-banner .site-main { padding-top: 0; }

.page-explorer .sb-hero--dark.rx-hero {
  margin: 0;
  width: 100%;
}
.page-explorer .sb-hero--dark.rx-hero .sb-hero__inner {
  padding-top: calc(var(--nav-h, 60px) + 28px);
  padding-bottom: 36px;
}
.page-explorer.has-notif-banner .sb-hero--dark.rx-hero .sb-hero__inner {
  padding-top: calc(var(--nav-h, 60px) + 44px + 28px);
}
.rx-hero__beta {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.20em;
  color: #11151F;
  background: var(--rx-gold);
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 10px;
}
.rx-hero__back {
  display: inline-block;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.60);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.30);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.rx-hero__back:hover {
  color: var(--rx-gold);
  border-color: var(--rx-gold);
}

/* ── PAGE WRAPPER ────────────────────────────────────── */
/* v2 — full-viewport working area. The 1720px cap keeps the
 * card grid readable on ultra-wide monitors without hugging
 * the screen edge. */
.rx {
  max-width: 1720px;
  margin: 0 auto;
  padding: 28px 32px 96px;
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif);
}

/* ── MAIN GRID — roster | centre | side ──────────────── */
.rx__grid {
  display: grid;
  grid-template-columns: 220px 1fr 360px;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
}
.rx__centre {
  display: flex; flex-direction: column; gap: 28px;
  min-width: 0;
}
.rx__side {
  display: flex; flex-direction: column; gap: 18px;
  min-width: 0;
}

/* ── PANEL CHROME — reused by every lens ─────────────── */
.rx-panel {
  background: var(--rx-card);
  border: 1px solid var(--rx-rule);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 1px 2px rgba(17, 21, 31, 0.03),
    0 6px 16px rgba(17, 21, 31, 0.04);
  overflow: hidden;
  position: relative;
}
.rx-panel::before {
  content: "";
  position: absolute; top: 0; left: 16px; right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rx-gold), transparent);
  opacity: 0.55;
  pointer-events: none;
}
.rx-panel--wide { grid-column: 1 / -1; }
.rx-panel__head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--rx-rule-soft);
  background: linear-gradient(180deg, rgba(252, 250, 243, 0.6), transparent);
}
.rx-panel__title {
  margin: 0;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--rx-ink);
}
.rx-panel__sub {
  font-size: 10px;
  color: var(--rx-ink-40);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-left: auto;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-weight: 800;
}
.rx-panel__sub--beta {
  color: var(--rx-gold-deep);
  border: 1px solid rgba(212,175,55,0.45);
  background: var(--rx-gold-wash);
  padding: 2px 7px;
  border-radius: 3px;
}
.rx-panel__body { padding: 16px 18px 18px; }

/* Stub variant — placeholder for un-built lenses. */
.rx-panel--stub { opacity: 0.95; background: var(--rx-card-warm); }
.rx-panel__body--stub {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 18px;
  min-height: 110px;
  gap: 10px;
}
.rx-stub__icon { font-size: 24px; color: var(--rx-ink-40); }
.rx-stub__msg {
  margin: 0;
  font-family: 'Iowan Old Style','Charter',Georgia,serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.55;
  color: var(--rx-ink-70);
  max-width: 36ch;
}

/* ── ROSTER ──────────────────────────────────────────── */
/* v2 — sticky quick-nav for the visible card stack. The roster
 * lives in the dark palette to mirror the horse-card headers
 * and to give the page a clear left-rail spine. */
.rx-roster {
  background:
    radial-gradient(circle at 50% -10%, rgba(212, 175, 55, 0.08), transparent 50%),
    linear-gradient(180deg, #0c1018 0%, #161b2c 100%);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 16px;
  padding: 10px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  position: sticky;
  top: 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 16px 36px -16px rgba(11, 14, 21, 0.32);
}
.rx-roster__list { margin: 0; padding: 0; list-style: none; }
.rx-roster__item + .rx-roster__item { margin-top: 4px; }
.rx-roster__card {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: transparent;
  color: #fafaf7;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  font: inherit;
}
.rx-roster__card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.rx-roster__card[aria-current="true"] {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.06));
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow:
    inset 3px 0 0 #d4af37,
    0 2px 10px rgba(212, 175, 55, 0.18);
}
.rx-roster__num {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px; font-weight: 800;
  color: #d4af37;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rx-roster__silk {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-image:
    linear-gradient(45deg,  var(--silk-a) 50%, transparent 50%),
    linear-gradient(135deg, var(--silk-a) 50%, var(--silk-b) 50%);
  background-size: 100% 50%, 100% 50%;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.rx-roster__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rx-roster__name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 13.5px; font-weight: 700;
  color: #fafaf7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.rx-roster__meta {
  display: inline-flex; gap: 10px;
  font-size: 10.5px;
  color: rgba(250, 250, 247, 0.55);
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, system-ui, monospace;
}
.rx-roster__odds { color: #7fb8ff; font-weight: 700; }
.rx-roster__sr   { color: #f1d77b; font-weight: 700; }

/* ──────────────────────────────────────────────────────
   FOCUS ARENA — v2 horse-card design
   ──────────────────────────────────────────────────────
   Each runner is now a self-contained card: dark gradient
   header strip (paper white over deep navy) and a light
   analytics body underneath. Every card is rendered visible;
   the roster click + J/K simply scroll-to + tint the card.
   ────────────────────────────────────────────────────── */

/* The arena itself is just a vertical stack. */
.rx-focus { display: contents; }

.rx-focus__horse {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid rgba(11, 14, 21, 0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 6px rgba(11, 14, 21, 0.04),
    0 16px 36px -16px rgba(11, 14, 21, 0.12);
  scroll-margin-top: 24px;
  transition: box-shadow 0.25s ease, transform 0.25s ease,
              border-color 0.25s ease;
}
.rx-focus__horse:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 6px rgba(11, 14, 21, 0.06),
    0 22px 44px -16px rgba(11, 14, 21, 0.18);
}
/* Focused card — JS sets [data-rx-focused="true"] when the
 * runner is the active one. Gold ring + raised shadow so the
 * eye lands on it immediately. */
.rx-focus__horse[data-rx-focused="true"] {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 0 0 1px rgba(212, 175, 55, 0.35),
    0 6px 16px rgba(212, 175, 55, 0.18),
    0 24px 48px -14px rgba(11, 14, 21, 0.22);
}

/* ── DARK HEADER STRIP ────────────────────────────────── */
.rx-focus__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  background:
    radial-gradient(circle at 0% 50%, rgba(212, 175, 55, 0.10), transparent 40%),
    linear-gradient(180deg, #0c1018 0%, #161b2c 100%);
  color: #fafaf7;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
/* Gold accent rail at the bottom of the dark header. */
.rx-focus__head::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.0) 8%,
    rgba(212, 175, 55, 0.65) 32%,
    rgba(212, 175, 55, 0.85) 50%,
    rgba(212, 175, 55, 0.65) 68%,
    rgba(212, 175, 55, 0.0) 92%,
    transparent 100%);
  pointer-events: none;
}
/* Focused card lights up the gold rail. */
.rx-focus__horse[data-rx-focused="true"] .rx-focus__head::after {
  background: linear-gradient(90deg,
    rgba(212, 175, 55, 0.0) 0%,
    rgba(212, 175, 55, 0.85) 30%,
    #d4af37 50%,
    rgba(212, 175, 55, 0.85) 70%,
    rgba(212, 175, 55, 0.0) 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}

.rx-focus__head-id {
  display: grid;
  grid-template-columns: 56px 40px 1fr;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

/* Saddle number — gold disc, hero element of the header. */
.rx-focus__num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8c659 0%, #b48a14 100%);
  color: #0c1018;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 24px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 3px 10px rgba(212, 175, 55, 0.30),
    0 0 0 2px rgba(255, 255, 255, 0.06);
}
.rx-focus__silk {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background-image:
    linear-gradient(45deg,  var(--silk-a) 50%, transparent 50%),
    linear-gradient(135deg, var(--silk-a) 50%, var(--silk-b) 50%);
  background-size: 100% 50%, 100% 50%;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.rx-focus__head-name { min-width: 0; }
.rx-focus__name {
  margin: 0;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 700;
  color: #fafaf7;
  letter-spacing: -0.012em;
  line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-focus__sub {
  margin: 4px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(250, 250, 247, 0.6);
  display: inline-flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.rx-focus__sub-item { white-space: nowrap; }
.rx-focus__sub-dot { color: rgba(212, 175, 55, 0.5); font-weight: 800; }
.rx-focus__sub-cmp {
  font-size: 10px; font-weight: 800; letter-spacing: 0.10em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  color: #f1d77b;
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.rx-focus__sub-cmp--b {
  background: rgba(46, 116, 220, 0.18);
  color: #b5d1ff;
  border-color: rgba(46, 116, 220, 0.35);
}

/* Stat pills — tighter visual rhythm on the dark surface. */
.rx-focus__stats {
  display: inline-flex; gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rx-focus__stat {
  display: grid; justify-items: center; gap: 4px;
  padding: 8px 14px;
  min-width: 56px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.rx-focus__stat strong {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 20px; font-weight: 700; line-height: 1;
  color: #fafaf7;
  font-variant-numeric: tabular-nums;
}
.rx-focus__stat span {
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(250, 250, 247, 0.5);
  text-transform: uppercase;
  font-family: var(--font-body, 'DM Sans', sans-serif);
}
.rx-focus__stat--odds {
  background: rgba(212, 175, 55, 0.10);
  border-color: rgba(212, 175, 55, 0.32);
}
.rx-focus__stat--odds strong { color: #f1d77b; }
.rx-focus__stat--odds span   { color: rgba(241, 215, 123, 0.7); }

/* ── LIGHT ANALYTICS BODY ─────────────────────────────── */
.rx-focus__lenses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 24px 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.04), transparent 50%),
    linear-gradient(180deg, #fcfaf3 0%, #ffffff 60%);
}
/* The anomaly strip spans both columns — meta signal, top of body. */
.rx-focus__lenses > .rx-anomaly { grid-column: 1 / -1; }
/* Connection heat takes the full row when it's the third lens. */
.rx-focus__lenses > .rx-panel:nth-of-type(3):last-of-type { grid-column: 1 / -1; }

.rx-focus__empty {
  background: var(--rx-card);
  border: 1px dashed var(--rx-rule);
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  color: var(--rx-ink-70);
}
.rx-focus__empty-icon { font-size: 42px; color: var(--rx-ink-40); }
.rx-focus__empty h2 {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  margin: 14px 0 6px;
  color: var(--rx-ink);
}

/* ── LENS — shared row + badge helpers ──────────────── */
.rx-lens__row {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px;
}
.rx-lens__badge {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 11px; font-weight: 700; letter-spacing: 0.10em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}
.rx-lens__badge--climbing { color: var(--rx-emerald); background: var(--rx-emerald-soft); }
.rx-lens__badge--fading   { color: var(--rx-rust);    background: var(--rx-rust-soft); }
.rx-lens__badge--steady   { color: var(--rx-ink-70);  background: var(--rx-rule-soft); border-color: var(--rx-rule); }
.rx-lens__badge--unknown  { color: var(--rx-ink-40);  background: var(--rx-rule-soft); border-color: var(--rx-rule); }
.rx-lens__metric {
  display: inline-flex; align-items: baseline; gap: 6px;
  color: var(--rx-ink-70);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-family: var(--font-body, 'DM Sans', sans-serif);
}
.rx-lens__metric strong {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 22px;
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
}
.rx-lens__empty {
  font-family: 'Iowan Old Style','Charter',Georgia,serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--rx-ink-40);
  margin: 0;
  font-style: italic;
}

/* ── Sparkline ───────────────────────────────────────── */
.rx-spark {
  background: var(--rx-card-warm);
  border: 1px solid var(--rx-rule-soft);
  border-radius: 8px;
  padding: 14px;
}
.rx-spark__svg {
  display: block;
  width: 100%; height: 60px;
  overflow: visible;
}
.rx-spark__axis { stroke: var(--rx-ink-20); stroke-width: 0.4; }
.rx-spark__line {
  stroke: var(--rx-ink-70);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.rx-spark__svg--climbing .rx-spark__line { stroke: var(--rx-emerald); }
.rx-spark__svg--fading   .rx-spark__line { stroke: var(--rx-rust); }
.rx-spark__svg--steady   .rx-spark__line { stroke: var(--rx-cyan); }
.rx-spark__svg--unknown  .rx-spark__line { stroke: var(--rx-ink-40); }

/* ── Going record grid ──────────────────────────────── */
.rx-going__verdict {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px; font-weight: 700;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: center;
  letter-spacing: 0.01em;
}
.rx-going__verdict--specialist { color: #FFF;            background: linear-gradient(135deg, #F5D04A, #D4AF37); box-shadow: 0 3px 10px rgba(212,175,55,0.30); }
.rx-going__verdict--proven     { color: var(--rx-emerald); background: var(--rx-emerald-soft); border: 1px solid rgba(26,125,74,0.35); }
.rx-going__verdict--mixed      { color: var(--rx-ink-70);  background: var(--rx-card-warm);    border: 1px solid var(--rx-rule); }
.rx-going__verdict--avoid      { color: var(--rx-rust);    background: var(--rx-rust-soft);    border: 1px solid rgba(192,57,43,0.35); }
.rx-going__verdict--untested   { color: var(--rx-ink-40);  background: var(--rx-card-warm);    border: 1px solid var(--rx-rule); }

.rx-going__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 0;
}
.rx-going__cell {
  background: var(--rx-card-warm);
  border: 1px solid var(--rx-rule-soft);
  border-radius: 8px;
  padding: 12px 14px;
}
.rx-going__cell dt {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--rx-ink-40); text-transform: uppercase;
  margin-bottom: 6px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
}
.rx-going__cell dd {
  margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.rx-going__cell dd strong {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 19px; font-weight: 700;
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.rx-going__cell dd span {
  font-size: 10.5px;
  color: var(--rx-ink-70);
  font-variant-numeric: tabular-nums;
}

/* ── PANEL ICON ──────────────────────────────────────── */
.rx-panel__icon {
  display: inline-block;
  margin-right: 6px;
  font-size: 14px;
  opacity: 0.85;
  vertical-align: -1px;
}

/* ── FIELD-COMPARE LINE (shared by every lens) ───────── */
.rx-lens__field {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--rx-card-warm);
  border-radius: 8px;
  border: 1px solid var(--rx-rule-soft);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rx-ink-40);
  text-transform: uppercase;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.rx-lens__field strong {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--rx-ink);
  letter-spacing: -0.01em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.rx-lens__field-sep { color: var(--rx-ink-20); }
.rx-lens__field-delta {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.rx-lens__field-delta--up   { color: var(--rx-emerald); background: var(--rx-emerald-soft); border: 1px solid rgba(26,125,74,0.30); }
.rx-lens__field-delta--down { color: var(--rx-rust);    background: var(--rx-rust-soft);    border: 1px solid rgba(192,57,43,0.30); }

/* ── FORM LENS — headline lockup + rich sparkline ────── */
.rx-form__lockup {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: -4px 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rx-rule-soft);
}
.rx-form__delta {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 42px; font-weight: 700; line-height: 1;
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rx-form__delta span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
}
.rx-form__delta--climbing { color: var(--rx-emerald); }
.rx-form__delta--fading   { color: var(--rx-rust); }
.rx-form__delta--steady,
.rx-form__delta--unknown  { color: var(--rx-ink-70); }
.rx-form__sub {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 6px;
  padding-bottom: 4px;
}
.rx-form__pill {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.rx-form__pill--climbing { color: var(--rx-emerald); background: var(--rx-emerald-soft); }
.rx-form__pill--fading   { color: var(--rx-rust);    background: var(--rx-rust-soft); }
.rx-form__pill--steady   { color: var(--rx-ink-70);  background: var(--rx-card-warm); border-color: var(--rx-rule); }
.rx-form__pill--unknown  { color: var(--rx-ink-40);  background: var(--rx-card-warm); border-color: var(--rx-rule); }
.rx-form__strong {
  font-family: 'Iowan Old Style','Charter',Georgia,serif;
  font-style: italic;
  font-size: 12px;
  color: var(--rx-ink-70);
}

.rx-spark--rich { padding: 14px 14px 8px; }
.rx-spark--rich .rx-spark__svg { height: 88px; }
.rx-spark__area  { opacity: 0.40; }
.rx-spark__dot   { fill: var(--rx-card); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rx-spark__svg--climbing .rx-spark__dot { stroke: var(--rx-emerald); }
.rx-spark__svg--fading   .rx-spark__dot { stroke: var(--rx-rust); }
.rx-spark__svg--steady   .rx-spark__dot { stroke: var(--rx-cyan); }
.rx-spark__svg--unknown  .rx-spark__dot { stroke: var(--rx-ink-40); }
.rx-spark__svg--climbing .rx-spark__fill-stop1 { stop-color: var(--rx-emerald); stop-opacity: 0.30; }
.rx-spark__svg--climbing .rx-spark__fill-stop2 { stop-color: var(--rx-emerald); stop-opacity: 0; }
.rx-spark__svg--fading   .rx-spark__fill-stop1 { stop-color: var(--rx-rust);    stop-opacity: 0.30; }
.rx-spark__svg--fading   .rx-spark__fill-stop2 { stop-color: var(--rx-rust);    stop-opacity: 0; }
.rx-spark__svg--steady   .rx-spark__fill-stop1 { stop-color: var(--rx-cyan);    stop-opacity: 0.18; }
.rx-spark__svg--steady   .rx-spark__fill-stop2 { stop-color: var(--rx-cyan);    stop-opacity: 0; }
.rx-spark__svg--unknown  .rx-spark__fill-stop1 { stop-color: var(--rx-ink-40);  stop-opacity: 0.12; }
.rx-spark__svg--unknown  .rx-spark__fill-stop2 { stop-color: var(--rx-ink-40);  stop-opacity: 0; }
.rx-spark__axis-labels {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
}

/* ── GOING LENS — dial + stacked bars + dots ─────────── */
.rx-going__top {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.rx-going__head { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rx-going__verdict {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 17px; font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.01em;
  display: inline-block; align-self: flex-start;
}
.rx-going__line {
  margin: 0;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 12px;
  color: var(--rx-ink-70);
}
.rx-going__line strong {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
}
.rx-going__line-sep { color: var(--rx-ink-20); margin: 0 4px; }

/* Radial dial */
.rx-dial {
  width: 78px; height: 78px;
  filter: drop-shadow(0 2px 6px rgba(17,21,31,0.06));
}
.rx-dial__track { stroke: var(--rx-rule); }
.rx-dial__arc {
  stroke: var(--rx-ink);
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.rx-dial--specialist .rx-dial__arc { stroke: var(--rx-gold-deep); }
.rx-dial--proven     .rx-dial__arc { stroke: var(--rx-emerald); }
.rx-dial--mixed      .rx-dial__arc { stroke: var(--rx-ink-70); }
.rx-dial--avoid      .rx-dial__arc { stroke: var(--rx-rust); }
.rx-dial--untested   .rx-dial__arc { stroke: var(--rx-ink-40); }
.rx-dial--gold       .rx-dial__arc { stroke: var(--rx-gold-deep); }
.rx-dial--emerald    .rx-dial__arc { stroke: var(--rx-emerald); }
.rx-dial--rust       .rx-dial__arc { stroke: var(--rx-rust); }
.rx-dial--neutral    .rx-dial__arc { stroke: var(--rx-ink-70); }
.rx-dial__pct {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px;
  font-weight: 800;
  fill: var(--rx-ink);
  font-variant-numeric: tabular-nums;
}
.rx-dial__unit { font-size: 10px; fill: var(--rx-ink-40); font-weight: 700; }

/* Stacked bar */
.rx-going__bars {
  display: flex;
  width: 100%; height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--rx-rule);
}
.rx-going__bar {
  height: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.rx-going__bar--win   { background: linear-gradient(135deg, #F5D04A, var(--rx-gold-deep)); }
.rx-going__bar--place { background: linear-gradient(135deg, #6BAA88, var(--rx-emerald)); }
.rx-going__bar--also  { background: var(--rx-ink-20); color: var(--rx-ink-70); text-shadow: none; }

.rx-going__legend {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; gap: 14px;
  font-size: 10.5px;
  color: var(--rx-ink-40);
  font-family: var(--font-body, 'DM Sans', sans-serif);
}
.rx-going__legend li { display: inline-flex; align-items: center; gap: 5px; }
.rx-going__sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.rx-going__sw--win   { background: linear-gradient(135deg, #F5D04A, var(--rx-gold-deep)); }
.rx-going__sw--place { background: linear-gradient(135deg, #6BAA88, var(--rx-emerald)); }
.rx-going__sw--also  { background: var(--rx-ink-20); }

/* ── CONFIDENCE DOTS ────────────────────────────────── */
.rx-conf {
  display: inline-flex; gap: 4px; align-items: center;
  margin-top: 2px;
}
.rx-conf__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rx-ink-20);
  transition: background 0.2s, transform 0.2s;
}
.rx-conf__dot--on {
  background: var(--rx-gold);
  box-shadow: 0 0 4px rgba(212,175,55,0.45);
}

/* Dimensional card upgrades — soft inner glow + hover lift. */
.rx-panel {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rx-panel:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 1px 3px rgba(17,21,31,0.04),
    0 12px 28px rgba(17,21,31,0.07);
}
.rx-panel::before {
  transition: opacity 0.6s ease;
}
/* v2 — every horse card is rendered, so the old fade-in
 * animation tied to `:not([hidden])` no longer applies.
 * The panel gold-rail reveal still runs on initial paint. */
.rx-focus__horse .rx-panel::before {
  animation: rx-rule-reveal 0.6s ease-out;
}
@keyframes rx-rule-reveal {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 0.55; }
}
.rx-panel::before {
  transform-origin: center;
}

/* ── COMPARE SLOT (Phase 5) ─────────────────────────
 * Right-rail panel with three states:
 *   empty  → hint + keyboard shortcut prompt
 *   one    → first slot filled, prompt for the second
 *   full   → A/B diff table with per-metric winner highlight
 * Slot A is gold-tinted, Slot B is cyan-tinted — matching the
 * roster badges so the cub can see which runner is which at a
 * glance across the page. */
.rx-cmp__clear {
  margin-left: auto;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--rx-rule);
  background: var(--rx-card-warm);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.rx-cmp__clear:hover {
  color: var(--rx-rust);
  border-color: rgba(192,57,43,0.40);
  background: var(--rx-rust-soft);
}
.rx-cmp__body { padding: 14px 14px 16px; }

/* Empty / one-selected hint */
.rx-cmp__hint {
  font-family: 'Iowan Old Style', 'Charter', Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--rx-ink-70);
  background: var(--rx-card-warm);
  border: 1px dashed var(--rx-rule);
  border-radius: 8px;
  padding: 14px 14px;
}
.rx-cmp__hint p { margin: 0; }
.rx-cmp__hint p + p { margin-top: 8px; }
.rx-cmp__hint kbd {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  background: var(--rx-card);
  border: 1px solid var(--rx-rule);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--rx-ink);
}
.rx-cmp__hint--one .rx-cmp__seat {
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.04));
  border-left: 4px solid var(--rx-gold);
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  display: flex; flex-direction: column; gap: 2px;
}

/* Full state — runner header + diff rows + verdict */
.rx-cmp__header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rx-cmp__seat {
  appearance: none; border: none;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--rx-card-warm);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--rx-ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.rx-cmp__seat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17,21,31,0.08);
}
.rx-cmp__seat--a {
  border-left: 4px solid var(--rx-gold-deep);
  background: linear-gradient(135deg, rgba(212,175,55,0.16), rgba(212,175,55,0.04));
}
.rx-cmp__seat--b {
  border-left: 4px solid var(--rx-cyan);
  background: linear-gradient(135deg, rgba(30,79,190,0.14), rgba(30,79,190,0.04));
}
.rx-cmp__seat-lbl {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
}
.rx-cmp__seat-name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 14px; font-weight: 700;
  color: var(--rx-ink);
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.rx-cmp__seat-sub {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--rx-ink-70);
}
.rx-cmp__vs {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 700;
  color: var(--rx-gold-deep);
}

/* Diff rows */
.rx-cmp__rows {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 4px;
}
.rx-cmp__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 6px;
}
.rx-cmp__row--a { background: linear-gradient(90deg, rgba(212,175,55,0.10), transparent 60%); }
.rx-cmp__row--b { background: linear-gradient(-90deg, rgba(30,79,190,0.10), transparent 60%); }
.rx-cmp__cell {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--rx-ink);
}
.rx-cmp__cell--a { text-align: right; }
.rx-cmp__cell--b { text-align: left; }
.rx-cmp__cell--gold    { color: var(--rx-gold-deep); }
.rx-cmp__cell--neutral { color: var(--rx-ink-40); }
.rx-cmp__cell--na,
.rx-cmp__cell--tie     { color: var(--rx-ink-40); font-weight: 400; }
.rx-cmp__lbl {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
  text-align: center;
  padding: 0 4px;
}

/* Verdict footer */
.rx-cmp__verdict {
  margin-top: 12px;
  padding: 10px 12px;
  font-family: 'Iowan Old Style', 'Charter', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 8px;
  border: 1px solid var(--rx-rule);
  background: var(--rx-card-warm);
}
.rx-cmp__verdict strong { font-style: normal; color: var(--rx-ink); font-weight: 700; }
.rx-cmp__verdict--a   { border-left: 4px solid var(--rx-gold-deep); background: rgba(212,175,55,0.06); }
.rx-cmp__verdict--b   { border-left: 4px solid var(--rx-cyan);      background: rgba(30,79,190,0.06); }
.rx-cmp__verdict--tie { border-left: 4px solid var(--rx-ink-20); }
.rx-cmp__verdict--na  { color: var(--rx-ink-40); }

/* ── Roster — compare toggle button + in-compare badge ── */
.rx-roster__item {
  position: relative;
  display: flex; align-items: center;
}
.rx-roster__item .rx-roster__card { flex: 1; min-width: 0; }
.rx-roster__cmp {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(250, 250, 247, 0.55);
  width: 26px; height: 26px;
  border-radius: 6px;
  margin-left: 4px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, transform 0.15s ease;
}
.rx-roster__cmp:hover {
  border-color: rgba(212, 175, 55, 0.6);
  color: #f1d77b;
  background: rgba(212, 175, 55, 0.10);
  transform: scale(1.08);
}
.rx-roster__cmp--on {
  background: var(--rx-gold);
  color: #FFF;
  border-color: var(--rx-gold-deep);
}
.rx-roster__cmp--on:hover { background: var(--rx-gold-deep); transform: scale(1.08); }

.rx-roster__cmp-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.14em;
  color: #FFF;
  background: var(--rx-gold);
}
.rx-roster__item--compare-b .rx-roster__cmp-badge {
  background: var(--rx-cyan);
}
.rx-roster__item--compare-b .rx-roster__cmp--on {
  background: var(--rx-cyan);
  border-color: #143E94;
}
.rx-roster__item--compare-b .rx-roster__cmp--on:hover { background: #143E94; }

/* In-compare highlight in the market floor + pace/draw chips */
.rx-axis__chip--cmp-a { box-shadow: 0 0 0 3px var(--rx-gold) inset, 0 4px 12px rgba(156,123,18,0.30); }
.rx-axis__chip--cmp-b { box-shadow: 0 0 0 3px var(--rx-cyan) inset, 0 4px 12px rgba(30,79,190,0.25); }

/* ── AXIS PANELS (Phase 4 — Pace Map + Draw Map) ────
 * Side-rail panels showing every runner on a single
 * horizontal axis. Pace = FRONT ↔ REAR by running
 * style; Draw = LOW ↔ HIGH by stall position. Each
 * runner is a small chip the cub can click to focus
 * that horse in the centre arena. */
.rx-axis__body { padding: 14px 14px 16px; }
.rx-axis__verdict {
  display: inline-block;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 14px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.rx-axis__verdict--fast    { color: #FFF;             background: linear-gradient(135deg, #ff6b3d, #C0392B); box-shadow: 0 3px 10px rgba(192,57,43,0.28); }
.rx-axis__verdict--slow    { color: var(--rx-cyan);   background: rgba(30,79,190,0.10); border: 1px solid rgba(30,79,190,0.35); }
.rx-axis__verdict--steady  { color: var(--rx-ink-70); background: var(--rx-card-warm); border: 1px solid var(--rx-rule); }
.rx-axis__verdict--unknown { color: var(--rx-ink-40); background: var(--rx-card-warm); border: 1px solid var(--rx-rule); }
.rx-axis__caption {
  margin: 0 0 14px;
  font-family: 'Iowan Old Style','Charter',Georgia,serif;
  font-style: italic;
  font-size: 12px;
  line-height: 1.5;
  color: var(--rx-ink-70);
}
.rx-axis__caption--note {
  font-size: 11px;
  color: var(--rx-ink-40);
}

/* The axis track itself — full-width, fixed-height row with the
 * line in the middle and chips absolutely positioned along it. */
.rx-axis__track {
  position: relative;
  height: 48px;
  margin: 18px 4px 6px;
  padding: 0 18px;
}
.rx-axis__axis-line {
  position: absolute;
  left: 16px; right: 16px;
  top: 50%; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--rx-ink-20) 8%,
    var(--rx-ink-20) 92%,
    transparent 100%);
  border-radius: 999px;
  transform: translateY(-50%);
}
.rx-axis__tick {
  position: absolute;
  top: 100%; margin-top: 4px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
  white-space: nowrap;
}
.rx-axis__tick--left  { left: 0;  text-align: left; }
.rx-axis__tick--right { right: 0; text-align: right; }

/* Runner chip — circular, hover-lifts, clickable, syncs with
 * focus state via the shared data-rx-focus attribute. */
.rx-axis__chip {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  appearance: none;
  border: 2px solid #fff;
  background: var(--rx-card-warm);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(17,21,31,0.18);
  transition: transform 0.15s, box-shadow 0.15s, z-index 0s;
  z-index: 1;
}
.rx-axis__chip:hover {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 4px 14px rgba(17,21,31,0.30);
  z-index: 5;
}
.rx-axis__chip--focus {
  outline: 3px solid var(--rx-gold);
  outline-offset: 1px;
  box-shadow: 0 4px 14px rgba(156,123,18,0.40);
  z-index: 4;
}
.rx-axis__chip-num {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 13px; font-weight: 800; line-height: 1;
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
}
.rx-axis__chip--red      { background: var(--rx-rust);     border-color: var(--rx-card); }
.rx-axis__chip--red      .rx-axis__chip-num { color: #fff; }
.rx-axis__chip--amber    { background: #d4862a;            border-color: var(--rx-card); }
.rx-axis__chip--amber    .rx-axis__chip-num { color: #fff; }
.rx-axis__chip--neutral  { background: var(--rx-card-warm); border-color: var(--rx-rule); }
.rx-axis__chip--cyan     { background: var(--rx-cyan);     border-color: var(--rx-card); }
.rx-axis__chip--cyan     .rx-axis__chip-num { color: #fff; }
.rx-axis__chip--emerald  { background: var(--rx-emerald);  border-color: var(--rx-card); }
.rx-axis__chip--emerald  .rx-axis__chip-num { color: #fff; }
/* Draw bands — softer pastel tints since draw is positional, not
 * judgmental. */
.rx-axis__chip--draw-low  { background: linear-gradient(135deg, #FFFCE0, #F5D04A); border-color: var(--rx-card); }
.rx-axis__chip--draw-mid  { background: var(--rx-card-warm); border-color: var(--rx-rule); }
.rx-axis__chip--draw-high { background: linear-gradient(135deg, #E0F0F6, #6BAEC8); border-color: var(--rx-card); }

/* Style legend strip below the chart. */
.rx-axis__legend {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 10px; letter-spacing: 0.04em;
  color: var(--rx-ink-70);
  font-family: var(--font-body, 'DM Sans', sans-serif);
}
.rx-axis__legend li { display: inline-flex; align-items: center; gap: 5px; }
.rx-axis__sw {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.10);
}
.rx-axis__sw--red     { background: var(--rx-rust); }
.rx-axis__sw--amber   { background: #d4862a; }
.rx-axis__sw--neutral { background: var(--rx-card-warm); border-color: var(--rx-rule); }
.rx-axis__sw--cyan    { background: var(--rx-cyan); }
.rx-axis__sw--emerald { background: var(--rx-emerald); }

/* Draw-map extremes pair — lowest + highest stall callout cards. */
.rx-axis__extremes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.rx-axis__extreme {
  appearance: none; border: 1px solid var(--rx-rule);
  background: var(--rx-card-warm);
  padding: 8px 10px;
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 2px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rx-axis__extreme:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17,21,31,0.07);
}
.rx-axis__extreme--low  { border-left: 4px solid #d4862a; }
.rx-axis__extreme--low:hover  { border-color: #d4862a; }
.rx-axis__extreme--high { border-left: 4px solid var(--rx-cyan); }
.rx-axis__extreme--high:hover { border-color: var(--rx-cyan); }
.rx-axis__extreme-lbl {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
}
.rx-axis__extreme-name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 13px; font-weight: 700;
  color: var(--rx-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-axis__extreme-stall {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--rx-ink-70);
  font-variant-numeric: tabular-nums;
}

/* ── CONNECTION HEAT (Phase 3) ──────────────────────
 * Three stacked rows — jockey, trainer, pairing — each
 * with a role badge, name + sub-line, and a big win %.
 * The pairing row is the headline: it gets a deeper
 * background tint and the row's left rule is coloured
 * by the heat verdict so the eye finds the answer fast. */
.rx-conn__verdict {
  display: inline-block;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 16px; font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.rx-conn__verdict--pairing-fire { color: #FFF; background: linear-gradient(135deg, #ff6b3d, #C0392B); box-shadow: 0 4px 12px rgba(192,57,43,0.32); }
.rx-conn__verdict--pairing-warm { color: var(--rx-rust); background: var(--rx-rust-soft); border: 1px solid rgba(192,57,43,0.35); }
.rx-conn__verdict--high-both    { color: var(--rx-gold-deep); background: var(--rx-gold-wash); border: 1px solid rgba(212,175,55,0.4); }
.rx-conn__verdict--high-jockey,
.rx-conn__verdict--high-trainer { color: var(--rx-emerald); background: var(--rx-emerald-soft); border: 1px solid rgba(26,125,74,0.35); }
.rx-conn__verdict--cold         { color: var(--rx-ink-70); background: var(--rx-card-warm); border: 1px solid var(--rx-rule); }
.rx-conn__verdict--mixed        { color: var(--rx-ink-70); background: var(--rx-card-warm); border: 1px solid var(--rx-rule); }
.rx-conn__verdict--untracked    { color: var(--rx-ink-40); background: var(--rx-card-warm); border: 1px solid var(--rx-rule); }

.rx-conn__stack {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.rx-conn__row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--rx-card-warm);
  border: 1px solid var(--rx-rule-soft);
  border-radius: 8px;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.rx-conn__row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(17,21,31,0.05);
}
.rx-conn__role {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--rx-card);
  color: var(--rx-ink);
  border: 1px solid var(--rx-rule);
}
.rx-conn__row--jockey  .rx-conn__role { background: var(--rx-card);   color: var(--rx-cyan);       border-color: rgba(30,79,190,0.30); }
.rx-conn__row--trainer .rx-conn__role { background: var(--rx-card);   color: var(--rx-gold-deep);  border-color: rgba(212,175,55,0.40); }
.rx-conn__role--pair {
  background: linear-gradient(135deg, var(--rx-cyan), var(--rx-gold-deep));
  color: #fff;
  border-color: rgba(0,0,0,0.10);
  font-size: 11px;
}
.rx-conn__body {
  min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.rx-conn__name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 15px; font-weight: 700;
  color: var(--rx-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-conn__sub {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 11px;
  color: var(--rx-ink-40);
  letter-spacing: 0.02em;
}
.rx-conn__pct {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  font-family: ui-monospace, monospace;
  text-align: right;
  min-width: 56px;
}
.rx-conn__pct strong {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
}
.rx-conn__pct span {
  margin-top: 2px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--rx-ink-40);
  text-transform: uppercase;
}

/* Pairing row — deeper background + verdict-coloured left rule */
.rx-conn__row--pairing {
  background: var(--rx-card);
  border: 1px solid var(--rx-rule);
  box-shadow:
    inset 5px 0 0 var(--rx-ink-20),
    0 2px 6px rgba(17,21,31,0.05);
}
.rx-conn__row--pairing-pairing-fire {
  box-shadow:
    inset 5px 0 0 var(--rx-rust),
    0 4px 12px rgba(192,57,43,0.18);
}
.rx-conn__row--pairing-pairing-fire .rx-conn__pct strong { color: var(--rx-rust); }
.rx-conn__row--pairing-pairing-warm {
  box-shadow:
    inset 5px 0 0 var(--rx-rust),
    0 2px 8px rgba(192,57,43,0.10);
}
.rx-conn__row--pairing-pairing-warm .rx-conn__pct strong { color: var(--rx-rust); }
.rx-conn__row--pairing-high-both {
  box-shadow:
    inset 5px 0 0 var(--rx-gold-deep),
    0 2px 8px rgba(212,175,55,0.12);
}
.rx-conn__row--pairing-high-jockey,
.rx-conn__row--pairing-high-trainer {
  box-shadow:
    inset 5px 0 0 var(--rx-emerald),
    0 2px 8px rgba(26,125,74,0.10);
}
.rx-conn__row--pairing-cold,
.rx-conn__row--pairing-mixed,
.rx-conn__row--pairing-untracked {
  box-shadow: inset 5px 0 0 var(--rx-ink-20);
}

/* ── MARKET FLOOR (Phase 2) ──────────────────────────
 * Wide bottom panel. Field-level summary chips at the top,
 * then a vertical list with one row per runner showing
 * opening → current price + a movement bar + direction
 * badge. Click any row to focus that runner in the centre. */
.rx-floor__head { gap: 8px; }
.rx-floor__body { padding: 12px 14px 16px; }

/* Summary row — counts + biggest steamer + biggest drifter */
.rx-floor__summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0 14px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--rx-rule-soft);
}
.rx-floor__chip {
  display: inline-flex; flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--rx-card-warm);
  border: 1px solid var(--rx-rule);
  min-width: 86px;
}
.rx-floor__chip-num {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 22px; font-weight: 700; line-height: 1;
  color: var(--rx-ink);
  font-variant-numeric: tabular-nums;
}
.rx-floor__chip-lbl {
  margin-top: 4px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
}
.rx-floor__chip--steamers .rx-floor__chip-num { color: var(--rx-emerald); }
.rx-floor__chip--steamers { border-color: rgba(26,125,74,0.30); background: var(--rx-emerald-soft); }
.rx-floor__chip--drifters .rx-floor__chip-num { color: var(--rx-rust); }
.rx-floor__chip--drifters { border-color: rgba(192,57,43,0.30); background: var(--rx-rust-soft); }

.rx-floor__mover {
  appearance: none; border: none;
  display: inline-flex; flex-direction: column;
  align-items: flex-start; gap: 2px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--rx-card-warm);
  border: 1px solid var(--rx-rule);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  flex: 1; min-width: 200px;
}
.rx-floor__mover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17,21,31,0.08);
}
.rx-floor__mover--in  { border-left: 4px solid var(--rx-emerald); }
.rx-floor__mover--in:hover  { border-color: var(--rx-emerald); }
.rx-floor__mover--out { border-left: 4px solid var(--rx-rust); }
.rx-floor__mover--out:hover { border-color: var(--rx-rust); }
.rx-floor__mover-lbl {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rx-ink-40);
}
.rx-floor__mover-horse {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 16px; font-weight: 700;
  color: var(--rx-ink);
  line-height: 1.1;
}
.rx-floor__mover-prices {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--rx-ink-70);
}
.rx-floor__mover-pct {
  margin-top: 2px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rx-floor__mover--in  .rx-floor__mover-pct { color: var(--rx-emerald); }
.rx-floor__mover--out .rx-floor__mover-pct { color: var(--rx-rust); }

/* Runner rows */
.rx-floor__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.rx-floor__row + .rx-floor__row { border-top: 1px solid var(--rx-rule-soft); }
.rx-floor__row-btn {
  width: 100%;
  appearance: none; border: none; background: transparent;
  display: grid;
  grid-template-columns: 36px 24px minmax(140px, 1.3fr) minmax(120px, auto) minmax(160px, 1fr) 70px 90px;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--rx-ink);
  transition: background 0.12s, padding-left 0.12s;
}
.rx-floor__row-btn:hover {
  background: var(--rx-card-warm);
  padding-left: 8px;
}
.rx-floor__row--focus .rx-floor__row-btn {
  background: linear-gradient(90deg, rgba(212,175,55,0.12), transparent 70%);
  box-shadow: inset 3px 0 0 var(--rx-gold);
}
.rx-floor__num {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px; font-weight: 700;
  color: var(--rx-gold-deep);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rx-floor__silk {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--rx-ink-20);
  background-image:
    linear-gradient(45deg,  var(--silk-a) 50%, transparent 50%),
    linear-gradient(135deg, var(--silk-a) 50%, var(--silk-b) 50%);
  background-size: 100% 50%, 100% 50%;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
}
.rx-floor__name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 14px; font-weight: 700;
  color: var(--rx-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-floor__prices {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--rx-ink-70);
  font-variant-numeric: tabular-nums;
}
.rx-floor__open    { color: var(--rx-ink-40); }
.rx-floor__arrow   { color: var(--rx-ink-20); font-size: 10px; }
.rx-floor__current { color: var(--rx-ink); font-weight: 700; }
.rx-floor__current--untracked { color: var(--rx-ink-40); font-weight: 400; }

.rx-floor__bar {
  position: relative;
  height: 8px;
  background: var(--rx-rule);
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
}
.rx-floor__bar-fill {
  position: absolute; top: 0; bottom: 0;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.rx-floor__bar-fill--steamer {
  left: 0;
  background: linear-gradient(90deg, var(--rx-emerald) 0%, #6BAA88 100%);
}
.rx-floor__bar-fill--drifter {
  left: 0;
  background: linear-gradient(90deg, var(--rx-rust) 0%, #D8918A 100%);
}
.rx-floor__bar-fill--flat {
  background: var(--rx-ink-20);
}

.rx-floor__pct {
  font-family: ui-monospace, monospace;
  font-size: 13px; font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rx-floor__pct--steamer { color: var(--rx-emerald); }
.rx-floor__pct--drifter { color: var(--rx-rust); }
.rx-floor__pct--flat    { color: var(--rx-ink-40); }
.rx-floor__pct--untracked { color: var(--rx-ink-20); }

.rx-floor__badge {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
  text-align: center;
}
.rx-floor__badge--steamer   { color: var(--rx-emerald); background: var(--rx-emerald-soft); }
.rx-floor__badge--drifter   { color: var(--rx-rust);    background: var(--rx-rust-soft); }
.rx-floor__badge--flat      { color: var(--rx-ink-40);  background: var(--rx-card-warm); border-color: var(--rx-rule); }
.rx-floor__badge--untracked { color: var(--rx-ink-20);  background: transparent;        border-color: var(--rx-rule); }

@media (max-width: 900px) {
  .rx-floor__row-btn {
    grid-template-columns: 30px 22px 1fr 80px;
    grid-template-areas:
      'num silk name pct'
      'num silk prices badge';
    row-gap: 2px;
    padding: 8px 4px;
  }
  .rx-floor__num    { grid-area: num; }
  .rx-floor__silk   { grid-area: silk; }
  .rx-floor__name   { grid-area: name; }
  .rx-floor__prices { grid-area: prices; }
  .rx-floor__pct    { grid-area: pct; }
  .rx-floor__badge  { grid-area: badge; justify-self: end; }
  .rx-floor__bar    { display: none; }
}

/* ──────────────────────────────────────────────────────────
   Phase 6 — Anomaly Chip
   ──────────────────────────────────────────────────────────
   • Roster badge: a small ▲ + count next to the horse name,
     tinted by the strongest tone on the runner.
   • Focus arena chip strip: a panel above the form/going/heat
     lenses showing each chip with full narrative.
   • Side panel: field-level rollup with gold/amber/rust counts,
     a "top value" and "top trap" highlight, and a quick list
     of every flagged runner.
   ────────────────────────────────────────────────────────── */

/* Roster anomaly badge — small triangle + count after the name. */
.rx-roster__anom-badge {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: 6px;
  padding: 1px 6px 1px 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--paper-ink-90, #1c1c1c);
  border: 1px solid rgba(212, 175, 55, 0.55);
  vertical-align: middle;
  line-height: 1;
}
.rx-roster__anom-badge span { font-size: 8px; line-height: 1; }
.rx-roster__anom-badge--gold {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.55);
  color: #6b5310;
}
.rx-roster__anom-badge--amber {
  background: rgba(229, 159, 49, 0.18);
  border-color: rgba(229, 159, 49, 0.55);
  color: #7a4a08;
}
.rx-roster__anom-badge--rust {
  background: rgba(192, 57, 43, 0.18);
  border-color: rgba(192, 57, 43, 0.6);
  color: #8a2820;
}

/* Focus arena strip — chip panel above the lenses. */
.rx-anomaly {
  grid-column: 1 / -1;
  padding: 14px 16px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fafaf3 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}
.rx-anomaly::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: rgba(212, 175, 55, 0.7);
}
.rx-anomaly--tone-amber::before { background: rgba(229, 159, 49, 0.7); }
.rx-anomaly--tone-rust::before  { background: rgba(192, 57, 43, 0.8); }

.rx-anomaly__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.rx-anomaly__title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--paper-ink-70, #444);
  display: inline-flex; align-items: center; gap: 6px;
}
.rx-anomaly__title-icon { color: #d4af37; font-size: 14px; }
.rx-anomaly--tone-amber .rx-anomaly__title-icon { color: #e59f31; }
.rx-anomaly--tone-rust  .rx-anomaly__title-icon { color: #c0392b; }
.rx-anomaly__count {
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--paper-ink-50, #777);
}

.rx-anomaly__chips {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
}
.rx-anomaly__chip {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px; align-items: flex-start;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  border-left: 3px solid rgba(212, 175, 55, 0.7);
}
.rx-anomaly__chip--amber { border-left-color: rgba(229, 159, 49, 0.7); }
.rx-anomaly__chip--rust  { border-left-color: rgba(192, 57, 43, 0.85); }
.rx-anomaly__chip-icon {
  font-size: 18px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.16);
  color: #8a6f11;
}
.rx-anomaly__chip--amber .rx-anomaly__chip-icon {
  background: rgba(229, 159, 49, 0.16); color: #8a4f0c;
}
.rx-anomaly__chip--rust .rx-anomaly__chip-icon {
  background: rgba(192, 57, 43, 0.14); color: #a22a20;
}
.rx-anomaly__chip-body { display: grid; gap: 4px; }
.rx-anomaly__chip-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--paper-ink-90, #1c1c1c);
}
.rx-anomaly__chip-narrative {
  font-size: 12.5px; line-height: 1.45;
  color: var(--paper-ink-70, #444);
}
.rx-anomaly__chip-lenses {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 2px;
}
.rx-anomaly__lens-tag {
  font-size: 9.5px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-ink-50, #777);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Empty state inside the focus arena. */
.rx-anomaly--empty {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
}
.rx-anomaly--empty::before { display: none; }
.rx-anomaly__empty-icon {
  font-size: 22px; color: var(--paper-ink-50, #777);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  flex: 0 0 32px;
}
.rx-anomaly__empty-copy {
  font-size: 12.5px; color: var(--paper-ink-70, #444);
  line-height: 1.45;
}
.rx-anomaly__empty-copy strong {
  display: block; color: var(--paper-ink-90, #1c1c1c);
  margin-bottom: 2px;
}

/* ── Side panel — Anomalies ─────────────────────────── */
.rx-anomalies__body { padding: 0 14px 14px; display: grid; gap: 10px; }

.rx-anomalies__totals {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.rx-anomalies__total {
  padding: 8px 4px; text-align: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.rx-anomalies__total-num {
  display: block;
  font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rx-anomalies__total-lbl {
  display: block;
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--paper-ink-50, #777);
  margin-top: 2px;
}
.rx-anomalies__total--gold  .rx-anomalies__total-num { color: #b48a14; }
.rx-anomalies__total--amber .rx-anomalies__total-num { color: #c47821; }
.rx-anomalies__total--rust  .rx-anomalies__total-num { color: #b53527; }

/* Highlight buttons — top value & top trap. */
.rx-anomalies__highlight {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "tag chip"
    "name chip";
  gap: 2px 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 3px solid rgba(212, 175, 55, 0.85);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font: inherit; color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.rx-anomalies__highlight:hover {
  background: #fdfaee;
  border-left-color: #d4af37;
}
.rx-anomalies__highlight--rust { border-left-color: rgba(192, 57, 43, 0.85); }
.rx-anomalies__highlight--rust:hover {
  background: #fdf3f1;
  border-left-color: #c0392b;
}
.rx-anomalies__hl-tag {
  grid-area: tag;
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--paper-ink-50, #777);
}
.rx-anomalies__hl-name {
  grid-area: name;
  font-size: 13px; font-weight: 700;
  color: var(--paper-ink-90, #1c1c1c);
}
.rx-anomalies__hl-chip {
  grid-area: chip; align-self: center;
  font-size: 11px; font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  color: #6b5310;
  white-space: nowrap;
}
.rx-anomalies__highlight--rust .rx-anomalies__hl-chip {
  background: rgba(192, 57, 43, 0.16);
  color: #8a2820;
}

/* The flagged-runner list. */
.rx-anomalies__list {
  list-style: none; margin: 4px 0 0; padding: 0;
  display: grid; gap: 4px;
}
.rx-anomalies__row-btn {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 8px; align-items: center;
  width: 100%;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit; color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.rx-anomalies__row-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}
.rx-anomalies__row-num {
  width: 26px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: var(--paper-ink-90, #1c1c1c);
  border-radius: 4px;
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rx-anomalies__row--gold  .rx-anomalies__row-num { background: rgba(212, 175, 55, 0.22); color: #6b5310; }
.rx-anomalies__row--amber .rx-anomalies__row-num { background: rgba(229, 159, 49, 0.22); color: #7a4a08; }
.rx-anomalies__row--rust  .rx-anomalies__row-num { background: rgba(192, 57, 43, 0.18); color: #8a2820; }
.rx-anomalies__row-name {
  font-size: 12.5px; color: var(--paper-ink-90, #1c1c1c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rx-anomalies__row-chips { display: inline-flex; gap: 3px; }
.rx-anomalies__row-chip {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 11px;
}
.rx-anomalies__row-chip--gold  { background: rgba(212, 175, 55, 0.22); color: #6b5310; }
.rx-anomalies__row-chip--amber { background: rgba(229, 159, 49, 0.22); color: #7a4a08; }
.rx-anomalies__row-chip--rust  { background: rgba(192, 57, 43, 0.20); color: #8a2820; }

.rx-anomalies__caption {
  margin: 4px 0 0;
  font-size: 11px; line-height: 1.45;
  color: var(--paper-ink-50, #777);
}
.rx-anomalies__empty {
  margin: 0; padding: 16px 8px;
  text-align: center;
  font-size: 12.5px;
  color: var(--paper-ink-70, #444);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.rx-anomalies__empty span { font-size: 16px; color: var(--paper-ink-50, #777); }

/* ── Responsive ─────────────────────────────────────── */
/* Two-column collapse: drop the side rail below the centre
 * column, keep the roster as a top drawer. */
@media (max-width: 1280px) {
  .rx__grid { grid-template-columns: 200px 1fr; }
  .rx__side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .rx__side > * { flex: 1 1 280px; min-width: 0; }
}
/* Single-column collapse: roster becomes a horizontal drawer. */
@media (max-width: 900px) {
  .rx { padding: 18px 16px 80px; }
  .rx__grid { grid-template-columns: 1fr; gap: 16px; }
  .rx-roster {
    position: static; max-height: none;
    padding: 8px;
  }
  .rx-roster__list {
    display: flex; gap: 6px; overflow-x: auto;
    padding-bottom: 4px;
  }
  .rx-roster__item { flex: 0 0 auto; }
  .rx-roster__card { width: 220px; }
  .rx__side { flex-direction: column; }
}
@media (max-width: 720px) {
  .rx-focus__head {
    grid-template-columns: 1fr;
    padding: 16px 18px;
    gap: 14px;
  }
  .rx-focus__head-id { grid-template-columns: 48px 32px 1fr; }
  .rx-focus__num { width: 48px; height: 48px; font-size: 20px; }
  .rx-focus__silk { width: 32px; height: 32px; }
  .rx-focus__stats { justify-content: flex-start; gap: 6px; }
  .rx-focus__stat { padding: 6px 10px; min-width: 48px; }
  .rx-focus__stat strong { font-size: 17px; }
  .rx-focus__lenses {
    grid-template-columns: 1fr;
    padding: 16px 18px 18px;
  }
}
