/* Local editorial revision: keep the race and analytical views, give the
   reading order room, and reserve strong accents for data and selections. */
:root {
  --ink: #1d1d1f;
  --muted: #62626a;
  --line: #e4e4e8;
  --page-ink: #f5f5f7;
  --page-muted: #a1a1aa;
  --page-background: #080b12;
}

:root[data-theme="light"] {
  --page-ink: #1d1d1f;
  --page-muted: #686870;
  --page-background: #f5f5f7;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="light"] body {
  background: var(--page-background);
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #4d9bea;
  outline-offset: 4px;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.social-link {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.social-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.social-link span {
  font-size: 17px;
  line-height: 1;
}

@media (max-width: 760px) {
  .stage-bar .social-link {
    order: 2;
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    margin: -5px -6px -5px 0;
  }
}

.shell {
  width: min(1160px, calc(100% - 48px));
  padding-bottom: 40px;
}

.nowplaying {
  gap: 10px;
  padding: 8px max(20px, calc((100vw - 1160px) / 2));
}

.nowplaying .play {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  font-size: 12px;
  box-shadow: none;
}

.nowplaying.armed .play::after {
  content: none;
}

.nowplaying .skip {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #b9bdc6;
}

.nowplaying .track b {
  color: #e6e8ed;
  font-weight: 500;
}

.nowplaying .track span {
  color: #9ba1ad;
}

.nowplaying .source {
  padding: 8px;
}

.race-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 16px max(20px, calc((100vw - 1160px) / 2)) 14px;
}

.race-title {
  position: relative;
  left: auto;
  transform: none;
  grid-column: 1 / -1;
  order: 0;
  width: auto;
  font-size: clamp(25px, 3.2vw, 36px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-transform: none;
}

.race-title::before, .race-title::after {
  content: none;
}

.brand-mark {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.race-bar {
  background: radial-gradient(ellipse at 50% 0, rgba(247, 147, 26, 0.06), transparent 70%), #080e18;
}

.race-intro {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  color: #a1a8b5;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.race-bar .segments {
  width: fit-content;
  grid-template-columns: repeat(5, minmax(54px, auto));
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

.race-bar .segments button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.race-bar .segments button.active {
  background: #f7931a;
}

.race-bar .replay-button,
.race-bar .share-button {
  height: 36px;
  margin-left: 0;
  font-weight: 500;
}

.race-bar .replay-button + .share-button {
  margin-left: 0;
}

.history {
  margin-top: 32px;
}

/* Race polish: the existing 2D stage, with every lane in the first view. */
.race-experience .stage {height:clamp(140px,19svh,178px);--headroom:8px}
.race-experience .nowplaying {padding-top:5px;padding-bottom:5px}
.race-experience .nowplaying .play {width:32px;height:32px;flex-basis:32px}
.race-experience .race-bar {gap:7px;padding-top:10px;padding-bottom:10px}
.race-experience .race-title {font-size:clamp(25px,2.8vw,32px)}
.race-experience .brand-mark {width:40px;height:40px}
.race-experience .race-intro {font-size:12px;margin:0;line-height:1.4}
.race-experience .arena {height:clamp(480px,calc(var(--runner-count,4) * 82px + 60px),900px);border-color:#ffffff0c;border-radius:0}
.race-experience .replay-button {border-color:#eda944;background:#eeb05b;color:#17110a;font-weight:650;padding:0 15px;box-shadow:0 2px 10px #0002}
.race-experience .replay-button:hover {background:#ffc477;border-color:#ffc477}
.race-experience .replay-button.running {background:#231c12;color:#f9c785;border-color:#a77739}
.race-experience .share-button {background:transparent;border-color:#ffffff21;color:#bcc4cf}
.race-experience .replay-clock {position:relative;inset:auto;z-index:1;justify-content:space-between;gap:10px;padding:8px max(16px,calc((100vw - 1160px)/2));min-height:34px;border:0;border-radius:0;background:#171611;pointer-events:auto}
.race-experience .replay-clock::after {content:"";position:absolute;bottom:0;left:0;width:var(--progress,0%);height:2px;background:#eeb05b;transition:width .3s ease}
.race-experience .replay-clock b {color:#f9c785;font-weight:550}
.race-experience .replay-clock span {color:#b6afa3;font-size:11px}
.race-experience .replay-clock.finished {background:#211b12}
.race-experience .replay-clock.closed {background:#1c1710}
.race-experience .replay-clock.closed span {color:#e8be7a}
/* The transport is a full-bleed strip under the track, on the same margins as
   the clock above it, so the two read as one instrument. */
.race-experience .replay-transport {margin:0;padding:9px max(16px,calc((100vw - 1160px)/2));border:0;border-radius:0;background:#171611;gap:14px}
.race-experience .replay-hold {width:28px;height:28px;border-color:#a77739;background:#231c12;color:#f9c785}
.race-experience .replay-hold:hover {background:#2e2416;border-color:#eda944}
.race-experience .replay-scrub::-webkit-slider-runnable-track {background:#3a3225}
.race-experience .replay-scrub::-moz-range-track {background:#3a3225}
.race-experience .replay-scrub::-webkit-slider-thumb {background:#eeb05b}
.race-experience .replay-scrub::-moz-range-thumb {background:#eeb05b}
.race-experience .replay-position {color:#b6afa3;font-weight:550}
.race-experience .race-window {margin:0;padding:8px max(16px,calc((100vw - 1160px)/2));background:#0e1520;color:#aeb9c8;font-size:11px;line-height:1.5}
.replay-speed {display:flex;align-items:center;gap:6px;font-size:11px;color:#b6afa3;white-space:nowrap}
.replay-speed select {background:#231c12;color:#f9c785;border:1px solid #a77739;border-radius:5px;padding:5px;font:inherit}
.race-experience .replay-cumulative {padding:16px max(16px,calc((100vw - 1160px)/2));background:#0e1520;border-bottom:1px solid #ffffff12;color:#e7edf5}
.race-experience .replay-cumulative[hidden] {display:none}
.replay-cumulative-heading {display:flex;align-items:baseline;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-bottom:12px}
.replay-cumulative-heading h2 {margin:0;font-size:14px;font-weight:600;letter-spacing:0}
.replay-cumulative-heading span,.replay-cumulative p {color:#aeb9c8;font-size:11px}
.replay-cumulative p {margin:10px 0 0}
.replay-cumulative-rows {display:grid;gap:8px}
.replay-cumulative-row {display:grid;grid-template-columns:125px minmax(0,1fr) 78px;gap:14px;align-items:center;font-size:12px;min-height:18px}
.replay-cumulative-name {overflow-wrap:anywhere}
.replay-cumulative-value {text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.replay-cumulative-track {position:relative;display:block;height:8px;border-radius:3px;background:#ffffff08}
.replay-cumulative-track::after {content:"";position:absolute;left:var(--zero,0%);top:-3px;bottom:-3px;width:1px;background:#bdc9d866}
.replay-cumulative-track i {position:absolute;top:0;height:100%;border-radius:3px;background:var(--accent);transition:left .45s ease,width .45s ease}
.replay-cumulative-row.unavailable {color:#aeb9c8}
@media (max-width:600px) {
  .replay-cumulative-row {grid-template-columns:90px minmax(0,1fr) 70px;gap:8px;font-size:11px}
}
@media (prefers-reduced-motion:reduce) {
  .replay-cumulative-track i {transition:none}
}
.race-experience:has(.replay-clock:not([hidden])) .arena {height:clamp(480px,calc(var(--runner-count,4) * 82px + 60px),900px)}
.race-experience .arena-legend {top:5px;font-weight:500}
.race-experience .arena-legend .flag {padding:6px 14px;gap:9px;border-color:#d7a24b85;background:#16140ff2;box-shadow:0 4px 14px #0005}
.race-experience .arena-legend .flag i {font-size:11px;font-weight:700;letter-spacing:.11em}
.race-experience .arena-legend .flag b {font-size:21px;font-weight:720;letter-spacing:-.025em}
.race-experience .lane-hud {grid-template-columns:20px minmax(0,1fr);gap:3px 7px;padding:0 10px 0 2px;border:0;background:transparent;backdrop-filter:none;color:#eef2f6;text-shadow:0 1px 5px #000}
.race-experience .lane-hud.leading {border:0;box-shadow:none}
.race-experience .lane-hud .rank,.race-experience .lane-hud.leading .rank {display:block;width:auto;height:auto;border-radius:0;background:transparent;color:#768291;font-size:10px;font-weight:600;line-height:1;text-align:right}
.race-experience .lane-hud .identity strong {gap:6px;font-size:13px;font-weight:620}
.race-experience .lane-hud .identity .ticker {color:#f2f5f8;font-size:13px;font-weight:780;letter-spacing:.025em}
.race-experience .lane-hud .identity .company-name {min-width:0;overflow:hidden;color:#aeb8c5;font-size:10px;font-weight:540;text-overflow:ellipsis}
.race-experience .lane-hud .identity small {display:none}
.race-experience .lane-hud .identity .swatch {width:5px;height:5px;box-shadow:none}
.race-experience .lane-hud .market {grid-column:2;display:inline-flex;align-items:center;gap:5px;padding:0;background:transparent;color:#818c9a;font-size:8px;font-weight:560;letter-spacing:.025em;text-transform:uppercase}
.race-experience .lane-hud .market::before {content:"";width:4px;height:4px;border-radius:50%;background:#65c99f;box-shadow:0 0 0 2px #65c99f1f}
.race-experience .lane-hud.closed .market {background:transparent;color:#747e8c}
.race-experience .lane-hud.closed .market::before {background:#747e8c;box-shadow:none}
.race-experience .lane-hud .metrics {display:block;grid-column:1/-1;color:#abb5c3;font-size:10px;font-variant-numeric:tabular-nums;line-height:1.25}
.race-experience .lane-hud .metrics[hidden] {display:none}
.race-experience .lane-hud.parked {opacity:.62;border:0;background:transparent}
.race-experience .lane-hud.parked .metrics {color:#d0b98e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.race-experience .runner-tag {min-width:132px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#edf1f5;text-shadow:0 2px 8px #05080dcc,0 1px 2px #05080d}
.race-experience .runner-tag[hidden] {display:none}
.race-experience .runner-tag::before {content:none}
.race-experience .runner-tag strong {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.race-experience .runner-tag strong .stock-return {font-size:25px;font-weight:690;line-height:1;letter-spacing:-.04em;text-transform:none}
.race-experience .runner-tag strong .btc-gap {font-size:9px;font-weight:560;line-height:1.1;letter-spacing:0;color:#aeb8c5}
.race-experience .runner-tag strong .up {color:#81d9b7}
.race-experience .runner-tag strong .down {color:#f59b9f}
/* A shut exchange states itself in words at a readable size, not as a
   percentage the reader has to decide how to interpret. */
.race-experience .runner-tag strong .closed {font-size:13px;font-weight:640;line-height:1.15;letter-spacing:.01em;color:#b9c4d2;text-transform:none}
/* A held reading is a real session, just not this one. Dimmed so the eye
   reads it as yesterday's before it reads the number. */
.race-experience .runner-tag.held {opacity:.6}
.race-experience .runner-tag.leader {border:0;box-shadow:none}
.race-experience .runner-tag.crossed {filter:drop-shadow(0 0 7px #81d9b74d)}

/* Lane numbers used to describe BTC holdings, not race performance. With that
   second ranking removed, the identity and market state get the full gutter. */
.race-experience .lane-hud {grid-template-columns:minmax(0,1fr);gap:4px;padding-left:8px}
.race-experience .lane-hud .market {grid-column:1;color:#939eac;font-size:10px}
.race-experience .runner-tag strong .btc-gap {color:#bdc6d1;font-size:10px;line-height:1.15}

@media(max-width:700px){
  .race-experience .stage {height:112px}
  .race-experience .race-bar {padding:10px 14px;gap:7px}
  .race-experience .race-title {font-size:clamp(22px,5.7vw,28px);gap:7px}
  .race-experience .brand-mark {width:34px;height:34px}
  .race-experience .race-intro {font-size:11px}
  .race-experience .arena {height:clamp(460px,calc(var(--runner-count,4) * 72px + 50px),820px)}
  .race-experience .lane-hud {grid-template-columns:17px minmax(0,1fr);padding:0 7px 0 1px;gap:3px 5px}
  .race-experience .lane-hud .identity strong {align-content:center;flex-wrap:wrap;gap:2px 5px;font-size:11px;line-height:1;white-space:normal}
  .race-experience .lane-hud .identity .ticker {font-size:11px}
  .race-experience .lane-hud .identity .company-name {flex:0 0 100%;box-sizing:border-box;padding-left:10px;font-size:9px;line-height:1.05;white-space:nowrap}
  .race-experience .lane-hud .rank {width:auto;height:auto;font-size:9px}
  .race-experience .lane-hud .market {font-size:8px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .race-experience .lane-hud .metrics {font-size:9px}
  .race-experience .runner-tag {min-width:120px;padding:0}
  .race-experience .runner-tag strong .stock-return {font-size:22px}
  .race-experience .runner-tag strong .btc-gap {font-size:9px}
  .race-experience .replay-button,.race-experience .share-button {min-height:40px}
  .race-experience .replay-clock {font-size:10px;gap:8px}
  .race-experience .replay-clock span {font-size:9px}
  .race-experience .lane-hud {grid-template-columns:minmax(0,1fr);padding-left:6px;gap:4px}
  .race-experience .lane-hud .identity .company-name {font-size:10px;line-height:1.1}
  .race-experience .lane-hud .market {font-size:9px}
  .race-experience .runner-tag strong .btc-gap {font-size:9.5px}
}

.history-intro {
  margin-bottom: 20px;
}

.history-intro h2 {
  margin: 0 0 16px;
  color: var(--page-ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.analysis-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analysis-guide a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--page-muted) 25%, transparent);
  color: var(--page-ink);
  text-decoration: none;
}

.analysis-guide a:hover {
  border-color: #f7931a;
}


.analysis-guide b {
  display: block;
}

.analysis-guide b {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}


#frequencyAnalysis, #asymmetryAnalysis, #btcFitAnalysis, #driversAnalysis, #levelsAnalysis {
  scroll-margin-top: 125px;
}

.history-intro p, .standings-intro p {
  margin: 0;
  color: var(--page-muted);
  font-size: 15px;
  line-height: 1.6;
}

.history-bar, :root[data-theme="light"] .history-bar {
  gap: 16px;
  margin-bottom: 28px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--page-muted) 22%, transparent);
  background: var(--page-background);
}

.window-label {
  color: var(--page-muted);
  font-size: 13px;
  white-space: nowrap;
}

.history-bar .windows {
  margin-left: 0;
}

.history-bar #formShareButton {
  margin-left: auto;
}

.history-bar .segments {
  border-color: transparent;
  background: #eaeaee;
}

.history-bar .windows button {
  font-size: 13px;
}

.segments button.active {
  font-weight: 600;
}

.history-bar .share-button {
  background: transparent;
  color: var(--page-muted);
}

.history-bar .icon-button {
  border-color: transparent;
  background: transparent;
  color: var(--page-ink);
}

.standings-intro {
  margin-bottom: 20px;
}

.standings-intro h3 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--page-ink);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.standings {
  gap: 0;
  margin-bottom: 12px;
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}

.standing {
  min-width: 0;
  gap: 6px 12px;
  padding: 24px;
  border: 0;
  border-radius: 0;
}

.standing + .standing {
  border-left: 1px solid var(--line);
}

.standing img, .asym-card img, .driver-card img {
  border-width: 1px;
}

.standing b {
  color: var(--ink);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.standing .who, .asym-card .who, .driver-card .who {
  font-weight: 600;
  font-size: 14px;
}



.win-breakdown {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}


.win-breakdown dl {
  margin: 0;
}

.win-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.win-breakdown dt, .win-breakdown dd {
  margin: 0;
}


.btc-direction.up { color: #187d53; }
.btc-direction.down { color: #ad4249; }

.win-breakdown dd {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 12px;
  font-variant-numeric: tabular-nums;
}

.win-breakdown dd span { white-space: nowrap; }
.win-breakdown strong { font-weight: 600; }
.win-breakdown .stock-wins { color: color-mix(in srgb, var(--accent) 70%, #000); }

.table-head {
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.fold-button {
  display: inline-flex;
  justify-content: space-between;
  gap: 16px;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #f7931a;
  border-radius: 10px;
  background: #f7931a;
  color: #231504;
  font-size: 13px;
  font-weight: 600;
}

.fold-button:hover {
  color: #231504;
  background: #ffa832;
  text-decoration: none;
}

.table-note, .data-message {
  color: var(--page-muted);
  font-size: 12px;
  line-height: 1.5;
}

.asymmetry, .race-chart, .drivers, .whatif, .decision-panel {
  margin: 0 0 28px;
  padding: 32px;
  border: 0;
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
}

.decision-heading h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: clamp(22px, 2.25vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.decision-date {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.decision-date { margin: 9px 0 0; }
.decision-lede { margin: 12px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
/* Four companies in four columns. At three, the fourth card dropped onto a
   row of its own and the panel paid a whole card's height for one of them. */
.decision-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.decision-card { min-width: 0; padding: 15px 16px; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-top: 3px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.decision-identity { display: flex; align-items: center; gap: 8px; margin-bottom: 19px; }
.decision-identity h3 { margin: 0; font-size: 15px; font-weight: 600; }
.decision-identity .swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.decision-label { display: block; color: var(--muted); font-size: 12.5px; }
.decision-value { display: block; margin-top: 3px; font-size: clamp(22px, 2.1vw, 28px); font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.decision-value.positive { color: var(--green); }
.decision-value.negative { color: var(--red); }
.decision-tag { margin: 7px 0 20px; min-height: 2.7em; color: var(--ink); font-size: 12px; line-height: 1.35; }
.decision-details { margin: 12px 0 0; display: grid; gap: 6px; }
.decision-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.35; }
.decision-details dt { color: var(--muted); }
.decision-details dd { margin: 0; flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.decision-benchmark { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--muted); }
.decision-caution { margin: 20px 0 0; padding: 14px 16px; border-radius: 8px; background: #f5f5f7; color: var(--ink); font-size: 15px; line-height: 1.6; }
.decision-caution b { color: var(--ink); font-weight: 600; }
.valuation-reason { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); font-size: 15px; line-height: 1.6; }
.decision-caution p { margin: 6px 0 0; }
.decision-unavailable { color: var(--muted); font-size: 14px; line-height: 1.6; }
.decision-panel { scroll-margin-top: 100px; }

/* Only the middle: below 760px the single-column phone rules take over, and
   this sheet loads after them, so an open-ended max-width would outrank the
   very rule it is meant to hand over to. */
@media (min-width: 761px) and (max-width: 1080px) {
  .decision-cards, .asymmetry-cards, .drivers-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .decision-panel { padding: 24px 20px; margin-bottom: 20px; }
  .decision-cards { grid-template-columns: 1fr; }
  .decision-heading h2 { font-size: 23px; align-items: flex-start; }
  .decision-card { padding: 18px; }
  .decision-tag { min-height: 0; }
}

.asymmetry-head, .drivers-head {
  gap: 20px;
  margin-bottom: 24px;
}

.asymmetry-head h2, .drivers-head h2, .chart-title, .whatif h2 {
  font-size: clamp(22px, 2.25vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.asymmetry-head .lede, .drivers-head .lede, .whatif-words .lede {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 68ch;
}

.asymmetry-head .asymmetry-words {
  flex: 1;
  min-width: 0;
}

.asymmetry-head .lede {
  max-width: none;
}

.asymmetry .share-button, .race-chart .share-button {
  padding: 6px 0 6px 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.asymmetry .share-button:hover, .race-chart .share-button:hover {
  color: var(--ink);
}

.asymmetry .share-button[data-state="working"],
.race-chart .share-button[data-state="working"] {
  opacity: 0.6;
}

.data-insight {
  margin: 20px 0;
  padding: 12px 16px;
  border-left: 2px solid #b8bcc5;
  border-radius: 0 10px 10px 0;
  background: #f5f5f7;
}

.data-insight:has(> p:empty) {
  display: none;
}


.data-insight > p,
.data-insight > #driversVerdict {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}








.asymmetry-cards, .drivers-cards {
  gap: 12px;
  margin-top: 24px;
}

.asym-card, .driver-card {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, white);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, white);
}

.asym-card b, .driver-card b {
  font-weight: 600;
  letter-spacing: -0.035em;
}

.asym-card .verdict, .driver-card .verdict {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
}

.asym-card .parts, .asym-card .sample, .driver-card .sample {
  font-size: 12px;
  line-height: 1.6;
}

.asym-card .sample.warn {
  color: #85620b;
}

.driver-card .metric-label {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.more {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.note {
  z-index: 8;
  max-height: min(560px, 68vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  letter-spacing: normal;
  line-height: 1.6;
}

.note-close {
  justify-self: end;
  padding: 6px 0 6px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chart-scroll-hint {
  display: none;
}

.race-chart {
  overflow: visible;
}

.chart-head {
  padding: 0 0 16px;
}

.chart-lede {
  max-width: 80ch;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.metric-note {
  max-width: 80ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.chart-insight {
  gap: 10px;
  padding: 0 0 16px;
}

.company-legend .pill {
  min-height: 40px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 8%, white);
}

.company-legend .pill b {
  font-weight: 600;
}

.company-legend .pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.company-legend .pill.dimmed {
  border-color: var(--line);
  background: #f5f5f7;
  opacity: 0.65;
}

#raceChart {
  position: relative;
  overflow-x: auto;
}

.race-chart svg, .drivers-matrix svg {
  max-width: 760px;
  margin: 0 auto;
}

#chartCaption {
  display: block;
  margin: 12px 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.6;
}

.drivers-window {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 500;
}

.whatif-head {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.simulator-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.simulator-summary::-webkit-details-marker {
  display: none;
}

.simulator-summary:focus-visible {
  outline: 3px solid #4d9bea;
  outline-offset: 6px;
}

.simulator-summary b, .simulator-summary small {
  display: block;
}

.simulator-summary b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.simulator-summary small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.simulator-toggle {
  color: var(--muted);
  font-size: 24px;
}

.whatif[open] .simulator-toggle {
  transform: rotate(45deg);
}

.whatif[open] .whatif-head {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.whatif-inputs {
  flex-wrap: wrap;
  gap: 12px;
}

.whatif .whatif-modes {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  width: auto;
}

.whatif-inputs input {
  height: 38px;
}

.whatif-results {
  gap: 12px;
}

.whatif-card {
  padding: 18px;
  border: 0;
  border-radius: 10px;
  background: #f5f5f7;
}

.whatif-card.best {
  background: #f5f5f7;
}

.whatif-card .who {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.whatif-card .sum {
  margin: 8px 0 4px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.whatif-note, .drivers-note {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.65;
}

@media (min-width: 761px) {
  .chart-note .note {
    left: 50%;
    transform: translateX(-50%);
  }
}

.credit, .credit.disclaimer, :root[data-theme="light"] .credit {
  color: var(--page-muted);
  line-height: 1.6;
}

@media (max-width: 760px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .analysis-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
  }

  .analysis-guide a {
    gap: 8px;
    padding: 10px 0;
  }
  .shell {
    width: calc(100% - 32px);
  }

  .race-bar {
    grid-template-columns: 1fr auto;
    padding: 16px;
  }

  .race-title .words {
    white-space: normal;
  }

  .race-title {
    gap: 8px;
    font-size: clamp(23px, 5.7vw, 32px);
  }

  .race-intro {
    margin-bottom: 2px;
    font-size: 12px;
  }

  .race-bar .segments {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .race-bar .segments button {
    padding: 0 4px;
    min-height: 36px;
  }

  .race-bar .replay-button {
    justify-self: start;
  }

  .race-bar .share-button {
    justify-self: end;
  }

  .nowplaying {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
  }

  .nowplaying .track {
    flex: 1;
  }

  .nowplaying .track b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nowplaying.playing .frame {
    margin-left: auto;
  }

  .history {
    margin-top: 36px;
  }

  .history-bar {
    gap: 8px;
  }

  .window-label {
    width: 100%;
    font-size: 12px;
  }

  .history-bar .windows.segments.compact {
    grid-template-columns: repeat(5, minmax(32px, auto));
    flex: 1;
    width: auto;
  }

  .history-bar .windows button {
    padding: 0 6px;
  }

  .history-bar .share-button.compact {
    padding: 0 4px;
    gap: 4px;
  }

  .history-bar .icon-button {
    flex-basis: 30px;
    width: 30px;
  }

  .standings-intro h3 {
    font-size: 21px;
  }

  .history-intro p, .standings-intro p {
    font-size: 14px;
  }

  .standing {
    padding: 20px;
  }

  .standing + .standing {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .standing b {
    font-size: 32px;
  }

  .table-head {
    gap: 4px 12px;
  }

  .asymmetry, .race-chart, .drivers, .whatif {
    padding: 24px 20px;
    margin-bottom: 20px;
  }

  .asymmetry-head, .drivers-head {
    gap: 12px;
    flex-wrap: nowrap;
  }

  .asymmetry-words, .whatif-words {
    min-width: 0;
  }

  .asymmetry-head h2, .drivers-head h2, .chart-title, .whatif h2 {
    font-size: 23px;
  }

  .asymmetry-head h2, .drivers-head h2 {
    align-items: flex-start;
  }

  .chart-head {
    flex-wrap: wrap;
  }

  .chart-title {
    max-width: calc(100% - 40px);
  }

  .chart-note .note {
    left: auto;
    right: 0;
  }

  .asymmetry-head .share-button {
    font-size: 0;
    padding-left: 0;
  }

  .asymmetry-head .share-button span {
    font-size: 15px;
  }

  .note {
    width: min(520px, calc(100vw - 72px));
    padding: 16px;
  }

  .history .note {
    position: fixed;
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 20px;
    width: auto;
    max-height: 65dvh;
    transform: none;
  }

  .chart-scroll-hint {
    display: block;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
  }

  .note-band {
    grid-template-columns: 78px 1fr;
  }

  .asymmetry-scale .track {
    margin-right: 28px;
    margin-left: 28px;
  }

  .asym-card, .driver-card {
    padding: 18px;
  }

  .whatif-inputs {
    margin-left: 0;
    width: 100%;
  }

  .whatif .whatif-modes {
    order: 0;
    width: 100%;
  }

  .whatif-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .whatif-card {
    min-width: 0;
    padding: 14px 10px;
  }

  .whatif-card .sum {
    font-size: 25px;
  }

  .whatif-card .move {
    line-height: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot, .nowplaying.starting .play {
    animation: none;
  }

  .note, .drivers-matrix .driver-point circle {
    transition: none;
  }
}

/* Reading hierarchy: results and valuation carry the main questions;
   frequency and the coefficient are compact supporting comparisons. */
.decision-heading h2 { font-size: clamp(25px, 2.6vw, 32px); }
.chart-title, .drivers-head h2, .asymmetry-head h2 { font-size: clamp(21px, 2vw, 25px); }
.analysis-guide b { margin: 0; font-size: 15px; }
.standings-intro { margin: 0 0 14px; }
.standing { display: block; padding: 20px; }
.standing .who { display: block; color: color-mix(in srgb, var(--accent) 70%, #000); }
.win-total { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.win-total b { font-size: 24px; }
.asymmetry-head, .drivers-head { margin-bottom: 16px; }
.chart-head { padding-bottom: 0; }
.asymmetry-cards { margin-top: 16px; }
.asym-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 18px; }
.asym-card .who { align-self: center; }
.asym-card .parts, .asym-card .sample { font-size: 14px; }
#chartCaption { font-size: 14px; }
#chartCaption:empty { display: none; }
.driver-card { display: block; padding: 18px; cursor: default; }
.driver-card .who { display: block; margin-bottom: 14px; }
.driver-card .decision-details { margin: 0; }
.driver-card .parts, .driver-card .sample { display: block; font-size: 14px; line-height: 1.5; }
.driver-card .sample { margin-top: 12px; }
@media (max-width: 760px) {
  .decision-heading h2 { font-size: 25px; }
  .chart-title, .drivers-head h2, .asymmetry-head h2 { font-size: 22px; }
  .decision-details > div, .win-breakdown-row { gap: 8px; }
}

/* Source evidence is available without turning the price cards into footnotes. */
.valuation-unresolved { display: block; margin: 10px 0 22px; font-size: 23px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.valuation-evidence { margin-top: 18px; border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); padding-top: 14px; font-size: 14px; line-height: 1.55; }
.valuation-evidence summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.valuation-evidence summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.valuation-evidence p, .valuation-evidence ul { margin: 14px 0 0; }
.valuation-evidence ul { padding-left: 18px; }
.valuation-evidence li + li { margin-top: 8px; }
.valuation-evidence a { color: color-mix(in srgb, var(--accent) 65%, #000); text-underline-offset: 3px; overflow-wrap: anywhere; }
.valuation-source-links span { display: block; color: var(--muted); }

/* A pre-blurred capture of the original analysis: the public response does
   not deliver its data or interactive markup. The draft stays intact locally. */
.analysis-coming {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(520px, 56.25vw, 720px);
  margin-top: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #29303b;
  border-radius: 18px;
  background: #11151d;
  text-align: center;
}
.analysis-coming::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #080b1270, #080b12b8 44%, #080b12b8 56%, #080b1270);
}
.analysis-coming-preview { position: absolute; inset: 0; z-index: -2; opacity: .9; user-select: none; pointer-events: none; }
.analysis-coming-preview img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.analysis-coming-copy { padding: 36px 28px; }
.analysis-coming h2 { margin: 0; color: #fff; font-size: clamp(40px, 5vw, 62px); font-weight: 600; letter-spacing: -.045em; line-height: 1.1; text-shadow: 0 2px 20px #080b12; }
@media (max-width: 760px) {
  .analysis-coming { height: 520px; margin-top: 22px; border-radius: 14px; }
}

/* The photographic identity belongs to the theatre around the race. The data
   surfaces remain quiet and unchanged. */
.race-experience .stage {
  isolation: isolate;
  background: var(--brand-night);
  box-shadow: inset 0 -1px rgba(247, 195, 90, .12);
}

.race-experience .stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 44%, rgba(255,255,255,.035) 50%, transparent 56%),
    repeating-linear-gradient(112deg, rgba(255,255,255,.012) 0 1px, transparent 1px 7px);
  mix-blend-mode: screen;
}

.race-experience #djCanvas {
  position: relative;
  z-index: 0;
  filter: saturate(.86) contrast(1.06) brightness(.94);
}

.race-experience .stage-bar { z-index: 3; }

.race-experience .race-bar {
  /* No clipping here. The bar used to hide its overflow, which also cut the
     explanation the "i" opens: the note is taller than the bar and sits below
     it, so 83% of it was trimmed away on a desktop and it opened looking empty.
     Backgrounds are clipped to the border box anyway, so the gradient below
     needs nothing from this, and the bar's own content does not overflow. */
  border-top: 1px solid rgba(203, 214, 228, .07);
  border-bottom: 1px solid rgba(247, 195, 90, .13);
  background:
    radial-gradient(ellipse at 30% 0, rgba(247, 147, 26, .12), transparent 52%),
    linear-gradient(110deg, #060910, #0d121a 57%, #080b11);
  box-shadow: inset 0 1px rgba(255,255,255,.025), inset 0 -10px 28px rgba(0,0,0,.2);
}

.race-experience .brand-mark {
  border: 1px solid rgba(255,255,255,.72);
  background: #05070c;
  box-shadow: 0 0 0 1px rgba(247,147,26,.12), 0 7px 22px rgba(0,0,0,.42);
}

.race-experience .race-title .words {
  text-shadow: 0 2px 18px rgba(0,0,0,.58);
}

.race-experience .brand-jaw {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  object-fit: cover;
  pointer-events: none;
  filter: saturate(.82) contrast(1.1);
  transform: scale(1.08);
  -webkit-mask-image: radial-gradient(circle, #000 42%, rgba(0,0,0,.92) 60%, transparent 77%);
  mask-image: radial-gradient(circle, #000 42%, rgba(0,0,0,.92) 60%, transparent 77%);
}

.race-experience .arena {
  border-bottom: 1px solid rgba(188, 199, 214, .16);
  background:
    radial-gradient(circle at 50% 0, rgba(247,147,26,.12), transparent 36%),
    linear-gradient(180deg, var(--brand-obsidian), #151d29);
  box-shadow: inset 0 1px rgba(255,255,255,.035), inset 0 -36px 90px rgba(0,0,0,.24);
}

.race-experience .arena-legend .flag {
  align-items: center;
  border-color: rgba(247,195,90,.56);
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 38%),
    linear-gradient(180deg, rgba(37,31,21,.97), rgba(12,11,9,.97));
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.5), 0 0 18px rgba(247,147,26,.08);
}

.race-experience .arena-legend .flag::before {
  content: "₿";
  color: var(--brand-gold);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 10px rgba(247,147,26,.55);
}

.race-experience .lane-hud .identity .swatch {
  width: 7px;
  height: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, white);
  border-radius: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 62%, white), var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 62%, transparent);
  transform: rotate(45deg);
}

@media (max-width: 760px) {
  .race-experience .brand-jaw { width: 38px; height: 38px; }
  .race-experience .arena-legend .flag::before { font-size: 14px; }
}

/* The race explainer is a small glass information card, not a generic tooltip. */
.race-title > .more {
  position: relative;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, .22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .12),
    0 6px 18px rgba(0, 0, 0, .28);
  color: rgba(255, 255, 255, .72);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
  line-height: 1;
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

.race-title > .more:hover,
.race-title > .more:focus-visible,
.race-title > .more[aria-expanded="true"] {
  border-color: rgba(247, 195, 90, .72);
  background: linear-gradient(145deg, rgba(247, 195, 90, .2), rgba(247, 147, 26, .08));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .16),
    0 0 0 3px rgba(247, 147, 26, .08),
    0 8px 24px rgba(0, 0, 0, .38);
  color: #f9c785;
  transform: translateY(-1px);
}

#raceMore {
  top: calc(100% + 16px);
  left: 50%;
  gap: 8px;
  width: min(370px, calc(100vw - 32px));
  max-height: none;
  padding: 22px 48px 21px 22px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .07), transparent 34%),
    rgba(12, 16, 24, .92);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .08),
    0 24px 70px rgba(0, 0, 0, .56),
    0 2px 10px rgba(0, 0, 0, .34);
  color: #f5f5f7;
  backdrop-filter: blur(28px) saturate(135%);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
  transform: translate(-50%, -5px) scale(.985);
  transform-origin: 50% 0;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

#raceMore::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-left: 1px solid rgba(255, 255, 255, .14);
  background: rgba(25, 29, 37, .96);
  transform: translateX(-50%) rotate(45deg);
}

.race-title > .more[aria-expanded="true"] + #raceMore {
  transform: translate(-50%, 0) scale(1);
}

#raceMore .note-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .58);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

#raceMore .note-close:hover,
#raceMore .note-close:focus-visible {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  transform: scale(1.04);
}

#raceMore .note-label {
  margin: 0 0 1px;
  color: #f3b55d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}

#raceMore .note-title {
  color: #fff;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -.025em;
  line-height: 1.2;
}

#raceMore .note-body {
  color: rgba(245, 245, 247, .82);
  font-size: 13px;
  line-height: 1.5;
}

#raceMore .note-meta {
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: rgba(235, 238, 243, .5);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.5;
}

@media (max-width: 760px) {
  #raceMore {
    padding: 20px 44px 19px 20px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .race-title > .more,
  #raceMore,
  #raceMore .note-close {
    transition: none;
  }
}

/* ------------------------------------------------ analysis panels */

/**
 * The analysis panels' finish, moved here from the local cinematic study so the
 * released analysis looks as it was reviewed, without bringing that study's
 * race changes with it. Scoped to the analysis: the race keeps its own styles.
 */
.history { --line: #e3e7ed; --muted: #5e6876; margin-top: 44px; }
.history-intro { margin-bottom: 20px; }
.history-intro h2 { letter-spacing: -.045em; }
.history-bar { border-radius: 14px; }
.analysis-guide a { text-underline-offset: 5px; }
.asymmetry, .race-chart, .drivers, .decision-panel {
  border: 1px solid #ffffff18;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 12px 36px #00000012;
}
.standing {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, #e2e7ee);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, white), #fff 75%);
  box-shadow: 0 3px 12px #16233604;
}
.chart-insight, .drivers-verdict { line-height: 1.6; }
.race-chart svg, .drivers-matrix svg { max-width: 860px; }
:root[data-theme="light"] .asymmetry,
:root[data-theme="light"] .race-chart,
:root[data-theme="light"] .drivers,
:root[data-theme="light"] .decision-panel { border-color: #e0e5ed; box-shadow: 0 6px 24px #14213a05; }

@media (max-width: 760px) {
  .history { margin-top: 30px; }
  .asymmetry, .race-chart, .drivers, .decision-panel { padding: 22px 18px; border-radius: 16px; }
}

/* ------------------------------------------------ space follows content */

/**
 * Space is spent where something is said. A legend is a key, not a feature:
 * a line of small coloured names, still clickable to fade a company. Four
 * companies sit on one row wherever the width allows, instead of three and
 * an orphan. And a chart whose reading fits in one sentence does not take a
 * screen of its own: on wide screens the sentence and the key sit beside it.
 */
.history .company-legend {
  gap: 2px 14px;
  padding: 0 0 8px;
}

.history .company-legend .pill {
  min-height: 28px;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.history .company-legend .pill:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: none;
}

.history .company-legend .pill.dimmed {
  background: transparent;
}

@media (min-width: 1081px) {
  .standings {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .standings {
    grid-template-columns: repeat(2, 1fr);
  }
}

/**
 * Who performed best: four companies and bitcoin, three figures each. A table
 * says that in a fifth of the height the cards took.
 */
.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.performance-table th,
.performance-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.performance-table thead th {
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.performance-table tbody th {
  font-weight: 600;
  text-align: left;
}

.performance-table .swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}

.performance-table td.positive { color: var(--green); font-weight: 600; }
.performance-table td.negative { color: var(--red); font-weight: 600; }
.performance-table .decision-unavailable { color: var(--muted); text-align: left; white-space: normal; }

.performance-table tr.benchmark th,
.performance-table tr.benchmark td {
  border-bottom: 0;
  color: var(--muted);
  font-weight: 500;
}

#performanceAnalysis { padding-top: 22px; padding-bottom: 20px; }
#performanceAnalysis .data-insight { margin: 12px 0 8px; }
#performanceBenchmark:empty { display: none; }

@media (max-width: 760px) {
  .performance-table { font-size: 13px; }
  .performance-table th, .performance-table td { padding: 6px 4px; }
  .performance-table thead th { white-space: normal; }
}

/** Asymmetry Coefficient as one line: zones either side of 1.00, a mark each. */
.asymmetry-line {
  padding: 0 8px;
}

.asymmetry-line .track {
  position: relative;
  height: 6px;
  margin: 72px 0 20px;
  border-radius: 999px;
  background: var(--line);
}

.asymmetry-line .track.has-below {
  margin-bottom: 76px;
}

.asymmetry-line .zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.asymmetry-line .zone.poor {
  left: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 30%, transparent), color-mix(in srgb, var(--red) 6%, transparent));
}

.asymmetry-line .zone.good {
  right: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--green) 6%, transparent), color-mix(in srgb, var(--green) 30%, transparent));
}

.asymmetry-line .line {
  position: absolute;
  top: -12px;
  bottom: -12px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  opacity: 0.5;
}

.asymmetry-line .line i {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.asymmetry-line .mark {
  position: absolute;
  top: 3px;
  width: 0;
}

.asymmetry-line .mark::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
  box-sizing: border-box;
}

.asymmetry-line .mark b,
.asymmetry-line .mark em,
.asymmetry-line .mark small {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
}

.asymmetry-line .mark.start b, .asymmetry-line .mark.start em, .asymmetry-line .mark.start small { transform: translateX(-12px); }
.asymmetry-line .mark.end b, .asymmetry-line .mark.end em, .asymmetry-line .mark.end small { transform: translateX(calc(-100% + 12px)); }

.asymmetry-line .mark b {
  color: var(--accent);
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.asymmetry-line .mark em {
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.asymmetry-line .mark small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.asymmetry-line .mark.above b { bottom: 42px; }
.asymmetry-line .mark.above em { bottom: 26px; }
.asymmetry-line .mark.above small { bottom: 12px; }
.asymmetry-line .mark.below b { top: 12px; }
.asymmetry-line .mark.below em { top: 38px; }
.asymmetry-line .mark.below small { top: 54px; }

.asymmetry-line .ends {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.asymmetry-line .sample.warn {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.asymmetry-line .asym-list { display: none; }

@media (max-width: 760px) {
  /* Too narrow for names on the line: dots there, the figures in a list. */
  .asymmetry-line .mark b, .asymmetry-line .mark em, .asymmetry-line .mark small { display: none; }
  .asymmetry-line .track, .asymmetry-line .track.has-below { margin: 24px 0 22px; }
  .asymmetry-line .asym-list {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
  }
  .asymmetry-line .asym-list li { display: flex; align-items: baseline; gap: 8px; }
  .asymmetry-line .asym-list b { min-width: 3ch; color: var(--accent); font-variant-numeric: tabular-nums; }
  .asymmetry-line .asym-list small { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
}

/** The matrix replay: a quiet control at the end of the key, trails in the plot. */
.drivers-replay {
  margin-left: auto;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.drivers-replay:hover { border-color: var(--ink); }

.drivers-matrix svg.replaying .driver-point {
  opacity: 0;
  pointer-events: none;
}

.drivers-matrix .drivers-clock {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
