/* ==========================================================================
   IA-Dx Med — iadxmed.com
   Design system: composio (dark technical canvas, #0007cd voltage blue,
   brightness-ladder elevation, spotlight glows, simulation-console hero).
   Type: Inter (abcDiatype substitute) + JetBrains Mono for data surfaces.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --primary: #0007cd;
  --primary-active: #0005a3;
  --primary-glow: #1a26ff;

  --ink: #ffffff;
  --body: #a8a8a8;
  --muted: #888888;
  --muted-soft: #666666;

  --hairline: #222222;
  --hairline-soft: #1a1a1a;
  --hairline-strong: #333333;

  --canvas: #0f0f0f;
  --canvas-deep: #000000;      /* terminal / code surfaces only */
  --surface: #181818;
  --surface-elevated: #222222;
  --surface-strong: #2a2a2a;

  --cyan: #00d4ff;             /* sparingly: data flow, interactive states */
  --violet: #7b3aed;           /* illustrations only */
  --error: #ff4d4d;
  --success: #33d17a;

  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --section: 96px;
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }

h1, h2, h3, h4, h5 {
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--primary); color: var(--ink); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 200;
  background: var(--primary);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: var(--ink); }

/* ---------- Type scale (composio) ---------- */
.display-mega, h1 {
  font-size: clamp(36px, 6.4vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
h3 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.title-md, h4 { font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.title-sm { font-size: 16px; font-weight: 600; line-height: 1.4; }

.lede { font-size: 18px; line-height: 1.55; color: var(--body); }
.fine { font-size: 13px; line-height: 1.4; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
  background: var(--surface-elevated);
  border-radius: 9999px;
  padding: 5px 12px;
  margin: 0 0 20px;
}
.eyebrow .mark { width: 13px; height: 13px; color: var(--cyan); flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn svg { flex: none; }

.btn--primary { background: var(--primary); color: var(--ink); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--primary-active); color: var(--ink); }

.btn--secondary { background: var(--surface-elevated); color: var(--ink); }
.btn--secondary:hover, .btn--secondary:focus-visible { background: var(--surface-strong); color: var(--ink); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn--outline:hover, .btn--outline:focus-visible { border-color: var(--muted); color: var(--ink); }

.btn--lg { height: 48px; padding: 14px 24px; font-size: 15px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.text-link:hover { color: var(--cyan); }
.text-link .arrow { transition: transform 0.15s ease; }
.text-link:hover .arrow { transform: translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
}
.site-header .container { height: 100%; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark .mark { width: 22px; height: 22px; color: var(--primary-glow); flex: none; }
.wordmark small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.nav__menu a:hover { color: var(--ink); background: var(--surface); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.nav__toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 var(--section);
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 50% 78%, rgba(26, 38, 255, 0.34), transparent 70%),
    radial-gradient(900px 600px at 50% 10%, rgba(26, 38, 255, 0.12), transparent 65%);
}

.hero__head {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}
.hero__head .lede {
  max-width: 720px;
  margin: 24px auto 0;
}
.hero__head .btn-row { justify-content: center; margin-top: 32px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 14px; height: 14px; color: var(--cyan); flex: none; }

/* ---------- Simulation console (terminal-mockup-grid reinterpreted) ---------- */
.sim {
  position: relative;
  max-width: 1040px;
  margin: 64px auto 0;
}

.sim__frame {
  background: var(--canvas-deep);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 32px;
}

.sim__titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.sim__dots { display: inline-flex; gap: 6px; }
.sim__dots i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-strong);
}
.sim__session { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.sim__session .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.sim__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sim__pane {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  min-width: 0;
}

.pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
}
.pane__head b { color: var(--body); font-weight: 600; }
.pane__tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-soft);
}
.pane__tag--live { color: var(--cyan); }

/* Encounter pane */
.enc__scene { border-radius: var(--r-md); overflow: hidden; display: block; }
.enc__rows { list-style: none; margin: 12px 0 0; padding: 0; }
.enc__rows li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--hairline);
  color: var(--muted);
}
.enc__rows li:last-child { border-bottom: 0; }
.enc__rows b { color: #d8d8d8; font-weight: 500; text-align: right; }

/* Differential pane */
.ddx { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ddx li { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; }
.ddx .ddx__name { color: #d8d8d8; }
.ddx .ddx__odds { color: var(--muted-soft); font-size: 12px; }
.ddx__bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-elevated);
  overflow: hidden;
}
.ddx__bar i { display: block; height: 100%; background: var(--muted-soft); border-radius: 2px; }
.ddx li.is-committed .ddx__name { color: var(--ink); }
.ddx li.is-committed .ddx__odds { color: var(--cyan); }
.ddx li.is-committed .ddx__bar i { background: var(--cyan); }
.ddx__commit {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--ink);
  font-size: 12px;
}
.ddx__commit svg { width: 13px; height: 13px; flex: none; }

/* Vitals pane */
.vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 14px; }
.vitals div { background: var(--canvas-deep); border-radius: var(--r-md); padding: 8px 10px; }
.vitals dt { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-soft); font-family: var(--sans); font-weight: 600; }
.vitals dd { margin: 2px 0 0; color: var(--ink); font-size: 14px; }
.vitals dd small { color: var(--muted-soft); font-size: 10px; }
.vitals .is-flagged dd { color: var(--error); }
.ecg { display: block; width: 100%; border-radius: var(--r-sm); }
.invx { list-style: none; margin: 12px 0 0; padding: 0; }
.invx li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--muted);
}
.invx svg { width: 13px; height: 13px; flex: none; }
.invx .is-done svg { color: var(--success); }
.invx .is-pending svg { color: var(--muted-soft); }
.invx b { color: #d8d8d8; font-weight: 500; }
.invx small { margin-left: auto; color: var(--muted-soft); font-size: 11px; }

/* Debrief pane */
.debrief { list-style: none; margin: 0; padding: 0 0 0 4px; }
.debrief li {
  position: relative;
  padding: 0 0 14px 22px;
  color: var(--muted);
}
.debrief li::before {
  content: "";
  position: absolute;
  left: 4px; top: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted-soft);
}
.debrief li::after {
  content: "";
  position: absolute;
  left: 7px; top: 18px; bottom: -2px;
  width: 1px;
  background: var(--hairline);
}
.debrief li:last-child { padding-bottom: 0; }
.debrief li:last-child::after { display: none; }
.debrief b { color: #d8d8d8; font-weight: 500; }
.debrief .t { color: var(--muted-soft); font-size: 11px; margin-right: 6px; }
.debrief .is-good::before { background: var(--success); }
.debrief .is-flag::before { background: var(--error); }
.debrief .is-key::before { background: var(--cyan); }

.sim__caption {
  margin: 20px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.sim__caption b { color: var(--body); font-weight: 500; }

/* ---------- Bands / sections ---------- */
.band { padding: var(--section) 0; }
.band--hairline { border-top: 1px solid var(--hairline-soft); }
.band--tight { padding: 64px 0; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: 20px; }

/* ---------- Fact strip ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline-soft);
  border-block: 1px solid var(--hairline-soft);
}
.facts > div { background: var(--canvas); padding: 28px 24px; }
.facts b {
  display: block;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.facts span { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover { background: var(--surface-elevated); border-color: var(--hairline-strong); }
.feature-card h4 { margin: 16px 0 8px; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }

.toolkit-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 20px;
}
.toolkit-card h4 { font-size: 16px; margin: 14px 0 6px; }
.toolkit-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

.icon-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--surface-elevated);
  color: var(--cyan);
}
.icon-plate svg { width: 22px; height: 22px; }

.card--wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.card--wide > div { max-width: 680px; }

/* ---------- Split layouts ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 64px;
  align-items: center;
}
.split--top { align-items: start; }
.split--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split__text h2 { margin-bottom: 20px; }
.split__text .lede { margin-bottom: 16px; }

/* ---------- Problem list ---------- */
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list > li {
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}
.rule-list > li:last-child { border-bottom: 1px solid var(--hairline); }
.rule-list h4 { margin-bottom: 6px; display: flex; align-items: baseline; gap: 12px; }
.rule-list h4 .idx { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted-soft); }
.rule-list p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* ---------- Case walkthrough / code block ---------- */
.code-block {
  background: var(--canvas-deep);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--body);
  overflow-x: auto;
}
.code-block .c { color: var(--muted-soft); }
.code-block .k { color: var(--cyan); }
.code-block .g { color: var(--success); }
.code-block .r { color: var(--error); }
.code-block .w { color: var(--ink); }

figure.framed { margin: 0; }
figure.framed figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- How it works ---------- */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  position: relative;
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
  margin-bottom: 16px;
}
.steps h4 { font-size: 16px; margin-bottom: 8px; }
.steps p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- Audience ---------- */
.audience-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audience-card h4 { display: flex; align-items: center; gap: 12px; }
.audience-card h4 svg { width: 20px; height: 20px; color: var(--cyan); flex: none; }
.audience-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.audience-card .fine { margin-top: auto; padding-top: 8px; }

/* ---------- Case library sampler ---------- */
.case-grid { list-style: none; margin: 0; padding: 0; }

.case-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.case-card:hover { background: var(--surface-elevated); border-color: var(--hairline-strong); }

.case-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.case-card__id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.case-card__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
  background: var(--surface-elevated);
  border-radius: 9999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.case-card__tag--rare { color: var(--cyan); }

.case-card h4 { font-size: 16px; margin-bottom: 8px; }
.case-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }

.case-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-soft);
}

/* ---------- Credibility / scoreboard ---------- */
.score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
}
.score > div {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 28px 24px;
}
.score dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.score dd {
  margin: 12px 0;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.score p { font-size: 13px; color: var(--muted); line-height: 1.5; }

.provenance {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}
.provenance svg { width: 64px; height: 64px; color: var(--cyan); }
.provenance h3 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 10px; }
.provenance p { font-size: 15px; color: var(--body); }

/* ---------- Spotlight CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: var(--section) 48px;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(480px 320px at 50% 0%, rgba(26, 38, 255, 0.30), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { max-width: 720px; margin-inline: auto; }
.cta-band .lede { max-width: 600px; margin: 20px auto 0; }
.cta-band .btn-row { justify-content: center; margin-top: 32px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 64px 0 48px;
  font-size: 14px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px 32px;
}
.footer__brand p { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 300px; }
.footer__brand .wordmark { margin-bottom: 16px; }

.footer__col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 10px; }
.footer__col a { color: var(--body); text-decoration: none; font-size: 14px; }
.footer__col a:hover { color: var(--ink); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 13px;
  color: var(--muted-soft);
}
.footer__base p { margin: 0; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.page-head {
  position: relative;
  overflow: hidden;
  padding: 80px 0 56px;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px 420px at 50% -20%, rgba(26, 38, 255, 0.18), transparent 70%);
}
.page-head .container { position: relative; max-width: 800px; text-align: center; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; }
.page-head .lede { margin-top: 20px; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: 40px;
}
.form-card > h2 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 8px; }
.form-card > .fine { margin-bottom: 32px; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.field .opt { color: var(--muted-soft); font-weight: 400; font-size: 13px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 12px 16px;
  background: var(--canvas);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.15s ease;
}
.field textarea { height: auto; min-height: 140px; resize: vertical; line-height: 1.5; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6.2 8 10l4-3.8' fill='none' stroke='%23888888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
  padding-right: 42px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted-soft); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 0;
  border-color: transparent;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-soft); }
.field [aria-invalid="true"] { border-color: var(--error); }

.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.error {
  display: none;
  font-size: 13px;
  color: var(--error);
  margin: 8px 0 0;
}
.error.is-shown { display: block; }

.form-status {
  display: none;
  gap: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline-strong);
  border-left: 3px solid var(--success);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--body);
}
.form-status.is-shown { display: flex; }
.form-status svg { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: 2px; }
.form-status b { color: var(--ink); font-weight: 500; }
.form-status p { margin-bottom: 6px; }

.aside-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-xl);
  padding: 32px;
  margin-bottom: 24px;
}
.aside-card > h2 { font-size: 20px; letter-spacing: -0.01em; margin-bottom: 24px; }

.contact-list { margin: 0; }
.contact-list > div {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 14px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.contact-list > div:first-child { border-top: 0; padding-top: 0; }
.contact-list svg { width: 18px; height: 18px; color: var(--cyan); grid-row: span 2; margin-top: 3px; }
.contact-list dt { font-size: 13px; font-weight: 600; color: var(--ink); }
.contact-list dd { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.contact-list a { color: var(--body); }

.next-steps { counter-reset: ns; list-style: none; margin: 0; padding: 0; }
.next-steps li {
  counter-increment: ns;
  display: flex;
  gap: 16px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.next-steps li::before {
  content: counter(ns);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-elevated);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --section: 80px; }

  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }

  .split, .split--flip { grid-template-columns: 1fr; gap: 48px; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav__menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 12px 24px 20px;
  }
  .site-header.is-open .nav__menu { display: flex; }
  .nav__menu a { padding: 12px; font-size: 15px; }
  .nav__toggle { display: inline-flex; }
  .nav__actions .text-link { display: none; }
  .nav__actions { margin-left: 0; }

  .grid--3 { grid-template-columns: 1fr; }
  .score { grid-template-columns: 1fr; }
  .provenance { grid-template-columns: 1fr; gap: 20px; padding: 32px; }
}

@media (max-width: 640px) {
  :root { --section: 64px; }

  .hero { padding-top: 56px; }
  .hero__head .btn-row .btn { width: 100%; }

  .sim__frame { padding: 16px; }
  .sim__grid { grid-template-columns: 1fr; }
  .sim__pane--secondary { display: none; }

  .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .vitals { grid-template-columns: repeat(2, 1fr); }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .form-card { padding: 28px 20px; }
  .cta-band { padding: 64px 24px; }
}
