/* tenanted.dev */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --ink: #18181b;
  --ink-2: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --line-2: #d6d3d1;
  --accent: #dc2626;
  --accent-ink: #b91c1c;
  --accent-soft: #fef2f2;
  --code-bg: #18181b;
  --code-line: #27272a;
  --code-head: #a1a1aa;
  --inline-code-bg: #f5f5f4;
  --inline-code-ink: #292524;
  --shadow: 0 1px 2px rgb(28 25 23 / 0.04), 0 4px 16px -4px rgb(28 25 23 / 0.06);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --top: 60px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --ink: #f4f4f5;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --line: #232326;
  --line-2: #2e2e33;
  --accent: #ef4444;
  --accent-ink: #f87171;
  --accent-soft: rgb(239 68 68 / 0.1);
  --code-bg: #0e0e10;
  --code-line: #232326;
  --code-head: #8b8b94;
  --inline-code-bg: #1c1c1f;
  --inline-code-ink: #e4e4e7;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.65 var(--font); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
code, kbd, pre { font-family: var(--mono); }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.fill { fill: currentColor; stroke: none; }
button { font: inherit; color: inherit; }
::selection { background: rgb(239 68 68 / 0.2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 14px; }
.home .topbar-inner { max-width: 1180px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.wordmark .logo { width: 22px; height: 22px; stroke: none; }
.wordmark .tld { color: var(--muted); font-weight: 500; }
.wordmark.small { font-size: 15px; }
.ver { font: 500 11.5px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.toplinks { display: flex; gap: 2px; margin-left: 18px; }
.toplinks a { text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 7px; transition: color .15s, background .15s; }
.toplinks a:hover { color: var(--ink); background: var(--surface-2); }
.toplinks a[aria-current='page'] { color: var(--accent-ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme='dark'] .i-sun, :root:not([data-theme='dark']) .i-moon { display: none; }
.i-sun, .i-moon { display: inline-grid; }
.search-trigger { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; margin-right: 6px; min-width: 200px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; color: var(--muted); font-size: 13.5px; cursor: pointer; transition: border-color .15s; }
.search-trigger:hover { border-color: var(--line-2); }
.search-trigger kbd { margin-left: auto; }
kbd { font: 500 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); background: var(--surface-2); border-radius: 5px; padding: 3px 5px; }
.menu-btn { display: none; margin-left: -8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; box-shadow: var(--shadow); }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / .15) inset, 0 4px 14px -6px rgb(220 38 38 / .6); }
.btn.primary:hover { background: #b91c1c; border-color: #b91c1c; }
.btn .arrow { width: 15px; height: 15px; transition: transform .15s; }
.btn:hover .arrow, .textlink:hover .arrow { transform: translateX(2px); }
.textlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; color: var(--accent-ink); text-decoration: none; }
.textlink .arrow { width: 14px; height: 14px; transition: transform .15s; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 56px; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 20%, transparent 75%); opacity: .55; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--mono); color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px 7px 10px; }
.eyebrow:hover { border-color: var(--line-2); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 26px 0 0; max-width: 15ch; text-wrap: balance; }
.hero .sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 60ch; margin: 24px 0 0; line-height: 1.55; text-wrap: pretty; }
.hero .sub code, .showcase-copy code, .card code, .demo :not(pre) > code, .central :not(pre) > code, .matrix code, .doc .lede code { font-size: .86em; background: var(--inline-code-bg); color: var(--inline-code-ink); border: 1px solid var(--line); padding: .08em .36em; border-radius: 5px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; align-items: center; }
.install { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 14px; border-radius: 10px; border: 1px dashed var(--line-2); background: transparent; cursor: pointer; font-size: 14px; color: var(--ink); transition: border-color .15s; }
.install:hover { border-color: var(--muted); }
.install .prompt { font-family: var(--mono); color: var(--muted); }
.install code { font-size: 13.5px; }
.install .copy-label { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; }
.install.copied .copy-label { color: var(--accent-ink); }
.br-lg { display: none; }
@media (min-width: 900px) { .br-lg { display: inline; } }

/* ---------- code blocks ---------- */
.code { margin: 24px 0; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 12px; overflow: hidden; color-scheme: dark; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--code-line); font: 500 12px/1 var(--mono); color: var(--code-head); }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--code-head); font: 500 12px/1 var(--font); cursor: pointer; transition: background .15s, color .15s; }
.copy:hover { background: rgb(255 255 255 / .07); color: #f4f4f5; }
.copy svg { width: 13px; height: 13px; }
.copy.copied { color: #fca5a5; }
.code pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; tab-size: 4; background: transparent !important; }
.code pre code { font-family: inherit; }
.code pre::-webkit-scrollbar { height: 8px; }
.code pre::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }

/* ---------- showcase ---------- */
.showcase { padding: 24px 0 96px; }
.showcase-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.showcase-copy { padding-top: 12px; }
.showcase-copy h2, .section-head h2, .demo h2, .central h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; margin: 0; text-wrap: balance; }
.showcase-copy p, .demo p, .central p { color: var(--ink-2); margin: 18px 0 0; }
.checks { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15px; }
.checks li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.tabs .code { margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.tablist { display: flex; gap: 2px; background: var(--code-bg); border: 1px solid var(--code-line); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 6px 6px 0; overflow-x: auto; scrollbar-width: none; }
.tablist::-webkit-scrollbar { display: none; }
.tablist button { font: 500 12.5px/1 var(--mono); color: #a1a1aa; background: transparent; border: 0; padding: 11px 12px; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap; position: relative; }
.tablist button:hover { color: #f4f4f5; }
.tablist button[aria-selected='true'] { color: #fafafa; background: rgb(255 255 255 / .05); }
.tablist button[aria-selected='true']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--accent); border-radius: 2px; }
.tab-panel .code { border-top-color: var(--code-line); }

/* ---------- sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card { background: var(--surface); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { margin: 0; font-size: 19px; letter-spacing: -0.02em; font-weight: 650; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.card-num { font: 500 12px/1 var(--mono); color: var(--muted); }
.backends { display: flex; flex-wrap: wrap; gap: 8px; }
.backends span { font: 500 12.5px/1 var(--mono); border: 1px solid var(--line); background: var(--surface-2); padding: 7px 10px; border-radius: 7px; color: var(--ink-2); }
.card .textlink { margin-top: 6px; }

.numbers { background: var(--surface); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 28px 20px 28px 0; display: flex; flex-direction: column-reverse; gap: 8px; }
.stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.stats dd { margin: 0; font-size: clamp(32px, 3.4vw, 46px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd small { font-size: .42em; font-weight: 500; letter-spacing: -0.01em; color: var(--muted); }
.stats dt { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.stats > div:first-child dd { color: var(--accent); }
.matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.matrix-item { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.matrix-item span { color: var(--ink-2); }

.demo-grid, .central-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.demo .btn { margin-top: 28px; }
.demo p a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.personas { list-style: none; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 4px; }
.personas li { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 10px; }
.personas li + li { border-top: 1px solid var(--line); border-radius: 0; }
.personas li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.personas strong { font-size: 15px; font-weight: 600; }
.personas code { font-size: 13px; color: var(--ink-2); background: none !important; border: 0 !important; padding: 0 !important; overflow-wrap: anywhere; }
.personas span:not(.avatar) { font-size: 13px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 600 13px/1 var(--font); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); flex-shrink: 0; }
.personas li:first-child .avatar { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.central-grid .code { margin: 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 56px 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 34ch; margin: 14px 0 0; }
.footer-brand p a { color: var(--ink-2); }
.footer h4 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--ink); }
.footer-base { max-width: 1180px; margin: 0 auto; padding: 20px 24px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 12.5px/1.4 var(--mono); color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- docs layout ---------- */
.docs-shell { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 272px minmax(0, 1fr) 240px; gap: 0; }
.docs-shell.no-toc { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--top); height: calc(100dvh - var(--top)); overflow-y: auto; padding: 24px 20px 40px 24px; border-right: 1px solid var(--line); }
.sidebar-head { display: none; }
.sidebar-search { display: none; }
.side-label { font: 600 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 12px; }
.side-guides { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 2px; }
.side-guides a { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.side-guides a:hover { background: var(--surface-2); color: var(--ink); }
.side-guides .num { font: 500 11.5px/1 var(--mono); color: var(--muted); }
.side-guides a[aria-current='page'] { background: var(--accent-soft); color: var(--accent-ink); }
.side-guides a[aria-current='page'] .num { color: var(--accent-ink); }
.side-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.side-links a { display: block; padding: 6px 10px; text-decoration: none; color: var(--muted); font-size: 14px; border-radius: 8px; }
.side-links a:hover { color: var(--ink); background: var(--surface-2); }
.side-links.big a { font-size: 17px; color: var(--ink); padding: 12px 10px; font-weight: 500; }

.doc { padding: 48px 56px 96px; min-width: 0; max-width: 860px; width: 100%; justify-self: center; }
.doc-eyebrow { font: 500 12px/1 var(--mono); color: var(--accent-ink); margin-bottom: 14px; }
.doc h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 700; margin: 0; text-wrap: balance; }
.doc .lede { font-size: 18px; color: var(--ink-2); margin: 18px 0 8px; line-height: 1.6; }
.prose { font-size: 16px; color: var(--ink-2); }
.prose > *:first-child { margin-top: 32px; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); letter-spacing: -0.02em; position: relative; scroll-margin-top: calc(var(--top) + 20px); }
.prose h2 { font-size: 25px; line-height: 1.25; font-weight: 650; margin: 56px 0 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 19px; line-height: 1.35; font-weight: 650; margin: 36px 0 12px; }
.prose h4 { font-size: 16px; font-weight: 650; margin: 28px 0 10px; }
.prose h2 code, .prose h3 code, .prose h4 code { font-size: .85em; }
.anchor { position: absolute; left: -1.1em; padding-right: .3em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 500; transition: opacity .15s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 16px 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 7px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-ink); }
.prose :not(pre) > code { font-size: .86em; background: var(--inline-code-bg); color: var(--inline-code-ink); border: 1px solid var(--line); padding: .1em .36em; border-radius: 5px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-weight: 600; color: var(--ink); background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: nowrap; overflow-wrap: normal !important; }
.prose td:last-child code { white-space: normal; }
.prose blockquote { margin: 24px 0; padding: 4px 20px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.callout { margin: 28px 0; padding: 16px 20px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); }
.callout-title { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: 8px; }
.callout p { margin: 0; }
.prose details { margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 20px; }
.prose summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 10px; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::before { content: ''; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex-shrink: 0; }
.prose details[open] summary::before { transform: rotate(45deg); }
.prose details[open] { padding-bottom: 4px; }
.doc-edit { margin-top: 56px; font-size: 14px; }
.doc-edit a { color: var(--muted); text-decoration: none; }
.doc-edit a:hover { color: var(--ink); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--surface); transition: border-color .15s, transform .15s; min-width: 0; }
.pager a:hover { border-color: var(--accent); }
.pager span { font-size: 12.5px; color: var(--muted); }
.pager strong { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.pager .next { text-align: right; grid-column: 2; }
.pager .prev span::before { content: '← '; }
.pager .next span::after { content: ' →'; }

.toc { position: sticky; top: var(--top); height: calc(100dvh - var(--top)); overflow-y: auto; padding: 48px 24px 40px 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; text-decoration: none; color: var(--muted); font-size: 13.5px; line-height: 1.4; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; transition: color .15s, border-color .15s; }
.toc li.d3 a { padding-left: 26px; font-size: 13px; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--accent-ink); border-left-color: var(--accent); }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; transition: border-color .15s; }
.guide-card:hover { border-color: var(--accent); }
.guide-card h3 { margin: 0; font-size: 17px; letter-spacing: -0.015em; color: var(--ink); }
.guide-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

.notfound { padding-top: 120px; padding-bottom: 160px; }
.notfound h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; margin: 0; }
.notfound p { color: var(--ink-2); }

/* ---------- search ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgb(9 9 11 / .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-box { width: 100%; max-width: 600px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px -12px rgb(0 0 0 / .35); overflow: hidden; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.99); } }
.search-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input svg { width: 18px; height: 18px; }
.search-input input { flex: 1; height: 54px; border: 0; outline: 0; background: transparent; font: 400 16px var(--font); color: var(--ink); min-width: 0; }
.search-input input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: min(420px, 55vh); overflow-y: auto; }
.search-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 9px; text-decoration: none; }
.search-results a .t { color: var(--ink); font-size: 14.5px; font-weight: 500; }
.search-results a .g { color: var(--muted); font-size: 12.5px; }
.search-results a .t mark { background: none; color: var(--accent-ink); font-weight: 650; }
.search-results li[aria-selected='true'] a { background: var(--accent-soft); }
.search-results .empty { padding: 24px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.search-foot { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.search-foot kbd { margin-right: 3px; }

.nav-scrim { display: none; }
.mobile-menu { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .docs-shell { grid-template-columns: 256px minmax(0, 1fr); }
  .toc { display: none; }
  .doc { padding: 44px 48px 88px; }
}
@media (max-width: 1080px) {
  .toplinks a:nth-child(n+3) { display: none; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  :root { --top: 56px; }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .menu-btn { display: inline-grid; }
  .toplinks, .ver { display: none; }
  .search-trigger { min-width: 0; width: 36px; height: 36px; padding: 0; justify-content: center; border: 0; background: transparent; margin: 0; color: var(--ink-2); }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger svg { width: 18px; height: 18px; }
  .wrap { padding: 0 16px; }

  .docs-shell, .docs-shell.no-toc { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .mobile-menu { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); height: 100dvh; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 16px 32px; overflow-y: auto; transform: translateX(-100%); transition: transform .22s cubic-bezier(.3,.7,.2,1); visibility: hidden; display: block; }
  .nav-open .sidebar, .nav-open .mobile-menu { transform: none; visibility: visible; }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -6px 18px 0; }
  .sidebar-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--muted); font-size: 14px; margin-bottom: 22px; cursor: pointer; }
  .sidebar-search kbd { margin-left: auto; }
  .nav-scrim { position: fixed; inset: 0; z-index: 60; background: rgb(9 9 11 / .4); display: block; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .doc { padding: 32px 16px 72px; }
  .anchor { display: none; }
  .code { border-radius: 10px; margin-left: -4px; margin-right: -4px; }
  .code pre { font-size: 12.5px; padding: 14px 14px 16px; }

  .hero { padding: 56px 0 40px; }
  .hero h1 { margin-top: 22px; }
  .cta { margin-top: 28px; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
  .install { width: 100%; }
  .install .copy-label { margin-left: auto; }
  .showcase { padding: 8px 0 64px; }
  .showcase-grid, .demo-grid, .central-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div, .stats > div + div { padding: 22px 12px 22px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stats > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .stats > div:nth-child(-n+2) { border-top: 0; }
  .stats > div:last-child { grid-column: 1 / -1; }
  .matrix { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .footer-inner { grid-template-columns: 1fr 1fr; padding: 48px 16px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-base { padding: 20px 16px 32px; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
