:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.12);
  --brand: #3b6fd6;
  --brand-2: #6d5cff;
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #b91c1c;
  --header: #111827;
  --surface: rgba(255, 255, 255, 0.9);
  --page:
    radial-gradient(circle at 12% -8%, rgba(59, 111, 214, 0.14), transparent 32rem),
    radial-gradient(circle at 88% 4%, rgba(109, 92, 255, 0.1), transparent 30rem),
    linear-gradient(180deg, #fbfdff 0%, #eef4ff 48%, #f8fafc 100%);
  --shadow: 0 0.85rem 2.2rem rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  display: flex;
  flex-direction: column;
}

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

.site-header {
  background: var(--header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  padding: 0 0.25rem;
}
.site-header a { color: #fff; text-decoration: none; }
.footer-inner, .shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner {
  width: calc(100% - 2.5rem);
  max-width: none;
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  flex: 0 0 36px;
}
.product-card { color: inherit; display: block; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.product-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.12); }
.product-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
main.shell.docs-shell {
  width: calc(100% - 2rem);
  max-width: none;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.docs-nav { padding: 1rem 1.1rem; position: sticky; top: 84px; max-height: calc(100vh - 7rem); overflow: auto; }
.docs-home { display: block; font-weight: 800; margin-bottom: 0.9rem; color: inherit; }
.docs-group { margin: 0.85rem 0; }
.docs-group-title { display: block; font-weight: 750; color: inherit; margin-bottom: 0.3rem; }
.docs-nav ul {
  list-style: none;
  padding: 0.15rem 0 0.15rem 0.85rem;
  margin: 0.15rem 0 0 0.2rem;
  border-left: 1px solid var(--line);
}
.docs-nav li { margin: 0.22rem 0; }
.docs-nav a { color: var(--muted); }
.docs-nav a.is-on { color: var(--ink); font-weight: 700; }
.docs-nav .docs-jump {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  text-decoration: none;
}
.docs-nav .docs-jump:hover { text-decoration: none; color: var(--ink); }
.docs-nav .docs-jump span:last-child { line-height: 1.35; }
.docs-path { margin-top: -0.4rem; }
.docs-section {
  scroll-margin-top: 5.5rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.docs-section:first-of-type { border-top: 0; margin-top: 0.75rem; padding-top: 0.5rem; }
.docs-section-title { margin: 0 0 0.35rem; font-size: 1.45rem; letter-spacing: -0.03em; }
.docs-route {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.docs-route code {
  font-size: 0.92rem;
  background: #f1f5f9;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
}
.docs-verb {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 2.6rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.22rem 0.32rem;
  border-radius: 4px;
  color: #fff;
}
.docs-verb-get { background: #2563eb; }
.docs-verb-put { background: #d97706; }
.docs-verb-post { background: #059669; }
.docs-verb-delete { background: #dc2626; }
.docs-nav .docs-verb { min-width: 2.35rem; margin-top: 0.12rem; }
.docs-subhead {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.docs-attrs { margin: 0 0 1rem; }
.docs-attr {
  display: grid;
  grid-template-columns: minmax(11rem, 34%) 1fr;
  gap: 0.65rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.docs-attr dt { margin: 0; }
.docs-attr dt code { font-weight: 700; color: var(--ink); }
.docs-type {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.docs-attr dd { margin: 0; color: var(--muted); line-height: 1.5; }
.docs-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}
.docs-split-code { position: sticky; top: 88px; display: grid; gap: 0.75rem; }
.docs-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.docs-code-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.55rem 0.9rem 0;
}
.docs-code pre {
  margin: 0;
  background: transparent;
  border-radius: 0;
  padding: 0.7rem 0.95rem 1rem;
}
.docs-note-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.docs-main pre {
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.docs-main code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.docs-main h2 { margin-top: 1.75rem; font-size: 1.12rem; }
.docs-main h2.docs-section-title { margin-top: 0; font-size: 1.45rem; }
.docs-main h3:not(.docs-subhead) { margin: 1.75rem 0 0.45rem; font-size: 1.12rem; }
.docs-main ul, .docs-main ol { color: var(--muted); line-height: 1.55; }
.docs-table-wrap { overflow: auto; margin: 0.9rem 0 1.1rem; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.docs-table th, .docs-table td { text-align: left; padding: 0.5rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.key-scopes { display: grid; gap: 0.35rem; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ledger-table th, .ledger-table td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); }
.ledger-table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.brand-sub { display: block; font-size: 0.72rem; font-weight: 600; opacity: 0.72; letter-spacing: 0; }
.nav { display: flex; gap: 1rem; margin-left: auto; align-items: center; font-size: 0.92rem; }
.nav a { opacity: 0.86; }
.nav a:hover { opacity: 1; text-decoration: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

main.shell { flex: 1; padding: 2.5rem 0 4rem; }
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.04em; margin: 0 0 0.75rem; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 40rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
}
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.price {
  margin: 0.35rem 0 0.5rem;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.price span { font-size: 1rem; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.section-title { margin: 2rem 0 0.75rem; font-size: 1.35rem; letter-spacing: -0.03em; }
.plan-limits { margin: 0.85rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.92rem; }
.plan-limits li { padding: 0.35rem 0; border-top: 1px solid var(--line); }
.plan-limits strong { color: var(--ink); }
.pricing-usage { margin-top: 1.75rem; }
.pricing-usage .docs-table { font-size: 0.95rem; }
label { display: block; font-weight: 650; font-size: 0.88rem; margin: 0.85rem 0 0.35rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; color: var(--muted); }
.check input { width: auto; margin-top: 0.2rem; }
.note { color: var(--muted); font-size: 0.92rem; }
.alert { border-radius: 10px; padding: 0.75rem 0.9rem; margin: 0.75rem 0; font-size: 0.92rem; }
.alert-bad { background: #fef2f2; color: var(--danger); }
.alert-ok { background: #ecfdf5; color: var(--ok); }
.alert-warn { background: #fffbeb; color: var(--warn); }
.hidden { display: none !important; }
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
}
.legal h2 { margin-top: 2rem; font-size: 1.15rem; }
.legal p, .legal li { color: var(--muted); line-height: 1.6; }
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(241, 245, 249, 0.92);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 1.25rem; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-grid h3 { margin: 0 0 0.5rem; color: var(--ink); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 0.35rem 0; }
.cookie-bar {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 40;
  background: #111827;
  color: #e5e7eb;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-bar p { margin: 0; max-width: 46rem; font-size: 0.92rem; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav .hide-sm { display: none; }
  main.shell.docs-shell { grid-template-columns: 1fr; }
  .docs-nav { position: static; max-height: none; }
  .docs-split { grid-template-columns: 1fr; }
  .docs-split-code { position: static; }
  .docs-attr { grid-template-columns: 1fr; }
}
