/* crest_demo — editorial showcase, after the ElevenLabs design language in
   design.md: off-white canvas, warm near-black ink, EB Garamond display
   (substitute for licensed Waldenburg Light), Inter body, pastel atmospheric
   orbs as the only color voltage, ink-pill CTAs, hairline + soft-drop depth. */

:root {
  /* surface */
  --canvas: #f5f5f5;
  --canvas-soft: #fafafa;
  --surface-card: #ffffff;
  --surface-strong: #f0efed;
  --surface-dark: #0c0a09;
  /* ink / text */
  --ink: #0c0a09;
  --primary: #292524;
  --primary-active: #0c0a09;
  --body: #4e4e4e;
  --body-strong: #292524;
  --muted: #777169;
  --muted-soft: #a8a29e;
  --on-primary: #ffffff;
  /* hairlines */
  --hairline: #e7e5e4;
  --hairline-soft: #f0efed;
  --hairline-strong: #d6d3d1;
  /* atmospheric gradient stops */
  --grad-mint: #a7e5d3;
  --grad-peach: #f4c5a8;
  --grad-lavender: #c8b8e0;
  --grad-sky: #a8c8e8;
  --grad-rose: #e8b8c4;
  /* semantic */
  --success: #16a34a;
  --warn: #d97706;
  --error: #dc2626;
  /* radii */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-xxl: 24px; --r-pill: 9999px;
  /* type */
  --serif: "EB Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;
  --soft-drop: 0 4px 16px rgba(12, 10, 9, 0.04);
  --soft-drop-lift: 0 18px 50px rgba(12, 10, 9, 0.08);
}

* { box-sizing: border-box; }

/* author display rules (.stage grid, .control flex, .controls flex) outrank the
   UA [hidden] rule, so JS-toggled hidden needs to win explicitly */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* faint print-paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- atmospheric orbs (pure decoration) -------------------------------- */
.orb {
  position: fixed;
  z-index: 0;
  border-radius: var(--r-full, 9999px);
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}
.orb-mint     { width: 460px; height: 460px; top: -140px; right: -120px;
  background: radial-gradient(circle at 30% 30%, var(--grad-mint), transparent 70%);
  animation: drift-a 26s ease-in-out infinite; }
.orb-peach    { width: 380px; height: 380px; top: 320px; left: -150px;
  background: radial-gradient(circle at 40% 40%, var(--grad-peach), transparent 70%);
  animation: drift-b 32s ease-in-out infinite; }
.orb-lavender { width: 520px; height: 520px; bottom: -220px; right: -80px;
  background: radial-gradient(circle at 50% 50%, var(--grad-lavender), transparent 70%);
  animation: drift-a 38s ease-in-out infinite reverse; }

@keyframes drift-a { 50% { transform: translate3d(-32px, 28px, 0) scale(1.06); } }
@keyframes drift-b { 50% { transform: translate3d(30px, -26px, 0) scale(1.08); } }

/* keep page content above the atmospheric orbs */
main { position: relative; z-index: 1; }

/* ---- main -------------------------------------------------------------- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 9vw, 6rem);
}

#notice {
  margin: 0 0 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  color: var(--body);
  box-shadow: var(--soft-drop);
}

/* ---- control bar ------------------------------------------------------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--soft-drop);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.controls[hidden] { display: none; }   /* flex display would otherwise override [hidden] */
.control {
  flex: 1 1 180px;
  padding: 1.1rem 1.25rem;
  border-left: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.control:first-child { border-left: none; }
.control[hidden] { display: none; }   /* flex display would otherwise override [hidden] */
.control-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--muted);
}

/* custom select */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.6rem 2.25rem 0.6rem 0.85rem;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select:hover { border-color: var(--muted); }
select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

/* ---- stage: player ----------------------------------------------------- */
.stage { display: block; }

.player {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--soft-drop);
  padding: 1.5rem;
}
.run-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.run-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--muted);
}
.run-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.3rem;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.run-tabs button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.4rem 1rem;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.run-tabs button.active {
  background: var(--surface-card);
  color: var(--ink);
  box-shadow: var(--soft-drop);
}

#video {
  width: 100%;
  max-width: 640px;        /* per-clip override in JS: 2x native width (caps upscaling ~2x) */
  margin-inline: auto;
  display: block;
  background: var(--surface-dark);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  aspect-ratio: 5 / 4;     /* per-clip override in JS: native w/h (no letterbox) */
  object-fit: contain;
}

/* timeline */
#timeline {
  position: relative;
  display: flex;
  height: 12px;
  margin-top: 1rem;
  border-radius: var(--r-pill);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-strong);
}
.seg { height: 100%; }
.seg.groot   { background: var(--grad-sky); }
.seg.tro     { background: var(--grad-peach); }
.seg.handoff { background: var(--grad-lavender); }

#playhead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 0;
  width: 2px;
  background: var(--ink);
  border-radius: 2px;
  pointer-events: none;
}

#step-readout {
  margin-top: 0.85rem;
  font-size: 14px;
  color: var(--muted);
  min-height: 1.4em;
  font-variant-numeric: tabular-nums;
}

#legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hairline-soft);
  font-size: 13px;
  color: var(--muted);
}
.sw {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: var(--r-xs, 4px);
  margin-right: 0.45rem;
  vertical-align: -1px;
}
.sw.groot   { background: var(--grad-sky); }
.sw.tro     { background: var(--grad-peach); }
.sw.handoff { background: var(--grad-lavender); }

/* episode strip */
#episode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-soft);
}
#episode-strip button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  background: var(--surface-card);
  color: var(--body-strong);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
#episode-strip button:hover { border-color: var(--muted); transform: translateY(-1px); }
#episode-strip button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-primary);
}
#episode-strip .ok      { color: var(--success); font-weight: 600; }
#episode-strip .partial { color: var(--warn);    font-weight: 600; }
#episode-strip .fail    { color: var(--error);   font-weight: 600; }
#episode-strip button.active .ok,
#episode-strip button.active .partial,
#episode-strip button.active .fail { color: var(--on-primary); }

.ep-legend {
  flex-basis: 100%;
  margin-bottom: 0.7rem;
  font-size: 12.5px;
  color: var(--muted);
}
.ep-key { margin-right: 1.2rem; white-space: nowrap; }
.ep-key .ok      { color: var(--success); font-weight: 600; }
.ep-key .partial { color: var(--warn);    font-weight: 600; }
.ep-key .fail    { color: var(--error);   font-weight: 600; }

/* ---- top bar: mode switch + slides link -------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.mode-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.slides-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.05rem;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--body-strong);
  text-decoration: none;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.slides-link:hover { background: var(--surface-card); border-color: var(--hairline-strong); }
.mode-switch button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.5rem 1.15rem;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.mode-switch button:hover:not(.active) { background: var(--surface-card); }
.mode-switch button.active {
  background: var(--surface-card);
  color: var(--ink);
  box-shadow: var(--soft-drop);
}

/* ---- buttons ----------------------------------------------------------- */
.btn-primary {
  appearance: none;
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-active); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost {
  appearance: none;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface-strong); }

.empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
}

/* ---- comparison mode --------------------------------------------------- */
.cmp-bar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.5rem;
}
.cmp-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: capitalize;
}
.cmp-lift {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  background: rgba(22, 163, 74, 0.1);
  padding: 0.2rem 0.7rem;
  border-radius: var(--r-pill);
}
/* Lane qualifier (e.g. "suction lane") when two sections share a task name. */
.cmp-lane {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-strong);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
}
.cmp-speed {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface-strong);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
}
.cmp-bar .btn-ghost { margin-left: auto; }

.cmp-task { margin-bottom: 2.5rem; }
.cmp-task:last-child { margin-bottom: 0; }
.cmp-task-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 0.85rem;
}

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
/* The suction lane compares two setups (weld grasp off / on), not three. */
.cmp-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cmp-col {
  margin: 0;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--soft-drop);
  overflow: hidden;
}
.cmp-col.cmp-win { border-color: var(--grad-peach); box-shadow: 0 6px 22px rgba(244, 197, 168, 0.35); }
.cmp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hairline-soft);
}
.cmp-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink);
}
.cmp-badge.win {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--ink);
  background: var(--grad-peach);
  padding: 0.1rem 0.45rem;
  border-radius: var(--r-pill);
}
/* Marks a 0% baseline we assumed rather than recorded. */
.cmp-badge.assumed {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-strong);
  padding: 0.1rem 0.45rem;
  border-radius: var(--r-pill);
}
.cmp-rate {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.cmp-rate.tro { color: var(--ink); }
.cmp-rate.notro, .cmp-rate.grip { color: var(--muted); }
.cmp-video {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--surface-dark);
}
.cmp-foot {
  padding: 0.65rem 1rem;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cmp-foot .ok { color: var(--success); font-weight: 600; }
.cmp-foot .partial { color: var(--warn); font-weight: 600; }
.cmp-foot .fail { color: var(--error); font-weight: 600; }
.cmp-empty { display: flex; flex-direction: column; }
.cmp-missing {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 1rem;
  text-align: center;
  line-height: 1.5;
  color: var(--muted-soft);
  font-size: 14px;
  background: repeating-linear-gradient(45deg, var(--canvas-soft), var(--canvas-soft) 10px, var(--surface-card) 10px, var(--surface-card) 20px);
}

/* ---- statistics mode --------------------------------------------------- */
/* In-panel policy picker — pill tabs replacing the shared dropdown. */
.policy-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.3rem;
  margin-bottom: 1.75rem;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.policy-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.5rem 1.15rem;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.policy-tab:hover:not(.active) { background: var(--surface-card); }
.policy-tab.active {
  background: var(--surface-card);
  color: var(--ink);
  box-shadow: var(--soft-drop);
}
.stats-head { margin-bottom: 2rem; }
.stats-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.stats-lead { color: var(--body); width: 100%; margin: 0; }
/* Three nested dividers, weighted by level so the grouping reads at a glance:
   arms (section) > tasks (row) > hands (within a row). */
.stats-arm { margin-bottom: 2.75rem; }
.stats-arm-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--body);
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--muted);
  margin: 0 0 1rem;
}
.stat-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline-strong);
}
.stat-task {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-transform: capitalize;
}
.bars { display: flex; flex-direction: column; gap: 0.4rem; }
/* Separates the bars by hand (native gripper | one group per grasp lane) —
   dashed so it reads as a sub-group inside a task row, not a row/section
   break. */
.bar-div {
  height: 0;
  border-top: 1px dashed var(--hairline-strong);
  margin: 0.4rem 0;
}
.bar-line {
  display: grid;
  grid-template-columns: 130px 1fr 42px 64px;
  align-items: center;
  gap: 0.75rem;
}
.bar-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 12.5px;
  color: var(--body);
}
/* Same meaning as .cmp-badge.assumed, sized for the narrow bar-name column. */
.bar-assumed {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-strong);
  padding: 0.05rem 0.35rem;
  border-radius: var(--r-pill);
}
.bar-track {
  display: flex;
  height: 14px;
  background: var(--surface-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.bar-fill { height: 100%; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.bar-fill.grip  { background: var(--grad-sky); }
.bar-fill.notro { background: var(--grad-lavender); }
.bar-fill.tro   { background: var(--grad-peach); }
/* "Ours" row — bolded to stand out against the naive/native baselines. */
.bar-line--ours .bar-name { font-weight: 700; color: var(--ink); }
.bar-line--ours .bar-val  { font-weight: 700; }
.bar-val {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bar-lift {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lift-pos { color: var(--success); }

/* ---- SUMMARY (coverage matrix) ---------------------------------------- */
.sum-head { margin-bottom: 1.75rem; }
.sum-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.sum-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 1.1rem;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--soft-drop);
}
.sum-stat b {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sum-stat span { font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.sum-table-wrap { overflow-x: auto; }
.sum-matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 520px; }
.sum-matrix th, .sum-matrix td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline-soft);
}
.sum-matrix thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
.sum-corner { color: var(--muted-soft) !important; font-weight: 500 !important; }
.sum-rowhead { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.sum-cell.off { color: var(--muted-soft); font-size: 18px; }
.sum-cell.on { background: rgba(167, 229, 211, 0.08); }
.sum-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sum-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--body-strong);
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  padding: 0.12rem 0.5rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.sum-cellmeta { margin-top: 0.4rem; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- entrance choreography -------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.topbar, .controls, .stage {
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.controls { animation-delay: 0.07s; }
.stage    { animation-delay: 0.14s; }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .cmp-grid, .cmp-grid.cols-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; gap: 0.75rem; }
}
@media (max-width: 560px) {
  .control { flex-basis: 100%; border-left: none; }
  .control:not(:first-child) { border-top: 1px solid var(--hairline-soft); }
  .bar-line { grid-template-columns: 96px 1fr 34px 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; scroll-behavior: auto; }
}
