/* ============================================================
   NavMesh2D Pro: site stylesheet
   Ground: deep editor-viewport dark. Marks: light pink, light
   blue, white. Everything else is space and hairlines.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --ink:        #08090d;
  --ink-2:      #0c0e14;
  --surface:    #12141c;
  --surface-2:  #171a24;
  --line:       rgba(255, 255, 255, 0.085);
  --line-2:     rgba(255, 255, 255, 0.16);

  --pink:       #ffb6d2;
  --blue:       #a9dcf7;
  --paper:      #ffffff;
  --grad:       linear-gradient(100deg, var(--pink), var(--blue));

  --text:       #eceef4;
  --muted:      #a0a7ba;
  --faint:      #6d7488;

  --font-title:   "Rubik", "Trebuchet MS", sans-serif;     /* big page titles (also available: "Fredoka", 300-700) */
  --title-weight: 800;                                       /* Rubik accepts any value 300-900 */
  --title-tracking: -0.035em;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --shell:      1240px;
  --gutter:     clamp(1rem, 4vw, 3.5rem);
  --radius:     14px;
  --ease:       cubic-bezier(0.22, 0.68, 0.24, 1);
  --header-h:   68px;
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
code, kbd { font-family: var(--font-mono); font-size: 0.86em; }
main, section, header, footer, article, aside, div, figure { min-width: 0; }
::selection { background: var(--pink); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- atmosphere ---------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(255, 182, 210, 0.10), transparent 62%),
    radial-gradient(52rem 38rem at 92% 4%,  rgba(169, 220, 247, 0.10), transparent 60%);
}
.shell { position: relative; z-index: 1; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--band { background: linear-gradient(180deg, transparent, rgba(255,255,255,.018) 12%, rgba(255,255,255,.018) 88%, transparent); }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: 0; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex; align-items: center; gap: 0.7rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; opacity: .6; flex: none; }
.eyebrow--pink { color: var(--pink); }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ""; width: 1.6rem; height: 1px; background: currentColor; opacity: .6; flex: none; }

.h-hero {
  font-family: var(--font-title);
  font-size: clamp(3.4rem, 14vw, 11rem);
  font-weight: var(--title-weight);
  letter-spacing: var(--title-tracking);
  line-height: 0.9;
}
.h-sec { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.04em; text-wrap: balance; }
.h-sub { font-size: clamp(1.4rem, 2.8vw, 2rem); letter-spacing: -0.035em; text-wrap: balance; }
.h-card { font-size: 1.2rem; letter-spacing: -0.025em; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.6; max-width: 62ch; }
.body-text { color: var(--muted); max-width: 68ch; }
.body-text + .body-text { margin-top: 1rem; }
.body-text strong, .lede strong { color: var(--text); font-weight: 600; }

.api {
  font-family: var(--font-mono);
  font-size: 0.84em;
  color: var(--blue);
  background: rgba(169, 220, 247, 0.08);
  border: 1px solid rgba(169, 220, 247, 0.16);
  border-radius: 5px;
  padding: 0.06em 0.38em;
  overflow-wrap: anywhere;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--paper); --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 0.95rem/1.2 var(--font-body);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn--primary { --btn-bg: var(--pink); --btn-fg: #1a0d13; box-shadow: 0 10px 30px -12px rgba(255, 182, 210, .55); }
.btn--primary:hover { --btn-bg: #ffc9de; box-shadow: 0 14px 34px -12px rgba(255, 182, 210, .75); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { --btn-bg: rgba(255,255,255,.05); border-color: var(--paper); }
.btn--sm { padding: 0.55rem 1.05rem; font-size: 0.86rem; }
.btn--lg { padding: 1rem 1.8rem; font-size: 1.02rem; }
.btn .arrow { transition: transform .3s var(--ease); flex: none; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 600; font-size: 0.94rem; color: var(--text);
  padding-bottom: 2px;
  background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0% 1px no-repeat;
  transition: background-size .35s var(--ease), color .25s var(--ease);
}
.link:hover { background-size: 100% 1px; color: var(--blue); }

/* ============================================================
   HEADER
   ============================================================ */
.masthead {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(8, 9, 13, 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.masthead[data-stuck="true"] { border-bottom-color: var(--line); }
.masthead__inner {
  display: flex; align-items: center; gap: 1.5rem;
  width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter);
}
.brand { display: flex; align-items: center; gap: 0.5rem; margin-right: auto; }
.brand img { width: 128px; height: auto; }
.brand__pro {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em;
  color: var(--pink); border: 1px solid rgba(255,182,210,.35); border-radius: 4px; padding: 0.1rem 0.34rem;
}

.nav { display: flex; align-items: center; gap: 0.3rem; }
.nav__link {
  position: relative; padding: 0.45rem 0.85rem; border-radius: 8px;
  font-size: 0.92rem; font-weight: 500; color: var(--muted);
  transition: color .22s var(--ease), background-color .22s var(--ease);
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .16rem;
  height: 1.5px; border-radius: 2px; background: var(--pink);
}
.nav__cta { margin-left: 0.55rem; }

.burger {
  display: none; width: 42px; height: 42px;
  border: 1px solid var(--line-2); border-radius: 10px; background: transparent; cursor: pointer;
  padding: 0; place-content: center;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 0.8rem 0.5rem; font-size: 1.05rem; }
  .nav__link[aria-current="page"]::after { left: .5rem; right: auto; width: 1.2rem; }
  .nav__cta { margin: 0.6rem 0 0; }
}

/* ============================================================
   HERO (landing)
   ============================================================ */
.hero { position: relative; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.hero__mesh {
  position: absolute; inset: -6% -5% auto -5%; width: 110%; height: 120%;
  z-index: 0; opacity: .55; pointer-events: none;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 25%, transparent 78%);
          mask-image: radial-gradient(80% 70% at 50% 30%, #000 25%, transparent 78%);
}
.hero__inner { position: relative; z-index: 1; }

.hero__title { margin-top: 1.3rem; display: flex; align-items: flex-start; flex-wrap: nowrap; gap: 0 0.12em; font-size: clamp(2.6rem, 12.4vw, 10rem); white-space: nowrap; }
.hero__title .hero__name { display: inline-block; }
.hero__title .hero__pro {
  font-size: 0.42em; line-height: 1; margin-top: 0.06em; letter-spacing: -0.03em; padding-right: 0.1em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline {
  margin-top: clamp(1.2rem, 2.5vw, 1.8rem);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.45rem, 3.4vw, 2.5rem); letter-spacing: -0.035em; line-height: 1.12;
  max-width: 24ch; text-wrap: balance;
}

.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 920px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__note { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: .06em; color: var(--faint); }

/* checklist (from layout) */
.checks { display: grid; gap: 0.65rem; margin-top: 1.5rem; }
.checks li { position: relative; padding-left: 2rem; color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.18em; width: 20px; height: 20px; border-radius: 6px;
  background: var(--grad);
}
.checks li::after {
  content: ""; position: absolute; left: 7px; top: calc(0.18em + 4px); width: 5px; height: 9px;
  border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.hero .btn-row { margin-top: 2rem; }

/* stat strip (layout "logos" row) */
.stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.stat { background: var(--ink-2); padding: 1.25rem 1.3rem; }
.stat__k { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: -0.04em; color: var(--paper); }
.stat__v { margin-top: 0.2rem; font-size: 0.83rem; color: var(--faint); line-height: 1.45; }
@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:last-child { grid-column: 1 / -1; } }

/* ============================================================
   MEDIA / VIDEO
   ============================================================ */
.media {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  overflow: hidden; isolation: isolate;
}
.media__frame { position: relative; aspect-ratio: 16 / 9; background: #05060a; }
.media__frame > video,
.media__frame > img,
.media__frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.media__frame > video { background: #05060a; }
.media__cap {
  border-top: 1px solid var(--line); padding: 0.65rem 1rem;
  font-size: 0.82rem; color: var(--faint);
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.media__cap b { color: var(--muted); font-weight: 600; }
.media--glow { box-shadow: 0 40px 90px -50px rgba(0,0,0,.95), 0 0 0 1px rgba(255,182,210,.06); }

/* click-to-load facade for the main video */
.facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
  background: transparent; color: var(--text);
}
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .4s var(--ease), transform .8s var(--ease); }
.facade:hover img { opacity: 1; transform: scale(1.015); }
.facade::after { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side, rgba(8,9,13,.15), rgba(8,9,13,.55)); }
.facade__play {
  position: relative; z-index: 1;
  width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pink); color: #1a0d13;
  box-shadow: 0 0 0 10px rgba(255,182,210,.16), 0 20px 40px -10px rgba(0,0,0,.8);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.facade:hover .facade__play { transform: scale(1.07); box-shadow: 0 0 0 16px rgba(255,182,210,.12), 0 20px 40px -10px rgba(0,0,0,.8); }
.facade__label {
  position: absolute; z-index: 1; left: 1rem; bottom: .9rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text);
  background: rgba(8,9,13,.6); border: 1px solid var(--line-2); padding: .3rem .6rem; border-radius: 6px;
}

/* clip switcher (several videos for one topic) */
.clips { margin-top: 1.6rem; }
.clips__tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.clips__tab {
  font: 500 .82rem/1.2 var(--font-body);
  color: var(--muted); background: transparent;
  border: 1px solid var(--line-2); border-radius: 999px; padding: .42rem .85rem; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.clips__tab:hover { color: var(--text); border-color: var(--paper); }
.clips__tab[aria-pressed="true"] { color: #1a0d13; background: var(--blue); border-color: var(--blue); }

/* ============================================================
   UNFOLDING BOXES
   ============================================================ */
.unfold {
  opacity: 0;
  transform: perspective(1100px) rotateX(-16deg) translateY(24px) scale(.985);
  transform-origin: top center;
  transition: opacity .55s var(--ease) var(--d, 0ms), transform .85s var(--ease) var(--d, 0ms);
}
.unfold.is-open { opacity: 1; transform: none; }
.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
.rise.is-open { opacity: 1; transform: none; }

/* hairline "lid" that draws across a box as it opens */
.lid { position: relative; }
.lid::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1.5px; z-index: 2;
  background: var(--grad); transform: scaleX(0); transform-origin: left center;
  transition: transform .8s var(--ease) calc(var(--d, 0ms) + 150ms);
}
.lid.is-open::before { transform: scaleX(1); }

/* ---------- section heads ---------- */
.sec-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 4rem); align-items: end;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
.sec-head .eyebrow { margin-bottom: 1.1rem; }
.sec-head--center { display: block; text-align: center; max-width: 760px; margin-inline: auto; }
.sec-head--center .lede { margin: 1.1rem auto 0; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; align-items: start; } }

/* ============================================================
   QUICK START STEPS (landing)
   ============================================================ */
.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  counter-reset: step;
}
.step { background: var(--ink-2); padding: clamp(1.4rem, 2.4vw, 1.9rem); display: flex; flex-direction: column; }
.step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.step:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.step__top { display: flex; align-items: center; justify-content: space-between; }
.step__n {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .85rem; font-weight: 500; color: var(--ink); background: var(--grad);
}
.step__time { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.step h3 { margin-top: 1.1rem; font-size: 1.15rem; }
.step p { margin-top: .5rem; font-size: .92rem; color: var(--muted); }
.step .api { font-size: .78rem; }
.step__code { margin-top: auto; padding-top: 1rem; }
.step__code code {
  display: block; font-size: .8rem; color: var(--blue); background: rgba(169,220,247,.06);
  border: 1px solid rgba(169,220,247,.14); border-radius: 8px; padding: .55rem .7rem; overflow-wrap: break-word;
}
.steps__foot { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.timer { display: flex; align-items: center; gap: .7rem; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.timer__bar { width: 140px; height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.timer__bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 2.4s var(--ease) .4s; }
.is-open .timer__bar i, .timer.is-open .timer__bar i { width: 100%; }
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:first-child { border-radius: var(--radius) 0 0 0; }
  .step:nth-child(2) { border-radius: 0 var(--radius) 0 0; }
  .step:nth-child(3) { border-radius: 0 0 0 var(--radius); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .step:first-child, .step:nth-child(2), .step:nth-child(3), .step:last-child { border-radius: 0; }
  .step:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .step:last-child { border-radius: 0 0 var(--radius) var(--radius); }
}

/* ============================================================
   HIGHLIGHT CARDS (layout "hl")
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink-2); padding: clamp(1.4rem, 2.4vw, 1.8rem);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), translate .35s var(--ease);
}
.card:hover { background: var(--surface); border-color: var(--line-2); translate: 0 -3px; }
.card__ico {
  width: 44px; height: 44px; padding: 10px; border-radius: 12px;
  background: rgba(169,220,247,.08); color: var(--blue); border: 1px solid rgba(169,220,247,.14);
}
.card:nth-child(even) .card__ico { color: var(--pink); background: rgba(255,182,210,.08); border-color: rgba(255,182,210,.16); }
.card h3 { margin-top: 1.1rem; }
.card p { margin-top: .5rem; color: var(--muted); font-size: .95rem; }

/* ============================================================
   FEATURE EXPLORER (layout "tabs")
   ============================================================ */
.explorer { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.explorer__list { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.explorer__tab {
  font: 600 .95rem/1.3 var(--font-body); text-align: left;
  border: 0; border-left: 1.5px solid var(--line); background: transparent; color: var(--faint);
  padding: .7rem 1rem; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.explorer__tab:hover { color: var(--text); background: rgba(255,255,255,.03); }
.explorer__tab[aria-selected="true"] { color: var(--text); border-left-color: var(--pink); background: rgba(255,182,210,.05); }
.explorer__tab span { display: block; font: 400 .78rem/1.4 var(--font-body); color: var(--faint); margin-top: .15rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); overflow: hidden; }
.panel[hidden] { display: none; }
.panel.is-shown { animation: panelIn .5s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: perspective(1100px) rotateX(-6deg) translateY(10px); transform-origin: top; } }
.panel .media { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.panel__body { padding: clamp(1.4rem, 2.6vw, 2rem); }
.panel__body h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: .7rem; }
.panel__body p { margin-top: .7rem; color: var(--muted); }
.panel__body .link { margin-top: 1.2rem; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: 1.2rem; }
.specs li { font-size: .88rem; color: var(--text); background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 9px; padding: .55rem .8rem; }
@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; }
  /* every option visible at once: pills wrap onto several lines, no sideways scrolling */
  .explorer__list { position: static; flex-direction: row; flex-wrap: wrap; gap: .45rem; }
  .explorer__tab {
    border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap;
    padding: .55rem .95rem; font-size: .88rem; color: var(--muted);
  }
  .explorer__tab[aria-selected="true"] { color: #1a0d13; background: var(--blue); border-color: var(--blue); }
  .explorer__tab span { display: none; }
  .specs { grid-template-columns: 1fr; }
}

/* ============================================================
   PERFORMANCE TEASER (landing)
   ============================================================ */
.perf {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
@media (max-width: 920px) { .perf { grid-template-columns: 1fr; } }
.bignum { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.055em; line-height: .9; font-size: clamp(4rem, 11vw, 8rem); }
.bignum small { display: block; font-size: .3em; letter-spacing: -0.02em; font-weight: 600; color: var(--muted); margin-top: .35em; line-height: 1.2; }
.perf .checks { margin-top: 1.8rem; }
.fineprint { margin-top: 1rem; font-family: var(--font-mono); font-size: .72rem; color: var(--faint); letter-spacing: .04em; }

/* genres */
.tags { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
.tag {
  font-size: .92rem; font-weight: 500; color: var(--text);
  border: 1px solid var(--line-2); border-radius: 999px; padding: .5rem 1rem; background: rgba(255,255,255,.02);
}
.tag:nth-child(3n+1) { border-color: rgba(255,182,210,.35); }
.tag:nth-child(3n+2) { border-color: rgba(169,220,247,.35); }

/* manual promo */
.book {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(160deg, var(--surface), var(--ink-2) 65%);
  padding: clamp(1.6rem, 4.5vw, 3.5rem);
}
@media (max-width: 900px) { .book { grid-template-columns: 1fr; } }
.book .btn-row { margin-top: 1.8rem; }
.chapters { columns: 2; column-gap: 2rem; counter-reset: ch; }
@media (max-width: 560px) { .chapters { columns: 1; } }
.chapters li {
  break-inside: avoid; counter-increment: ch;
  display: flex; gap: .8rem; padding: .48rem 0; border-bottom: 1px solid var(--line);
  font-size: .9rem; color: var(--muted);
}
.chapters li::before { content: counter(ch, decimal-leading-zero); font-family: var(--font-mono); font-size: .74rem; color: var(--pink); padding-top: .15rem; }

/* ============================================================
   CTA + FOOTER
   ============================================================ */
.cta {
  position: relative; text-align: center; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(160deg, var(--surface), var(--ink-2) 65%);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4.5rem);
}
.cta::before {
  content: ""; position: absolute; inset: -60% 25% auto; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,182,210,.16), transparent);
}
.cta > * { position: relative; }
.cta .h-sec { margin-top: 1.1rem; }
.cta .lede { margin: 1.1rem auto 0; }
.cta .btn-row { justify-content: center; margin-top: 2rem; }
.cta .hero__note { margin-top: 1.2rem; }

.footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; margin-top: clamp(3rem, 6vw, 5rem); }
.footer__grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.footer__nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.footer__nav a { font-size: .88rem; color: var(--faint); transition: color .22s var(--ease); }
.footer__nav a:hover { color: var(--text); }
.footer__fine { margin-top: 2rem; font-size: .76rem; color: var(--faint); font-family: var(--font-mono); letter-spacing: .03em; }

/* ============================================================
   DOC PAGES: side column + content
   ============================================================ */
.page-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.page-head .h-hero { font-size: clamp(3rem, 11vw, 8rem); margin-top: 1.2rem; }
.page-head .lede { margin-top: 1.4rem; }
.page-head .btn-row { margin-top: 1.8rem; }

.doc {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
}
@media (max-width: 1000px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.toc {
  position: sticky; top: calc(var(--header-h) + 1.75rem);
  max-height: calc(100vh - var(--header-h) - 3.5rem); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  padding-right: .3rem;
}
.toc__title {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  padding-bottom: .9rem; border-bottom: 1px solid var(--line);
}
.toc__list { margin-top: .85rem; display: grid; gap: 1px; }
.toc__link {
  display: flex; gap: .55rem; padding: .4rem 0 .4rem .9rem;
  font-size: .87rem; line-height: 1.4; color: var(--faint);
  border-left: 1.5px solid var(--line);
  transition: color .22s var(--ease), border-color .22s var(--ease);
}
.toc__link i { font-style: normal; font-family: var(--font-mono); font-size: .7rem; padding-top: .15rem; opacity: .7; }
.toc__link:hover { color: var(--text); border-left-color: var(--line-2); }
.toc__link.is-active { color: var(--text); border-left-color: var(--pink); font-weight: 600; }
.toc__link.is-active i { color: var(--pink); opacity: 1; }
.toc__progress { margin-top: 1.1rem; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.toc__progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--grad); }
.toc__aside { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .7rem; }
.toc__aside .btn { width: 100%; }

.toc--mobile {
  display: none; position: sticky; top: var(--header-h); z-index: 20;
  margin-inline: calc(var(--gutter) * -1); padding: .5rem var(--gutter);
  background: rgba(8, 9, 13, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.toc--mobile summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .45rem 0;
}
.toc--mobile summary::-webkit-details-marker { display: none; }
.toc--mobile summary b { color: var(--text); font-weight: 500; letter-spacing: .06em; text-transform: none; font-family: var(--font-body); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc--mobile summary svg { transition: transform .3s var(--ease); flex: none; }
.toc--mobile[open] summary svg { transform: rotate(180deg); }
.toc--mobile .toc__list { max-height: 55vh; overflow-y: auto; padding-bottom: .6rem; }
@media (max-width: 1000px) { .toc { display: none; } .toc--mobile { display: block; } }

.doc__main { min-width: 0; }
/* Jumping to a section puts its label just under the header (html scroll-padding-top).
   Sections after the first start with a divider + top padding, so the jump skips that space. */
.chunk { --chunk-gap: clamp(3.5rem, 7vw, 5.5rem); --toc-bar: 0px; scroll-margin-top: var(--toc-bar); }
.chunk + .chunk { margin-top: var(--chunk-gap); padding-top: var(--chunk-gap); border-top: 1px solid var(--line);
                  scroll-margin-top: calc(var(--toc-bar) - var(--chunk-gap)); }
@media (max-width: 1000px) { .chunk { --toc-bar: 3.75rem; } }   /* sticky "On this page" bar on small screens */
.chunk__idx { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; color: var(--pink); text-transform: uppercase; }
.chunk__title { margin-top: .7rem; font-size: clamp(1.7rem, 3.6vw, 2.5rem); text-wrap: balance; }
.chunk__lede { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; max-width: 66ch; }
.chunk__lede strong { color: var(--text); }
.chunk h3 { margin-top: 2.2rem; font-size: 1.2rem; }
.chunk h3 + .body-text { margin-top: .6rem; }
.chunk .media { margin-top: 1.6rem; }
.chunk .clips .media { margin-top: 0; }

/* fact grid */
.facts {
  margin-top: 1.6rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.fact { background: var(--ink-2); padding: 1.1rem 1.25rem; }
.fact__t { font-weight: 600; font-size: .95rem; letter-spacing: -0.015em; color: var(--text); }
.fact__d { margin-top: .35rem; font-size: .88rem; color: var(--muted); line-height: 1.55; }

.chunk .checks li::before { width: 16px; height: 16px; border-radius: 5px; top: .28em; }
.chunk .checks li::after { left: 5.5px; top: calc(.28em + 3px); width: 4px; height: 8px; }
.chunk .checks li { padding-left: 1.7rem; font-size: .96rem; }

.note {
  margin-top: 1.6rem; border: 1px solid var(--line); border-left: 2px solid var(--blue);
  border-radius: 0 10px 10px 0; background: var(--ink-2); padding: 1rem 1.25rem; font-size: .92rem; color: var(--muted);
}
.note--pink { border-left-color: var(--pink); }
.note strong { color: var(--text); }

/* manual pointer */
.manref {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.4rem;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--faint);
}
.manref svg { color: var(--pink); }
.manref a { color: var(--muted); border-bottom: 1px dashed var(--line-2); }
.manref a:hover { color: var(--text); border-bottom-color: var(--text); }

/* tables */
.table-scroll {
  margin-top: 1.6rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 32rem; }
thead th {
  text-align: left; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; padding: .85rem 1.1rem; background: var(--ink-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--text); font-weight: 600; }
.td-num { font-family: var(--font-mono); color: var(--text); white-space: nowrap; }

/* code */
.code { margin-top: 1.6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); overflow: hidden; }
.code__bar {
  display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.code__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.code__bar i:first-child { background: rgba(255,182,210,.6); }
.code__bar i:nth-child(2) { background: rgba(169,220,247,.6); }
.code__bar span { margin-left: .4rem; }
.code pre {
  margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: .82rem; line-height: 1.75; color: #cfd5e4; scrollbar-width: thin;
}
.code .c { color: var(--faint); font-style: italic; }
.code .k { color: var(--pink); }
.code .t { color: var(--blue); }
.code .s { color: #c8ecd5; }
.code .n { color: #ffe0b0; }

/* quick start (features page) */
.qs { margin-top: 1.8rem; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; counter-reset: qs; }
.qs li { background: var(--ink-2); padding: 1.1rem 1.25rem 1.1rem 4rem; position: relative; counter-increment: qs; }
.qs li::before {
  content: counter(qs); position: absolute; left: 1.25rem; top: 1.05rem;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .8rem; color: var(--ink); background: var(--grad);
}
.qs li > b { display: block; color: var(--text); font-weight: 600; }
.qs li > span { display: block; margin-top: .25rem; color: var(--muted); font-size: .92rem; }

/* tuning tips with impact meter (layout "tips") */
.tips { margin-top: 1.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 700px) { .tips { grid-template-columns: 1fr; } }
.tip { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.tip h4 { font-size: 1.02rem; letter-spacing: -0.02em; }
.tip p { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.meter { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; padding-top: .2rem; }
.meter i { display: block; width: 30px; height: 6px; border-radius: 4px; background: var(--line-2); }
.meter--high i, .meter--med i:nth-child(n+2), .meter--low i:nth-child(3) { background: var(--grad); }
.meter--tool i { background: rgba(169,220,247,.5); }

/* cost ladder */
.ladder { margin-top: 1.6rem; display: grid; gap: .6rem; }
.rung { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.2rem; align-items: center; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.rung__bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: .55rem; }
.rung__bar i { display: block; height: 100%; width: var(--w); background: var(--grad); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease) var(--d, 0ms); }
.is-open .rung__bar i { transform: scaleX(1); }
.rung__k { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; }
.rung__t { font-family: var(--font-mono); font-size: .72rem; color: var(--pink); margin-top: .15rem; }
.rung__d { font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) { .rung { grid-template-columns: 1fr; gap: .6rem; } }

/* benchmark hero */
.bench {
  margin-top: 1.6rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
@media (max-width: 640px) { .bench { grid-template-columns: 1fr; } }
.bench > div { background: var(--ink-2); padding: 1.2rem 1.3rem; }
.bench b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.bench span { display: block; margin-top: .45rem; font-size: .86rem; color: var(--muted); }

/* ============================================================
   MOTION PREFERENCES / NO-JS
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .unfold, .rise { opacity: 1; transform: none; }
  .lid::before { transform: scaleX(1); }
}
.no-js .unfold, .no-js .rise { opacity: 1; transform: none; }
.no-js .lid::before, .no-js .rung__bar i { transform: scaleX(1); }

/* ============================================================
   REVIEW REQUEST (landing)
   ============================================================ */
.review {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(160deg, var(--surface), var(--ink-2) 70%);
  padding: clamp(1.5rem, 3.5vw, 2.4rem) clamp(1.4rem, 3.5vw, 2.8rem);
}
.review__stars { display: flex; gap: .2rem; }
.review__stars svg { width: 22px; height: 22px; fill: var(--pink); }
.review__stars svg:nth-child(even) { fill: var(--blue); }
.review__copy .h-sub { margin-top: .7rem; }
.review__copy .body-text { margin-top: .6rem; }
@media (max-width: 860px) {
  .review { grid-template-columns: 1fr; justify-items: start; }
}

/* Let the last section of a doc page scroll up to the header like the others
   (otherwise the page ends first and its title stops halfway down). */
@media (min-width: 1001px) { .doc__main > .chunk:last-child { min-height: calc(100vh - var(--header-h) - 16.5rem); } }

/* header contact icons: after the nav on desktop, beside the burger on phones */
.social { display: flex; align-items: center; gap: .15rem; order: 3; margin-left: -.6rem; }
.nav { order: 2; }
.social a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  color: var(--muted); transition: color .22s var(--ease), background-color .22s var(--ease);
}
.social a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social svg[fill="none"] { fill: none; }
.social--menu { display: none; }
@media (max-width: 860px) {
  .social { order: 0; margin-left: 0; }
  .masthead__inner { gap: .6rem; }
}
@media (max-width: 480px) {
  .masthead__inner { gap: .4rem; }
  .social { gap: 0; }
  .social a { width: 32px; height: 32px; }
}
@media (max-width: 359px) {
  .social:not(.social--menu) { display: none; }
  .social--menu { display: flex; margin: .8rem 0 0; gap: .4rem; }
  .social--menu a { width: 42px; height: 42px; border: 1px solid var(--line-2); }
}

/* ============================================================
   CONTACT (landing block + footer row)
   ============================================================ */
.contact {
  margin-top: 1rem;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--ink-2);
  padding: clamp(1.5rem, 3.5vw, 2.4rem) clamp(1.4rem, 3.5vw, 2.8rem);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.contact__copy .h-sub { margin-top: .7rem; }
.contact__copy .body-text { margin-top: .6rem; }
.contact__links { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.contact-btn {
  display: inline-flex; align-items: center; gap: .55rem; min-width: 0;
  padding: .7rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-2, rgba(255,255,255,.16)); color: var(--text);
  font-size: .92rem; font-weight: 500;
  transition: border-color .22s var(--ease), background-color .22s var(--ease);
}
.contact-btn span { overflow-wrap: anywhere; }
.contact-btn:hover { border-color: var(--pink); background: rgba(255, 182, 210, .06); }
.contact-btn svg, .contact-link svg { width: 17px; height: 17px; flex: none; fill: currentColor; }
.contact-btn svg[fill="none"], .contact-link svg[fill="none"] { fill: none; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .contact__links { justify-content: flex-start; }
}
.footer__contact { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; }
.footer__label { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.contact-link { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--muted); min-width: 0; transition: color .22s var(--ease); }
.contact-link span { overflow-wrap: anywhere; }
.contact-link:hover { color: var(--text); }
