/* ───────────────────────── Fonts (self-hosted, OFL) ───────────────────────── */
@font-face { font-family: 'Geist'; src: url('/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/fonts/instrument-serif-italic.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lilita One'; src: url('/fonts/lilita-one.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --bg: #0a0a0b;
  --bg-1: #0f0f11;
  --bg-2: #151518;
  --bg-3: #1c1c20;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --fg: #ededee;
  --fg-2: #a3a3ab;
  --fg-3: #6c6c75;
  --accent: #ff6a1f;          /* ember: the single accent */
  --accent-soft: rgba(255, 106, 31, 0.14);
  --hot: #fff3e6;             /* white-hot core */
  --solid-bg: #ededee;
  --solid-fg: #0a0a0b;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 16px 40px -12px rgba(0,0,0,.6);

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1280px;

  /* Motion, after Emil Kowalski: strong ease-out, short durations, nothing from scale(0). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --t-press: 140ms;
  --t-fast: 180ms;
  --t-med: 280ms;
  --t-slow: 520ms;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f5f2;
  --bg-1: #f0efeb;
  --bg-2: #e9e7e2;
  --bg-3: #ffffff;
  --line: rgba(10, 10, 11, 0.08);
  --line-2: rgba(10, 10, 11, 0.15);
  --fg: #111113;
  --fg-2: #55555c;
  --fg-3: #8a8a92;
  --accent: #e2540c;
  --accent-soft: rgba(226, 84, 12, 0.1);
  --solid-bg: #111113;
  --solid-fg: #f6f5f2;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 16px 40px -16px rgba(20,16,10,.18);
  color-scheme: light;
}

/* ───────────────────────── Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}
/* Film grain: barely there, keeps flat blacks from looking digital. */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::after { opacity: .05; mix-blend-mode: multiply; }

img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
svg { flex: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
b { font-weight: 600; }
kbd, code { font-family: var(--mono); font-size: 0.82em; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.6em; height: 1.6em; padding: 0 .4em;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px;
  color: var(--fg-2); background: var(--bg-1);
  line-height: 1; vertical-align: .08em;
}
code { color: var(--fg); background: var(--bg-2); padding: .1em .35em; border-radius: 5px; }
::selection { background: var(--accent); color: #0a0a0b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--solid-bg); color: var(--solid-fg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn--lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn--small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn--solid { background: var(--solid-bg); color: var(--solid-fg); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--fg); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background: color-mix(in oklab, var(--solid-bg) 86%, var(--accent)); }
  .btn--ghost:hover { background: var(--bg-2); border-color: var(--line-2); }
}
.btn__kbd { margin-left: 4px; background: transparent; color: inherit; opacity: .45; border-color: currentColor; }

/* Copy icon ⇄ check morph. Blur hides the crossfade seam. */
.btn__icons { position: relative; width: 16px; height: 16px; display: inline-block; }
.btn__icons svg {
  position: absolute; inset: 0; width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out), filter var(--t-fast) var(--ease-out);
}
.btn__icons .i-check { opacity: 0; transform: scale(.5); filter: blur(4px); }
.is-copied .btn__icons .i-copy { opacity: 0; transform: scale(.5); filter: blur(4px); }
.is-copied .btn__icons .i-check { opacity: 1; transform: scale(1); filter: blur(0); }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; color: var(--fg-2);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast) var(--ease-out); }
.icon-btn .i-sun { opacity: 0; transform: rotate(-45deg) scale(.6); }
:root[data-theme="light"] .icon-btn .i-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .icon-btn .i-moon { opacity: 0; transform: rotate(45deg) scale(.6); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--bg-2); color: var(--fg); } }

/* ───────────────────────── Header ───────────────────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.top__inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { display: inline-flex; align-items: center; gap: 10px; }
.mark__spark { width: 18px; height: 18px; fill: var(--accent); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 70%, transparent)); transition: transform var(--t-slow) var(--ease-out); }
.mark:hover .mark__spark { transform: rotate(90deg); }
.mark__word { font-weight: 650; letter-spacing: -0.04em; font-size: 20px; line-height: 1; }
.mark__sub { color: var(--fg-3); font-size: 13px; padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 1; }
.top__actions { display: flex; align-items: center; gap: 6px; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 6px 0 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-1); color: var(--fg-3); font-size: 13px;
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-press) var(--ease-out);
}
.search-btn:active { transform: scale(.97); }
.search-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-btn span { min-width: 60px; text-align: left; }
@media (hover: hover) and (pointer: fine) { .search-btn:hover { border-color: var(--line-2); color: var(--fg-2); } }

/* ───────────────────────── Compare (shared) ───────────────────────── */
.compare {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
  isolation: isolate;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 0 0 1px var(--line);
}
.compare__layer { position: absolute; inset: 0; }
.compare__layer > img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); z-index: 1; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3;
  width: 0; pointer-events: none;
}
.compare__handle::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 12px rgba(255,255,255,.35);
}
.compare__knob {
  position: absolute; top: 50%; left: 0;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.compare__knob svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.compare.is-dragging .compare__knob, .compare:has(.compare__range:focus-visible) .compare__knob { transform: scale(1.12); background: rgba(255,255,255,.24); }
.compare:has(.compare__range:focus-visible) { box-shadow: 0 0 0 2px var(--accent); }
.compare__range { position: absolute; inset: auto 0 0 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }

.chip {
  position: absolute; top: 14px; z-index: 2;
  height: 26px; padding: 0 10px;
  display: inline-flex; align-items: center;
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px;
  color: #fff;
  background: rgba(10,10,11,.42);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.chip--before { left: 14px; opacity: clamp(0, calc((var(--p, 50) - 14) / 8), 1); }
.chip--after { right: 14px; opacity: clamp(0, calc((86 - var(--p, 50)) / 8), 1); }

/* ───────────────────────── Hero ───────────────────────── */
.hero { padding-top: 8px; }
.compare--hero { aspect-ratio: 16 / 8.2; max-height: calc(100svh - 150px); min-height: 420px; width: 100%; }
.compare--hero .compare__layer > img { object-position: 70% 50%; }
.hero__copy {
  position: absolute; left: clamp(20px, 5vw, 64px); bottom: clamp(24px, 7vw, 88px);
  max-width: 60%;
  pointer-events: none;
}
.hero__eyebrow {
  margin: 0 0 14px;
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.hero__title {
  margin: 0;
  font-size: clamp(56px, 10.4vw, 156px);
  line-height: .9;
  letter-spacing: -0.055em;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero__title em {
  padding-right: .06em;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 30%, #ffd7b0 70%, #ff8a3d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(255, 120, 40, .35));
}
/* The "before" headline: everything a designer would never do. */
.hero__title--before {
  font-family: 'Lilita One', 'Comic Sans MS', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  color: #ffd400;
  -webkit-text-stroke: .05em #111;
  paint-order: stroke fill;
  text-shadow: .045em .055em 0 #111;
  transform: rotate(-3deg);
  transform-origin: left bottom;
  line-height: 1;
}
.hero__eyebrow--before {
  font: 400 clamp(16px, 2vw, 24px)/1 'Lilita One', system-ui, sans-serif;
  letter-spacing: 0; text-transform: none;
  color: #fff; -webkit-text-stroke: 3px #e3002b; paint-order: stroke fill;
  transform: rotate(-3deg); transform-origin: left bottom;
}

/* ───────────────────────── Intro ───────────────────────── */
.intro {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px;
  padding-top: 40px; padding-bottom: 72px;
}
.intro__lede { margin: 0; max-width: 640px; font-size: clamp(20px, 2.1vw, 26px); line-height: 1.35; letter-spacing: -0.02em; color: var(--fg-2); text-wrap: pretty; }
.intro__lede em { color: var(--fg); font-size: 1.12em; }
.intro__lede .sc { font-size: .7em; vertical-align: .18em; color: var(--fg); }
.intro__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.intro__hint { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--fg-3); font-size: 13px; }
.drag-hint { display: inline-flex; align-items: center; gap: 6px; }
.drag-hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); }

/* ───────────────────────── Sub-nav ───────────────────────── */
.subnav {
  position: sticky; top: 60px; z-index: 40;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.subnav__track { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%); }
.subnav__track::-webkit-scrollbar { display: none; }
.subnav__list { position: relative; display: flex; gap: 2px; padding: 8px 0; width: max-content; }
.subnav__list a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 13px; color: var(--fg-3); white-space: nowrap;
  transition: color var(--t-fast) var(--ease-out);
}
.subnav__list a .n { font: 500 10px/1 var(--mono); opacity: .7; }
.subnav__list a.is-active { color: var(--fg); }
.subnav__list a.sep { margin-left: 10px; }
.subnav__list a.sep::before { content: ''; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 1px; background: var(--line-2); }
@media (hover: hover) and (pointer: fine) { .subnav__list a:hover { color: var(--fg); } }
.subnav__pill {
  position: absolute; top: 8px; left: 0; height: 32px; width: 0;
  border-radius: 8px; background: var(--bg-3);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform var(--t-med) var(--ease-out), width var(--t-med) var(--ease-out), opacity var(--t-fast);
  opacity: 0;
}

/* ───────────────────────── Section heads ───────────────────────── */
.section-head { padding: 120px 0 56px; max-width: 760px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.eyebrow span { color: var(--accent); }
.section-title { margin: 0; font-size: clamp(38px, 5.6vw, 72px); line-height: .98; letter-spacing: -0.045em; font-weight: 600; text-wrap: balance; }
.section-title em { color: var(--fg); }
.section-sub { margin: 20px 0 0; font-size: 17px; color: var(--fg-2); max-width: 560px; text-wrap: pretty; }
.section-sub b { color: var(--fg); font-weight: 500; }

/* ───────────────────────── Kit rows ───────────────────────── */
.kit__list { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); padding: 56px 0; }
.row__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.row__media .compare { border-radius: var(--r); }
.row__body { padding-top: 4px; }
.row__eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font: 500 12px/1 var(--mono); color: var(--fg-3); }
.row__eyebrow .num { color: var(--fg-3); }
.sc {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  font: 500 12px/1 var(--mono); color: var(--fg);
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  border-radius: 7px;
}
.sc:empty::before { content: '\200b'; }
.row__title { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.row__tagline { margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--fg-2); letter-spacing: -0.01em; }

.www { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.www > div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.www dt { font: 500 11px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.www dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.www dd b { color: var(--fg); font-weight: 500; }
.try {
  display: flex; align-items: flex-start; gap: 8px; width: 100%;
  margin-top: 8px; padding: 10px 12px; border-radius: 10px; text-align: left;
  background: var(--bg-1); border: 1px solid var(--line);
  font: 400 13px/1.45 var(--mono); color: var(--fg);
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-press) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.try:active { transform: scale(.985); }
.try .sc { height: 20px; padding: 0 6px; font-size: 11px; flex: none; }
.try__text { flex: 1; min-width: 0; padding-top: 1px; }
.try__cta { flex: none; padding-top: 2px; font: 500 11px/1.5 var(--mono); color: var(--fg-3); letter-spacing: .06em; text-transform: uppercase; transition: color var(--t-fast); }
@media (hover: hover) and (pointer: fine) {
  .try:hover { border-color: var(--line-2); background: var(--bg-2); }
  .try:hover .try__cta { color: var(--accent); }
}
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12px; color: var(--fg-2); white-space: nowrap;
}
.tool::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); }
.tool.is-primary { color: var(--fg); }
.tool.is-primary::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.row__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.row__actions .btn--ghost .chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-med) var(--ease-out); }
.row.is-open .row__actions .chev { transform: rotate(180deg); }

/* Prompt drawer: height animates via grid rows, no JS measuring. */
.row__drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-slow) var(--ease-drawer); }
.row.is-open .row__drawer { grid-template-rows: 1fr; }
.row__drawer > div { overflow: hidden; min-height: 0; }
.row__drawer .code { margin-top: 32px; opacity: 0; transform: translateY(-6px); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
.row.is-open .row__drawer .code { opacity: 1; transform: none; transition-delay: 80ms; }

.code {
  margin: 0; padding: 22px 24px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
  font: 400 13px/1.7 var(--mono); color: var(--fg-2);
  white-space: pre-wrap; word-break: break-word; tab-size: 2;
}
.code .h { color: var(--fg); font-weight: 600; }
.code .k { color: var(--fg); font-weight: 600; }
.code .b { color: var(--accent); }
.code .t { color: var(--hot); font-weight: 600; }
:root[data-theme="light"] .code .t { color: var(--accent); }
.code .caret { display: inline-block; width: .55em; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Master row is the anchor: bigger, prompt visible. */
.row--master .row__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.row--master .code { max-height: 560px; overflow: auto; position: relative; padding-bottom: 72px; -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
.row--master .row__title { font-size: clamp(36px, 4.4vw, 56px); }
.master-note { margin: 14px 0 0; font-size: 14px; color: var(--fg-3); }

/* ───────────────────────── Custom media: audio / code / perf ───────────────────────── */
.panel { position: absolute; inset: 0; display: flex; flex-direction: column; background: #0d0d0f; color: #ededee; }
.panel--before { background: #121214; }
.panel__head { display: flex; justify-content: space-between; align-items: center; padding: 50px 18px 0; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(237,237,238,.5); }
.panel__stat { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.panel__stat b { color: #ededee; font-weight: 500; }
.panel--before .panel__stat b { color: #ff5d5d; }
.panel--after .panel__stat b.good { color: #7ee2a0; }
.panel canvas { flex: 1; width: 100%; min-height: 0; display: block; }
.panel__foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 0 18px 16px; font: 400 11px/1.3 var(--mono); color: rgba(237,237,238,.55); }
.panel__foot span { display: inline-flex; align-items: center; gap: 6px; }
.panel__foot i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }



/* Media cards that aren't sliders: audio lanes and code tabs. Always dark, like a screenshot. */
.media-card {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--r); overflow: hidden;
  background: #0d0d0f; color: #ededee;
  box-shadow: 0 0 0 1px var(--line);
}
.chip-static {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: #fff;
}

.audio { display: grid; grid-template-rows: 1fr 1fr; padding: clamp(14px, 2.4vw, 22px); gap: clamp(10px, 2vw, 18px); }
.lane { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px 14px; min-height: 0; }
.lane + .lane { border-top: 1px solid rgba(255,255,255,.07); padding-top: clamp(10px, 2vw, 18px); }
.lane__meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; font: 400 12px/1.3 var(--mono); color: rgba(237,237,238,.55); }
.lane__meta > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane--after .chip-static { border-color: color-mix(in oklab, #ff6a1f 60%, transparent); background: rgba(255,106,31,.12); }
.lane__play {
  align-self: center;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: #ededee; color: #0a0a0b;
  transition: transform var(--t-press) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.lane__play svg { width: 13px; height: 13px; fill: currentColor; margin-left: 2px; }
.lane__play:active { transform: scale(.92); }
.lane__play.is-playing { box-shadow: 0 0 0 6px rgba(255,255,255,.12); }
.lane--after .lane__play { background: #ff6a1f; color: #0a0a0b; }
.lane--after .lane__play.is-playing { box-shadow: 0 0 0 6px rgba(255,106,31,.22), 0 0 24px rgba(255,106,31,.45); }
.lane__wave { position: relative; min-height: 0; }
.lane__wave canvas { position: absolute; inset: 0 0 16px; width: 100%; height: calc(100% - 16px); }
.lane--before .lane__wave canvas { inset: 0; height: 100%; }
.beat { position: absolute; bottom: 0; height: 14px; font: 400 10px/14px var(--mono); color: rgba(237,237,238,.45); white-space: nowrap; overflow: hidden; }
.beat--hit { color: #ff6a1f; padding-left: 6px; border-left: 1px solid #ff6a1f; }
.playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--hot); box-shadow: 0 0 10px #ff6a1f; opacity: 0; pointer-events: none; }

.codecard { display: flex; flex-direction: column; }
.codecard__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.codecard__file { font: 400 12px/1 var(--mono); color: rgba(237,237,238,.5); }
.seg--dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.seg--dark button { height: 26px; font: 500 12px/1 var(--font); color: rgba(237,237,238,.55); }
.seg--dark button[aria-selected="true"] { color: #fff; background: rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.codecard__views { flex: 1; display: grid; min-height: 0; }
.codecard__view {
  grid-area: 1 / 1; display: flex; flex-direction: column; min-height: 0;
  opacity: 0; filter: blur(4px); transform: translateY(4px);
  transition: opacity var(--t-med) var(--ease-out), filter var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
  pointer-events: none;
}
.codecard__view.is-active { opacity: 1; filter: none; transform: none; pointer-events: auto; }
.codecard pre { flex: 1; margin: 0; padding: 14px 16px; overflow: hidden; font: 400 clamp(9px, 1.05vw, 12.5px)/1.62 var(--mono); color: #bdbdc4; white-space: pre; }
.codecard .c { color: #6c6c75; }
.codecard .kw { color: #ededee; font-weight: 600; }
.codecard .s { color: #ffb37d; }
.codecard .bad { background: rgba(255, 70, 70, .13); box-shadow: inset 2px 0 0 #ff5d5d; display: inline-block; width: 100%; }
.codecard .good { background: rgba(126, 226, 160, .08); box-shadow: inset 2px 0 0 #7ee2a0; display: inline-block; width: 100%; }
.codecard__note { margin: 0; padding: 10px 16px 12px; font: 400 11.5px/1.4 var(--mono); border-top: 1px solid rgba(255,255,255,.07); }
.codecard__note.is-bad { color: #ff8a8a; }
.codecard__note.is-good { color: #8fe7ad; }

/* ───────────────────────── Workflow ───────────────────────── */
.phases { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: ph; }
.phase {
  display: grid; grid-template-columns: 72px minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px;
  align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
  position: relative;
}
.phase__n { font: 500 13px/1 var(--mono); color: var(--fg-3); }
.phase__name { margin: 0; font-size: 22px; letter-spacing: -0.03em; font-weight: 600; line-height: 1.15; }
.phase__name small { display: block; margin-top: 6px; font: 400 12px/1 var(--mono); color: var(--fg-3); letter-spacing: 0; }
.phase__body { margin: 0; color: var(--fg-2); font-size: 15px; text-wrap: pretty; }
.phase__keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.phase__keys button { transition: transform var(--t-press) var(--ease-out), border-color var(--t-fast); }
.phase__keys button:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .phase__keys button:hover { border-color: var(--accent); } }
.phase__out { margin: 0; font-size: 14px; color: var(--fg-3); }
.phase__out::before { content: '→ '; color: var(--accent); }
.phase::before {
  content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  transform-origin: left; transform: scaleX(0);
}
@supports (animation-timeline: view()) {
  .phase::before { animation: grow linear both; animation-timeline: view(); animation-range: entry 40% cover 45%; }
  @keyframes grow { to { transform: scaleX(1); } }
}

.loop { margin-top: 88px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-1); }
.loop__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.loop__title { margin: 0; font-size: 28px; letter-spacing: -0.035em; font-weight: 600; }
.loop__sub { margin: 0; color: var(--fg-3); font-size: 14px; }
.loop__steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.loop__steps li { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }
.loop__steps b { color: var(--fg); font-size: 16px; letter-spacing: -0.02em; }
.loop__n { font: 500 12px/1 var(--mono); color: var(--accent); margin-bottom: 6px; }

.tips { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tips li { padding: 18px; border-radius: var(--r); border: 1px dashed var(--line-2); font-size: 14px; color: var(--fg-2); text-wrap: pretty; }
.tips b { color: var(--fg); display: block; margin-bottom: 4px; font-size: 15px; }

/* ───────────────────────── Stack builder ───────────────────────── */
.stack__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.label { display: block; margin: 0 0 10px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.stack__controls .label:not(:first-child) { margin-top: 28px; }
.recipes, .toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  height: 34px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-2); color: var(--fg-2); font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.pill:active { transform: scale(.96); }
.pill .sc { height: 18px; padding: 0 5px; font-size: 10.5px; }
.pill[aria-pressed="true"] { background: var(--solid-bg); color: var(--solid-fg); border-color: var(--solid-bg); }
.pill[aria-pressed="true"] .sc { background: transparent; border-color: currentColor; color: inherit; opacity: .7; }
@media (hover: hover) and (pointer: fine) { .pill:not([aria-pressed="true"]):hover { border-color: var(--fg-3); color: var(--fg); } }
.task {
  width: 100%; resize: vertical; min-height: 96px;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--bg-1); border: 1px solid var(--line-2);
  font-size: 15px; line-height: 1.5;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.task:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.task::placeholder { color: var(--fg-3); }
.stack__out { position: sticky; top: 130px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); overflow: hidden; }
.stack__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.stack__meta { font: 400 12px/1.3 var(--mono); color: var(--fg-3); }
.stack__pre { border: 0; border-radius: 0; max-height: min(62vh, 560px); overflow: auto; }

/* ───────────────────────── Install ───────────────────────── */
.prefix { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; }
.prefix .label { margin: 0; }
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-1); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; min-width: 44px; height: 30px; padding: 0 12px; border-radius: 7px; font: 500 14px/1 var(--mono); color: var(--fg-3); transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), transform var(--t-press) var(--ease-out); }
.seg button:active { transform: scale(.95); }
.seg button[aria-checked="true"] { color: var(--fg); background: var(--bg-3); box-shadow: 0 0 0 1px var(--line-2); }
.prefix__preview { font-size: 13px; color: var(--fg-3); }
.prefix__preview span { font-family: var(--mono); color: var(--fg-2); }

.installs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inst { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-1); }
.inst--primary { background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border-color: var(--line-2); }
.inst--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 24px; }
.inst__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.inst h3 { margin: 0; font-size: 20px; letter-spacing: -0.03em; font-weight: 600; }
.inst__tag { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.inst ol { margin: 0; padding-left: 18px; color: var(--fg-2); font-size: 14px; display: grid; gap: 6px; flex: 1; align-content: start; }
.inst ol b, .inst p b { color: var(--fg); font-weight: 500; }
.inst p { margin: 0; color: var(--fg-2); font-size: 14px; }
.inst .btn { align-self: flex-start; }
.inst__row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ───────────────────────── Footer ───────────────────────── */
.foot { margin-top: 140px; padding-top: 40px; padding-bottom: 48px; border-top: 1px solid var(--line); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.foot__word { margin: 0; font-size: clamp(96px, 18vw, 240px); line-height: .8; letter-spacing: -0.07em; font-weight: 650; color: var(--bg-3); user-select: none; }
:root[data-theme="light"] .foot__word { color: var(--bg-2); }
.foot__note { margin: 20px 0 0; max-width: 460px; font-size: 13px; color: var(--fg-3); }
.foot__meta { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.foot__meta div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.foot__meta dt { color: var(--fg-3); }
.foot__meta dd { margin: 0; color: var(--fg-2); text-align: right; }

/* ───────────────────────── Palette ───────────────────────── */
.palette { padding: 0; border: 0; background: transparent; color: inherit; width: min(620px, calc(100vw - 24px)); max-height: none; margin: 12vh auto auto; overflow: visible; }
.palette::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
:root[data-theme="light"] .palette::backdrop { background: rgba(20,16,10,.18); }
.palette[open] .palette__box { animation: pop var(--t-fast) var(--ease-out); }
.palette[open]::backdrop { animation: fade var(--t-fast) var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } }
@keyframes fade { from { opacity: 0; } }
.palette__box { border-radius: 16px; background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); overflow: hidden; transform-origin: top center; }
:root[data-theme="light"] .palette__box { background: #fff; }
.palette__search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.palette__search svg { width: 18px; height: 18px; fill: none; stroke: var(--fg-3); stroke-width: 2; stroke-linecap: round; }
.palette__search input { flex: 1; height: 56px; border: 0; background: transparent; font-size: 16px; outline: none; }
.palette__search input::placeholder { color: var(--fg-3); }
.palette__list { list-style: none; margin: 0; padding: 6px; max-height: min(56vh, 440px); overflow: auto; }
.palette__group { padding: 10px 10px 6px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.palette__item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 10px; border-radius: 10px; cursor: pointer; color: var(--fg-2); }
.palette__item[aria-selected="true"] { background: var(--bg-2); color: var(--fg); }
:root[data-theme="light"] .palette__item[aria-selected="true"] { background: var(--bg-1); }
.palette__item .sc { flex: none; min-width: 52px; justify-content: center; }
.palette__item .ic { width: 52px; display: grid; place-items: center; flex: none; color: var(--fg-3); }
.palette__item .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.palette__item .t { flex: 1; min-width: 0; font-size: 14px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__item .t small { color: var(--fg-3); margin-left: 8px; font-size: 13px; }
.palette__item .uses { font: 400 11px/1 var(--mono); color: var(--fg-3); }
.palette__empty { padding: 28px; text-align: center; color: var(--fg-3); font-size: 14px; }
.palette__foot { display: flex; gap: 16px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); }
.palette__foot kbd { margin-right: 4px; font-size: 10px; }

/* ───────────────────────── Toasts (Sonner-style stack) ───────────────────────── */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); list-style: none; margin: 0; padding: 0; width: min(380px, calc(100vw - 24px)); height: 0; }
.toast {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.55);
  font-size: 14px;
  transition: transform 400ms var(--ease-out), opacity 400ms var(--ease-out);
  transform: translateY(calc(var(--i) * -10px)) scale(calc(1 - var(--i) * .05));
  opacity: calc(1 - var(--i) * .25);
  z-index: calc(10 - var(--i));
}
:root[data-theme="light"] .toast { background: #fff; box-shadow: 0 16px 40px -16px rgba(20,16,10,.25); }
.toast[data-state="enter"] { transform: translateY(100%); opacity: 0; }
.toast[data-state="exit"] { transform: translateY(calc(var(--i) * -10px + 8px)) scale(.96); opacity: 0; transition-duration: 200ms; }
.toast svg { width: 18px; height: 18px; margin-top: 1px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toast b { display: block; font-weight: 500; color: var(--fg); }
.toast span { color: var(--fg-3); font-size: 13px; }

/* ───────────────────────── Reveal ───────────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1080px) {
  .row__grid, .row--master .row__grid { grid-template-columns: 1fr; gap: 28px; }
  .phase { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 16px; }
  .phase__name, .phase__main, .phase__out { grid-column: 2; }
  .loop__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack__grid { grid-template-columns: 1fr; }
  .stack__out { position: static; }
  .installs { grid-template-columns: 1fr 1fr; }
  .inst--wide { grid-template-columns: 1fr; }
  .inst__row { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .mark__sub { display: none; }
  .search-btn span { display: none; }
  .search-btn { padding: 0 8px; }
  .search-btn kbd { display: none; }
  .compare--hero { aspect-ratio: 4 / 5; min-height: 0; max-height: 78svh; }
  .compare--hero .compare__layer > img { object-position: 74% 50%; }
  .hero__copy { max-width: 88%; left: 34px; bottom: 24px; }
  .hero__copy::before { content: ''; position: absolute; inset: -60vh -40px -40px -40px; z-index: -1; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 60%); }
  .intro { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 48px; }
  .intro__actions .btn { flex: 1; }
  .section-head { padding: 88px 0 36px; }
  .row { padding: 40px 0; }
  .row__tagline { font-size: 19px; }
  .row__eyebrow { flex-wrap: wrap; row-gap: 8px; }
  .media-card.audio { aspect-ratio: 4 / 3.4; }
  .media-card.codecard { aspect-ratio: auto; }
  .codecard pre { font-size: 10.5px; overflow-x: auto; }
  .lane__play { width: 38px; height: 38px; }
  .www > div { grid-template-columns: 1fr; gap: 2px; }
  .chip { top: 10px; height: 22px; font-size: 10px; }
  .chip--before { left: 10px; } .chip--after { right: 10px; }
  .compare__knob { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .panel__head { padding-top: 40px; }
  .panel__stat { gap: 8px; }
  .loop__steps, .tips, .installs { grid-template-columns: 1fr; }
  .code { padding: 16px; font-size: 12px; }
  .foot__grid { grid-template-columns: 1fr; }
  .row__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
