/* ============================================================
   Jarvis — design tokens
   A dark "system console" identity: the page reads like Jarvis's
   own HUD rather than a generic bot landing page. Single accent
   (cyan, the "core") plus a warm amber used sparingly for status/CTA
   contrast — restraint is the point.
   ============================================================ */

:root {
  --bg:            #090c10;
  --surface:       #11161d;
  --surface-raised:#181f28;
  --line:          #222b35;
  --line-bright:   #2e3947;

  --cyan:          #5ee7ff;
  --cyan-dim:      #2c8aa3;
  --cyan-soft:     rgba(94, 231, 255, 0.10);
  --amber:         #ffb454;
  --green:         #57e08f;

  --text:          #e9eef4;
  --text-dim:      #93a1b0;
  --text-faint:    #586471;

  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'IBM Plex Mono', monospace;

  --radius:        10px;
  --max-w:         1180px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 80% -10%, rgba(94,231,255,0.07), transparent 60%),
    radial-gradient(ellipse 700px 400px at 10% 0%, rgba(255,180,84,0.045), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

::selection { background: var(--cyan-soft); color: var(--cyan); }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px 1px var(--cyan);
  flex-shrink: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ── Nav ─────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 12, 16, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px var(--cyan);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav-links a { text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid var(--cyan-dim);
  border-radius: 6px;
  color: var(--cyan);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.nav-cta:hover { background: var(--cyan-soft); border-color: var(--cyan); }
.nav-ctas { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-cta-ghost:hover { background: var(--cyan-soft); border-color: var(--cyan); }

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(180deg, rgba(9,12,16,0.88) 0%, rgba(9,12,16,0.80) 45%, var(--bg) 100%),
    url('/static/img/hero-bg.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 900px 500px at 50% 30%, rgba(9,12,16,0) 0%, var(--bg) 92%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.04;
}
.hero h1 .accent { color: var(--cyan); }
.hero p.lede {
  margin: 22px 0 32px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 46ch;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 7px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn-primary {
  background: var(--cyan);
  color: #06141a;
  font-weight: 600;
  box-shadow: 0 0 0 0 rgba(94,231,255,0.5);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px -4px rgba(94,231,255,0.45); }
.btn-ghost {
  border: 1px solid var(--line-bright);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan-dim); color: var(--cyan); }

/* ── Core HUD (signature element) ───────────────────────── */

.core {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(9,12,16,0.82) 0%, rgba(9,12,16,0.55) 30%, rgba(9,12,16,0) 52%);
}
.core svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.core-ring { fill: none; stroke: var(--line-bright); stroke-width: 1; }

.orbit { transform-box: fill-box; transform-origin: 50% 50%; }
.orbit-path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
  opacity: 0.4;
}
.orbit-electron {
  fill: var(--cyan);
  filter: drop-shadow(0 0 4px var(--cyan));
}

.orbit-a { animation: orbit-spin-a 16s linear infinite; }
.orbit-b { transform: rotate(60deg); animation: orbit-spin-b 21s linear infinite reverse; }
.orbit-c { transform: rotate(120deg); animation: orbit-spin-c 26s linear infinite; }

@keyframes orbit-spin-a { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes orbit-spin-b { from { transform: rotate(60deg); } to { transform: rotate(420deg); } }
@keyframes orbit-spin-c { from { transform: rotate(120deg); } to { transform: rotate(480deg); } }

.core-readout {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: var(--font-mono);
}
.core-readout .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 6px 1px var(--green);
}
.core-readout .status-dot.offline {
  background: #ff5c5c;
  box-shadow: 0 0 6px 1px #ff5c5c;
}
.core-status {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.core-stats { display: flex; flex-direction: column; gap: 10px; }
.core-stat-value {
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.core-stat-label {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Telemetry strip ─────────────────────────────────────── */

.telemetry {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.telemetry .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
}
.telemetry-item {
  flex: 1;
  min-width: 140px;
  padding: 20px 28px;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
}
.telemetry-item:last-child { border-right: none; }
.telemetry-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.telemetry-value {
  font-size: 21px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.telemetry-value.dim { color: var(--text); }

/* ── Sections ────────────────────────────────────────────── */

section { padding: 84px 0; }
.section-head { margin-bottom: 44px; max-width: 60ch; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 15.5px; }

/* ── Feature grid ────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card {
  background: var(--surface);
  padding: 28px 26px;
  transition: background .15s;
}
.card:hover { background: var(--surface-raised); }
.card-icon { font-size: 22px; margin-bottom: 14px; display: block; }
.card h3 { font-size: 16px; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--text-dim); margin: 0; }

/* ── Docs section ────────────────────────────────────────── */

.docs-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  align-items: start;
}
.docs-nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.docs-nav-item {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s;
}
.docs-nav-item:hover { color: var(--text); background: var(--surface); }
.docs-nav-item.active { color: var(--cyan); border-left-color: var(--cyan); background: var(--cyan-soft); }

.docs-cat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.docs-cat-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.docs-cat-head h3 { font-size: 17px; }
.docs-cat-head p { font-size: 13px; color: var(--text-faint); margin: 4px 0 0; }
.docs-cmd-table { width: 100%; border-collapse: collapse; }
.docs-cmd-table tr { border-bottom: 1px solid var(--line); }
.docs-cmd-table tr:last-child { border-bottom: none; }
.docs-cmd-table tr.divider td { padding: 10px 24px 4px; color: var(--text-faint); font-size: 11px; }
.docs-cmd-table tr.spacer td { padding: 0; height: 6px; }
.docs-cmd-table td {
  padding: 13px 24px;
  font-size: 13.5px;
  vertical-align: top;
}
.docs-cmd-table td:first-child {
  font-family: var(--font-mono);
  color: var(--cyan);
  white-space: nowrap;
  width: 1%;
  padding-right: 28px;
}
.docs-cmd-table td:last-child { color: var(--text-dim); }
.docs-cmd-table td strong { color: var(--text); }

/* ── Guide page: padded prose blocks inside docs-cat cards ──── */
.docs-cat-body { padding: 22px 24px; }
.docs-cat-body > p:last-child,
.docs-cat-body > ul:last-child { margin-bottom: 0; }
.docs-cat-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.docs-cat-body + .docs-cat-body,
.docs-cmd-table + .docs-cat-body,
.docs-cat-body + .docs-cmd-table { border-top: 1px solid var(--line); }

/* ── Footer ──────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 22px; font-size: 13px; color: var(--text-dim); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }

/* ── Legal pages (Privacy / Terms) ──────────────────────────── */

.legal-hero {
  padding: 72px 0 36px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 100% at 20% 0%, rgba(94, 231, 255, 0.06), transparent 70%);
}
.legal-hero h1 { font-size: clamp(30px, 4vw, 42px); margin: 10px 0 8px; }
.legal-updated { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }

.legal { padding: 56px 0 100px; }
.legal-content { max-width: 72ch; }
.legal-content > p { color: var(--text-dim); font-size: 15.5px; line-height: 1.75; margin-bottom: 18px; }
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text);
  margin: 40px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.legal-content h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.legal-content ul { margin: 0 0 18px; padding-left: 22px; color: var(--text-dim); font-size: 15.5px; line-height: 1.75; }
.legal-content ul li { margin-bottom: 8px; }
.legal-content strong { color: var(--text); }
.legal-content a { color: var(--cyan); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }
.legal-see-also { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }

/* ── Status page ───────────────────────────────────────────── */

.status-hero { padding: 78px 0 58px; }
.status-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}
.status-lead { color: var(--text-dim); font-size: 16px; max-width: 60ch; margin: 0 0 24px; }
.status-pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}
.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px 1px var(--amber);
}
.status-pill.online { color: var(--green); }
.status-pill.online::before { background: var(--green); box-shadow: 0 0 8px 1px var(--green); }
.status-pill.offline { color: #ff6b6b; }
.status-pill.offline::before { background: #ff6b6b; box-shadow: 0 0 8px 1px #ff6b6b; }
.status-meta { font-family: var(--font-mono); color: var(--text-faint); font-size: 12px; }
.status-hero-card {
  background: linear-gradient(135deg, rgba(94, 231, 255, 0.12), rgba(255, 180, 84, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.status-card-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.status-card-value {
  font-size: 28px;
  font-family: var(--font-display);
  color: var(--text);
}
.status-hero-grid-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.status-section { padding: 24px 0 100px; }
.status-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
.status-grid-left { display: grid; gap: 24px; }
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.status-card-feature {
  background: linear-gradient(180deg, rgba(17, 22, 29, 0.95), rgba(17, 22, 29, 0.9));
}
.status-card-trend {
  padding-top: 24px;
}
.status-card-head { margin-bottom: 24px; }
.status-card-head h2 { font-size: 22px; margin-top: 6px; }
.status-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.026);
}
.metric-value {
  font-size: 24px;
  font-family: var(--font-display);
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 6px;
}
.status-sparkline-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status-sparkline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.sparkline-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.sparkline-note {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}
.status-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; color: var(--text-dim); }
.status-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.7; }
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cyan-soft);
  color: var(--cyan);
  flex: none;
  margin-top: 3px;
}

/* ── About the Developer page ───────────────────────────────── */

.dev-section { padding: 64px 0 100px; }
.dev-card {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dev-avatar-wrap {
  flex: none;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 180deg, var(--cyan), transparent 60%, var(--cyan));
}
.dev-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--bg);
}
.dev-info h2 { font-size: 28px; margin: 6px 0 14px; }
.dev-bio { color: var(--text-dim); font-size: 15.5px; line-height: 1.75; max-width: 60ch; margin-bottom: 20px; }
.dev-links { display: flex; gap: 12px; flex-wrap: wrap; }
.dev-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: var(--surface-raised);
}
.dev-link-icon { width: 16px; height: 16px; color: var(--cyan); flex: none; }
.dev-extra { max-width: 72ch; margin-top: 32px; color: var(--text-dim); font-size: 15px; line-height: 1.75; }
.dev-extra a { color: var(--cyan); text-decoration: none; }
.dev-extra a:hover { text-decoration: underline; }

/* ── Mobile nav toggle ───────────────────────────────────── */

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  color: var(--text);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.nav-toggle:hover { border-color: var(--cyan-dim); color: var(--cyan); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 18px 16px;
  border-top: 1px solid var(--line);
}
.nav-mobile.open { display: flex; }
.nav-mobile a, .nav-mobile .nav-mobile-cta {
  padding: 12px 4px;
  font-size: 15px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text); }
.nav-mobile .nav-mobile-cta {
  margin-top: 8px;
  text-align: center;
  border: 1px solid var(--cyan-dim);
  border-radius: 6px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
}

.sparkline-graph {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  min-height: 90px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sparkline-bar {
  flex: 1 1 0;
  min-width: 6px;
  max-width: 16px;
  background: linear-gradient(180deg, #31d9ff 0%, #1a7c9c 100%);
  border-radius: 999px 999px 0 0;
  transition: transform 120ms ease, background 120ms ease;
}

.sparkline-bar:hover {
  transform: translateY(-3px);
}

.sparkline-empty {
  width: 100%;
  color: var(--text-dim);
  text-align: center;
  font-size: 14px;
  padding: 24px 0;
}

.status-hero-grid, .status-grid { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .wrap { padding: 0 18px; }
  .nav-links, .nav-ctas { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .legal-hero { padding: 56px 0 28px; }
  .legal { padding: 40px 0 72px; }
  .dev-card { flex-direction: column; text-align: center; gap: 24px; padding: 32px 24px; }
  .dev-links { justify-content: center; }
  .footer .wrap { flex-direction: column; gap: 16px; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; row-gap: 10px; }
  .docs-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
  .docs-nav {
    position: static;
    top: auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: none;
    overflow: visible;
    margin-bottom: 24px;
  }
  .docs-nav-item {
    flex: 1 1 calc(50% - 10px);
    min-width: calc(50% - 10px);
    border-left: none;
    border-radius: 999px;
    padding: 12px 14px;
    text-align: center;
    border: 1px solid transparent;
  }
  .docs-nav-item:hover { background: rgba(52, 131, 204, 0.08); }
  .docs-nav-item.active { border-left-color: transparent; border-bottom: 2px solid var(--cyan); background: var(--cyan-soft); }
  .docs-content { width: 100%; }
  .docs-cat { scroll-margin-top: 24px; }
  .docs-cmd-table, .docs-cmd-table tbody, .docs-cmd-table tr, .docs-cmd-table td {
    display: block;
    width: 100%;
  }
  .docs-cmd-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .docs-cmd-table tr.divider, .docs-cmd-table tr.spacer { border-bottom: none; padding: 0; }
  .docs-cmd-table td:first-child {
    white-space: normal;
    word-break: break-word;
    padding: 0 20px 4px;
    width: 100%;
  }
  .docs-cmd-table td:last-child { padding: 0 20px; }
  .docs-cat-head { padding: 16px 20px; }
  .hero {
    background-image: linear-gradient(180deg, rgba(9,12,16,0.92) 0%, rgba(9,12,16,0.85) 45%, var(--bg) 100%);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .core {
    margin: 0 auto;
  }
  .status-hero-grid-inline, .status-metric-grid { grid-template-columns: 1fr; }
  .status-card { padding: 22px; }
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--cyan);
}

/* ============================================================
   Leaderboard
   ============================================================ */
.lb-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
}
.lb-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.lb-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 14px 20px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--line);
}
.lb-th-rank { width: 90px; }
.lb-th-balance { text-align: right; width: 160px; }
.lb-tr td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  transition: background .15s;
}
.lb-tr:last-child td { border-bottom: none; }
.lb-tr:hover td { background: var(--surface-raised); }
.lb-tr-top-1 td { background: linear-gradient(90deg, rgba(255,215,120,0.10), transparent 70%); }
.lb-tr-top-2 td { background: linear-gradient(90deg, rgba(210,220,230,0.09), transparent 70%); }
.lb-tr-top-3 td { background: linear-gradient(90deg, rgba(205,140,90,0.10), transparent 70%); }
.lb-tr-top:hover td { filter: brightness(1.15); }

.lb-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 1px solid var(--line-bright);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dim);
}
.lb-rank-1 {
  font-size: 19px;
  background: linear-gradient(160deg, rgba(255,215,120,0.22), rgba(255,180,84,0.06));
  border-color: rgba(255, 215, 120, 0.55);
}
.lb-rank-2 {
  font-size: 19px;
  background: linear-gradient(160deg, rgba(210,220,230,0.20), rgba(210,220,230,0.05));
  border-color: rgba(210, 220, 230, 0.45);
}
.lb-rank-3 {
  font-size: 19px;
  background: linear-gradient(160deg, rgba(205,140,90,0.22), rgba(205,140,90,0.06));
  border-color: rgba(205, 140, 90, 0.45);
}

.lb-td-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-td-balance {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--amber);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .lb-table { font-size: 13px; }
  .lb-th-rank, .lb-td-rank { width: 52px; }
  .lb-th-balance, .lb-td-balance { width: auto; }
  .lb-tr td { padding: 10px 14px; }
  .lb-rank { width: 30px; height: 30px; font-size: 12px; }
  .lb-rank-1, .lb-rank-2, .lb-rank-3 { font-size: 15px; }
}

/* ============================================================
   Changelog
   ============================================================ */
.cl-list { list-style: none; margin: 0; padding: 0; max-width: 72ch; }
.cl-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.cl-entry:first-child { border-top: none; padding-top: 0; }
.cl-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  white-space: nowrap;
}
.cl-entry-body h2 { font-size: 18px; margin: 0 0 10px; color: var(--text); }
.cl-entry-body ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14.5px; line-height: 1.75; }
.cl-entry-body ul li { margin-bottom: 6px; }

.cl-commits-lead { color: var(--text-faint); font-size: 13.5px; margin: 6px 0 24px; }
.cl-view-more { margin: 16px 0 0; font-size: 13.5px !important; }

.cl-table-wrap {
  max-width: 92ch;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
}
.cl-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.cl-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 14px 20px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--line);
}
.cl-tr td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.cl-tr:last-child td { border-bottom: none; }
.cl-tr:hover { background: var(--cyan-soft); }
.cl-td-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
  width: 110px;
}
.cl-td-repo { width: 130px; }
.cl-commit-repo {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-dim);
  border-radius: 999px;
  padding: 3px 10px;
}
.cl-td-msg { color: var(--text); font-size: 14px; line-height: 1.5; }
.cl-td-sha {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  width: 90px;
  text-align: right;
}

@media (max-width: 640px) {
  .cl-entry { grid-template-columns: 1fr; gap: 6px; }
  .cl-table-wrap { border-radius: 10px; }
  .cl-table thead { display: none; }
  .cl-tr { display: flex; flex-direction: column; gap: 6px; }
  .cl-tr td { display: block; padding: 8px 16px; border-bottom: none; width: auto; text-align: left; }
  .cl-tr:not(:last-child) { border-bottom: 1px solid var(--line); }
  .cl-tr:not(:last-child) td:last-child { padding-bottom: 16px; }
  .cl-tr td:first-child { padding-top: 16px; }
  .cl-td-sha { text-align: left; color: var(--text-faint); }
}

/* Keyboard focus visibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }