/* Styling for the public developer documentation.

   Same palette, fonts and glass surfaces as the landing and legal pages
   (see landing/legal.css) so the docs do not read as a different site —
   but a different layout, because this is long-form reference with a
   sidebar rather than a single column of prose. */

:root {
  --bg: #020617;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.025);
  --line: rgba(255,255,255,0.1);
  --line-soft: rgba(255,255,255,0.06);
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --mint: #6ee7b7;
  --amber: #fbbf24;
  --rose: #fb7185;
  --sky: #7dd3fc;
  --nav-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--slate-300);
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(30,41,59,0.45) 0%, transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(30,41,59,0.3) 0%, transparent 50%);
}

/* ---------------------------------------------------------------- header */

.doc-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px;
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.doc-top img { height: 24px; width: auto; display: block; }
.doc-top-right { display: flex; align-items: center; gap: 18px; }
.doc-top a { color: var(--slate-400); font-size: 13px; text-decoration: none; }
.doc-top a:hover { color: #fff; }
.doc-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mint); background: rgba(110,231,183,0.1);
  border: 1px solid rgba(110,231,183,0.25); border-radius: 999px; padding: 3px 10px;
}

/* ---------------------------------------------------------------- layout */

.doc-shell {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr);
  gap: 48px; padding: 0 28px 120px;
}

.doc-nav {
  position: sticky; top: 61px; align-self: start;
  max-height: calc(100vh - 61px); overflow-y: auto;
  padding: 36px 0 48px;
  font-size: 13.5px;
}
.doc-nav-group { margin-bottom: 22px; }
.doc-nav-title {
  color: var(--slate-600); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px;
}
.doc-nav a {
  display: block; color: var(--slate-400); text-decoration: none;
  padding: 4px 10px; border-radius: 7px; border-left: 2px solid transparent;
}
.doc-nav a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.doc-nav a.is-on { color: #fff; border-left-color: var(--mint); background: rgba(255,255,255,0.04); }

.doc-main { padding: 40px 0 0; min-width: 0; }

/* ------------------------------------------------------------- typography */

h1 {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; color: #fff;
  font-size: clamp(32px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.doc-lede { color: var(--slate-400); font-size: 17px; max-width: 62ch; margin-bottom: 34px; }

h2 {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; color: #fff;
  font-size: 24px; letter-spacing: -0.02em;
  margin: 64px 0 16px; padding-bottom: 11px; border-bottom: 1px solid var(--line);
  scroll-margin-top: 78px;
}
h3 {
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; color: #fff;
  font-size: 17px; margin: 34px 0 10px; scroll-margin-top: 78px;
}
h4 { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; color: var(--slate-300); font-size: 14px; margin: 22px 0 8px; }

p { font-size: 15px; margin-bottom: 14px; max-width: 74ch; }
ul, ol { font-size: 15px; margin: 0 0 16px 22px; max-width: 74ch; }
li { margin-bottom: 7px; }
strong { color: #fff; font-weight: 700; }
em { color: var(--slate-300); font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 48px 0; }

a { color: var(--mint); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------------- code */

code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  background: rgba(255,255,255,0.07); border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 1px 5px; color: #e2e8f0;
}
pre {
  background: rgba(0,0,0,0.38); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 18px;
  overflow-x: auto;
}
pre code {
  background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.6;
  color: #cbd5e1; white-space: pre;
}
/* Minimal, hand-applied highlighting — no syntax-highlighting library, so the
   page stays one file with no script to load or keep up to date. */
.t-key { color: var(--sky); }
.t-str { color: var(--mint); }
.t-num { color: var(--amber); }
.t-com { color: var(--slate-600); font-style: italic; }
.t-cmd { color: #fff; }

/* -------------------------------------------------------------- endpoints */

.ep {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  margin: 30px 0 10px; scroll-margin-top: 78px;
}
.ep-method {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  border-radius: 6px; padding: 4px 8px; border: 1px solid;
}
.m-get    { color: var(--sky);   background: rgba(125,211,252,0.1); border-color: rgba(125,211,252,0.3); }
.m-post   { color: var(--mint);  background: rgba(110,231,183,0.1); border-color: rgba(110,231,183,0.3); }
.m-patch  { color: var(--amber); background: rgba(251,191,36,0.1);  border-color: rgba(251,191,36,0.3); }
.m-delete { color: var(--rose);  background: rgba(251,113,133,0.1); border-color: rgba(251,113,133,0.3); }
.ep-path {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px; font-weight: 500; color: #fff;
}
.ep-scope {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--slate-500); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}

/* ----------------------------------------------------------------- blocks */

.doc-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px; margin: 22px 0;
}
.doc-card > :last-child { margin-bottom: 0; }

.doc-note {
  border-left: 3px solid var(--slate-600);
  background: var(--surface-2); border-radius: 0 10px 10px 0;
  padding: 14px 18px; margin: 22px 0;
}
.doc-note p { font-size: 14px; margin-bottom: 8px; }
.doc-note > :last-child { margin-bottom: 0; }
.doc-note--warn { border-left-color: var(--amber); background: rgba(251,191,36,0.05); }
.doc-note--mint { border-left-color: var(--mint); background: rgba(110,231,183,0.05); }

.doc-scroll { overflow-x: auto; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left; padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--line-soft); color: var(--slate-400);
  vertical-align: top;
}
th {
  color: #fff; font-weight: 700; font-size: 11px;
  letter-spacing: 0.07em; text-transform: uppercase;
  border-bottom-color: var(--line);
}
td code { white-space: nowrap; }

.doc-shot {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  display: block; margin: 22px 0;
}

.doc-foot {
  margin-top: 80px; padding-top: 26px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 10px 22px;
}
.doc-foot a, .doc-foot span { color: var(--slate-500); font-size: 12.5px; }
.doc-foot a:hover { color: #fff; }

/* ----------------------------------------------------------------- mobile */

@media (max-width: 900px) {
  .doc-shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 20px 80px; }
  .doc-nav {
    position: static; max-height: none; overflow: visible;
    padding: 24px 0 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px;
  }
  .doc-nav-cols { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
  .doc-nav a { padding: 3px 8px; }
  .doc-top { padding: 12px 20px; }
  .doc-main { padding-top: 24px; }
  pre { border-radius: 10px; padding: 14px; }
}
