/* ============================================================
   EASING LAB (DEDICATED)  —  /easing-lab
   A standalone, independent copy of /playground/easing's stylesheet.
   Nothing here is @imported by, or shared with, that file — editing
   one can never silently affect the other. Every selector is still
   prefixed .ease- to match its architecture (and keep the two pages'
   markup/JS patterns identical), plus a small .elab- set for the
   custom shell (header, transport, advanced-only controls) that the
   simplified page does not have.

   Colour comes entirely from the site's :root tokens, so dark mode
   works for free via .dark-mode on <html>/<body>.
   ============================================================ */

.ease-body {
  --ease-nav: 56px;              /* our own tiny header, not the site nav */
  --ease-rail: 340px;
  --ease-gutter: 40px;

  --ease-well: #f2eeea;
  --ease-device: #232120;

  --ease-app-bg: #fbfaf9;
  --ease-surface: #ffffff;
  --wf-1: #b9b4ad;
  --wf-2: #d5d0ca;
  --wf-3: #e9e5e0;
  --ease-ink: var(--text-primary);

  --ease-editor: #7c3aed;
}

.dark-mode .ease-body,
body.dark-mode {
  --ease-well: #1d1d1c;
  --ease-device: #000000;
  --ease-app-bg: #161615;
  --ease-surface: #232322;
  --wf-1: #55554e;
  --wf-2: #3d3d37;
  --wf-3: #2b2b26;
  --ease-editor: #a684ff;
}

/* Instrument panel, not a document: no page scroll on desktop, and no
   Lenis — this page never loads smooth.js. */
@media (min-width: 1000px) {
  .ease-body { overflow: hidden; }
}

/* ---------------- standalone header ---------------- */

.elab-header {
  height: var(--ease-nav);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--bg-cream);
}
.elab-header-inner {
  width: 100%;
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 var(--ease-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.elab-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.elab-mark svg { color: var(--ease-editor); flex: none; }
.elab-header-right { display: flex; align-items: center; gap: 18px; }
.elab-back {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
}
.elab-back:hover { color: var(--text-hover); }
.elab-header .theme-toggle-btn { position: static; }

/* ---------------- app shell ---------------- */

/* height, not min-height: on desktop this must be a hard cap, not a floor —
   a floor lets the grid grow to fit its content's natural min-height (which,
   with a transport bar and numeric fields added, is taller than one
   viewport), and the whole page ends up scrolling. A hard cap forces the
   1fr row to a definite size, which is what lets .ease-rail's own
   overflow-y:auto actually do its job as the documented internal-scroll
   fallback instead of the outer page scrolling too. */
.ease-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ease-rail);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 0;
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 var(--ease-gutter) 0;
  height: calc(100vh - var(--ease-nav));
}
@media (max-width: 999px) {
  .ease-app { height: auto; min-height: calc(100vh - var(--ease-nav)); }
}

.ease-stage-head { grid-column: 1; grid-row: 1; }

.ease-stage-col {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 40px 20px 0;
}

.ease-rail { grid-column: 2; grid-row: 2; }

/* ---------------- heading ---------------- */

/* Trimmed vs. the simplified page's heading — the dedicated page adds a
   whole transport bar under the stage, so vertical space has to come from
   somewhere. A smaller title buys back just enough room to keep the common
   1280x800 case scroll-free. */
.ease-stage-head { flex: none; margin-bottom: 10px; padding-top: 14px; }

.elab-title {
  font-size: 22px;
  margin: 0 0 4px;
}

.ease-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 46ch;
}

/* ---------------- the stage: a phone ---------------- */

.ease-stage {
  flex: 1 1 auto;
  min-height: 240px;
  min-width: 0;
  display: grid;
  padding: 20px;
  overflow: hidden;
  background: var(--ease-well);
  border: 1px solid var(--rule-soft);
}

.ease-phone {
  height: min(100%, 820px);
  aspect-ratio: 9 / 19.5;
  justify-self: center;
  container-type: size;
  --fpt: calc(100cqw / 195);
  padding: calc(4 * var(--fpt));
  background: var(--ease-device);
  border-radius: calc(22 * var(--fpt));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.16);
}
.dark-mode .ease-phone {
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  outline: 1px solid rgba(255, 255, 255, 0.09);
  outline-offset: -1px;
}

.ease-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ease-app-bg);
  container-type: size;
  --pt: calc(100cqw / 393);
  border-radius: calc(37 * var(--pt));
}

/* ---------------- wireframe atoms ---------------- */

.wf-bar {
  display: block;
  height: calc(17 * var(--pt));
  border-radius: calc(6 * var(--pt));
  background: var(--wf-2);
  flex: none;
}
.wf-bar.wf-faint { background: var(--wf-3); }
.wf-bar.wf-title { height: calc(21 * var(--pt)); border-radius: calc(7 * var(--pt)); background: var(--wf-1); }
.wf-bar.wf-hero-title { height: calc(32 * var(--pt)); border-radius: calc(8 * var(--pt)); background: var(--wf-1); }

.wf-dot {
  display: block;
  width: calc(58 * var(--pt)); height: calc(58 * var(--pt));
  border-radius: 50%;
  background: var(--wf-2);
  flex: none;
}
.wf-dot-lg { width: calc(64 * var(--pt)); height: calc(64 * var(--pt)); }

.wf-btn {
  display: block;
  height: calc(56 * var(--pt));
  border-radius: calc(15 * var(--pt));
  background: var(--wf-1);
  flex: none;
}
.wf-btn-ghost { background: var(--wf-3); }

.wf-lines { flex: 1; display: flex; flex-direction: column; gap: calc(11 * var(--pt)); min-width: 0; }

.wf-ic {
  flex: none;
  width: calc(34 * var(--pt)); height: calc(34 * var(--pt));
  border-radius: calc(9 * var(--pt));
  background: var(--wf-2);
}
.wf-ic-ok { border-radius: 50%; }

.wf-tab {
  display: block;
  width: calc(32 * var(--pt)); height: calc(32 * var(--pt));
  border-radius: calc(9 * var(--pt));
  background: var(--wf-2);
  flex: none;
}
.wf-tab.is-on { background: var(--wf-1); }

/* ---------------- base screen ---------------- */

.ease-base,
.ease-detail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--ease-app-bg);
  will-change: transform;
  backface-visibility: hidden;
}

.ease-detail { display: none; z-index: 3; }
.ease-viewport[data-kind="push"] .ease-detail { display: flex; }
.ease-viewport[data-kind="push"] .ease-comp { display: none; }

.wf-header {
  display: flex; align-items: center;
  padding: calc(28 * var(--pt)) calc(22 * var(--pt)) calc(18 * var(--pt));
  flex: none;
}
.wf-header-back { gap: calc(16 * var(--pt)); }
.wf-back {
  display: block;
  width: calc(13 * var(--pt)); height: calc(13 * var(--pt));
  border-left: calc(3 * var(--pt)) solid var(--wf-1);
  border-bottom: calc(3 * var(--pt)) solid var(--wf-1);
  transform: rotate(45deg);
  flex: none;
}

.wf-list { flex: 1; overflow: hidden; }

.wf-row {
  display: flex; align-items: center;
  gap: calc(18 * var(--pt));
  padding: calc(20 * var(--pt)) calc(22 * var(--pt));
}
.wf-list .wf-row { border-bottom: 1px solid var(--wf-3); }
.wf-row span {
  flex: 1; display: flex; flex-direction: column;
  gap: calc(11 * var(--pt)); min-width: 0;
}

.wf-tabs {
  display: flex; justify-content: space-around; align-items: center;
  padding: calc(18 * var(--pt)) calc(28 * var(--pt)) calc(24 * var(--pt));
  border-top: 1px solid var(--wf-3);
  flex: none;
}

.wf-detail-body {
  flex: 1;
  display: flex; flex-direction: column; gap: calc(18 * var(--pt));
  padding: calc(28 * var(--pt)) calc(22 * var(--pt)) calc(22 * var(--pt));
}
.wf-hero { display: block; height: 28%; border-radius: calc(8 * var(--pt)); background: var(--wf-3); flex: none; }
.wf-detail-body .wf-btn { margin-top: auto; }

.wf-nav { display: flex; align-items: center; gap: calc(18 * var(--pt)); padding: calc(18 * var(--pt)) calc(22 * var(--pt)); }

/* ---------------- the moving component ---------------- */

.ease-scrim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  z-index: 1;
}

.ease-comp {
  position: absolute;
  z-index: 2;
  background: var(--ease-surface);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.ease-viewport[data-kind="sheet"] .ease-comp {
  left: 0; right: 0; bottom: 0;
  height: 58%;
  padding: calc(14 * var(--pt)) calc(10 * var(--pt)) calc(22 * var(--pt));
  display: flex; flex-direction: column; gap: calc(10 * var(--pt));
  border-radius: calc(22 * var(--pt)) calc(22 * var(--pt)) 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.13);
}
.ease-viewport[data-kind="sheet"] .ease-comp > .wf-btn { margin-top: auto; }

/* Round icon/illustration, centered — the top of a real onboarding sheet. */
.wf-sheet-icon {
  align-self: center;
  flex: none;
  width: calc(64 * var(--pt)); height: calc(64 * var(--pt));
  border-radius: 50%;
  background: var(--wf-2);
  margin: calc(4 * var(--pt)) 0 calc(2 * var(--pt));
}

/* The headline: centered, and the one part of this sheet with no intrinsic
   height (min-height: 0 on a flex child), so on a short mobile stage IT
   shrinks first — the icon and CTA below it, both fixed sizes, never get
   pushed past the viewport's bottom edge the way fixed-height rows could. */
.wf-sheet-copy {
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(10 * var(--pt));
  padding: 0 calc(22 * var(--pt));
  overflow: hidden;
}
.wf-sheet-copy .wf-bar { align-self: center; }

/* The tertiary action: smaller and lighter than the primary CTA, text-only —
   reads as "No thanks", not as a second button competing with the first. */
.wf-sheet-tertiary {
  align-self: center;
  flex: none;
  height: calc(13 * var(--pt));
  background: var(--wf-2);
  margin-top: calc(-2 * var(--pt));
}

.wf-grab {
  display: block;
  width: calc(40 * var(--pt)); height: calc(5 * var(--pt));
  border-radius: calc(2.5 * var(--pt));
  background: var(--wf-2);
  align-self: center;
  margin-bottom: calc(10 * var(--pt));
  flex: none;
}

.ease-viewport[data-kind="drawer"] .ease-comp {
  top: 0; bottom: 0;
  width: 76%;
  padding: calc(24 * var(--pt)) calc(10 * var(--pt));
  display: flex; flex-direction: column;
  box-shadow: 0 0 34px rgba(0, 0, 0, 0.2);
}
.ease-viewport[data-kind="drawer"][data-edge="left"] .ease-comp { left: 0; }
.ease-viewport[data-kind="drawer"][data-edge="right"] .ease-comp { right: 0; }
.wf-drawer-top {
  display: flex; align-items: center; gap: calc(16 * var(--pt));
  padding: 0 calc(12 * var(--pt)) calc(20 * var(--pt));
  margin-bottom: calc(6 * var(--pt));
  border-bottom: 1px solid var(--wf-3);
}

.ease-viewport[data-kind="menu"] .ease-comp {
  top: calc(70 * var(--pt)); right: calc(14 * var(--pt));
  width: 54%;
  padding: calc(4 * var(--pt)) 0;
  display: flex; flex-direction: column;
  transform-origin: top right;
  border-radius: calc(14 * var(--pt));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}
.ease-comp .wf-nav { padding: calc(16 * var(--pt)) calc(12 * var(--pt)); }
.ease-viewport[data-kind="menu"] .wf-nav {
  gap: calc(12 * var(--pt));
  padding: calc(13 * var(--pt)) calc(16 * var(--pt));
}
.ease-viewport[data-kind="menu"] .wf-ic {
  width: calc(22 * var(--pt)); height: calc(22 * var(--pt));
  border-radius: calc(6 * var(--pt));
}
.ease-viewport[data-kind="menu"] .wf-nav + .wf-nav,
.ease-viewport[data-kind="drawer"] .wf-nav + .wf-nav,
.ease-viewport[data-kind="sheet"] .wf-nav + .wf-nav { border-top: 1px solid var(--wf-3); }

.ease-viewport[data-kind="modal"] .ease-comp {
  inset: 0;
  padding: 0 calc(24 * var(--pt));
  display: flex; align-items: center; justify-content: center;
  background: transparent;
}
.wf-card {
  width: 100%;
  background: var(--ease-surface);
  padding: calc(30 * var(--pt)) calc(24 * var(--pt));
  display: flex; flex-direction: column; align-items: center; gap: calc(16 * var(--pt));
  border-radius: calc(18 * var(--pt));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}
.wf-card .wf-title { margin-bottom: calc(2 * var(--pt)); }
.wf-card .wf-actions { width: 100%; }
.wf-actions { display: flex; gap: calc(12 * var(--pt)); margin-top: calc(8 * var(--pt)); }
.wf-actions .wf-btn { flex: 1; }

.ease-viewport[data-kind="toast"] .ease-comp {
  left: 0; right: 0;
  background: transparent;
  padding: 0 calc(14 * var(--pt));
  display: flex; justify-content: center;
}
.ease-viewport[data-kind="toast"][data-edge="top"] .ease-comp { top: 0; padding-top: calc(50 * var(--pt)); }
.ease-viewport[data-kind="toast"][data-edge="bottom"] .ease-comp { bottom: 0; padding-bottom: calc(78 * var(--pt)); }
.wf-toast {
  display: flex; align-items: center; gap: calc(10 * var(--pt));
  padding: calc(13 * var(--pt)) calc(18 * var(--pt));
  max-width: 78%;
  background: var(--ease-surface);
  border-radius: calc(20 * var(--pt));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.wf-toast .wf-ic { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); flex: none; }

/* ---------------- segmented controls ---------------- */

.ease-seg {
  display: inline-flex;
  border: 1px solid var(--rule);
}
.ease-seg button {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1;
  height: 34px;
  min-width: 44px;
  padding: 0 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ease-seg button:first-child { border-left: 0; }
.ease-seg button:hover { color: var(--text-hover); }
.ease-seg button.is-on {
  background: var(--text-primary);
  color: var(--bg-cream);
}
.ease-seg-dir { width: 100%; }
.ease-seg-dir button { flex: 1; font-size: 15px; }
.ease-seg-speed button { min-width: 40px; height: 34px; font-size: 12px; }

.ease-ghost {
  appearance: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ease-ghost:hover { color: var(--text-hover); }
.ease-ghost[aria-pressed="true"] {
  background: var(--text-primary);
  color: var(--bg-cream);
  border-color: var(--text-primary);
}

.ease-hint {
  flex: none;
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  opacity: 0.8;
  white-space: nowrap;
}
.ease-hint i { font-style: normal; opacity: 0.45; margin: 0 4px; }
.ease-hint kbd {
  font-family: var(--font-sans);
  font-size: 11px;
  border: 1px solid var(--rule);
  padding: 1px 5px;
  margin: 0 1px;
}

/* ---------------- transport bar (dedicated page only) ---------------- */

.ease-transport {
  flex: none;
  margin-top: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--rule-soft);
  background: var(--ease-well);
}

.ease-play {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  background: var(--text-primary);
  color: var(--bg-cream);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  flex: none;
}
.ease-play-icon { display: block; }
.ease-stop-icon { display: none; }
.ease-play.is-playing .ease-play-icon { display: none; }
.ease-play.is-playing .ease-stop-icon { display: block; }

.ease-scrub {
  flex: 1 1 auto;
  min-width: 80px;
  height: 34px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.ease-scrub:focus-visible { outline: 2px solid var(--ease-editor); outline-offset: 2px; }
.ease-scrub-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: var(--rule);
}
.ease-scrub-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--ease-editor);
}
.ease-scrub-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px; height: 13px;
  margin-left: -6.5px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--ease-editor);
}
.ease-scrub-read {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 96px;
}
.ease-scrub-read strong { color: var(--text-primary); font-weight: 600; }
.ease-scrub-read i { font-style: normal; opacity: 0.7; }

/* Below the desktop breakpoint the hint text is the first thing to go —
   the bar is already tight on a stacked mobile layout. */
@media (max-width: 780px) {
  .ease-hint { display: none; }
}
@media (max-width: 560px) {
  .ease-transport { flex-wrap: wrap; row-gap: 8px; }
  .ease-scrub-read { min-width: auto; }
}

/* ---------------- control rail ---------------- */

.ease-rail {
  border-left: 1px solid var(--rule-soft);
  padding: 0 0 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
  max-height: 100%;
  scrollbar-width: thin;
}

.ease-group { display: flex; flex-direction: column; gap: 6px; }

.ease-panel { display: flex; flex-direction: column; gap: 11px; }

.ease-app [hidden] { display: none !important; }

.ease-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ease-label output {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* selects */
.ease-select { position: relative; display: block; }
.ease-select select {
  appearance: none;
  width: 100%;
  height: 34px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
}
.ease-select svg {
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -7px;
  pointer-events: none;
  color: var(--text-muted);
}

/* tabs */
.ease-tabs { display: flex; border: 1px solid var(--rule); }
.ease-tabs button {
  appearance: none;
  flex: 1;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  height: 34px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ease-tabs button:first-child { border-left: 0; }
.ease-tabs button.is-on { background: var(--text-primary); color: var(--bg-cream); }

/* ---------------- curve graph ---------------- */

.ease-graph-wrap { display: flex; flex-direction: column; gap: 5px; }

.ease-graph {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  height: auto;
  display: block;
  background: var(--ease-well);
  border: 1px solid var(--rule-soft);
  touch-action: none;
}

.ease-dotgrid circle { fill: var(--rule-soft); }
.ease-dots { pointer-events: none; }

.ease-grid line { stroke: var(--rule-soft); stroke-width: 1; }
.ease-graph-unit { fill: none; stroke: none; }

.ease-curve { fill: none; stroke: var(--text-primary); stroke-width: 2.2; stroke-linecap: round; }

.ease-handle-arm { stroke: var(--ease-editor); stroke-width: 1.4; opacity: 1; }
.ease-handle { fill: var(--ease-editor); stroke: var(--ease-well); stroke-width: 1.6; cursor: grab; }
.ease-handle:active { cursor: grabbing; }
/* Keyboard focus ring on the draggable dots — invisible pointer-only
   controls are the one thing this advanced page must not ship. */
.ease-handle:focus-visible {
  outline: 2px solid var(--ease-editor);
  outline-offset: 3px;
}
.ease-handles[hidden] { display: none; }

.ease-playhead { fill: var(--ease-editor); stroke: var(--ease-well); stroke-width: 1.5; }

.ease-graph-note { font-size: 11px; color: var(--text-muted); opacity: 0.8; }

/* ---------------- numeric bezier fields ---------------- */

.ease-numrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ease-num {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ease-num span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ease-num input {
  appearance: textfield;
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.ease-num input::-webkit-outer-spin-button,
.ease-num input::-webkit-inner-spin-button { margin: 0; }

/* ---------------- numbers & sliders ---------------- */

.ease-slider-row input[type="range"] {
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  cursor: pointer;
}
.ease-slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; background: var(--rule);
}
.ease-slider-row input[type="range"]::-moz-range-track { height: 3px; background: var(--rule); }
.ease-slider-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px; height: 13px; margin-top: -5px;
  border: 0; border-radius: 50%;
  background: var(--text-primary);
}
.ease-slider-row input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--text-primary);
}

.ease-derived-val { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.ease-derived-val strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ---------------- output ---------------- */

.ease-out { gap: 8px; border-top: 1px solid var(--rule-soft); padding-top: 14px; margin-top: 2px; }

.ease-code {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--ease-well);
  color: var(--text-body);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 108px;
  overflow: auto;
}

.ease-out-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ease-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ease-copy:hover { background: var(--rule-soft); }

.ease-back {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.ease-back:hover { color: var(--text-hover); }

/* ---------------- responsive ---------------- */

@media (max-width: 999px) {
  .ease-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    min-height: 0;
    padding-bottom: 60px;
  }
  .ease-stage-head, .ease-stage-col, .ease-rail { grid-column: 1; grid-row: auto; }

  .ease-stage-head { margin-bottom: 12px; }

  .ease-stage-col {
    position: sticky;
    top: var(--ease-nav);
    z-index: 5;
    padding: 10px 0 14px;
    background: var(--bg-cream);
    box-shadow: 0 16px 20px -14px rgba(0, 0, 0, 0.22);
  }

  .ease-stage { height: 40vh; min-height: 240px; max-height: 380px; padding: 16px; }

  .ease-viewport[data-kind="sheet"] .ease-comp { height: 68%; }

  .ease-transport { margin-top: 10px; flex-wrap: wrap; }

  .ease-rail {
    border-left: 0;
    border-top: 1px solid var(--rule-soft);
    padding: 20px 0 0;
    max-height: none;
    overflow: visible;
  }
  .ease-graph { max-width: 300px; }
}

@media (max-width: 620px) {
  .ease-stage { height: 34vh; min-height: 210px; padding: 12px; }
  .elab-header-inner { padding: 0 20px; }
  .elab-back { display: none; }
}

/* Reduced motion: the page is *about* motion, so nothing here is disabled.
   What changes is that it never starts on its own — see easing-lab.js,
   which refuses to autoplay or loop. An explicit press of Play still runs. */
