:root {
  color-scheme: light dark;
  --bg: #0b0d10;
  --bg-elev: #14171c;
  --border: #262b33;
  --text: #e6e9ee;
  --text-dim: #9aa4b2;
  --accent: #6ee7b7;
  --accent-dim: #2f7a5c;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfa;
    --bg-elev: #ffffff;
    --border: #e3e6ea;
    --text: #16181d;
    --text-dim: #5b6472;
    --accent: #0f9d68;
    --accent-dim: #d6f5e8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

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

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

pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
}

pre .c { color: var(--text-dim); }

code.inline {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.brand .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

nav a {
  color: var(--text-dim);
  margin-left: 22px;
  font-size: 0.92rem;
}
nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 20px 0 10px; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.hero p.lead {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 620px;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 34px; }
.badge {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
}

.cta-row { display: flex; gap: 12px; margin: 8px 0 48px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--border);
}
.btn.primary {
  background: var(--accent);
  color: #06231a;
  border-color: var(--accent);
}
.btn.primary:hover { text-decoration: none; opacity: 0.92; }
.btn.ghost { color: var(--text); }
.btn.ghost:hover { text-decoration: none; border-color: var(--text-dim); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #6b7280; }
.status-pill.up .dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.status-pill.down .dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }

section { margin: 56px 0; }
section h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
section h3 {
  font-size: 1.02rem;
  margin: 28px 0 10px;
  color: var(--text);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 16px 18px;
}
.card h4 { margin: 0 0 6px; font-size: 0.95rem; }
.card p { margin: 0; color: var(--text-dim); font-size: 0.88rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 16px 0;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text-dim); font-weight: 500; }
td code.inline { white-space: nowrap; }

.method {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
}
.method.get { background: rgba(59,130,246,0.15); color: #60a5fa; }
.method.post { background: rgba(34,197,94,0.15); color: #4ade80; }
.method.delete { background: rgba(239,68,68,0.15); color: #f87171; }

.endpoint {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 14px 0;
  background: var(--bg-elev);
}
.endpoint .path { font-family: var(--mono); font-size: 0.95rem; }
.endpoint p.desc { color: var(--text-dim); margin: 8px 0 12px; font-size: 0.9rem; }

footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
