/* ==========================================================================
   DrCurbside
   Everything visual is driven by the custom properties below.
   ========================================================================== */

:root {
  /* Brand */
  --brand:        #0f766e;
  --brand-strong: #0b5d57;
  --brand-soft:   rgba(15, 118, 110, 0.10);
  --on-brand:     #ffffff;   /* text drawn on top of --brand; flips in dark mode */

  /* Alert — used by the "what happens today" side of the data-flow graphic */
  --alert:        #b42318;
  --alert-soft:   rgba(180, 35, 24, 0.09);

  /* Demo button in the header — red, so it reads as the one live thing to click */
  --demo:         #b42318;
  --demo-strong:  #911c13;
  --on-demo:      #ffffff;

  /* CTA band — fixed values so white text stays legible in both themes */
  --cta-bg:       #0f766e;
  --cta-btn-ink:  #0b5d57;

  /* Surfaces & text */
  --bg:        #ffffff;
  --bg-alt:    #f5f7fb;
  --surface:   #ffffff;
  --text:      #16181d;
  --text-muted:#5b6472;
  --border:    #e3e7ef;

  /* Shape & depth */
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.05), 0 16px 40px rgba(16, 24, 40, 0.10);

  /* Rhythm */
  --gap:       1.5rem;
  --section-y: 5rem;
  --max-width: 1120px;

  /* Three type roles, and each one means something:
     display = the site's voice, mono = "this is checkable", sans = read this. */
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:        #5eead4;
    --brand-strong: #99f6e4;
    --brand-soft:   rgba(94, 234, 212, 0.13);
    --on-brand:     #04241f;   /* the accent is light here, so its text must be dark */

    --alert:        #ff9a8f;
    --alert-soft:   rgba(255, 154, 143, 0.12);

    /* Lifted off the page background; white text still clears 5:1 on it. */
    --demo:         #c9372c;
    --demo-strong:  #e0483c;

    --cta-bg:       #0c4f4a;

    --bg:        #0e1014;
    --bg-alt:    #14171d;
    --surface:   #171b22;
    --text:      #e9ecf2;
    --text-muted:#9aa4b4;
    --border:    #262c36;

    --shadow:    0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

/* --------------------------------------------------------------- Base --- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(2.125rem, 5vw, 3.375rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.005em; }

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }

img { max-width: 100%; height: auto; display: block; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--brand-soft);
  color: inherit;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
pre code { background: none; padding: 0; font-size: 0.85rem; line-height: 1.6; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.muted { color: var(--text-muted); }

/* Vertical breathing room between two stacked blocks in the same section. */
.stack { margin-top: 2rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--on-brand);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: var(--on-brand); }

/* ------------------------------------------------------------- Header --- */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand-mark { color: var(--brand); width: 1.4rem; height: 1.4rem; flex: none; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--bg-alt); }
.site-nav a.active { color: var(--brand); background: var(--brand-soft); }

/* The one filled link in the nav — it leaves the marketing site for the app. */
.site-nav a.nav-demo,
.site-nav a.nav-demo:hover {
  background: var(--demo);
  color: var(--on-demo);
  font-weight: 600;
}
.site-nav a.nav-demo:hover { background: var(--demo-strong); }

/* Checkbox-driven mobile menu — no JavaScript involved. */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }

/* ------------------------------------------------------------ Buttons --- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button-primary { background: var(--brand); color: var(--on-brand); }
.button-primary:hover { background: var(--brand-strong); color: var(--on-brand); }

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.button-ghost:hover { background: var(--bg-alt); color: var(--text); }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* --------------------------------------------------------------- Hero --- */

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  background: radial-gradient(70rem 28rem at 12% -20%, var(--brand-soft), transparent 65%);
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 46rem; }

/* Mono, uppercase, and rule-led — the same treatment every citation gets. */
.eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  margin-right: 0.7rem;
  border-top: 1px solid currentColor;
  vertical-align: middle;
}

.lede {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 42rem;
}

/* ----------------------------------------------------------- Sections --- */

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-title { margin-bottom: 0.4rem; }
.section-sub { color: var(--text-muted); margin-bottom: 2.5rem; }

.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

/* -------------------------------------------------------------- Grids --- */

.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.section-alt .card { background: var(--bg); }

.grid .card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }

.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--text-muted); font-size: 0.9375rem; }

/* Names what the card is an instance of. Earns its place only because the
   label is real information — never a decorative counter. */
.card-label {
  display: block;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

/* ---------------------------------------------------- Split & metrics --- */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: center;
}
.split-start { align-items: start; }

.checklist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding-left: 1.85rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.18rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Figures read as a ledger that totals to zero, not as four equal tiles —
   the last row is the argument, so it gets the rule and the color. */
.ledger { margin: 0; display: grid; }

.ledger-row {
  display: grid;
  /* Fixed first column so the figures line up down the page; each row is its
     own grid, so an intrinsic width would leave the labels ragged. */
  grid-template-columns: var(--ledger-col, 8.5rem) minmax(0, 1fr);
  gap: 0.15rem 1.5rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
}
.ledger-row:first-child { border-top: 0; padding-top: 0; }

.ledger-figure {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: right;
}
.ledger-label { margin: 0; font-size: 0.9375rem; color: var(--text-muted); }

.ledger-total { border-top: 2px solid var(--brand); }
.ledger-total .ledger-figure { color: var(--brand); }
.ledger-total .ledger-label { color: var(--text); }

/* ------------------------------------------------- Pills, chips, notes --- */

.pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pill-alert { background: var(--alert-soft); color: var(--alert); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.chip {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.callout {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--brand-soft);
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.callout-alert { border-left-color: var(--alert); background: var(--alert-soft); }
.callout strong { color: var(--text); }

.src { font-size: 0.8125rem; color: var(--text-muted); }

/* --------------------------------------------------------------- Grids --- */

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.85rem);
  box-shadow: var(--shadow);
}
.section-alt .panel { background: var(--bg); }
.panel-head { margin-bottom: 1.35rem; }
.panel-head h3 { margin: 0.55rem 0 0.3rem; font-size: 1.1875rem; }
.panel-head p { color: var(--text-muted); font-size: 0.9375rem; }

/* ------------------------------------------------- Flow diagram (data) --- */
/* A vertical rail with numbered nodes. Reads the same at every width, so no
   breakpoint is needed; `--lane` recolors a whole flow in one place.        */

.flow-lane { --lane: var(--text-muted); }
.flow-risk { --lane: var(--alert); }
.flow-good { --lane: var(--brand); }

.flow {
  list-style: none;
  counter-reset: flow;
  position: relative;
  margin: 0;
  padding: 0 0 0 2.75rem;
}
.flow::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: color-mix(in srgb, var(--lane) 35%, transparent);
}

.flow > li { position: relative; padding-bottom: 1.5rem; }
.flow > li:last-child { padding-bottom: 0; }
.flow > li::before {
  counter-increment: flow;
  content: counter(flow);
  position: absolute;
  left: -2.75rem;
  top: -0.15rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--lane) 16%, var(--surface));
  border: 3px solid var(--surface);
  color: var(--lane);
  font-size: 0.8125rem;
  font-weight: 700;
}
.section-alt .flow > li::before { background: color-mix(in srgb, var(--lane) 16%, var(--bg)); border-color: var(--bg); }

.flow h4 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}
.flow p { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 0; }

.flow-outcome {
  padding: 1rem 1.15rem;
  border: 1px dashed color-mix(in srgb, var(--lane) 45%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--lane) 7%, transparent);
}
.flow > li.flow-outcome::before { top: 0.85rem; }

/* ------------------------------------------------------------ Diagrams --- */
/* All SVG is inline so it inherits the theme tokens through currentColor and
   the classes below — nothing to fetch, and dark mode needs no second copy.
   Wide figures scroll inside their own box, the same as .table-wrap.        */

.lane-glyph {
  display: block;
  width: 3.75rem;
  height: auto;
  margin-bottom: 1rem;
  color: var(--lane);
}

.diagram { margin: 0; }
.diagram-scroll {
  overflow-x: auto;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.section-alt .diagram-scroll { background: var(--bg); }
/* Capped at the viewBox width so the labels inside never render larger than
   the page's own type; below that it scales down and the box scrolls. */
.diagram svg {
  display: block;
  width: 100%;
  min-width: 36rem;
  max-width: 40rem;
  height: auto;
}
.diagram figcaption {
  margin-top: 1.15rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.dg-baseline { stroke: var(--border); stroke-width: 1; }
.dg-threshold { stroke: var(--alert); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dg-bar-ok { fill: color-mix(in srgb, var(--brand) 15%, transparent); stroke: var(--brand); stroke-width: 1.5; }
.dg-bar-risk { fill: color-mix(in srgb, var(--alert) 15%, transparent); stroke: var(--alert); stroke-width: 1.5; }
.dg-box { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.section-alt .dg-box { fill: var(--bg); }
.dg-bound { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2; }
/* Solid = it happens; dashed = it happens only if the clinician opts in. */
.dg-flow { fill: none; stroke: var(--brand); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dg-optin { fill: none; stroke: var(--brand); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 5 4; }

.dg-token { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.dg-token-ok { fill: var(--brand); }
.dg-token-risk { fill: var(--alert); }
.dg-mono-ok { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; fill: var(--brand); }
.dg-mono-risk { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; fill: var(--alert); }
.dg-name { font-family: var(--font); font-size: 12.5px; fill: var(--text-muted); }
.dg-title { font-family: var(--font); font-size: 13.5px; font-weight: 600; fill: var(--text); }

/* ---------------------------------------------------------- Comparison --- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.section-alt .table-wrap { background: var(--bg); }

.compare {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare caption {
  padding: 0.9rem 1.1rem;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.compare th, .compare td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.compare thead th:nth-child(2) { color: var(--alert); }
.compare thead th:nth-child(3) { color: var(--brand); }
.compare tbody th { font-weight: 600; width: 15rem; }
.compare td { color: var(--text-muted); }

/* ----------------------------------------------------------- Timeline --- */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

.timeline > li {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.section-alt .timeline > li { background: var(--bg); }

.tl-when {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand);
}
.tl-where {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.timeline h3 { font-size: 1.0625rem; margin-bottom: 0.35rem; }
.timeline p { color: var(--text-muted); font-size: 0.9375rem; }

/* ---------------------------------------------------------- Resources --- */

.resources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}
.resource a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.section-alt .resource a { background: var(--bg); }
.resource a:hover { border-color: var(--brand); color: var(--text); }
.resource-title { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.3rem; }
.resource-src { display: block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--brand); }

/* ---------------------------------------------------------------- CTA --- */

.cta {
  padding: var(--section-y) 0;
  background: var(--cta-bg);
}
.cta-inner { text-align: center; max-width: 40rem; margin-inline: auto; }
.cta h2, .cta p { color: #fff; }
.cta p { opacity: 0.92; }
.cta .button-row { justify-content: center; }
.cta .button-primary { background: #fff; color: var(--cta-btn-ink); }
.cta .button-primary:hover { background: #fff; color: var(--cta-btn-ink); opacity: 0.92; }
.cta .button { margin-top: 1.5rem; }
.cta :focus-visible { outline-color: #fff; }

/* -------------------------------------------------------------- Prose --- */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-muted); }
.prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* ------------------------------------------------------------ Contact --- */

.contact-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
}

.form-card h2 { font-size: 1.375rem; }

.note {
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--brand-soft);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 8rem; }

input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.7; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Spam trap. Off-canvas rather than display:none so a bot reading the DOM still
   sees a fillable field; a real visitor never reaches it (tabindex="-1"). */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-aside { display: grid; gap: var(--gap); }

.detail-list { margin: 0; }
.detail-list dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 1rem;
}
.detail-list dt:first-of-type { margin-top: 0; }
.detail-list dd { margin: 0.15rem 0 0; font-size: 0.9375rem; }

/* ----------------------------------------------------------- 404 page --- */

.error-page {
  padding: clamp(4rem, 12vw, 8rem) 0;
  text-align: center;
}
.error-page .lede { margin-inline: auto; }
.error-page .button-row { justify-content: center; }

.error-code {
  font-size: clamp(4rem, 15vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--brand);
  margin: 0 0 0.5rem;
}

/* ------------------------------------------------------------- Footer --- */

.site-footer {
  padding: 3rem 0 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.footer-inner .muted { margin-top: 0.6rem; font-size: 0.875rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-links a:hover { color: var(--brand); }

.copyright { font-size: 0.875rem; color: var(--text-muted); }

/* --------------------------------------------------------- Responsive --- */

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-y: 3.5rem; }

  .nav-toggle-label {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  /* Three bars drawn from one span plus its two pseudo-elements. */
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    position: absolute;
    display: block;
    width: 1.1rem;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle-label span { top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .nav-toggle-label span::before { content: ""; top: -6px; left: 0; }
  .nav-toggle-label span::after  { content: ""; top:  6px; left: 0; }

  .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle-label span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span::after  { transform: translateY(-6px) rotate(-45deg); }

  .nav-toggle:focus-visible ~ .nav-toggle-label {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.125rem;
    padding-bottom: 0.75rem;
  }
  .site-nav a { padding: 0.6rem 0.8rem; }

  .footer-inner { flex-direction: column; }

  .timeline > li { grid-template-columns: 1fr; }
  .compare tbody th { width: auto; }
  .ledger-row { --ledger-col: 5.5rem; }
}

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