/* ============================================================================
   Collimate.ai — Docs design system
   Direction: "Collimated Beam" — near-black canvas, off-white brand text,
   mint-teal → cyan spectral accent, optics/particle motif. Dark-only.
   ========================================================================== */

/* ----------------------------------------------------------------- Tokens */
:root {
  /* surfaces */
  --bg:           #07070A;
  --bg-grad:      #0A0A0F;
  --elev:         #0E0E14;
  --surface:      #121219;
  --surface-2:    #16161F;
  --surface-3:    #1C1C26;

  /* lines */
  --border:        rgba(249, 249, 247, 0.08);
  --border-soft:   rgba(249, 249, 247, 0.05);
  --border-strong: rgba(249, 249, 247, 0.16);

  /* text */
  --text:        #F9F9F7;
  --text-muted:  #ADAEB8;
  --text-faint:  #71727E;
  --text-dim:    #54555F;

  /* accent — collimated beam (mint-teal → cyan) */
  --accent:        #4FE6C7;
  --accent-bright: #8BFFE7;
  --accent-cyan:   #49CDF6;
  --accent-dim:    #1E8E7C;
  --accent-glow:   rgba(79, 230, 199, 0.16);
  --accent-soft:   rgba(79, 230, 199, 0.10);
  --beam:          linear-gradient(90deg, var(--accent-bright), var(--accent) 45%, var(--accent-cyan));

  /* syntax */
  --syn-comment: #5A6A6A;
  --syn-key:     #8BFFE7;
  --syn-str:     #E7C58B;
  --syn-num:     #49CDF6;
  --syn-fn:      #4FE6C7;
  --syn-punct:   #8A8B95;
  --syn-prop:    #C9CBD6;

  /* type */
  --font-sans: "Inter", ui-sans-serif, -apple-system, "SF Pro Text", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Menlo", monospace;

  /* metrics */
  --topbar-h: 60px;
  --sidebar-w: 270px;
  --toc-w: 232px;
  --content-max: 768px;
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}

/* layered background: deep gradient + faint top-center glow + dot grid */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 560px at 70% -8%, rgba(79,230,199,0.07), transparent 60%),
    radial-gradient(900px 500px at 8% 0%, rgba(73,205,246,0.05), transparent 55%),
    linear-gradient(180deg, var(--bg-grad), var(--bg) 40%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background-image: radial-gradient(rgba(249,249,247,0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 80%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 80%);
}

::selection { background: rgba(79,230,199,0.26); color: #fff; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(249,249,247,0.28); }

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-bright); }

/* ----------------------------------------------------------------- Topbar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 100;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  background: rgba(7,7,10,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar__brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.topbar__brand img { height: 17px; width: auto; display: block; opacity: 0.96; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.03em; color: var(--text); }
.footer__brand .wordmark { font-size: 16px; opacity: .9; }
.topbar__brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.topbar__tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--accent); border: 1px solid var(--accent-soft); background: var(--accent-soft);
  padding: 1px 7px; border-radius: 100px; text-transform: lowercase;
}
.topbar__spacer { flex: 1; }
.topbar__links { display: flex; align-items: center; gap: 4px; }
.topbar__links a {
  color: var(--text-muted); font-size: 13.5px; font-weight: 500;
  padding: 7px 11px; border-radius: 8px; transition: all .15s;
}
.topbar__links a:hover { color: var(--text); background: var(--surface-2); }
.topbar__cta {
  font-size: 13.5px !important; font-weight: 600 !important;
  color: var(--bg) !important; background: var(--beam);
  padding: 7px 15px !important; border-radius: 8px !important;
  box-shadow: 0 0 0 1px rgba(79,230,199,0.4), 0 6px 22px -8px var(--accent);
}
.topbar__cta:hover { filter: brightness(1.08); }
.topbar__search {
  display: flex; align-items: center; gap: 8px; cursor: text;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-faint); font-size: 13px;
  padding: 6px 10px; border-radius: 8px; min-width: 180px; transition: border-color .15s;
}
.topbar__search:hover { border-color: var(--border-strong); }
.topbar__search .k {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text-dim);
}
.topbar__burger {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; width: 38px; height: 38px; cursor: pointer;
}

/* ----------------------------------------------------------------- Layout */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1480px; margin: 0 auto;
  padding-top: var(--topbar-h);
}

/* --------------------------------------------------------------- Sidebar */
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding: 30px 14px 60px 22px;
  border-right: 1px solid var(--border-soft);
}
.nav-group { margin-bottom: 26px; }
.nav-group__title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim); padding: 0 10px; margin-bottom: 9px;
  display: flex; align-items: center; gap: 8px;
}
.nav-group__title::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-dim);
}
.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px; margin: 1px 0;
  color: var(--text-muted); font-size: 14px; font-weight: 450;
  border: 1px solid transparent; position: relative; transition: all .14s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active {
  color: var(--text); background: var(--accent-soft);
  border-color: rgba(79,230,199,0.18);
}
.nav-link.active::before {
  content: ""; position: absolute; left: -22px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 4px; background: var(--beam);
  box-shadow: 0 0 12px var(--accent);
}
.nav-link .ico { width: 15px; height: 15px; flex-shrink: 0; opacity: .8; }
.nav-link.active .ico { opacity: 1; }

/* --------------------------------------------------------------- Content */
.content {
  min-width: 0; padding: 44px 56px 120px;
  max-width: calc(var(--content-max) + 112px);
}
.content-inner { max-width: var(--content-max); }

.breadcrumb {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  margin-bottom: 18px; letter-spacing: .02em;
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb span { color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--beam); }

.content h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.08; letter-spacing: -0.02em; color: var(--text); margin: 0 0 18px;
}
.content h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 25px; letter-spacing: -0.015em;
  color: var(--text); margin: 64px 0 16px; padding-top: 8px; scroll-margin-top: 90px;
}
.content h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 18.5px; letter-spacing: -0.01em;
  color: var(--text); margin: 38px 0 12px; scroll-margin-top: 90px;
}
.content h2 .anchor, .content h3 .anchor {
  opacity: 0; margin-left: 9px; color: var(--text-dim); font-weight: 400;
  font-family: var(--font-mono); font-size: .7em; transition: opacity .15s; text-decoration: none;
}
.content h2:hover .anchor, .content h3:hover .anchor { opacity: 1; }
.content h2 .anchor:hover, .content h3 .anchor:hover { color: var(--accent); }

.content p { margin: 0 0 18px; }
.content .lead {
  font-size: 19px; line-height: 1.65; color: #C7C8D2; margin-bottom: 28px; font-weight: 380;
}
.content ul, .content ol { margin: 0 0 20px; padding-left: 22px; }
.content li { margin-bottom: 9px; }
.content li::marker { color: var(--accent-dim); }
.content strong { color: var(--text); font-weight: 600; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 56px 0; }
.content a.inline { border-bottom: 1px solid var(--accent-soft); }
.content a.inline:hover { border-color: var(--accent); }

/* inline code */
:not(pre) > code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--surface-2); border: 1px solid var(--border);
  color: #E7C58B; padding: 1.5px 6px; border-radius: 6px; white-space: nowrap;
}

/* --------------------------------------------------------- Hero (overview) */
.hero { position: relative; margin: 0 0 36px; }
.hero__canvas {
  position: absolute; inset: -44px -56px auto; height: 420px; width: calc(100% + 112px);
  z-index: 0; pointer-events: none;
  mask-image: linear-gradient(180deg, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(34px, 5.4vw, 54px); margin-bottom: 20px; }
.hero h1 .grad { background: var(--beam); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 20px; max-width: 640px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 8px; }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600;
  padding: 11px 19px; border-radius: 10px; cursor: pointer; transition: all .16s var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn .arr { transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--beam); color: #04110D; box-shadow: 0 0 0 1px rgba(79,230,199,0.4), 0 10px 30px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent-dim); color: var(--text); transform: translateY(-1px); }

/* ------------------------------------------------------------- Stat grid */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin: 32px 0;
}
.stat { background: var(--elev); padding: 20px 22px; }
.stat__num {
  font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -0.02em;
  color: var(--text); line-height: 1;
}
.stat__num .u { font-size: 0.55em; color: var(--accent); font-weight: 500; margin-left: 2px; }
.stat__label { font-size: 12.5px; color: var(--text-faint); margin-top: 8px; letter-spacing: .01em; }

/* --------------------------------------------------------------- Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; margin: 28px 0; }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  position: relative; display: block; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all .18s var(--ease); overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: radial-gradient(380px 160px at var(--mx,50%) -20%, var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity .25s;
}
.card:hover { border-color: rgba(79,230,199,0.3); transform: translateY(-3px); box-shadow: 0 18px 44px -24px rgba(0,0,0,0.8); }
.card:hover::after { opacity: 1; }
.card__ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(79,230,199,0.2); margin-bottom: 15px;
}
.card__ico svg { width: 19px; height: 19px; color: var(--accent); }
.card h3, .card__title {
  font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text);
  margin: 0 0 7px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 7px;
}
.card p { font-size: 13.5px; color: var(--text-faint); margin: 0; line-height: 1.6; }
.card .go { color: var(--accent); font-family: var(--font-mono); font-size: 12px; margin-top: 13px; display: inline-flex; gap: 6px; }
.card:hover .go .arr { transform: translateX(3px); }

/* feature row (icon + text, no box) */
.feature-list { display: grid; gap: 22px; margin: 28px 0; }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.feature__ico {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.feature__ico svg { width: 21px; height: 21px; color: var(--accent); }
.feature h3 { margin: 2px 0 6px; font-size: 16.5px; }
.feature p { margin: 0; font-size: 14.5px; color: var(--text-faint); }

/* --------------------------------------------------------- Code blocks */
.code-tabs { margin: 22px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--elev); }
.code-tabs__bar {
  display: flex; align-items: center; gap: 2px; padding: 7px 8px 0;
  background: var(--bg-grad); border-bottom: 1px solid var(--border);
}
.code-tabs__tab {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint);
  padding: 7px 14px; border-radius: 7px 7px 0 0; cursor: pointer; border: 1px solid transparent;
  border-bottom: none; transition: all .14s; background: none; position: relative; top: 1px;
}
.code-tabs__tab:hover { color: var(--text); }
.code-tabs__tab.active { color: var(--text); background: var(--elev); border-color: var(--border); }
.code-tabs__copy { margin-left: auto; }

.code-block { position: relative; margin: 22px 0; }
.code-block__head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; background: var(--bg-grad);
  border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
}
.code-block__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.code-block__lang { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); letter-spacing: .02em; }
.code-block__copy, .code-tabs__copy {
  margin-left: auto; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-faint); font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .14s;
}
.code-block__copy:hover, .code-tabs__copy:hover { color: var(--accent); border-color: var(--accent-dim); }
.code-block__copy.copied, .code-tabs__copy.copied { color: var(--accent); }
.code-block__copy svg, .code-tabs__copy svg { width: 13px; height: 13px; }

pre {
  margin: 0; padding: 18px 18px; overflow-x: auto;
  background: var(--elev); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 13.2px; line-height: 1.65;
}
.code-block pre { border-radius: 0 0 var(--radius) var(--radius); }
.code-tabs pre { border: none; }
.code-tabs__panel { display: none; }
.code-tabs__panel.active { display: block; }
/* standalone pre (rare) */
.content > pre, .content-inner > pre { border-radius: var(--radius); }
pre code { font-family: inherit; background: none; border: none; padding: 0; color: var(--text); white-space: pre; font-size: inherit; }

/* syntax tokens */
.tok-comment { color: var(--syn-comment); font-style: italic; }
.tok-key { color: var(--syn-key); }
.tok-str { color: var(--syn-str); }
.tok-num { color: var(--syn-num); }
.tok-fn { color: var(--syn-fn); }
.tok-punct { color: var(--syn-punct); }
.tok-prop { color: var(--syn-prop); }
.tok-op { color: #9FA0AA; }
.tok-flag { color: var(--accent-cyan); }
.tok-meta { color: var(--accent); }

/* --------------------------------------------------------------- Callouts */
.callout {
  display: grid; grid-template-columns: 22px 1fr; gap: 13px;
  padding: 16px 18px; border-radius: var(--radius); margin: 24px 0;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 2px solid var(--accent); font-size: 14.5px; line-height: 1.6;
}
.callout__ico { width: 19px; height: 19px; color: var(--accent); margin-top: 2px; }
.callout__ico svg { width: 19px; height: 19px; }
.callout p { margin: 0; color: var(--text-muted); }
.callout strong { color: var(--text); }
.callout--note { border-left-color: var(--accent-cyan); }
.callout--note .callout__ico { color: var(--accent-cyan); }
.callout--warn { border-left-color: #E7C58B; background: rgba(231,197,139,0.05); }
.callout--warn .callout__ico { color: #E7C58B; }
.callout--beta { border-left-color: #C792EA; background: rgba(199,146,234,0.05); }
.callout--beta .callout__ico { color: #C792EA; }
.callout__tag {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: #C792EA; border: 1px solid rgba(199,146,234,0.3); padding: 1px 6px; border-radius: 5px; margin-right: 6px;
}

/* --------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
thead th {
  text-align: left; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 500;
  padding: 12px 16px; background: var(--bg-grad); border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(249,249,247,0.015); }
tbody td strong { color: var(--text); }
table .hl { color: var(--accent); font-weight: 600; font-family: var(--font-mono); }
table .win { color: var(--accent); }
table .mono { font-family: var(--font-mono); font-size: 12.5px; }

/* --------------------------------------------------------------- Diagram */
.diagram {
  margin: 26px 0; padding: 22px 22px; border-radius: var(--radius);
  background: var(--elev); border: 1px solid var(--border);
  position: relative; overflow-x: auto;
}
.diagram::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: radial-gradient(500px 200px at 50% 0%, var(--accent-soft), transparent 70%); opacity: .5;
}
.diagram pre {
  background: none; border: none; padding: 0; position: relative;
  font-size: 12.5px; line-height: 1.5; color: var(--text-muted);
}
.diagram .b { color: var(--accent); }
.diagram .c { color: var(--accent-cyan); }
.diagram .d { color: var(--text-dim); }
.diagram .t { color: var(--text); }
.diagram__cap { font-size: 12.5px; color: var(--text-dim); margin-top: 14px; font-family: var(--font-mono); }

/* --------------------------------------------------------------- Pills/badges */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 100px; letter-spacing: .01em;
}
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.badge-beta {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: #C792EA; border: 1px solid rgba(199,146,234,0.35); background: rgba(199,146,234,0.08);
  padding: 2px 7px; border-radius: 5px; vertical-align: middle;
}

/* key-value def list */
.kv { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 22px 0; }
.kv__row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--border-soft); }
.kv__row:last-child { border-bottom: none; }
.kv__k { padding: 12px 16px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); background: var(--bg-grad); border-right: 1px solid var(--border-soft); }
.kv__v { padding: 12px 16px; font-size: 14px; color: var(--text-muted); }
.kv__v code { font-size: 0.85em; }

/* method/endpoint label */
.endpoint { display: flex; align-items: center; gap: 11px; margin: 30px 0 12px; flex-wrap: wrap; }
.endpoint .method {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 7px; text-transform: uppercase;
}
.method.get { color: #49CDF6; background: rgba(73,205,246,0.12); border: 1px solid rgba(73,205,246,0.3); }
.method.post { color: #4FE6C7; background: rgba(79,230,199,0.12); border: 1px solid rgba(79,230,199,0.3); }
.method.delete { color: #FF8E8E; background: rgba(255,142,142,0.1); border: 1px solid rgba(255,142,142,0.3); }
.endpoint .path { font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.endpoint .path b { color: var(--accent); font-weight: 600; }

/* numbered steps */
.steps { margin: 30px 0; counter-reset: step; }
.step { position: relative; padding-left: 56px; padding-bottom: 30px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 8px; bottom: -8px; width: 1px; background: var(--border); }
.step__n {
  counter-increment: step; position: absolute; left: 0; top: -2px;
  width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  font-family: var(--font-mono); color: var(--accent); font-weight: 600; font-size: 15px;
}
.step__n::before { content: counter(step); }
.step > h3:first-of-type, .step > h3 { margin-top: 0; }
.step h2 { font-size: 19px; margin: 0 0 12px; padding-top: 0; scroll-margin-top: 90px; }
.step p:last-child { margin-bottom: 0; }

/* prev/next nav */
.page-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }
.page-nav a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: all .16s var(--ease);
}
.page-nav a:hover { border-color: var(--accent-dim); background: var(--surface-2); transform: translateY(-2px); }
.page-nav .dir { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.page-nav .ttl { color: var(--text); font-weight: 600; font-size: 15px; }
.page-nav .next { text-align: right; }

/* footer */
.footer {
  grid-column: 1 / -1; border-top: 1px solid var(--border); margin-top: 40px;
  padding: 40px 56px; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: center;
}
.footer__brand { display: flex; align-items: center; gap: 11px; }
.footer__brand img { height: 16px; opacity: .8; }
.footer small { color: var(--text-dim); font-size: 12.5px; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--text-faint); font-size: 13.5px; }
.footer__links a:hover { color: var(--text); }

/* --------------------------------------------------------------- TOC */
.toc { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 44px 24px 60px 8px; }
.toc__title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc__list a {
  display: block; padding: 5px 14px; font-size: 13px; color: var(--text-faint);
  border-left: 2px solid transparent; margin-left: -1px; transition: all .14s; line-height: 1.45;
}
.toc__list a.lvl-3 { padding-left: 26px; font-size: 12.5px; }
.toc__list a:hover { color: var(--text); }
.toc__list a.active { color: var(--accent); border-left-color: var(--accent); }

/* --------------------------------------------------------------- Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* --------------------------------------------------------------- Mobile */
.scrim { display: none; }
@media (max-width: 1200px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  :root { --content-max: 100%; }
  .layout { grid-template-columns: 1fr; }
  .topbar__search { display: none; }
  .topbar__burger { display: grid; place-items: center; }
  .topbar__links .hide-sm { display: none; }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: 290px; z-index: 95;
    background: var(--bg-grad); border-right: 1px solid var(--border);
    transform: translateX(-102%); transition: transform .28s var(--ease); padding-left: 26px;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--topbar-h) 0 0; background: rgba(0,0,0,0.6); z-index: 90; }
  .content { padding: 32px 22px 90px; }
  .footer { padding: 32px 22px; }
  .hero__canvas { inset: -32px -22px auto; width: calc(100% + 44px); }
}
@media (max-width: 520px) {
  .page-nav { grid-template-columns: 1fr; }
  .kv__row { grid-template-columns: 1fr; }
  .kv__k { border-right: none; border-bottom: 1px solid var(--border-soft); }
  .hero h1 { font-size: 32px; }
}
