/* Lagoniko Partner API documentation. Light is the default theme; dark is
   opt-in from the header and remembered. Code panels are dark in both. */

@font-face {
  font-family: 'Geist';
  src: url('geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('geist-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Greek, in running text: Geist has none. */
@font-face {
  font-family: 'Geist';
  src: url('inter-greek.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('jetbrains-mono-greek.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-hover: #f0f2f6;
  --ink: #0e1630;
  --ink-2: #3a4560;
  --ink-3: #6b7489;
  --line: #e8eaef;
  --line-2: #d9dde6;
  --brand: #d2232e;
  --brand-ink: #b81c26;
  --brand-soft: #fdeced;
  --ok: #157a52;
  --ok-soft: #e6f5ee;
  --warn: #9a5b0b;
  --warn-soft: #fdf3e2;
  --bad: #c22f39;
  --bad-soft: #fdeced;
  --code-bg: #0c1325;
  --code-head: #10182d;
  --code-line: rgba(255, 255, 255, 0.07);
  --code-ink: #d9deeb;
  --code-muted: #7c87a5;
  --shadow: 0 1px 2px rgba(14, 22, 48, 0.04), 0 8px 24px -12px rgba(14, 22, 48, 0.12);
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --top: 60px;
  /* The app's illustration palette, so the scenes look as they do in Lagoniko. */
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f4f8;
  --color-line: #e4e9f0;
  --color-line-strong: #cbd5e1;
  --color-text-primary: #22315e;
  --color-text-secondary: #5c6b7a;
  --color-text-tertiary: #667085;
  --color-brand: #d2232e;
  --color-status-success: #16845b;
  --color-status-warning: #b05a16;
  --color-status-danger: #c9353f;
  --color-accent-sand: #e8c39e;
  --color-accent-clay: #c9764f;
  --color-accent-sage: #7fa88b;
  --color-accent-sky: #8fb6d9;
  --color-accent-gold: #e2a33c;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0b1020;
  --bg-soft: #0f1528;
  --bg-hover: #151d34;
  --ink: #eaeef7;
  --ink-2: #b9c1d6;
  --ink-3: #838daa;
  --line: #1b2340;
  --line-2: #27304f;
  --brand: #f0525b;
  --brand-ink: #ff6b73;
  --brand-soft: rgba(240, 82, 91, 0.12);
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, 0.12);
  --warn: #e7a650;
  --warn-soft: rgba(231, 166, 80, 0.12);
  --bad: #ef6b73;
  --bad-soft: rgba(239, 107, 115, 0.12);
  --code-bg: #070b17;
  --code-head: #0b1122;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -16px rgba(0, 0, 0, 0.6);
  --color-surface: #161e2e;
  --color-surface-subtle: #1d2739;
  --color-line: #263145;
  --color-line-strong: #3a4862;
  --color-text-primary: #eef2f7;
  --color-text-secondary: #97a5b9;
  --color-text-tertiary: #828fa5;
  --color-brand: #e0333e;
  --color-status-success: #4fbf8e;
  --color-status-warning: #e19a55;
  --color-status-danger: #ef6b73;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--top) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
code, pre, kbd, .c-input, .c-area { font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'calt' 0; }
code { font-family: var(--mono); font-size: 0.85em; color: var(--ink); background: var(--bg-hover); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: break-word; }
kbd { font: 500 11px var(--sans); color: var(--ink-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: var(--bg); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--bg); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand .logo { height: 19px; width: auto; display: block; }
.logo-on-dark { display: none !important; }
:root[data-theme='dark'] .logo-on-dark { display: block !important; }
:root[data-theme='dark'] .logo-on-light { display: none !important; }
.brand-name { font-weight: 600; font-size: 14px; color: var(--ink); padding-left: 12px; border-left: 1px solid var(--line-2); }
.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  width: 300px;
  height: 36px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--ink-3);
  font: 400 13.5px var(--sans);
  cursor: pointer;
}
.search-btn:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-btn svg { width: 16px; height: 16px; }
.search-btn kbd { margin-left: auto; }
.top-nav { display: flex; gap: 2px; margin-left: auto; }
.top-nav a { font-size: 14px; font-weight: 500; color: var(--ink-3); text-decoration: none; padding: 7px 11px; border-radius: 8px; }
.top-nav a:hover { color: var(--ink); background: var(--bg-hover); }
.top-nav a[aria-current='page'] { color: var(--ink); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: var(--bg-hover); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-btn .i-sun { display: none; }
:root[data-theme='dark'] .theme-btn .i-sun { display: block; }
:root[data-theme='dark'] .theme-btn .i-moon { display: none; }
.menu-btn { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: 550 14px var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--bg-hover); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }

/* Layout */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.sidebar {
  position: sticky;
  top: var(--top);
  height: calc(100vh - var(--top));
  overflow-y: auto;
  padding: 24px 14px 48px 20px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.nav-group + .nav-group { margin-top: 22px; }
.nav-title { margin: 0 0 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 7px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.45;
  text-decoration: none;
}
.nav-link:hover { color: var(--ink); background: var(--bg-hover); }
.nav-link.active { color: var(--ink); background: var(--bg-hover); font-weight: 550; }
.nav-verb { flex: 0 0 34px; font: 600 9.5px/1 var(--mono); letter-spacing: 0.02em; }
.nav-verb-get { color: #1f8a5b; }
.nav-verb-post { color: #2f5dcf; }
.nav-verb-put { color: #b4690e; }
.nav-verb-patch { color: #7a4fd0; }
.nav-verb-delete { color: #c7303a; }
.nav-verb-rpc { color: var(--ink-3); }
:root[data-theme='dark'] .nav-verb-get { color: #56c991; }
:root[data-theme='dark'] .nav-verb-post { color: #7da2ff; }
:root[data-theme='dark'] .nav-verb-put { color: #f0b15c; }
:root[data-theme='dark'] .nav-verb-patch { color: #b597ff; }
:root[data-theme='dark'] .nav-verb-delete { color: #f27a82; }

.main { min-width: 0; }

/* Guides page */
.guides { display: grid; grid-template-columns: minmax(0, 760px) 200px; gap: 64px; justify-content: center; padding: 56px 40px 120px; }
.g-main { min-width: 0; }
.hero h1 { font-size: 42px; line-height: 1.08; font-weight: 650; letter-spacing: -0.035em; max-width: 680px; }
.hero-lead { margin-top: 16px; font-size: 17.5px; line-height: 1.6; color: var(--ink-3); max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.diff { margin: 40px 0 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); overflow: hidden; }
.diff pre { margin: 0; padding: 0 0 14px; font: 13px/1.9 var(--mono); overflow-x: auto; }
.diff .d-file { display: block; padding: 10px 18px; margin-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.diff .d-line { display: block; padding: 0 18px 0 0; white-space: pre; }
.diff .d-sign { display: inline-block; width: 38px; text-align: center; user-select: none; }
.diff .d-del { background: var(--bad-soft); color: var(--bad); }
.diff .d-add { background: var(--ok-soft); color: var(--ok); font-weight: 550; }
.diff figcaption { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); background: var(--bg); }

.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.way {
  display: block;
  padding: 10px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.way:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.way .ill-wrap { height: 112px; margin: 0 -6px 4px; }
.way h3 { font-size: 15px; font-weight: 600; }
.way p { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }

.ill-wrap svg { width: 100%; height: 100%; display: block; }

.g-section { margin-top: 72px; }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.g-head h2 { font-size: 26px; font-weight: 640; letter-spacing: -0.025em; }
.g-ill { width: 150px; height: 100px; flex-shrink: 0; }
.g-lead { font-size: 16px; color: var(--ink-3); margin: -6px 0 26px; }
.anchor { color: inherit; text-decoration: none; }
.anchor:hover::after { content: '#'; margin-left: 8px; color: var(--ink-3); font-weight: 400; }

.prose { max-width: 680px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--ink-3); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.step { position: relative; counter-increment: step; padding: 0 0 36px 52px; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font: 600 13px var(--sans);
}
.step::after { content: ''; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 1px; background: var(--line); }
.step:last-child::after { display: none; }
.step h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.step .cp-stack { margin-top: 16px; }

.table { overflow-x: auto; margin: 16px 0 18px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--bg-soft); padding: 10px 14px; border-bottom: 1px solid var(--line); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); white-space: nowrap; }

.changelog { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 6px 20px; }
.changelog dt { color: var(--ink-3); font-size: 14px; }
.changelog dd { margin: 0; }

.foot { margin-top: 88px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }

.toc { position: sticky; top: calc(var(--top) + 40px); align-self: start; font-size: 13px; }
.toc-title { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--ink-3); text-decoration: none; border-left: 1px solid var(--line); }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--brand); }

/* Reference page */
.reference { padding: 0 0 120px; }
.ref-intro { max-width: 1320px; margin: 0 auto; padding: 56px 48px 32px; }
.ref-intro h1 { font-size: 40px; font-weight: 650; letter-spacing: -0.035em; }
.ref-intro h2 { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; }
.ref-intro-2 { padding-top: 88px; border-top: 1px solid var(--line); margin-top: 24px; }
.ref-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 24px; font-size: 14px; }
.ref-meta div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; max-width: 100%; }
.ref-meta code { min-width: 0; overflow-wrap: anywhere; }
.ref-meta span { color: var(--ink-3); }
.ref-run-note { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 14px; width: fit-content; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: 14px; }
.ref-run-note svg { width: 14px; height: 14px; color: var(--brand); flex-shrink: 0; }

.ref-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 48px;
  border-top: 1px solid var(--line);
}
.ref-text { min-width: 0; max-width: 620px; }
.ref-text h2 { font-size: 24px; font-weight: 640; letter-spacing: -0.025em; margin-bottom: 14px; }
.row-title { font-size: 20px; font-weight: 640; margin-bottom: 12px; font-family: var(--sans); }
.ep-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ep-line code { background: none; border: 0; padding: 0; font-size: 13.5px; color: var(--ink-3); }
.sub { margin: 30px 0 4px; font-size: 14.5px; font-weight: 600; }
.ref-code { min-width: 0; }
.ref-code .cp-stack { position: sticky; top: calc(var(--top) + 24px); }
.sig { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); overflow-x: auto; }
.sig code { background: none; border: 0; padding: 0; font-size: 13px; color: var(--ink); }
.returns { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
.facts { padding-left: 20px; }
.facts li { margin: 7px 0; }

.verb {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font: 650 11px var(--mono);
  letter-spacing: 0.02em;
}
.verb-get { color: #187a50; background: #e5f5ed; }
.verb-post { color: #2753c4; background: #e9effd; }
.verb-put { color: #9d5b0a; background: #fcf1de; }
.verb-patch { color: #6d44c7; background: #f1ebfd; }
.verb-delete { color: #bb2b35; background: #fdecec; }
.verb-rpc { color: #46506b; background: #eef0f4; }
:root[data-theme='dark'] .verb-get { color: #5fd09a; background: rgba(95, 208, 154, 0.12); }
:root[data-theme='dark'] .verb-post { color: #8fb0ff; background: rgba(143, 176, 255, 0.13); }
:root[data-theme='dark'] .verb-put { color: #f3b866; background: rgba(243, 184, 102, 0.12); }
:root[data-theme='dark'] .verb-patch { color: #bea3ff; background: rgba(190, 163, 255, 0.13); }
:root[data-theme='dark'] .verb-delete { color: #f6868d; background: rgba(246, 134, 141, 0.12); }
:root[data-theme='dark'] .verb-rpc { color: #b9c1d6; background: rgba(185, 193, 214, 0.1); }

/* Parameters */
.params { list-style: none; margin: 6px 0 0; padding: 0; }
.param { padding: 14px 0; border-top: 1px solid var(--line); }
.param:first-child { border-top: 0; }
.param-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.param-name { background: none; border: 0; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.param-type { font-size: 12.5px; color: var(--ink-3); }
.param-req { font-size: 12px; font-weight: 600; color: var(--brand); }
.param-desc { margin-top: 5px; font-size: 14px; line-height: 1.6; }
.param-desc code { font-size: 12px; }
.param-more { margin-top: 10px; }
.param-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
}
.param-more summary::-webkit-details-marker { display: none; }
.param-more summary::before { content: '+'; font-weight: 600; }
.param-more[open] summary::before { content: '−'; }
.param-more summary:hover { color: var(--ink); border-color: var(--line-2); }
.params-child { margin-top: 10px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; }

/* Code panels */
.cp-stack { display: grid; gap: 12px; }
.cp { border-radius: 14px; background: var(--code-bg); color: var(--code-ink); overflow: hidden; box-shadow: var(--shadow); }
:root[data-theme='dark'] .cp { border: 1px solid var(--line-2); box-shadow: none; }
.cp-head { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 8px 0 16px; background: var(--code-head); border-bottom: 1px solid var(--code-line); }
.cp-title { display: flex; align-items: center; gap: 9px; min-width: 0; font: 500 12.5px var(--mono); color: var(--code-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-title .verb { height: 20px; }
.cp .verb-get { color: #5fd09a; background: rgba(95, 208, 154, 0.13); }
.cp .verb-post { color: #8fb0ff; background: rgba(143, 176, 255, 0.14); }
.cp .verb-put { color: #f3b866; background: rgba(243, 184, 102, 0.13); }
.cp .verb-patch { color: #bea3ff; background: rgba(190, 163, 255, 0.14); }
.cp .verb-delete { color: #f6868d; background: rgba(246, 134, 141, 0.13); }
.cp .verb-rpc { color: #c3cadb; background: rgba(195, 202, 219, 0.1); }
.cp-run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  height: 28px;
  padding: 0 11px 0 9px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: 600 12.5px var(--sans);
  cursor: pointer;
}
.cp-run:hover { background: #e23a44; }
.cp-run svg { width: 12px; height: 12px; }
.cp-run[aria-pressed='true'] { background: rgba(255, 255, 255, 0.1); color: var(--code-ink); }
.cp-copy { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border: 0; border-radius: 8px; background: none; color: var(--code-muted); cursor: pointer; }
.cp-run + .cp-copy { margin-left: 2px; }
.status + .cp-copy { margin-left: 6px; }
.cp-copy:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.cp-copy svg { width: 15px; height: 15px; }
.cp-copy.copied { color: #5fd09a; }
.cp-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--code-line); overflow-x: auto; }
.cp-tab { position: relative; border: 0; background: none; color: var(--code-muted); font: 500 12.5px var(--sans); padding: 10px 8px; cursor: pointer; white-space: nowrap; }
.cp-tab:hover { color: var(--code-ink); }
.cp-tab[aria-selected='true'] { color: #fff; }
.cp-tab[aria-selected='true']::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.cp-code { margin: 0; padding: 16px 18px; max-height: 520px; overflow: auto; font: 12.8px/1.7 var(--mono); tab-size: 2; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.cp-code code { background: none; border: 0; padding: 0; color: inherit; font: inherit; white-space: pre; }
.cp-response .cp-head { min-height: 40px; }
.cp-response .cp-title { color: var(--code-muted); font-family: var(--sans); }
.cp-response .cp-code { max-height: 380px; }

.status { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font: 600 11.5px var(--mono); margin-left: auto; }
.status.s2 { color: #5fd09a; background: rgba(95, 208, 154, 0.14); }
.status.s4 { color: #f3b866; background: rgba(243, 184, 102, 0.14); }
.status.s5 { color: #f6868d; background: rgba(246, 134, 141, 0.14); }
td .status.s2 { color: var(--ok); background: var(--ok-soft); }
td .status.s4 { color: var(--warn); background: var(--warn-soft); }
td .status.s5 { color: var(--bad); background: var(--bad-soft); }
td .status { margin: 0; }

@keyframes flash { from { box-shadow: 0 0 0 2px rgba(240, 82, 91, 0.55); } to { box-shadow: var(--shadow); } }
.cp-response.flash { animation: flash 0.8s ease-out; }
.prose pre { margin: 14px 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); color: var(--code-ink); overflow-x: auto; font: 12.8px/1.7 var(--mono); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font: inherit; white-space: pre; }

/* Syntax */
.t-c { color: #66718f; font-style: italic; }
.t-s { color: #9fdfb8; }
.t-n { color: #ffc38c; }
.t-k { color: #f59fc5; }
.t-p { color: #9cc4ff; }
.t-t { color: #9cc4ff; }
.t-a { color: #ffc38c; }
.t-v { color: #c6b5ff; }
.t-o { color: #8e99b5; }

/* Run console */
.console { padding: 16px 18px 18px; display: grid; gap: 14px; }
.c-field { display: grid; gap: 6px; }
.c-field label { font: 500 12px var(--sans); color: var(--code-muted); }
.c-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-input, .c-area {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: 12.8px/1.6 var(--mono);
  padding: 8px 11px;
}
.c-input:focus, .c-area:focus { outline: none; border-color: rgba(240, 82, 91, 0.7); box-shadow: 0 0 0 3px rgba(240, 82, 91, 0.18); }
.c-area { min-height: 220px; resize: vertical; white-space: pre; tab-size: 2; }
.c-note { font: 12.5px/1.5 var(--sans); color: var(--code-muted); }
.c-note.live { color: #f3b866; }
.c-actions { display: flex; align-items: center; gap: 10px; }
.c-send { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--brand); color: #fff; font: 600 13px var(--sans); cursor: pointer; }
.c-send:hover { background: #e23a44; }
.c-send[disabled] { opacity: 0.6; cursor: progress; }
.c-send svg { width: 12px; height: 12px; }
.c-meta { margin-left: auto; font: 12px var(--mono); color: var(--code-muted); }

/* Search */
.search { position: fixed; inset: 0; z-index: 60; }
.search-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 26, 0.42); backdrop-filter: blur(2px); }
.search-box { position: relative; width: min(640px, calc(100% - 32px)); margin: 12vh auto 0; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 24px 60px -20px rgba(8, 12, 26, 0.45); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-field svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.search-field input { flex: 1; height: 56px; border: 0; outline: none; background: none; color: var(--ink); font: 400 16px var(--sans); }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 58vh; overflow-y: auto; }
.search-results a { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 9px; text-decoration: none; }
.search-results a .r-t { color: var(--ink); font-weight: 550; font-size: 14.5px; }
.search-results a .r-s { color: var(--ink-3); font-size: 12.5px; }
.search-results a .r-s.mono { font-family: var(--mono); font-size: 12px; }
.search-results a[aria-selected='true'], .search-results a:hover { background: var(--bg-hover); }
.search-empty { padding: 26px 12px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* Smaller screens */
@media (max-width: 1260px) {
  .guides { grid-template-columns: minmax(0, 760px); }
  .toc { display: none; }
}
@media (max-width: 1100px) {
  .ref-row { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 44px 32px; }
  .ref-text { max-width: none; }
  .ref-code .cp-stack { position: static; }
  .ref-intro { padding: 44px 32px 24px; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; position: fixed; inset: var(--top) 0 0 0; z-index: 25; height: auto; background: var(--bg); border-right: 0; }
  .sidebar.open { display: block; }
  .menu-btn { display: grid; }
  .search-btn { width: auto; margin-left: auto; }
  .search-btn span, .search-btn kbd { display: none; }
  .top-nav { display: none; }
  .guides { padding: 36px 20px 96px; }
  .ways { grid-template-columns: 1fr; }
  .way { display: grid; grid-template-columns: 120px 1fr; column-gap: 14px; align-items: center; padding: 12px 16px; }
  .way .ill-wrap { grid-row: span 2; height: 80px; margin: 0; }
  .g-ill { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .top { padding: 0 12px; gap: 6px; }
  .top-cta, .brand-name { display: none; }
  .hero h1 { font-size: 31px; }
  .hero-lead { font-size: 16px; }
  .ref-row { padding: 36px 16px; }
  .ref-intro { padding: 36px 16px 20px; }
  .ref-intro h1 { font-size: 30px; }
  .c-row { grid-template-columns: 1fr; }
  .changelog { grid-template-columns: 1fr; }
}

/* Illustration motion, as in the app; still under reduced motion. */
@keyframes ill-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ill-float-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes ill-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes ill-draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
@keyframes ill-wag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes ill-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes ill-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.ill[data-animate='true'] .ill-float { animation: ill-float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill[data-animate='true'] .ill-float-slow { animation: ill-float-slow 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill[data-animate='true'] .ill-pulse { animation: ill-pulse 2.6s ease-in-out infinite; }
.ill[data-animate='true'] .ill-draw { stroke-dasharray: 320; animation: ill-draw 1.6s ease-out forwards; }
.ill[data-animate='true'] .ill-wag { animation: ill-wag 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom left; }
.ill[data-animate='true'] .ill-blink { animation: ill-blink 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ill[data-animate='true'] .ill-rise { animation: ill-rise 0.6s ease-out both; }
.ill[data-animate='true'] .ill-rise-2 { animation: ill-rise 0.6s ease-out 0.12s both; }
.ill[data-animate='true'] .ill-rise-3 { animation: ill-rise 0.6s ease-out 0.24s both; }
@media (prefers-reduced-motion: reduce) {
  .cp-response.flash { animation: none; }
  .ill * { animation: none !important; }
  .ill .ill-draw { stroke-dashoffset: 0 !important; }
  .btn, .way { transition: none; }
}
