/* AnkLeet — product page
   The extension's own palette and faces: warm brown-black grounds, amber on
   the action, the four rating colours only inside the product's fragments.
   Geist for everything; JetBrains Mono only inside real code. */ /* taste-skill-ignore: product fragment / code face */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/geist-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono'; /* taste-skill-ignore: product fragment / code face */
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

:root {
  --ground: #160f07;
  --surface: #22170b;
  --raised: #2f2010;
  --border: #3d2a14;
  --control: #5c4220;
  --ink: #fbeedb;
  --muted: #c4a27a;
  --accent: #F0A830;
  --accent-hover: #FFB940;
  --on-accent: #1a1006;
  --code-bg: #120c05;

  --rate-again: #FF4D5E;
  --rate-hard: #FF9F1C;
  --rate-good: #3DDC84;
  --rate-easy: #38BDF8;
  --positive: #F5B841;
  --negative: #FF7A45;
  /* Chart series, validated for CVD and contrast on the ground */
  --series-with: #c07e14;
  --series-without: #4d87d6;

  --font: 'Geist', Inter, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace; /* taste-skill-ignore: product fragment / code face */

  /* Five sizes do the visible work */
  --fs-display: clamp(52px, 8.2vw, 132px);
  --fs-heading: clamp(30px, 3.2vw, 44px);
  --fs-lead: clamp(20px, 1.8vw, 26px);
  --fs-body: 17px;
  --fs-small: 14px;

  --margin: clamp(20px, 3vw, 44px);
  --gap-section: clamp(120px, 14vw, 200px);
  --radius: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip {
  position: absolute; left: var(--margin); top: -60px;
  padding: 10px 14px; background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius); z-index: 50; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { padding-inline: var(--margin); max-width: 1520px; margin-inline: auto; width: 100%; }

h2.section-title {
  font-size: var(--fs-heading);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.lead { font-size: var(--fs-lead); line-height: 1.4; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* ── Sections share one ground; the space between them is the separation ── */

.band { padding-block: clamp(64px, 6.5vw, 104px); }

/* The background: a faint field of day-cells, like the popup's activity chart.
   A few cells light up amber; cells near the pointer brighten. Drawn in main.js. */
.field { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
body > header, body > main, body > footer { position: relative; z-index: 1; }

/* ── Buttons: one shape, the brand's 8px radius ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-size: var(--fs-body); font-weight: 600; text-decoration: none;
  color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: var(--radius); cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--ease-out);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: var(--raised); color: var(--ink); }
.btn-quiet:hover { background: var(--border); }

.text-link {
  font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--control);
  text-underline-offset: 4px; text-decoration-thickness: 2px;
  transition: text-decoration-color 0.15s, color 0.15s;
}
.text-link:hover { text-decoration-color: var(--accent); }

/* ── Navigation: wordmark, three links, one action ── */

.nav {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 24px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
}
.wordmark img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; transition: color 0.15s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav .btn { min-height: 44px; padding: 0 18px; }

/* ── Hero: the sentence, with the product's controls around it ── */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: grid;
  grid-template-rows: auto 1fr;
}
.hero-stage {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  padding-block: 40px 96px;
  text-align: center;
}
.hero h1 {
  font-size: var(--fs-display);
  line-height: 0.98;
  font-weight: 650;
  letter-spacing: -0.045em;
  max-width: 14ch;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 [data-line] { display: block; transition: filter 0.35s var(--ease-out), opacity 0.35s; }
.hero h1.is-blurred [data-line="2"] { filter: blur(14px); opacity: 0.55; }
.hero-sub {
  margin-top: 40px;
  max-width: 44ch;
  font-size: var(--fs-lead);
  line-height: 1.4;
}
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; }
/* The headline, line and buttons always sit above the chips around them */
.hero h1, .hero-sub, .hero-actions { position: relative; z-index: 2; }

/* The three live chips, built from the extension's own controls */
.chip {
  position: absolute;
  z-index: 1;
  width: 320px;
  padding: 14px 16px 16px;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  background: var(--surface);
  border: 1px solid var(--border); /* taste-skill-ignore: product fragment / code face */
  border-radius: 12px;
  color: var(--ink);
}
.chip-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; line-height: 18px; }
.chip-label b { color: var(--ink); font-weight: 600; }
.chip-rate { left: 3%; top: 10%; transform: rotate(-3deg); }
.chip-next { left: 6%; bottom: 14%; transform: rotate(2deg); width: 300px; }
.chip-blur { right: 4%; bottom: 20%; transform: rotate(-2.5deg); width: 290px; }
.chip-trail { right: 5%; top: 12%; transform: rotate(3deg); width: 290px; }

.chip .rating-buttons { margin-top: 10px; }
.next-figure { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.next-figure strong { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.next-date { color: var(--muted); }
.chip-reset {
  margin-top: 8px; padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
.chip-reset:hover { color: var(--ink); }

.trail { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 26px; list-style: none; }
.trail li {
  height: 24px; padding: 0 8px; border-radius: 5px; font-size: 13px; line-height: 24px; font-weight: 500;
  background: color-mix(in srgb, var(--rating) 18%, transparent); color: var(--rating);
}
.trail li[data-rating="Again"] { --rating: var(--rate-again); }
.trail li[data-rating="Hard"]  { --rating: var(--rate-hard); }
.trail li[data-rating="Good"]  { --rating: var(--rate-good); }
.trail li[data-rating="Easy"]  { --rating: var(--rate-easy); }
.trail .trail-empty { background: none; padding: 0; color: var(--muted); font-weight: 400; }

/* Switch, as in the product's settings */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.switch-row span { font-size: 15px; font-weight: 500; }
.switch {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px;
  background: var(--control); border: 0; cursor: pointer; transition: background 0.2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); transition: transform 0.25s var(--ease-out);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--on-accent); }

/* ── The product's own pieces (inside [data-ui]) ── */

.rating-buttons {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--raised); border-radius: 12px; overflow: hidden;
}
.rating-btn {
  --rating: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 0 7px; background: transparent; border: 0; border-radius: 0; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.rating-btn[data-rating="Again"] { --rating: var(--rate-again); }
.rating-btn[data-rating="Hard"]  { --rating: var(--rate-hard); }
.rating-btn[data-rating="Good"]  { --rating: var(--rate-good); }
.rating-btn[data-rating="Easy"]  { --rating: var(--rate-easy); }
.rating-btn + .rating-btn { border-left: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */
.rating-btn:hover, .rating-btn:focus-visible { background: color-mix(in srgb, var(--rating) 26%, transparent); outline: none; }
.rating-btn:active { background: color-mix(in srgb, var(--rating) 38%, transparent); transform: translateY(1px); }
.rating-name { color: var(--rating); font-size: 14px; line-height: 20px; font-weight: 600; }
.rating-gap { color: var(--muted); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }

.ui-panel {
  background: var(--surface);
  border: 1px solid var(--border); /* taste-skill-ignore: product fragment / code face */
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}
.ui-status { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--positive); }
.ui-status.is-error { color: var(--negative); }
.ui-title { margin-top: 4px; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }
.ui-prompt { margin: 16px 0 10px; color: var(--muted); }
.ui-foot { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; color: var(--muted); }
.ui-foot span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; cursor: pointer; transition: text-decoration-color .15s, color .15s; }
.ui-foot span:hover { color: var(--ink); text-decoration-color: currentColor; }
.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px;
  font-size: 14px; font-weight: 500; background: var(--surface); color: var(--ink);
  border: 1px solid var(--control); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; /* taste-skill-ignore: product fragment / code face */
}
.ui-btn:hover { border-color: var(--muted); }
.ui-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ui-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ui-code {
  font-family: var(--mono); font-size: 13px; line-height: 20px; color: var(--ink);
  background: var(--code-bg); border-radius: 8px; padding: 12px 14px; white-space: pre; overflow: hidden;
}
.ui-code .k { color: var(--accent); }
.ui-code .c { color: var(--muted); }

/* ── Showcase: the row of fragments as they appear on LeetCode ── */

.showcase-head { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: end; }
.showcase-head p { max-width: 46ch; }

.reel {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24ch;
  gap: 48px;
  align-items: stretch;
}
.reel-track {
  position: relative;
  display: flex; gap: 40px; align-items: center;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 24px 2px 28px;
  scrollbar-width: thin; scrollbar-color: var(--control) transparent;
  min-height: 500px;
  cursor: grab;
}
/* End spacers so the first and last screens can reach the centre */
.reel-track::before, .reel-track::after { content: ''; flex: 0 0 max(0px, calc(50% - 210px)); }
.reel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.reel-track.is-gliding { scroll-snap-type: none; }
.reel-item {
  flex: none; scroll-snap-align: center;
  transition: transform 0.45s var(--ease-out);
  transform: scale(0.9);
}
.reel-item.is-active { transform: scale(1); }
/* Text at the top, arrows held at the bottom so changing text never moves them */
.reel-caption { display: flex; flex-direction: column; padding-block: 24px 28px; }
.reel-caption h3 { font-size: var(--fs-lead); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.reel-caption p { margin-top: 12px; color: var(--muted); }
.reel-caption .reel-text { transition: opacity 0.2s; }
.reel-caption .reel-text.is-swapping { opacity: 0; }
.reel-controls { margin-top: auto; padding-top: 32px; display: flex; align-items: center; gap: 20px; }
.reel-nav { display: flex; gap: 10px; }
.reel-nav button {
  width: 48px; height: 48px; border-radius: var(--radius); border: 0; cursor: pointer;
  background: var(--raised); color: var(--ink); font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s var(--ease-out);
}
.reel-nav button:hover { background: var(--border); transform: translateY(-2px); }
.reel-nav button:disabled { opacity: 0.4; cursor: default; transform: none; background: var(--raised); }
.reel-count { color: var(--muted); font-size: var(--fs-small); }

/* Fragments in the reel */
.frag-dialog { width: 400px; padding: 20px; }
.frag-wrong { width: 380px; }
.frag-wrong .wrong-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 18px 12px; }
.frag-wrong .wrong-body { padding: 0 18px 18px; }
.frag-wrong .ai-buttons { display: flex; gap: 8px; margin-top: 12px; }
.frag-wrong .hint-box { margin-top: 14px; padding: 12px 14px; background: var(--raised); border-radius: 8px; }
.x-btn { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }

.frag-chat { width: 400px; display: flex; flex-direction: column; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */
.chat-head b { font-size: 15px; }
.chat-head small { color: var(--muted); font-size: 12px; display: block; }
.chat-body { padding: 16px; display: grid; gap: 12px; }
.msg { max-width: 88%; padding: 10px 12px; border-radius: 10px; }
.msg.user { justify-self: end; background: var(--raised); }
.msg.ai { background: transparent; padding-inline: 0; }
.msg.ai code { font-family: var(--mono); font-size: 12.5px; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
.chat-input { display: flex; gap: 8px; padding: 12px 16px 16px; }
.chat-input .field-fake {
  flex: 1; min-height: 38px; padding: 9px 12px; border: 1px solid var(--control); border-radius: 8px; /* taste-skill-ignore: product fragment / code face */
  color: var(--muted); background: var(--ground);
}

.frag-blur { width: 440px; overflow: hidden; }
.blur-editor { position: relative; }
.blur-editor .ui-code { border-radius: 0; filter: blur(5px); opacity: 0.8; min-height: 300px; transition: filter 0.4s var(--ease-out), opacity 0.4s; }
.frag-blur.is-revealed .ui-code { filter: none; opacity: 1; }
.blur-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px; text-align: center; background: color-mix(in srgb, var(--ground) 55%, transparent);
  transition: opacity 0.3s;
}
.frag-blur.is-revealed .blur-overlay { opacity: 0; pointer-events: none; }
.blur-overlay b { font-size: 16px; }
.blur-overlay p { color: var(--muted); max-width: 30ch; }
.blur-overlay .ui-btn { margin-top: 10px; }
.editor-bar { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */

.frag-toast { width: 340px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.frag-toast .check { color: var(--positive); flex: none; margin-top: 2px; }
.frag-toast b { display: block; }
.frag-toast span { color: var(--muted); }

/* ── Popup with margin notes ── */

.plate {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 380px 1fr;
  gap: 56px;
  margin-top: 0;
}
.plate-notes { position: relative; }
.plate-notes.left { text-align: right; }
.plate-notes.left .section-title { margin-bottom: 0; }
.note {
  position: absolute; width: min(100%, 30ch);
  transition: color 0.2s;
}
.plate-notes.left .note { right: 0; }
.note h3 { font-size: var(--fs-body); line-height: 1.35; font-weight: 600; }
.note p { margin-top: 6px; font-size: var(--fs-body); line-height: 1.5; color: var(--muted); }
.note .note-trigger {
  all: unset; display: block; cursor: pointer; border-radius: 4px;
}
.note:hover h3, .note:focus-within h3 { color: var(--accent); }

.popup { width: 380px; overflow: hidden; }
.popup [data-part] { transition: opacity 0.25s; }
.popup.is-focusing [data-part]:not(.is-lit) { opacity: 0.3; }
.pp-bar { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */
.pp-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.pp-brand img { width: 24px; height: 24px; border-radius: 6px; }
.pp-tabs { display: flex; gap: 18px; align-self: stretch; }
.pp-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 100%; color: var(--muted); font-weight: 500; background: none; border: 0; cursor: pointer; }
.pp-tab.active { color: var(--ink); }
.pp-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.pp-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.pp-body { padding: 20px 20px 24px; background: var(--ground); }
.pp-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-due-line { display: flex; align-items: baseline; gap: 8px; }
.pp-due-figure { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.pp-due-label { font-size: 16px; font-weight: 500; }
.pp-due-note { margin-top: 2px; color: var(--muted); }
.pp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; } /* taste-skill-ignore: product fragment / code face */
.pp-kpi { padding: 12px 14px; }
.pp-kpi + .pp-kpi { border-left: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */
.pp-kpi dt { font-size: 12px; line-height: 16px; color: var(--muted); }
.pp-kpi dd { margin-top: 4px; font-size: 20px; line-height: 24px; font-weight: 500; }
.pp-kpi dd small { margin-left: 4px; font-size: 12px; color: var(--muted); font-weight: 400; }
.pp-block { margin-top: 20px; }
.pp-block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pp-block-head h4 { font-size: 14px; font-weight: 600; }
.pp-block-head span { font-size: 12px; color: var(--muted); }
.pp-chart { padding: 14px 14px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; } /* taste-skill-ignore: product fragment / code face */
.pp-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 72px; border-bottom: 1px solid var(--control); } /* taste-skill-ignore: product fragment / code face */
.pp-bars button { height: 100%; display: flex; align-items: flex-end; padding: 0; background: none; border: 0; border-radius: 2px; cursor: pointer; }
.pp-bars button:hover { background: var(--raised); }
.pp-bars i { display: block; width: 100%; background: #6b4a22; border-radius: 2px 2px 0 0; }
.pp-bars button.selected i { background: var(--accent); }
.pp-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.pp-rows { list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; } /* taste-skill-ignore: product fragment / code face */
.pp-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; }
.pp-row + .pp-row { border-top: 1px solid #2c1e0f; } /* taste-skill-ignore: product fragment / code face */
.pp-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-row .m { font-size: 12px; color: var(--muted); }
.pill { height: 20px; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap; background: var(--raised); color: var(--muted); }
.pill.ok { background: rgba(240, 168, 48, 0.16); color: #F5C26B; }

/* ── Schedule: the intervals as a list, Ebbinghaus beside it ── */

.schedule-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.schedule-list { max-width: 560px; }
.schedule-list .lead { margin-top: 24px; }
.ivl-group { margin-top: 44px; }
.ivl-group > h3 { font-size: var(--fs-body); font-weight: 400; color: var(--muted); margin-bottom: 6px; }
.ivl-group ul { list-style: none; }
.ivl-group li {
  display: flex; align-items: baseline; gap: 10px; padding-block: 7px;
}
.ivl-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; align-self: center; background: var(--dot, var(--accent)); }
.ivl-name { flex: 1; font-weight: 500; }
.ivl-value { color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; white-space: nowrap; }

.curves { display: grid; gap: 28px; position: sticky; top: 48px; }
.chart-card { margin: 0; padding: 24px 24px 20px; background: var(--surface); border-radius: var(--radius); }
.chart-card h3 { font-size: var(--fs-body); font-weight: 600; line-height: 1.35; }
.chart-sub { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; list-style: none; font-size: var(--fs-small); color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 4px; border-radius: 2px; background: var(--s); }
.chart { position: relative; margin-top: 16px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .label { fill: var(--ink); font-size: 13px; font-weight: 500; }
.chart .grid { stroke: var(--raised); stroke-width: 1; }
.chart .base { stroke: var(--control); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar { transition: opacity 0.15s; }
.chart .bar.is-dim { opacity: 0.45; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-tip {
  position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none;
  min-width: 170px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--raised); color: var(--ink); font-size: var(--fs-small); line-height: 1.45;
  opacity: 0; transition: opacity 0.12s;
}
.chart-tip.is-on { opacity: 1; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); } /* taste-skill-ignore: floats over the chart only while shown */
.chart-tip b { display: block; margin-bottom: 4px; }
.chart-tip .row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.chart-tip .row span:last-child { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-note { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); max-width: 60ch; }

/* ── Install: call and response ── */

.install-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 96px); }
.install-intro { align-self: start; }
.install-intro p { margin-top: 24px; max-width: 34ch; }
.install-intro .btn { margin-top: 32px; }
.steps { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 88px; max-width: 720px; min-width: 0; }
.step > h3 { font-size: var(--fs-lead); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.step > p { margin-top: 10px; max-width: 56ch; }
.call {
  position: relative; margin-top: 18px;
  background: var(--code-bg); border-radius: var(--radius);
  padding: 20px 20px; padding-right: 96px;
}
.call pre { overflow-x: auto; }
.call code { font-family: var(--mono); font-size: 15px; line-height: 1.6; color: var(--ink); }
.call .copy {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius);
  background: var(--raised); color: var(--ink); font-weight: 500; font-size: var(--fs-small); cursor: pointer;
  transition: background .15s;
}
.call .copy:hover { background: var(--border); }
.call .copy.is-done { background: var(--accent); color: var(--on-accent); }
.response { margin-top: 20px; margin-left: 56px; }

.frag-ext { width: 440px; padding: 16px 18px; display: grid; grid-template-columns: 48px 1fr; gap: 14px; }
.frag-ext img { width: 48px; height: 48px; border-radius: 10px; }
.frag-ext .ext-name { display: flex; gap: 8px; align-items: baseline; font-weight: 600; font-size: 15px; }
.frag-ext .ext-name small { font-weight: 400; color: var(--muted); font-size: 12px; }
.frag-ext p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.frag-ext .ext-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.frag-ext .ext-foot span { font-size: 13px; color: var(--muted); }
.ui-switch { width: 34px; height: 20px; border-radius: 10px; background: var(--accent); position: relative; }
.ui-switch::after { content: ''; position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--on-accent); }

.frag-tree { width: 440px; }
.frag-tree .ui-code { white-space: pre; }

.frag-settings { width: 380px; padding: 20px; }
.frag-settings h4 { font-size: 14px; font-weight: 600; }
.frag-settings label { display: block; margin: 16px 0 8px; font-weight: 500; }
.frag-settings .input { height: 40px; padding: 0 12px; display: flex; align-items: center; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); color: var(--ink); letter-spacing: 0.1em; } /* taste-skill-ignore: product fragment / code face */
.frag-settings .input.select { letter-spacing: 0; justify-content: space-between; }
.frag-settings .help { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--muted); }
.frag-settings .actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.frag-settings .stamp { font-size: 12px; color: var(--muted); }

.finale { margin-top: 24px; margin-right: calc(-1 * clamp(0px, 8vw, 160px)); }
.finale-stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0;
  background: var(--ground); border-radius: 12px; overflow: hidden; min-height: 380px;
}
.lc-editor { padding: 0; border-right: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */
.lc-editor .ui-code { background: transparent; min-height: 100%; padding: 18px 20px; }
.lc-side { position: relative; display: grid; place-items: center; padding: 28px 20px; background: color-mix(in srgb, #000 30%, var(--ground)); }
.lc-side .frag-dialog { width: 100% !important; }

/* ── FAQ: question index, one answer ── */

.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.faq-list { list-style: none; display: grid; gap: 14px; margin-top: 32px; }
.faq-q {
  display: flex; gap: 14px; align-items: baseline; width: 100%;
  padding: 4px 0; background: none; border: 0; text-align: left; cursor: pointer;
  font-size: var(--fs-body); line-height: 1.4; color: var(--muted); transition: color 0.15s;
}
.faq-q::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transform: translateY(-2px); transition: background 0.15s; }
.faq-q:hover, .faq-q[aria-expanded="true"] { color: var(--ink); }
.faq-q[aria-expanded="true"]::before { background: var(--accent); }
.faq-inline { display: none; }
.faq-pane { position: sticky; top: 120px; min-height: 320px; padding-top: 72px; }
.faq-pane .faq-a { font-size: var(--fs-lead); line-height: 1.35; max-width: 32ch; transition: opacity 0.15s; }
.faq-pane .faq-a.is-swapping { opacity: 0; }
.faq-a code { font-family: var(--mono); font-size: 0.8em; background: var(--surface); padding: 2px 6px; border-radius: 4px; }
.faq-a a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* ── Closing: the name returns, then one quiet line ── */

.closing { padding-bottom: 0; }
.closing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.closing-name {
  display: flex; align-items: center; gap: 0.18em;
  font-size: clamp(64px, 15vw, 240px); line-height: 0.9; font-weight: 650; letter-spacing: -0.055em;
}
.closing-name img { width: 0.62em; height: 0.62em; border-radius: 0.14em; }
.closing-row .btn { margin-bottom: 1.2vw; }

.footer {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: baseline;
  padding-block: 72px 32px;
  font-size: var(--fs-small); color: var(--muted);
}
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--ink); text-decoration: none; }
.footer nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer .right { text-align: right; }
.credits { padding-bottom: 32px; font-size: var(--fs-small); color: var(--muted); max-width: 60ch; }
.credits a { color: var(--muted); }

/* ── Motion: masked headline, staged entrances ── */

@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js .hero h1.is-blurred [data-line] { animation-fill-mode: forwards; }
  .js .hero-sub, .js .hero-actions { opacity: 0; animation: fade-up 700ms var(--ease-out) 850ms forwards; }
  .js .chip { opacity: 0; animation: chip-in 800ms var(--ease-out) forwards; animation-delay: calc(1000ms + var(--c, 0) * 90ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 75ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@keyframes line-up { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes chip-in { from { opacity: 0; translate: 0 20px; } to { opacity: 1; translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Narrower screens ── */

@media (max-width: 1240px) {
  .chip-trail { display: none; }
  .chip { width: 280px; }
  .chip-next { width: 260px; }
  .chip-blur { width: 250px; }
}

@media (max-width: 1100px) {
  .plate { grid-template-columns: 1fr 380px; }
  .plate-notes.right { grid-column: 1; }
  .plate-notes.left, .plate-notes.right { text-align: left; }
  .note { position: static !important; width: auto; margin-top: 28px; }
  .plate-notes.left { grid-column: 1; grid-row: 1; }
  .plate-notes.right { grid-row: 2; }
  .popup-wrap { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 960px) {
  .hero-stage { padding-block: 24px 64px; justify-items: stretch; }
  .hero-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; width: 100%; max-width: 640px; justify-self: center; }
  .chip { position: static; transform: none; width: auto; }
  .chip-rate { grid-column: 1 / -1; order: -1; }
  .hero-chips .chip-rate { margin-bottom: 0; }
  .hero h1 { justify-self: center; }
  .hero-sub, .hero-actions { justify-self: center; }

  .showcase-head, .schedule-grid, .install-grid, .faq-grid { grid-template-columns: 1fr; }
  .reel { grid-template-columns: 1fr; gap: 16px; }
  .reel-controls { margin-top: 0; padding-top: 24px; }
  .reel-caption { padding-block: 0; }
  .install-intro, .curves { position: static; }
  .finale { margin-right: 0; }
  .finale-stage { grid-template-columns: 1fr; }
  .lc-editor { border-right: 0; border-bottom: 1px solid var(--border); } /* taste-skill-ignore: product fragment / code face */
  .faq-pane { display: none; }
  .faq-inline { display: block; padding: 6px 0 10px 22px; font-size: 17px; line-height: 1.55; }
  .faq-inline[hidden] { display: none; }
}

@media (max-width: 760px) {
  .nav-links li:not(:last-child) { display: none; }
  .plate { grid-template-columns: 1fr; gap: 24px; }
  .popup-wrap { grid-column: 1; grid-row: 2; justify-self: center; }
  .plate-notes.left { grid-row: 1; }
  .plate-notes.right { grid-row: 3; }
  .plate-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .plate-notes .section-title { grid-column: 1 / -1; }
  .note { margin-top: 20px; }
  .response { margin-left: 0; }
  .closing-row { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; gap: 8px; padding-top: 20svh; }
  .footer .right { text-align: left; }
  .call { padding-right: 20px; padding-bottom: 64px; }
  .call .copy { top: auto; bottom: 12px; transform: none; }
}

@media (max-width: 520px) {
  .hero-chips { grid-template-columns: 1fr; }
  .reel-track { min-height: 0; gap: 16px; padding-inline: 7vw; scroll-padding-inline: 7vw; }
  .reel-item { max-width: 86vw; }
  .reel-track::before, .reel-track::after { display: none; }
  .reel-track { align-items: flex-start; }
  .pp-tabs { gap: 12px; }
  .pp-bar { padding: 0 14px; }
  .reel-item > [data-ui] { width: min(86vw, 400px); }
  .frag-blur, .frag-chat, .frag-dialog, .frag-wrong, .frag-toast { width: 86vw !important; }
  .popup { width: calc(100vw - 2 * var(--margin)); }
  .frag-ext, .frag-tree, .frag-settings { width: 100%; }
  .plate-notes { grid-template-columns: 1fr; }
  .chart-card { padding: 20px 16px 16px; }
}
