/* =========================================================
   Cuelinks MCP — design tokens + base
   Light default, amber accent (#b47a18 / #e8a33d)
   Editorial / docs-first, matches developers portal family
   ========================================================= */
:root {
  /* LIGHT THEME (default) */
  --bg: #fbfaf6;
  --bg-1: #ffffff;
  --bg-2: #f4f2ec;
  --bg-3: #eae7df;
  --line: #e3ded2;
  --line-2: #cec8ba;
  --ink: #14120e;
  --ink-2: #45423c;
  --ink-3: #736e63;
  --ink-4: #9e988c;

  --accent: #b47a18;           /* amber-700 in light */
  --accent-ink: #ffffff;
  --accent-dim: #ead7ae;
  --accent-glow: rgba(180, 122, 24, 0.08);
  --accent-tint: #fbf3df;

  --method-get: #1f6aa7;
  --method-post: #1f7a4a;
  --method-del: #b23b20;
  --str: #2a6f2a;
  --num: #a0620d;
  --key: #2d47a3;
  --com: #8a857a;
  --fn: #14120e;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", "Source Serif Pro", Georgia, serif;

  --max: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --sec-y: clamp(64px, 9vw, 110px);

  --shadow-card: 0 1px 0 rgba(255,255,255,0.6) inset, 0 10px 30px -18px rgba(20, 18, 14, 0.12);
}

html[data-theme="dark"] {
  --bg: #0b0c0e;
  --bg-1: #101214;
  --bg-2: #15181c;
  --bg-3: #1c2026;
  --line: #22262d;
  --line-2: #2d323a;
  --ink: #eceae4;
  --ink-2: #b7b4ac;
  --ink-3: #7c7870;
  --ink-4: #55524b;

  --accent: #e8a33d;
  --accent-ink: #0b0c0e;
  --accent-dim: #8c6520;
  --accent-glow: rgba(232, 163, 61, 0.14);
  --accent-tint: #221a0c;

  --method-get: #5eb3e5;
  --method-post: #5ed29a;
  --method-del: #ff7f6b;
  --str: #b4d9a5;
  --num: #e8a33d;
  --key: #a6b8f5;
  --com: #5a5950;
  --fn: #eceae4;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 40px -20px rgba(0,0,0,0.55);
}

/* Compact density */
html[data-density="compact"] {
  --pad: clamp(16px, 3vw, 28px);
  --sec-y: clamp(44px, 6vw, 72px);
}
html[data-density="compact"] body { font-size: 14.5px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(40px, 5.6vw, 68px); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.028em; line-height: 1.08; }
h3 { font-size: 20px; letter-spacing: -0.015em; }
p  { margin: 0; }
.mono { font-family: var(--mono); }
code.inline {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 4px; color: var(--ink-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 500; font-size: 14px;
  transition: 120ms ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink-3); background: var(--bg-2); }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 8px 12px; }
.btn-ghost:hover { color: var(--ink); }
.btn .arrow { transition: transform 160ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -0.01em; }
.brand-logo { height: 20px; width: auto; max-width: 130px; display: block; object-fit: contain; }
html[data-theme="dark"] img.brand-logo { filter: brightness(0) invert(1); opacity: 0.95; }
.brand-logo-sm { height: 16px; max-width: 100px; opacity: 0.7; }
.nav-logo .devtag {
  font-family: var(--mono); font-size: 11px;
  padding: 3px 7px; border: 1px solid var(--line-2);
  border-radius: 4px; color: var(--ink-3);
  font-weight: 400; letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 6px 12px; font-size: 13.5px;
  color: var(--ink-2); border-radius: 4px; transition: 120ms;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  background: transparent; border: 1px solid var(--line-2);
  color: var(--ink-2); width: 30px; height: 30px;
  border-radius: 6px; display: grid; place-items: center; transition: 120ms;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink-3); }

@media (max-width: 880px) { .nav-links { display: none; } }

/* ---------- Sections ---------- */
section { padding: var(--sec-y) 0; border-top: 1px solid var(--line); }
section.no-top-border { border-top: 0; }
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 44px; max-width: 68ch;
}
.section-head p { color: var(--ink-2); font-size: 17px; line-height: 1.55; }

.accent-serif {
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 400; font-style: italic;
  letter-spacing: -0.02em;
}
.thin { color: var(--ink-3); font-weight: 300; }
