/* Clay × IntelliJ / Heroku / Swagger — API Reference vibe */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #1a1512;
  --bg-2: #221c18;
  --surface: #262019;
  --surface-2: #2e261f;
  --accent: #d4a574;
  --accent-2: #b8956a;
  --accent-dim: rgba(212, 165, 116, 0.5);
  --ink: #f2ebe5;
  --muted: #9a8b7d;
  --stroke: rgba(212, 165, 116, 0.12);
  --stroke-strong: rgba(212, 165, 116, 0.25);
  --shadow: rgba(0, 0, 0, 0.5);
  --code-bg: #14100e;
  --code-key: #d4a574;
  --code-string: #b8a090;
  --code-number: #c9b896;
  --space-xxs: 6px;
  --space-xs: 10px;
  --space-s: 14px;
  --space-m: 18px;
  --space-l: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  /* HTTP method colors (Swagger-style) */
  --get: #61affe;
  --get-bg: rgba(97, 175, 254, 0.15);
  --post: #49cc90;
  --post-bg: rgba(73, 204, 144, 0.15);
  /* Set by docs.js from measured nav height; fallback avoids overlap under fixed nav */
  --nav-offset: 88px;
}

html {
  scroll-padding-top: var(--nav-offset);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.court-bg {
  position: relative;
  overflow: hidden;
}

/* overflow:hidden breaks position:sticky vs viewport — nav can overlap hero after #hash scroll */
body.api-docs .court-bg {
  overflow: visible;
}

/* Subtle grid background (antenna / circuit feel) */
body.api-docs .court-bg::before {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-image:
    linear-gradient(rgba(212, 165, 116, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 165, 116, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.court-bg::after {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.08), transparent 65%);
  bottom: -220px;
  right: -180px;
}

/* ——— Nav: fixed on API docs so hero never sits under the bar (sticky + overflow parent bug) ——— */
body.api-docs .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ——— Nav: sticky, accent bar, dev-doc feel ——— */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  gap: 24px;
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--stroke-strong);
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.brand-mark::after {
  inset: 6px;
  border: 1px solid rgba(26, 21, 18, 0.6);
  border-radius: 6px;
}

.brand-name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}

.links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong);
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

button {
  font-family: "Space Grotesk", sans-serif;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

button.primary {
  background: var(--accent);
  color: #1a1512;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.35);
}

button.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--stroke-strong);
  color: var(--ink);
}

button.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-dim);
}

/* Link as button (nav, CTAs) */
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

a.btn.primary {
  background: var(--accent);
  color: #1a1512;
  border: none;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.35);
}

a.btn.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

a.btn.ghost {
  background: transparent;
  border: 1px solid var(--stroke-strong);
  color: var(--ink);
}

a.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-dim);
}

a.btn:focus-visible,
button:focus-visible,
.links a:focus-visible,
.on-this-page-link:focus-visible,
.anchor-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ——— Swagger-style layout ——— */
.doc-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* Space for fixed nav — height synced via --nav-offset in docs.js */
body.api-docs .doc-shell {
  padding-top: var(--nav-offset);
}

.doc-main {
  min-width: 0;
}

/* ——— Hero ——— */
.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr);
  gap: var(--space-xl);
  padding: var(--space-2xl) 0 calc(var(--space-2xl) + var(--space-m));
  align-items: start;
  max-width: 1540px;
  margin: 0 auto;
}

.hero-image {
  grid-column: 1 / 2;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  align-self: start;
  height: fit-content;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  background: transparent;
  display: block;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: none;
  position: relative;
  z-index: 0;
}

/* Hero API: overlay with status */
.hero-image--api {
  position: relative;
}

.hero-rank {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(26, 21, 18, 0.85);
  border: 1px solid rgba(212, 165, 116, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  min-width: 110px;
  z-index: 2;
}

.hero-rank-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}

.hero-rank-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.hero-rank-tour {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.hero-rank-ghost {
  position: absolute;
  right: 16px;
  bottom: 20px;
  font-size: 120px;
  font-weight: 700;
  color: rgba(242, 235, 229, 0.08);
  letter-spacing: -0.02em;
  pointer-events: none;
  z-index: 1;
}

.hero-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.api-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: 4px;
}

.api-status {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #49cc90;
  box-shadow: 0 0 8px rgba(73, 204, 144, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

a.api-status {
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

a.api-status:hover {
  color: var(--ink);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Base URL block (Swagger/Stripe style) */
.base-url {
  margin: 20px 0;
  padding: 12px 16px;
  background: var(--code-bg);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.base-url-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.base-url-value {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0 20px;
}

.hero-gets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 16px;
}

.get-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.get-value {
  font-weight: 600;
  font-size: 14px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.hero-copy {
  grid-column: 2 / 3;
}

/* Signal strength decoration (antenna vibe) */
.hero-signal {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-top: 20px;
  height: 24px;
}

.hero-signal-bar {
  width: 6px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.6;
}

.hero-signal-bar:nth-child(1) { height: 8px; }
.hero-signal-bar:nth-child(2) { height: 14px; }
.hero-signal-bar:nth-child(3) { height: 20px; }
.hero-signal-bar:nth-child(4) { height: 24px; opacity: 1; }

.pill {
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(212, 165, 116, 0.15);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--accent);
}

.pill--get {
  background: var(--get-bg);
  color: var(--get);
  border: 1px solid rgba(97, 175, 254, 0.35);
}

.pill--post {
  background: var(--post-bg);
  color: var(--post);
  border: 1px solid rgba(73, 204, 144, 0.35);
}

.mono.path {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--ink);
}

.path-param {
  color: var(--accent);
  font-weight: 500;
}

/* ——— Sections ——— */
.section {
  padding: var(--space-2xl) 0;
  display: grid;
  gap: var(--space-l);
  scroll-margin-top: var(--nav-offset);
}

/* Hero is an anchor target (#overview); keep it clear of the fixed nav */
#overview.hero {
  scroll-margin-top: var(--nav-offset);
}

.signup-section,
.changelog-section {
  padding: var(--space-xl) 0;
  gap: var(--space-m);
}

.status-section {
  padding: var(--space-s) 0 0;
  gap: var(--space-xs);
}

.tiers,
.faq {
  padding: calc(var(--space-xl) + var(--space-xxs)) 0;
  gap: var(--space-m);
}

.section-title h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title h2::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cdefs%3E%3CradialGradient id='g' cx='35%25' cy='35%25' r='70%25'%3E%3Cstop offset='0%25' stop-color='%23fff8e8'/%3E%3Cstop offset='100%25' stop-color='%23d4a574'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='9' cy='9' r='8' fill='url(%23g)'/%3E%3Cpath d='M3.2 6.2 C5.2 7.4 7.1 7.8 9 7.8 C10.9 7.8 12.8 7.4 14.8 6.2' fill='none' stroke='%2331241c' stroke-opacity='0.45' stroke-width='1.2'/%3E%3Cpath d='M3.2 11.8 C5.2 10.6 7.1 10.2 9 10.2 C10.9 10.2 12.8 10.6 14.8 11.8' fill='none' stroke='%2331241c' stroke-opacity='0.45' stroke-width='1.2'/%3E%3Ccircle cx='9' cy='9' r='8' fill='none' stroke='%23b89266' stroke-width='1'/%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.35);
}

.section-title p {
  color: var(--muted);
  max-width: 520px;
  font-size: 16px;
}

.section-title code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  padding: 2px 6px;
  background: var(--code-bg);
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid var(--stroke);
}

.section-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.anchor-link:hover,
.anchor-link:focus-visible {
  opacity: 1;
  color: var(--accent);
}

.anchor-link::after {
  content: "¶";
  font-size: 14px;
  font-weight: 600;
}

.anchor-link--copied {
  color: var(--post);
  opacity: 1;
}

.anchor-link--copied::after {
  content: "✓";
}

@media (max-width: 1200px) {
  .doc-shell {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1201px) {
  body.api-docs main {
    padding-right: 0;
  }
}

/* ——— Quickstart & Dev: IDE-style cards ——— */
.quickstart,
.dev {
  background: var(--bg-2);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.quick-grid,
.dev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-l);
}

.quick-card,
.dev-card {
  background: var(--surface);
  border-radius: 10px;
  padding: var(--space-l);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
}

.quick-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.quick-card h3,
.dev-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dev-card p,
.mini {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-xs);
}

.reference-card {
  background: var(--surface);
  border-radius: 10px;
  padding: var(--space-l);
  border: 1px solid var(--stroke);
  display: grid;
  gap: var(--space-xs);
}

.schema-table {
  display: grid;
  gap: var(--space-xxs);
  padding: var(--space-xs);
  background: var(--code-bg);
  border: 1px solid rgba(212, 165, 116, 0.12);
  border-radius: 8px;
}

.schema-row {
  display: grid;
  grid-template-columns: 110px 80px minmax(0, 1fr);
  gap: var(--space-xs);
  font-size: 12px;
  color: var(--muted);
}

.schema-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

.schema-field,
.schema-type {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  color: var(--ink);
}

.schema-type {
  color: var(--accent);
}

.error-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-xs);
  color: var(--muted);
  font-size: 13px;
}

.error-list li {
  position: relative;
  padding-left: 26px;
  line-height: 1.5;
}

.error-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cdefs%3E%3CradialGradient id='g' cx='35%25' cy='35%25' r='70%25'%3E%3Cstop offset='0%25' stop-color='%23fff8e8'/%3E%3Cstop offset='100%25' stop-color='%23d4a574'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='9' cy='9' r='8' fill='url(%23g)'/%3E%3Cpath d='M3.2 6.2 C5.2 7.4 7.1 7.8 9 7.8 C10.9 7.8 12.8 7.4 14.8 6.2' fill='none' stroke='%2331241c' stroke-opacity='0.45' stroke-width='1.2'/%3E%3Cpath d='M3.2 11.8 C5.2 10.6 7.1 10.2 9 10.2 C10.9 10.2 12.8 10.6 14.8 11.8' fill='none' stroke='%2331241c' stroke-opacity='0.45' stroke-width='1.2'/%3E%3Ccircle cx='9' cy='9' r='8' fill='none' stroke='%23b89266' stroke-width='1'/%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.35);
}

.error-list strong {
  color: var(--accent);
  font-weight: 600;
}

/* ——— Code blocks: IntelliJ-dark style ——— */
.code {
  background: var(--code-bg);
  border-radius: 8px;
  padding: var(--space-m);
  border: 1px solid rgba(212, 165, 116, 0.1);
  overflow-x: auto;
}

.code-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.code-header .code-label {
  margin-bottom: 0;
}

.code-copy {
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--stroke-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.code-copy:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(212, 165, 116, 0.08);
}

.code-copy--done {
  color: var(--post);
  border-color: rgba(73, 204, 144, 0.4);
  background: var(--post-bg);
}

.code--request {
  border-left: 3px solid var(--get);
}

.code--response {
  border-left: 3px solid var(--post);
  margin-top: 12px;
}

.code--error {
  border-left: 3px solid #e5534b;
  margin-top: 12px;
  background: rgba(229, 83, 75, 0.06);
}

.code pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--code-string);
  margin: 0;
}

.code pre code {
  color: inherit;
}

/* ——— Ticker ——— */
.ticker {
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  padding: 12px 0;
  background: var(--surface);
  overflow: hidden;
}

.ticker-track {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* ——— Endpoints: doc-style ——— */
.endpoints {
  background: var(--bg-2);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 40px;
}

.dev {
  padding-top: 32px;
}

.endpoints::before {
  background-image: repeating-linear-gradient(
      90deg,
      rgba(212, 165, 116, 0.04) 0px,
      rgba(212, 165, 116, 0.04) 1px,
      transparent 1px,
      transparent 80px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(212, 165, 116, 0.04) 0px,
      rgba(212, 165, 116, 0.04) 1px,
      transparent 1px,
      transparent 56px
    );
  opacity: 1;
}

.endpoint-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.endpoint {
  background: var(--surface);
  border-radius: 12px;
  padding: var(--space-l);
  border: 2px solid var(--accent);
}

.endpoint:nth-child(1) { border-color: rgba(97, 175, 254, 0.6); }
.endpoint:nth-child(2) { border-color: rgba(97, 175, 254, 0.6); }
.endpoint:nth-child(3) { border-color: rgba(73, 204, 144, 0.6); }

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.endpoint-header .path {
  flex: 1;
  min-width: 0;
}

.endpoint p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.55;
}

.endpoint-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  gap: var(--space-m);
}

.endpoint-meta p {
  margin-bottom: 0;
}

.endpoint-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xxs);
  margin: var(--space-xs) 0;
}

.endpoint-tags span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(212, 165, 116, 0.12);
  color: var(--accent);
}

.endpoint-params {
  margin-top: var(--space-xxs);
  border-top: 1px solid var(--stroke);
  padding-top: var(--space-xs);
  display: grid;
  gap: var(--space-xs);
}

.endpoint-params-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.params-row {
  display: grid;
  grid-template-columns: 90px 70px minmax(0, 1fr);
  gap: var(--space-xs);
  font-size: 13px;
  color: var(--muted);
}

.param-name {
  color: var(--ink);
  font-weight: 600;
}

.param-type {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  color: var(--accent);
}

.param-desc code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--accent);
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--stroke);
}

/* ——— Sample response ——— */
.sample {
  margin-top: var(--space-xl);
  background: var(--surface);
  border-radius: 12px;
  border: 2px solid rgba(73, 204, 144, 0.55);
  padding: var(--space-l);
}

.sample::after {
  background: linear-gradient(100deg, transparent, rgba(212, 165, 116, 0.06), transparent);
}

.sample-title {
  font-size: 16px;
  font-weight: 600;
}

.sample-sub {
  font-size: 12px;
  color: var(--muted);
}

.sample-code pre {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--code-string);
  margin: 0;
}

/* ——— Try it ——— */
.try-it {
  margin-top: var(--space-m);
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--stroke);
  padding: var(--space-l);
  display: grid;
  gap: var(--space-m);
}

.try-it-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.try-it-title {
  font-size: 16px;
  font-weight: 600;
}

.try-it-body {
  display: grid;
  gap: var(--space-xs);
}

.try-it-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.try-it-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.try-it-input input {
  flex: 1;
  background: var(--code-bg);
  border: 1px solid var(--stroke-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.try-it-btn {
  padding: 10px 16px;
}

/* ——— Use cases: product-feature cards (Heroku-style) ——— */
.use-cases .section-title h2 {
  margin-bottom: 8px;
}

.use-cases {
  padding-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.use-cases::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 165, 116, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 165, 116, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.25;
  pointer-events: none;
}

.use-cases > * {
  position: relative;
  z-index: 1;
}

.use-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.use-highlight {
  background: linear-gradient(145deg, rgba(212, 165, 116, 0.12), rgba(212, 165, 116, 0.04));
  border: 1px solid var(--stroke-strong);
  border-radius: 12px;
  padding: 22px 24px;
  display: grid;
  gap: 10px;
}

.highlight-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}

.use-highlight h3 {
  font-size: 18px;
  margin: 0;
}

.use-highlight p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.highlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.highlight-meta span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(212, 165, 116, 0.15);
  color: var(--accent);
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.use-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 22px 24px;
  border: 1px solid var(--stroke);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.use-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(212, 165, 116, 0.15);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.use-card:hover {
  border-color: var(--stroke-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.use-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}

.use-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ——— Values ——— */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding-top: 28px;
}

.value-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 24px;
  border: 1px solid var(--stroke);
}

.value-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.value-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ——— Tiers / pricing ——— */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.price-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 28px 24px;
  border: 1px solid var(--stroke);
  text-align: center;
  display: grid;
  gap: 14px;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(212, 165, 116, 0.12), var(--surface));
  border: 2px solid var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.price-card.featured .price {
  color: var(--accent);
}

.price {
  font-size: 22px;
  font-weight: 700;
}

.tier-note {
  font-size: 13px;
  color: var(--muted);
}

/* ——— FAQ ——— */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.faq-item {
  background: var(--surface);
  border-radius: 10px;
  padding: 22px;
  border: 1px solid var(--stroke);
}

.faq-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.faq-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ——— Signup / Changelog / Status sections ——— */
.signup-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

a.btn--large {
  padding: 14px 24px;
  font-size: 16px;
}

.signup-cta .mini a {
  color: var(--accent);
  text-decoration: none;
}

.signup-cta .mini a:hover {
  text-decoration: underline;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.changelog-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-date {
  color: var(--muted);
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.changelog-text {
  color: var(--ink);
  line-height: 1.5;
}

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  max-width: 480px;
}

.status-card .api-status-dot {
  flex-shrink: 0;
  margin-top: 4px;
}

.status-card strong {
  display: block;
  margin-bottom: 4px;
}

.status-card .mini {
  margin: 0;
}

.status-card a {
  color: var(--accent);
  text-decoration: none;
}

.status-card a:hover {
  text-decoration: underline;
}

.sample-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.sample-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ——— Footer ——— */
.footer {
  border-top: 1px solid var(--stroke);
  padding: 12px 48px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--bg-2);
}

.footer .brand-name {
  font-size: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  60% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 980px) {
  .nav {
    padding: 14px 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-shell {
    padding: var(--nav-offset) 20px 64px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 40px 0 56px;
  }

  /* Reset explicit column placement so one-column layout doesn’t create an implicit 2nd column
     (which squeezed the image and overlapped the heading). */
  .hero-image {
    grid-column: 1 / -1;
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .use-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 56px 0;
  }

  .footer {
    padding: 28px 24px 40px;
  }

  .endpoint-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-image {
    display: none;
  }

  .hero-copy {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .hero-copy > * {
    width: 100%;
    max-width: 520px;
  }

  .hero-copy .hero-actions {
    justify-content: center;
  }

  .hero-copy .base-url {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-copy .hero-gets,
  .hero-copy .hero-metrics {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-copy .hero-gets,
  .hero-copy .hero-metrics,
  .hero-copy .hero-note {
    text-align: center;
  }

  .hero-copy .hero-gets .get-item {
    align-items: center;
  }

  .hero-copy .hero-signal {
    justify-content: center;
  }

  .player-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .score-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .use-header {
    grid-template-columns: 1fr;
  }

  .use-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .schema-row {
    grid-template-columns: 1fr;
  }
}

/* ——— Featured try-it widget ——— */
.try-it--featured {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.08), rgba(212, 165, 116, 0.03));
  border: 1px solid var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 28px;
  margin-top: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.try-it--featured .try-it-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.try-it--featured .try-it-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.try-it--featured .try-it-input {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.try-it--featured .try-it-input input {
  flex: 1;
  background: var(--code-bg);
  border: 1px solid var(--stroke-strong);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.try-it--featured .try-it-input input:focus {
  border-color: var(--accent);
}

.try-it--featured .btn.primary {
  background: var(--accent);
  color: #1a1512;
  border-radius: 6px;
  font-weight: 700;
  padding: 10px 20px;
  white-space: nowrap;
}

.try-it--featured .btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.try-it-output-block {
  margin-top: 8px;
  min-height: 80px;
}

.try-it-live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(36, 226, 100, 0.12);
  color: #5dde8a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ——— Try it: name autocomplete ——— */
.try-it-autocomplete {
  position: relative;
  flex: 1;
  min-width: 0;
}

.try-it-autocomplete input {
  width: 100%;
}

.try-it-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface-2);
  border: 1px solid var(--stroke-strong);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 4px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  max-height: 280px;
  overflow-y: auto;
}

.try-it-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.try-it-dropdown-item:hover,
.try-it-dropdown-item:focus {
  background: rgba(212, 165, 116, 0.12);
  outline: none;
}

.dropdown-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.dropdown-meta {
  font-size: 12px;
  color: var(--muted);
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  white-space: nowrap;
}

/* ——— JSON syntax highlighting (try-it output) ——— */
.jk { color: var(--code-key);    font-weight: 500; }   /* key   */
.js { color: #a8c89a; }                                 /* string value — soft green */
.ji { color: #c9b896; }                                 /* number — warm sand */
.jb { color: #e8935a; }                                 /* boolean — orange */
.jn { color: var(--muted); font-style: italic; }        /* null — muted */
