:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --border: #e5e8ec;
  --text: #1c2430;
  --muted: #66707c;
  --brand: #2f6df6;
  --brand-ink: #ffffff;
  --ok: #1ea672;
  --code-bg: #0f1729;
  --code-text: #e6edf6;
  --radius: 12px;
  --wrap: 960px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-soft: #141922;
    --card: #161b23;
    --border: #263041;
    --text: #e7ecf3;
    --muted: #9aa6b4;
    --brand: #5b8cff;
    --code-bg: #0b1220;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* nav */
.nav { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand-mark { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--brand), #7aa2ff); display: inline-block; }
.nav-links { display: flex; gap: 18px; margin-left: 8px; flex: 1; }
.nav-links a { color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* buttons */
.btn { display: inline-block; padding: 8px 16px; border-radius: 9px; font-size: .95rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--card); }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 40px; background: radial-gradient(1200px 400px at 50% -120px, var(--bg-soft), transparent); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.1; margin: 18px 0 12px; letter-spacing: -0.02em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* status */
#status { margin-top: 32px; }
.status-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.status-link { margin-left: auto; font-size: .9rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.grid.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.metric { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.metric-num { font-size: 1.5rem; font-weight: 700; }

/* sections */
section.wrap { padding-top: 40px; }
h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 0 0 6px; }

/* code */
.code { background: var(--code-bg); color: var(--code-text); padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; font-size: .9rem; line-height: 1.6; }
.code code { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; }

/* endpoints table */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.endpoints { width: 100%; border-collapse: collapse; min-width: 520px; }
.endpoints th, .endpoints td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .95rem; }
.endpoints thead th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.endpoints tbody tr:last-child td, .endpoints tr:last-child td { border-bottom: none; }
.endpoints code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.m { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.m.get { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.m.post { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }

/* footer */
.footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 26px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); font-size: .9rem; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .grid.metrics { grid-template-columns: 1fr; }
}
