:root {
  --bg: #0b1120;
  --bg-alt: #111827;
  --surface: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --blue: #38bdf8;
  --green: #10b981;
  --red: #ef4444;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(15, 23, 42, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e2e8f0;
}

pre {
  background: #090e1a;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.5;
}

pre code {
  background: transparent;
  padding: 0;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
}

.brand:hover {
  text-decoration: none;
}

.brand-tag {
  font-size: 11px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 1px 7px;
  border-radius: 99px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  transition: 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-primary {
  background: var(--accent);
  color: #0b1120;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--muted);
}

.full-width {
  width: 100%;
}

/* Hero */
.hero {
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-pill {
  display: inline-block;
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* Hero Terminal Preview */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.terminal-bar {
  background: #0f172a;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.amber { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}

.terminal-body {
  padding: 16px;
}

.query-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.preset-btn {
  background: #0f172a;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}

.preset-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.sql-box {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--blue);
}

.mini-table-wrap {
  overflow-x: auto;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mini-table th, .mini-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.mini-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.tag-alert {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
  padding: 2px 6px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

.tag-ok {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

/* Sections */
.section {
  padding: 76px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
}

/* Pipeline */
.pipeline-steps {
  display: flex;
  align-items: stretch;
  gap: 14px;
  justify-content: space-between;
}

.step-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.step-num {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}

.step-card h4 {
  font-size: 18px;
  margin: 6px 0 8px;
}

.step-card p {
  color: var(--muted);
  font-size: 14px;
}

.step-arrow {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}

/* Editions */
.editions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.edition-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.edition-card.featured {
  border-color: var(--accent);
}

.edition-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
  margin-bottom: 12px;
}

.edition-badge.accent {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

.edition-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.edition-card p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.check-list {
  list-style: none;
  margin-bottom: 20px;
  flex: 1;
}

.check-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
  font-size: 14px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.code-snippet {
  background: #090e1a;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
}

/* Docs Layout */
.docs-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.docs-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.docs-nav-group {
  margin-bottom: 24px;
}

.docs-nav-group h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.docs-nav-group ul {
  list-style: none;
}

.docs-nav-group li {
  margin-bottom: 6px;
}

.docs-nav-group a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.docs-nav-group a:hover, .docs-nav-group a.active {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  text-decoration: none;
}

.docs-content h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.docs-content .lead {
  font-size: 17px;
  color: var(--muted);
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.docs-content h2 {
  font-size: 22px;
  margin: 28px 0 12px;
}

.docs-content h3 {
  font-size: 18px;
  margin: 20px 0 8px;
}

.docs-content p, .docs-content ul, .docs-content ol {
  margin-bottom: 14px;
  color: #cbd5e1;
}

.docs-content ul, .docs-content ol {
  padding-left: 22px;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}

.docs-content th, .docs-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.docs-content th {
  background: var(--surface);
}

.docs-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 0;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-desc {
  color: var(--muted);
  margin: 12px 0;
}

.footer-copy {
  color: var(--muted);
  font-size: 12px;
}

.site-footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.site-footer ul {
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .editions-grid, .docs-shell, .footer-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-steps {
    flex-direction: column;
  }
  .step-arrow {
    transform: rotate(90deg);
    justify-content: center;
  }
  .docs-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
  }
  .nav-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    align-items: flex-start;
  }
  .site-nav.open {
    display: flex;
  }
}
