/* locate-me documentation, set in Screen Line: zinc ink, hairline screen
   lines, Geist for words and Geist Mono for facts. Colours, spacing and radii
   come from the Screen Line tokens below; components mirror its bundle. */

/* ── Tokens (generated from Screen Line tokens.json) ─────────── */
:root {
  --background: #ffffff;
  --foreground: #09090b;
  --primary: #09090b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #71717b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --accent: #f4f4f5;
  --accent-muted: #f4f4f580;
  --accent-foreground: #18181b;
  --surface: #fafafa;
  --surface-foreground: #09090b;
  --border: #e4e4e7;
  --line: #eeeef0;
  --input: #e4e4e7;
  --ring: #9f9fa9;
  --focus-ring: #71717b;
  --info: #009cf5;
  --success: #00c758;
  --positive: #008138;
  --destructive: #e40014;
  --red-400: #ff6568;
  --link: #1447e6;
  --electric: #6219f3;
  --electric-text: #6219f3;
  --on-electric: #fafafa;
  --electric-500: #6219f3;
  --logo-ink: #171717;
  --figure-pattern: #dddddd;
  --figure-stroke: #d2d2d2;
  --figure-caption: #a7a7ae;
  --selection: #09090b;
  --selection-foreground: #fafafa;
  --code-highlight: #005bc30f;
  --chart-1: #333333;
  --chart-2: #4a4a4a;
  --chart-3: #6f6f6f;
  --chart-4: #a1a1a1;
  --chart-5: #dbdbdb;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #9f9fa9;
  --zinc-500: #71717b;
  --zinc-600: #52525c;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;
  --amber-300: #ffd236;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-4: 16px;
  --space-8: 32px;
  --header-height: 56px;
  --container: 768px;
  --dash: 6px;
  --dot-pitch: 8px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  --shadow-kbd: inset 0 0 1px #0000001a;
  --shadow-drop-sm: 0 1px 2px #00000026;
  --font-sans: "Geist", "GeistSans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", "GeistMono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --font-handwritten: "Caveat", "Comic Sans MS", cursive;
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #09090b;
  --foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #09090b;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #9f9fa9;
  --card: #18181b;
  --card-foreground: #fafafa;
  --popover: #18181b;
  --popover-foreground: #fafafa;
  --accent: #27272a;
  --accent-muted: #27272a33;
  --accent-foreground: #fafafa;
  --surface: #18181b;
  --surface-foreground: #fafafa;
  --border: #27272a;
  --line: #1c1c1e;
  --input: #ffffff26;
  --ring: #71717b;
  --positive: #00c758;
  --destructive: #bf000f;
  --link: #3080ff;
  --electric: #8654fb;
  --electric-text: #a685ff;
  --logo-ink: #ffffff;
  --figure-pattern: #1f1f22;
  --figure-stroke: #28282a;
  --figure-caption: #5d5d63;
  --selection: #fafafa;
  --selection-foreground: #09090b;
  --code-highlight: #ff670b0f;
  --chart-1: #ffffff;
  --chart-2: #a8a8a8;
  --chart-3: #666666;
  --chart-4: #454545;
  --chart-5: #333333;
  --shadow-kbd: inset 0 0 1px #ffffff33;
}
/* Without scripts the theme follows the system. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #09090b;
    --foreground: #fafafa;
    --primary: #fafafa;
    --primary-foreground: #09090b;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #9f9fa9;
    --card: #18181b;
    --card-foreground: #fafafa;
    --popover: #18181b;
    --popover-foreground: #fafafa;
    --accent: #27272a;
    --accent-muted: #27272a33;
    --accent-foreground: #fafafa;
    --surface: #18181b;
    --surface-foreground: #fafafa;
    --border: #27272a;
    --line: #1c1c1e;
    --input: #ffffff26;
    --ring: #71717b;
    --positive: #00c758;
    --destructive: #bf000f;
    --link: #3080ff;
    --electric: #8654fb;
    --electric-text: #a685ff;
    --logo-ink: #ffffff;
    --figure-pattern: #1f1f22;
    --figure-stroke: #28282a;
    --figure-caption: #5d5d63;
    --selection: #fafafa;
    --selection-foreground: #09090b;
    --code-highlight: #ff670b0f;
    --chart-1: #ffffff;
    --chart-2: #a8a8a8;
    --chart-3: #666666;
    --chart-4: #454545;
    --chart-5: #333333;
    --shadow-kbd: inset 0 0 1px #ffffff33;
  }
}

/* ── Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + var(--space-4)); }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--foreground); font: 400 16px/24px var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--selection); color: var(--selection-foreground); }
a { color: inherit; }
code, kbd, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sl-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sl-skip { position: absolute; left: var(--space-2); top: -48px; z-index: 100; padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); background: var(--primary); color: var(--primary-foreground); font: 500 14px/20px var(--font-sans); text-decoration: none; }
.sl-skip:focus { top: var(--space-2); }
.sl-icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted-foreground); }

/* ── Button ──────────────────────────────────────────────────── */
.sl-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1-5); flex-shrink: 0; height: 36px; padding: 0 var(--space-2-5); border: 1px solid transparent; border-radius: var(--radius-lg); background: transparent; color: var(--foreground); font: 500 14px/20px var(--font-sans); white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none; transition: all .15s cubic-bezier(.4,0,.2,1); }
.sl-btn:active { transform: scale(.98); }
.sl-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sl-btn:disabled, .sl-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.sl-btn-default { background: var(--primary); color: var(--primary-foreground); }
.sl-btn-default:hover { background: color-mix(in oklab, var(--primary) 80%, transparent); }
.sl-btn-outline { background: var(--background); border-color: var(--border); }
.sl-btn-outline:hover { background: var(--muted); }
[data-theme="dark"] .sl-btn-outline { background: color-mix(in oklab, var(--input) 30%, transparent); border-color: var(--input); }
[data-theme="dark"] .sl-btn-outline:hover { background: color-mix(in oklab, var(--input) 50%, transparent); }
.sl-btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.sl-btn-secondary:hover { background: color-mix(in oklab, var(--secondary) 80%, transparent); }
.sl-btn-ghost:hover { background: var(--muted); }
[data-theme="dark"] .sl-btn-ghost:hover { background: color-mix(in oklab, var(--muted) 50%, transparent); }
.sl-btn-link { height: auto; padding: 0; color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sl-btn-link:hover { text-decoration-line: underline; }
.sl-btn-link:active { transform: none; }
.sl-btn-xs { height: 24px; gap: var(--space-1); padding: 0 var(--space-2); font-size: 12px; line-height: 16px; }
.sl-btn-xs .sl-icon { width: 12px; height: 12px; }
.sl-btn-sm { height: var(--space-8); gap: var(--space-1); }
.sl-btn-icon-xs { width: 24px; height: 24px; padding: 0; }
.sl-btn-icon-xs .sl-icon { width: 12px; height: 12px; }
.sl-btn-icon-sm { width: var(--space-8); height: var(--space-8); padding: 0; }
@media (prefers-reduced-motion: reduce) { .sl-btn:active { transform: none; } }

/* ── Kbd, Tag, IconTile, facts ───────────────────────────────── */
.sl-kbd-group { display: inline-flex; align-items: center; gap: 3px; }
.sl-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 var(--space-1); border-radius: var(--radius-sm); background: #0000000d; box-shadow: var(--shadow-kbd); color: var(--muted-foreground); font: 400 12px/1 var(--font-sans); user-select: none; }
[data-theme="dark"] .sl-kbd { background: #ffffff1a; }
.sl-tag { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-1-5); border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--zinc-50); color: var(--muted-foreground); font: 400 12px/16px var(--font-mono); white-space: nowrap; }
[data-theme="dark"] .sl-tag { background: var(--zinc-900); }
.sl-tags { display: flex; flex-wrap: wrap; gap: var(--space-1-5); }
.sl-icon-tile { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; border: 1px solid #71717b26; border-radius: var(--radius-md); background: var(--muted); color: var(--muted-foreground); box-shadow: 0 0 0 1px var(--background), 0 0 0 2px var(--line); }
.sl-fact { display: flex; align-items: center; gap: var(--space-4); min-width: 0; font: 400 14px/20px var(--font-mono); font-variant-numeric: tabular-nums; }
.sl-fact > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.sl-aside { color: var(--muted-foreground); }

/* ── Page frame: header, sidebar, main ───────────────────────── */
:root { --sidebar: 272px; --doc-max: 880px; --toc: 224px; --console: 400px; }

.sl-page { min-width: 0; overflow-x: clip; container: main / inline-size; }

/* ── Panel + screen lines ────────────────────────────────────── */
.sl-panel { position: relative; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.sl-panel::before, .sl-panel::after, .sl-panel-header::after { content: ""; position: absolute; left: -100vw; width: 200vw; height: 1px; background: var(--line); pointer-events: none; }
.sl-panel::after { background: var(--border); }
.sl-panel::before { top: 0; }
.sl-panel::after, .sl-panel-header::after { bottom: 0; }
.sl-panel-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 0 var(--space-4); }
.sl-panel-title { margin: 0; font: 500 30px/36px var(--font-sans); letter-spacing: -0.75px; text-wrap: balance; }
.sl-panel-title sup { position: relative; top: -0.75em; margin-left: var(--space-1); font: 500 14px/20px var(--font-sans); letter-spacing: 0; color: var(--muted-foreground); vertical-align: baseline; }
.sl-panel-description { margin: 0; padding: var(--space-4) var(--space-4) 0; font: 400 16px/24px var(--font-sans); color: var(--muted-foreground); text-wrap: balance; }
.sl-panel-body { padding: var(--space-4); }

/* ── StripeDivider, lines ────────────────────────────────────── */
.sl-stripe { position: relative; height: var(--space-8); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.sl-stripe::before { content: ""; position: absolute; top: 0; bottom: 0; left: -100vw; width: 200vw; --pattern-foreground: color-mix(in oklab, var(--line) 56%, transparent); background-image: repeating-linear-gradient(315deg, var(--pattern-foreground) 0, var(--pattern-foreground) 1px, transparent 0, transparent 50%); background-size: 10px 10px; pointer-events: none; }
[data-theme="dark"] .sl-stripe::before { --pattern-foreground: var(--line); }
.sl-sep { flex-shrink: 0; background: var(--border); }
.sl-sep-v { width: 1px; height: 20px; align-self: center; }

/* ── Logo ────────────────────────────────────────────────────── */
.sl-logo { display: block; height: 24px; width: auto; color: var(--logo-ink); flex-shrink: 0; }
.sl-ink { display: flex; filter: url(#sl-ink); }

/* ── Header: full width, the brand cell continues the sidebar rule ── */
.sl-header { position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); height: var(--header-height); background: var(--background); border-bottom: 1px solid var(--border); }
.header-brand { display: flex; align-items: center; gap: var(--space-2); min-width: 0; padding: 0 var(--space-4); border-right: 1px solid var(--border); }
.header-menu { display: none; margin-left: calc(-1 * var(--space-1-5)); }
.header-home { display: flex; align-items: center; gap: var(--space-2); color: var(--foreground); font: 500 14px/20px var(--font-sans); text-decoration: none; white-space: nowrap; border-radius: var(--radius-sm); }
.header-home:focus-visible { outline-offset: 4px; }
.header-bar { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding: 0 var(--space-3) 0 var(--space-4); }
.header-search { display: flex; align-items: center; gap: var(--space-2); width: min(440px, 100%); height: 34px; padding: 0 var(--space-1-5) 0 var(--space-2-5); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--muted-foreground); font: 400 14px/20px var(--font-sans); cursor: pointer; transition: color .15s cubic-bezier(.4,0,.2,1), border-color .15s; }
.header-search:hover { color: var(--foreground); border-color: var(--input); }
.header-search-label { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-header-spacer { flex: 1; }
.header-status { display: flex; align-items: center; gap: var(--space-2); font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); white-space: nowrap; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }

/* ── Shell and sidebar ───────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--header-height); align-self: start; z-index: 20; display: flex; flex-direction: column; height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height)); overflow-y: auto; border-right: 1px solid var(--border); background: var(--background); scrollbar-width: thin; }
.side-nav { flex: 1; padding: 20px var(--space-3) var(--space-4); }
.side-group + .side-group { margin-top: 24px; }
.side-label { margin: 0 0 var(--space-1-5); padding: 0 var(--space-2); font: 500 12px/16px var(--font-sans); color: var(--muted-foreground); }
.side-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: var(--space-2-5); min-height: 32px; padding: var(--space-1-5) var(--space-2); border-radius: var(--radius-lg); color: var(--muted-foreground); font: 400 14px/20px var(--font-sans); text-decoration: none; transition: background-color .15s cubic-bezier(0,0,.2,1), color .15s; }
.side-link:hover { background: var(--accent-muted); color: var(--foreground); }
.side-link:focus-visible { outline-offset: -2px; }
.side-link[aria-current="page"] { background: var(--accent); color: var(--foreground); font-weight: 500; }
.side-link[aria-current="page"] .sl-icon { color: var(--foreground); }
.side-link .method { min-width: 40px; padding: 0 var(--space-1); font-size: 10px; line-height: 16px; background: transparent; color: var(--muted-foreground); }
.side-link[aria-current="page"] .method { color: var(--foreground); border-color: var(--ring); }
/* Endpoints hang off one hairline trunk, each joined by a short tick. */
.side-tree { position: relative; margin-left: var(--space-3); padding-left: var(--space-3); }
.side-tree::before { content: ""; position: absolute; left: 0; top: 0; bottom: 16px; width: 1px; background: var(--border); }
.side-tree > li { position: relative; }
.side-tree > li::before { content: ""; position: absolute; left: calc(-1 * var(--space-3)); top: 16px; width: var(--space-2); height: 1px; background: var(--border); }
.side-foot { position: relative; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); font: 400 12px/18px var(--font-mono); color: var(--muted-foreground); }
.side-foot p { margin: 0; }
.side-foot a { color: var(--foreground); text-decoration: none; text-underline-offset: 3px; }
.side-foot a:hover { text-decoration: underline; }
.sidebar-backdrop { display: none; }

@media (max-width: 1023px) {
  .sl-header { grid-template-columns: auto minmax(0, 1fr); }
  .header-brand { border-right: 0; padding-left: var(--space-3); }
  .header-menu { display: inline-flex; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 70; top: var(--header-height); bottom: 0; left: 0; align-self: auto; width: min(300px, 86vw); height: auto; transform: translateX(-100%); visibility: hidden; transition: transform .2s cubic-bezier(.4,0,.2,1), visibility .2s; }
  .nav-open .sidebar { transform: none; visibility: visible; }
  .nav-open .sidebar-backdrop { display: block; position: fixed; inset: var(--header-height) 0 0 0; z-index: 65; background: #09090b66; }
}
@media (max-width: 639px) {
  .header-brand .sl-tag, .header-status > span:last-child { display: none; }
  .header-bar { gap: var(--space-2); padding-left: 0; }
  .header-search { width: 34px; padding: 0; justify-content: center; }
  .header-search-label, .header-search .sl-kbd-group { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ── Reference pages: a ruled column and an index of its sections ── */
.doc-layout { display: grid; grid-template-columns: minmax(0, var(--doc-max)) var(--toc); justify-content: center; padding: 0 var(--space-8); }
.doc-column { min-width: 0; }
.doc-toc { position: sticky; top: var(--header-height); align-self: start; max-height: calc(100vh - var(--header-height)); overflow-y: auto; padding: 56px 0 var(--space-4) var(--space-8); scrollbar-width: none; }
.toc-box { position: relative; padding: var(--space-3) 0 var(--space-3) var(--space-4); border-left: 1px solid var(--border); background: var(--background); }
.toc-label { margin: 0 0 var(--space-2); font: 500 12px/16px var(--font-sans); color: var(--muted-foreground); }
.toc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1-5); }
.toc-list a { display: block; font: 400 13px/20px var(--font-sans); color: var(--muted-foreground); text-decoration: none; transition: color .15s cubic-bezier(.4,0,.2,1); }
.toc-list a:hover, .toc-list a[aria-current="true"] { color: var(--foreground); }
.toc-list a[aria-current="true"] { font-weight: 500; }
.toc-top { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-3); font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); text-decoration: none; }
.toc-top:hover { color: var(--foreground); }
@media (max-width: 1279px) {
  .doc-layout { grid-template-columns: minmax(0, var(--doc-max)); padding: 0 24px; }
  .doc-toc { display: none; }
}
@media (max-width: 639px) { .doc-layout { padding: 0 var(--space-2); } }

/* ── Flip tagline, figure caption ────────────────────────────── */
.sl-flip { display: inline-block; animation: sl-flip-in .5s cubic-bezier(0,0,.2,1); }
@keyframes sl-flip-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .sl-flip { animation: none; } }
.sl-hero-caption { position: absolute; right: var(--space-4); bottom: var(--space-4); font: 400 14px/1 var(--font-sans); letter-spacing: 0.35px; color: var(--figure-caption); font-variant-numeric: tabular-nums; pointer-events: none; user-select: none; }

/* ── Live dot ────────────────────────────────────────────────── */
.sl-live { position: relative; display: inline-flex; width: 10px; height: 10px; align-items: center; justify-content: center; flex-shrink: 0; }
.sl-live::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius-full); background: var(--info); opacity: .5; animation: sl-ping 1s cubic-bezier(0,0,.2,1) infinite; }
.sl-live::after { content: ""; position: relative; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--info); }
.sl-live.is-off::before { display: none; }
.sl-live.is-off::after { background: var(--zinc-400); }
@keyframes sl-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sl-live::before { animation: none; } }

/* ── Alert, Field, Tabs, Table, Skeleton, Empty ──────────────── */
.sl-alert { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--card-foreground); font: 400 14px/20px var(--font-sans); }
.sl-alert > .sl-icon { grid-row: span 2; transform: translateY(2px); }
.sl-alert-title { font-weight: 500; }
.sl-alert-description { color: var(--muted-foreground); text-wrap: pretty; }
.sl-alert-description code { font-size: 13px; }
.sl-alert-destructive { color: var(--destructive); }
[data-theme="dark"] .sl-alert-destructive { color: var(--red-400); }
.sl-alert-destructive .sl-alert-description { color: inherit; opacity: .9; }
.sl-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.sl-label { display: flex; align-items: center; gap: var(--space-2); font: 500 14px/1 var(--font-sans); user-select: none; }
.sl-field-description { margin: 0; font: 400 14px/20px var(--font-sans); color: var(--muted-foreground); }
.sl-input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--input); border-radius: var(--radius-lg); background: transparent; color: var(--foreground); font: 400 16px/24px var(--font-sans); padding: var(--space-1) var(--space-2-5); box-shadow: 0 1px 2px #0000000d; outline: none; transition: border-color .15s, box-shadow .15s; }
[data-theme="dark"] .sl-input { background-color: color-mix(in oklab, var(--input) 30%, transparent); }
.sl-input::placeholder { color: var(--muted-foreground); }
.sl-input:focus-visible { border-color: var(--focus-ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.sl-input[aria-invalid="true"] { border-color: var(--destructive); box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent); }
.sl-input.mono { font-family: var(--font-mono); font-size: 15px; }
select.sl-input { appearance: none; padding-right: 32px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; font-size: 14px; }
select.sl-input option { background: var(--popover); color: var(--popover-foreground); }
.sl-tabs-list { display: inline-flex; width: fit-content; max-width: 100%; height: var(--space-8); align-items: center; padding: 2px; border-radius: var(--radius-lg); background: var(--zinc-50); color: var(--muted-foreground); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--border) 64%, transparent); overflow-x: auto; scrollbar-width: none; }
[data-theme="dark"] .sl-tabs-list { background: var(--zinc-900); }
.sl-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 100%; padding: 4px var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; font: 500 13px/20px var(--font-sans); white-space: nowrap; cursor: pointer; transition: color .15s, background-color .2s ease-in-out; }
.sl-tab:hover { color: var(--foreground); }
.sl-tab[aria-selected="true"] { color: var(--foreground); background: #ffffff; box-shadow: 0 1px 2px #0000000d; }
[data-theme="dark"] .sl-tab[aria-selected="true"] { background: var(--muted); }
.sl-tab:focus-visible { outline-offset: -2px; }
.sl-table-wrap { overflow-x: auto; }
.sl-table { min-width: 100%; border-collapse: collapse; font: 400 14px/20px var(--font-sans); }
.sl-table th { padding: var(--space-2); text-align: left; font-weight: 500; color: var(--foreground); white-space: nowrap; }
.sl-table td { padding: var(--space-2); vertical-align: top; }
.sl-table th:first-child, .sl-table td:first-child { padding-left: 0; }
.sl-table th:last-child, .sl-table td:last-child { padding-right: 0; }
.sl-table tr { border-bottom: 1px solid var(--line); }
.sl-table thead tr { border-bottom-color: var(--border); }
.sl-table tbody tr:last-child { border-bottom: 0; }
.sl-table .num, .sl-table td > code:first-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sl-table td.nowrap { white-space: nowrap; }
.sl-table td:first-child > code, .sl-table td > code:only-child, .sl-table td > a:only-child > code { white-space: nowrap; overflow-wrap: normal; }
.sl-table tr:target { background: var(--accent-muted); }
.sl-table td .muted { display: block; }
.sl-skeleton { display: block; border-radius: var(--radius-md); background: var(--muted); animation: sl-pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes sl-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .sl-skeleton { animation: none; } }
.sl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); padding: 24px; width: 100%; border: 1px dashed var(--border); border-radius: var(--radius-xl); text-align: center; }
.sl-empty-media { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: var(--radius-lg); background: var(--muted); color: var(--foreground); }
.sl-empty-title { font: 500 14px/20px var(--font-sans); letter-spacing: -0.35px; }
.sl-empty-description { max-width: 384px; margin: 0; font: 400 14px/1.625 var(--font-sans); color: var(--muted-foreground); text-wrap: balance; }

/* ── Prose inside panels ─────────────────────────────────────── */
.prose { font: 400 16px/26px var(--font-sans); }
.prose > * { margin: 0; }
.prose > * + * { margin-top: var(--space-4); }
.prose h3 { margin-top: 24px; font: 500 18px/24px var(--font-sans); letter-spacing: -0.2px; }
.prose h3:first-child { margin-top: 0; }
.prose p, .prose li { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li + li { margin-top: var(--space-1-5); }
.prose li::marker { color: var(--muted-foreground); }
.prose a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--foreground); }
.prose :not(pre) > code, .sl-table code, .sl-alert code, .inline-code { padding: 1px 5px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: 400 13px/20px var(--font-mono); overflow-wrap: anywhere; }
.prose .muted { color: var(--muted-foreground); }
.prose .note { padding: var(--space-3) var(--space-4); border: 1px dashed var(--border); border-radius: var(--radius-lg); color: var(--muted-foreground); font-size: 14px; line-height: 22px; }

/* ── Code block ──────────────────────────────────────────────── */
.code { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: var(--space-1-5) var(--space-1-5) var(--space-1-5) var(--space-4); border-bottom: 1px solid var(--border); }
.code-bar .sl-tabs-list { margin-left: -10px; }
.code-title { font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code pre { margin: 0; padding: var(--space-4); overflow-x: auto; font: 400 13px/21px var(--font-mono); font-variant-numeric: tabular-nums; tab-size: 2; color: var(--foreground); }
.code pre[hidden] { display: none; }
.code-copy { color: var(--muted-foreground); }
.code-copy-float { position: absolute; top: var(--space-2); right: var(--space-2); }
.code:has(> .code-copy-float) pre { padding-right: 44px; }
.code-copy .i-check { display: none; }
.code-copy.is-copied .i-check { display: block; }
.code-copy.is-copied .i-copy { display: none; }
.t-p, .t-c, .t-key { color: var(--muted-foreground); }
.t-c { font-style: italic; }
.t-kw { color: var(--muted-foreground); }
.t-head { color: var(--muted-foreground); }
.t-status { color: var(--foreground); font-weight: 500; }

/* ── Doc page opener ─────────────────────────────────────────── */
.doc-intro { padding: 24px var(--space-4) var(--space-4); }
.doc-crumb { margin: 0 0 var(--space-3); display: flex; align-items: center; gap: var(--space-2); font: 400 14px/20px var(--font-mono); color: var(--muted-foreground); }
.doc-crumb a { color: inherit; text-decoration: none; }
.doc-crumb a:hover { color: var(--foreground); }
.doc-title { margin: 0; font: 500 32px/36px var(--font-sans); letter-spacing: -0.8px; text-wrap: balance; }
.doc-lede { margin: var(--space-3) 0 0; max-width: 60ch; font: 400 16px/24px var(--font-sans); color: var(--muted-foreground); text-wrap: balance; }
.doc-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.doc-meta li { display: flex; align-items: center; gap: var(--space-2); font: 400 14px/20px var(--font-mono); color: var(--muted-foreground); }
.doc-meta .sl-icon { color: var(--muted-foreground); }
.doc-endpoints { position: relative; }
.doc-endpoint { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); background: var(--surface); }
.doc-endpoint::before { content: ""; position: absolute; top: 0; left: -100vw; width: 200vw; height: 1px; background: var(--line); pointer-events: none; }
.doc-endpoint code { flex: 1; min-width: 0; font: 400 15px/22px var(--font-mono); overflow-wrap: anywhere; }
.doc-endpoint .muted { font-family: var(--font-sans); font-size: 14px; white-space: nowrap; }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 2px var(--space-1-5); border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--background); color: var(--foreground); font: 500 11px/16px var(--font-mono); letter-spacing: .4px; }

/* ── Endpoint and page rows ──────────────────────────────────── */
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li { position: relative; }
.rows > li + li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); color: var(--foreground); text-decoration: none; transition: background-color .15s cubic-bezier(0,0,.2,1); }
.row:hover { background: var(--accent-muted); }
.row:focus-visible { outline-offset: -2px; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-path { font: 400 14px/20px var(--font-mono); overflow-wrap: anywhere; }
.row-title { font: 500 16px/22px var(--font-sans); }
.row-sum { font: 400 14px/20px var(--font-sans); color: var(--muted-foreground); }
.row-go { color: var(--muted-foreground); transition: transform .15s cubic-bezier(.4,0,.2,1), color .15s; }
.row:hover .row-go { color: var(--foreground); transform: translateX(2px); }
.row-icon { grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-4); }

/* ── Pager (previous / next) ─────────────────────────────────── */
.pager { display: grid; grid-template-columns: 1fr 1fr; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: var(--space-4); color: var(--foreground); text-decoration: none; transition: background-color .15s cubic-bezier(0,0,.2,1); }
.pager a:hover { background: var(--accent-muted); }
.pager a:focus-visible { outline-offset: -2px; }
.pager a + a, .pager .pager-next { border-left: 1px solid var(--line); text-align: right; align-items: flex-end; grid-column: 2; }
.pager-label { display: flex; align-items: center; gap: var(--space-1); font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); }
.pager-title { font: 500 16px/22px var(--font-sans); }

/* ── Metrics ─────────────────────────────────────────────────── */
.sl-metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
.sl-metric { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-2); padding: var(--space-4); border-right: 1px solid var(--line); }
.sl-metric:last-child { border-right: 0; }
.sl-metric-label { font: 400 14px/16px var(--font-sans); color: var(--muted-foreground); }
.sl-metric-value { font: 600 18px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.sl-metrics-note { position: relative; margin: 0; padding: var(--space-3) var(--space-4); font: 400 12px/16px var(--font-sans); color: var(--muted-foreground); }
.sl-metrics-note::before { content: ""; position: absolute; top: 0; left: -100vw; width: 200vw; height: 1px; background: var(--line); }
@media (max-width: 639px) {
  .sl-metrics { grid-template-columns: 1fr; }
  .sl-metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .sl-metric:last-child { border-bottom: 0; }
}

/* ── Steps (quick start) ─────────────────────────────────────── */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-2) var(--space-4); padding: var(--space-4); counter-increment: step; }
.steps > li + li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.steps > li > .sl-icon-tile::after { content: counter(step); font: 500 12px/1 var(--font-mono); color: var(--muted-foreground); }
.step-title { margin: 0; align-self: center; font: 500 16px/22px var(--font-sans); }
.step-body { grid-column: 2; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.step-body p { margin: 0; font-size: 14px; line-height: 22px; color: var(--muted-foreground); }

/* ── Command palette ─────────────────────────────────────────── */
.palette { width: min(560px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 96px)); margin: 72px auto auto; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--popover); color: var(--popover-foreground); box-shadow: 0 16px 48px #00000026; overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; }
.palette::backdrop { background: #09090b66; }
.palette-input { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3); border-bottom: 1px solid var(--border); color: var(--muted-foreground); }
.palette-input input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; color: var(--foreground); font: 400 16px/24px var(--font-sans); outline: none; }
.palette-input input::placeholder { color: var(--muted-foreground); }
.palette-list { flex: 1; margin: 0; padding: var(--space-1-5); list-style: none; overflow-y: auto; }
.palette-group { padding: var(--space-2) var(--space-2) var(--space-1); font: 500 12px/16px var(--font-sans); color: var(--muted-foreground); }
.palette-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-lg); color: var(--foreground); font: 400 14px/20px var(--font-sans); text-decoration: none; cursor: pointer; }
.palette-item[aria-selected="true"] { background: var(--accent); }
.palette-item .sl-icon { color: var(--muted-foreground); }
.palette-item-hint { margin-left: auto; font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); white-space: nowrap; }
.palette-empty { padding: 24px var(--space-2); text-align: center; font-size: 14px; color: var(--muted-foreground); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer .sl-stripe { border: 0; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-4) var(--space-8); border-top: 1px solid var(--border); font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); }
.footer-row p { margin: 0; }
.footer-row a { color: var(--foreground); text-decoration: none; text-underline-offset: 3px; }
.footer-row a:hover { text-decoration: underline; }
@media (max-width: 639px) { .footer-row { padding: var(--space-4); } }

/* ── Home: the globe stage and the console beside it ─────────── */
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--console); min-height: calc(100vh - var(--header-height)); min-height: calc(100dvh - var(--header-height)); border-bottom: 1px solid var(--border); }
.stage { position: relative; margin: 0; min-width: 0; min-height: 560px; }
.stage .globe { position: absolute; inset: 0; }
.stage-note { position: absolute; top: 72px; right: var(--space-8); display: flex; flex-direction: column; align-items: flex-end; font: 400 22px/1 var(--font-handwritten); color: var(--muted-foreground); pointer-events: none; user-select: none; transform: rotate(-4deg); }
.stage-note-arrow { width: 36px; height: 36px; margin: var(--space-1) var(--space-8) 0 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* The console is opaque and above the stage, so construction lines pass behind it. */
.console { position: relative; z-index: 2; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--border); background: var(--background); }
.console-head { padding: 24px var(--space-4) var(--space-4); border-bottom: 1px solid var(--line); }
.console-title { margin: 0; font: 500 32px/36px var(--font-sans); letter-spacing: -0.8px; }
.console-tagline { margin: var(--space-2) 0 0; min-height: 20px; font: 400 14px/20px var(--font-mono); color: var(--muted-foreground); }
.console-block { padding: var(--space-4); border-bottom: 1px solid var(--line); }

.home-sections { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-8); }
.rr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); }
.rr-grid pre { max-height: 440px; }
.rows-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rows-2 > li:nth-child(2)::before { display: none; }
.rows-2 > li:nth-child(even) { border-left: 1px solid var(--line); }
.steps-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps-3 > li + li::before { display: none; }
.steps-3 > li + li { border-left: 1px solid var(--line); }

@container main (max-width: 1079px) { .stage-note { display: none; } }
@container main (max-width: 879px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .stage { min-height: 0; height: min(86cqw, 560px); }
  .console { border-left: 0; border-top: 1px solid var(--border); }
  .home-sections { padding: 0 var(--space-2); }
  .rr-grid, .rows-2, .steps-3 { grid-template-columns: minmax(0, 1fr); }
  .rows-2 > li:nth-child(2)::before { display: block; }
  .rows-2 > li:nth-child(even), .steps-3 > li + li { border-left: 0; }
  .steps-3 > li + li::before { display: block; }
}

/* ── Globe ───────────────────────────────────────────────────── */
.globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.globe canvas:active { cursor: grabbing; }
.globe-guides { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.globe-guides line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 2; shape-rendering: crispEdges; }
.globe-callout { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: var(--space-1-5); padding: 2px var(--space-1-5); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--background); color: var(--foreground); font: 400 12px/16px var(--font-mono); white-space: nowrap; pointer-events: none; will-change: transform; }
.globe-marker { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--electric); box-shadow: 0 0 0 2px var(--background); pointer-events: none; will-change: transform; }
.globe-marker::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--electric); opacity: .45; animation: globe-ping 1.8s cubic-bezier(0,0,.2,1) infinite; }
@keyframes globe-ping { 70%, 100% { transform: scale(3.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .globe-marker::before { animation: none; opacity: 0; } }
.globe-you { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border: 1.5px solid var(--foreground); border-radius: var(--radius-full); background: var(--background); pointer-events: none; will-change: transform; }
.globe-readout { position: absolute; left: var(--space-4); bottom: var(--space-4); margin: 0; font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); font-variant-numeric: tabular-nums; pointer-events: none; }
.globe-key { position: absolute; left: var(--space-4); top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; list-style: none; font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); pointer-events: none; }
.globe-key li { display: flex; align-items: center; gap: var(--space-2); }
.globe-key i { display: inline-block; width: 6px; height: 6px; border-radius: var(--radius-full); }
.globe-key .k3 { background: var(--chart-1); }
.globe-key .k1 { background: var(--chart-4); }
.globe-key .k0 { background: var(--chart-5); }
@container main (max-width: 639px) { .globe-key, .globe-readout { display: none; } }

/* ── Playground (inside the console) ─────────────────────────── */
.pg-form { display: flex; flex-direction: column; gap: var(--space-3); }
.pg-row { display: flex; gap: var(--space-2); }
.pg-row select.sl-input { flex: 1; }
.pg-samples { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1-5); font: 400 12px/16px var(--font-sans); color: var(--muted-foreground); }
.pg-samples .sl-btn { font-family: var(--font-mono); font-weight: 400; color: var(--muted-foreground); }
.pg-samples .sl-btn:hover { color: var(--foreground); }
.pg-key { font-size: 14px; line-height: 20px; }
.pg-key summary { display: inline-flex; align-items: center; gap: var(--space-1-5); width: fit-content; color: var(--muted-foreground); cursor: pointer; list-style: none; border-radius: var(--radius-sm); }
.pg-key summary::-webkit-details-marker { display: none; }
.pg-key summary:hover { color: var(--foreground); }
.pg-key summary .sl-icon { transition: transform .15s cubic-bezier(.4,0,.2,1); }
.pg-key[open] summary .sl-icon:last-child { transform: rotate(180deg); }
.pg-key .sl-field { margin-top: var(--space-3); }
.pg-result { flex: 1; transition: opacity .15s cubic-bezier(.4,0,.2,1); }
.pg-result.is-loading { opacity: .55; }
.pg-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; min-height: 52px; padding: var(--space-2) var(--space-4); }
.pg-ip { font: 500 18px/24px var(--font-mono); overflow-wrap: anywhere; }
.pg-took { margin-left: auto; font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-skeleton-ip { width: 144px; height: 24px; }
.pg-facts { margin: 0; padding: 0; list-style: none; }
.pg-facts li { padding: var(--space-2-5) var(--space-4); border-top: 1px solid var(--line); }
.pg-facts .sl-skeleton { height: 24px; }
.pg-message { padding: 0 var(--space-4) var(--space-4); }
