:root {
  --bg: #f7f7f5;
  --bg-elev: #ffffff;
  --bg-muted: #f1f2f1;
  --bg-code: #161b20;
  --ink: #161a1d;
  --ink-muted: #5a646e;
  --ink-faint: #66707a;
  --line: #d9dedd;
  --line-strong: #bec7c8;
  --teal: #0b6a72;
  --teal-dark: #084f56;
  --teal-soft: #edf4f4;
  --amber: #8a5a14;
  --amber-soft: #faf6ef;
  --red: #a93a2d;
  --red-soft: #fbf2f1;
  --green: #1f6a45;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: none;
  --max: 1180px;
  --font: "Manrope", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "DM Mono", "Cascadia Code", Consolas, monospace;
}
html[data-theme="dark"] {
  --bg: #121619;
  --bg-elev: #181d21;
  --bg-muted: #171c20;
  --bg-code: #0f1317;
  --ink: #e7ebee;
  --ink-muted: #aab4bd;
  --ink-faint: #8f99a3;
  --line: #2a3238;
  --line-strong: #3a454d;
  --teal: #5fb7bf;
  --teal-dark: #8fd0d6;
  --teal-soft: #162628;
  --amber: #d7b06a;
  --amber-soft: #211c14;
  --red: #e07a6d;
  --red-soft: #241715;
  --green: #7bc89d;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
code, pre, kbd { font-family: var(--mono); }
pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--bg-code);
  color: #dbe3ea;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.75;
  border: 1px solid color-mix(in srgb, var(--line-strong) 40%, #000);
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
code {
  font-size: 0.88em;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--teal-dark);
}
pre .kw { color: #d7c08a; }
pre .fn { color: #9fd3c7; }
pre .str { color: #b7d4a0; }
pre .cm { color: #7f8a93; font-style: italic; }
pre .num { color: #a9c7e8; }
pre .op { color: #c9d5e1; }
pre .ty { color: #e0c68a; }

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; width: auto; height: auto; padding: 10px 14px; background: var(--teal); color: #fff; border-radius: 3px; z-index: 1000; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,1px,1px,0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.container { width: min(100% - 48px, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 48px, 860px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(100% - 48px, var(--max)); margin-inline: auto;
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 30px; display: block;
}
html[data-theme="dark"] .brand-mark {
  content: url("/assets/logo-white.svg");
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 8px 10px; font: inherit; color: var(--ink); cursor: pointer; font-size: 0.88rem;
}
.main-nav { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.main-nav a.nav-pill {
  margin-left: 8px;
  padding: 8px 14px; border: 1px solid var(--line-strong);
  border-radius: 3px; background: transparent;
}
.main-nav a.nav-pill:hover { border-color: var(--ink); color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 3px; font-weight: 600; font-size: 0.9rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  font-family: var(--font);
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

/* Hero */
.hero {
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px; align-items: end;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 20px;
  font-family: var(--mono);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--ink-muted); }
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.14; letter-spacing: -0.03em; font-weight: 700;
  max-width: 760px;
}
.hero h1 .accent { color: var(--teal); }
.hero-lead {
  margin: 0 0 30px;
  font-size: 1.02rem; line-height: 1.85; color: var(--ink-muted);
  max-width: 660px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.hero-meta {
  display: flex; gap: 10px 20px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--ink-faint); font-family: var(--mono);
  letter-spacing: 0.01em;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .dot { width: 3px; height: 3px; background: #aab2b8; border-radius: 50%; }
.hero-code { position: relative; }
.code-window {
  background: var(--bg-code); border-radius: 4px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 40%, #000); box-shadow: none;
}
.code-window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg-code) 85%, #000); border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 35%, #000);
}
.code-dot { width: 9px; height: 9px; border-radius: 50%; background: #55606a; }
.code-window-title { margin-left: 8px; font-size: 11px; color: #93a0aa; font-family: var(--mono); letter-spacing: 0.02em; }
.code-window pre { border: 0; border-radius: 0; padding: 20px 22px; font-size: 12.5px; }
.code-caption { margin-top: 12px; font-size: 0.8rem; color: var(--ink-faint); padding-left: 2px; line-height: 1.7; }

/* Sections */
.section { padding: 64px 0; }
.section-muted { background: var(--bg-muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-header { margin-bottom: 36px; max-width: 720px; }
.section-header.centered { margin-inline: auto; text-align: center; }
.section-header.centered .eyebrow { justify-content: center; }
.section-header.centered .eyebrow::before { display: none; }
.section-header h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  line-height: 1.22; letter-spacing: -0.02em;
}
.section-header p { margin: 0; color: var(--ink-muted); font-size: 1rem; line-height: 1.8; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.feature-icon {
  width: 36px; height: 36px; border-radius: 3px;
  background: var(--bg-muted); color: var(--ink);
  display: grid; place-items: center; margin-bottom: 16px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  border: 1px solid var(--line);
}
.feature-card h3 { margin: 0 0 8px; font-size: 0.98rem; letter-spacing: -0.01em; }
.feature-card p { margin: 0; color: var(--ink-muted); font-size: 0.9rem; line-height: 1.75; }

/* Two col */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* Callouts */
.callout {
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid;
  margin: 20px 0; font-size: 0.93rem; line-height: 1.75;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }
.callout-title { font-weight: 700; margin-bottom: 6px; display: block; font-size: 0.92rem; }
.callout-warn { background: var(--amber-soft); border-color: #eadfca; color: #6a4a14; }
.callout-warn .callout-title { color: #6a4a14; }
.callout-danger { background: var(--red-soft); border-color: #ead6d3; color: #7a2e25; }
.callout-danger .callout-title { color: #7a2e25; }
.callout-info { background: var(--teal-soft); border-color: #d3e3e4; color: #24565b; }
.callout-info .callout-title { color: #1f555a; }
.callout-note { background: var(--bg-muted); border-color: var(--line); color: var(--ink-muted); }

/* Install block */
.install-block {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 14px 20px; max-width: 520px;
}
.install-block code { background: none; padding: 0; font-size: 0.92rem; color: var(--ink); }
.copy-btn {
  background: transparent; border: 1px solid var(--line); border-radius: 3px;
  padding: 7px 12px; font-size: 0.78rem; font-family: var(--font); font-weight: 600;
  color: var(--ink-muted); cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.copy-btn.copied { color: var(--green); border-color: #bfd8ca; background: #f3f8f5; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.table-wrap:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
pre:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--bg-muted); font-weight: 600; color: var(--ink); font-size: 0.82rem; }
tr:last-child td { border-bottom: 0; }
td code { font-size: 0.83em; }

/* List checks */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { padding-left: 24px; position: relative; color: var(--ink-muted); line-height: 1.75; }
.check-list li::before {
  content: "—"; position: absolute; left: 0; top: 0;
  color: var(--ink-faint); font-family: var(--mono); font-size: 0.9rem;
}

/* Docs layout */
.docs-hero {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.docs-hero h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; }
.docs-hero p { margin: 0; color: var(--ink-muted); max-width: 720px; font-size: 1rem; line-height: 1.8; }
.docs-layout {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 44px;
  padding: 36px 0 64px; align-items: start;
}
.docs-sidebar { position: sticky; top: 84px; padding: 4px 0; }
.docs-sidebar-group { margin-bottom: 22px; }
.docs-sidebar-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint); margin-bottom: 8px; padding: 0 10px; font-family: var(--mono);
}
.docs-sidebar a {
  display: block; padding: 7px 10px; border-radius: 3px;
  color: var(--ink-muted); text-decoration: none; font-size: 0.88rem;
}
.docs-sidebar a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.docs-sidebar a.active { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); font-weight: 600; }
.docs-content { min-width: 0; max-width: 860px; }
.docs-content h2 {
  margin: 42px 0 14px; font-size: 1.45rem; letter-spacing: -0.01em;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.docs-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.docs-content h3 { margin: 28px 0 10px; font-size: 1.05rem; }
.docs-content p { margin: 0 0 16px; color: var(--ink-muted); line-height: 1.85; }
.docs-content ul, .docs-content ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-muted); }
.docs-content li { margin-bottom: 6px; line-height: 1.75; }
.docs-content pre { margin: 0 0 20px; }
.docs-content .table-wrap { margin: 0 0 20px; }
.docs-content .callout { margin: 20px 0; }
.docs-content > :last-child { margin-bottom: 0; }
.docs-lead { font-size: 1rem; color: var(--ink-muted); margin-bottom: 24px; line-height: 1.85; }

/* API */
.api-sig {
  background: var(--bg-muted); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 0 16px; overflow-x: auto;
}
.api-sig code { background: none; padding: 0; font-size: 0.86rem; color: var(--ink); line-height: 1.8; }
.api-item { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.api-item:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.api-name { font-family: var(--mono); font-size: 0.96rem; color: var(--teal-dark); font-weight: 500; margin: 0 0 8px; }

/* Footer */
.site-footer {
  padding: 36px 0 44px; border-top: 1px solid var(--line); background: var(--bg-muted);
  color: var(--ink-muted); font-size: 0.88rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: 0.98rem; }
.footer-left p { margin: 0; line-height: 1.7; }
.footer-links { display: flex; gap: 10px 20px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-meta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 0.8rem; line-height: 1.75; }

/* Utility */
.muted { color: var(--ink-muted); }
.small { font-size: 0.86rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.section-anchor { scroll-margin-top: 84px; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 8px 12px; font: inherit; font-size: 0.84rem; color: var(--ink-muted);
  cursor: pointer; white-space: nowrap;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }
.theme-toggle-icon { font-family: var(--mono); font-size: 0.8rem; line-height: 1; }

/* Page helpers */
.page-intro { padding: 48px 0 24px; }
.page-intro h1 { margin: 0 0 14px; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
.page-intro p { margin: 0 0 24px; max-width: 680px; line-height: 1.85; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.section-subhead { margin: 0 0 14px; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.section-lead { margin: 0 0 20px; line-height: 1.8; }
.example-label { margin: 0 0 10px; font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.meta-note { margin-top: 10px; font-size: 0.8rem; color: var(--ink-faint); padding-left: 2px; line-height: 1.7; }

/* Responsive */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-layout { grid-template-columns: 1fr; gap: 8px; }
  .docs-sidebar { position: static; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 20px; }
  .docs-sidebar-group { margin-bottom: 0; }
}
@media (max-width: 720px) {
  .container, .narrow, .header-inner { width: min(100% - 40px, var(--max)); }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 10px 0 18px; gap: 2px; }
  .main-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; padding: 10px 0; }
  .main-nav a.nav-pill { margin-left: 0; margin-top: 6px; }
  .hero { padding: 48px 0 32px; }
  .feature-grid, .two-col, .three-col { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  pre { padding: 16px; font-size: 12px; }
  .footer-inner { flex-direction: column; }
}



@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, .docs-sidebar, .copy-btn, .nav-toggle, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .hero, .docs-hero, .section-muted, .site-footer { background: #fff !important; }
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .docs-content { max-width: none; }
  pre { background: #f5f5f5; color: #111; border: 1px solid #ccc; }
  pre code { color: #111; }
  a { color: #000; text-decoration: underline; }
  .code-window { border: 1px solid #ccc; }
  .code-window-bar { background: #f0f0f0; border-bottom: 1px solid #ccc; }
  .code-window-title { color: #333; }
  .callout { break-inside: avoid; }
}
