/* =========================================================================
   OpenGateway — shared site theme
   Dark, modern, OpenRouter-caliber. Open-source models only.
   ========================================================================= */

:root {
  /* Canvas + structure — near-black, blue-black hue */
  --bg: #06090c;
  --bg-raised: #0d141a;
  --surface: #121c24;
  --surface-2: #16222b;
  --surface-3: #1b2933;
  --border: #1e2a33;
  --border-strong: #2a3a45;
  --grid: rgb(255 255 255 / 0.05);

  /* Text */
  --text: #f2f6f8;
  --text-muted: #9db0bd;
  --text-faint: #5f7280;

  /* Accent — electric cyan = data / interactive / focus */
  --accent: #1fd5f9;
  --accent-bright: #6ae6ff;
  --accent-press: #00b4d9;
  --accent-soft: rgb(31 213 249 / 0.12);
  --accent-border: rgb(31 213 249 / 0.32);

  /* Brand secondary — violet for depth in gradients */
  --violet: #8b5cf6;
  --violet-soft: rgb(139 92 246 / 0.14);

  /* Status — emerald = open / operational */
  --ok: #10b981;
  --ok-bright: #34d399;
  --ok-soft: rgb(16 185 129 / 0.14);
  --warn: #f5b33c;
  --warn-soft: rgb(245 179 60 / 0.15);
  --down: #ff5c6c;
  --down-soft: rgb(255 92 108 / 0.15);

  /* Category accents */
  --cat-coding: #1fd5f9;
  --cat-chat: #34d399;
  --cat-vision: #8b5cf6;
  --cat-image: #f472b6;
  --cat-video: #fb923c;
  --cat-embedding: #a3e635;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI',
    Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas,
    'Liberation Mono', monospace;

  --maxw: 1200px;
  --maxw-wide: 1320px;
  --pad: clamp(18px, 4vw, 48px);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-bright);
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
input,
select {
  font: inherit;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  letter-spacing: -0.022em;
  margin: 0;
  font-weight: 650;
  color: var(--text);
}
p {
  margin: 0;
}
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--text-muted);
}
.faint {
  color: var(--text-faint);
}
.nowrap {
  white-space: nowrap;
}

/* ---------- layout helpers ---------- */
main {
  flex: 1;
  width: 100%;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}
.wrap-wide {
  max-width: var(--maxw-wide);
}
.section {
  padding: clamp(48px, 7vw, 92px) 0;
}
.section-sm {
  padding: clamp(36px, 5vw, 60px) 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.section-lead {
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 17px);
  max-width: 620px;
  margin-top: 14px;
  line-height: 1.6;
}
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

/* ---------- top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.nav-inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 12px var(--pad);
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand:hover {
  color: var(--text);
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent) 0%, #1668d6 60%, var(--violet) 130%);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px var(--accent-border),
    0 2px 14px rgb(31 213 249 / 0.28);
  color: #04212b;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
}
.brand .slash {
  color: var(--ok);
  font-family: var(--font-mono);
  font-weight: 700;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}
.nav-spacer {
  flex: 1;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
}
.nav-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.nav-status .dot.degraded {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}
.nav-status .dot.down {
  background: var(--down);
  box-shadow: 0 0 0 3px var(--down-soft);
}
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text);
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 580;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-press) 100%);
  color: #04212b;
  box-shadow: 0 2px 20px rgb(31 213 249 / 0.25);
}
.btn-primary:hover {
  color: #04212b;
  box-shadow: 0 4px 28px rgb(31 213 249 / 0.4);
}
.btn-ghost {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--surface);
}
.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: 8px;
}
.btn-lg {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 12px;
}

/* ---------- badges / pills / tags ---------- */
.oss-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
}
.oss-badge .dot {
  display: none;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.tag.accent {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.tag.ok {
  color: var(--ok-bright);
  border-color: rgb(16 185 129 / 0.3);
  background: var(--ok-soft);
}
.tag.cap {
  text-transform: capitalize;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 520;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pill.operational {
  color: var(--ok-bright);
  background: var(--ok-soft);
  border-color: rgb(16 185 129 / 0.3);
}
.pill.operational .dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.2);
}
.pill.degraded {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: rgb(245 179 60 / 0.3);
}
.pill.degraded .dot {
  background: var(--warn);
}
.pill.down {
  color: var(--down);
  background: var(--down-soft);
  border-color: rgb(255 92 108 / 0.3);
}
.pill.down .dot {
  background: var(--down);
}

/* category chips */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--bg-raised);
}
.cat-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.cat-chip[data-cat='coding'] .dot { background: var(--cat-coding); }
.cat-chip[data-cat='chat'] .dot { background: var(--cat-chat); }
.cat-chip[data-cat='vision'] .dot { background: var(--cat-vision); }
.cat-chip[data-cat='image'] .dot { background: var(--cat-image); }
.cat-chip[data-cat='video'] .dot { background: var(--cat-video); }
.cat-chip[data-cat='embedding'] .dot { background: var(--cat-embedding); }

/* ---------- avatar (author monogram) ---------- */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 8px;
}
.avatar.lg {
  width: 52px;
  height: 52px;
  font-size: 20px;
  border-radius: 13px;
}

/* ---------- generic cards ---------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

/* ---------- code blocks ---------- */
.code {
  position: relative;
  background: #060b0f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.code-head .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.code-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 3px 9px;
  transition: all 0.15s ease;
}
.code-copy:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #cfe3ec;
}
.code pre .c-key { color: var(--accent-bright); }
.code pre .c-str { color: var(--ok-bright); }
.code pre .c-com { color: var(--text-faint); }
.code pre .c-fn { color: var(--violet); }
.code pre .c-num { color: var(--warn); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: linear-gradient(180deg, transparent, rgb(255 255 255 / 0.012));
}
.footer-inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 48px var(--pad) 36px;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 13.5px;
  max-width: 320px;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 5px 0;
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 18px var(--pad) 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom .note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

/* =========================================================================
   HOME
   ========================================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 18% -5%, rgb(31 213 249 / 0.16) 0%, transparent 55%),
    radial-gradient(50% 60% at 92% 0%, rgb(139 92 246 / 0.14) 0%, transparent 55%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(75% 65% at 50% 0%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(75% 65% at 50% 0%, black 0%, transparent 78%);
  opacity: 0.6;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 720;
  max-width: 16ch;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent-bright) 0%, var(--accent) 40%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--text-muted);
  font-size: clamp(16px, 1.7vw, 20px);
  max-width: 56ch;
  margin-top: 22px;
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-stats {
  display: flex;
  gap: clamp(20px, 4vw, 56px);
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero-stat .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-stat .v .unit {
  color: var(--accent);
  font-size: 0.6em;
}
.hero-stat .k {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* code window in hero */
.hero-code {
  margin-top: 44px;
  max-width: 760px;
}

/* value props */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature-ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-bright);
  margin-bottom: 16px;
}
.feature-ico svg {
  width: 21px;
  height: 21px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 620;
  margin-bottom: 8px;
}
.feature p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- model card grid ---------- */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.model-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 19px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  color: var(--text);
}
.model-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.3);
  color: var(--text);
}
.model-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.model-card-id {
  min-width: 0;
  flex: 1;
}
.model-card-name {
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.model-card-author {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 2px;
}
.model-card-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.model-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.model-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.model-card-foot .price {
  color: var(--text);
}
.model-card-foot .price .free {
  color: var(--ok-bright);
}
.spec {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.spec svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

/* ---------- toolbar (search/filter) ---------- */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}
.search {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}
.search input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px 11px 40px;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search input::placeholder {
  color: var(--text-faint);
}
.search input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.select {
  position: relative;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 36px 11px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}
.select select:focus {
  border-color: var(--accent-border);
}
.select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-raised);
}
.seg button {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button:last-child {
  border-right: 0;
}
.seg button.active {
  background: var(--surface);
  color: var(--text);
}
.seg button:hover {
  color: var(--text);
}

/* category filter chips row */
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.filter-chip {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--accent-border);
}
.filter-chip.active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.filter-chip .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.filter-chip.active .count {
  color: var(--accent);
}

.result-count {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

/* ---------- data table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 820px;
}
table.data thead th {
  text-align: right;
  font-weight: 540;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data thead th.left {
  text-align: left;
}
table.data thead th.sortable {
  cursor: pointer;
  user-select: none;
}
table.data thead th.sortable:hover {
  color: var(--accent);
}
table.data thead th .arrow {
  color: var(--accent);
  font-size: 9px;
  margin-left: 3px;
}
table.data tbody td {
  text-align: right;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
table.data tbody tr:last-child td {
  border-bottom: 0;
}
table.data tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}
table.data tbody tr:hover td {
  background: var(--surface);
}
table.data td.left {
  text-align: left;
  font-family: var(--font-sans);
}
table.data .cell-model {
  display: flex;
  align-items: center;
  gap: 11px;
}
table.data .cell-model .nm {
  font-weight: 560;
  color: var(--text);
}
table.data .cell-model .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.cap-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 11px;
}
.cap-mark.yes {
  color: var(--ok-bright);
  background: var(--ok-soft);
}
.cap-mark.no {
  color: var(--text-faint);
}

/* ---------- empty state ---------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty svg {
  width: 40px;
  height: 40px;
  color: var(--text-faint);
  margin-bottom: 14px;
}

/* =========================================================================
   MODEL DETAIL
   ========================================================================= */
.detail-hero {
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  padding: 30px 0 34px;
}
.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 90% at 12% -20%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 18px;
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
}
.breadcrumb a {
  color: var(--text-muted);
}
.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.detail-head .avatar {
  width: 56px;
  height: 56px;
  font-size: 22px;
  border-radius: 14px;
}
.detail-title h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.detail-title .slug {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-faint);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.detail-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.stat-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised);
}
.stat-pill .k {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.stat-pill .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  color: var(--text);
}
.stat-pill .v.free {
  color: var(--ok-bright);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
  padding: 36px 0 20px;
}
.detail-main > section {
  margin-bottom: 34px;
}
.detail-main h2 {
  font-size: 18px;
  font-weight: 620;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.prose {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}
.prose p + p {
  margin-top: 14px;
}
.cap-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kv-cell {
  background: var(--bg-raised);
  padding: 15px 17px;
}
.kv-cell .k {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 7px;
}
.kv-cell .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  color: var(--text);
}
.kv-cell .v.free {
  color: var(--ok-bright);
}

/* sidebar */
.detail-side {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 19px;
}
.side-card h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: 14px;
  font-weight: 600;
}
.side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.side-row:last-child {
  border-bottom: 0;
}
.side-row .k {
  color: var(--text-muted);
}
.side-row .v {
  font-family: var(--font-mono);
  color: var(--text);
  text-align: right;
}
.route-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.route-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
}
.route-item .policy {
  color: var(--accent);
}

/* related models */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  color: var(--text);
}
.related-item:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.related-item .nm {
  font-size: 13.5px;
  font-weight: 540;
}
.related-item .sub {
  font-size: 11.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* =========================================================================
   STATUS PAGE (kept close to original, themed via shared tokens)
   ========================================================================= */
.band {
  position: relative;
  padding: 52px var(--pad) 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 90% at 50% -10%, var(--band-glow, var(--accent-soft)) 0%, transparent 62%);
  pointer-events: none;
}
.band::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 70% at 50% 0%, black 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(60% 70% at 50% 0%, black 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}
.band-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.band-inner > .oss-badge {
  display: inline-flex;
  margin-bottom: 18px;
}
.band-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  width: 100%;
}
.band-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
}
.band-pulse.degraded {
  background: var(--warn);
  box-shadow: 0 0 0 0 rgb(245 179 60 / 0.45);
  animation: pulse-amber 2.4s ease-out infinite;
}
.band-pulse.down {
  background: var(--down);
  box-shadow: 0 0 0 0 rgb(255 92 108 / 0.45);
  animation: pulse-red 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(16 185 129 / 0.5); }
  70% { box-shadow: 0 0 0 18px rgb(16 185 129 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(16 185 129 / 0); }
}
@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgb(245 179 60 / 0.5); }
  70% { box-shadow: 0 0 0 18px rgb(245 179 60 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(245 179 60 / 0); }
}
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgb(255 92 108 / 0.5); }
  70% { box-shadow: 0 0 0 18px rgb(255 92 108 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(255 92 108 / 0); }
}
.band-status .word {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
}
.band p {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 720px;
  margin: 0 0 16px;
}
.band-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.chip.live .dot { background: var(--ok); }
.chip.stale { color: var(--warn); border-color: var(--warn-soft); }
.chip.stale .dot { background: var(--warn); }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 38px;
}
.kpi {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 19px;
  min-width: 0;
}
.kpi-k {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 9px;
}
.kpi-v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 2vw, 27px);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  overflow-wrap: anywhere;
}
.kpi-v .unit {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 2px;
}
.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 7px;
}

.lanes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.lane {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.lane-name {
  font-weight: 600;
  font-size: 15px;
}
.lane-name .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 400;
  margin-top: 3px;
}
.lane-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.lane-metric .k {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.lane-metric .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--text);
  margin-top: 2px;
}
.lane-route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.lane-route-k {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.lane-route-link {
  font-size: 13px;
  font-weight: 520;
  color: var(--text);
  text-decoration: none;
}
.lane-route-link:hover {
  color: var(--accent);
}

.comp-group { margin-bottom: 22px; }
.comp-group-title {
  font-size: 11.5px;
  font-weight: 540;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 0 0 11px;
}
.comp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.comp-row:last-child { border-bottom: 0; }
.comp-name {
  font-weight: 520;
  font-size: 13.5px;
  min-width: 0;
}
.comp-name .comp-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  margin-top: 3px;
  font-weight: 400;
}
.comp-status {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  white-space: nowrap;
}
.legend {
  display: flex;
  gap: 15px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.legend-swatch.operational { background: var(--ok); }
.legend-swatch.degraded { background: var(--warn); }
.legend-swatch.down { background: var(--down); }
.incident-empty {
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 18px 20px;
}
.incident-empty .ok { color: var(--ok-bright); }
.empty-note {
  color: var(--text-faint);
  font-size: 12.5px;
  padding: 16px 2px 0;
}
.provider-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.provider-name .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.operational { background: var(--ok); }
.dot.degraded { background: var(--warn); }
.dot.down { background: var(--down); }
.comp-uptime {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-faint);
  min-width: 22px;
  text-align: right;
}
.cap-mark.yes { color: var(--ok-bright); background: var(--ok-soft); }

/* status: sortable provider table reuses table.data; align right by default */
table.routes thead th { text-align: right; }
table.routes thead th.left { text-align: left; }

/* ranking bars */
.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.rank-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 520;
}
.rank-row {
  display: grid;
  grid-template-columns: 96px 1fr 70px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.rank-label {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-track {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
.rank-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-press), var(--accent));
}
.rank-fill.ttft {
  background: linear-gradient(90deg, #6d4bd6, var(--violet));
}
.rank-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: right;
}

/* api surfaces */
.surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.surface {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px 18px;
}
.surface .lane-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 9px;
}
.surface .url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.surface .desc {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 8px;
  line-height: 1.55;
}
.surface.soon { opacity: 0.82; }
.surface.soon .lane-chip {
  color: var(--text-muted);
  background: var(--surface);
  border-color: var(--border-strong);
}

/* sync grid */
.sync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sync-cell {
  background: var(--bg-raised);
  padding: 15px 17px;
}
.sync-cell .k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 7px;
}
.sync-cell .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  color: var(--text);
}
.sync-cell .v.good { color: var(--ok-bright); }
.sync-cell .v.warn { color: var(--warn); }

/* placeholder (analytics not yet instrumented) */
.placeholder {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text-muted);
  font-size: 13.5px;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgb(255 255 255 / 0.012) 10px, rgb(255 255 255 / 0.012) 20px);
}
.placeholder strong { color: var(--text); font-weight: 600; }
.placeholder .badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 2px 7px;
  margin-right: 8px;
}
.status-section { margin-top: 52px; }
.status-section .section-head-row { margin-bottom: 16px; }
.status-section h2 { font-size: 19px; font-weight: 600; }
.status-section .hint { font-size: 12px; color: var(--text-faint); }

/* CTA band */
.cta {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 5vw, 60px);
  background:
    radial-gradient(80% 140% at 0% 0%, rgb(31 213 249 / 0.14), transparent 60%),
    radial-gradient(80% 140% at 100% 100%, rgb(139 92 246 / 0.14), transparent 60%),
    var(--bg-raised);
  text-align: center;
}
.cta h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.03em;
}
.cta p {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 14px auto 26px;
  font-size: 16px;
}
.cta .hero-cta {
  justify-content: center;
}

/* =========================================================================
   DOCS — sidebar + readable prose, built on the shared theme tokens.
   Same canvas, accent, fonts and code component as the marketing site, with
   the reading affordances a docs surface needs (nav rail, TOC, callouts).
   ========================================================================= */
:root {
  --docs-sidebar-w: 248px;
  --docs-toc-w: 220px;
  --docs-rail-top: 76px;
}

/* page header */
.docs-page-head {
  padding: 30px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.docs-breadcrumb a { color: var(--text-muted); }
.docs-breadcrumb .sep { color: var(--border-strong); }
.docs-page-head h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.docs-page-head .lead {
  color: var(--text-muted);
  font-size: clamp(15.5px, 1.5vw, 18px);
  line-height: 1.6;
  margin-top: 14px;
  max-width: 70ch;
}

/* layout: sidebar | content | toc */
.docs-shell {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}
.docs-layout {
  display: grid;
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) var(--docs-toc-w);
  gap: 40px;
  align-items: start;
}

/* left rail — section nav */
.docs-sidebar {
  position: sticky;
  top: var(--docs-rail-top);
  align-self: start;
  max-height: calc(100vh - var(--docs-rail-top) - 16px);
  overflow-y: auto;
  padding: 26px 0 40px;
  scrollbar-width: thin;
}
.docs-nav-section { margin-bottom: 22px; }
.docs-nav-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 8px 10px;
}
.docs-nav a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.docs-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.docs-nav a.active {
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 540;
}

/* center — content + prose */
.docs-content {
  min-width: 0;
  padding: 26px 0 56px;
}
.docs-content h2 {
  font-size: 23px;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
  padding-top: 6px;
  scroll-margin-top: 84px;
}
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
  margin: 28px 0 10px;
  color: var(--text);
  scroll-margin-top: 84px;
}
.docs-content p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.72;
  margin: 0 0 16px;
}
.docs-content a { color: var(--accent); }
.docs-content a:hover { color: var(--accent-bright); text-decoration: underline; }
.docs-content strong { color: var(--text); font-weight: 620; }
.docs-content ul,
.docs-content ol {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.72;
  margin: 0 0 16px;
  padding-left: 22px;
}
.docs-content li { margin: 6px 0; }
.docs-content li::marker { color: var(--text-faint); }
.docs-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}
.docs-content :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5px 6px;
  color: var(--accent-bright);
  white-space: nowrap;
}
.docs-content .code { margin: 0 0 18px; }
.docs-content .code + .code { margin-top: -6px; }

/* docs tables */
.docs-content .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 18px;
  background: var(--bg-raised);
}
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}
.docs-content thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  padding: 11px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.docs-content tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.docs-content tbody tr:last-child td { border-bottom: 0; }
.docs-content tbody td code { white-space: nowrap; }
.docs-content tbody td strong { color: var(--text); }

/* callouts */
.callout {
  display: flex;
  gap: 13px;
  padding: 15px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  margin: 0 0 18px;
}
.callout-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-top: 1px;
}
.callout-ico svg { width: 18px; height: 18px; }
.callout-body { min-width: 0; }
.callout-body p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.callout-body p + p { margin-top: 8px; }
.callout-title {
  display: block;
  font-weight: 620;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}
.callout.tip { border-color: rgb(16 185 129 / 0.3); background: var(--ok-soft); }
.callout.tip .callout-ico { color: var(--ok-bright); }
.callout.caution { border-color: rgb(245 179 60 / 0.32); background: var(--warn-soft); }
.callout.caution .callout-ico { color: var(--warn); }
.callout.note { border-color: var(--accent-border); background: var(--accent-soft); }
.callout.note .callout-ico { color: var(--accent-bright); }

/* API endpoint chip */
.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  margin: 0 0 18px;
  font-family: var(--font-mono);
  overflow-x: auto;
}
.endpoint .method {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}
.endpoint .method.get { color: var(--ok-bright); background: var(--ok-soft); border: 1px solid rgb(16 185 129 / 0.3); }
.endpoint .method.post { color: var(--accent-bright); background: var(--accent-soft); border: 1px solid var(--accent-border); }
.endpoint .path { font-size: 13.5px; color: var(--text); white-space: nowrap; }
.endpoint .path .host { color: var(--text-faint); }

/* doc card grid (intro hub) */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}
.doc-card {
  display: block;
  padding: 18px 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.doc-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.3);
  color: var(--text);
}
.doc-card .doc-card-title {
  font-weight: 620;
  font-size: 15.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-card .doc-card-title svg { width: 17px; height: 17px; color: var(--accent); }
.doc-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; margin: 0; }

/* right rail — on-page TOC */
.docs-toc {
  position: sticky;
  top: var(--docs-rail-top);
  align-self: start;
  max-height: calc(100vh - var(--docs-rail-top) - 16px);
  overflow-y: auto;
  padding: 30px 0 40px;
  font-size: 13px;
}
.docs-toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}
.docs-toc a {
  display: block;
  color: var(--text-faint);
  padding: 4px 0 4px 11px;
  border-left: 2px solid var(--border);
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs-toc a:hover { color: var(--text-muted); }
.docs-toc a.h3 { padding-left: 22px; font-size: 12.5px; }
.docs-toc a.active {
  color: var(--accent-bright);
  border-left-color: var(--accent);
}

/* prev / next pager */
.docs-pager {
  display: flex;
  gap: 14px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.docs-pager a {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.docs-pager a:hover { border-color: var(--accent-border); background: var(--surface); color: var(--text); }
.docs-pager a.next { text-align: right; }
.docs-pager .dir {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.docs-pager .lbl { display: block; font-weight: 560; font-size: 15px; margin-top: 5px; }

/* mobile sidebar toggle */
.docs-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 16px 0 4px;
  padding: 11px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 14px;
  font-weight: 540;
}
.docs-sidebar-toggle svg { width: 17px; height: 17px; color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .docs-layout { grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar-toggle { display: flex; }
  .docs-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 4px 0 8px;
    display: none;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
  }
  .docs-sidebar.open { display: block; }
  .docs-content { padding-top: 8px; }
}

@media (max-width: 1000px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .detail-side .side-card {
    flex: 1;
    min-width: 240px;
  }
}
@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .lane-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--pad) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-status .label-text {
    display: none;
  }
}
@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats {
    gap: 24px;
  }
  .detail-side {
    flex-direction: column;
  }
}
