/* ── Variables ──────────────────────────────────────────── */
:root {
  --coral:          #ff7261;
  --coral-dark:     #c8503e;
  --coral-glow:     rgba(255,114,97,0.25);
  --graphite:       #111118;
  --graphite-mid:   #1a1a26;
  --graphite-light: #242433;
  --blue:           #2563eb;
  --blue-light:     #60a5fa;
  --green:          #34d399;
  --yellow:         #fbbf24;
  --text:           #e8edf3;
  --muted:          #7a8fa6;
  --gradient:       linear-gradient(135deg, var(--coral-dark), var(--coral));

  /* Glassmorphism layers */
  --glass-1:        rgba(255,255,255,0.03);
  --glass-2:        rgba(255,255,255,0.06);
  --glass-3:        rgba(255,255,255,0.10);
  --glass-border:   rgba(255,255,255,0.09);
  --glass-border-hi:rgba(255,255,255,0.16);
  --glass-shadow:   0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
  --glass-shadow-lg:0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);

  --mono: "JetBrains Mono","Fira Code","Cascadia Code",monospace;
}

/* ── Base ───────────────────────────────────────────────── */
body {
  background-color: var(--graphite);
  background-image: url("topo-bg.svg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center top;
  color: var(--text);
  font-family: "Inter","Segoe UI",system-ui,sans-serif;
}

/* ── Shared ─────────────────────────────────────────────── */
.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h2 { letter-spacing: -0.02em; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  background: rgba(17,17,24,0.82) !important;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 2rem;
}

.navbar-brand, .nav-link {
  color: var(--text) !important;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.nav-link:hover { color: var(--coral) !important; }

.navbar-nav .nav-item:last-child .nav-link {
  background: var(--gradient);
  color: #fff !important;
  border-radius: 6px;
  padding: 0.35rem 1rem !important;
  font-weight: 600;
  box-shadow: 0 2px 14px var(--coral-glow);
  transition: opacity 0.2s;
}

.navbar-nav .nav-item:last-child .nav-link:hover { opacity: 0.85; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 7rem 6rem 5rem;
  min-height: 90vh;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-left img {
  width: 180px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 28px rgba(255,114,97,0.45));
}

.hero-left h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-left p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 440px;
}

.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: nowrap; }

.hero-cta {
  display: inline-block;
  background: var(--gradient);
  color: #fff !important;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px var(--coral-glow);
  transition: opacity 0.2s, transform 0.2s;
}

.hero-cta:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }

.hero-secondary {
  color: var(--muted) !important;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.hero-secondary:hover { color: var(--text) !important; text-decoration: none; }

/* ── Terminal ───────────────────────────────────────────── */
.terminal {
  background: rgba(8,12,22,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border-hi);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--glass-shadow-lg);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--glass-1);
  border-bottom: 1px solid var(--glass-border);
}

.t-dots { display: flex; gap: 5px; }
.t-dots span { width: 11px; height: 11px; border-radius: 50%; }
.t-dots span:nth-child(1) { background: #ff5f57; }
.t-dots span:nth-child(2) { background: #febc2e; }
.t-dots span:nth-child(3) { background: #28c840; }

.t-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 auto;
}

.t-brand {
  color: var(--coral);
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-right: 0.3rem;
}

.terminal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
  overflow-x: auto;
}

.terminal-inner {
  width: max-content;
  min-width: 100%;
}

.t-line { display: flex; align-items: baseline; gap: 0.4rem; }
.t-prompt { color: var(--coral); font-weight: 600; }
.t-str { color: #fbbf24; }
.t-key { color: var(--muted); }
.t-val { color: var(--text); }
.t-val-low  { color: var(--green); font-weight: 600; }
.t-val-med  { color: var(--yellow); font-weight: 600; }
.t-val-high { color: var(--coral); font-weight: 600; }
.t-dim { color: rgba(122,143,166,0.55); }
.t-arrow { color: var(--coral); }
.t-pct { color: var(--muted); font-size: 0.7rem; }
.t-indent { padding-left: 1.2rem; }
.t-muted { color: var(--muted); }

.t-table {
  margin: 0.25rem 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  width: 100%;
}

.t-table-head,
.t-table-row {
  display: grid;
  grid-template-columns: 1.2rem 1fr 4rem 6rem 3.5rem;
  gap: 0 1rem;
  padding: 0.3rem 0.6rem;
  align-items: center;
}

.t-table-head {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 0.15rem;
}

.t-table-row {
  border-radius: 4px;
  margin-bottom: 0.15rem;
}

.t-row-low { background: rgba(52,211,153,0.06); border-left: 2px solid var(--green); }
.t-row-med { background: rgba(251,191,36,0.06);  border-left: 2px solid var(--yellow); }

.t-cursor {
  width: 7px; height: 14px;
  background: var(--coral); opacity: 0.8;
  animation: blink 1.1s step-end infinite;
  margin-top: 2px; display: inline-block;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem;
  background: rgba(17,17,24,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.stat { text-align: center; padding: 0 4rem; }

.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 0.4rem;
}

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

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

/* ── How It Works ───────────────────────────────────────── */
.how-it-works {
  padding: 6rem 2rem;
  text-align: center;
}

.how-it-works h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3.5rem;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1;
  padding: 2rem 2rem;
  background: var(--glass-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.step:hover { border-color: var(--glass-border-hi); transform: translateY(-2px); }

.step-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  background: rgba(255,114,97,0.1);
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(255,114,97,0.2);
}

.step h3 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.step p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

.step-arrow {
  font-size: 1.2rem;
  color: rgba(255,114,97,0.25);
  padding-top: 2.5rem;
  flex-shrink: 0;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* ── Route Comparison ───────────────────────────────────── */
.route-comparison {
  padding: 5rem 4rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.route-comparison h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.route-card {
  background: var(--glass-2);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.route-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-lg);
}

.route-low  { border-top: 2px solid var(--green);  background: linear-gradient(160deg, rgba(52,211,153,0.06) 0%, var(--glass-2) 50%); }
.route-med  { border-top: 2px solid var(--yellow); background: linear-gradient(160deg, rgba(251,191,36,0.06)  0%, var(--glass-2) 50%); }
.route-high { border-top: 2px solid var(--coral);  background: linear-gradient(160deg, rgba(255,114,97,0.07)  0%, var(--glass-2) 50%); }

.route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.route-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-grade {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.grade-low  { color: var(--green);  background: rgba(52,211,153,0.12);  border: 1px solid rgba(52,211,153,0.2); }
.grade-med  { color: var(--yellow); background: rgba(251,191,36,0.12);  border: 1px solid rgba(251,191,36,0.2); }
.grade-high { color: var(--coral);  background: rgba(255,114,97,0.12);  border: 1px solid rgba(255,114,97,0.2); }

.route-path {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.route-score-display { margin-bottom: 1.25rem; }

.route-score-num {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.route-low  .route-score-num { color: var(--green); }
.route-med  .route-score-num { color: var(--yellow); }
.route-high .route-score-num { color: var(--coral); }

.route-score-bar {
  height: 5px;
  background: var(--glass-border);
  border-radius: 3px;
  overflow: hidden;
}

.route-score-fill { height: 100%; border-radius: 3px; }

.route-factors-mini {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rfm-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  background: var(--glass-1);
  border-radius: 5px;
  border: 1px solid var(--glass-border);
}

.rfm-row span:last-child { color: var(--text); }

.route-waypoint {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.route-recommendation {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  border-radius: 7px;
  letter-spacing: 0.05em;
}

.rec-go     { color: var(--green);  background: rgba(52,211,153,0.1);  border: 1px solid rgba(52,211,153,0.2); }
.rec-caution{ color: var(--yellow); background: rgba(251,191,36,0.1);  border: 1px solid rgba(251,191,36,0.2); }
.rec-avoid  { color: var(--coral);  background: rgba(255,114,97,0.1);  border: 1px solid rgba(255,114,97,0.2); }

/* ── Features ───────────────────────────────────────────── */
.features {
  padding: 5rem 4rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.features h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }

.section-sub { color: var(--muted); font-size: 1rem; margin-bottom: 3rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--glass-2);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.75rem;
  text-align: left;
  box-shadow: var(--glass-shadow);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(255,114,97,0.28);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-lg);
}

.feature-card .icon { font-size: 1.6rem; margin-bottom: 0.9rem; }
.feature-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--coral); margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* ── Safety Audit ───────────────────────────────────────── */
.audit-section {
  padding: 5rem 4rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.audit-section h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }

.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  margin-top: 3rem;
  align-items: start;
}

/* PDF viewer shell */
.pdf-viewer {
  background: #2a2a38;
  border-radius: 10px;
  padding: 24px 20px 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
}

.pdf-viewer-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.pdf-viewer-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.pdf-viewer-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.06em;
  margin: 0 auto;
}

/* The document itself */
.audit-report {
  background: #f7f8fa;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  color: #1a1b2e;
  font-family: "Inter","Segoe UI",system-ui,sans-serif;
}

/* Coral header band */
.audit-report-header {
  background: var(--coral-dark);
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.audit-report-wordmark {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.audit-report-title-block {
  text-align: right;
}

.audit-report-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
}

.audit-report-period {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  display: block;
  margin-top: 0.15rem;
}

/* Client info strip */
.audit-client-strip {
  padding: 0.65rem 1.4rem;
  background: #eef0f4;
  border-bottom: 1px solid #dde0e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.audit-client-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a1b2e;
  letter-spacing: 0.02em;
}

.audit-client-period {
  font-size: 0.65rem;
  color: #6b7280;
}

/* Score section */
.audit-score-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid #e5e7ef;
}

.audit-score-left {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.audit-big-score {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 800;
  color: #1a6b47;
  line-height: 1;
}

.audit-big-score span { font-size: 1rem; color: #6b7280; font-weight: 400; }

.audit-score-meta { display: flex; flex-direction: column; gap: 0.35rem; }

.audit-grade-badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 0.18rem 0.55rem;
  border-radius: 3px;
  color: #fff;
  background: #1a6b47;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
}

.audit-trend {
  font-size: 0.68rem;
  color: #1a6b47;
  font-weight: 600;
}

.audit-score-label {
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: auto;
  align-self: flex-start;
  padding-top: 0.25rem;
}

/* KPIs */
.audit-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #e5e7ef;
}

.audit-kpi {
  padding: 0.8rem 1rem;
  text-align: center;
  border-right: 1px solid #e5e7ef;
}

.audit-kpi:last-child { border-right: none; }

.audit-kpi-num {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #c8503e;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.audit-kpi-label {
  font-size: 0.6rem;
  color: #6b7280;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Factor table */
.audit-factor-section-label {
  padding: 0.5rem 1.4rem 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #e5e7ef;
  background: #f0f1f5;
}

.audit-factors {
  padding: 0.75rem 1.4rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-bottom: 1px solid #e5e7ef;
}

.audit-factor-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
}

.audit-factor-label { color: #374151; min-width: 110px; font-weight: 500; }

.audit-factor-bar {
  flex: 1;
  height: 5px;
  background: #dde0e8;
  border-radius: 3px;
  overflow: hidden;
}

.audit-factor-bar div { height: 100%; border-radius: 3px; }

.audit-factor-score { color: #374151; font-weight: 700; min-width: 24px; text-align: right; font-family: var(--mono); font-size: 0.65rem; }

/* Certified footer */
.audit-certified {
  padding: 0.55rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eef0f4;
}

.audit-certified-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.audit-certified-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1a6b47;
  flex-shrink: 0;
}

.audit-certified span {
  font-size: 0.58rem;
  color: #6b7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-page-num {
  font-size: 0.58rem;
  color: #9ca3af;
  font-family: var(--mono);
}

/* Value props */
.audit-props {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.audit-prop {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.audit-prop-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.audit-prop h3 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 0.35rem; }
.audit-prop p  { font-size: 0.85rem; color: var(--muted); line-height: 1.65; margin: 0; }

/* ── API Preview ────────────────────────────────────────── */
.api-preview {
  padding: 5rem 4rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.api-preview h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }

.api-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: start;
}

/* Code tabs */
.code-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-1);
}

.code-tab {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.code-tab:hover { color: var(--text); }
.code-tab.active { color: var(--coral); border-bottom-color: var(--coral); }

.code-pane { display: none; }
.code-pane.active { display: block; }

/* Code Window */
.code-window {
  background: rgba(6,10,18,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-hi);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--glass-shadow-lg);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--glass-1);
  border-bottom: 1px solid var(--glass-border);
}

.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 auto;
}

.code-body { margin: 0; padding: 1.5rem; overflow-x: auto; }
.code-body code {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--text);
  background: none;
  padding: 0;
}

.c-kw  { color: var(--blue-light); }
.c-fn  { color: var(--green); }
.c-str { color: #fbbf24; }
.c-cm  { color: #3f526a; }
.c-op  { color: var(--muted); }

/* Response Panel — glass layer 2 inside glass layer 1 */
.response-panel {
  background: var(--glass-2);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.risk-gauge {
  display: flex;
  justify-content: center;
  padding: 1.75rem 1rem 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-1);
}

.risk-factors {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.factor-row { display: flex; align-items: center; gap: 0.75rem; }
.factor-label { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); min-width: 90px; }
.factor-bar { flex: 1; height: 4px; background: var(--glass-border); border-radius: 3px; overflow: hidden; }
.factor-fill { height: 100%; background: var(--gradient); border-radius: 3px; }
.factor-pct { font-family: var(--mono); font-size: 0.68rem; color: var(--coral); min-width: 30px; text-align: right; }

.response-meta {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--glass-1);
}

.meta-item { display: flex; justify-content: space-between; align-items: center; }
.meta-key { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.meta-val { font-family: var(--mono); font-size: 0.7rem; color: var(--blue-light); }

/* ── Map Section ────────────────────────────────────────── */
.map-section {
  padding: 4rem 4rem 6rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.map-section h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.map-section p { font-size: 1rem; color: var(--muted); margin-bottom: 2.5rem; }

#map {
  height: 460px;
  border-radius: 14px;
  border: 1px solid var(--glass-border-hi);
  box-shadow: var(--glass-shadow-lg);
  overflow: hidden;
  filter: brightness(1.15) saturate(0.7) contrast(0.92);
}

/* ── CLI Section ────────────────────────────────────────── */
.cli-section {
  padding: 5rem 4rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.cli-section h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }

.cli-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
  align-items: start;
}

.cli-terminal {
  background: rgba(8,12,22,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border-hi);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--glass-shadow-lg);
}

.cli-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cli-features {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.cli-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.cli-feature-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }
.cli-feature h4 { font-size: 0.9rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.cli-feature p  { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* Download box */
.download-box {
  background: var(--glass-2);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
}

.download-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.download-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.download-version {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  text-decoration: none !important;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  cursor: pointer;
}

.download-btn:hover {
  border-color: var(--coral);
  background: rgba(255,114,97,0.06);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.dl-icon { font-size: 1.3rem; flex-shrink: 0; }
.dl-os   { font-size: 0.8rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.dl-arch { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }

.download-note {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.download-note a {
  color: var(--coral) !important;
  text-decoration: none;
}

.download-note a:hover { text-decoration: underline; }

/* ── CTA ────────────────────────────────────────────────── */
.cta-banner {
  text-align: center;
  padding: 6rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: radial-gradient(ellipse at center, rgba(255,114,97,0.06) 0%, transparent 70%);
}

.cta-banner h2 { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 1rem; }
.cta-banner p  { font-size: 1.05rem; color: var(--muted); margin-bottom: 2.5rem; }

.cta-banner a {
  display: inline-block;
  background: var(--gradient);
  color: #fff !important;
  padding: 0.8rem 2.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 24px var(--coral-glow);
  transition: opacity 0.2s, transform 0.2s;
}

.cta-banner a:hover { opacity: 0.9; transform: translateY(-1px); text-decoration: none; }

/* ── Footer ─────────────────────────────────────────────── */
.nav-footer {
  background: rgba(8,8,14,0.6);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 1.25rem 2rem;
}

.nav-footer a { color: var(--muted) !important; }
.nav-footer a:hover { color: var(--coral) !important; }

/* ── Quarto overrides ───────────────────────────────────── */
#quarto-content, .page-layout-full { padding: 0 !important; margin: 0 !important; }
pre { background: transparent !important; border: none !important; padding: 0 !important; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 5rem 2rem 3rem; min-height: unset; }
  .hero-actions { gap: .9rem; }
  .hero-right { display: none; }
  .api-grid { grid-template-columns: 1fr; }
  .routes-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: stretch; gap: 1rem; }
  .step-arrow { transform: rotate(90deg); text-align: center; padding: 0; }
  .stats-bar { flex-wrap: wrap; gap: 1.5rem; }
  .stat-divider { display: none; }
  .stat { padding: 0 2rem; }
  .api-preview, .route-comparison, .features, .map-section, .audit-section, .cli-section { padding: 4rem 1.5rem; }
  .audit-grid { grid-template-columns: 1fr; }
  .cli-grid { grid-template-columns: 1fr; }
  .terminal-body { font-size: 0.7rem; padding: 1rem; }
  .t-table-head,
  .t-table-row { grid-template-columns: 1.2rem 1fr 3.5rem 5.5rem 3rem; gap: 0 0.5rem; font-size: 0.65rem; }
  .download-grid { grid-template-columns: 1fr 1fr; }
}
