/* ============================================================
   CALLSTACK — Website Styles
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/outfit-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+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  /* Dark theme (default) */
  --bg:          #0d1117;
  --bg-surface:  #161b22;
  --bg-card:     #21262d;
  --bg-hover:    #2d333b;
  --border:      #30363d;
  --border-muted:#21262d;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --text-subtle: #6e7681;

  /* Accent — HTTP method colors */
  --accent:         #10b981;   /* primary / GET */
  --accent-hover:   #0d9668;
  --accent-get:     #10b981;
  --accent-post:    #3b82f6;
  --accent-put:     #f59e0b;
  --accent-delete:  #ef4444;
  --accent-patch:   #a855f7;
  --accent-head:    #64748b;
  --accent-options: #64748b;

  /* Spacing (8px grid) */
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-5:  40px;
  --sp-6:  48px;
  --sp-8:  64px;
  --sp-12: 96px;
  --sp-16: 128px;

  /* Typography */
  --font-ui:   'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', 'Courier New', monospace;

  /* Layout */
  --max-w:        1200px;
  --sidebar-w:    260px;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.5);
  --shadow-lg:    0 4px 12px rgba(0,0,0,0.5);

  /* Transitions */
  --t-fast:  120ms ease;
  --t-base:  200ms ease;
}

[data-theme="light"] {
  --bg:          #ffffff;
  --bg-surface:  #f6f8fa;
  --bg-card:     #ffffff;
  --bg-hover:    #f3f4f6;
  --border:      #d0d7de;
  --border-muted:#e1e4e8;
  --text:        #1f2328;
  --text-muted:  #656d76;
  --text-subtle: #9ca3af;
  --accent:         #0d9668;
  --accent-hover:   #0b7d56;
  --shadow:       0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg:    0 4px 12px rgba(0,0,0,0.15);
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-base), color var(--t-base);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

p { color: var(--text-muted); }

ul, ol { padding-left: var(--sp-3); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--accent);
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.875rem;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-2); }
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: 60px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.header-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.header-logo:hover { text-decoration: none; color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
  list-style: none;
  padding: 0;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color var(--t-fast), background var(--t-fast);
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--text);
  background: var(--bg-hover);
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-16) 0 var(--sp-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16,185,129,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--sp-4);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(16,185,129,0.25), var(--shadow-lg);
}

.hero-icon img { width: 100%; height: 100%; object-fit: cover; }

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto var(--sp-3);
  font-weight: 400;
  line-height: 1.5;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-subtle);
  margin-bottom: var(--sp-5);
}

.hero-ctas {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(16,185,129,0.4);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ── Platform badges ────────────────────────────────────────── */
.platform-badges {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* ── Section wrapper ────────────────────────────────────────── */
.section {
  padding: var(--sp-12) 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: var(--sp-6);
}

/* ── Value props ────────────────────────────────────────────── */
.props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-3);
}

.prop-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.prop-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

.prop-icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-2);
  line-height: 1;
}

.prop-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.prop-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Feature cards ──────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-3);
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: border-color var(--t-fast);
}

.feature-card:hover { border-color: var(--border-hover, var(--text-subtle)); }

.feature-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-list li {
  font-size: 0.825rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

/* ── Secondary features (compact list) ─────────────────────── */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-2);
}

.secondary-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.secondary-item-icon {
  font-size: 1rem;
  line-height: 1.6;
  flex-shrink: 0;
}

.secondary-item-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.secondary-item-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Install section ────────────────────────────────────────── */
.install-section {
  text-align: center;
}

.install-tabs {
  display: flex;
  gap: var(--sp-1);
  justify-content: center;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.install-tab {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-ui);
}

.install-tab.active, .install-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.install-panel { display: none; max-width: 640px; margin: 0 auto; }
.install-panel.active { display: block; }

.code-block {
  position: relative;
  margin: var(--sp-2) 0;
  text-align: left;
}

.code-block pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
  overflow-x: auto;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--sp-2);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.code-block-header + pre {
  border-radius: 0 0 var(--radius) var(--radius);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all var(--t-fast);
}

.copy-btn:hover { color: var(--text); background: var(--bg-hover); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

/* ── Method badges ──────────────────────────────────────────── */
.method {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method-get    { background: rgba(16,185,129,0.15); color: var(--accent-get); }
.method-post   { background: rgba(59,130,246,0.15); color: var(--accent-post); }
.method-put    { background: rgba(245,158,11,0.15); color: var(--accent-put); }
.method-delete { background: rgba(239,68,68,0.15);  color: var(--accent-delete); }
.method-patch  { background: rgba(168,85,247,0.15); color: var(--accent-patch); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-8) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.footer-brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: var(--sp-3);
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--text); text-decoration: none; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-subtle);
  width: 100%;
  text-align: center;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-muted);
  margin-top: var(--sp-4);
}

/* ── Docs layout ────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - 60px);
  max-width: var(--max-w);
  margin: 0 auto;
}

.docs-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-3);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.docs-sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--sp-2);
  padding: 0 var(--sp-1);
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li + li { margin-top: 2px; }

.toc-list a {
  display: block;
  padding: 5px var(--sp-1);
  font-size: 0.825rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--t-fast), background var(--t-fast);
  text-decoration: none;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--text);
  background: var(--bg-hover);
  text-decoration: none;
}

.toc-list a.active {
  color: var(--accent);
  background: rgba(16,185,129,0.08);
  font-weight: 500;
}

.docs-content {
  padding: var(--sp-6) var(--sp-8);
  min-width: 0;
}

@media (max-width: 1024px) {
  .docs-content { padding: var(--sp-4) var(--sp-4); }
}

/* ── Docs content styles ────────────────────────────────────── */
.docs-section {
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.docs-section:last-of-type {
  border-bottom: none;
}

.docs-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--sp-4);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.docs-h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.docs-h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: var(--sp-4) 0 var(--sp-2);
  color: var(--text);
}

.docs-p {
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
  line-height: 1.7;
}

.docs-ul, .docs-ol {
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-ul li, .docs-ol li { line-height: 1.6; }

/* Callouts */
.callout {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--radius);
  margin: var(--sp-3) 0;
  border: 1px solid;
}

.callout-tip {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.3);
}

.callout-note {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.3);
}

.callout-warn {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.3);
}

.callout-icon { font-size: 1rem; line-height: 1.6; flex-shrink: 0; }

.callout-body { flex: 1; }

.callout-body strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.callout-body p, .callout-body span {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Step-by-step */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-3) 0;
}

.steps li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.steps li p, .steps li div {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Tables */
.docs-table-wrap { overflow-x: auto; margin: var(--sp-3) 0; }

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.docs-table th {
  padding: 10px var(--sp-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: left;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.docs-table td {
  padding: 10px var(--sp-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

.docs-table tr:nth-child(even) td { background: var(--bg-surface); }

/* Key shortcut display */
kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text);
  white-space: nowrap;
}

/* API reference cards */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
}

.api-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
}

.api-card-name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.api-card-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Automation step types */
.step-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
}

.step-type {
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-type-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.step-type-body strong {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
}

.step-type-body span {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Docs back link */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--sp-3) var(--sp-8);
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.docs-breadcrumb a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.docs-breadcrumb a:hover { color: var(--text); text-decoration: none; }

/* ── Docs mobile menu ────────────────────────────────────────── */
.docs-mobile-nav {
  display: none;
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.docs-mobile-nav select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar { display: none; }
  .docs-breadcrumb { padding: var(--sp-3) var(--sp-4); }
  .docs-mobile-nav { display: block; }
}

@media (max-width: 768px) {
  .hero { padding: var(--sp-12) 0 var(--sp-8); }
  .section { padding: var(--sp-8) 0; }
  .features-grid { grid-template-columns: 1fr; }
  .props-grid { grid-template-columns: 1fr 1fr; }
  .secondary-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .api-grid { grid-template-columns: 1fr; }
  .step-type-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .props-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .step-type-grid { grid-template-columns: 1fr; }
  .header-nav li:not(:last-child) { display: none; }
}

/* ── Highlight on scroll into view ──────────────────────────── */
:target {
  scroll-margin-top: 80px;
}

/* ── Anchor hover ───────────────────────────────────────────── */
.anchor-link {
  opacity: 0;
  padding: 0 6px;
  color: var(--text-subtle);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.875em;
  transition: opacity var(--t-fast);
}

h2:hover .anchor-link,
h3:hover .anchor-link {
  opacity: 1;
}

/* ── Scrollbar (global) ─────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }
