/* ═══════════════════════════════════════════════════════════════════════════
   Sandy — design system
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Background layers */
  --bg:        #08090c;
  --surface:   #0d1017;
  --surface-2: #131820;
  --surface-3: #1a2030;

  /* Borders */
  --border:       rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.13);
  --border-focus: rgba(45, 212, 191, 0.5);

  /* Text */
  --text:   #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --text-4: #475569;

  /* Accent */
  --teal:    #2dd4bf;
  --teal-dim: rgba(45, 212, 191, 0.15);
  --blue:    #818cf8;
  --blue-dim: rgba(129, 140, 248, 0.15);
  --danger:  #f87171;
  --warn:    #fbbf24;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Layout */
  --max-width:  42rem;
  --wide-width: 60rem;
  --nav-h:      3.5rem;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 1.5rem;
  background: rgba(8, 9, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: '';
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.logo:hover { text-decoration: none; color: #fff; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.nav-btn {
  margin-left: 0.5rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s;
}

.nav-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

/* ── Layout ──────────────────────────────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.main-wide {
  max-width: var(--wide-width);
}

/* ── Typography ──────────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.lead {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 1rem 0 2rem;
}

.muted { color: var(--text-3); font-size: 0.875rem; }

.docs-h3 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 1.5rem 0 0.6rem;
}


/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--teal);
  color: #020a09;
  border-color: var(--teal);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.25);
  background: transparent;
}

.btn-danger:hover {
  border-color: var(--danger);
  background: rgba(248, 113, 113, 0.06);
}

.btn.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 5px;
}

/* ── Inline icon button (table actions) ─────────────────────────────────────── */
.btn-icon-table {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-table:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.btn-icon-table:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-icon-table svg { width: 0.75rem; height: 0.75rem; }

.btn-icon-table-danger { color: var(--danger); border-color: rgba(248,113,113,0.2); }
.btn-icon-table-danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: rgba(248,113,113,0.06);
  color: var(--danger);
}

.row-actions { display: flex; gap: 0.3rem; justify-content: flex-end; }
.row-actions .btn {
  padding: 0.18rem 0.45rem;
  font-size: 0.73rem;
  border-radius: 4px;
  line-height: 1.3;
}

/* ── Code ────────────────────────────────────────────────────────────────────── */
pre, .code {
  margin: 1rem 0;
  padding: 0 !important;           /* hljs sets its own padding via .hljs */
  background: transparent !important;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-2);
}

/* Highlight.js container — fills the pre */
pre .hljs {
  padding: 1.1rem 1.2rem;
  background: #0d1117 !important;  /* github-dark bg, matches --surface */
  border-radius: 7px;
  font-size: 0.8rem;
  line-height: 1.65;
  font-family: var(--font-mono);
}

/* Plain pre without hljs (e.g. not highlighted yet) */
pre:not(:has(.hljs)) {
  padding: 1.1rem 1.2rem !important;
  background: var(--surface) !important;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.code-block {
  position: relative;
  margin: 0.75rem 0 1.25rem;
}

.code-block pre { margin: 0; padding-right: 3rem; }

.btn-icon {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover { color: var(--text); border-color: var(--border-hover); background: var(--surface-2); }
.btn-icon svg { width: 0.85rem; height: 0.85rem; }

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-3);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.data-table tbody tr:hover td { background: rgba(255,255,255,0.015); }

.muted-cell { color: var(--text-3); font-style: italic; }

/* ── Tags / badges ───────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.tag-running, .tag-active {
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.tag-muted {
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.tag-plan {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(129, 140, 248, 0.2);
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
}

input, select {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.08);
}

select { color: var(--text); background: var(--surface); }
select:disabled { opacity: 0.5; }

.form-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 7px;
  color: var(--danger);
  font-size: 0.875rem;
}

/* ── Actions row ─────────────────────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ── Card / section ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.dashboard-section, .docs-section {
  margin-top: 2.5rem;
}

/* section-header / section-actions replaced by Tailwind flex utilities in HTML */

/* ── Live indicator ──────────────────────────────────────────────────────────── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* ── Key reveal ──────────────────────────────────────────────────────────────── */
.key-reveal {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 8px;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.05);
}

.key-hint { margin-top: 0.5rem; }
.key-value { word-break: break-all; font-family: var(--font-mono); }

/* ── Callout / info box ──────────────────────────────────────────────────────── */
.callout {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--blue);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.875rem;
  border-radius: 0 7px 7px 0;
  border: 1px solid var(--border);
  border-left: 2px solid var(--blue);
}

/* ── Hidden ──────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Audit panel ─────────────────────────────────────────────────────────────── */
.audit-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.audit-panel summary {
  cursor: pointer;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.audit-panel summary::-webkit-details-marker { display: none; }

.audit-panel summary::before {
  content: "▸";
  font-size: 0.7rem;
  transition: transform 0.15s;
}

.audit-panel[open] summary::before { transform: rotate(90deg); }

.audit-count { color: var(--text-2); font-variant-numeric: tabular-nums; }
.audit-note { margin: 0.65rem 0 0.75rem; font-size: 0.8rem; color: var(--text-3); }
.data-table-audit { font-size: 0.82rem; opacity: 0.8; }
.data-table-audit td, .data-table-audit th { padding: 0.4rem 0.65rem; }

/* ── Example controls ────────────────────────────────────────────────────────── */
.example-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0.75rem 0 1rem;
}

.example-controls label {
  font-size: 0.82rem;
  color: var(--text-3);
  margin: 0;
}

.example-controls select {
  min-width: 13rem;
  max-width: 100%;
  width: auto;
  display: inline-block;
}

/* ── Stat bars (colour overrides used by dashboard.js) ───────────────────────── */
.stat-bar.stat-bar-warn   { background: var(--warn) !important; }
.stat-bar.stat-bar-danger { background: var(--danger) !important; }

/* Empty state */
.billing-empty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-3);
  font-size: 0.875rem;
}

.billing-empty svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  opacity: 0.5;
}

/* Upgrade CTA */
.billing-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.8rem 1rem;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--warn);
}

.billing-cta.billing-cta-danger {
  background: rgba(248, 113, 113, 0.06);
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--danger);
}

.billing-cta svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.billing-cta span { flex: 1; }

.billing-cta .btn {
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Benchmarks bar ──────────────────────────────────────────────────────────── */
.benchmarks-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: var(--wide-width);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.benchmark-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 2rem;
  flex: 1;
  min-width: 10rem;
}

.benchmark-value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.benchmark-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.4;
}

.benchmark-label span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 0.15rem;
}

.benchmark-sep {
  width: 1px;
  height: 3rem;
  background: var(--border);
  flex-shrink: 0;
  align-self: center;
}

@media (max-width: 600px) {
  .benchmark-sep { display: none; }
  .benchmark-stat { min-width: 45%; padding: 1rem; }
}

/* ── Hero (homepage) ─────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(45,212,191,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.05);
}

.hero h1 { margin-bottom: 1.25rem; }

.hero .lead {
  max-width: 34rem;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Feature grid ────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.75rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.feature-card {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.feature-num {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--teal);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.feature-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--text-3);
  line-height: 1.55;
}

/* ── Homepage code block ─────────────────────────────────────────────────────── */
.hero-code {
  max-width: 44rem;
  margin: 0 auto 3rem;
  text-align: left;
}

.hero-code pre {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(45,212,191,0.04);
}

/* ── Performance charts section ──────────────────────────────────────────────── */
.perf-section {
  max-width: var(--wide-width);
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
  text-align: center;
}

.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
}

@media (max-width: 640px) { .perf-grid { grid-template-columns: 1fr; } }

.perf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.5rem 1.1rem;
  position: relative;
  /* subtle grid-paper background lines */
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 25%
  );
}

.perf-card-title {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.perf-title-mono {
  color: var(--text-4);
  font-weight: 400;
}

.perf-bars { display: flex; flex-direction: column; gap: 0.85rem; }

.perf-row { display: flex; flex-direction: column; gap: 0.3rem; }

.perf-row-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.perf-row-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.perf-row-sublabel {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 400;
  color: var(--text-4);
}

.perf-row-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.perf-row-val-slow { color: var(--text-3); }
.perf-row-val-fast { color: var(--teal); }

.perf-bar-track {
  height: 0.45rem;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.perf-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.perf-bar-slow { background: rgba(255,255,255,0.12); }

.perf-bar-fast {
  background: linear-gradient(90deg, rgba(45,212,191,0.7) 0%, var(--teal) 100%);
  box-shadow: 0 0 8px rgba(45,212,191,0.35);
}

.perf-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-4);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 0.3rem;
}

.perf-variance {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-4);
  margin-top: 0.4rem;
}

.perf-insight {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.4;
}

.perf-insight-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  margin-right: 0.15rem;
}

/* Shrink the benchmarks bar — moved lower, used as a compact stat strip */
.benchmarks-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  max-width: var(--wide-width);
  margin: 3rem auto 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.benchmark-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.5rem;
  flex: 1;
  min-width: 8rem;
}

.benchmark-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.benchmark-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.35;
}

.benchmark-label span {
  display: block;
  font-size: 0.63rem;
  font-weight: 400;
  color: var(--text-4);
  margin-top: 0.1rem;
}

.benchmark-sep {
  width: 1px;
  height: 2rem;
  background: var(--border);
  flex-shrink: 0;
  align-self: center;
}

@media (max-width: 600px) {
  .benchmark-sep { display: none; }
  .benchmark-stat { min-width: 45%; }
}

/* ── Demo use cases section ──────────────────────────────────────────────────── */
.demos-header {
  text-align: center;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.demos-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.demos-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 0.6rem;
}

.demos-sub {
  font-size: 0.92rem;
  color: var(--text-3);
  max-width: 32rem;
  margin: 0 auto;
}

.demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0.85rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.demo-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.demo-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.demo-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-dim);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 7px;
  color: var(--teal);
}

.demo-icon svg { width: 1rem; height: 1rem; stroke-width: 1.75; }

.demo-body { min-width: 0; }

.demo-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.demo-desc {
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.demo-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.03em;
}

.demo-script {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-4);
  background: none;
  border: none;
  padding: 0;
}

/* ── Login card ──────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.login-wrap::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(45,212,191,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.form-card {
  width: 100%;
  max-width: 22rem;
  position: relative;
  z-index: 1;
}

.form-card-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 20px 60px rgba(0,0,0,0.4);
}

.form-card h1 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.form-card .lead {
  font-size: 0.875rem;
  margin: 0 0 1.5rem;
}

.form-card label { margin-bottom: 0.85rem; }

.form-card .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.65rem;
}

.form-toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.83rem;
  color: var(--text-3);
}

.form-toggle .btn-ghost {
  font-size: 0.83rem;
  padding: 0.25rem 0.5rem;
  border: none;
  color: var(--teal);
}

.form-toggle .btn-ghost:hover { background: transparent; text-decoration: underline; }

/* ── Dashboard page ──────────────────────────────────────────────────────────── */
.dashboard-wrap {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.15rem;
}

.dashboard-email {
  font-size: 0.875rem;
  color: var(--text-3);
}

/* ── Divider ─────────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-4);
  font-size: 0.78rem;
  max-width: var(--wide-width);
  margin-left: auto;
  margin-right: auto;
}

.site-footer a { color: var(--text-3); text-decoration: none; }
.site-footer a:hover { color: var(--text-2); text-decoration: underline; }
.site-footer-sep { color: var(--text-4); margin: 0 0.25rem; }

/* ── Guide styles ────────────────────────────────────────────────────────────── */
.guide-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 5px;
  background: var(--teal-dim);
  border: 1px solid rgba(45,212,191,0.2);
  color: var(--teal);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-right: 0.5rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.guide-steps {
  padding-left: 1.25rem;
  margin: 0.75rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-steps li {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
  padding-left: 0.25rem;
}

/* ── Docs page ───────────────────────────────────────────────────────────────── */
.docs-wrap {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 3rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  height: fit-content;
}

.docs-sidebar nav { display: flex; flex-direction: column; gap: 0.1rem; }

.docs-sidebar a {
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.12s, background 0.12s;
}

.docs-sidebar a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.docs-sidebar .sidebar-section {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-4);
  padding: 0.85rem 0.65rem 0.3rem;
}

.docs-content h1 {
  font-size: 1.75rem;
  letter-spacing: -0.035em;
  margin-bottom: 0.5rem;
}

.docs-content .lead { margin: 0 0 2.5rem; }

@media (max-width: 700px) {
  .docs-wrap {
    grid-template-columns: 1fr;
  }
  .docs-sidebar { display: none; }
}
