/* Veilux marketing v3.1: v3's client file and working previews, dressed in v2's world.
   Shape rule: cards 22px, panels inside previews 12px, small controls 8px, buttons and badges pill,
   divider tabs 12px on the top corners only. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-var.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- Tokens: dark first (v2's obsidian) ---------- */
:root {
  color-scheme: dark;
  --ground: #0a0c10;
  --ground-2: #0e1117;
  --sheet: #141821;
  --sheet-2: #1a1f2b;
  --sheet-3: #222838;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.16);
  --ink: #eef2f7;
  --ink-2: #aab3c4;
  --ink-3: #8089a0;
  --on-fill: #0b0d12;

  --accent: #f6b64b;
  --accent-2: #ff7a59;
  --accent-ink: #1a1200;
  --glow: rgba(246, 182, 75, 0.16);
  --glow-2: rgba(255, 122, 89, 0.12);
  --grid-line: rgba(255, 255, 255, 0.045);

  /* One colour per product area (v2's module colours). Always a fill with dark text on it. */
  --m-customers: #f6b64b;
  --m-sales: #8b7cff;
  --m-money: #5ee1c9;
  --m-delivery: #5bb5ff;
  --m-support: #ff6b9a;
  --m-portal: #ff7a59;
  --m-insight: #b8e356;
  --m-platform: #a3adbf;

  /* Chart series, validated with the dataviz six checks on both surfaces. */
  --chart-a: #8b7cff;
  --chart-b: #1fa386;

  --ok: #5ee1c9;
  --ok-wash: rgba(94, 225, 201, 0.12);
  --warn: #f6b64b;
  --warn-wash: rgba(246, 182, 75, 0.13);
  --bad: #ff7d9f;
  --bad-wash: rgba(255, 107, 154, 0.14);
  --info: #7cc4ff;
  --info-wash: rgba(91, 181, 255, 0.13);
  --neutral-wash: rgba(255, 255, 255, 0.07);
  --check: #5ee1c9;

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);

  --radius: 22px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --pill: 999px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* ---------- Tokens: light (v2's paper, re-balanced so the amber reads) ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --ground: #f7f6f2;
    --ground-2: #f0eee7;
    --sheet: #ffffff;
    --sheet-2: #f6f4ee;
    --sheet-3: #ece9e1;
    --rule: rgba(16, 18, 24, 0.09);
    --rule-2: rgba(16, 18, 24, 0.18);
    --ink: #0f1218;
    --ink-2: #4b5363;
    --ink-3: #636b7c;
    --accent: #e39a1f;
    --accent-2: #f0603c;
    --glow: rgba(227, 154, 31, 0.18);
    --glow-2: rgba(240, 96, 60, 0.12);
    --grid-line: rgba(16, 18, 24, 0.06);
    --chart-a: #6c5ce7;
    --chart-b: #128a6f;
    --ok: #0d7a62;
    --ok-wash: #ddf3ec;
    --warn: #8a5a00;
    --warn-wash: #fbefd3;
    --bad: #b3264f;
    --bad-wash: #fbe3ea;
    --info: #1d5f9e;
    --info-wash: #e1eefb;
    --neutral-wash: #ebe8e0;
    --check: #0d7a62;
    --shadow: 0 24px 70px rgba(20, 20, 30, 0.14);
    --shadow-sm: 0 8px 24px rgba(20, 20, 30, 0.1);
  }
}
:root[data-theme='light'] {
  color-scheme: light;
  --ground: #f7f6f2;
  --ground-2: #f0eee7;
  --sheet: #ffffff;
  --sheet-2: #f6f4ee;
  --sheet-3: #ece9e1;
  --rule: rgba(16, 18, 24, 0.09);
  --rule-2: rgba(16, 18, 24, 0.18);
  --ink: #0f1218;
  --ink-2: #4b5363;
  --ink-3: #636b7c;
  --accent: #e39a1f;
  --accent-2: #f0603c;
  --glow: rgba(227, 154, 31, 0.18);
  --glow-2: rgba(240, 96, 60, 0.12);
  --grid-line: rgba(16, 18, 24, 0.06);
  --chart-a: #6c5ce7;
  --chart-b: #128a6f;
  --ok: #0d7a62;
  --ok-wash: #ddf3ec;
  --warn: #8a5a00;
  --warn-wash: #fbefd3;
  --bad: #b3264f;
  --bad-wash: #fbe3ea;
  --info: #1d5f9e;
  --info-wash: #e1eefb;
  --neutral-wash: #ebe8e0;
  --check: #0d7a62;
  --shadow: 0 24px 70px rgba(20, 20, 30, 0.14);
  --shadow-sm: 0 8px 24px rgba(20, 20, 30, 0.1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  scrollbar-color: var(--rule-2) var(--ground);
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.03rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
a,
button,
summary,
input,
select,
textarea,
label {
  touch-action: manipulation;
}
::selection {
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--ink);
}
img,
svg {
  max-width: 100%;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.ic {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  vertical-align: -0.15em;
}
.num,
.mono {
  font-variant-numeric: tabular-nums;
}
.mono {
  font-family: var(--font-mono);
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 80;
  background: var(--ink);
  color: var(--ground);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
}
.skip:focus {
  top: 12px;
}
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Atmosphere: grain, aurora, grid lines, scroll progress (v2) ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.06;
  mix-blend-mode: overlay;
  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>");
}
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.aurora .a1 {
  width: 56vw;
  height: 56vw;
  left: -16vw;
  top: -24vw;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 62%);
  animation: drift1 22s var(--ease-in-out) infinite alternate;
}
.aurora .a2 {
  width: 46vw;
  height: 46vw;
  right: -14vw;
  top: -12vw;
  background: radial-gradient(circle at 60% 40%, var(--accent-2), transparent 62%);
  animation: drift2 26s var(--ease-in-out) infinite alternate;
}
.aurora .a3 {
  width: 40vw;
  height: 40vw;
  left: 30vw;
  bottom: -28vw;
  opacity: 0.32;
  background: radial-gradient(circle at 50% 50%, var(--m-sales), transparent 62%);
  animation: drift3 30s var(--ease-in-out) infinite alternate;
}
:root[data-theme='light'] .aurora span {
  opacity: 0.32;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .aurora span {
    opacity: 0.32;
  }
}
@keyframes drift1 {
  to {
    transform: translate(10vw, 8vw) scale(1.1);
  }
}
@keyframes drift2 {
  to {
    transform: translate(-8vw, 10vw) scale(1.15);
  }
}
@keyframes drift3 {
  to {
    transform: translate(-12vw, -6vw) scale(0.95);
  }
}
.gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 70;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes progress {
  to {
    transform: scaleX(1);
  }
}

/* ---------- Type ---------- */
.display {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-weight: 600;
}
.h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.03em;
}
.h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  letter-spacing: -0.02em;
}
.lede {
  font-size: clamp(1.05rem, 1.45vw, 1.22rem);
  color: var(--ink-2);
  max-width: 50ch;
  line-height: 1.55;
  text-wrap: balance;
}
.body-2 {
  color: var(--ink-2);
  max-width: 60ch;
}
.grad-text {
  background: linear-gradient(92deg, var(--accent), var(--accent-2) 60%, var(--m-support));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}
.rotate {
  display: inline-block;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out), filter 280ms var(--ease-out);
}
.rotate.is-out {
  opacity: 0;
  transform: translateY(0.18em);
  filter: blur(4px);
}

/* ---------- Buttons (v2 pills) ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), box-shadow 250ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn--sm {
  height: 38px;
  padding: 0 16px;
  font-size: 0.9rem;
}
.btn--primary {
  color: var(--accent-ink);
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--line {
  color: var(--ink);
  border-color: var(--rule-2);
  background: color-mix(in srgb, var(--sheet) 60%, transparent);
}
.btn .ic {
  width: 17px;
  height: 17px;
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    box-shadow: 0 16px 40px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }
  .btn--line:hover {
    border-color: var(--ink-3);
  }
  .btn:hover .ic {
    transform: translateX(3px);
  }
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pill);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 180ms ease, color 180ms ease;
}
.icon-btn:active {
  transform: scale(0.95);
}
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    border-color: var(--rule-2);
    color: var(--ink);
  }
}
.icon-btn .ic {
  width: 18px;
  height: 18px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms ease;
}
.nav[data-scrolled='true'] {
  border-bottom-color: var(--rule);
}
.nav-row {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}
.nav-links a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--pill);
  color: var(--ink-2);
  font-size: 0.95rem;
  transition: color 180ms ease, background-color 180ms ease;
}
.nav-links a[aria-current='page'] {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--ink) 7%, transparent);
  }
}
.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-signin {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 8px 8px;
}
@media (hover: hover) and (pointer: fine) {
  .nav-signin:hover {
    color: var(--ink);
  }
}
.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 14px;
  border-radius: var(--pill);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}
kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--rule-2);
  color: var(--ink-2);
}
[data-theme-toggle] .ic:first-child {
  display: none;
}
:root[data-theme='light'] [data-theme-toggle] .ic:first-child {
  display: block;
}
:root[data-theme='light'] [data-theme-toggle] .ic:last-child {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) [data-theme-toggle] .ic:first-child {
    display: block;
  }
  :root:not([data-theme='dark']) [data-theme-toggle] .ic:last-child {
    display: none;
  }
}
.nav-menu {
  display: none;
}
.nav-sheet {
  display: grid;
  padding-bottom: 16px;
}
.nav-sheet a {
  text-decoration: none;
  padding: 13px 4px;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 960px) {
  .kbd-hint {
    display: none;
  }
}
@media (max-width: 820px) {
  .nav-links,
  .nav-signin {
    display: none;
  }
  .nav-menu {
    display: inline-grid;
  }
}
@media (max-width: 420px) {
  .nav-end .btn--sm {
    padding: 0 13px;
  }
  .nav-row {
    gap: 12px;
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 128px);
}
.section--tight {
  padding-block: clamp(40px, 5vw, 72px);
}
.band {
  background: var(--ground-2);
}
.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(32px, 4vw, 52px);
  max-width: 780px;
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

/* Visible by default. Script adds the entrance only to sections that start below the fold. */
.will-reveal {
  opacity: 0;
  transform: translateY(18px);
}
.will-reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

/* ---------- Cards (v2, cursor-lit) ---------- */
.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  isolation: isolate;
  overflow: hidden;
  transition: border-color 250ms ease, transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(480px circle at var(--mx) var(--my), var(--glow), transparent 45%);
  opacity: 0;
  transition: opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--rule-2);
  }
  .card:hover::before {
    opacity: 1;
  }
  .card--lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 5vw, 72px) clamp(56px, 6vw, 96px);
}
.hero > .wrap {
  position: relative;
  z-index: 1;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 2.08fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(28px, 3.4vw, 44px);
  align-items: start;
}
.hero-side {
  display: grid;
  gap: 28px;
  padding-top: 56px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-side {
    padding-top: 0;
  }
}

/* ---------- THE FILE: divider tabs over working previews ---------- */
.file {
  --c: var(--m-money);
  position: relative;
  min-width: 0;
}
.file-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-left: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.file-tabs::-webkit-scrollbar {
  display: none;
}
.ftab {
  --c: var(--m-platform);
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px 12px 0 0;
  background: color-mix(in srgb, var(--c) 30%, var(--sheet-2));
  /* The full ink: the secondary ink on a tinted tab fell under 4.5:1 for money and delivery. */
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  scroll-snap-align: start;
  transform: translateY(5px);
  transition: transform 200ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.ftab[aria-selected='true'] {
  background: var(--c);
  color: var(--on-fill);
  transform: translateY(0);
}
@media (hover: hover) and (pointer: fine) {
  .ftab:not([aria-selected='true']):hover {
    transform: translateY(2px);
    color: var(--ink);
  }
}
.ftab:active {
  transform: translateY(3px) scale(0.98);
}
.ftab[data-area='customers'] { --c: var(--m-customers); }
.ftab[data-area='sales'] { --c: var(--m-sales); }
.ftab[data-area='money'] { --c: var(--m-money); }
.ftab[data-area='delivery'] { --c: var(--m-delivery); }
.ftab[data-area='support'] { --c: var(--m-support); }
.ftab[data-area='portal'] { --c: var(--m-portal); }
.ftab[data-area='insight'] { --c: var(--m-insight); }
.ftab[data-area='platform'] { --c: var(--m-platform); }
.file-sheet {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--c);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--c) 10%, transparent);
  transition: border-color 220ms ease;
  min-height: 420px;
}
.file-sheet::before,
.file-sheet::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  height: 10px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--sheet-2);
  border: 1px solid var(--rule);
  border-top: 0;
  z-index: -1;
}
.file-sheet::before {
  bottom: -9px;
}
.file-sheet::after {
  left: 28px;
  right: 28px;
  bottom: -17px;
  opacity: 0.6;
}
.file-panel {
  padding: clamp(16px, 2vw, 24px);
}
.file-panel[data-entering] {
  animation: panelIn 240ms var(--ease-out) both;
}
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(2px);
  }
}

/* ---------- Product preview language (.ui), v2's mock kit ---------- */
.ui {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink);
  display: grid;
  gap: 14px;
  container-type: inline-size;
}
.ui-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ui-crumb {
  color: var(--ink-3);
  font-size: 0.75rem;
}
.ui-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ui-sub {
  color: var(--ink-3);
  font-size: 0.78rem;
  margin-top: 2px;
}
.ui-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out), border-color 160ms ease, opacity 160ms ease, filter 160ms ease;
}
.ui-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.ui-btn--go {
  background: var(--c, var(--accent));
  border-color: transparent;
  color: var(--on-fill);
}
.ui-btn--static {
  cursor: default;
}
.ui-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (hover: hover) and (pointer: fine) {
  .ui-btn:not(:disabled):not(.ui-btn--go):not(.ui-btn--static):hover {
    border-color: var(--ink-3);
  }
  .ui-btn--go:not(:disabled):hover {
    filter: brightness(1.08);
  }
}
.ui-btn .ic {
  width: 15px;
  height: 15px;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--pill);
  font-size: 0.71rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--neutral-wash);
  color: var(--ink-2);
  transition: background-color 200ms ease, color 200ms ease;
}
.badge--ok { background: var(--ok-wash); color: var(--ok); }
.badge--warn { background: var(--warn-wash); color: var(--warn); }
.badge--bad { background: var(--bad-wash); color: var(--bad); }
.badge--info { background: var(--info-wash); color: var(--info); }
.ui-box {
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--sheet);
  overflow: hidden;
}
.ui-box-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--sheet-2);
  font-weight: 600;
  font-size: 0.79rem;
}
.ui-box-h span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--ink-3);
}
.ui-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
}
.ui-row:last-child {
  border-bottom: 0;
}
.ui-row--3 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
}
.ui-row b {
  font-weight: 600;
}
.ui-row .dim {
  color: var(--ink-3);
}
.ui-row .amt {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ui-row--total {
  font-weight: 700;
  font-size: 0.95rem;
}
.ui-row--total .amt {
  font-size: 0.9rem;
  font-weight: 700;
}
.ui-row--hl {
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--sheet));
}
.ui-row.is-struck .amt,
.ui-row.is-struck b {
  text-decoration: line-through;
  color: var(--ink-3);
}
.ui-row[data-new] {
  animation: rowIn 260ms var(--ease-out) both;
}
@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.ui-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ui-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ui-stat {
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  background: var(--sheet);
}
.ui-stat small {
  display: block;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ui-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
@container (max-width: 560px) {
  .ui-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ui-row--3 {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ui-row--3 > :nth-child(2) {
    display: none;
  }
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--on-fill);
  background: var(--m-customers);
  flex: none;
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.who span {
  min-width: 0;
}
.ui-note {
  font-size: 0.78rem;
  color: var(--ink-3);
}
.clock {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.sig-line {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
}
.ui-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule-2);
  background: var(--sheet-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
}
.ui-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.signed {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
}
.meter {
  height: 6px;
  border-radius: var(--pill);
  background: var(--neutral-wash);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(var(--s, 0));
  transform-origin: left;
  background: var(--c, var(--accent));
  border-radius: var(--pill);
  transition: transform 400ms var(--ease-out);
}
.switch {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: var(--pill);
  border: 0;
  padding: 0;
  background: var(--rule-2);
  cursor: pointer;
  transition: background-color 180ms ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 200ms var(--ease-out);
}
.switch[aria-checked='true'] {
  background: var(--m-money);
}
.switch[aria-checked='true']::after {
  transform: translateX(16px);
}

/* ---------- Facts strip ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.facts > div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 20px;
  font-weight: 500;
  font-size: 0.97rem;
}
.facts > div + div {
  border-left: 1px solid var(--rule);
}
.facts .ic {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
@media (max-width: 900px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts > div:nth-child(3) {
    border-left: 0;
  }
  .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}
@media (max-width: 480px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts > div + div {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
}

/* ---------- You are the integration: four tools against one record ---------- */
.sprawl {
  display: grid;
  gap: 22px;
}
.sprawl-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
}
.sprawl-act {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sprawl-count {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--ink-2);
}
.sprawl-count b {
  color: var(--ink);
}
.sprawl-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tool {
  --c: var(--m-platform);
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
  border-top: 3px solid var(--c);
  transition: border-color 260ms ease, transform 320ms var(--ease-out);
}
.tool-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tool b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.tool .addr {
  color: var(--ink-2);
  font-size: 0.9rem;
  min-height: 2.9em;
  transition: color 200ms ease;
}
.tool[data-stale='true'] .addr {
  color: var(--bad);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.sprawl[data-mode='one'] .tool {
  border-top-color: var(--accent);
}
@media (max-width: 900px) {
  .sprawl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .sprawl-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.versus {
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--rule);
}
.versus-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.versus-row h3 {
  font-size: 1.1rem;
}
.versus-row .them {
  color: var(--ink-3);
}
.versus-row .us {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
}
.versus-row .us .ic {
  margin-top: 3px;
  color: var(--check);
}
.versus-head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-block: 14px;
}
.versus-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-3);
}
@media (max-width: 760px) {
  .versus-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .versus-head {
    display: none;
  }
}

/* ---------- Timeline: one client, start to finish ---------- */
.thread {
  position: relative;
  padding: 18px 0 0;
}
.thread-track {
  position: relative;
  height: 170px;
  touch-action: pan-y;
  cursor: ew-resize;
}
.thread-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--rule-2);
  border-radius: 2px;
}
.thread-line i {
  position: absolute;
  inset: 0;
  transform: scaleX(var(--s, 0));
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform 160ms var(--ease-out);
}
.thread-ev {
  --c: var(--m-platform);
  position: absolute;
  top: 50%;
  left: var(--x);
  transform: translateX(-50%);
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.thread-ev .pin {
  display: block;
  width: 14px;
  height: 14px;
  margin: -7px auto 0;
  border-radius: 50%;
  background: var(--ground);
  border: 2px solid var(--c);
  transition: background-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}
.thread-ev .tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 160ms ease;
}
.thread-ev:nth-child(odd) .tag {
  bottom: 22px;
}
.thread-ev:nth-child(even) .tag {
  top: 22px;
}
.thread-ev .tag em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-align: center;
}
.thread-ev.is-on .pin {
  background: var(--c);
  transform: scale(1.3);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent);
}
.thread-ev.is-on .tag {
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .thread-ev:hover .pin {
    transform: scale(1.15);
  }
}
.thread-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  max-width: 660px;
  margin: 10px auto 0;
  padding: 16px 22px;
}
.thread-card .date {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 62px;
  color: var(--accent);
}
.thread-card p {
  color: var(--ink-2);
}
@media (max-width: 860px) {
  .thread-track {
    height: auto;
    cursor: auto;
    display: grid;
    padding-left: 22px;
  }
  .thread-line {
    left: 6px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
  }
  .thread-line i {
    display: none;
  }
  .thread-ev {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    text-align: left;
  }
  .thread-ev .pin {
    margin: 0 0 0 -23px;
  }
  .thread-ev .tag,
  .thread-ev:nth-child(odd) .tag,
  .thread-ev:nth-child(even) .tag {
    position: static;
    transform: none;
    white-space: normal;
  }
  .thread-ev .tag em {
    display: inline;
    margin-left: 6px;
  }
  .thread-card {
    display: none;
  }
}

/* ---------- Ledger statement ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}
.points {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
.points li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  color: var(--ink-2);
}
.points .ic {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--check);
}
.statement {
  padding: 24px;
  display: grid;
  gap: 18px;
  border-top: 3px solid var(--m-money);
}
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--pill);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--sheet) 70%, transparent);
  flex-wrap: wrap;
}
.seg button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.seg button:active {
  transform: scale(0.97);
}
.seg button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--ground);
}
@media (hover: hover) and (pointer: fine) {
  .seg button:not([aria-pressed='true']):hover {
    color: var(--ink);
  }
}
.seg.mono button {
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.stmt-rows {
  display: grid;
}
.stmt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.stmt-row span:last-child {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.stmt-row span:first-child {
  color: var(--ink-2);
}
.stmt-row--sum {
  border-bottom: 0;
  border-top: 2px solid var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  padding-top: 14px;
}
.stmt-row--sum span:first-child {
  color: var(--ink);
}
.stmt-who {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.stmt-who b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.stmt-who span {
  color: var(--ink-3);
  font-size: 0.86rem;
}

/* ---------- Roles: who sees the money ---------- */
.roles {
  display: grid;
  justify-items: center;
  gap: 24px;
}
.record {
  width: min(780px, 100%);
  padding: 22px;
  display: grid;
  gap: 16px;
  border-top: 3px solid var(--m-delivery);
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.field {
  background: var(--sheet);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  min-width: 0;
  transition: background-color 200ms ease;
}
.field small {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.field .redact {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 0.86rem;
}
.field[data-hidden='true'] b {
  display: none;
}
.field[data-hidden='true'] .redact {
  display: inline-flex;
}
.field[data-hidden='true'] {
  background: var(--sheet-2);
}
@media (max-width: 640px) {
  .record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .record-grid .field:last-child {
    grid-column: 1 / -1;
  }
}
.role-note {
  color: var(--ink-2);
  min-height: 1.6em;
  text-align: center;
  max-width: 60ch;
}

/* ---------- Firms: horizontal scroll-snap ---------- */
.firms {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 350px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 22px;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(50% - 50vw);
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.firm {
  --c: var(--accent);
  scroll-snap-align: start;
  padding: 22px;
  display: grid;
  gap: 14px;
  align-content: start;
  border-top: 3px solid var(--c);
}
.firm h3 {
  font-size: 1.22rem;
}
.firm p {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.firm .ui-box {
  font-size: 0.82rem;
}
.firms-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.firms-nav {
  display: flex;
  gap: 8px;
}
.firms-nav [data-firms='-1'] .ic {
  transform: rotate(180deg);
}

/* ---------- Integrations ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.logos li {
  display: grid;
  place-items: center;
  height: 84px;
  list-style: none;
  color: var(--ink-3);
  transition: color 200ms ease;
}
.logos .logo {
  width: 32px;
  height: 32px;
}
.logos li:nth-child(3) .logo {
  width: 64px;
  height: 64px;
}
@media (hover: hover) and (pointer: fine) {
  .logos li:hover {
    color: var(--ink);
  }
}
@media (max-width: 800px) {
  .logos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.also {
  margin-top: 18px;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- Seat calculator ---------- */
.calc {
  overflow: hidden;
}
.calc-top {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--rule);
}
.calc-seats {
  display: grid;
  gap: 10px;
  flex: 1 1 320px;
}
.calc-seats label {
  font-weight: 600;
}
.calc-seats output {
  font-family: var(--font-mono);
  color: var(--accent);
}
input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
}
.plans-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.plan {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: background-color 220ms ease;
}
.plan + .plan {
  border-left: 1px solid var(--rule);
}
.plan h3 {
  font-size: 1.3rem;
}
.plan .price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.plan .price small {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-left: 4px;
}
.plan .basis {
  color: var(--ink-3);
  font-size: 0.86rem;
}
.plan .who {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.plan[data-best='true'] {
  background: color-mix(in srgb, var(--accent) 7%, var(--sheet));
}
.plan[data-best='true']::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.best-flag {
  width: max-content;
  visibility: hidden;
}
.plan[data-best='true'] .best-flag {
  visibility: visible;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 0.93rem;
}
.plan li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
}
.plan li .ic {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--check);
}
.plan .btn {
  margin-top: auto;
}
@media (max-width: 860px) {
  .plans-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .plan + .plan {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .plan:not([data-best='true']) .best-flag {
    display: none;
  }
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
@media (max-width: 860px) {
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }
}
.faq details {
  border-top: 1px solid var(--rule);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.03rem;
  cursor: pointer;
  list-style: none;
  transition: color 160ms ease;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .ic {
  margin-top: 3px;
  color: var(--ink-3);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary .ic {
  transform: rotate(45deg);
  color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .faq summary:hover {
    color: var(--accent);
  }
}
.faq details p {
  padding: 0 0 20px;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ---------- Closer: v2's CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 22px;
  padding: clamp(56px, 8vw, 104px) clamp(20px, 4vw, 48px);
  border-radius: 28px;
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.cta-band > :not(.aurora) {
  position: relative;
  z-index: 1;
}
.cta-band .display {
  font-size: clamp(2.3rem, 5vw, 4rem);
  max-width: 16ch;
}
.cta-band .hero-cta {
  justify-content: center;
}

/* ---------- Footer ---------- */
.foot {
  padding-top: 64px;
  border-top: 1px solid var(--rule);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.foot-brand p {
  margin-top: 12px;
  color: var(--ink-2);
  max-width: 26ch;
}
.foot h2 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.foot nav {
  display: grid;
  gap: 9px;
  align-content: start;
}
.foot nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.93rem;
  width: max-content;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .foot nav a:hover {
    color: var(--ink);
  }
}
.foot-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 28px;
  margin-top: 44px;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.88rem;
}
.foot-base a {
  color: var(--ink-2);
}
@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Page heads (product, pricing, contact) ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  padding-block: clamp(44px, 6vw, 88px) clamp(28px, 4vw, 52px);
}
.page-head > .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

/* ---------- Product page: chapters beside a pinned file ---------- */
.chapters {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding-bottom: clamp(56px, 7vw, 96px);
}
.chapters-file {
  position: sticky;
  top: 96px;
}
.chapters-file .ftab {
  padding: 0 10px;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}
.chapter {
  --c: var(--m-platform);
  min-height: min(64vh, 620px);
  padding-block: 32px 48px;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 18px;
  align-content: start;
  scroll-margin-top: 92px;
}
.chapter:first-child {
  border-top: 0;
  padding-top: 0;
}
.chapter h2 {
  display: flex;
  align-items: center;
  gap: 14px;
}
.chapter h2::before {
  content: '';
  flex: none;
  width: 26px;
  height: 16px;
  border-radius: 6px 6px 0 0;
  background: var(--c);
}
.caps {
  display: grid;
  margin: 6px 0 0;
}
.caps div {
  padding: 13px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 2px;
}
.caps dt {
  font-weight: 600;
}
.caps dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.96rem;
}
@media (max-width: 980px) {
  .chapters {
    grid-template-columns: minmax(0, 1fr);
  }
  .chapters-file {
    position: relative;
    top: 0;
    order: -1;
  }
  .chapter {
    min-height: 0;
  }
}

/* ---------- Pricing page ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.compare-table th,
.compare-table td {
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--rule-2);
}
.compare-table tbody th {
  font-weight: 500;
  color: var(--ink-2);
  width: 34%;
}
.compare-table tbody tr {
  border-bottom: 1px solid var(--rule);
}
.compare-table td.no {
  color: var(--ink-3);
}
.table-scroll {
  overflow-x: auto;
}
.table-scroll .compare-table {
  min-width: 640px;
}
.all-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}
.all-plans li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.all-plans .ic {
  color: var(--check);
}

/* ---------- Contact page ---------- */
.doors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 900px) {
  .doors {
    grid-template-columns: minmax(0, 1fr);
  }
}
.door-list {
  display: grid;
}
.door {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.door:last-of-type {
  border-bottom: 1px solid var(--rule);
}
.door .ic-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--c, var(--accent));
  color: var(--on-fill);
}
.door .ic-box .ic {
  width: 22px;
  height: 22px;
}
.door b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.door span {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.door > .ic {
  color: var(--ink-3);
  transition: transform 200ms var(--ease-out), color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .door:hover > .ic {
    transform: translateX(4px);
    color: var(--ink);
  }
}
.form {
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.fld {
  display: grid;
  gap: 7px;
}
.fld label {
  font-weight: 600;
  font-size: 0.92rem;
}
.fld .hint {
  color: var(--ink-3);
  font-size: 0.84rem;
}
.fld input,
.fld select,
.fld textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--sheet-2);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.fld textarea {
  min-height: 116px;
  resize: vertical;
}
.fld input:focus,
.fld select:focus,
.fld textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.fld [aria-invalid='true'] {
  border-color: var(--bad);
}
.fld .err {
  color: var(--bad);
  font-size: 0.86rem;
  font-weight: 500;
}
.form-done {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--ok-wash);
}
.form-done p {
  color: var(--ink-2);
}
.form .err[data-walk-error] {
  color: var(--bad);
  font-size: 0.92rem;
  font-weight: 500;
}
/* The honeypot: off screen for people and screen readers, still in the form for bots. */
.form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Charts inside the Insight divider ---------- */
.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-2);
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}
.chart {
  position: relative;
  min-height: 210px;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .gl {
  stroke: var(--rule);
}
.chart .ax {
  fill: var(--ink-3);
  font-size: 10px;
  font-family: var(--font-mono);
}
.chart .dl {
  fill: var(--ink-2);
  font-size: 10px;
  font-family: var(--font-mono);
  text-anchor: middle;
}
.chart .bar {
  transition: opacity 160ms ease;
}
.chart .bar.dim {
  opacity: 0.3;
}
.chart .hit {
  fill: transparent;
}
.chart-tip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
  background: var(--ink);
  color: var(--ground);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 120ms ease;
}
.chart-tip.is-in {
  opacity: 1;
}
.chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.chart-table th,
.chart-table td {
  padding: 7px 8px;
  text-align: right;
  border-bottom: 1px solid var(--rule);
}
.chart-table td {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.chart-table th:first-child,
.chart-table td:first-child {
  text-align: left;
}
.chart-table th {
  font-weight: 600;
  color: var(--ink-3);
}

/* ---------- Jump palette (v2's Cmd K; no animation, it is a keyboard action) ---------- */
.palette {
  width: min(560px, calc(100% - 32px));
  margin-top: 14vh;
  padding: 0;
  border: 1px solid var(--rule-2);
  border-radius: 18px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.palette::backdrop {
  background: rgba(5, 6, 9, 0.55);
  backdrop-filter: blur(4px);
}
.pal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
}
.pal-head .ic {
  color: var(--ink-3);
}
.pal-head input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
}
.palette ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 52vh;
  overflow: auto;
}
.palette a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.palette a span {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.palette a.is-current,
.palette a:hover {
  background: var(--sheet-2);
}
.pal-empty {
  padding: 18px;
  color: var(--ink-3);
}

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
  .aurora span,
  .progress {
    animation: none !important;
  }
  .file-panel[data-entering],
  .ui-row[data-new] {
    animation: fadeOnly 160ms ease both;
  }
  .will-reveal,
  .will-reveal.in {
    transform: none;
  }
  .btn:active,
  .ui-btn:active,
  .ftab:active,
  .seg button:active,
  .icon-btn:active {
    transform: none;
  }
  .rotate.is-out {
    transform: none;
    filter: none;
  }
}
@keyframes fadeOnly {
  from {
    opacity: 0;
  }
}

/* The rotating word keeps the widest word's room, so the headline never re-wraps mid-rotation. */
.hero-h {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
}
.hero-h .rotate {
  min-width: 4.5em;
}
@media (max-width: 700px) {
  .hero-h .rotate {
    min-width: 0;
  }
}

/* Atmosphere fades out instead of stopping at the section edge. */
.hero .aurora,
.page-head .aurora {
  mask-image: linear-gradient(#000 55%, transparent);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
}
/* The document needs more room than the ledger beside it; narrow files stack them. */
.ui-cols {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}
@container (max-width: 660px) {
  .ui-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ui-row--3 > .dim.num {
  font-size: 0.78rem;
}
.plan[data-best='true'] {
  background: color-mix(in srgb, var(--accent) 5%, var(--sheet-2));
}

/* Finish review: larger micro labels, a louder out-of-date state. */
.ui-stat small,
.field small {
  font-size: 0.68rem;
}
.tool-name {
  font-size: 0.74rem;
}
.tool[data-stale='true'] {
  border-top-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 7%, var(--sheet));
}
.role-note b {
  color: var(--ink);
  font-weight: 600;
}

/* Hero threads: a canvas of strands that gather behind the file. Faded at the edges so it never meets a hard line. */
.threads {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
  mask-image: radial-gradient(ellipse 72% 85% at 74% 52%, #000 38%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 72% 85% at 74% 52%, #000 38%, transparent 100%);
}

/* Auto-play cue: a thin bar fills the open tab while the hero walks through the dividers. */
.file[data-auto] .ftab[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.45;
  transform-origin: left;
  animation: dwell var(--dwell, 5200ms) linear forwards;
}
.file[data-auto][data-paused] .ftab[aria-selected='true']::after {
  animation-play-state: paused;
}
@keyframes dwell {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ---------- Firms: a list of firm types beside one worked example ---------- */
.firm-pick {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.45fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.firm-list {
  display: grid;
  gap: 4px;
}
.firm-list button {
  --c: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.firm-list button::before {
  content: '';
  flex: none;
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: var(--c);
  opacity: 0.35;
  transition: opacity 180ms ease, height 200ms var(--ease-out);
}
.firm-list button[aria-selected='true'] {
  background: var(--sheet);
  border-color: var(--rule);
  color: var(--ink);
}
.firm-list button[aria-selected='true']::before {
  opacity: 1;
  height: 28px;
}
@media (hover: hover) and (pointer: fine) {
  .firm-list button:not([aria-selected='true']):hover {
    color: var(--ink);
  }
}
.firm-show {
  padding: clamp(22px, 3vw, 32px);
  border-top: 3px solid var(--c, var(--rule-2));
  transition: border-color 220ms ease;
}
.firm-panel {
  --c: var(--accent);
  display: grid;
  gap: 18px;
}
.firm-panel h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  max-width: 24ch;
}
.firm-panel .points {
  margin: 0;
}
.firm-panel[data-entering] {
  animation: panelIn 240ms var(--ease-out) both;
}
@media (max-width: 860px) {
  .firm-pick {
    grid-template-columns: minmax(0, 1fr);
  }
  .firm-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .firm-list::-webkit-scrollbar {
    display: none;
  }
  .firm-list button {
    width: auto;
    flex: none;
    font-size: 0.98rem;
    padding: 10px 14px;
    border-color: var(--rule);
    border-radius: var(--pill);
  }
  .firm-list button::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }
  .firm-list button[aria-selected='true']::before {
    height: 8px;
  }
}

/* ================= Fluent layer: one motion language for the landing page ================= */

/* Closing band: strands thread through the buttons. */
.cta-band > .threads.threads--cta {
  position: absolute;
  z-index: 0;
  mask-image: radial-gradient(ellipse 75% 80% at 50% 66%, #000 25%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 66%, #000 25%, transparent 90%);
}

/* Four tools: the wiring above the cards. */
.sprawl-stage {
  position: relative;
  padding-top: 64px;
}
.sprawl-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.sprawl-grid {
  z-index: 1;
}
.sprawl-links .link {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 600ms var(--ease-in-out);
}
.sprawl-links .link.is-drawn {
  stroke-dashoffset: 0;
}
.sprawl-links .link--four {
  stroke: var(--ink-3);
  stroke-dasharray: 0.12 0.08;
  stroke-dashoffset: 0;
}
.sprawl-links .link--one {
  stroke: var(--accent);
}
.sprawl-links .copy-dot {
  fill: var(--sheet);
  stroke: var(--ink-3);
  stroke-width: 1.5;
}
.sprawl-links .hub-dot {
  fill: var(--accent);
  filter: drop-shadow(0 0 8px var(--glow));
}
.sprawl-links .hub-label {
  fill: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sprawl-links .pulse-dot {
  fill: var(--accent-2);
  filter: drop-shadow(0 0 6px var(--accent-2));
}
@media (max-width: 900px) {
  .sprawl-stage {
    padding-top: 0;
  }
  .sprawl-links {
    display: none;
  }
}

/* Timeline: a glow keeps moving along the thread. Constant motion, so linear. */
.thread-line::after {
  content: '';
  position: absolute;
  inset: -1px 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent) no-repeat;
  background-size: 180px 100%;
  opacity: 0.8;
  animation: glide 6s linear infinite;
}
@keyframes glide {
  from {
    background-position: -180px 0;
  }
  to {
    background-position: calc(100% + 180px) 0;
  }
}
@media (max-width: 860px) {
  .thread-line::after {
    display: none;
  }
}

/* Values that change blur across instead of snapping. */
.is-swap {
  filter: blur(3px);
  opacity: 0.35;
}
.stmt-who b,
.stmt-row span:last-child,
.field {
  transition: filter 150ms ease, opacity 150ms ease, background-color 200ms ease;
}

/* Firms: one highlight slides between choices. */
.firm-list {
  position: relative;
}
.firm-list button {
  position: relative;
  z-index: 1;
}
.firm-list button[aria-selected='true'] {
  background: transparent;
  border-color: transparent;
}
.firm-glider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: var(--radius-sm);
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
.firm-glider.is-ready {
  transition: transform 300ms var(--ease-out), width 300ms var(--ease-out), height 300ms var(--ease-out);
}
@media (max-width: 860px) {
  .firm-glider {
    border-radius: var(--pill);
  }
  .firm-list button[aria-selected='true'] {
    border-color: transparent;
  }
}

/* FAQ answers open smoothly where the browser supports it; elsewhere they open at once. */
:root {
  interpolate-size: allow-keywords;
}
.faq details::details-content {
  height: 0;
  overflow: clip;
  transition: height 280ms var(--ease-out), content-visibility 280ms allow-discrete;
}
.faq details[open]::details-content {
  height: auto;
}

/* Stagger: rows and logos arrive one after another when their section first appears. */
.will-reveal [data-stagger] > * {
  opacity: 0;
  transform: translateY(10px);
}
.will-reveal.in [data-stagger] > * {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms + 120ms);
}

@media (prefers-reduced-motion: reduce) {
  .thread-line::after {
    animation: none;
    opacity: 0;
  }
  .sprawl-links .link {
    transition: none;
  }
  .firm-glider.is-ready {
    transition: none;
  }
  .faq details::details-content {
    transition: none;
  }
  .will-reveal [data-stagger] > *,
  .will-reveal.in [data-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================= Whole-site templates (features, hubs, compare, switch, read, glossary, FAQ) ================= */

/* ---------- Navigation menus: a panel under the bar, origin at the top, 180ms ease-out ---------- */
.nav-links {
  align-items: center;
}
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 14px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}
.nav-trigger .ic {
  width: 14px;
  height: 14px;
  transition: transform 200ms var(--ease-out);
}
.nav-trigger[aria-expanded='true'],
.nav-trigger[aria-current='page'] {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.nav-trigger[aria-expanded='true'] .ic {
  transform: rotate(180deg);
}
@media (hover: hover) and (pointer: fine) {
  .nav-trigger:hover {
    color: var(--ink);
  }
}
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding-block: 18px 26px;
  background: color-mix(in srgb, var(--ground) 94%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
  transform-origin: top center;
  animation: menuIn 180ms var(--ease-out) both;
}
.mega[data-instant] {
  animation: none;
}
@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
}
.mega-grid {
  display: grid;
  gap: 28px;
}
.mega-grid--product {
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
}
.mega-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mega-col {
  display: grid;
  gap: 4px;
  align-content: start;
}
.mega-col .mega-h {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 4px 0 8px;
}
.mega-col a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.94rem;
  padding: 6px 0;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .mega-col a:hover {
    color: var(--ink);
  }
}
.mega-feature {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 16px 18px !important;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.mega-feature b {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.mega-feature span {
  grid-column: 1;
  color: var(--ink-3);
  font-size: 0.86rem;
}
.mega-feature .ic {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
}
.mega-feature--sm {
  margin-top: 10px;
}
.mega-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.mega-areas a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px !important;
  border-radius: var(--pill);
  border: 1px solid var(--rule);
  font-size: 0.86rem !important;
}
.mega-areas i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.nav-sheet details {
  border-bottom: 1px solid var(--rule);
}
.nav-sheet summary {
  padding: 13px 4px;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.nav-sheet summary::-webkit-details-marker {
  display: none;
}
.nav-sheet details a {
  padding-left: 18px;
  font-size: 0.98rem;
  color: var(--ink-2);
}
@media (max-width: 1100px) {
  .kbd-hint {
    display: none;
  }
}
@media (max-width: 960px) {
  .nav-links,
  .nav-signin {
    display: none;
  }
  .nav-menu {
    display: inline-grid;
  }
  .mega {
    display: none !important;
  }
}

/* ---------- Feature pages ---------- */
.hero--page .hero-h {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  max-width: 18ch;
}
.hero--page .points {
  margin: 0;
}
.hero--page .hero-side {
  gap: 22px;
  padding-top: 40px;
}
.plan-note {
  justify-self: start;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 22px;
  padding-block: 4px;
  white-space: normal;
  line-height: 1.35;
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.bento-cell {
  grid-column: span var(--span, 3);
  padding: 24px;
  display: grid;
  gap: 12px;
  align-content: start;
  border-top: 3px solid var(--c, var(--accent));
}
.bento-cell p {
  color: var(--ink-2);
  max-width: 52ch;
}
.bento-cell .ui-box {
  margin-top: 6px;
  font-size: 0.84rem;
}
@media (max-width: 960px) {
  .bento-cell {
    grid-column: span 3;
  }
}
@media (max-width: 640px) {
  .bento-cell {
    grid-column: span 6;
  }
}
.related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.related-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--sheet);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 180ms ease, transform 200ms var(--ease-out);
}
.related-link i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}
.related-link span {
  flex: 1;
}
.related-link .ic {
  color: var(--ink-3);
  transition: transform 200ms var(--ease-out), color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .related-link:hover {
    border-color: var(--rule-2);
  }
  .related-link:hover .ic {
    transform: translateX(3px);
    color: var(--ink);
  }
}

/* ---------- Hubs ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 760px) {
  .hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.hub-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  text-decoration: none;
  border-left: 3px solid var(--c, var(--accent));
}
.hub-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--sheet-2);
  color: var(--ink);
}
.hub-mark .logo {
  width: 26px;
  height: 26px;
}
.hub-mark--dot i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c, var(--accent)) 20%, transparent);
}
.hub-text {
  display: grid;
  gap: 4px;
}
.hub-text b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.hub-text span {
  color: var(--ink-2);
  font-size: 0.94rem;
}
.hub-card > .ic {
  color: var(--ink-3);
  transition: transform 200ms var(--ease-out), color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .hub-card:hover > .ic {
    transform: translateX(4px);
    color: var(--ink);
  }
}

/* ---------- Compare ---------- */
.cost {
  padding: 26px;
  display: grid;
  gap: 18px;
}
.cost-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.6fr) minmax(0, 1.6fr) minmax(150px, 0.7fr);
  gap: 18px;
  align-items: center;
}
.cost-label,
.cost-val {
  display: grid;
  gap: 2px;
}
.cost-label b,
.cost-val b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.cost-val b {
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}
.cost-label span,
.cost-val span {
  color: var(--ink-3);
  font-size: 0.82rem;
}
.cost-track {
  height: 14px;
  border-radius: var(--pill);
  background: var(--neutral-wash);
  overflow: hidden;
}
.cost-track i {
  display: block;
  height: 100%;
  border-radius: var(--pill);
  background: var(--ink-3);
  transform-origin: left;
  transform: scaleX(var(--s, 0));
  transition: transform 900ms var(--ease-out);
}
.cost-row--us .cost-track i {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.cost:not(.in) .cost-track i {
  transform: scaleX(0);
}
@media (max-width: 700px) {
  .cost-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .cost-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
.vs-table td.us {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.vs-table td.them {
  color: var(--ink-2);
}
.choose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 760px) {
  .choose {
    grid-template-columns: minmax(0, 1fr);
  }
}
.choose-card {
  padding: 24px;
  display: grid;
  gap: 14px;
  align-content: start;
  border-top: 3px solid var(--ink-3);
}
.choose-card--us {
  border-top-color: var(--accent);
}
.choose-card .points {
  margin: 0;
}

/* ---------- Switch: steps on one thread ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--m-sales));
  opacity: 0.6;
}
.step {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 32px;
}
.step-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ground);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px var(--glow);
}
.step h3 {
  font-size: 1.1rem;
}
.step p {
  color: var(--ink-2);
  font-size: 0.95rem;
}
@media (max-width: 700px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 30px;
  }
  .steps::before {
    left: 8px;
    right: auto;
    top: 8px;
    bottom: 8px;
    width: 2px;
    height: auto;
  }
  .step {
    padding-top: 0;
  }
  .step-dot {
    left: -30px;
  }
}

/* ---------- Read pages: contents beside prose ---------- */
.page-head--read {
  padding-bottom: clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--rule);
}
.read {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(32px, 4vw, 56px) clamp(56px, 7vw, 96px);
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--rule);
  display: grid;
  gap: 2px;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--ink-3);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 160ms ease;
}
.toc a.is-active,
.toc a:hover {
  color: var(--ink);
}
.toc a.is-active {
  box-shadow: -15px 0 0 -13px var(--accent);
}
@media (max-width: 900px) {
  .read {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
.prose {
  max-width: 72ch;
  color: var(--ink-2);
}
.prose h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  color: var(--ink);
  margin: 2.2em 0 0.6em;
  scroll-margin-top: 96px;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  font-size: 1.12rem;
  color: var(--ink);
  margin: 1.6em 0 0.4em;
}
.prose p,
.prose ul,
.prose ol,
.prose table,
.prose pre {
  margin: 0 0 1em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin: 0.3em 0;
}
.prose li::marker {
  color: var(--accent);
}
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}
.prose strong {
  color: var(--ink);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose th {
  color: var(--ink);
  font-weight: 600;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--sheet-2);
  color: var(--ink);
}
.prose pre {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--sheet);
  border: 1px solid var(--rule);
  overflow-x: auto;
}
.prose pre code {
  padding: 0;
  background: transparent;
  font-size: 0.84rem;
  line-height: 1.6;
}

/* ---------- Glossary and FAQ ---------- */
.filter-bar {
  position: sticky;
  top: 72px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.filter-input {
  flex: 1 1 280px;
  max-width: 420px;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--pill);
  border: 1px solid var(--rule-2);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
}
.filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.letters a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-2);
}
.letters a:hover {
  background: var(--sheet-2);
  color: var(--ink);
}
.terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 0;
}
@media (max-width: 760px) {
  .terms {
    grid-template-columns: minmax(0, 1fr);
  }
}
.term {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 140px;
}
.term dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.term dd {
  margin: 0;
  color: var(--ink-2);
}
.term dd a {
  color: var(--accent);
  white-space: nowrap;
}
.faq-groups {
  display: grid;
  gap: 40px;
}
.faq-group h2 {
  margin-bottom: 8px;
}
.faq--one {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}
[data-filter] [hidden] {
  display: none !important;
}

/* ---------- Demo page ---------- */
.demo-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.demo-facts div {
  padding: 22px 20px;
  display: grid;
  gap: 4px;
}
.demo-facts div + div {
  border-left: 1px solid var(--rule);
}
.demo-facts b {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}
.demo-facts span {
  color: var(--ink-2);
  font-size: 0.92rem;
}
@media (max-width: 760px) {
  .demo-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .demo-facts div:nth-child(3) {
    border-left: 0;
  }
  .demo-facts div:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}
.demo-loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.demo-loading .spin {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--rule-2);
  border-top-color: var(--accent);
  animation: spin 700ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mega {
    animation: none;
  }
  .cost-track i {
    transition: none;
  }
  .cost:not(.in) .cost-track i {
    transform: scaleX(var(--s, 0));
  }
  .demo-loading .spin {
    animation-duration: 2s;
  }
}

/* Footer: brand, then five link columns; Features runs in two columns. */
.foot-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 28px;
}
.foot nav[aria-label='Features'] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}
.foot nav[aria-label='Features'] h2 {
  grid-column: 1 / -1;
}
.foot-brand .hero-cta {
  margin-top: 16px;
}
@media (max-width: 1100px) {
  .foot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot nav[aria-label='Features'] {
    grid-column: 1 / -1;
  }
}
/* The open menu sits on a solid ground so the page beneath never shows through. */
.mega {
  background: var(--ground);
}

/* ---------- Feature pages: the page's own component in the hero, icon tiles below ---------- */
.hero-comp {
  min-width: 0;
}
.hero-comp > .comp {
  box-shadow: var(--shadow);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 5vw, 72px);
}
.tile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}
.tile-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
}
.tile-ic .ic {
  width: 22px;
  height: 22px;
}
.tile h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.tile p {
  color: var(--ink-2);
  max-width: 46ch;
}
@media (max-width: 760px) {
  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Product page: each chapter shows its own component ---------- */
.chapters--inline {
  display: block;
}
.chapters--inline .chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.25fr);
  grid-template-rows: auto auto 1fr;
  gap: 18px clamp(28px, 5vw, 64px);
  min-height: 0;
  padding-block: clamp(48px, 6vw, 88px);
}
.chapters--inline .chapter > h2,
.chapters--inline .chapter > .lede,
.chapters--inline .chapter > .caps {
  grid-column: 1;
}
.chapters--inline .chapter-comp {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  min-width: 0;
}
@media (max-width: 980px) {
  .chapters--inline .chapter {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .chapters--inline .chapter-comp {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ================= API reference ================= */
.api-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.api-base {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--rule-2);
  background: var(--sheet);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}
.api {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding-block: 32px clamp(56px, 7vw, 96px);
  align-items: start;
}
.api-nav {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 6px;
  scrollbar-width: thin;
}
.api-nav .filter-input {
  max-width: none;
  height: 40px;
  font-size: 0.9rem;
}
.api-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.api-nav .nav-group > span {
  display: block;
  margin: 12px 0 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.api-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.86rem;
  transition: background-color 160ms ease, color 160ms ease;
}
.api-nav a:hover,
.api-nav a.is-active {
  background: var(--sheet-2);
  color: var(--ink);
}
.m {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.m-get { background: var(--info-wash); color: var(--info); }
.m-post { background: var(--ok-wash); color: var(--ok); }
.m-patch,
.m-put { background: var(--warn-wash); color: var(--warn); }
.m-delete { background: var(--bad-wash); color: var(--bad); }
.api-body {
  min-width: 0;
  display: grid;
}
.api-group-h {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin: 40px 0 6px;
  scroll-margin-top: 90px;
}
.api-sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px 32px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 84px;
}
.api-text {
  display: grid;
  gap: 12px;
  align-content: start;
  color: var(--ink-2);
}
.api-text h2 {
  font-size: 1.5rem;
  color: var(--ink);
}
.api-text h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}
.api-text code,
.limits code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--sheet-2);
  color: var(--ink);
}
.ep-path {
  font-size: 0.95rem !important;
  background: transparent !important;
  padding: 0 !important;
}
.ep-scope {
  font-size: 0.86rem;
}
.api-code {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  position: sticky;
  top: 84px;
}
@media (max-width: 1100px) {
  .api-sec {
    grid-template-columns: minmax(0, 1fr);
  }
  .api-code {
    position: static;
  }
}
@media (max-width: 860px) {
  .api {
    grid-template-columns: minmax(0, 1fr);
  }
  .api-nav {
    position: static;
    max-height: none;
  }
  .api-nav ul ul {
    display: none;
  }
  .api-nav.is-filtering ul ul {
    display: grid;
  }
}
.params {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.params th,
.params td {
  text-align: left;
  vertical-align: top;
  padding: 9px 10px;
  border-bottom: 1px solid var(--rule);
}
.params th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.params td:first-child {
  white-space: nowrap;
}
.p-in,
.p-req,
.p-type {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
}
.p-req {
  color: var(--warn);
}
.p-type {
  margin: 0;
}
.limits {
  display: grid;
  gap: 0;
  margin: 0;
}
.limits div {
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 4px;
}
.limits dt {
  color: var(--ink);
  font-weight: 600;
}
.limits dd {
  margin: 0;
  display: grid;
  gap: 4px;
}
.limits dd b {
  color: var(--ink);
  font-weight: 500;
}
.code {
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--ground) 70%, var(--sheet));
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
}
.code-tabs {
  display: flex;
  gap: 2px;
}
.code-tabs button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.code-tabs button[aria-selected='true'] {
  background: var(--sheet-2);
  color: var(--ink);
}
.code-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  padding-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, transform 140ms var(--ease-out);
}
.code-copy:active {
  transform: scale(0.96);
}
.code-copy .ic {
  width: 14px;
  height: 14px;
}
.code-copy.is-done {
  color: var(--ok);
  border-color: var(--ok);
}
.api-base .code-copy {
  border: 0;
  padding: 0 8px;
}
.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--ink);
  tab-size: 2;
}
.code pre[data-lang-pane]:not([hidden]) {
  animation: fadeOnly 160ms ease both;
}
.j-k { color: var(--m-sales); }
.j-s { color: var(--m-money); }
.j-n { color: var(--accent); }
.j-l { color: var(--m-support); }
.events {
  display: grid;
  gap: 6px;
}
.event {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.event.is-on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--ink);
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tool-chip {
  padding: 4px 10px;
  border-radius: var(--pill);
  border: 1px solid var(--rule);
  font-size: 0.78rem;
}
.tool-chip--w {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
.tool-chip code {
  background: transparent !important;
  padding: 0 !important;
}

/* ---------- Every product component sits on its own panel, lit faintly in its area colour ---------- */
.comp {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--c, var(--accent)) 9%, transparent), transparent 60%),
    color-mix(in srgb, var(--ground) 45%, var(--sheet));
}
@media (max-width: 480px) {
  .comp {
    padding: 14px;
    border-radius: 18px;
  }
}

/* API reference on a phone: parameter tables wrap, and scroll inside themselves if still too wide. */
@media (max-width: 600px) {
  .api-text { min-width: 0; }
  .params { display: block; overflow-x: auto; }
  .params td:first-child { white-space: normal; min-width: 120px; }
  .p-in, .p-req { display: block; margin-left: 0; }
}
.api-nav .nav-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.hub-mark--icon {
  background: color-mix(in srgb, var(--c, var(--accent)) 15%, transparent);
  color: var(--c, var(--accent));
}
.hub-mark--icon .ic {
  width: 24px;
  height: 24px;
}
/* "Start again" inside a component is an icon button; its name is in the label and tooltip. */
.comp .ui-btn[aria-label="Start again"] {
  width: 32px;
  padding: 0;
  justify-content: center;
}
.tile-link {
  color: inherit;
  text-decoration: none;
}
.tile-link::after {
  content: ' \2192';
  color: var(--c, var(--accent));
}
@media (hover: hover) and (pointer: fine) {
  .tile-link:hover { color: var(--c, var(--accent)); }
}

/* ---------- What's new ---------- */
.cl {
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.cl-week {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
}
.cl-group {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.cl-group ul {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 6px;
  color: var(--ink-2);
}

/* ---------- The explainer as a corner player (home page; shown only when /api/site/flags allows) ---------- */
.film-pip {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  animation: film-pip-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes film-pip-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}
.film-pip-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--rule-2);
  background: #0a0c10;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.65);
}
.film-pip-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #0a0c10;
  cursor: pointer;
}
.film-pip-bar {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(transparent, rgba(5, 6, 8, 0.78));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.film-pip:hover .film-pip-bar,
.film-pip:focus-within .film-pip-bar,
.film-pip[data-paused] .film-pip-bar,
.film-pip[data-max] .film-pip-bar {
  opacity: 1;
}
@media (hover: none) {
  .film-pip-bar {
    opacity: 1;
  }
}
.film-pip-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.66);
  color: #eef2f7;
  cursor: pointer;
}
.film-pip-btn:hover {
  background: rgba(10, 12, 16, 0.9);
}
.film-pip-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.film-pip-btn svg {
  width: 18px;
  height: 18px;
}
.film-pip-progress {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.film-pip-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
/* Maximised: the same player, centred over a dimmed page. */
.film-pip[data-max] {
  inset: 0;
  width: auto;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 6, 8, 0.84);
  backdrop-filter: blur(6px);
  animation: none;
}
.film-pip[data-max] .film-pip-frame {
  width: min(1200px, 100%);
}
@media (max-width: 560px) {
  .film-pip:not([data-max]) {
    right: 12px;
    bottom: 12px;
    width: min(220px, 56vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  .film-pip {
    animation: none;
  }
}

/* ---------- The analytics consent bar (2026-10-13) ---------- */
.consent {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 61;
  display: grid;
  gap: 12px;
  width: min(440px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--rule-2);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  font-size: 0.94rem;
  line-height: 1.45;
}
.consent p {
  margin: 0;
  color: var(--ink-2);
}
.consent a {
  color: var(--accent);
}
.consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.foot-link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.93rem;
  color: var(--ink-2);
  width: max-content;
  cursor: pointer;
  text-align: left;
  transition: color 160ms ease;
}
.foot-link-btn:hover {
  color: var(--ink);
}
/* On a phone the bar spans the foot of the screen and the corner player sits above it. */
@media (max-width: 560px) {
  .consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
  html[data-consent-open] .film-pip:not([data-max]) {
    bottom: calc(var(--consent-h, 0px) + 24px);
  }
}

/* ---------- Founding members (2026-10-15) ---------- */
.founding-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.founding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.founding-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.founding-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}
