/* AI Video Hub: design system.
 * Dark only, by brief. Tokens first, then layout, then components.
 * No em dashes anywhere in copy or comments (house style).
 */

@view-transition { navigation: auto; }

:root {
  --bg: #05060a;
  --bg2: #090b12;
  --panel: #0c0f18;
  --panel2: #111522;
  --line: rgba(255, 255, 255, 0.075);
  --line2: rgba(255, 255, 255, 0.14);
  --ink: #eef0f7;
  --ink2: #a9afc0;
  --ink3: #6d7386;
  --v: #8a7bff;
  --c: #38d6ff;
  --g: #f3c677;
  --ok: #43e2a8;
  --no: #ff6d7d;
  --grad: linear-gradient(100deg, #a797ff 0%, #6fb2ff 48%, #38d6ff 100%);
  --grad-gold: linear-gradient(100deg, #f7d58f 0%, #f3c677 50%, #e0a857 100%);
  --radius: 20px;
  --radius-s: 12px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  background: var(--bg);
}

/* Lenis (desktop only) takes over scrolling, so native smooth scroll must stay off there. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Ambient light and film grain, fixed behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 85% -10%, rgba(138, 123, 255, 0.16), transparent 70%),
    radial-gradient(50vw 45vh at -10% 30%, rgba(56, 214, 255, 0.07), transparent 70%),
    radial-gradient(70vw 60vh at 50% 120%, rgba(138, 123, 255, 0.08), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 600; }
::selection { background: rgba(138, 123, 255, 0.45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  border-radius: 8px;
}
.skip:focus { left: 8px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow { max-width: 780px; }

/* ---------- type ---------- */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.2vw, 84px); letter-spacing: -0.042em; line-height: 1.0; }
h2 { font-size: clamp(31px, 4.3vw, 56px); letter-spacing: -0.038em; }
h3 { font-size: clamp(20px, 1.9vw, 24px); letter-spacing: -0.02em; line-height: 1.2; }
h2.h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.03em; line-height: 1.12; }
h1 em, h2 em, h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding-right: 0.06em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gold em, em.gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px rgba(56, 214, 255, 0.14), 0 0 14px var(--c);
}
.lede {
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.6;
  color: var(--ink2);
  max-width: 34em;
  text-wrap: pretty;
}
.muted { color: var(--ink3); }
.small { font-size: 14px; line-height: 1.55; }
.mono { font-family: var(--mono); }

.section { padding: clamp(84px, 11vw, 150px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .lede { margin-top: 18px; }
.kicker {
  display: block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav-in {
  height: var(--nav-h);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark { width: 28px; height: 28px; filter: drop-shadow(0 0 12px rgba(138, 123, 255, 0.45)); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 14px;
  color: var(--ink2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #07080c;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 8px 30px -8px rgba(138, 123, 255, 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  white-space: nowrap;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #fff, 0 10px 36px -6px rgba(56, 214, 255, 0.8); }
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad);
  box-shadow: 0 0 12px rgba(56, 214, 255, 0.7);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; padding: 8px 14px; font-size: 13px; }
}

/* ---------- buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 30px; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  color: #07080c;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 14px 44px -10px rgba(138, 123, 255, 0.9), 0 0 60px -20px rgba(56, 214, 255, 0.9);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff, 0 18px 50px -10px rgba(56, 214, 255, 0.95), 0 0 80px -20px rgba(138, 123, 255, 1); }
.btn-primary .arr { transition: transform 0.3s var(--ease); }
.btn-primary:hover .arr { transform: translate(2px, -2px); }
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.textlink {
  color: var(--ink2);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.textlink:hover { color: var(--ink); text-decoration-color: var(--c); }
.disclose {
  margin: 16px 0 0;
  max-width: 36em;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink3);
}
.disclose strong { color: var(--ink2); font-weight: 500; }

/* ---------- story: pinned 3D stage + scrolling text ---------- */

.story { position: relative; display: grid; }
.stage,
.flow { grid-area: 1 / 1; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translate3d(22%, 2%, 0);
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
.stage::after {
  /* keeps text legible where it meets the figure */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 6, 10, 0.55) 0%, rgba(5, 6, 10, 0) 45%);
}
.stage .orb {
  /* shown only if WebGL is unavailable */
  display: none;
  position: absolute;
  right: 12%;
  top: 22%;
  width: min(44vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(138, 123, 255, 0.55), rgba(56, 214, 255, 0.15) 60%, transparent 70%);
  filter: blur(2px);
}
.stage.no-gl .orb { display: block; }
.stage.no-gl canvas { display: none; }

.hud {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink2);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 12, 20, 0.55);
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hud i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--no);
  box-shadow: 0 0 10px var(--no);
  animation: pulse 1.6s ease-in-out infinite;
}
.hud-tl {
  position: absolute;
  top: calc(var(--nav-h) + 22px);
  right: var(--gutter);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  text-align: right;
  line-height: 1.8;
}
.hud, .hud-tl { transition: opacity 0.5s var(--ease); }
.stage.is-leaving .hud, .stage.is-leaving .hud-tl { opacity: 0 !important; }
@keyframes pulse { 50% { opacity: 0.3; } }

.flow { position: relative; z-index: 1; }

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
}
.hero-copy { max-width: 640px; }
.hero h1 { margin-bottom: 24px; }

.step {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.step-card {
  max-width: 520px;
  padding: 32px 32px 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 21, 34, 0.72), rgba(12, 15, 24, 0.6));
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0.35;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.7s;
}
.step.is-active .step-card {
  opacity: 1;
  transform: none;
  box-shadow: inset 0 0 0 1px var(--line2), 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(138, 123, 255, 0.08);
}
.step-num {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c);
}
.step-num::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.step h2, .step h3 { margin-bottom: 14px; }
.step h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.03em; }
.step p { color: var(--ink2); }
.step p:last-child, .step ul:last-child { margin-bottom: 0; }
.spec {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.spec li {
  position: relative;
  padding-left: 26px;
  color: var(--ink2);
  font-size: 15.5px;
  line-height: 1.55;
}
.spec li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(56, 214, 255, 0.5);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--g);
  background: rgba(243, 198, 119, 0.08);
  box-shadow: inset 0 0 0 1px rgba(243, 198, 119, 0.22);
}

@media (max-width: 860px) {
  .stage canvas { transform: translate3d(30%, -12%, 0) scale(0.95); opacity: 0.55; }
  .stage::after { background: linear-gradient(180deg, rgba(5, 6, 10, 0) 25%, rgba(5, 6, 10, 0.55) 70%); }
  .stage.is-story canvas { transform: translate3d(0, -14%, 0) scale(0.9); opacity: 0.8; }
  .hud { right: 50%; transform: translateX(50%); bottom: auto; top: calc(var(--nav-h) + 12px); white-space: nowrap; opacity: 0; transition: opacity 0.6s var(--ease); }
  .stage.is-story .hud { opacity: 1; }
  .hud-tl { display: none; }
  .hero { align-items: flex-start; padding-top: calc(var(--nav-h) + 36px); padding-bottom: 48px; min-height: auto; }
  .hero-copy { text-shadow: 0 2px 24px rgba(5, 6, 10, 0.9); }
  .step { align-items: flex-end; padding: 40vh 0 12vh; }
  .step-card { padding: 24px 22px; }
}

/* ---------- reveal ---------- */

[data-rv] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-rv].in { opacity: 1; transform: none; }

/* ---------- numbers band ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: linear-gradient(180deg, rgba(17, 21, 34, 0.55), rgba(12, 15, 24, 0.35));
  overflow: hidden;
}
.stat { padding: 30px 26px 28px; position: relative; }
.stat + .stat { box-shadow: inset 1px 0 0 var(--line); }
.stat b {
  display: block;
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat.gold b { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; }
.stat span { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { box-shadow: inset 0 1px 0 var(--line); }
  .stat:nth-child(4) { box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
  .stat { padding: 22px 18px; }
}

/* ---------- guide cards (the two hooks) ---------- */

.guides { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; perspective: 1400px; }
.guide {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 34px;
  border-radius: 26px;
  text-decoration: none;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(24, 28, 46, 0.9), rgba(10, 12, 20, 0.9));
  box-shadow: inset 0 0 0 1px var(--line2), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease), box-shadow 0.4s;
}
.guide:hover { box-shadow: inset 0 0 0 1px rgba(138, 123, 255, 0.45), 0 50px 90px -40px rgba(56, 214, 255, 0.35); }
.guide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 0%), rgba(138, 123, 255, 0.22), transparent 60%);
  pointer-events: none;
}
.guide.gold::before { background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 0%), rgba(243, 198, 119, 0.16), transparent 60%); }
.guide .tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink2);
  padding: 6px 11px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line2);
  margin-bottom: auto;
}
.guide h3 { font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -0.035em; line-height: 1.1; margin: 60px 0 16px; transform: translateZ(40px); }
.guide p { color: var(--ink2); margin: 0 0 24px; transform: translateZ(24px); }
.guide .go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  transform: translateZ(30px);
}
.guide .go i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #07080c;
  font-style: normal;
  transition: transform 0.35s var(--ease);
}
.guide:hover .go i { transform: translateX(4px); }
.guide .glyph {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 220px;
  height: 220px;
  opacity: 0.9;
  transform: translateZ(10px);
}
@media (max-width: 860px) {
  .guides { grid-template-columns: 1fr; }
  .guide { min-height: 0; padding: 26px; }
  .guide h3 { margin-top: 90px; }
  .guide .glyph { width: 170px; height: 170px; right: -24px; top: -24px; }
}

/* ---------- horizontal tool stack ---------- */

.hs { position: relative; }
.hs-sticky { position: relative; }
.hs-track { display: flex; gap: 18px; }
.tool {
  flex: 0 0 min(380px, 82vw);
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 21, 34, 0.85), rgba(12, 15, 24, 0.75));
  box-shadow: inset 0 0 0 1px var(--line);
}
.tool .job {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c);
  margin-bottom: 14px;
}
.tool h3 { margin-bottom: 12px; }
.tool p { color: var(--ink2); font-size: 15.5px; }
.tool .names { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14.5px; }
.tool .names div { display: flex; justify-content: space-between; gap: 12px; }
.tool .names dt { color: var(--ink3); }
.tool .names dd { margin: 0; text-align: right; color: var(--ink); }
.pays {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pays.yes { color: var(--g); background: rgba(243, 198, 119, 0.1); box-shadow: inset 0 0 0 1px rgba(243, 198, 119, 0.3); }
.pays.no { color: var(--ink2); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }

/* desktop: pinned horizontal travel, driven by app.js */
@media (min-width: 961px) and (pointer: fine) {
  .hs.is-pinned .hs-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  .hs.is-pinned .hs-track { will-change: transform; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-right: 12vw; }
  .hs.is-pinned .section-head { padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); max-width: none; }
  .hs.is-pinned .section-head > * { max-width: 760px; }
}
@media (max-width: 960px), (pointer: coarse) {
  .hs-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* the track sits outside .wrap, so the gutter is padding, never a negative margin */
    padding: 4px var(--gutter) 20px;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .hs-track::-webkit-scrollbar { display: none; }
  .tool { scroll-snap-align: start; scroll-margin-left: var(--gutter); }
  .swipe-hint { display: flex; }
}
.swipe-hint {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}

/* ---------- panels, lists, callouts ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.panel {
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 21, 34, 0.7), rgba(12, 15, 24, 0.55));
  box-shadow: inset 0 0 0 1px var(--line);
}
.panel h3 { margin-bottom: 12px; }
.panel p { color: var(--ink2); font-size: 15.5px; }
.panel p:last-child { margin-bottom: 0; }
.panel .idx {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink3);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.rule-list { display: grid; gap: 14px; counter-reset: r; }
.rule {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 22px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: rgba(12, 15, 24, 0.6);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rule::before {
  counter-increment: r;
  content: "0" counter(r);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--v);
  padding-top: 5px;
}
.rule h3 { margin-bottom: 8px; font-size: 20px; }
.rule p { margin: 0; color: var(--ink2); font-size: 15.5px; }
.rule > div { min-width: 0; }
@media (max-width: 640px) {
  .rule { grid-template-columns: 1fr; padding: 22px; }
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius-s);
  background: rgba(243, 198, 119, 0.06);
  box-shadow: inset 0 0 0 1px rgba(243, 198, 119, 0.2);
  color: var(--ink2);
  font-size: 15.5px;
}
.callout b { color: var(--g); font-weight: 600; }
.callout .ic { font-size: 18px; line-height: 1.4; color: var(--g); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- verdict ---------- */

.verdict {
  margin-top: 30px;
  max-width: 600px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.85), rgba(12, 15, 24, 0.75));
  box-shadow: inset 0 0 0 1px var(--line2), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.verdict-row { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 16px 22px; font-size: 15.5px; line-height: 1.5; color: var(--ink2); }
.verdict-row + .verdict-row { border-top: 1px solid var(--line); }
.verdict-row b { color: var(--ink); font-weight: 600; }
.mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}
.mark.y { background: rgba(67, 226, 168, 0.14); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(67, 226, 168, 0.35); }
.mark.n { background: rgba(255, 109, 125, 0.12); color: var(--no); box-shadow: inset 0 0 0 1px rgba(255, 109, 125, 0.35); }
.mark.i { background: rgba(243, 198, 119, 0.12); color: var(--g); box-shadow: inset 0 0 0 1px rgba(243, 198, 119, 0.35); }

/* ---------- tables ---------- */

.table-wrap {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
  background: rgba(12, 15, 24, 0.6);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 16px 20px; vertical-align: top; line-height: 1.5; }
thead th {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
}
tbody tr + tr td, tbody tr + tr th { border-top: 1px solid var(--line); }
tbody th { font-weight: 500; color: var(--ink2); }
td { color: var(--ink); }
td .sub { display: block; font-size: 13px; color: var(--ink3); }
td.win { color: var(--ok); }
tr.hl td, tr.hl th { background: rgba(138, 123, 255, 0.06); }
.num { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  table { font-size: 14px; }
  th, td { padding: 13px 12px; }
  thead th { white-space: normal; }
}
.src { margin-top: 14px; font-size: 13px; color: var(--ink3); }
.src a { color: var(--ink2); text-underline-offset: 3px; }

/* ---------- credit calculator ---------- */

.calc {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line2), 0 40px 90px -40px rgba(0, 0, 0, 0.9);
  background: linear-gradient(160deg, rgba(20, 24, 38, 0.9), rgba(10, 12, 20, 0.9));
}
.calc-in { padding: 30px; }
.calc-out {
  padding: 30px;
  background: radial-gradient(400px 300px at 70% 20%, rgba(138, 123, 255, 0.18), transparent 70%), rgba(5, 6, 10, 0.4);
  box-shadow: inset 1px 0 0 var(--line);
  display: flex;
  flex-direction: column;
}
.calc-label {
  display: block;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.seg:last-child { margin-bottom: 0; }
.seg button {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  background: rgba(255, 255, 255, 0.03);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--line2);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] {
  color: #07080c;
  background: #fff;
  box-shadow: 0 0 0 1px #fff, 0 6px 24px -6px rgba(138, 123, 255, 0.8);
}
.seg button small { font-family: var(--mono); font-size: 11px; opacity: 0.7; margin-left: 4px; }
.calc-big {
  font-size: clamp(56px, 7vw, 92px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.calc-unit { font-size: 16px; color: var(--ink2); margin: 10px 0 22px; }
.meter { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin-bottom: 22px; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); box-shadow: 0 0 16px rgba(56, 214, 255, 0.6); transition: width 0.7s var(--ease); }
.calc-facts { display: grid; gap: 10px; margin: 0; font-size: 14.5px; }
.calc-facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.calc-facts dt { color: var(--ink3); }
.calc-facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.calc-note { margin: 18px 0 0; font-size: 13px; color: var(--ink3); line-height: 1.55; }
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .calc-out { box-shadow: inset 0 1px 0 var(--line); }
  .calc-in, .calc-out { padding: 22px; }
}

/* ---------- ratings bars ---------- */

.ratings { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.score { font-size: clamp(60px, 7vw, 96px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.score small { font-size: 0.32em; color: var(--ink3); letter-spacing: 0; font-weight: 500; }
.bars { display: grid; gap: 12px; margin-top: 8px; }
.bar { display: grid; grid-template-columns: 54px 1fr 48px; align-items: center; gap: 14px; font-size: 14px; color: var(--ink2); }
.bar .track { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.bar .fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 1.2s var(--ease); }
.bar.low .fill { background: linear-gradient(90deg, #ff8a96, var(--no)); }
.bar b { font-weight: 500; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.in .bar .fill { width: var(--w); }
@media (max-width: 860px) { .ratings { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 10px; }
.faq details {
  border-radius: var(--radius-s);
  background: rgba(12, 15, 24, 0.6);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.3s;
}
.faq details[open] { box-shadow: inset 0 0 0 1px var(--line2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 500;
  font-size: 17px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--ink2);
  border-bottom: 1.5px solid var(--ink2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .a { padding: 0 24px 22px; color: var(--ink2); font-size: 15.5px; }
.faq .a p:last-child { margin: 0; }

/* ---------- end CTA ---------- */

.endcta {
  position: relative;
  text-align: center;
  padding: clamp(56px, 8vw, 96px) clamp(22px, 5vw, 64px);
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(138, 123, 255, 0.28), transparent 70%),
    radial-gradient(500px 260px at 50% 120%, rgba(56, 214, 255, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(20, 24, 38, 0.9), rgba(8, 10, 16, 0.95));
  box-shadow: inset 0 0 0 1px var(--line2);
}
.endcta h2 { max-width: 16em; margin: 0 auto 18px; }
.endcta .lede { margin: 0 auto; }
.endcta .cta-row { justify-content: center; }
.endcta .disclose { margin-left: auto; margin-right: auto; }

/* ---------- article prose (privacy) ---------- */

.prose { color: var(--ink2); }
.prose h1 { margin-bottom: 24px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 48px 0 14px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- footer ---------- */

.foot { margin-top: clamp(60px, 8vw, 110px); padding: 56px 0 40px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(5, 6, 10, 0.8)); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot p { color: var(--ink3); font-size: 14px; }
.foot h4 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot ul a { color: var(--ink2); text-decoration: none; font-size: 14.5px; }
.foot ul a:hover { color: var(--ink); }
.foot-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-legal p { font-size: 12.5px; line-height: 1.6; max-width: 70em; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  [data-rv] { opacity: 1; transform: none; }
  .step-card { opacity: 1; transform: none; }
  .guide { transform: none !important; }
}
