:root {
  color-scheme: light;
  --bg: #f8fafc;
  --ink: #0b1220;
  --muted: #5b6778;
  --subtle: #eef2f7;
  --line: #d7e0ea;
  --panel: #ffffff;
  --panel-strong: #f1f5f9;
  --accent: #ea580c;
  --accent-soft: #fff7ed;
  --navy: #0f2744;
  --teal: #0d9488;
  --green: #15803d;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 24px 80px rgba(15, 39, 68, 0.12);
  --radius: 10px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 18px 44px;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { justify-self: start; display: flex; align-items: center; gap: 10px; font-weight: 760; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy), #1e3a5f);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.nav { justify-self: center; display: flex; gap: 22px; color: var(--muted); font-weight: 600; }
.header-action {
  justify-self: end; padding: 10px 16px; border-radius: 999px;
  background: var(--navy); color: #fff; font-weight: 650; font-size: 14px;
}

.section-shell { max-width: 1180px; margin: 0 auto; padding: 0 44px; }
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px;
  padding: 72px 44px 56px; max-width: 1180px; margin: 0 auto;
}
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.4rem, 4vw, 3.5rem); line-height: 1.05; margin: 12px 0 18px; letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.08rem; line-height: 1.65; max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; margin: 28px 0; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 999px; font-weight: 700; border: 1px solid transparent;
}
.button.primary { background: var(--accent); color: #fff; }
.button.secondary { background: #fff; border-color: var(--line); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.proof-grid dt { font-size: 1.8rem; font-weight: 800; }
.proof-grid dd { margin: 0; color: var(--muted); }

.hero-panel, .demo-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 18px;
}
.panel-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 700; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.badge.cleared, .badge.healthy { background: #dcfce7; color: var(--green); }
.badge.caution, .badge.degraded { background: #fef3c7; color: var(--amber); }
.badge.blocked, .badge.unhealthy { background: #fee2e2; color: var(--red); }
.terminal {
  display: flex; gap: 10px; align-items: center;
  background: #0b1220; color: #e2e8f0; border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: 13px;
}
.terminal span { color: var(--accent); font-weight: 800; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.metric-row article { background: var(--panel-strong); border-radius: 12px; padding: 12px; }
.metric-row span { display: block; color: var(--muted); font-size: 12px; }
.metric-row strong { font-size: 1.2rem; }

.check-grid { display: grid; gap: 8px; margin-top: 10px; }
.check-row {
  display: grid; grid-template-columns: 1.2fr 0.5fr 2fr; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--panel-strong); font-size: 14px;
}
.check-row.head { background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; }
.sev { font-weight: 800; text-transform: uppercase; font-size: 11px; }
.sev.pass { color: var(--green); }
.sev.warn { color: var(--amber); }
.sev.fail { color: var(--red); }

.product-strip { background: var(--navy); color: #fff; padding: 64px 0; }
.loop-shell .section-heading h2 { font-size: 2rem; margin-bottom: 8px; }
.loop-shell .section-heading p { color: #cbd5e1; max-width: 62ch; }
.loop-grid {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.loop-grid li {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 18px;
}
.loop-grid span { color: var(--accent); font-weight: 800; }
.loop-grid strong { display: block; margin: 8px 0; font-size: 1.1rem; }
.loop-grid p { color: #cbd5e1; margin: 0; line-height: 1.55; font-size: 0.95rem; }

.problem-band { padding: 64px 0; background: linear-gradient(180deg, #fff, var(--accent-soft)); }
.problem-quote h2 { font-size: 2rem; margin: 8px 0 16px; }
.problem-quote blockquote {
  font-size: 1.2rem; line-height: 1.6; border-left: 4px solid var(--accent);
  margin: 0; padding-left: 18px; color: #334155;
}
.problem-quote footer { margin-top: 14px; color: var(--muted); }

.demo-section { padding: 64px 0; }
.section-heading.compact h2 { font-size: 2rem; margin-bottom: 8px; }
.section-heading.compact p { color: var(--muted); }
.demo-shell {
  margin-top: 24px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; box-shadow: var(--shadow);
}
.demo-controls { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.demo-controls label { display: grid; gap: 6px; font-weight: 650; }
.demo-controls select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); min-width: 320px; }
.demo-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
.demo-side { display: grid; gap: 14px; }
.doctor-block, .receipt-block {
  background: var(--panel-strong); border-radius: 14px; padding: 14px; border: 1px solid var(--line);
}
.doctor-block h3, .receipt-block h3 { margin: 0 0 10px; }
.doctor-list { display: grid; gap: 8px; }
.doctor-item { padding: 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.receipt-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-weight: 700; cursor: pointer;
}
.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.receipt-preview {
  margin: 0; max-height: 280px; overflow: auto; background: #0b1220; color: #e2e8f0;
  border-radius: 12px; padding: 12px; font-family: var(--mono); font-size: 12px;
}
.study-section { padding: 56px 0 72px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: start; }
.study-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { background: var(--panel-strong); color: var(--muted); font-size: 12px; text-transform: uppercase; }
.table-badge { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.text-link { color: var(--accent); font-weight: 700; }
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 44px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px;
}
.demo-error { color: var(--red); font-weight: 600; }

@media (max-width: 980px) {
  .hero, .demo-layout, .study-section, .loop-grid { grid-template-columns: 1fr; }
  .site-header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
}
