/*
 * Benchmarks page. Daybreak design language: every colour, size, radius, spacing
 * step and duration comes from ../launch/css/tokens.css.
 *
 * The signature gradient marks Launch My Games numbers and bars; CrossOver 26.3
 * baselines remain neutral grey so comparisons stay instantly scannable.
 */

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

html {
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--height-nav) + var(--space-5));
  overflow-x: clip;
  max-width: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-canvas);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

h1, h2, h3, h4, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
[hidden] { display: none !important; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--color-accent-fill); color: var(--color-text-on-accent);
}
.skip:focus { top: var(--space-2); }

.wrap { width: min(100% - 2 * var(--space-gutter), var(--width-wide)); margin-inline: auto; }
.wrap--wide { width: min(100% - 2 * var(--space-gutter), 1480px); }

.signature {
  background: var(--gradient-signature);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@media (forced-colors: active) {
  .signature { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 40; height: var(--height-nav); width: 100%; max-width: 100%;
  background: var(--color-nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav__in {
  width: min(100% - 2 * var(--space-gutter), 1480px); height: 100%; margin-inline: auto;
  display: flex; align-items: center; gap: var(--space-4); min-width: 0;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--color-text); font-size: var(--text-caption); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-title); white-space: nowrap;
}
.nav__brand span { color: var(--color-text-secondary); font-weight: var(--weight-regular); margin-left: var(--space-1); }
.nav__mark { width: 20px; height: 20px; flex: none; }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: var(--space-5); margin-left: auto; }
.nav__links a { color: var(--color-text-secondary); font-size: var(--text-legal); white-space: nowrap; }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--color-text); text-decoration: none; }
.nav__home {
  display: none; color: var(--color-text-secondary); font-size: var(--text-legal); white-space: nowrap;
}
.nav__home:hover { color: var(--color-text); text-decoration: none; }
.live {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 28px; padding: 0 var(--space-3); border: 1px solid var(--color-hairline);
  border-radius: var(--radius-pill); background: transparent;
  color: var(--color-text-secondary); font-size: var(--text-legal); white-space: nowrap;
  transition: color var(--duration-instant), border-color var(--duration-instant);
}
.live:hover { color: var(--color-text); border-color: var(--color-hairline-strong); }
.live__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-status-ready); }
.live[data-state="busy"] .live__dot { background: var(--color-text-secondary); }
.live[data-state="error"] .live__dot { background: var(--color-status-warning); }
.live[data-state="new"] .live__dot { box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.25); }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__home { display: inline-flex; align-items: center; margin-left: auto; min-height: 28px; }
}
@media (max-width: 520px) {
  .nav__brand span { display: none; }
  .live { display: none; }
  .nav__in { gap: var(--space-3); }
}

/* ---------- Type ---------- */

.headline {
  font-size: var(--text-headline); font-weight: var(--weight-semibold);
  line-height: var(--leading-headline); letter-spacing: var(--tracking-headline); text-wrap: balance;
}
.headline-s {
  font-size: var(--text-headline-s); font-weight: var(--weight-semibold);
  line-height: var(--leading-title); letter-spacing: var(--tracking-title); text-wrap: balance;
}
.lead {
  max-width: 34em; color: var(--color-text-secondary);
  font-size: var(--text-lead); font-weight: var(--weight-medium);
  line-height: var(--leading-lead); letter-spacing: var(--tracking-title); text-wrap: pretty;
}
.note { margin-top: var(--space-5); color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); max-width: 64em; }

.section { padding-block: var(--space-section); }
.section__head { display: grid; justify-items: center; gap: var(--space-4); text-align: center; margin-bottom: var(--space-8); }
.section__head--left { justify-items: start; text-align: left; margin-bottom: var(--space-6); }
.section--method { border-top: 1px solid var(--color-hairline); padding-block: var(--space-9); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(40px, 5vw, 72px); overflow-x: clip; }
.hero__title {
  font-size: clamp(2.75rem, 1rem + 6.4vw, 6rem); font-weight: var(--weight-bold);
  line-height: 0.98; letter-spacing: var(--tracking-display); text-align: center; text-wrap: balance;
  padding-bottom: 0.08em;
}
.hero__lead {
  margin: var(--space-5) auto 0; max-width: 32em; text-align: center; color: var(--color-text-secondary);
  font-size: var(--text-lead); font-weight: var(--weight-medium); line-height: var(--leading-lead);
  letter-spacing: var(--tracking-title); text-wrap: balance;
}
.stage-wrap {
  position: relative; width: min(100% - 2 * var(--space-gutter), 1240px);
  margin: clamp(28px, 3.6vw, 52px) auto 0;
}
.horizon {
  position: absolute; inset: -14% -8% -10%; z-index: 0; pointer-events: none;
  background: var(--gradient-horizon-glow); filter: blur(20px);
}
.stage {
  position: relative; z-index: 1; aspect-ratio: 16 / 9; max-height: min(78vh, 820px); width: 100%;
  margin-inline: auto; overflow: hidden; border-radius: var(--radius-xl);
  background: var(--color-surface-sunken); box-shadow: var(--edge-light), var(--shadow-frame);
}
/* Static telemetry spotlight mode (no video archive) */
.stage--spotlight {
  aspect-ratio: auto; max-height: none; overflow: hidden;
  width: 100%; max-width: 100%;
  background: rgba(20, 20, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  padding: clamp(20px, 3vw, 36px);
}
.spotlight__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-5); min-width: 0;
}
.spotlight__meta { min-width: 0; max-width: 100%; }
.spotlight__title {
  font-size: var(--text-title); font-weight: var(--weight-semibold);
  line-height: var(--leading-title); letter-spacing: var(--tracking-title);
}
.spotlight__sub { margin-top: 2px; color: var(--color-text-secondary); font-size: var(--text-caption); overflow-wrap: break-word; }
.spotlight__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); min-width: 0;
}
@media (max-width: 860px) { .spotlight__grid { grid-template-columns: minmax(0, 1fr); } }
.spot-card {
  display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-l); background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07); text-align: left;
  width: 100%; max-width: 100%; min-width: 0; overflow: hidden;
  transition: border-color var(--duration-instant), background var(--duration-instant);
}
.spot-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }
.spot-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); min-width: 0; }
.spot-card__head > div:first-child { min-width: 0; flex: 1 1 auto; }
.spot-card__name { font-size: var(--text-body); font-weight: var(--weight-semibold); line-height: 1.3; overflow-wrap: break-word; }
.spot-card__preset { margin-top: 2px; color: var(--color-text-secondary); font-size: var(--text-legal); overflow-wrap: break-word; }
.spot-card__val { flex: 0 0 auto; text-align: right; white-space: nowrap; }
.spot-card__val b { display: block; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); font-weight: var(--weight-semibold); line-height: 1; letter-spacing: var(--tracking-title); }
.spot-card__val span { color: var(--color-text-secondary); font-size: var(--text-legal); }
.spot-card__facts { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); color: var(--color-text-secondary); font-size: var(--text-legal); min-width: 0; }
.spot-card__facts b { color: var(--color-text); font-weight: var(--weight-semibold); }
.spot-card .bar__track { --bar-h: 7px; }

.stage__media, .stage__media video, .stage__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage__media { transition: opacity var(--duration-base) var(--ease-out); }
.stage__media[data-leaving] { opacity: 0; }
.stage__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 55%);
}
.stage__panel {
  position: absolute; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 40px);
  width: min(430px, calc(100% - 32px)); padding: var(--space-5);
  border-radius: var(--radius-l); background: rgba(22, 22, 23, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--edge-light), 0 24px 60px -24px rgba(0, 0, 0, 0.9);
}
.stage__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--text-caption); }
.stage__name {
  margin-top: var(--space-1); font-size: var(--text-title); font-weight: var(--weight-semibold);
  line-height: var(--leading-title); letter-spacing: var(--tracking-title);
}
.stage__big { display: flex; align-items: baseline; gap: var(--space-2); margin-top: var(--space-3); }
.stage__big b {
  font-size: clamp(3rem, 2rem + 3.4vw, 4.5rem); font-weight: var(--weight-semibold); line-height: 1;
  letter-spacing: var(--tracking-headline);
}
.stage__big span { color: var(--color-text-secondary); font-size: var(--text-body); }
.stage__facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--space-2) var(--space-5); margin-top: var(--space-4); }
.stage__facts div { display: grid; gap: 2px; }
.stage__facts dt { color: var(--color-text-secondary); font-size: var(--text-legal); }
.stage__facts dd { font-size: var(--text-body); font-weight: var(--weight-semibold); }
.stage__panel > .bar__track { margin-top: var(--space-5); --bar-h: 8px; }
.fgrow__flow > .bar__track { --bar-h: 8px; }
.stage__open {
  position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 40px);
  min-height: 44px; padding: 0 var(--space-5); border: 0; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16); color: var(--color-text); font-size: var(--text-caption); font-weight: var(--weight-semibold);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: background var(--duration-instant);
}
.stage__open:hover { background: rgba(255, 255, 255, 0.26); }
.stage__play {
  position: absolute; left: 50%; top: 42%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.stage__play::before {
  content: ""; position: absolute; left: 28px; top: 22px;
  border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--color-text);
}
.stage__empty { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-6); color: var(--color-text-secondary); text-align: center; }

.reel {
  position: relative; z-index: 1; display: flex; gap: var(--space-3); margin-top: var(--space-4);
  overflow-x: auto; scrollbar-width: none; padding: 3px; scroll-snap-type: x proximity;
}
.reel::-webkit-scrollbar { display: none; }
.reel__item {
  position: relative; flex: 0 0 clamp(132px, 14vw, 196px); aspect-ratio: 16 / 9; padding: 0; overflow: hidden;
  border: 0; border-radius: var(--radius-m); background: var(--color-surface); scroll-snap-align: start;
  opacity: 0.55; transition: opacity var(--duration-fast) var(--ease-in-out);
}
.reel__item:hover, .reel__item[aria-selected="true"] { opacity: 1; }
.reel__item img { width: 100%; height: 100%; object-fit: cover; }
.reel__item span {
  position: absolute; inset: auto 0 0 0; padding: var(--space-5) var(--space-3) var(--space-2);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82));
  font-size: var(--text-legal); font-weight: var(--weight-semibold); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reel__item i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--gradient-signature); }
.reel__item[aria-selected="true"] i { width: var(--progress, 0%); }

@media (max-width: 720px) {
  .stage:not(.stage--spotlight) { aspect-ratio: 4 / 5; max-height: none; border-radius: var(--radius-l); }
  .stage--spotlight { border-radius: var(--radius-l); padding: var(--space-4); }
  .spot-card { padding: var(--space-4); }
  .stage__open { display: none; }
  .stage__panel { left: 12px; right: 12px; bottom: 12px; width: auto; padding: var(--space-4); }
  .stage__facts { grid-template-columns: repeat(3, 1fr); gap: var(--space-2) var(--space-3); }
}

/* ---------- Stat figures ---------- */

.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-6) var(--space-5);
  margin-bottom: var(--space-8);
}
.figures--hero { margin: clamp(48px, 6vw, 88px) 0 0; }
@media (max-width: 640px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); } }
.figure { display: grid; gap: var(--space-2); align-content: start; padding-top: var(--space-4); border-top: 1px solid var(--color-hairline); min-width: 0; }
.figure dd {
  order: -1; font-size: clamp(1.85rem, 1.25rem + 2.6vw, 3.75rem); font-weight: var(--weight-semibold); line-height: 1;
  letter-spacing: var(--tracking-headline);
}
.figure dd small { font-size: 0.42em; font-weight: var(--weight-semibold); letter-spacing: 0; margin-left: 0.15em; }
.figure dt { color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); max-width: 22em; }

/* ---------- Controls ---------- */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); margin-bottom: var(--space-5); min-width: 0; }
.toolbar__left { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); min-width: 0; max-width: 100%; }
.toolbar__note { color: var(--color-text-secondary); font-size: var(--text-caption); max-width: 40em; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--edge-light); min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  min-height: 36px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--color-text-secondary); font-size: var(--text-caption); font-weight: var(--weight-medium); white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-in-out), color var(--duration-fast) var(--ease-in-out);
}
.seg--compact button { min-height: 32px; padding: 0 var(--space-3); font-size: var(--text-legal); }
.seg button:hover { color: var(--color-text); }
.seg button[aria-pressed="true"] { background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--edge-light); }
.seg button .n { margin-left: 6px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); color: var(--color-text-secondary); font-size: var(--text-legal); }
.legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend__swatch { width: 22px; height: 8px; border-radius: 4px; background: var(--gradient-signature); }
.legend__swatch--gen { position: relative; overflow: hidden; }
.legend__swatch--gen::after { content: ""; position: absolute; inset: 0; background: var(--hatch); }
.legend__swatch--tick { width: 2px; height: 14px; border-radius: 1px; background: var(--color-text); margin-inline: 10px; }
.legend__swatch--base { background: var(--color-text-secondary); }

.tag {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-hairline); background: var(--color-surface);
  color: var(--color-text); font-size: var(--text-legal); font-weight: var(--weight-semibold); white-space: nowrap; line-height: 1;
}
.tag--quiet { color: var(--color-text-secondary); font-weight: var(--weight-medium); }
.tag--fg { border-color: transparent; background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--gradient-signature) border-box; }
.tag--warn { color: var(--color-status-warning); border-color: rgba(255, 159, 10, 0.4); }
.tag--ok { color: var(--color-status-ready); border-color: rgba(48, 209, 88, 0.35); }
.tag--over { background: rgba(0, 0, 0, 0.62); border-color: rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---------- Bars ---------- */

:root {
  --hatch: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.62) 0 2px, rgba(0, 0, 0, 0.34) 2px 5px);
  --bar-h: 10px;
}
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; column-gap: var(--space-5); row-gap: var(--space-2); align-items: center; min-width: 0; max-width: 100%; }
.bar__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.bar__track { position: relative; height: var(--bar-h); border-radius: calc(var(--bar-h) / 2); background: rgba(255, 255, 255, 0.07); }
.bar__fill {
  position: relative; height: 100%; width: var(--w, 0%); min-width: var(--bar-h); overflow: hidden;
  border-radius: calc(var(--bar-h) / 2); background: var(--gradient-signature);
  transition: width var(--duration-base) var(--ease-out);
}
.bar--base .bar__fill { background: var(--color-text-secondary); }
.bar--empty .bar__fill { display: none; }
.bar__gen { position: absolute; top: 0; bottom: 0; right: 0; left: var(--solid, 100%); background: var(--hatch); }
.bar__tick {
  position: absolute; top: -5px; bottom: -5px; left: var(--tick, 0%); width: 2px; margin-left: -1px;
  border-radius: 1px; background: var(--color-text); box-shadow: 0 0 0 2px var(--color-canvas);
  transition: left var(--duration-base) var(--ease-out);
}
.card .bar__tick, .stage__panel .bar__tick, .sheet .bar__tick, .spot-card .bar__tick { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.65); }
.bar__value { text-align: right; white-space: nowrap; font-size: var(--text-title); font-weight: var(--weight-semibold); line-height: 1; letter-spacing: var(--tracking-title); }
.bar__value small { margin-left: 4px; color: var(--color-text-secondary); font-size: var(--text-caption); font-weight: var(--weight-regular); letter-spacing: 0; }
.bar--base .bar__value { color: var(--color-text-secondary); }
.bar__label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-width: 0; font-size: var(--text-caption); line-height: var(--leading-caption); }
.bar__label .who { font-weight: var(--weight-medium); }
.bar__label .dim, .bar__sub { color: var(--color-text-secondary); }
.bar__sub { margin-left: auto; text-align: right; font-size: var(--text-caption); line-height: var(--leading-caption); }
.bar__sub b { color: var(--color-text); font-weight: var(--weight-semibold); }
@media (max-width: 640px) {
  .bar { grid-template-columns: minmax(0, 1fr) 6.6rem; column-gap: var(--space-3); }
  .bar__sub { margin-left: 0; text-align: left; }
}

/* ---------- Comparison rows ---------- */

.rows { border-top: 1px solid var(--color-hairline); }
.row {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 0.9fr) minmax(0, 1.6fr); gap: var(--space-6);
  align-items: center; padding-block: var(--space-6); border-bottom: 1px solid var(--color-hairline);
}
.row--noclip {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.55fr);
}
.row__clip { position: relative; }
.row__head { min-width: 0; }
.row__title { font-size: var(--text-title); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); text-wrap: balance; }
.row__title button { all: unset; cursor: pointer; }
.row__title button:hover { color: var(--color-accent); }
.row__title button:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.row__meta { margin-top: var(--space-1); color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); }
.row__delta { margin-top: var(--space-4); display: grid; gap: var(--space-1); }
.row__delta b { font-size: var(--text-headline-s); font-weight: var(--weight-semibold); line-height: 1; letter-spacing: var(--tracking-title); width: fit-content; }
.row__delta span { color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); }
.row__delta .plain { color: var(--color-text); }
.row__delta .gap { color: var(--color-text-secondary); }
.row__pills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.row__caveat { margin-top: var(--space-3); color: var(--color-status-warning); font-size: var(--text-legal); line-height: 1.45; }
.row__bars { display: grid; gap: var(--space-5); min-width: 0; }
@media (max-width: 1040px) {
  .row:not(.row--noclip) { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .row:not(.row--noclip) .row__bars { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .row, .row--noclip { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
}

/* ---------- Clip thumbnail (live archive mode) ---------- */

.clip {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0;
  border-radius: var(--radius-m); background: var(--color-surface-sunken); box-shadow: var(--edge-light);
}
.clip img, .clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip video { opacity: 0; transition: opacity var(--duration-fast); }
.clip video[data-on] { opacity: 1; }
.clip__none { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-3); color: var(--color-text-secondary); font-size: var(--text-legal); text-align: center; }
.clip__tags { position: absolute; left: var(--space-2); top: var(--space-2); right: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-1); pointer-events: none; }
.clip__time { position: absolute; right: var(--space-2); bottom: var(--space-2); pointer-events: none; }
.clip::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- Machines ---------- */

.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-4); margin-bottom: var(--space-8); }
.machine { padding: var(--space-5); border-radius: var(--radius-l); background: var(--color-surface); box-shadow: var(--edge-light); }
.machine__chip { font-size: var(--text-headline-s); font-weight: var(--weight-semibold); line-height: 1.05; letter-spacing: var(--tracking-title); width: fit-content; }
.machine__model { margin-top: var(--space-2); font-weight: var(--weight-semibold); }
.machine__spec { color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); }
.machine__spec + .machine__spec { margin-top: 2px; }

/* ---------- Frame Generation table ---------- */

.fgtable { border-top: 1px solid var(--color-hairline); }
.fgrow {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.55fr) 8rem 8.5rem; gap: var(--space-5);
  align-items: center; padding-block: var(--space-4); border-bottom: 1px solid var(--color-hairline);
}
.fgrow--withclip {
  grid-template-columns: 132px minmax(0, 1.1fr) minmax(0, 1.5fr) 7.5rem 8.75rem;
}
.fgrow__name { font-size: var(--text-body); font-weight: var(--weight-semibold); line-height: 1.3; }
.fgrow__name button { all: unset; cursor: pointer; }
.fgrow__name button:hover { color: var(--color-accent); }
.fgrow__name button:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.fgrow__tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
.fgrow__flow { display: grid; gap: var(--space-2); min-width: 0; }
.fgrow__nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); font-size: var(--text-body); font-weight: var(--weight-semibold); }
.fgrow__nums .from { color: var(--color-text-secondary); }
.fgrow__nums .arrow { color: var(--color-text-secondary); font-weight: var(--weight-regular); }
.fgrow__nums small { color: var(--color-text-secondary); font-size: var(--text-legal); font-weight: var(--weight-regular); }
.fgrow__boost { text-align: right; }
.fgrow__boost b { display: block; font-size: var(--text-title); font-weight: var(--weight-semibold); line-height: 1.1; letter-spacing: var(--tracking-title); margin-left: auto; width: fit-content; }
.fgrow__boost span, .fgrow__low span { color: var(--color-text-secondary); font-size: var(--text-legal); }
.fgrow__low { text-align: right; min-width: 6.5ch; }
.fgrow__low b { display: block; font-size: var(--text-body); font-weight: var(--weight-semibold); }
@media (max-width: 960px) {
  .fgrow { grid-template-columns: minmax(0, 1fr) 7rem; gap: var(--space-3); }
  .fgrow--withclip { grid-template-columns: 104px minmax(0, 1fr) 6.5rem; }
  .fgrow__flow { grid-column: 1 / -1; grid-row: 2; }
  .fgrow__low { display: none; }
}
.more {
  display: block; margin: var(--space-6) auto 0; min-height: 44px; padding: 0 var(--space-5);
  border: 1px solid var(--color-hairline-strong); border-radius: var(--radius-pill); background: transparent;
  color: var(--color-accent); font-size: var(--text-caption); font-weight: var(--weight-semibold);
}
.more:hover { border-color: var(--color-accent); }

/* ---------- Library: filters, full telemetry table & cards ---------- */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); min-width: 0; max-width: 100%; }
.filters > * { min-width: 0; max-width: 100%; }
.search {
  display: inline-flex; align-items: center; gap: var(--space-2); flex: 1 1 200px; max-width: 280px; min-width: 0; min-height: 40px;
  padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--edge-light);
  color: var(--color-text-secondary);
}
@media (max-width: 640px) { .search { flex: 1 1 100%; max-width: 100%; } }
.search:focus-within { box-shadow: var(--focus-ring); }
.search svg { width: 16px; height: 16px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--color-text); font-size: var(--text-caption); }
.search input::placeholder { color: var(--color-text-secondary); }
.select { min-width: 0; max-width: 100%; }
.select select {
  max-width: 100%; min-height: 40px; padding: 0 var(--space-6) 0 var(--space-4); border: 0; border-radius: var(--radius-pill);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  box-shadow: var(--edge-light); color: var(--color-text); font-size: var(--text-caption); -webkit-appearance: none; appearance: none;
}
.count { margin-bottom: var(--space-5); color: var(--color-text-secondary); font-size: var(--text-caption); }

.telem-wrap {
  width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--color-hairline);
}
.telem-table {
  width: 100%; min-width: 1040px; border-collapse: collapse;
  font-size: var(--text-caption); line-height: var(--leading-caption);
  font-variant-numeric: tabular-nums;
}
.telem-table th {
  text-align: left; color: var(--color-text-secondary); font-size: var(--text-legal);
  font-weight: var(--weight-medium); padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-bottom: 1px solid var(--color-hairline); white-space: nowrap;
}
.telem-table th.n, .telem-table td.n { text-align: right; }
.telem-table td {
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle; white-space: nowrap;
}
.telem-table td.game-col { white-space: normal; min-width: 210px; }
.telem-table tbody tr { cursor: pointer; transition: background var(--duration-instant); }
.telem-table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.telem-table__title { font-weight: var(--weight-semibold); color: var(--color-text); display: block; }
.telem-table tbody tr:hover .telem-table__title { color: var(--color-accent); }
.telem-table__sub { display: block; margin-top: 2px; color: var(--color-text-secondary); font-size: var(--text-legal); }
.telem-table__fps { font-weight: var(--weight-semibold); color: var(--color-text); }
.telem-table__dim { color: var(--color-text-secondary); }
.telem-table__stack { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.telem-table__stack small { color: var(--color-text-secondary); font-size: 11px; }
.telem-sort {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  color: inherit; font: inherit;
}
.telem-sort:hover { color: var(--color-text); }
.telem-sort[aria-sort="descending"]::after { content: "↓"; color: var(--color-accent); }
.telem-sort[aria-sort="ascending"]::after { content: "↑"; color: var(--color-accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-5); }
.card {
  display: grid; gap: var(--space-3); align-content: start; min-width: 0; max-width: 100%;
  padding: var(--space-5); border-radius: var(--radius-l);
  background: var(--color-surface); box-shadow: var(--edge-light);
}
.card--withclip { padding: 0; background: transparent; box-shadow: none; }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.card__name { font-size: var(--text-body); font-weight: var(--weight-semibold); line-height: 1.3; }
.card__name button { all: unset; cursor: pointer; }
.card__name button:hover { color: var(--color-accent); }
.card__name button:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.card__sub { color: var(--color-text-secondary); font-size: var(--text-legal); margin-top: 2px; }
.card__tags { display: flex; flex-wrap: wrap; gap: var(--space-1); justify-content: flex-end; }
.card__cells { display: grid; gap: 8px; }
.cell { display: grid; grid-template-columns: 6.8em minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); font-size: var(--text-legal); }
.cell__who { color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell__val { font-size: var(--text-caption); font-weight: var(--weight-semibold); white-space: nowrap; min-width: 4.8ch; text-align: right; }
.cell__val.dim { color: var(--color-text-secondary); font-weight: var(--weight-regular); }
.cell .bar__track { --bar-h: 6px; }
.cell .bar__tick { top: -3px; bottom: -3px; }
.card__foot {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4);
  padding-top: var(--space-3); border-top: 1px solid var(--color-hairline);
  color: var(--color-text-secondary); font-size: var(--text-legal);
}
.card__foot b { color: var(--color-text); font-weight: var(--weight-semibold); }
.empty { grid-column: 1 / -1; padding: var(--space-9) 0; text-align: center; color: var(--color-text-secondary); }

/* ---------- Method ---------- */

.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-6) var(--space-7); }
.method h3 { font-size: var(--text-body); font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }
.method p, .method li { color: var(--color-text-secondary); font-size: var(--text-caption); line-height: 1.55; }
.method li + li { margin-top: var(--space-2); }
.method code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; color: var(--color-text); overflow-wrap: anywhere; }

/* ---------- Loading and error ---------- */

.state { padding: var(--space-10) var(--space-gutter); text-align: center; }
.state__title { font-size: var(--text-title); font-weight: var(--weight-semibold); }
.state__text { margin: var(--space-2) auto 0; max-width: 40em; color: var(--color-text-secondary); }
.noscript { padding: var(--space-8) var(--space-gutter); text-align: center; color: var(--color-text-secondary); }

/* ---------- Game sheet ---------- */

.sheet {
  width: min(1280px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 auto; padding: 0; border: 0;
  background: transparent; color: var(--color-text); overflow: visible;
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.sheet__in {
  position: absolute; inset: var(--space-6) 0 0 0; overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: #0b0b0c; box-shadow: var(--edge-light), 0 -40px 120px -40px rgba(41, 151, 255, 0.2);
}
.sheet[open] .sheet__in { animation: sheet-in var(--duration-base) var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet__bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) clamp(16px, 3vw, 40px); background: rgba(11, 11, 12, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sheet__titles { min-width: 0; flex: 1; }
.sheet__title { font-size: var(--text-title); font-weight: var(--weight-semibold); line-height: var(--leading-title); letter-spacing: var(--tracking-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__sub { color: var(--color-text-secondary); font-size: var(--text-legal); }
.sheet__close {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--color-surface-raised); color: var(--color-text);
  font-size: 18px; line-height: 1;
}
.sheet__close:hover { background: var(--color-hairline-strong); }
.sheet__body { padding: var(--space-5) clamp(16px, 3vw, 40px) var(--space-9); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
.sheet__setups { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.sheet__setups .spacer { flex: 1; }

.players { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.players[data-pair] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .players[data-pair] { grid-template-columns: minmax(0, 1fr); } }
.player__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font-size: var(--text-caption); }
.player__head .who { font-weight: var(--weight-semibold); }
.player__head .dim { color: var(--color-text-secondary); }
.player__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-l); background: #000; box-shadow: var(--edge-light), var(--shadow-frame); }
.player__frame video, .player__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__none { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-6); text-align: center; color: var(--color-text-secondary); }
.hitches { margin-top: var(--space-3); }
.hitches__track { position: relative; height: 26px; border-radius: var(--radius-xs); background: var(--color-surface); cursor: pointer; overflow: hidden; }
.hitches__tick { position: absolute; top: 5px; bottom: 5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--color-text-secondary); }
.hitches__tick[data-big] { top: 2px; bottom: 2px; width: 3px; background: var(--color-status-warning); }
.hitches__head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--color-accent); left: 0; }
.hitches__text { margin-top: var(--space-2); color: var(--color-text-secondary); font-size: var(--text-legal); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-5); }
.stats[data-pair] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 720px) { .stats[data-pair] { grid-template-columns: 1fr; } }
.stats[data-pair] .statcol { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-4); align-content: start; }
.statcol__head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding-bottom: var(--space-2); font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.stats[data-pair] .stat b { font-size: var(--text-title); }
.stat { display: grid; gap: var(--space-1); align-content: start; padding-top: var(--space-3); border-top: 1px solid var(--color-hairline); }
.stat b { font-size: var(--text-headline-s); font-weight: var(--weight-semibold); line-height: 1.05; letter-spacing: var(--tracking-title); width: fit-content; }
.stat b small { font-size: 0.48em; margin-left: 3px; letter-spacing: 0; font-weight: var(--weight-medium); color: var(--color-text-secondary); -webkit-text-fill-color: var(--color-text-secondary); }
.stat span { color: var(--color-text-secondary); font-size: var(--text-legal); line-height: 1.4; }
.stat span.what { color: var(--color-text); font-size: var(--text-caption); font-weight: var(--weight-medium); }

/* Frametime & power breakdown strips inside sheet */
.pstrip { display: grid; gap: var(--space-3); }
.pstrip__row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 5.5rem; align-items: center; gap: var(--space-4); font-size: var(--text-caption); }
@media (max-width: 480px) {
  .pstrip__row { grid-template-columns: 6.2rem minmax(0, 1fr) 4.6rem; gap: var(--space-3); }
  .cell { grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: var(--space-2); }
}
.pstrip__lbl { color: var(--color-text-secondary); }
.pstrip__val { text-align: right; font-weight: var(--weight-semibold); white-space: nowrap; }
.pstrip__track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.pstrip__fill { height: 100%; border-radius: 4px; background: var(--gradient-signature); width: var(--w, 0%); min-width: 6px; }
.pstrip__fill--base { background: var(--color-text-secondary); }
.pstrip__fill--warn { background: var(--color-status-warning); }

.block h3 { font-size: var(--text-title); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-title); margin-bottom: var(--space-4); }
.block p.dim { color: var(--color-text-secondary); font-size: var(--text-caption); max-width: 60em; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-3) var(--space-5); }
.kv div { display: grid; gap: 2px; padding-top: var(--space-2); border-top: 1px solid var(--color-hairline); }
.kv dt { color: var(--color-text-secondary); font-size: var(--text-legal); }
.kv dd { font-size: var(--text-caption); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); }
.shots button, .wide-img { padding: 0; border: 0; overflow: hidden; border-radius: var(--radius-s); background: var(--color-surface); cursor: zoom-in; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.wide-img { display: block; width: 100%; border-radius: var(--radius-m); }
.wide-img img { width: 100%; }
.wide-img + .wide-img { margin-top: var(--space-3); }

.runs { width: 100%; border-collapse: collapse; font-size: var(--text-caption); }
.runs-wrap { overflow-x: auto; }
.runs th { text-align: left; color: var(--color-text-secondary); font-weight: var(--weight-regular); font-size: var(--text-legal); padding: 0 var(--space-4) var(--space-2) 0; white-space: nowrap; }
.runs td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-top: 1px solid var(--color-hairline); vertical-align: top; white-space: nowrap; }
.runs td.n, .runs th.n { text-align: right; font-variant-numeric: tabular-nums; }
.runs tr[aria-current="true"] td { background: rgba(255, 255, 255, 0.04); }
.runs tr[aria-current="true"] td:first-child { box-shadow: inset 2px 0 0 var(--color-accent); padding-left: var(--space-3); }
.runs button { all: unset; cursor: pointer; color: var(--color-accent); }
.runs button:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.runs .dim { color: var(--color-text-secondary); }
.files { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: var(--text-caption); }

.zoom { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: transparent; }
.zoom::backdrop { background: rgba(0, 0, 0, 0.9); }
.zoom img { max-width: 96vw; max-height: 90vh; border-radius: var(--radius-m); }
.zoom__close {
  display: block; margin: 0 0 var(--space-2) auto; min-height: 32px; padding: 0 var(--space-4); border: 0;
  border-radius: var(--radius-pill); background: var(--color-surface-raised); color: var(--color-text); font-size: var(--text-caption);
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open] .sheet__in { animation: none; }
  .bar__fill, .bar__tick { transition: none; }
}

/* ---------- Chip bar: one toggle for every comparison ---------- */

.compare { position: relative; padding-top: var(--space-section); max-width: 100%; }
.chipbar {
  position: sticky; top: calc(var(--height-nav) + var(--space-3)); z-index: 30;
  display: flex; justify-content: center; padding-inline: var(--space-4); pointer-events: none;
  max-width: 100%;
}
.chipbar__in {
  display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; max-width: 100%; padding: 4px; pointer-events: auto;
  border-radius: var(--radius-pill); background: rgba(29, 29, 31, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--edge-light), 0 12px 40px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow-x: auto; scrollbar-width: none;
}
.chipbar__in::-webkit-scrollbar { display: none; }
.chipbar .seg { background: transparent; box-shadow: none; padding: 0; flex: none; }
.chipbar .seg + .seg { padding-left: var(--space-2); border-left: 1px solid var(--color-hairline); border-radius: 0; }
.seg--chip button { font-weight: var(--weight-semibold); padding-inline: var(--space-4); }
.seg--chip button[aria-pressed="true"] { background: var(--color-text); color: #000; }
.section--first { padding-top: var(--space-8); }
@media (max-width: 480px) {
  .seg--chip button { padding-inline: var(--space-3); }
  .chipbar .seg button { padding-inline: var(--space-3); font-size: var(--text-legal); }
}

/* ---------- Before and after (live archive mode) ---------- */

.ba { margin-bottom: var(--space-8); }
.ba__view {
  position: relative; aspect-ratio: 16 / 9; max-height: min(74vh, 760px); width: 100%; overflow: hidden; border-radius: var(--radius-xl);
  background: var(--color-surface-sunken); box-shadow: var(--edge-light), var(--shadow-frame);
  --pos: 50%;
}
.ba__view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__after { clip-path: inset(0 0 0 var(--pos)); }
.ba__range {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0;
  cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none;
}
.ba__divider {
  position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, 0.92); pointer-events: none;
}
.ba__handle {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.ba__handle::before, .ba__handle::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border: solid #1d1d1f; border-width: 0 0 2px 2px;
}
.ba__handle::before { left: 11px; transform: rotate(45deg); }
.ba__handle::after { right: 11px; transform: rotate(-135deg); }
.ba__range:focus-visible ~ .ba__divider .ba__handle { box-shadow: 0 0 0 3px var(--color-canvas), 0 0 0 6px var(--color-accent); }
.ba__side {
  position: absolute; z-index: 1; bottom: clamp(12px, 2.4vw, 32px); max-width: 44%; padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-l); background: rgba(22, 22, 23, 0.72); pointer-events: none;
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--edge-light);
}
.ba__side--before { left: clamp(12px, 2.4vw, 32px); }
.ba__side--after { right: clamp(12px, 2.4vw, 32px); text-align: right; }
.ba__who { font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.ba__side--before .ba__who, .ba__side--before .ba__big { color: var(--color-text-secondary); }
.ba__big { font-size: clamp(1.75rem, 1rem + 3.2vw, 4.25rem); font-weight: var(--weight-semibold); line-height: 1.02; letter-spacing: var(--tracking-headline); white-space: nowrap; }
.ba__big small { margin-left: 6px; font-size: var(--text-caption); font-weight: var(--weight-regular); letter-spacing: 0; color: var(--color-text-secondary); }
.ba__sub { margin-top: 2px; color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); }
.ba__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); }
.ba__open {
  min-height: 34px; padding: 0 var(--space-4); border: 1px solid var(--color-hairline-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--color-accent); font-size: var(--text-caption); font-weight: var(--weight-semibold);
}
.ba__open:hover { border-color: var(--color-accent); }
.ba__note { margin-top: var(--space-3); color: var(--color-text-secondary); font-size: var(--text-legal); }
@media (max-width: 640px) {
  .ba__view { aspect-ratio: 4 / 3; border-radius: var(--radius-l); }
  .ba__side { padding: var(--space-2) var(--space-3); border-radius: var(--radius-m); max-width: 47%; }
  .ba__sub { display: none; }
  .ba__handle { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .ba__handle::before { left: 8px; } .ba__handle::after { right: 8px; }
}

.clip--split .clip__after { clip-path: inset(0 0 0 50%); }
.clip__split { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.9); pointer-events: none; }
.clip--split .clip__tags { display: flex; flex-wrap: nowrap; }

.bar--ghost .bar__track { background: transparent; border: 1px dashed var(--color-hairline-strong); }
.bar--ghost .bar__value, .bar--ghost .who { color: var(--color-text-secondary); }

/* ---------- Open source ---------- */

.section--oss { border-top: 1px solid var(--color-hairline); padding-block: var(--space-9); }
.section--oss .lead { max-width: 40em; }
.oss { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 var(--space-6); }
.oss li { display: grid; gap: 2px; align-content: start; padding-block: var(--space-4); border-top: 1px solid var(--color-hairline); }
.oss a, .oss .name { color: var(--color-text); font-weight: var(--weight-semibold); }
.oss a:hover { color: var(--color-accent); text-decoration: none; }
.oss .role { color: var(--color-text-secondary); font-size: var(--text-caption); line-height: var(--leading-caption); }
.oss .lic { color: var(--color-text-secondary); font-size: var(--text-legal); }
.oss__foot { display: grid; justify-items: start; gap: var(--space-2); margin-top: var(--space-6); }
.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-pill);
  background: var(--color-accent-fill); color: var(--color-text-on-accent); font-size: var(--text-caption); font-weight: var(--weight-semibold);
}
.button:hover { background: var(--color-accent-fill-hover); text-decoration: none; }
.button--pending, .button--pending:hover { background: transparent; border: 1px dashed var(--color-hairline-strong); color: var(--color-text-secondary); cursor: default; }
.legal { margin-top: var(--space-7); max-width: 70em; color: var(--color-text-secondary); font-size: var(--text-legal); line-height: 1.5; }
