/* ==========================================================================
   WP Brain — Paper design system
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-stretch: 100%;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ink: #0b1220;
  --body: #5b6577;
  --muted: #667085;
  --bg: #ffffff;
  --bg-soft: #f8f9fb;
  --bg-tint: #eef2ff;
  --border: #e8eaf0;
  --border-strong: #d5d9e3;

  --indigo: #4f46e5;
  --indigo-hover: #4338ca;
  --indigo-soft: #eef2ff;
  --indigo-ink: #3730a3;
  --on-primary: #ffffff;

  --yellow: #ffd12e;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow: 0 18px 44px -20px rgba(11, 18, 32, 0.25);
  --shadow-lg: 0 32px 80px -32px rgba(11, 18, 32, 0.35);

  --container: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

[data-theme="dark"] {
  --ink: #f2f4f8;
  --body: #aab3c2;
  --muted: #8a94a6;
  --bg: #0a0e17;
  --bg-soft: #0f1420;
  --bg-tint: #151c2e;
  --border: #1e2636;
  --border-strong: #2a3446;

  --indigo: #818cf8;
  --indigo-hover: #a5b4fc;
  --indigo-soft: #171f36;
  --indigo-ink: #c7d2fe;
  --on-primary: #0b1220;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 32px 80px -32px rgba(0, 0, 0, 0.85);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  overflow-x: clip;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--indigo);
  color: #fff;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.16;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 3px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -0.18em;
}

.icon--brand {
  vertical-align: -0.15em;
}

.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;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

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

.container--narrow {
  max-width: 860px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--indigo-ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.lead {
  max-width: 40rem;
  color: var(--body);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
}

.small {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--indigo);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--indigo-hover);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--bg);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 13px;
  font-size: 0.85rem;
}

.btn .icon {
  width: 1.05em;
  height: 1.05em;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--body);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
  color: var(--ink);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--indigo-ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.15s var(--ease);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: border-color 0.2s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 25px;
}

.brand .logo-white {
  display: none;
}

[data-theme="dark"] .brand .logo-ink {
  display: none;
}

[data-theme="dark"] .brand .logo-white {
  display: block;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.primary-nav a {
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.primary-nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.primary-nav a[aria-current] {
  color: var(--ink);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.header-actions .btn {
  white-space: nowrap;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.nav-toggle {
  display: none;
}

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  right: 0;
  left: 0;
  z-index: 55;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 12px 24px 24px;
  box-shadow: 0 24px 40px -28px rgba(11, 18, 32, 0.4);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  display: block;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a[aria-current] {
  color: var(--ink);
}

.mobile-nav .btn {
  margin-top: 16px;
  width: 100%;
}

.mobile-nav a.btn {
  padding: 12px 18px;
  border-bottom: 0;
  color: var(--on-primary);
  font-size: 0.95rem;
  text-align: center;
}

.mobile-nav a.btn:hover {
  color: var(--on-primary);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 112px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 45%;
  height: 90%;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.09), transparent 72%);
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(closest-side, rgba(129, 140, 248, 0.14), transparent 72%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 4.6vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero .lead {
  margin-top: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 34px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-facts strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.hero-glow {
  position: absolute;
  inset: 8% 5% 12% 12%;
  border-radius: 32px;
  background: linear-gradient(145deg, var(--indigo-soft), var(--bg-soft));
  border: 1px solid var(--border);
}

.hero-frame {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.hero-frame img {
  display: block;
  width: 100%;
}

.hero-frame--main {
  z-index: 3;
  top: 0;
  right: 0;
  width: 88%;
}

.hero-frame--side {
  z-index: 4;
  bottom: 12px;
  left: 0;
  width: 48%;
  transform: rotate(-1.5deg);
}

.hero-caption {
  position: absolute;
  right: 0;
  bottom: -2px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.hero-caption .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--indigo);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(64px, 8vw, 104px) 0;
  border-top: 1px solid var(--border);
}

.section--soft {
  background: var(--bg-soft);
}

.section--flush {
  border-top: 0;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  letter-spacing: -0.035em;
}

.section-head .lead {
  margin-top: 14px;
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.feature {
  padding: 24px 22px 26px;
  background: var(--bg);
  transition: background 0.15s var(--ease);
}

.feature:hover {
  background: var(--bg-soft);
}

.section--soft .feature {
  background: var(--bg);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: var(--indigo-soft);
  color: var(--indigo-ink);
}

.feature-icon .icon {
  width: 19px;
  height: 19px;
}

.feature h3 {
  margin-bottom: 5px;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.feature p {
  margin: 0;
  color: var(--body);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Target matrix */

.target-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 104px;
  padding: 18px 8px;
  background: var(--bg);
  color: var(--body);
  font-size: 0.8rem;
  text-align: center;
}

.target .icon {
  width: 24px;
  height: 24px;
  color: var(--ink);
}

/* Alternating feature rows */

.feature-rows {
  display: grid;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--border);
}

.feature-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.feature-row:last-child {
  padding-bottom: 0;
}

.feature-row--flip .feature-media {
  order: 2;
}

.feature-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  letter-spacing: -0.03em;
}

.feature-copy p {
  margin-bottom: 22px;
  color: var(--body);
  font-size: 1rem;
  line-height: 1.65;
}

.feature-media {
  position: relative;
}

.feature-media::before {
  content: "";
  position: absolute;
  inset: 7% -3% -5% 7%;
  z-index: 0;
  border-radius: 18px;
  background: var(--indigo-soft);
}

.shot-frame {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.shot-frame img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

/* Checklist */

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-grid li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.5;
}

.check-grid .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--indigo);
}

/* CTA */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--indigo-soft), var(--bg-soft) 65%);
}

.cta-band h2 {
  max-width: 22ch;
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  letter-spacing: -0.03em;
}

.cta-band p {
  max-width: 42ch;
  color: var(--body);
  font-size: 0.95rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   Page header / docs index
   -------------------------------------------------------------------------- */

.page-hero {
  padding: clamp(48px, 7vw, 84px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  max-width: 18ch;
  font-size: clamp(2.2rem, 4.4vw, 3.35rem);
  letter-spacing: -0.04em;
}

.page-hero .lead {
  margin-top: 16px;
}

.docs-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(32px, 4vw, 44px);
}

.docs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease),
    transform 0.15s var(--ease);
}

.docs-card:hover {
  transform: translateY(-2px);
  border-color: var(--indigo);
  background: var(--bg-soft);
}

.docs-card .num {
  color: var(--indigo);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.docs-card .card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  padding-right: 28px;
}

.docs-card h2 {
  margin: 2px 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.docs-card p {
  max-width: 40ch;
  color: var(--body);
  font-size: 0.87rem;
  line-height: 1.55;
}

.docs-card .card-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--muted);
  transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}

.docs-card:hover .card-arrow {
  transform: translateX(3px);
  color: var(--indigo-ink);
}

.docs-card .badge {
  align-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo-ink);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-callout {
  margin-top: clamp(32px, 4vw, 44px);
}

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

.docs-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 196px;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(64px, 8vw, 104px);
}

.docs-layout > * {
  min-width: 0;
}

.docs-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 0.86rem;
}

.docs-nav-toggle {
  display: none;
}

.docs-nav-group {
  margin-bottom: 22px;
}

.docs-nav-group p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-nav ul {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav a {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  color: var(--body);
  font-size: 0.85rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.docs-nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.docs-nav a[aria-current="page"] {
  border-left-color: var(--indigo);
  background: var(--indigo-soft);
  color: var(--indigo-ink);
  font-weight: 600;
}

.docs-nav-help {
  display: block;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-decoration: none;
}

.docs-nav-help a {
  color: var(--indigo-ink);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.76rem;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.breadcrumbs .sep {
  opacity: 0.5;
}

.page-head {
  margin-bottom: clamp(28px, 4vw, 40px);
  padding-bottom: clamp(24px, 3vw, 32px);
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -0.04em;
}

.page-head .lead {
  margin: 0;
  font-size: 1.03rem;
}

/* Table of contents */

.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 0.78rem;
}

.toc > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ul {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  list-style: none;
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.toc a:hover,
.toc a.is-active {
  border-left-color: var(--indigo);
  color: var(--ink);
}

.toc .toc-h3 a {
  padding-left: 22px;
  font-size: 0.75rem;
}

/* Pager */

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(48px, 6vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.pager a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.pager a:hover {
  border-color: var(--indigo);
  background: var(--bg-soft);
}

.pager span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pager strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.pager .pager-next {
  text-align: right;
}

.pager > :only-child {
  grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Prose
   -------------------------------------------------------------------------- */

.prose {
  min-width: 0;
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.72;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose p {
  margin: 0 0 1.15em;
}

.prose h2 {
  margin: 2.1em 0 0.55em;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.prose h3 {
  margin: 1.9em 0 0.45em;
  font-size: 1.26rem;
  letter-spacing: -0.02em;
}

.prose h4 {
  margin: 1.7em 0 0.35em;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 22px;
}

.prose li {
  margin: 0.3em 0;
  padding-left: 3px;
}

.prose li::marker {
  color: var(--indigo);
}

.prose strong,
.prose b {
  color: var(--ink);
  font-weight: 650;
}

.prose em {
  color: var(--ink);
}

.prose a {
  color: var(--indigo-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose code {
  padding: 0.12em 0.38em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.84em;
  white-space: nowrap;
}

.prose pre {
  margin: 1.5em 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1em;
  white-space: pre;
}

.prose .table-wrap {
  margin: 1.6em 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.prose table {
  width: 100%;
  min-width: 520px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.4;
}

.prose caption {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.prose thead th {
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}

.prose thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 31%;
  background: var(--bg-soft);
  text-align: left;
  box-shadow: 1px 0 0 var(--border);
}

.prose thead th:nth-child(2) {
  width: 19%;
}

.prose thead th:nth-child(3) {
  width: 18%;
}

.prose thead th:nth-child(4) {
  width: 16%;
}

.prose thead th:nth-child(5) {
  width: 16%;
}

.prose tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg);
  color: var(--ink);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  box-shadow: 1px 0 0 var(--border);
}

.prose tbody td {
  text-align: center;
}

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

.prose tbody tr:hover {
  background: var(--bg-soft);
}

.prose tbody tr:hover th {
  background: var(--bg-soft);
}

.matrix-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
}

.matrix-yes .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

.matrix-no {
  color: var(--muted);
  font-weight: 500;
  opacity: 0.7;
}

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--indigo);
  color: var(--ink);
  font-size: 1.06rem;
  font-style: italic;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
}

.prose-figure {
  margin: 1.6em 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
}

.prose-figure img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 7px;
  background: #fff;
}

.prose-figure figcaption {
  margin: 9px 6px 2px;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.5;
  text-align: center;
}

.prose ol.steps {
  margin: 1.2em 0 1.6em;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.prose ol.steps > li {
  position: relative;
  margin: 0 0 1.4em;
  padding-left: 42px;
  counter-increment: step;
}

.prose ol.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--indigo) 26%, var(--border));
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo-ink);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.prose ol.steps > li > .prose-figure:first-child {
  margin-top: 0.8em;
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 1.6em 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--indigo) 22%, var(--border));
  border-radius: 10px;
  background: var(--indigo-soft);
  color: var(--body);
  font-size: 0.91rem;
  line-height: 1.6;
}

.callout .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--indigo-ink);
}

.callout p {
  margin: 0;
}

.callout strong {
  color: var(--indigo-ink);
}

.callout-title {
  margin-bottom: 2px !important;
  color: var(--indigo-ink);
  font-weight: 650;
}

.ui-path {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.84em;
  font-weight: 600;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Support
   -------------------------------------------------------------------------- */

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 9vw, 112px);
}

.contact-card {
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}

.contact-card .eyebrow {
  display: flex;
  width: 100%;
  margin-bottom: 12px;
}

.contact-card .callout {
  margin: 22px 0 0;
  background: var(--bg);
}

.email-link {
  display: inline-block;
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.15s var(--ease);
}

.email-link:hover {
  color: var(--indigo-ink);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.copy-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-note {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.65;
}

.support-meta {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.support-meta li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--body);
  font-size: 0.88rem;
}

.support-meta .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--indigo);
}

.support-meta a,
.contact-note a {
  color: var(--indigo-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-side h2 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.doc-link-list {
  display: grid;
  gap: 1px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.doc-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
  color: var(--body);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.doc-link-list a:hover {
  color: var(--indigo-ink);
}

.doc-link-list .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.support-side .callout {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-head {
  padding: clamp(56px, 7vw, 92px) 0 clamp(32px, 4vw, 44px);
}

.about-head h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.045em;
}

.about-head .lead {
  margin-top: 18px;
}

.about-body {
  padding-bottom: clamp(64px, 8vw, 104px);
}

.about-prose {
  max-width: 68ch;
}

.about-prose > p:first-of-type {
  color: var(--ink);
  font-size: clamp(1.12rem, 1.7vw, 1.28rem);
  line-height: 1.6;
}

.prose .pullquote {
  max-width: 26ch;
  margin: clamp(36px, 5vw, 56px) 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.prose .pullquote::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--indigo);
}

.about-cta {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: clamp(64px, 10vw, 140px) 0;
  text-align: center;
}

.error-page .code {
  color: var(--indigo);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.error-page h1 {
  margin: 14px 0 14px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
}

.error-page p {
  max-width: 36rem;
  margin-inline: auto;
  color: var(--body);
}

.error-page .hero-actions {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: clamp(48px, 6vw, 72px) 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.footer-brand p {
  max-width: 30ch;
  margin: 16px 0 0;
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-brand .brand img {
  height: 24px;
}

.site-footer .footer-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-links span {
  color: var(--body);
  font-size: 0.86rem;
  line-height: 1.45;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }

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

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

@media (max-width: 980px) {
  .primary-nav,
  .header-actions .btn {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 15ch;
  }

  .hero-visual {
    min-height: 380px;
    max-width: 620px;
    width: 100%;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature-row--flip .feature-media {
    order: 0;
  }

  .feature-row .feature-media {
    max-width: 640px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .support-layout {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .docs-nav {
    position: static;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
    padding: 6px;
  }

  .docs-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
  }

  .docs-nav-toggle .icon {
    width: 16px;
    height: 16px;
    transition: transform 0.15s var(--ease);
  }

  .docs-nav.is-open .docs-nav-toggle .icon {
    transform: rotate(180deg);
  }

  .docs-nav-body {
    display: none;
    padding: 4px 4px 8px;
  }

  .docs-nav.is-open .docs-nav-body {
    display: block;
  }

  .docs-nav-group:last-of-type {
    margin-bottom: 8px;
  }

  .docs-nav-help {
    margin: 10px 6px 4px;
  }
}

@media (max-width: 820px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    padding-inline: 18px;
  }

  .header-inner {
    gap: 12px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10vw, 3rem);
  }

  .hero-visual {
    min-height: 0;
  }

  .hero-glow,
  .hero-frame--side,
  .hero-caption {
    display: none;
  }

  .hero-frame--main {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
  }

  .hero-facts {
    gap: 14px 24px;
  }

  .docs-index-grid {
    grid-template-columns: 1fr;
  }

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

  .target {
    min-height: 92px;
    padding: 14px 6px;
    font-size: 0.74rem;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager .pager-next {
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .prose ol.steps > li {
    padding-left: 38px;
  }

  .prose table {
    min-width: 0;
    font-size: 0.8rem;
  }

  .prose .table-wrap {
    overflow-x: visible;
  }

  .prose th,
  .prose td {
    padding: 7px 6px;
  }

  .prose thead th {
    font-size: 0.66rem;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: normal;
  }

  .prose thead th:first-child {
    position: static;
    width: 34%;
    box-shadow: none;
  }

  .prose thead th:nth-child(2) {
    width: 18%;
  }

  .prose thead th:nth-child(3) {
    width: 18%;
  }

  .prose thead th:nth-child(4) {
    width: 15%;
  }

  .prose thead th:nth-child(5) {
    width: 15%;
  }

  .prose tbody th {
    position: static;
    white-space: normal;
    font-size: 0.8rem;
    line-height: 1.35;
    box-shadow: none;
  }

  .prose tbody tr:hover th {
    background: transparent;
  }

  .matrix-yes .icon {
    width: 15px;
    height: 15px;
  }

  .about-head h1 {
    max-width: none;
  }
}

@media (max-width: 440px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 0;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion & print
   -------------------------------------------------------------------------- */

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

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

@media print {
  .site-header,
  .site-footer,
  .docs-nav,
  .toc,
  .pager,
  .skip-link,
  .mobile-nav,
  .theme-toggle,
  .hero-actions,
  .cta-band {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .docs-layout {
    display: block;
    padding: 0;
  }

  .prose {
    max-width: none;
  }

  .prose a {
    color: #000;
  }

  .prose-figure {
    break-inside: avoid;
  }

  .prose .table-wrap {
    overflow: visible;
  }

  .prose table {
    min-width: 0;
    font-size: 10pt;
  }
}
