/* ==========================================================================
   ADAM Laboratory · Open Formal Math & Quantum Tomography
   Production Scientific Portal Stylesheet (Light & Dark Academic Themes)
   Zero External Dependencies · Responsive Desktop & Mobile Layout
   ========================================================================== */

:root {
  --bg: #f6f8fc;
  --bg-alt: #edf2f9;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-subtle: #f1f5fb;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --border: #dbe3ef;
  --border-strong: #cbd5e1;
  --accent: #0369a1;
  --accent-bright: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.10);
  --emerald: #047857;
  --emerald-bright: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.11);
  --amber: #b45309;
  --amber-bright: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --crimson: #be123c;
  --crimson-bright: #f43f5e;
  --crimson-soft: rgba(244, 63, 94, 0.10);
  --violet: #6d28d9;
  --violet-soft: rgba(109, 40, 217, 0.10);
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 44px rgba(15, 23, 42, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "STIX Two Math", "Cambria Math", "Charter", "Georgia", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #070d18;
  --bg-alt: #0c1526;
  --surface: #101b2f;
  --surface-elevated: #15233c;
  --surface-subtle: #0d1729;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;
  --border: #1e2f4d;
  --border-strong: #2b4268;
  --accent: #38bdf8;
  --accent-bright: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --emerald: #34d399;
  --emerald-bright: #10b981;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-bright: #f59e0b;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --crimson: #fb7185;
  --crimson-bright: #f43f5e;
  --crimson-soft: rgba(251, 113, 133, 0.14);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --code-bg: #050a13;
  --code-ink: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.65);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.62;
  font-size: 16px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a:hover {
  text-decoration: underline;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

.math-expr {
  font-family: var(--font-serif);
  font-size: 1.05em;
  letter-spacing: 0.01em;
}

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

/* ==========================================================================
   Sticky Header & Controls
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none !important;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--ink-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  background: var(--surface-subtle);
  color: var(--accent);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--accent-bright);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.35);
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  width: 36px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.98rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Hero & Key Metrics Strip
   ========================================================================== */

.hero {
  padding: 56px 0 42px;
  background:
    radial-gradient(900px 380px at 85% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(700px 340px at 10% 20%, var(--emerald-soft), transparent 70%);
  border-bottom: 1px solid var(--border);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
}

.pill-emerald {
  background: var(--emerald-soft);
  border-color: color-mix(in srgb, var(--emerald) 35%, var(--border));
  color: var(--emerald);
}

.pill-accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--accent);
}

.pill-amber {
  background: var(--amber-soft);
  border-color: color-mix(in srgb, var(--amber) 35%, var(--border));
  color: var(--amber);
}

.hero h1 {
  font-size: clamp(1.95rem, 3.6vw, 3.05rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  max-width: 980px;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--ink-secondary);
  max-width: 920px;
  margin: 0 0 26px;
}

.equation-banner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.equation-banner .eq-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.equation-banner .eq-formula {
  font-family: var(--font-serif);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent-bright);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
  background: #0369a1;
}

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

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.81rem;
  border-radius: 6px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-value {
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent);
}

.metric-card:nth-child(2) .metric-value {
  color: var(--emerald);
}

.metric-card:nth-child(3) .metric-value {
  color: var(--violet);
}

.metric-card:nth-child(4) .metric-value {
  color: var(--amber);
}

.metric-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.metric-desc {
  font-size: 0.83rem;
  color: var(--ink-muted);
  line-height: 1.48;
}

/* ==========================================================================
   Sections & Cards
   ========================================================================== */

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  margin-bottom: 32px;
  max-width: 880px;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.section-lead {
  font-size: 1.01rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* ==========================================================================
   Interactive Lab #1 & Lab #2 Layouts
   ========================================================================== */

.lab-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
  align-items: start;
}

.canvas-panel, .readout-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.preset-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.80rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover, .preset-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

#teardropCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 540px;
  cursor: crosshair;
  touch-action: none;
}

#fe2s2Canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  max-height: 440px;
}

.slider-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--accent-bright);
}

.status-banner {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.status-banner.valid {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: color-mix(in srgb, var(--emerald) 40%, var(--border));
}

.status-banner.projected {
  background: var(--crimson-soft);
  color: var(--crimson);
  border-color: color-mix(in srgb, var(--crimson) 40%, var(--border));
}

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.kv-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.kv-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kv-val {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}

.kv-val.accent {
  color: var(--accent);
}

.kv-val.emerald {
  color: var(--emerald);
}

.kv-val.crimson {
  color: var(--crimson);
}

.formula-card {
  background: var(--surface-subtle);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.formula-card .math-line {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0;
  overflow-x: auto;
}

/* Wave Stepper (Lab #2) */
.wave-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.wave-btn {
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}

.wave-btn .w-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent);
}

.wave-btn .w-title {
  display: block;
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}

.wave-btn .w-mae {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

.wave-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.parity-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.parity-chip {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 0.82rem;
}

.parity-chip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

/* ==========================================================================
   Tables, Proof Vault & Cards
   ========================================================================== */

.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.feature-card h3 {
  margin: 6px 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: #ffffff;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.vault-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.vault-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.vault-filename {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  word-break: break-all;
}

.vault-meta {
  font-size: 0.77rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sha-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink-secondary);
}

.sha-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Code Snippet & Data Tables
   ========================================================================== */

.code-block-wrap {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 0.80rem;
  color: #94a3b8;
}

.code-block-wrap pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.58;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table.sci-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

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

table.sci-table th {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.sci-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Lean 4 Modal / Drawer Viewer
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(7, 13, 24, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-dialog {
  width: 100%;
  max-width: 980px;
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.modal-title-group {
  min-width: 0;
}

.modal-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--accent);
}

.modal-subtitle {
  font-size: 0.80rem;
  color: var(--ink-muted);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-body {
  overflow: auto;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 18px 20px;
  flex: 1;
}

.modal-body pre {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.56;
  white-space: pre;
}

.lean-kw {
  color: #38bdf8;
  font-weight: 700;
}

.lean-thm {
  color: #34d399;
  font-weight: 700;
}

.lean-comment {
  color: #64748b;
  font-style: italic;
}

/* ==========================================================================
   Footer & Toast
   ========================================================================== */

.site-footer {
  padding: 42px 0;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 600;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.toast[hidden] {
  display: none !important;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1060px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lab-grid {
    grid-template-columns: 1fr;
  }
  .three-col-grid {
    grid-template-columns: 1fr;
  }
  .wave-stepper {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 4px;
  }
  .main-nav a {
    white-space: nowrap;
  }
  .metrics-grid,
  .two-col-grid,
  .slider-controls,
  .parity-strip {
    grid-template-columns: 1fr;
  }
  .wave-stepper {
    grid-template-columns: 1fr 1fr;
  }
  .vault-grid {
    grid-template-columns: 1fr;
  }
  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
