/*
 * Routeser marketing stylesheet.
 *
 * Every colour comes from /tokens.css, which build.mjs generates from the console's
 * own `:root` block — this file must never introduce a palette value of its own, so
 * the public site and the product stay the same shade of everything. (The only raw
 * keywords below are `black`/`transparent` inside `mask-image`, where they are alpha
 * channels rather than palette colours.)
 *
 * Component shapes mirror the console: 1px `--border` hairlines, `--radius-*` corners,
 * near-black primary actions, emerald `--success` accents, Geist at 500-600 weight with
 * tight tracking, and the console's two-layer `enterprise-shadow`.
 */

/* Geist and Geist Mono, self-hosted from @fontsource-variable (OFL-1.1) and copied
   into /fonts by build.mjs. Same family the console loads through next/font. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --shell: 1200px;
  --gutter: 1.5rem;
  --header-height: 4.25rem;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.05), 0 10px 28px -18px hsl(var(--shadow-color) / 0.28);
  --shadow-lg: 0 1px 2px hsl(var(--shadow-color) / 0.06), 0 18px 48px -24px hsl(var(--shadow-color) / 0.3);
  --hairline: 1px solid var(--border);
  --grid-line: color-mix(in oklab, var(--border) 55%, transparent);
  --tint-success: color-mix(in oklab, var(--success) 12%, transparent);
  --tint-muted: color-mix(in oklab, var(--muted) 70%, var(--background));
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  /* Section backgrounds bleed past the content column (as they do in the console),
     so the page clips horizontally instead of growing a scrollbar. */
  overflow-x: clip;
  color: var(--foreground);
  background-color: var(--background);
  /* The console's canvas: a soft emerald bloom top-right over warm paper. */
  background-image:
    radial-gradient(circle at 88% -6%, color-mix(in oklab, var(--success) 7%, transparent) 0, transparent 34rem),
    linear-gradient(to bottom, color-mix(in oklab, var(--card) 30%, transparent), transparent 26rem);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-synthesis: none;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: color-mix(in oklab, var(--success) 22%, transparent);
  color: var(--foreground);
}

:where(a, button, summary, [role='button']):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

[hidden] {
  display: none !important;
}

svg.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
}

svg.icon-sm {
  width: 0.875rem;
  height: 0.875rem;
}

svg.icon-lg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  max-width: 20ch;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.125rem);
  letter-spacing: -0.032em;
  line-height: 1.15;
}

h3 {
  font-size: 1rem;
  letter-spacing: -0.014em;
  line-height: 1.35;
}

p {
  margin: 0;
  line-height: 1.7;
}

.section-head > h2 {
  margin-top: 0.75rem;
}

.section-head > p {
  margin-top: 0.875rem;
  max-width: 46ch;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

/* Eyebrow: the console's uppercase emerald section label. */
.kicker,
.eyebrow {
  display: block;
  margin: 0;
  color: var(--success);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mono-label {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stack p {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.stack p + p {
  margin-top: 1.125rem;
}

.stack code,
p code,
li code {
  padding: 0.0625rem 0.3125rem;
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.8125em;
}

a {
  color: inherit;
}

.stack a,
.faq a,
.source-note a {
  color: var(--foreground);
  font-weight: 500;
  text-decoration-color: color-mix(in oklab, var(--foreground) 35%, transparent);
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------------- layout */

.site-header,
main,
.site-footer {
  width: min(var(--shell), 100% - calc(var(--gutter) * 2));
  margin-inline: auto;
}

.section {
  padding-block: clamp(2.75rem, 5vw, 4rem);
}

.section-tight {
  padding-block: clamp(2rem, 4vw, 3rem);
}

/* Content that follows a section head, when it is not itself a grid with margins. */
.section-body {
  margin-top: 2rem;
}

.section-body-tight {
  margin-top: 1.25rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.card-grid,
.plan-grid,
.comparison-grid,
.link-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-grid,
.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.875rem;
}

/* -------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
  /* Matches the console's translucent, blurred app header. */
  background: color-mix(in oklab, var(--background) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: var(--hairline);
  width: 100%;
  padding-inline: max(var(--gutter), calc((100% - var(--shell)) / 2));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.brand-mark svg {
  width: 1.125rem;
  height: 1.125rem;
}

.brand-text {
  line-height: 1.2;
}

.brand-text small {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: 1.5rem;
}

.site-nav a {
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  background: color-mix(in oklab, var(--foreground) 5%, transparent);
  color: var(--foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

/* Pure-CSS disclosure menu so phones keep full navigation without shipping JS. */
.nav-toggle {
  display: none;
  margin-inline-start: auto;
  position: relative;
}

.nav-toggle > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.375rem;
  padding-inline: 0.75rem;
  border: var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.nav-toggle > summary::-webkit-details-marker {
  display: none;
}

.nav-toggle[open] > summary svg {
  transform: rotate(180deg);
}

.nav-toggle > summary svg {
  transition: transform 0.15s ease;
}

.nav-panel {
  position: absolute;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 0.125rem;
  width: max(14rem, 60vw);
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.nav-panel a {
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-panel a:hover {
  background: var(--muted);
}

.nav-panel hr {
  height: 1px;
  margin: 0.375rem 0;
  border: 0;
  background: var(--border);
}

/* ------------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding-inline: 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.button.sm {
  min-height: 2.375rem;
  padding-inline: 0.875rem;
  font-size: 0.8125rem;
}

.button.primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.button.primary:hover {
  background: color-mix(in oklab, var(--primary) 90%, var(--background));
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.button.secondary:hover {
  border-color: color-mix(in oklab, var(--foreground) 15%, transparent);
  background: color-mix(in oklab, var(--foreground) 5%, var(--card));
}

.button.ghost {
  background: transparent;
  color: var(--muted-foreground);
  box-shadow: none;
}

.button.ghost:hover {
  background: color-mix(in oklab, var(--foreground) 5%, transparent);
  color: var(--foreground);
}

/* On the near-black CTA panel the roles invert: paper button on dark ground. */
.button.light {
  background: var(--card);
  color: var(--foreground);
}

.button.light:hover {
  background: color-mix(in oklab, var(--card) 92%, var(--success));
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link svg {
  transition: transform 0.15s ease;
}

.text-link:hover svg {
  transform: translateX(2px);
}

/* -------------------------------------------------- badges, chips, and tiles */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.badge.success {
  background: var(--tint-success);
  color: var(--success);
}

.badge.warning {
  background: color-mix(in oklab, var(--warning) 15%, transparent);
  color: var(--warning-foreground);
}

.badge .dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: currentColor;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--tint-success);
  color: var(--success);
}

.icon-tile.neutral {
  border: var(--hairline);
  background: var(--muted);
  color: color-mix(in oklab, var(--foreground) 70%, transparent);
}

.field-card {
  overflow: hidden;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.field-card > .card-head {
  padding: 0.75rem 1.125rem;
  border-bottom: var(--hairline);
}

.field-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.5rem;
}

.field-card > .field-list {
  padding: 1.125rem;
}

.field-list code {
  padding: 0.5rem 0.6875rem;
  border: var(--hairline);
  border-radius: var(--radius-md);
  background: var(--tint-muted);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  /* Top-aligned: the headline must stay high on the page even though the code
     panel beside it is taller. */
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.hero::before {
  content: '';
  position: absolute;
  inset: -2rem -50vw 0;
  z-index: -1;
  pointer-events: none;
  /* The console sign-in screen's masked 48px grid. */
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 65% at 45% 35%, black 10%, transparent 72%);
}

.hero-narrow {
  grid-template-columns: minmax(0, 1fr);
  max-width: 52rem;
}

.hero .eyebrow {
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1.125rem;
}

.hero-copy {
  max-width: 44ch;
  margin-bottom: 1.75rem;
  color: var(--muted-foreground);
  font-size: clamp(1rem, 1.2vw, 1.0625rem);
  line-height: 1.65;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
}

.hero-note svg {
  color: var(--success);
}

/* ---------------------------------------------------------------- code cards */

.hero-visual {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.code-card {
  min-width: 0;
  overflow: hidden;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.code-card + .code-card {
  margin-top: 1rem;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-bottom: var(--hairline);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 500;
}

.code-bar .file {
  font-family: var(--font-mono);
}

.code-bar > :last-child {
  margin-inline-start: auto;
}

.code-card pre {
  margin: 0;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  line-height: 1.75;
  tab-size: 2;
}

.code-card pre code {
  font: inherit;
}

/* Restrained highlighting: emerald for extracted values, muted for structure —
   the same read the console gives result data. */
.tok-key {
  color: color-mix(in oklab, var(--foreground) 72%, var(--background));
}

.tok-str {
  color: var(--success);
}

.tok-dim {
  color: var(--muted-foreground);
}

.split-code {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

/* --------------------------------------------------------- capability strip */

.signal-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.signal-row > div {
  padding: 1rem 1.125rem;
  border-inline-end: var(--hairline);
}

.signal-row > div:last-child {
  border-inline-end: 0;
}

.signal-row strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------- cards */

.feature-card,
.plan-card,
.comparison-grid article,
.link-card {
  padding: 1.375rem;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.feature-card h3,
.link-card h3 {
  margin-top: 1rem;
}

.feature-card > .card-head {
  align-items: flex-start;
}

.feature-card p,
.link-card p,
.comparison-grid p {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-card:hover {
  border-color: color-mix(in oklab, var(--success) 35%, var(--border));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.link-card .text-link {
  margin-top: 1.125rem;
}

.comparison-grid article > h3 {
  margin-top: 0.75rem;
}

.comparison-grid p {
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------- plans */

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Out of flow so every plan's price, allowance, and feature rows stay on one baseline. */
.plan-card > .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.plan-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 0.375rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.plan-price span {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-allowance {
  margin-top: 0.5rem;
  padding-block: 0.625rem;
  border-block: var(--hairline);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
}

.plan-card ul {
  margin: 0.875rem 0 1.25rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.plan-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.plan-card li svg {
  margin-top: 0.1875rem;
  color: var(--success);
}

.plan-card .text-link,
.plan-card .button {
  margin-top: auto;
}

/* Featured plan: the console's command-center treatment — emerald edge and wash,
   never a different hue. */
.plan-card.featured {
  border-color: color-mix(in oklab, var(--success) 30%, var(--border));
  background-image: linear-gradient(140deg, transparent 35%, color-mix(in oklab, var(--success) 7%, transparent));
  box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------- steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
}

.steps li {
  position: relative;
  padding: 1.25rem;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
  counter-increment: process;
  box-shadow: var(--shadow-sm);
}

.steps li::before {
  content: '0' counter(process);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.875rem;
  border-radius: 999px;
  background: var(--tint-success);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* -------------------------------------------------------------------- panels */

.source-note,
.demo-callout {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: var(--hairline);
  border-radius: var(--radius-2xl);
  background: var(--tint-muted);
}

.demo-callout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.demo-callout p {
  max-width: 52ch;
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.demo-callout h2 {
  margin-top: 0.75rem;
}

.source-note h2 {
  font-size: 1.0625rem;
}

.source-note p {
  max-width: 88ch;
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.assurance-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.assurance-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.assurance-list strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.assurance-list span {
  display: block;
  margin-top: 0.125rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Informational strip — the console's warning tint, used for the "no upload" notice. */
.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-block: 1.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid color-mix(in oklab, var(--warning) 35%, transparent);
  border-radius: var(--radius-xl);
  background: color-mix(in oklab, var(--warning) 10%, transparent);
  font-size: 0.8125rem;
}

.demo-notice svg {
  margin-top: 0.125rem;
  color: var(--warning-foreground);
}

.demo-notice strong {
  font-weight: 600;
}

.demo-notice span {
  color: var(--muted-foreground);
}

/* ------------------------------------------------------------ fixed samples */

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.sample-paper,
.result-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.sample-head,
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
  border-bottom: var(--hairline);
}

.sample-paper > .sample-body {
  padding: 1.125rem;
}

.sample-type {
  margin-bottom: 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.sample-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 0.75rem;
  padding-block: 0.75rem;
  border-bottom: var(--hairline);
  font-size: 0.8125rem;
}

.sample-row:last-child {
  border-bottom: 0;
}

.sample-row span {
  color: var(--muted-foreground);
}

.sample-row strong {
  font-weight: 600;
}

.result-panel > .result-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem;
}

.result-explainer,
.demo-status {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.demo-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.25rem;
}

.demo-status::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--muted-foreground);
}

.result-panel pre {
  width: 100%;
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  border: var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--tint-muted);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  line-height: 1.7;
}

/* -------------------------------------------------------------------- tables */

/* Only the intro column is measure-limited; the table below uses the full width. */
.subprocessors > div:first-child {
  max-width: 46rem;
}

.subprocessors p {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.table-scroll {
  margin-top: 1.75rem;
  overflow-x: auto;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.subprocessor-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.subprocessor-table th,
.subprocessor-table td {
  padding: 0.875rem 1.125rem;
  text-align: left;
  vertical-align: top;
  border-bottom: var(--hairline);
}

.subprocessor-table thead th {
  background: color-mix(in oklab, var(--muted) 55%, var(--card));
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subprocessor-table tbody th {
  color: var(--foreground);
  font-weight: 600;
  white-space: nowrap;
}

.subprocessor-table td {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.subprocessor-table tbody tr:last-child th,
.subprocessor-table tbody tr:last-child td {
  border-bottom: 0;
}

.subprocessor-pending {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------------- faq */

.faq .section-head {
  margin-bottom: 1.75rem;
}

.faq-list {
  overflow: hidden;
  border: var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.faq details + details {
  border-top: var(--hairline);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  background: color-mix(in oklab, var(--muted) 45%, transparent);
}

.faq summary svg {
  color: var(--muted-foreground);
  transition: transform 0.15s ease;
}

.faq details[open] summary svg {
  transform: rotate(180deg);
}

.faq details p {
  max-width: 84ch;
  padding: 0 1.25rem 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ----------------------------------------------------------------- final cta */

.final-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  margin-block: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-3xl);
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-lg);
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 88% 6%, color-mix(in oklab, var(--success) 30%, transparent) 0, transparent 62%);
}

.final-cta > * {
  position: relative;
}

.final-cta h2 {
  margin-top: 0.75rem;
}

.final-cta p {
  max-width: 46ch;
  margin-top: 0.625rem;
  color: color-mix(in oklab, var(--primary-foreground) 72%, var(--primary));
  font-size: 0.9375rem;
}

.final-cta .kicker {
  color: var(--success);
}

/* -------------------------------------------------------------------- footer */

.site-footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: var(--hairline);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-grid p {
  max-width: 34ch;
  margin-top: 0.875rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.footer-col h2 {
  margin-bottom: 0.875rem;
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--foreground);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: var(--hairline);
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .hero,
  .split-code {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1,
  .hero-copy {
    max-width: 32ch;
  }

  .hero-copy {
    max-width: 56ch;
  }

  .plan-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --gutter: 1rem;
  }

  .site-nav,
  .header-actions {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .split,
  .card-grid,
  .comparison-grid,
  .trust-grid,
  .link-grid,
  .demo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .signal-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-row > div:nth-child(2n) {
    border-inline-end: 0;
  }

  .signal-row > div:nth-child(-n + 2) {
    border-bottom: var(--hairline);
  }

  .demo-callout,
  .final-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2rem, 9vw, 2.5rem);
  }

  .plan-grid,
  .steps,
  .footer-grid,
  .signal-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .signal-row > div {
    border-inline-end: 0;
    border-bottom: var(--hairline);
  }

  .signal-row > div:last-child {
    border-bottom: 0;
  }

  .actions {
    width: 100%;
  }

  .actions .button {
    flex: 1 1 12rem;
  }

  .brand-text small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .button:hover,
  .link-card:hover,
  .text-link:hover svg {
    transform: none;
  }
}
