/* FanControl Pro — site styles (Home, Docs, About)
   Direction: "The product performs" · palette "Sheet and biro" · type Schibsted Grotesk */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2190, U+2192, U+2194-2199, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* page */
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface-2: #e9e9e9;
  --ink: #111111;
  --muted: #4a4a4a;
  --accent: #1a4be0;
  --accent-strong: #1238b0;
  --accent-ink: #ffffff;
  --field-1: #111111;
  --field-1-ink: #ffffff;
  --field-1-muted: #b4b4b4;
  --field-1-step: #2a2a2a;

  /* product interface (inside [data-ui] only) */
  --app-bg: #0e1a3a;
  --app-card: #15264f;
  --app-raise: #1d3266;
  --app-line: #2c4580;
  --app-ink: #eef2fb;
  --app-muted: #a9b6d6;
  --app-accent: #ffcf3f;
  --app-accent-ink: #1a1400;

  /* type: five steps */
  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 1rem + 5.6vw, 6.5rem);

  /* space */
  --margin: clamp(16px, 2.8vw, 40px);
  --gap: clamp(16px, 1.8vw, 24px);
  --section: clamp(120px, 12vw, 200px);
  --radius: 0px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-press: 120ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

h1, h2 {
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-wrap: balance;
}
h2 { font-size: var(--step-head); }
.lead { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.015em; }

.skip {
  position: absolute; left: var(--margin); top: -100px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 12px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- buttons and links ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: var(--step-body); text-decoration: none;
  border: 0; border-radius: var(--radius); cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button-small { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }
.button-block { width: 100%; }
.text-button {
  background: none; border: 0; padding: 10px 0; cursor: pointer;
  font-weight: 600; color: inherit;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em;
  transition: text-decoration-color var(--t-hover) ease, opacity var(--t-hover) ease;
}
.text-button:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .text-button:not(:disabled):hover, .bar-nav a:hover, .foot-links a:hover { text-decoration-color: currentColor; }
}

/* ---------- top bar ---------- */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 40px;
  padding: 22px var(--margin);
}
.wordmark { color: var(--ink); font-weight: 800; font-size: var(--step-body); letter-spacing: -0.04em; text-decoration: none; }
.bar-nav { display: flex; gap: 32px; }
.bar-nav a, .foot-links a {
  color: var(--ink); font-weight: 600; font-size: var(--step-small); text-decoration: underline;
  text-decoration-color: transparent; text-underline-offset: 0.3em; transition: text-decoration-color var(--t-hover) ease;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 150px var(--margin) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  align-content: start;
}
.hero-copy { grid-column: 1 / span 7; position: relative; z-index: 2; }
.hero h1 { font-size: var(--step-display); max-width: 14ch; }
.hero-lead { margin-top: 36px; max-width: 34ch; font-size: var(--step-body); }
.hero-actions { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-meta { font-size: var(--step-small); color: var(--muted); }

.stage {
  position: absolute; z-index: 1;
  left: calc(var(--margin) + (100vw - 2 * var(--margin) + var(--gap)) / 12 * 4);
  right: 0; top: 42%; bottom: 0;
  background: var(--accent);
  clip-path: polygon(96px 0, 100% 0, 100% 100%, 0 100%, 0 96px);
  overflow: hidden;
}
.stage-inner { display: flex; align-items: flex-start; gap: 32px; padding: 56px 0 0 48px; height: 100%; }
.fan-tile { flex: 0 0 auto; width: clamp(180px, 14vw, 240px); color: var(--accent-ink); }
.fan-tile video { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.fan-tile figcaption { margin-top: 12px; font-size: var(--step-small); font-weight: 600; }
.fan-tile output { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- product interface (data-ui) ---------- */
.app {
  background: var(--app-bg); color: var(--app-ink);
  font-family: var(--font); font-size: 14px; line-height: 1.35; letter-spacing: 0;
  border-radius: 10px; padding: 18px;
}
.app output, .app b, .app-big, .mixer-temp, .app-list b { font-variant-numeric: tabular-nums; }
.app-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--app-line); /* taste-skill-ignore */ margin-bottom: 14px; }
.app-title { font-weight: 700; font-size: 15px; }
.app-kind { color: var(--app-muted); font-size: 13px; }
.app-label { display: block; color: var(--app-muted); font-size: 13px; margin-bottom: 4px; }
.app-field { margin-bottom: 12px; }
.app-select, .app-value {
  display: block; padding: 7px 10px; background: var(--app-card); border-bottom: 1px solid var(--app-line); /* taste-skill-ignore */
  border-radius: 4px 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-select::after { content: " ▾"; color: var(--app-muted); }
.app-value-big { font-size: 26px; font-weight: 700; padding: 8px 10px; }
.app-big { display: block; white-space: nowrap; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.app-accent { color: var(--app-accent); font-weight: 600; }
.app-readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.app-readouts-2 { grid-template-columns: 1fr auto; margin: 4px 0 16px; }
.app-pair { display: flex; justify-content: space-between; margin-top: 12px; font-weight: 600; }
.app-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.app-meter { height: 8px; background: var(--app-card); border-radius: 4px; overflow: hidden; }
.app-meter span { display: block; height: 100%; background: var(--app-accent); border-radius: 4px; transition: width 300ms var(--ease-out); }
.app-meter-wide { height: 12px; }
.app-hint { margin-top: 10px; color: var(--app-muted); font-size: 13px; }
.app-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--app-line); } /* taste-skill-ignore */
.app-list li:last-child { border-bottom: 0; }
.app-btn {
  margin-top: 4px; padding: 8px 14px; background: var(--app-accent); color: var(--app-accent-ink);
  border: 0; border-radius: 6px; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), filter var(--t-hover) ease;
}
.app-btn:active { transform: scale(0.96); }
.app-chips li { display: flex; justify-content: space-between; padding: 7px 10px; margin-bottom: 6px; background: var(--app-card); border-radius: 4px; }
.app-chips li.is-on { outline: 1px solid var(--app-accent); }
.app-switch {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--app-muted);
}
.app-switch::before {
  content: ""; width: 34px; height: 18px; border-radius: 9px; background: var(--app-line);
  box-shadow: inset 2px 0 0 2px var(--app-line); /* taste-skill-ignore */ transition: background-color var(--t-hover) ease;
}
.app-switch[aria-checked="true"]::before { /* taste-skill-ignore */ background: var(--app-accent); box-shadow: inset 16px 0 0 2px var(--app-accent), inset 18px 0 0 9px var(--app-bg); }

/* range input in the product */
.app input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.app input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--app-line); border-radius: 3px; }
.app input[type="range"]::-moz-range-track { height: 6px; background: var(--app-line); border-radius: 3px; }
.app input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--app-accent); border: 3px solid var(--app-bg); }
.app input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--app-accent); border: 3px solid var(--app-bg); }
.app input[type="checkbox"] { accent-color: var(--app-accent); width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; }
.app :focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }

/* hero curve editor */
.app-curve { flex: 0 0 auto; width: min(600px, 100%); padding: 20px 22px 22px; }
.app-range { display: block; margin-bottom: 8px; }
.graph { position: relative; background: var(--app-card); border-radius: 6px; padding: 10px 10px 28px; }
.graph svg { width: 100%; height: auto; overflow: visible; touch-action: none; }
.graph-grid line { stroke: var(--app-line); stroke-width: 1; }
.graph-area { fill: var(--app-raise); }
.graph-line { fill: none; stroke: var(--app-ink); stroke-width: 2.5; stroke-linejoin: round; }
.graph-now { stroke: var(--app-accent); stroke-width: 1.5; stroke-dasharray: 4 4; }
.graph-dot { fill: var(--app-accent); stroke: var(--app-bg); stroke-width: 3; }
.graph-handle { fill: var(--app-bg); stroke: var(--app-ink); stroke-width: 2.5; cursor: grab; transition: r 150ms var(--ease-out); }
.graph-handle:hover, .graph-handle.is-drag { r: 10; stroke: var(--app-accent); }
.graph-handle:focus-visible { outline: none; stroke: var(--app-accent); r: 10; }
.graph-axis { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 16px; color: var(--app-muted); font-size: 13px; }
.graph-axis span { position: absolute; transform: translateX(-50%); }
.graph-axis span:nth-child(1) { left: 7.14%; }
.graph-axis span:nth-child(2) { left: 35.71%; }
.graph-axis span:nth-child(3) { left: 64.29%; }
.graph-axis span:nth-child(4) { left: 92.86%; }

/* ---------- hardware ---------- */
.hardware {
  padding: var(--section) var(--margin) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start;
}
.hw-main { grid-column: 1 / span 6; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
.hw-main img { width: 100%; height: 100%; object-fit: cover; }
.hw-copy { grid-column: 8 / span 5; padding-top: 8px; }
.hw-copy h2 { max-width: 13ch; }
.hw-copy .lead { margin-top: 32px; }
.hw-list { margin-top: 48px; display: grid; gap: 20px; }
.hw-list li { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: center; }
.hw-list img { width: 132px; height: 96px; object-fit: cover; background: var(--surface); }
.hw-list li:nth-child(2) img { object-position: 30% 50%; }
.hw-list strong { display: block; font-weight: 600; font-size: var(--step-body); }
.hw-list span { display: block; color: var(--muted); font-size: var(--step-small); line-height: 1.45; margin-top: 2px; }

/* ---------- showcase: curve types ---------- */
.curves {
  margin-top: var(--section);
  background: var(--field-1); color: var(--field-1-ink);
  min-height: 84svh; padding: 112px 0 112px;
  display: flex; flex-direction: column; justify-content: center; gap: 64px;
}
.curves-head { padding: 0 var(--margin); }
.curves-nav { display: flex; gap: 28px; margin-top: 20px; }
.curves-body { position: relative; }
.row {
  display: flex; align-items: center; gap: max(26vw, 380px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 24px 0; cursor: grab; overscroll-behavior-x: contain;
}
.row::-webkit-scrollbar { display: none; }
.row.is-drag { cursor: grabbing; scroll-snap-type: none; }
.row:focus-visible { outline-offset: -3px; }
.row-pad { flex: 0 0 max(0px, calc(50vw - 220px - max(26vw, 380px))); }
.panel { flex: 0 0 auto; width: 440px; scroll-snap-align: center; opacity: 0.32; transition: opacity 400ms var(--ease-soft), transform 400ms var(--ease-out); transform: scale(0.94); }
.panel.is-active { opacity: 1; transform: none; }
.app-mini { min-height: 300px; font-size: 15px; }
.mini-graph { width: 100%; height: auto; margin: 4px 0 6px; }
.mini-h { fill: var(--app-bg); stroke: var(--app-ink); stroke-width: 2; }
.curves-caption {
  position: absolute; top: 24px; left: calc(50vw + 220px + 48px); width: 24ch;
}
.curves-name { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; }
.curves-text { margin-top: 10px; color: var(--field-1-muted); }

/* ---------- params: one control, explained ---------- */
.params {
  padding: var(--section) var(--margin) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
}
.params-title { grid-column: 1 / span 4; grid-row: 1; text-align: right; justify-self: end; }
.params-stage { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); position: relative; }
.app-control { grid-column: 5 / span 4; width: 100%; max-width: 400px; justify-self: center; padding: 20px; }
.ctl { padding: 12px 0; border-top: 1px solid var(--app-line); /* taste-skill-ignore */ transition: opacity 250ms ease; }
.ctl:has(.stepper + .stepper) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stepper { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 4px; }
.stepper .app-label { grid-column: 1 / -1; margin: 0; }
.stepper output { text-align: center; padding: 6px 4px; background: var(--app-card); border-radius: 4px; }
.stepper button {
  height: 32px; border: 0; border-radius: 4px; background: var(--app-raise); color: var(--app-accent);
  font-weight: 700; font-size: 18px; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.stepper button:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { background: var(--app-line); } .app-btn:hover { filter: brightness(1.08); } }
.app-control.is-focus .ctl:not(.is-target) { opacity: 0.3; }
.app-control.is-focus .ctl.is-target { opacity: 1; }

.notes { position: relative; }
.notes-left { grid-column: 1 / span 4; grid-row: 1; text-align: right; }
.notes-right { grid-column: 9 / span 4; grid-row: 1; }
.note { max-width: 26ch; padding: 6px 0; cursor: default; outline-offset: 6px; transition: color var(--t-hover) ease; }
.notes-left .note { margin-left: auto; }
.note strong { display: block; font-size: var(--step-body); font-weight: 600; }
.note span { display: block; margin-top: 4px; color: var(--muted); font-size: var(--step-small); line-height: 1.45; }
.note.is-on strong { color: var(--accent); }
.params-stage:not(.is-placed) .notes-left { padding-top: 140px; }
.params-stage.is-placed .note { position: absolute; left: 0; right: 0; }
.params-stage.is-placed .notes-left .note { left: auto; }

/* ---------- mix: call and response ---------- */
.mix { padding: var(--section) var(--margin) 0; }
.mix-col { margin-left: calc((100vw - 2 * var(--margin) + var(--gap)) / 12 * 3); width: min(560px, 100%); }
.mix h2 { margin-bottom: 56px; max-width: 10ch; }
.exchange + .exchange { margin-top: 88px; }
.ex-say { font-size: var(--step-body); font-weight: 600; letter-spacing: -0.015em; }
.call {
  margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--surface); padding: 20px; border-radius: 8px; font-weight: 600;
}
.call-key { font-size: var(--step-small); color: var(--muted); font-weight: 600; background: var(--surface-2); padding: 4px 10px; border-radius: 4px; white-space: nowrap; }
.response { margin: 16px 0 0 56px; }
.exchange-wide .response { width: min(760px, calc(100vw - 2 * var(--margin))); }
.app-mixer { padding: 22px; }
.mixer-fn { display: inline-flex; background: var(--app-card); border-radius: 6px; padding: 3px; margin-bottom: 16px; }
.mixer-fn button, .seg button {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--app-muted);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.mixer-fn button:active, .seg button:active { transform: scale(0.96); }
.mixer-fn button[aria-checked="true"], .seg button[aria-checked="true"] { background: var(--app-accent); color: var(--app-accent-ink); }
.mixer-row { display: grid; grid-template-columns: 150px 1fr 60px 52px; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--app-line); /* taste-skill-ignore */ transition: opacity 200ms ease; }
.mixer-row.is-off { opacity: 0.45; }
.mixer-row.is-max .mixer-pct { color: var(--app-accent); }
.mixer-check { cursor: pointer; white-space: nowrap; }
.mixer-temp { color: var(--app-muted); text-align: right; }
.mixer-pct { text-align: right; }
.mixer-out { margin-top: 18px; }
.mixer-result { display: flex; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.mixer-result output:first-child { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; color: var(--app-accent); }
.mixer-rpm { color: var(--app-muted); font-size: 16px; }

/* ---------- day: bars on the edge ---------- */
.day {
  margin-top: var(--section);
  background: var(--field-1); color: var(--field-1-ink);
  min-height: 90svh; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: 80px;
}
.day-head { padding: 0 var(--margin); max-width: 900px; }
.day-figure { font-size: var(--step-display); line-height: 0.88; }
.day-claim { margin-top: 14px; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; }
.day-note { margin-top: 16px; max-width: 46ch; color: var(--field-1-muted); }
.bars {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 8px; align-items: end;
  height: 58vh; min-height: 300px; margin-top: 48px;
}
.bar-col { position: relative; height: 100%; }
.bar-track { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bar-fill { background: var(--field-1-step); height: var(--h); min-height: 6px; transform-origin: bottom; transition: background-color var(--t-hover) ease; }
.bar-col.is-zero .bar-fill { background: var(--accent); }
.bar-val {
  position: absolute; left: 0; right: 0; bottom: calc(var(--h) + 10px); text-align: center;
  font-size: var(--step-body); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.bar-val small { display: block; font-size: var(--step-small); font-weight: 400; color: var(--field-1-muted); }
.bar-hour { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: var(--step-small); color: var(--field-1-ink); font-weight: 600; z-index: 1; }
.bar-col:not(.is-zero) .bar-hour { color: var(--field-1-ink); }
.bar-col.is-zero .bar-hour { bottom: 16px; }
.bar-col.is-zero .bar-val { bottom: 44px; }
.bar-tip { opacity: 0; transition: opacity var(--t-hover) ease; }
.bar-col:hover .bar-tip, .bar-col:focus-visible .bar-tip, .bar-col.has-label .bar-tip { opacity: 1; }
.bar-col:focus-visible { outline-offset: -3px; }

/* ---------- faq ---------- */
.faq {
  padding: var(--section) var(--margin) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start;
}
.faq-title { grid-column: 1 / span 4; position: sticky; top: 96px; max-width: 8ch; }
.faq-list { grid-column: 5 / span 8; display: grid; gap: 8px; }
.faq details { background: var(--surface); border-radius: var(--radius); transition: background-color 250ms ease, color 250ms ease; }
.faq summary {
  list-style: none; cursor: pointer; min-height: 72px; padding: 22px 64px 22px 24px; position: relative;
  font-size: var(--step-body); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 16px; height: 3px; margin-top: -1.5px; background: currentColor;
  transition: transform 300ms var(--ease-out);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] { background: var(--accent); color: var(--accent-ink); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 24px 26px; max-width: 52ch; font-size: var(--step-body); }
@media (hover: hover) and (pointer: fine) { .faq details:not([open]):hover { background: var(--surface-2); } }

/* ---------- cta ---------- */
.cta {
  margin-top: var(--section);
  background: var(--accent); color: var(--accent-ink);
  min-height: 90svh; padding: 40px var(--margin);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center;
}
.cta-copy { grid-column: 1 / span 5; align-self: end; }
.cta h2 { font-size: var(--step-display); max-width: 8ch; }
.cta-copy p { margin-top: 28px; max-width: 36ch; font-size: var(--step-body); }
.dialog { grid-column: 7 / span 5; width: 100%; max-width: 440px; justify-self: center; padding: 26px; /* taste-skill-ignore: a dialog floats */ box-shadow: 0 24px 60px rgba(0, 10, 40, 0.45); border-radius: 12px; }
.dialog-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.dialog-field { display: block; margin-bottom: 18px; }
.dialog input[type="text"] {
  width: 100%; padding: 11px 12px; background: var(--app-card); color: var(--app-ink); border: 1px solid var(--app-line); border-radius: 6px; font-size: 15px;
}
.dialog input[type="text"]:focus { outline: 2px solid var(--app-accent); outline-offset: 0; border-color: transparent; }
.seg { display: inline-flex; background: var(--app-card); border-radius: 6px; padding: 3px; }
.dialog .button { background: var(--app-accent); color: var(--app-accent-ink); margin-top: 6px; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .dialog .button:hover { background: #ffd95e; } }
.dialog-note { margin-top: 12px; color: var(--app-muted); font-size: 13px; }

/* ---------- footer ---------- */
.foot {
  padding: 24svh var(--margin) 30px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px 24px;
  font-size: var(--step-small);
}
.foot-what { color: var(--muted); }
.foot-links { display: flex; gap: 24px; }
.foot-year { justify-self: end; color: var(--muted); }
.foot-credits { grid-column: 1 / -1; color: var(--muted); font-size: var(--step-small); max-width: 60ch; margin-top: 8px; }

/* ---------- shared: nav state, static bar, inline links ---------- */
.bar-nav a[aria-current="page"] { text-decoration-color: currentColor; }
.bar-static { position: relative; }
.text-link {
  color: inherit; font-weight: 600; padding: 10px 0;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em;
  transition: text-decoration-color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) { .text-link:hover, .toc a:hover { text-decoration-color: currentColor; } }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.88em; }
:not(pre) > code { background: var(--surface); padding: 2px 6px; }
pre { margin: 20px 0 0; background: var(--surface); padding: 20px 22px; overflow-x: auto; font-size: 15px; line-height: 1.6; }
pre code { font-size: inherit; }

/* ---------- docs ---------- */
.docs { padding: 72px var(--margin) 0; }
.docs-head { max-width: 980px; }
.docs-head h1 { font-size: var(--step-display); }
.docs-head .lead { margin-top: 32px; max-width: 48ch; }
.docs-body {
  margin-top: 120px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start;
}
.toc {
  grid-column: 1 / span 3; position: sticky; top: 32px;
  max-height: calc(100vh - 64px); overflow-y: auto; padding-right: 12px; font-size: var(--step-small);
}
.toc-group { font-weight: 600; margin-top: 22px; }
.toc-group:first-child { margin-top: 0; }
.toc a { color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease; }
.toc ul a { display: block; padding: 4px 0; color: var(--muted); }
.toc a[aria-current="true"] { color: var(--accent); }
.prose { grid-column: 4 / span 9; min-width: 0; }
.prose p { max-width: 64ch; }
.prose p + p { margin-top: 16px; }
.doc-group + .doc-group { margin-top: 176px; }
.doc-group > h2 { margin-bottom: 28px; }
.doc { margin-top: 80px; }
.doc h3 { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 16px; }
.doc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 56px; align-items: start; }
.params-list { margin: 24px 0 0; display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); gap: 12px 28px; max-width: 72ch; }
.params-list dt { font-weight: 600; }
.params-list dd { margin: 0; }
.doc-list { list-style: disc; padding-left: 1.2em; margin-top: 16px; max-width: 64ch; }
.doc-list li + li { margin-top: 10px; }
.doc-list + p { margin-top: 16px; }
.cli-table, .built-table { width: 100%; border-collapse: collapse; margin-top: 28px; }
.cli-table th, .cli-table td, .built-table th, .built-table td { text-align: left; vertical-align: top; padding: 14px 18px; }
.cli-table th, .built-table th { font-size: var(--step-small); font-weight: 600; }
.cli-table tbody tr:nth-child(odd), .built-table tbody tr:nth-child(odd) { background: var(--surface); }
.cli-table td:first-child { white-space: nowrap; }
.app-doc { width: 100%; max-width: 380px; }
.app-input {
  width: 100%; padding: 7px 10px; background: var(--app-card); color: var(--app-ink); font-size: 14px;
  border: 0; border-bottom: 1px solid var(--app-line); border-radius: 4px 4px 0 0; /* taste-skill-ignore */
}
.doc-figure { margin-top: 40px; max-width: 860px; }
.doc-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }
.doc-figure-wide { overflow: hidden; }
.doc-figure-wide img { aspect-ratio: 21 / 9; transform: scale(1.45); transform-origin: 66% 44%; }
.doc-figure-wide figcaption { position: relative; background: var(--bg); padding-top: 12px; margin-top: 0; }
.doc-figure figcaption { margin-top: 12px; color: var(--muted); font-size: var(--step-small); }
.app-curve-doc, .app-mixer-doc { margin-top: 32px; width: 100%; max-width: 680px; }
.mixer-fn { flex-wrap: wrap; }

/* ---------- about ---------- */
.about { padding: 72px var(--margin) 0; }
.about-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.about-intro { grid-column: 1 / span 6; }
.about-intro h1 { font-size: var(--step-display); max-width: 9ch; }
.about-intro .lead { margin-top: 40px; max-width: 30ch; }
.about-intro p:not(.lead) { margin-top: 24px; max-width: 52ch; }
.about-photo { grid-column: 8 / span 5; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.principles {
  margin: var(--section) calc(-1 * var(--margin)) 0; padding: 120px var(--margin);
  background: var(--surface);
}
.principle-list { margin: 64px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px var(--gap); }
.principle-list dt { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.025em; }
.principle-list dd { margin: 12px 0 0; max-width: 40ch; }
.built { margin-top: var(--section); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.built h2 { grid-column: 1 / span 4; }
.built-table { grid-column: 5 / span 8; margin-top: 0; }
.contact {
  margin: var(--section) calc(-1 * var(--margin)) 0; padding: 120px var(--margin);
  background: var(--accent); color: var(--accent-ink);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end;
}
.contact-copy { grid-column: 1 / span 7; }
.contact-copy .lead { margin-top: 32px; max-width: 36ch; }
.contact a { color: inherit; text-underline-offset: 0.18em; }
.contact-list { grid-column: 9 / span 4; }
.contact-list-title { font-weight: 600; }
.credits { margin-top: var(--section); }
.credits-intro { margin-top: 24px; max-width: 60ch; }
.credit-list { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--gap); }
.credit-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); }
.credit-list strong { display: block; margin-top: 14px; font-weight: 600; }
.credit-list span { display: block; margin-top: 4px; color: var(--muted); font-size: var(--step-small); }

@media (max-width: 1100px) {
  .doc-split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .contact-copy { grid-column: 1 / span 6; }
  .contact-list { grid-column: 8 / span 5; }
}
@media (max-width: 860px) {
  .docs-body { display: block; margin-top: 72px; }
  .toc { position: static; max-height: none; overflow: visible; padding: 24px; background: var(--surface); margin-bottom: 96px; columns: 2; column-gap: 32px; }
  .toc ul { break-inside: avoid; }
  .about-intro, .about-photo { grid-column: 1 / -1; }
  .about-photo { margin-top: 56px; aspect-ratio: 4 / 3; }
  .built h2, .built-table { grid-column: 1 / -1; }
  .built-table { margin-top: 32px; }
  .contact { row-gap: 48px; }
  .contact-copy, .contact-list { grid-column: 1 / -1; }
  .credit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .docs, .about { padding-top: 40px; }
  .toc { columns: 1; }
  .doc-group + .doc-group { margin-top: 120px; }
  .doc { margin-top: 64px; }
  .params-list { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .params-list dd { margin-bottom: 12px; }
  .cli-table td:first-child { white-space: normal; }
  .cli-table th, .cli-table td, .built-table th, .built-table td { padding: 12px; }
  .principles, .contact { padding-top: 88px; padding-bottom: 88px; }
  .principle-list { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .credit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .built-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .built-table tr { display: block; padding: 14px 16px; }
  .built-table td { display: block; padding: 0; }
  .built-table td:first-child { font-weight: 600; }
  .built-table td:last-child { color: var(--muted); font-size: var(--step-small); margin-top: 4px; }
}

/* ---------- motion ---------- */
@keyframes rise { from { transform: translateY(28px); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] > *, .js [data-reveal].reveal-self { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in > *, .js [data-reveal].reveal-self.is-in { opacity: 1; transform: none; }
  .rise > * { animation: rise 800ms var(--ease-out) both; }
  .rise > :nth-child(2) { animation-delay: 90ms; }
  .rise > :nth-child(3) { animation-delay: 180ms; }

  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter.is-in { clip-path: inset(0); }
  .js .shutter.is-in img { transform: none; }

  .js .stage { clip-path: polygon(96px 100%, 100% 100%, 100% 100%, 0 100%, 0 100%); transition: clip-path 1000ms var(--ease-in-out) 200ms; }
  .js .stage.is-in { clip-path: polygon(96px 0, 100% 0, 100% 100%, 0 100%, 0 96px); }
  .js .stage-inner > * { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .stage.is-in .stage-inner > * { opacity: 1; transform: none; transition-delay: 700ms; }
  .js .stage.is-in .stage-inner > *:nth-child(2) { transition-delay: 820ms; }

  .js .bars .bar-fill { transform: scaleY(0); transition: transform 900ms var(--ease-out), background-color var(--t-hover) ease; transition-delay: calc(var(--i, 0) * 45ms); }
  .js .bars.is-in .bar-fill { transform: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .bar-nav { gap: 22px; }
  .hero-copy { grid-column: 1 / span 10; }
  .stage { left: 0; top: auto; position: relative; grid-column: 1 / -1; margin: 56px calc(-1 * var(--margin)) 0; height: auto; }
  .stage-inner { flex-wrap: wrap; padding: 56px var(--margin) 56px; height: auto; }
  .hero { min-height: 0; }
  .hw-main { grid-column: 1 / span 6; }
  .hw-copy { grid-column: 7 / span 6; }
  .params-title { grid-column: 1 / -1; text-align: left; justify-self: start; margin-bottom: 40px; }
  .params-stage { grid-row: 2; }
  .notes-left { grid-column: 1 / span 4; }
  .app-control { grid-column: 5 / span 4; }
  .notes-right { grid-column: 9 / span 4; }
  .mix-col { margin-left: 0; margin-inline: auto; }
  .exchange-wide .response { width: auto; margin-left: 0; }
  .dialog { grid-column: 7 / span 6; }
  .cta-copy { grid-column: 1 / span 6; }
  .curves-caption { left: auto; right: var(--margin); }
  .cta { min-height: 0; padding-top: 96px; padding-bottom: 96px; }
}

@media (max-width: 860px) {
  .bar-nav { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .hw-main, .hw-copy { grid-column: 1 / -1; }
  .hw-copy { margin-top: 48px; }
  .hw-main { aspect-ratio: 4 / 3; }
  .params-stage { display: flex; flex-direction: column; }
  .params-stage .app-control { order: -1; margin: 0 auto 40px; }
  .params-stage .notes-left { padding-top: 0; }
  .notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
  .notes-left { margin-bottom: 20px; }
  .note, .notes-left .note { max-width: none; margin: 0; position: static !important; }
  .faq-title { grid-column: 1 / -1; position: static; margin-bottom: 32px; max-width: none; }
  .faq-list { grid-column: 1 / -1; }
  .cta { align-content: start; padding-top: 72px; padding-bottom: 72px; row-gap: 48px; }
  .cta-copy, .dialog { grid-column: 1 / -1; }
  .dialog { justify-self: stretch; max-width: none; }
  .curves-caption { position: static; width: auto; padding: 24px var(--margin) 0; }
  .row-pad { flex-basis: max(0px, calc(50vw - 220px - 48px)); }
  .row { gap: 48px; }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  .hero { padding-top: 104px; }
  .hero-lead { margin-top: 24px; font-size: 1rem; }
  .hero-copy { grid-column: 1 / -1; }
  .stage { margin: 48px calc(-1 * var(--margin)) 0; clip-path: polygon(72px 0, 100% 0, 100% 100%, 0 100%, 0 72px); }
  .js .stage.is-in { clip-path: polygon(72px 0, 100% 0, 100% 100%, 0 100%, 0 72px); }
  .stage-inner { flex-direction: column; padding: 40px 16px 40px; gap: 24px; }
  .app-curve { width: 100%; padding: 16px; }
  .app-big { font-size: 20px; }
  .fan-tile { width: 100%; display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
  .fan-tile figcaption { margin: 0; }
  .hw-list li { grid-template-columns: 96px 1fr; gap: 16px; }
  .hw-list img { width: 96px; height: 76px; }
  .curves { min-height: 0; padding: 72px 0 64px; gap: 32px; }
  .curves-head { flex-direction: column; align-items: flex-start; }
  .panel { width: 86vw; max-width: 380px; }
  .row { gap: 16px; }
  .curves { justify-content: flex-start; }
  .row-pad { flex-basis: calc(7vw - 16px); }
  .notes { grid-template-columns: 1fr; }
  .mix h2 { margin-bottom: 40px; }
  .response { margin-left: 0; margin-top: 24px; }
  .exchange-wide .response { width: auto; margin-inline: calc(-1 * var(--margin)); border-radius: 0; }
  .mixer-row { grid-template-columns: 1fr auto auto; gap: 4px 12px; }
  .mixer-row input[type="range"] { grid-column: 1 / -1; grid-row: 2; }
  .day { min-height: 0; padding-top: 72px; }
  .day-figure { font-size: 22vw; }
  .bars { display: flex; flex-direction: column; align-items: stretch; height: auto; min-height: 0; gap: 6px; margin: 40px 0 0; padding-bottom: 32px; }
  .bar-col { height: 28px; display: grid; grid-template-columns: calc(var(--margin) + 48px) 1fr; align-items: center; }
  .bar-track { height: 100%; flex-direction: row; justify-content: flex-start; align-items: stretch; overflow: hidden; }
  .bar-fill { height: 100%; width: var(--h); min-width: 6px; min-height: 0; transform-origin: left; }
  .bar-val { position: absolute; bottom: auto; top: 50%; transform: translateY(-50%); left: calc(var(--h) + 10px); right: auto; text-align: left; white-space: nowrap; line-height: 1; }
  .bar-col.is-long .bar-val { left: auto; right: calc(100% - var(--h) + 10px); }
  .bar-val small { display: inline; margin-left: 6px; }
  .bar-col:not(.has-label) .bar-val { display: none; }
  .bar-hour { position: static; text-align: left; padding-left: var(--margin); }
  .bar-col.is-zero .bar-hour { bottom: auto; }
  .bar-col.is-zero .bar-val { bottom: auto; }
  .js .bars .bar-fill { transform: scaleX(0); }
  .faq summary { font-size: 1.125rem; min-height: 64px; padding: 18px 56px 18px 20px; }
  .faq details p { font-size: 1rem; padding: 0 20px 20px; }
  .cta h2 { font-size: 13vw; }
  .dialog { padding: 20px; }
  .dialog .button { min-height: 52px; }
  .foot { grid-template-columns: 1fr; padding-top: 20svh; gap: 8px; }
  .foot-links { flex-wrap: wrap; gap: 8px 20px; }
  .foot-year { justify-self: start; }
}
