:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --accent-soft: #e0f2fe;
  --ok-bg: #dcfce7;
  --ok-text: #166534;
  --code-bg: #0b1120;
  --code-text: #e2e8f0;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  width: 24px;
  height: 24px;
  display: block;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok-text);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
nav a:hover, nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
nav a.ext-link {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 5px 12px;
  border-radius: 6px;
  border-bottom: none;
  font-weight: 600;
}
nav a.ext-link:hover {
  background: #bae6fd;
}
main {
  flex: 1;
  padding: 28px 0 48px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.hero {
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  color: #f8fafc;
  border: none;
  padding: 30px 28px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero p {
  margin: 0 0 22px;
  color: #cbd5e1;
  max-width: 760px;
}
.hero a {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.4);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.metric {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
}
.metric-label {
  font-size: 11.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.metric-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: #f8fafc;
}
h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}
h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 600;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
input[type="search"], select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
input[type="search"]:focus, select:focus {
  border-color: var(--accent);
}
input[type="search"] {
  flex: 1;
  min-width: 240px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface-alt);
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:last-child td { border-bottom: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12.5px;
}
.tag-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #ffffff;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.sub-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 10px 0 0;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tab-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--code-bg);
  color: #38bdf8;
  border-color: var(--code-bg);
}
.empty-note {
  display: none;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
  font-size: 13px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer a {
  color: var(--accent);
  text-decoration: none;
}
.center-box {
  text-align: center;
  padding: 48px 20px;
}
.code-404 {
  font-size: 56px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}
