:root {
  --bg: #0D1117;
  --bg2: #161B22;
  --fg: #E6EDF3;
  --fg-muted: #7D8590;
  --accent: #00E5CC;
  --accent-dim: rgba(0, 229, 204, 0.12);
  --deny: #FF6B6B;
  --deny-dim: rgba(255, 107, 107, 0.12);
  --allow: #00E5CC;
  --border: rgba(230, 237, 243, 0.1);
  --code-bg: #161B22;
  --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.nav-logo svg { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--fg); }

/* HERO */
.hero {
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 420px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat { display: flex; flex-direction: column; gap: 0.2rem; }

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* CONTROL PLANE */
.control-plane {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
}

.cp-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cp-region {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
}

.cp-decisions { padding: 0; }

.cp-row {
  display: grid;
  grid-template-columns: 50px 100px 80px 1fr 40px;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.cp-row:last-child { border-bottom: none; }

.cp-verdict {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.cp-deny .cp-verdict { color: var(--deny); }
.cp-allow .cp-verdict { color: var(--allow); }

.cp-agent { color: var(--fg-muted); }
.cp-action { color: var(--fg); }
.cp-cmd {
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.68rem;
}
.cp-latency { color: var(--fg-muted); text-align: right; }

.cp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

.cp-p99 { color: var(--accent); }

/* TRACE SECTION */
.trace {
  padding: 7rem 0;
  border-bottom: 1px solid var(--border);
}

.trace-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.trace-header { margin-bottom: 3rem; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.trace-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.trace-flow {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem;
}

.trace-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.step-content { flex: 1; }

.step-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

.step-source { color: var(--fg-muted); }
.step-arrow { color: var(--fg-muted); }
.step-action { color: var(--accent); font-weight: 500; }
.step-payload {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  background: rgba(0,0,0,0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
}

.step-checks { display: flex; flex-direction: column; gap: 0.4rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.check-status {
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
}

.trace-arrow {
  text-align: center;
  font-size: 1.2rem;
  color: var(--fg-muted);
  padding: 0.75rem 0;
}

.trace-verdict { background: var(--deny-dim); border-radius: 8px; padding: 1.25rem; }

.verdict-badge {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deny);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.verdict-reason {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* WHAT SECTION */
.what { padding: 6rem 0; border-bottom: 1px solid var(--border); }

.what-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.what-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--fg-muted);
}

.what-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.what-list li {
  font-size: 0.95rem;
  color: var(--fg-muted);
  padding-left: 1rem;
  position: relative;
}

.what-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 4px;
  height: 4px;
  background: var(--deny);
  border-radius: 50%;
}

.what-body {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.75;
  padding-top: 0.5rem;
}

/* MODULES SECTION */
.modules { padding: 7rem 0; border-bottom: 1px solid var(--border); }

.modules-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.modules-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 1rem 0 0.75rem;
}

.modules-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-bottom: 4rem;
}

.module-groups { display: flex; flex-direction: column; gap: 4rem; }

.module-group { }

.group-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.group-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

.module-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.module-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.mc-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.module-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.module-card p {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* UNGOVERNED SECTION */
.ungoverned { padding: 7rem 0; border-bottom: 1px solid var(--border); }

.ungoverned-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.ungoverned-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 1rem 0 1rem;
}

.ungoverned-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-bottom: 3rem;
  max-width: 640px;
}

.risk-table { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.risk-row {
  display: grid;
  grid-template-columns: 80px 120px 1fr 1fr 80px;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.risk-row:last-child { border-bottom: none; }
.risk-row:nth-child(even) { background: rgba(255,255,255,0.02); }

.risk-surface {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-align: center;
}

.risk-who {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.risk-cmd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg);
}

.risk-note {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.risk-decision {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--deny);
  text-align: right;
}

/* DIAGNOSTIC SECTION */
.diagnostic { padding: 7rem 0; border-bottom: 1px solid var(--border); }

.diagnostic-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.diag-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.diag-questions { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 2rem; }

.diag-q {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.diag-q:last-child { border-bottom: none; }

.q-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
  width: 20px;
  flex-shrink: 0;
}

.q-text {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.q-answer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.a-yes {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
}

.a-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.diag-conclusion {
  font-size: 0.95rem;
  color: var(--deny);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.diag-tagline {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

/* CLOSING SECTION */
.closing { padding: 7rem 0; border-bottom: 1px solid var(--border); }

.closing-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.closing-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  text-align: center;
}

.guarantees {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4rem;
}

.guarantee {
  background: var(--bg2);
  padding: 1.75rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.g-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-top: 0.15rem;
}

.g-shipped {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.g-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.closing-vision {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
  text-align: center;
}

.closing-vision p {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* FOOTER */
.footer { padding: 2.5rem 0; }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.footer-logo svg { color: var(--accent); }

.footer-brand p {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .cp-row { grid-template-columns: 45px 80px 1fr; }
  .cp-cmd, .cp-latency { display: none; }
  .what-inner { grid-template-columns: 1fr; gap: 2rem; }
  .module-cards { grid-template-columns: 1fr; }
  .risk-row { grid-template-columns: 70px 1fr; }
  .risk-who, .risk-note, .risk-decision { display: none; }
  .guarantees { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .hero { padding: 4rem 0 3rem; }
  .trace-flow { padding: 1.5rem; }
  .guarantees { grid-template-columns: 1fr; }
}