:root {
  --paper: #f5f1e7;
  --paper-raised: #fbf8f1;
  --paper-deep: #ebe5d7;
  --ink: #181611;
  --ink-soft: #38342c;
  --muted: #70685a;
  --line: rgba(24, 22, 17, .14);
  --line-strong: rgba(24, 22, 17, .28);
  --green: #175842;
  --green-deep: #0d3327;
  --green-dark: #0b241a;
  --lime: #d7f27a;
  --lime-soft: #e9f8b9;
  --orange: #cf562a;
  --code: #151712;
  --code-2: #1b1e18;
  --code-ink: #ece7da;
  --code-muted: #8d9586;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

a { color: inherit; text-decoration: none; }

p { margin: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -.025em;
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

code, pre { font-family: var(--mono); }

img, svg { display: block; }

.shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: .19;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 10000;
  background: transparent;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10001;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 13px;
}
.skip-link:focus { top: 12px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 241, 231, .82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(245, 241, 231, .94);
}

.topbar-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  flex-shrink: 0;
}
.brand-mark { width: 27px; height: 27px; }
.brand-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.035em;
}
.brand-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  transform: translateY(-1px);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline: auto;
  font-size: 13px;
  color: var(--ink-soft);
}
.topnav a {
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { transform: scaleX(1); }

.top-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--green);
  color: #f8f4e9;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, transform .2s var(--ease);
}
.top-cta:hover { background: var(--green-deep); transform: translateY(-1px); }
.top-cta .arrow { font-size: 13px; transition: transform .25s var(--ease); }
.top-cta:hover .arrow { transform: translate(2px, -2px); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 15px;
  height: 1.4px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 18px 24px 24px;
  background: var(--paper);
}
.mobile-nav nav { display: grid; gap: 2px; margin-bottom: 18px; }
.mobile-nav nav a {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.mobile-nav .btn { width: 100%; justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: background .2s, color .2s, transform .2s var(--ease), border-color .2s;
}
.btn-primary { background: var(--green); color: #f8f4e9; }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn-primary .arrow { transition: transform .25s var(--ease); }
.btn-primary:hover .arrow { transform: translateY(2px); }
.btn-lime { background: var(--lime); color: var(--green-dark); }
.btn-lime:hover { background: var(--lime-soft); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color .2s, color .2s;
}
.text-link:hover { border-color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(64px, 8vw, 112px) clamp(56px, 7vw, 92px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.eyebrow-sep { opacity: .45; }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #63b56f;
  box-shadow: 0 0 0 4px rgba(99, 181, 111, .14);
  flex-shrink: 0;
  animation: dot-pulse 2.8s var(--ease) infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 181, 111, .14); }
  50% { box-shadow: 0 0 0 7px rgba(99, 181, 111, .03); }
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(54px, 7.4vw, 92px);
  line-height: .96;
  letter-spacing: -.045em;
  font-variation-settings: "opsz" 120;
  margin-left: -.04em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--green);
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 1%; right: -2%;
  bottom: .06em;
  height: .18em;
  background: var(--lime);
  z-index: -1;
  transform: rotate(-1.2deg);
  border-radius: 2px;
}

.lead {
  max-width: 47ch;
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
}

.hero-facts {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 42px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
  margin-right: 12px;
  border-right: 1px solid var(--line-strong);
}
.hero-facts li:last-child { border-right: 0; padding-right: 0; margin-right: 0; }
.hero-facts li::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--orange);
  border-radius: 50%;
}

/* ---------- terminal ---------- */
.hero-terminal { position: relative; min-width: 0; }

.terminal {
  position: relative;
  background: var(--code);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 18px;
  color: var(--code-ink);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, .05) inset,
    0 32px 70px -24px rgba(24, 22, 17, .45),
    0 8px 24px -12px rgba(24, 22, 17, .3);
  overflow: hidden;
}

.terminal-badge {
  position: absolute;
  top: -52px;
  right: -8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--green-dark);
  border-radius: 10px;
  transform: rotate(2.2deg);
  box-shadow: 0 12px 26px -12px rgba(24, 22, 17, .45);
}
.terminal-badge .live-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 88, 66, .14);
  animation: none;
}
.terminal-badge span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.terminal-badge b { font-size: 11.5px; font-weight: 600; }
.terminal-badge small { font-family: var(--mono); font-size: 8.5px; opacity: .65; letter-spacing: .02em; }

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .025);
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(236, 231, 218, .22); }
.dots i:first-child { background: var(--orange); opacity: .85; }
.dots i:nth-child(2) { background: #d6b45e; opacity: .75; }
.dots i:last-child { background: #72a97a; opacity: .8; }
.terminal-title {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--code-muted);
}
.status-chip {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  padding: 4px 8px;
  color: var(--lime);
  border: 1px solid rgba(215, 242, 122, .26);
  background: rgba(215, 242, 122, .07);
  border-radius: 5px;
}

.terminal-body { padding: 20px 20px 18px; }
.terminal-pane { min-width: 0; }
.request-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.method {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--lime);
  color: var(--green-dark);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
}
.request-line code { font-size: 13px; color: var(--code-ink); }

.terminal-code {
  margin: 0;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.75;
  color: var(--code-ink);
  scrollbar-width: thin;
}
.terminal-code code { font-family: var(--mono); }
.response-code { font-size: 11.5px; line-height: 1.72; }

.terminal-divider {
  height: 1px;
  background: rgba(255, 255, 255, .08);
  margin: 18px 0;
  position: relative;
}
.terminal-divider::before {
  content: "yanıt";
  position: absolute;
  top: -6px;
  left: 0;
  padding-right: 10px;
  background: var(--code);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--code-muted);
}

.terminal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  color: var(--code-muted);
}
.terminal-foot span { display: inline-flex; align-items: center; gap: 7px; }
.key-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  opacity: .8;
}

.terminal-note {
  margin-top: 14px;
  text-align: right;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ---------- fact strip ---------- */
.fact-strip { border-block: 1px solid var(--line); }
.fact-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 22px;
}
.fact {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-inline: 24px;
  border-right: 1px solid var(--line);
}
.fact:first-child { padding-left: 0; }
.fact:last-child { border-right: 0; padding-right: 0; }
.fact > span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--orange);
  padding-top: 3px;
}
.fact p { display: flex; flex-direction: column; gap: 2px; }
.fact b { font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; }
.fact small { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ---------- layout ---------- */
.doc-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 76px);
  padding-block: 12px 0;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-top: 56px;
}
.toc-title {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.toc-nav { display: grid; gap: 1px; border-left: 1px solid var(--line); }
.toc-nav a {
  display: flex;
  gap: 12px;
  padding: 8px 0 8px 16px;
  font-size: 12.5px;
  color: var(--muted);
  position: relative;
  transition: color .2s;
}
.toc-nav a span {
  font-family: var(--mono);
  font-size: 8.5px;
  padding-top: 3px;
  color: rgba(112, 104, 90, .6);
  transition: color .2s;
}
.toc-nav a::before {
  content: "";
  position: absolute;
  left: -1px; top: 0; bottom: 0;
  width: 1.5px;
  background: var(--green);
  transform: scaleY(0);
  transition: transform .3s var(--ease);
}
.toc-nav a:hover { color: var(--ink); }
.toc-nav a.is-active { color: var(--ink); }
.toc-nav a.is-active span { color: var(--orange); }
.toc-nav a.is-active::before { transform: scaleY(1); }

.toc-card {
  margin-top: 36px;
  padding: 18px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.toc-card-kicker {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc-card p { margin: 8px 0 10px; font-size: 12.5px; line-height: 1.45; }
.toc-card a {
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  border-bottom: 1px solid rgba(23, 88, 66, .3);
  padding-bottom: 1px;
}

.doc { min-width: 0; padding-bottom: 80px; }

.chapter {
  padding-block: clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}
.chapter:first-child { border-top: 0; padding-top: 56px; }

.chapter-head { max-width: 760px; }
.chapter-index {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--orange);
  margin-bottom: 18px;
}
.chapter-index.light { color: var(--lime); }

.chapter h2 {
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 72;
}
.chapter-head > p {
  max-width: 62ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.65;
}

.minor-title {
  margin: 42px 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.chapter code {
  font-size: .88em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(23, 88, 66, .07);
  border: 1px solid rgba(23, 88, 66, .1);
  color: var(--green-deep);
  overflow-wrap: break-word;
}

/* ---------- endpoint bar ---------- */
.endpoint-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 13px 14px 13px 16px;
  background: var(--code);
  border-radius: 12px;
  color: var(--code-ink);
  overflow: hidden;
}
.endpoint-bar .method { flex-shrink: 0; }
.endpoint-bar > code {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--code-ink);
  font-size: 12.5px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.endpoint-bar > code::-webkit-scrollbar { display: none; }
.endpoint-bar .copy-btn { flex-shrink: 0; color: var(--code-muted); }
.endpoint-bar .copy-btn:hover { color: var(--lime); }

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 44px;
}
.step { border-top: 1px solid var(--line-strong); padding-top: 18px; }
.step-number {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--orange);
  letter-spacing: .1em;
}
.step h3 { margin: 12px 0 8px; font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
.step p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.step a { color: var(--green); border-bottom: 1px solid rgba(23, 88, 66, .3); }

/* ---------- callout ---------- */
.callout {
  margin-top: 40px;
  padding: 22px 24px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lime);
  border-radius: 0 12px 12px 0;
}
.callout-label {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.callout > p { font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.callout-ink { background: var(--paper-deep); border-left-color: var(--green); }
.callout .code-block { margin-top: 14px; }

/* ---------- code ---------- */
.code-block {
  position: relative;
  margin-top: 14px;
  background: var(--code);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(24, 22, 17, .08);
}
.code-block.compact { margin-top: 12px; }
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--code-muted);
}
.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: var(--code-ink);
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 2;
  scrollbar-width: thin;
}
.code-block pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.code-block pre::-webkit-scrollbar { height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 99px; }
.code-copy { color: var(--code-muted); flex-shrink: 0; }
.code-copy:hover { color: var(--lime); }
.code-block > .code-copy {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
}
.code-block:has(> .code-copy) pre { padding-top: 46px; }

.tok-com { color: #7c8877; font-style: italic; }
.tok-str { color: #c9e88c; }
.tok-key { color: #f0cf8d; }
.tok-num { color: #e8a06b; }
.tok-kw { color: #b9a6e8; }
.tok-bool { color: #e8a06b; }
.tok-var { color: #f2e2b6; }
.tok-fn { color: #90c8b0; }

/* ---------- copy button ---------- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}
.copy-btn:hover { color: var(--ink); }
.copy-icon {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1.2px solid currentColor;
  border-radius: 1.5px;
}
.copy-icon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 7px;
  height: 7px;
  border: 1.2px solid currentColor;
  border-radius: 1.5px;
  opacity: .55;
}
.copy-btn.is-copied .copy-label { color: var(--green); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin-top: 4px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.data-table th {
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.55;
  color: var(--ink-soft);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { white-space: nowrap; }
.data-table code { font-size: 11.5px; white-space: nowrap; }
.pill {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, .3);
}
.http-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}
.http-badge.ok { background: rgba(23, 88, 66, .1); color: var(--green); }
.http-badge.warn { background: rgba(207, 86, 42, .1); color: #a9431e; }
.http-badge.danger { background: rgba(180, 35, 35, .1); color: #a02323; }

/* ---------- auth ---------- */
.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 28px;
  margin-top: 36px;
  align-items: start;
}
.auth-grid .minor-title { margin-top: 0; }
.auth-grid p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }

.bot-card {
  background: var(--green-dark);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  color: var(--code-ink);
  overflow: hidden;
  box-shadow: 0 22px 44px -26px rgba(24, 22, 17, .5);
}
.bot-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.bot-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-dark);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.bot-card-head > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.25; }
.bot-card-head b { font-size: 11.5px; font-weight: 600; }
.bot-card-head small { font-family: var(--mono); font-size: 8px; color: rgba(236, 231, 218, .5); }
.online-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: rgba(236, 231, 218, .55);
}
.online-pill i { width: 4px; height: 4px; border-radius: 50%; background: #72c280; }

.bot-thread { padding: 16px 15px; display: grid; gap: 8px; }
.bubble {
  max-width: 91%;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1.5;
}
.bubble.bot {
  background: rgba(255, 255, 255, .07);
  border-bottom-left-radius: 3px;
  color: rgba(236, 231, 218, .82);
}
.bubble.user {
  justify-self: end;
  background: var(--lime);
  color: var(--green-dark);
  border-bottom-right-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
}
.bubble.key-bubble { display: flex; flex-direction: column; gap: 4px; }
.bubble.key-bubble small {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  color: rgba(236, 231, 218, .45);
}
.bubble.key-bubble code {
  font-size: 10px;
  color: var(--lime);
  background: rgba(215, 242, 122, .08);
  border: 1px solid rgba(215, 242, 122, .14);
  border-radius: 4px;
  padding: 3px 5px;
  align-self: flex-start;
}
.bubble.key-bubble span { font-family: var(--mono); font-size: 7.5px; color: rgba(236, 231, 218, .42); }
.bot-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 15px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(236, 231, 218, .48);
}
.one-key { color: var(--lime); opacity: .8; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.mini { border-top: 1px solid var(--line); padding-top: 16px; }
.mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  color: var(--green);
  margin-bottom: 10px;
}
.mini h4 { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.mini p { font-size: 12px; line-height: 1.6; color: var(--muted); }

/* ---------- tabs ---------- */
.tabs { margin-top: 32px; }
.tab-list {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-list button {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1.5px solid transparent;
  background: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .02em;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.tab-list button:hover { color: var(--ink); }
.tab-list button.is-active { color: var(--ink); border-bottom-color: var(--green); }
.tab-panel { padding-top: 14px; }
.tab-panel .code-block { margin-top: 0; }
.fine-print { margin-top: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* ---------- playground ---------- */
.playground {
  position: relative;
  overflow: hidden;
  background: var(--green-dark);
  color: var(--code-ink);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 30px 60px -34px rgba(24, 22, 17, .55);
}
.playground::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: -220px;
  right: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 242, 122, .12), transparent 66%);
  pointer-events: none;
}
.playground-head { position: relative; max-width: 620px; }
.playground-head h2 {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.03;
  letter-spacing: -.035em;
  color: #f6f1e4;
}
.playground-head p { margin-top: 12px; font-size: 13px; line-height: 1.65; color: rgba(236, 231, 218, .62); }
.playground-head code {
  background: rgba(215, 242, 122, .08);
  border-color: rgba(215, 242, 122, .15);
  color: var(--lime);
}

.try-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px auto;
  gap: 12px;
  align-items: end;
  margin-top: 28px;
}
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(236, 231, 218, .55);
}
.field label span { color: rgba(236, 231, 218, .3); letter-spacing: .04em; text-transform: none; }
.input-wrap { position: relative; display: flex; }
.input-wrap input { padding-right: 58px; }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: rgba(236, 231, 218, .3); }
.field input:focus { border-color: rgba(215, 242, 122, .65); background: rgba(255, 255, 255, .075); }
.field small { font-size: 9.5px; color: rgba(236, 231, 218, .38); line-height: 1.4; }
.field small a { color: rgba(215, 242, 122, .75); border-bottom: 1px solid rgba(215, 242, 122, .25); }
.reveal-key {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 8px;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  color: rgba(236, 231, 218, .48);
  text-transform: uppercase;
}
.reveal-key:hover { color: var(--lime); }
.try-submit {
  min-height: 44px;
  height: 44px;
  padding: 0 18px;
  font-size: 12.5px;
  white-space: nowrap;
  position: relative;
}
.try-submit:disabled { opacity: .6; cursor: wait; }
.spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(13, 51, 39, .25);
  border-top-color: var(--green-dark);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.try-submit.is-loading .spinner { display: inline-block; }
.try-submit.is-loading .btn-label { opacity: .65; }
@keyframes spin { to { transform: rotate(360deg); } }

.try-response {
  position: relative;
  margin-top: 20px;
  background: rgba(0, 0, 0, .26);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  overflow: hidden;
}
.try-response-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  flex-wrap: wrap;
}
.try-meta { display: flex; align-items: center; gap: 10px; }
.response-status {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  padding: 3px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .07);
  color: rgba(236, 231, 218, .55);
}
.response-status.is-ok { background: rgba(215, 242, 122, .13); color: var(--lime); }
.response-status.is-error { background: rgba(224, 91, 43, .16); color: #ffa98b; }
.response-time { font-family: var(--mono); font-size: 8.5px; color: rgba(236, 231, 218, .38); }
.try-actions { display: flex; gap: 6px; }
.ghost-btn {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .03em;
  color: rgba(236, 231, 218, .5);
  transition: color .2s, border-color .2s;
}
.ghost-btn:hover:not(:disabled) { color: var(--lime); border-color: rgba(215, 242, 122, .3); }
.ghost-btn:disabled { opacity: .35; cursor: default; }
.try-output {
  margin: 0;
  padding: 14px 15px 17px;
  min-height: 170px;
  max-height: 360px;
  overflow: auto;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--code-ink);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  scrollbar-width: thin;
}
.try-output code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
.try-output .tok-str { color: #c9e88c; }
.playground-note {
  position: relative;
  margin-top: 16px;
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(236, 231, 218, .38);
  max-width: 72ch;
}
.playground-note span { color: var(--lime); margin-right: 3px; }

/* ---------- security ---------- */
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 32px;
  margin-top: 38px;
}
.security-item { border-top: 1px solid var(--line-strong); padding-top: 16px; }
.security-number { font-family: var(--mono); font-size: 9px; color: var(--orange); letter-spacing: .08em; }
.security-item h3 { margin: 10px 0 7px; font-size: 15px; font-weight: 600; }
.security-item p { font-size: 13px; line-height: 1.65; color: var(--muted); }

.closing {
  position: relative;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.closing-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.closing h2 {
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(42px, 5.4vw, 64px);
  line-height: .98;
  letter-spacing: -.04em;
}
.closing h2 em { font-style: italic; color: var(--green); font-weight: 400; }
.closing p { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 44ch; }
.closing-actions { display: flex; align-items: center; gap: 24px; margin-top: 26px; }

/* ---------- footer ---------- */
.footer {
  margin-top: 40px;
  background: #12100c;
  color: rgba(245, 241, 231, .78);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr .8fr .8fr 1fr;
  gap: 40px;
  padding-block: 60px 52px;
}
.footer-brand p { margin-top: 14px; font-size: 12px; line-height: 1.6; color: rgba(245, 241, 231, .42); max-width: 28ch; }
.brand-light { color: var(--green); }
.brand-light .brand-name { color: #f5f1e7; }
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  color: rgba(245, 241, 231, .4);
}
.footer-status .live-dot { width: 5px; height: 5px; animation: none; box-shadow: none; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-title {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(245, 241, 231, .32);
  margin-bottom: 4px;
}
.footer-col a { font-size: 12.5px; color: rgba(245, 241, 231, .68); transition: color .2s; }
.footer-col a:hover { color: var(--lime); }
.footer-muted { font-size: 10.5px; line-height: 1.5; color: rgba(245, 241, 231, .28); margin-top: 2px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .03em;
  color: rgba(245, 241, 231, .3);
  flex-wrap: wrap;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 10002;
  transform: translate(-50%, 14px);
  padding: 9px 15px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.js.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
.js.reveal-ready .reveal-delay { transition-delay: .12s; }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}
.playground :focus-visible { outline-color: var(--lime); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr .92fr; gap: 40px; }
  .hero h1 { font-size: clamp(50px, 7vw, 76px); }
  .doc-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 40px; }
  .fact { padding-inline: 18px; }
}

@media (max-width: 920px) {
  .topnav { display: none; }
  .nav-toggle { display: flex; }
  .top-cta { margin-left: auto; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 58px;
    padding-top: 56px;
  }
  .hero-copy { max-width: 680px; }
  .hero-terminal { max-width: 620px; }
  .fact-strip-inner { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(3) { padding-left: 0; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .chapter:first-child { padding-top: 48px; }
  .auth-grid { grid-template-columns: minmax(0, 1fr); }
  .bot-card { max-width: 420px; }
  .try-form { grid-template-columns: 1fr 160px; }
  .try-submit { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 40px); }
  .topbar-inner { gap: 12px; }
  .brand-tag { display: none; }
  .top-cta { padding: 9px 13px; font-size: 11.5px; }
  .top-cta .arrow { display: none; }
  .hero { padding-block: 44px 56px; gap: 52px; }
  .hero h1 { font-size: clamp(46px, 13vw, 68px); }
  .lead { font-size: 15.5px; }
  .hero-actions { gap: 16px; flex-wrap: wrap; }
  .hero-facts { flex-wrap: wrap; row-gap: 8px; font-size: 9px; }
  .hero-facts li { padding-right: 10px; margin-right: 10px; }
  .terminal-badge { top: -46px; right: 8px; }
  .terminal-body { padding: 16px; }
  .terminal-code { font-size: 10.5px; }
  .response-code { font-size: 10px; }
  .terminal-foot { font-size: 7.5px; }
  .terminal-note { text-align: left; }
  .fact-strip-inner { padding-block: 18px; }
  .fact { gap: 10px; }
  .fact b { font-size: 11.5px; }
  .fact small { font-size: 10px; }
  .doc { padding-bottom: 48px; }
  .chapter { padding-block: 52px; }
  .chapter h2 { font-size: clamp(32px, 8vw, 40px); }
  .chapter-head > p { font-size: 15px; }
  .endpoint-bar { flex-wrap: wrap; gap: 10px; }
  .endpoint-bar > code { order: 3; width: 100%; flex-basis: 100%; font-size: 11px; }
  .endpoint-bar .copy-btn { margin-left: auto; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .mini-grid { grid-template-columns: 1fr; gap: 20px; }
  .auth-grid { gap: 24px; }
  .code-block pre { padding: 16px; font-size: 11.5px; }
  .table-wrap { overflow: visible; }
  .data-table { display: block; min-width: 0; }
  .data-table thead { display: none; }
  .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table tr {
    padding: 13px 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    padding: 5px 0;
    border: 0;
    font-size: 12.5px;
  }
  .data-table td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 2px;
    line-height: 1.6;
  }
  .data-table td:first-child { white-space: normal; }
  .data-table code { white-space: normal; }
  .data-table td > code { justify-self: start; }
  .security-grid { grid-template-columns: 1fr; gap: 24px; }
  .playground { padding: 26px 20px; border-radius: 16px; }
  .try-form { grid-template-columns: 1fr; gap: 14px; }
  .try-submit { grid-column: auto; }
  .playground-head p { font-size: 12px; }
  .try-response-head { align-items: flex-start; }
  .try-output { font-size: 10.5px; min-height: 150px; }
  .closing { margin-top: 44px; padding-top: 36px; }
  .closing-actions { gap: 18px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding-block: 44px 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { gap: 8px 16px; }
}

@media (max-width: 480px) {
  .top-cta { display: none; }
  .hero h1 { font-size: 44px; }
  .terminal-badge { padding: 8px 10px; }
  .terminal-badge b { font-size: 10px; }
  .terminal-badge small { font-size: 7.5px; }
  .terminal-bar { gap: 9px; padding: 11px 12px; }
  .terminal-title { font-size: 8px; }
  .status-chip { font-size: 8px; }
  .hero-facts { display: none; }
  .fact-strip-inner { grid-template-columns: 1fr; gap: 14px; }
  .fact { border-right: 0; padding-inline: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .fact:last-child { border-bottom: 0; padding-bottom: 0; }
  .chapter h2 { font-size: 31px; }
  .tabs { margin-top: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js.reveal-ready .reveal { opacity: 1; transform: none; }
}
