/* ============================================================
   THE BAIL DOCTOR — Dave Wood Bail Bonds
   v2 "Night Shift" — dark, photographic, professional.
   One warm color on the whole site: the call button.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* surfaces */
  --bg-0: #0b1014;
  --bg-1: #10161c;
  --surface: #141c23;
  --surface-hi: #1a242d;
  --border: #243039;
  --border-strong: #32424e;

  /* ink */
  --text-hi: #eaf2f0;
  --text-mid: #9fb3ae;
  --text-dim: #7a8f89;

  /* accent — the pulse */
  --mint: #4da3ff;
  --mint-deep: #1e6fd9;
  --success: #4ade80;
  --error: #f87171;
  --mint-wash: rgba(77, 163, 255, 0.07);

  /* the one reading measure, shared by .prose and any page head set over it */
  --measure: 47rem;

  /* the one warm color on the site: phone calls only */
  --cta: #ff6b35;
  --cta-hi: #ff7f4f;
  --cta-ink: #0b0f14;

  /* select chevron: a data URI can't read var(--mint), so bake both and
     point --chevron at the right one per tone, exactly like --mint */
  --chevron-on-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234da3ff' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --chevron-on-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230b5fbf' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --chevron: var(--chevron-on-dark);

  /* type */
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  /* geometry — fluid: the content column scales with the screen
     (94vw) up to a readability cap, instead of one fixed size */
  --wrap: min(94vw, 1680px);
  --r-s: 4px;
  --r-m: 8px;
  --r-l: 12px;
  --shadow-hard: 3px 3px 0 rgba(0, 0, 0, 0.4);
  --callbar-h: 64px;

  /* overlay colors for photo sections */
  --ov: 8, 12, 15;

  /* ghost-button border — needs real presence in every context */
  --btn-ghost-bd: rgba(234, 242, 240, 0.55);

  color-scheme: dark;
}

/* ---------- 1b. Light theme (toggle in the header; persisted) ---------- */
html[data-theme="light"] {
  --bg-0: #fbfdfc;
  --bg-1: #f1f5f2;
  --surface: #ffffff;
  --surface-hi: #f6f9f7;
  --border: #dce4df;
  --border-strong: #b9c7c0;
  --text-hi: #12201b;
  --text-mid: #40534c;
  --text-dim: #56675f;
  --mint: #0b5fbf;
  --mint-deep: #084b96;
  --success: #0f6b36;
  --error: #b3261e;
  --chevron: var(--chevron-on-light);
  --mint-wash: rgba(11, 95, 191, 0.08);
  --btn-ghost-bd: rgba(18, 32, 27, 0.5);
  color-scheme: light;
}
html[data-theme="light"] .nav { background: rgba(251, 253, 252, 0.92); }
html[data-theme="light"] .nav.scrolled { background: rgba(251, 253, 252, 0.97); }

/* ALTERNATION RULE: section tones are THEME-INVARIANT. Plain sections stay
   dark in light mode too, so light mode alternates light/dark/light/dark
   exactly like dark mode. The toggle re-themes the chrome + light surfaces. */
html[data-theme="light"] .section:not(.band),
html[data-theme="light"] .page-head:not(.has-photo) {
  --bg-0: #0b1014;
  --bg-1: #10161c;
  --surface: #141c23;
  --surface-hi: #1a242d;
  --border: #243039;
  --border-strong: #32424e;
  --text-hi: #eaf2f0;
  --text-mid: #9fb3ae;
  --text-dim: #7a8f89;
  --mint: #4da3ff;
  --mint-deep: #1e6fd9;
  --success: #4ade80;
  --error: #f87171;
  --chevron: var(--chevron-on-dark);
  --mint-wash: rgba(77, 163, 255, 0.07);
  --btn-ghost-bd: rgba(234, 242, 240, 0.55);
  background: #0b1014;
  color: var(--text-mid);
  color-scheme: dark;
}
/* light theme: cards float on shadows everywhere, not just in bands */
html[data-theme="light"] .card,
html[data-theme="light"] .svc-card,
html[data-theme="light"] .clipboard,
html[data-theme="light"] .step-card,
html[data-theme="light"] .step-panel {
  box-shadow: 0 12px 30px rgba(15, 30, 24, 0.08), 0 2px 6px rgba(15, 30, 24, 0.04);
}

/* photo-scrim sections keep bright ink in BOTH themes (white text over photos) */
.hero, .page-head.has-photo, .cta-band.has-photo {
  --text-hi: #eaf2f0;
  --text-mid: #a9bcb6;
  --text-dim: #8a9d96;
  --mint: #4da3ff;
  --mint-deep: #1e6fd9;
  --success: #4ade80;
  --error: #f87171;
  --chevron: var(--chevron-on-dark);
  --mint-wash: rgba(77, 163, 255, 0.07);
  --btn-ghost-bd: rgba(234, 242, 240, 0.65);
}

/* the footer stays night-shift dark in both themes */
.footer {
  --bg-1: #10161c;
  --surface: #141c23;
  --border: #243039;
  --border-strong: #32424e;
  --text-hi: #eaf2f0;
  --text-mid: #9fb3ae;
  --text-dim: #7a8f89;
  --mint: #4da3ff;
  --mint-deep: #1e6fd9;
  --success: #4ade80;
  --error: #f87171;
  --chevron: var(--chevron-on-dark);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* guard: nothing may ever produce a sideways scroll / cut-off page.
     `clip` (not hidden) keeps position:sticky working on the nav. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  /* room for the sticky call bar on mobile */
  padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 880px) {
  body { font-size: 17px; padding-bottom: 0; }
}
/* larger screens get proportionally larger type, not just wider margins */
@media (min-width: 1600px) {
  body { font-size: 18px; }
}
@media (min-width: 2200px) {
  body { font-size: 19.5px; }
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--text-hi); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
strong { color: var(--text-hi); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

::selection { background: var(--mint); color: var(--bg-0); }

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

/* visually hidden (screen-reader-only) text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* skip link — first element in <body>, visible only on focus */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  background: var(--mint);
  color: var(--bg-0);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 0 0 var(--r-m) var(--r-m);
  transition: top 150ms ease;
}
.skip-link:focus { top: 0; color: var(--bg-0); }

/* ---------- 3. Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-hi);
  line-height: 1.05;
  letter-spacing: 0.015em;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(38px, 6.5vw, 72px); font-weight: 700; }
h2 { font-size: clamp(30px, 4.6vw, 54px); }
h3 { font-size: clamp(20px, 2.6vw, 26px); }
h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 19px;
  color: var(--text-hi);
  margin: 0 0 0.5em;
  line-height: 1.3;
}

.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-hi);
  font-weight: 400;
  line-height: 1.55;
  max-width: 62ch;
}

.small { font-size: 14px; }

/* mono "chart label" eyebrow device */
.eyebrow, .mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--mint);
  flex: none;
}
.eyebrow.dim { color: var(--text-dim); }
.eyebrow.dim::before { background: var(--text-dim); }

/* giant outlined numerals (process steps) */
.ghost-numeral {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 12vw, 120px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--border-strong);
  user-select: none;
  pointer-events: none;
}
@supports not (-webkit-text-stroke: 1px black) {
  .ghost-numeral { color: var(--border-strong); opacity: 0.5; }
}

/* ---------- 4. Layout ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}
/* phones: go essentially edge-to-edge — a thin gutter only so text never
   touches the glass. Applies to the nav row and the mobile menu too, since
   they use .wrap. */
@media (max-width: 767px) {
  :root { --wrap: 100%; }
  .wrap { padding: 0 14px; }
}
@media (min-width: 880px) { .wrap { padding: 0 36px; } }

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section.tight { padding: clamp(36px, 5vw, 64px) 0; }

/* Light "paper" bands — remapping the tokens re-themes every component inside,
   giving the page a dark/light rhythm instead of one continuous shade */
.section.band {
  --bg-0: #eef2ef;
  --bg-1: #f6f8f6;
  --surface: #ffffff;
  --surface-hi: #f4f7f5;
  --border: #dfe7e2;
  --border-strong: #bfccc5;
  --text-hi: #12201b;
  --text-mid: #435650;
  --text-dim: #56675f;
  --mint: #0b5fbf;
  --mint-deep: #084b96;
  --success: #0f6b36;
  --error: #b3261e;
  --chevron: var(--chevron-on-light);
  --mint-wash: rgba(11, 95, 191, 0.08);
  --btn-ghost-bd: rgba(18, 32, 27, 0.5);
  /* flat, slightly deeper paper — the tonal shift (or an EKG divider shaping
     the seam) is the separator; no border lines that double up with dividers.
     NOTE: must match the divider seam-fill color (#e9efeb). */
  background: #e9efeb;
  color: var(--text-mid);
  color-scheme: light;
}
.section.band ::selection { background: #0b5fbf; color: #fff; }
/* paper cards get real shadows so they lift off the band */
.section.band .card,
.section.band .svc-card,
.section.band .clipboard,
.section.band .step-card {
  box-shadow: 0 16px 40px rgba(10, 24, 18, 0.10), 0 2px 8px rgba(10, 24, 18, 0.05);
}

.sec-head { max-width: 760px; margin-bottom: clamp(30px, 4.5vw, 52px); }

.grid { display: grid; gap: 20px; }
/* A 3-up grid holding five items leaves a hole in the last column, which reads as
   unfinished. Centre the trailing row instead — the cards keep an identical width
   (uniformity matters more than filling the row), the short row just sits centred. */
@media (min-width: 880px) {
  .grid.grid-3.center-tail { display: flex; flex-wrap: wrap; justify-content: center; }
  .grid.grid-3.center-tail > * { flex: 0 1 calc(33.333% - 13.34px); }
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  /* City / state / zip. Three fields in a .grid-2 wrapped the zip onto its own
     row at half width, which read as broken. They also shouldn't be equal —
     city needs the room, state is two characters. */
  .addr-row { grid-template-columns: 1fr 96px 132px; }
  /* Bottom-align the inputs. If any label in this row ever wraps to two lines it
     would otherwise shove that one box below its neighbours — which is exactly
     how this row broke the first time. */
  .addr-row { align-items: end; }
  /* Three short form fields stay 3-up. `.grid-3` is deliberately 2-up until
     1000px because it carries CARDS — used on a form row it orphaned the third
     field onto its own line between 700 and 1000px. */
  .mil-row { grid-template-columns: repeat(3, 1fr); }
  /* Contact page: the info column (callout + "essentials" card) fills to match
     the taller "Send a message" form card — no dead space beside the form. The
     essentials card grows (flex:1); its own surface bg fills, so the column
     bottoms line up instead of leaving the section background showing. */
  .contact-grid { align-items: stretch; }
  /* ONLY the left info column (a bare .reveal) — NOT the form card, which is
     `.card.reveal` and must keep its own field spacing untouched. */
  .contact-grid > .reveal:not(.card) { display: flex; flex-direction: column; gap: 20px; }
  /* fill AND distribute: the four essentials spread evenly down the panel so the
     card reads full and deliberate, not four rows stacked at the top of a tall box */
  .contact-grid > .reveal:not(.card) > .card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
  }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* One shared reading measure. It is NOT `ch`: ch resolves against the element's
   own font, so 70ch on an Oswald <h1> and 70ch on an IBM Plex <p> are different
   widths — the head and the body it introduces would not line up. A length keeps
   every column that uses it identical. */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; font-size: clamp(25px, 3.6vw, 36px); }
.prose h3 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--mint-deep); text-underline-offset: 3px; }
/* ...but a button inside prose is a button, not a link — never underline it.
   Higher specificity than `.prose a` so it wins regardless of source order. */
.prose a.btn { text-decoration: none; }
/* centered measure column — legal fine print only (privacy/terms/404) */
.prose.center { margin-left: auto; margin-right: auto; }

/* Page head set over a centred .prose body (privacy / terms / credits).
   Without this the headline sat hard against the page edge while the text it
   introduces began ~390px inboard — the head and its own body were neither the
   same width nor on the same left edge. Putting the head in the SAME column as
   the prose fixes that without creating a lone left column and a dead right
   half, which is the other rule. Text stays left-aligned inside the column. */
.page-head.narrow .wrap > *,
.section.narrow .wrap > * {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}
/* .eyebrow is inline-flex, and `margin: auto` cannot centre an inline-level box —
   it stayed pinned to the page edge while the headline it labels moved into the
   column. Making it block-level flex lets the auto margins apply; the dash and
   text still sit flush left INSIDE the column. */
.page-head.narrow .wrap > .eyebrow,
.section.narrow .wrap > .eyebrow {
  display: flex;
  justify-content: flex-start;
}
/* .narrow is applied to EVERY block on a legal page (head and sections alike),
   never to one in isolation — a page with some blocks in the measure column and
   some hard against the wrap edge is worse than either choice made consistently. */

/* LAYOUT RULE: no lone left/right column with dead space beside it.
   .duo = balanced text + visual two-column; .flip swaps sides.
   Alternate flip down the page: text/visual, visual/text, ...
   UNIFORMITY: columns stretch to EQUAL height — photos crop to fill,
   cards grow and center their contents, text centers vertically. */
.duo {
  display: grid;
  gap: clamp(26px, 4vw, 60px);
  align-items: stretch;
}
.duo > * { min-width: 0; }
.duo .prose { max-width: none; }
.duo > .prose {
  display: flex;
  flex-direction: column;
  /* top-align, not center: the row is exactly the text's height now, so the copy
     starts flush with the top of the photo and the last line ends flush with its
     bottom. Centering would re-introduce the top/bottom gaps we just removed. */
  justify-content: flex-start;
}
/* kill the last paragraph's trailing margin so the text block ends exactly where
   the photo ends — pixel-flush bottom edges, no sliver of dead space. */
.duo > .prose > :last-child { margin-bottom: 0; }
.duo .duo-media { display: flex; flex-direction: column; gap: 18px; }
.duo .duo-media figure.photo { margin: 0; }
.duo .duo-media > .card {
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  /* FILL, don't centre. The card stretches to match the text column, and `center`
     parked its contents in the middle — leaving a big empty band above AND below the
     rows, which is the dead space the client keeps (rightly) flagging. Instead the
     rows themselves share the height: each info-row grows equally and centres its own
     content, so the card reads as one evenly-ruled panel rather than a few items
     floating in space. */
  justify-content: flex-start;
}
.duo .duo-media > .card > .info-row {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
/* the label stays its natural size at the top; only the rows absorb the slack */
.duo .duo-media > .card > .mono-label { flex: none; }
.duo .duo-media > .callout { flex: none; margin: 0; }
@media (min-width: 920px) {
  /* EXACTLY equal halves. These were 1.05fr / 0.95fr, which rendered the text
     column ~78px wider than the photo at 2000px — the client asked for the image
     and the content to be the same width as well as the same height. */
  .duo { grid-template-columns: 1fr 1fr; }
  .duo.flip { grid-template-columns: 1fr 1fr; }
  .duo.flip > .duo-media { order: -1; }
  /* HARD RULE — the TEXT column drives the row height; the photo conforms to it.
     The photo is taken out of flow (absolute, below) so it NEVER makes the row
     taller than the text — it cover-fills to the text's exact height, so the two
     columns are ALWAYS the same height with zero dead space above/below the copy.
     DO NOT add a min-height floor here: a box taller than the text is precisely
     what centres short copy and leaves the blank space the client keeps flagging.
     If a row feels too short, give that section MORE COPY — never a taller box. */
  .duo .duo-media { position: relative; }
  .duo .duo-media > figure.photo:only-child {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
  }
  .duo .duo-media > figure.photo:only-child img {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }
  .duo .duo-media > figure.photo:only-child figcaption { flex: none; }
  /* SAME HARD RULE for the non-photo media columns. A .card already fills via
     flex:1 above; a lone .callout or data .table-wrap did NOT — it kept its
     natural (short) height beside long copy and left the big dead gap the client
     flags. Make them fill the column too: the callout stretches and centres its
     note; the table sits in a filled panel (its own surface bg, so the section
     background never shows through) and centres. Equal height, zero dead space. */
  /* :only-child — only when the callout/table IS the whole media column. When a
     callout sits BESIDE a card (e.g. domestic-violence), the card already absorbs
     the slack via flex:1, so leave that callout at its natural size. */
  .duo .duo-media > .callout:only-child {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .duo .duo-media > .table-wrap:only-child {
    flex: 1 1 auto;
    margin: 0;
    display: grid;
    align-content: center;
    background: linear-gradient(180deg, var(--surface-hi) 0%, var(--surface) 60px);
    border: 1px solid var(--border);
    border-top-color: var(--border-strong);
    border-radius: var(--r-l);
    padding: clamp(18px, 2.2vw, 30px);
  }
  .duo .duo-media > .table-wrap:only-child > table.data { margin: 0; }
  /* .duo.portrait — the media is a PERSON shot square-ish, not a landscape scene.
     Give it a narrower column so the box stays taller than it is wide: cover then
     trims the sides (an ordinary portrait crop) instead of the top, which on Dave's
     photo would cut his hair off — there is no headroom above it. Mirrors .owner. */
  .duo.portrait { grid-template-columns: 1fr clamp(360px, 34vw, 470px); }
  .duo.portrait.flip { grid-template-columns: clamp(360px, 34vw, 470px) 1fr; }
  .duo.portrait .duo-media img { object-position: 54% top; }
}

/* subtle ECG graph-paper texture (vitals strip only) */
.ecg-grid {
  background-image:
    repeating-linear-gradient(0deg, rgba(77, 163, 255, 0.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(77, 163, 255, 0.04) 0 1px, transparent 1px 40px);
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  /* never underline a button, even when it sits inside prose (where links are
     underlined) — an underline under a button reads as a broken link, not sleek */
  text-decoration: none;
  padding: 16px 26px;
  border-radius: var(--r-m);
  /* 1.5px on EVERY button (not just ghosts) so borders never make one
     button taller than its neighbour in the same row */
  border: 1.5px solid transparent;
  cursor: pointer;
  min-height: 48px;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }

/* the CALL button — the only orange thing in the world.
   NOTE: no font-size/padding bump — a call button must never render a
   different size than the button beside it. Emphasis is color only. */
.btn-call {
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: var(--shadow-hard);
  letter-spacing: 0.01em;
}
.btn-call:hover { background: var(--cta-hi); color: var(--cta-ink); }
.btn-call:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4); }
.btn-call .num { font-feature-settings: "tnum"; }

.btn-mint {
  background: transparent;
  color: var(--mint);
  border-color: var(--mint-deep);
}
.btn-mint:hover { background: var(--mint-wash); color: var(--mint); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-hi);
  border-color: var(--btn-ghost-bd);
}
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); background: var(--mint-wash); }

.btn-block { width: 100%; }

/* ---------- 6. Header / nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 16, 20, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(11, 16, 20, 0.97); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-hi);
  /* shrinkable: on tiny phones the brand gives way instead of pushing the
     call button and hamburger off the screen */
  flex: 0 1 auto;
  min-width: 0;
}
.brand:hover { color: var(--text-hi); }
.brand .mark { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-text .brand-main { overflow: hidden; text-overflow: ellipsis; }
.brand-text .brand-top {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 3px;
  white-space: nowrap;
}
.brand-text .brand-main {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links { display: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; flex: none; }
/* fixed height so the icon-bearing call button matches "Apply online" exactly */
.nav-cta .btn { padding: 0 16px; height: 44px; min-height: 44px; font-size: 14px; }
.nav-cta .btn-apply { display: none; }

/* small screens: icon-only call button so the header never overflows */
@media (max-width: 599px) {
  .nav-cta .btn-call { padding: 11px 13px; }
  .nav-cta .btn-call .num { display: none; }
  .brand .mark { width: 36px; height: 36px; }
}

.nav-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-m);
  color: var(--text-hi);
  cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle:hover { border-color: var(--mint); color: var(--mint); }
/* dark shows the sun ("switch to light"), light shows the moon */
.theme-toggle .ico-moon, .theme-row .ico-moon { display: none; }
html[data-theme="light"] .theme-toggle .ico-sun,
html[data-theme="light"] .theme-row .ico-sun { display: none; }
html[data-theme="light"] .theme-toggle .ico-moon,
html[data-theme="light"] .theme-row .ico-moon { display: block; }

/* below desktop nav: theme control lives INSIDE the menu, not the header */
@media (max-width: 999px) {
  .nav-cta .theme-toggle { display: none; }
}

/* the hamburger must be unmissable — mint-framed, generous hit area */
.nav-toggle {
  background: var(--mint-wash);
  border: 1.5px solid var(--mint-deep);
  color: var(--mint);
}
.nav-toggle:hover { border-color: var(--mint); }

/* theme row inside the pop-out menu (labeled, easy for older eyes) */
.nav-panel .theme-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  margin-top: 10px;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.nav-panel .theme-row svg { width: 21px; height: 21px; color: var(--mint); flex: none; }

/* small screens: brand + call + menu, roomy */
@media (max-width: 599px) {
  .nav-cta { gap: 10px; }
  .nav-toggle { width: 46px; height: 46px; }
}
@media (max-width: 429px) {
  .brand-text .brand-top { display: none; }
  /* "Dave Wood Bail Bonds" is longer than the old wordmark — 15px + tighter
     tracking keeps the full name on one line instead of ellipsising it */
  .brand-text .brand-main { font-size: 15px; letter-spacing: 0.01em; }
}
/* very small phones (320-360): everything scales down rather than overflowing */
@media (max-width: 359px) {
  .wrap { padding: 0 14px; }
  .brand { gap: 8px; }
  .brand .mark { width: 32px; height: 32px; }
  .brand-text .brand-main { font-size: 12px; letter-spacing: 0; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn-call { padding: 0 12px; }
  .nav-toggle { width: 42px; height: 42px; }
}

@media (min-width: 1000px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
  }
  .nav-links a {
    color: var(--text-mid);
    font-size: 15px;
    font-weight: 500;
  }
  .nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--mint); }
  .nav-toggle { display: none; }
  .nav-cta .btn-apply { display: inline-flex; }
}

/* mobile menu panel — an OVERLAY, not part of the flow.
   It used to sit in normal flow inside the sticky header, so opening the menu
   grew the header and shoved the whole page down, then yanked it back up on
   close. Anchoring it to the header (which is position:sticky, so it is already
   a positioning context) drops it over the page instead: the content behind
   stays exactly where it was, and the reading position is never lost. */
.nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  padding: 18px 0 24px;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  overscroll-behavior: contain;   /* scrolling the menu doesn't scroll the page behind */
  box-shadow: 0 24px 44px rgba(8, 12, 15, 0.34);
}
.nav.open .nav-panel { display: block; }
.nav-panel a {
  display: block;
  padding: 12px 0;
  color: var(--text-hi);
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.nav-panel a:last-of-type { border-bottom: 0; }
.nav-panel .mono-label { margin: 18px 0 4px; }

/* Collapsible groups in the mobile menu. Native <details> so the menu still works
   with JS off and gets keyboard + screen-reader behaviour for free. The panel-close
   handler in main.js binds to `.nav-panel a`, and <summary> is not an <a>, so opening
   a group does not close the whole menu. */
.nav-group { border-bottom: 1px solid var(--border); }
.nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-hi);
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;              /* Firefox */
  -webkit-tap-highlight-color: transparent;
}
.nav-group > summary::-webkit-details-marker { display: none; }  /* Safari */
.nav-group > summary::after {
  content: '';
  width: 9px; height: 9px;
  flex: none;
  margin-right: 3px;
  border-right: 2px solid var(--mint);
  border-bottom: 2px solid var(--mint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
.nav-group[open] > summary::after { transform: rotate(-135deg) translateY(1px); }
.nav-group > summary:hover { color: var(--mint); }
.nav-group > summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.nav-sub {
  padding: 2px 0 12px 15px;
  margin-bottom: 6px;
  border-left: 2px solid var(--border-strong);
}
.nav-panel .nav-sub a {
  padding: 10px 0;
  font-size: 15.5px;
  font-weight: 400;
  color: var(--text-mid);
  border-bottom: 0;
}
.nav-panel .nav-sub a:hover,
.nav-panel .nav-sub a[aria-current="page"] { color: var(--mint); }
.nav-panel .nav-sub .mono-label { display: block; margin: 14px 0 2px; }
@media (min-width: 1000px) { .nav-panel { display: none !important; } }

/* ---------- 7. Sticky call bar (mobile) ---------- */
.callbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: calc(var(--callbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--cta);
  color: var(--cta-ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  border-top: 2px solid var(--cta-ink);
}
.callbar:hover { color: var(--cta-ink); }
/* Hidden at the top of the page — the header and the hero already carry the
   number there. It slides in once the hero/page-head is scrolled past, then
   stays as the persistent CTA. Only when JS is on: no-JS keeps it visible. */
html.js .callbar {
  transform: translateY(110%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  visibility: hidden;
}
html.js .callbar.show { transform: translateY(0); visibility: visible; }
/* When the mobile menu is open, slide the sticky call bar back out of the way —
   it's fixed to the bottom, so otherwise it covers the last menu items and you
   have to fight the scroll to reach them. Specificity beats .callbar.show above. */
html.js .nav.open ~ .callbar { transform: translateY(110%); visibility: hidden; }
.callbar .ico {
  display: inline-flex;
  position: relative;
  width: 26px; height: 26px;
}
.callbar .ico svg { width: 26px; height: 26px; }
.callbar .ico::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(11, 15, 20, 0.5);
  animation: callring 5s ease-out infinite;
}
@keyframes callring {
  0%, 60% { transform: scale(0.6); opacity: 0; }
  66% { opacity: 1; }
  80% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(0.6); opacity: 0; }
}
@media (min-width: 880px) { .callbar { display: none; } }

/* ---------- 8. Hero (full-bleed photo) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(92vh, 1040px);
  /* extra bottom room for the full-bleed EKG strip */
  padding: clamp(72px, 10vw, 130px) 0 clamp(130px, 18vh, 210px);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--ov), 0.93) 0%, rgba(var(--ov), 0.8) 38%, rgba(var(--ov), 0.42) 72%, rgba(var(--ov), 0.5) 100%),
    linear-gradient(180deg, rgba(var(--ov), 0.5) 0%, rgba(var(--ov), 0) 30%, rgba(var(--ov), 0) 55%, rgba(11, 16, 20, 0.97) 100%);
}
/* width:100% is load-bearing: as a flex item the wrap would otherwise
   shrink-to-fit and auto-center, breaking alignment with the nav */
.hero .wrap { position: relative; z-index: 1; width: 100%; }
.hero h1 {
  font-size: clamp(42px, 8vw, 112px);
  font-weight: 700;
  max-width: none;
  letter-spacing: 0.022em;
  line-height: 0.98;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(8, 12, 15, 0.55);
}
.hero h1 .accent { color: var(--mint); }
/* nickname byline under the wordmark — a subtitle, never the title. "The Bail
   Doctor" lives here as reputation/flavor (and a search term), not as the brand. */
.hero-byline {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.5vw, 15px);
  letter-spacing: 0.04em;
  color: var(--text-mid);
  text-shadow: 0 1px 14px rgba(8, 12, 15, 0.5);
}
.hero-byline strong { color: var(--mint); font-weight: 700; }
.hero .lead { margin: 16px 0 32px; max-width: 66ch; font-size: clamp(17px, 2.3vw, 21px); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  /* stretch (not center) so every button in the row renders the same
     height — no offset pairs */
  align-items: stretch;
  margin-bottom: 26px;
}
/* every button in an action row shares one size; emphasis comes from
   color, never from a bigger box */
.hero-actions .btn {
  font-size: clamp(16px, 2vw, 19px);
  padding: 18px 30px;
  /* explicit floor: an icon button and a text-only button must match even
     when they wrap onto separate flex lines (phones) */
  min-height: 60px;
}
/* phones: action buttons go full-width — big, tappable, nothing squished */
@media (max-width: 479px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14px;
  color: var(--text-mid);
}
.hero-sub span { display: inline-flex; align-items: center; gap: 7px; }
.hero-sub svg { width: 15px; height: 15px; color: var(--mint); flex: none; }

/* Sits directly under the call button on purpose: it is aimed at the caller who
   already has a lawyer, at the moment they are deciding whether to dial.
   The first sentence is a comparative superiority claim carrying substantiation
   duties under C.R.S. 10-3-1104(1)(b) and 6-1-105, and it advertises an attorney
   pipeline in the vicinity of C.R.S. 18-13-130. It is on the page at the site
   owner's direction on his counsel's advice — not as a default. Do not copy this
   pattern to other pages, and read docs/attorney-referral-claim.md before
   rewording it. */
.hero-vouch {
  margin: 20px 0 22px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.5;
  color: var(--text-mid);
  max-width: 52ch;
}
.hero-vouch strong { color: var(--text-hi); font-weight: 600; }

/* hero eyebrow: drop the little leading rule — under the wordmark it just read
   as clutter. The location/est. tag stands on its own. */
.hero .eyebrow::before { display: none; }

/* Phones: trim the hero so the heartbeat divider is visible on first load,
   before any scroll. `svh` is the VISIBLE viewport (with the URL bar showing),
   which is what actually determines what's above the fold on iOS — plain `vh`
   there counts the taller full-screen height and pushes the EKG under the fold.
   The three trust chips drop on mobile (the vitals strip below repeats them). */
@media (max-width: 640px) {
  /* Column layout: content group at the top, the pulse at the bottom, an even
     gap between (was ~130px dead above the eyebrow and only ~27px under the
     buttons when the content was vertically centered).
     The pulse is put back into normal flow here — pinned absolutely it overlapped
     the buttons on short screens. In flow it can never collide: flex sizes the
     gap, and the hero simply grows if a small screen needs it. The higher-
     specificity selector is required to beat the base `.ekg-hero.ekg-full`. */
  .hero {
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    min-height: 74vh;
    min-height: 74svh;
    padding: clamp(38px, 7vh, 56px) 0 clamp(32px, 5vh, 46px);
  }
  .hero .lead { margin: 16px 0 24px; }
  .hero-sub { display: none; }
  .hero .ekg-hero.ekg-full {
    position: static;
    bottom: auto;
    margin: 0;
    width: 100%;
  }
}

/* animated EKG trace — the one signature flourish.
   .ekg-full runs edge-to-edge across the bottom of the hero. */
.ekg-hero { margin: 24px 0 6px; max-width: 720px; }
.ekg-hero svg { width: 100%; height: 48px; overflow: visible; }
.ekg-hero.ekg-full {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(44px, 8vh, 84px);
  margin: 0;
  max-width: none;
  z-index: 0;
  pointer-events: none;
}
.ekg-hero.ekg-full svg { height: 72px; }
.ekg-hero .trace-dim { stroke: var(--mint); opacity: 0.3; }
.ekg-hero .trace-lit {
  stroke: var(--mint);
  filter: drop-shadow(0 0 8px rgba(77, 163, 255, 0.7));
  stroke-dasharray: 90 1400;
  stroke-dashoffset: 0;
  animation: ekgsweep 7s linear infinite;
}
@keyframes ekgsweep {
  from { stroke-dashoffset: 1490; }
  to { stroke-dashoffset: 0; }
}

/* ---------- 9. EKG section seams ----------
   EVERY dark section gets a heartbeat seam on BOTH its top and bottom
   edges. Strict alternation guarantees the neighbor is always light
   paper (#e9efeb), so the fills are constants and work in both themes.
   Top and bottom use different spike positions so seams feel alive.
   Photo banners (page-head/hero) keep their own crisp edges. */
.section:not(.band)::before,
.split::before,
.cta-band.has-photo:not(.light)::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26px;
  z-index: 3; /* above split photos (absolutely positioned imgs) so the seam runs full width */
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'><path d='M0 20 H310 l7-6 7 6 h26 l5 5 9-22 9 26 7-13 H1200 V0 H0 Z' fill='%23e9efeb'/><path d='M0 20 H310 l7-6 7 6 h26 l5 5 9-22 9 26 7-13 H1200' fill='none' stroke='%231e6fd9' stroke-width='2' opacity='0.8'/></svg>") center / 100% 100% no-repeat;
}
.section:not(.band)::after,
.split::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 26px;
  z-index: 3; /* above split photos so the seam runs full width */
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'><path d='M0 20 H710 l7-6 7 6 h26 l5 5 9-22 9 26 7-13 H1200 V40 H0 Z' fill='%23e9efeb'/><path d='M0 20 H710 l7-6 7 6 h26 l5 5 9-22 9 26 7-13 H1200' fill='none' stroke='%231e6fd9' stroke-width='2' opacity='0.8'/></svg>") center / 100% 100% no-repeat;
}
.split { position: relative; }
/* the hero's own full-bleed EKG lives inside it; page-heads keep the hairline */

/* ---------- 10. Page head (interior pages, photo-capable) ---------- */
.page-head {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0 clamp(30px, 4vw, 48px);
  overflow: hidden;
}
.page-head.has-photo {
  /* self-contained dark photo banner (no fade into the page) with a crisp
     mint hairline at the bottom — reads as a distinct band in both themes */
  background-image:
    linear-gradient(180deg, rgba(var(--ov), 0.66) 0%, rgba(var(--ov), 0.55) 55%, rgba(var(--ov), 0.88) 100%),
    var(--ph-img);
  background-size: cover;
  background-position: center;
  padding: clamp(88px, 12vw, 150px) 0 clamp(40px, 6vw, 64px);
  /* no hairline — the heartbeat seams are the only divider lines on the site */
}
.page-head h1 { font-size: clamp(34px, 5.4vw, 60px); max-width: 18ch; text-wrap: balance; }
.page-head .lead { margin-top: 14px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}
.crumbs li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.crumbs li + li::before { content: "/"; color: var(--border-strong); }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--mint); }
.crumbs [aria-current="page"] { color: var(--mint); }

/* ---------- 11. Status chips & vitals strip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
  animation: blink 2.2s ease-in-out infinite;
}
.chip.mint { color: var(--mint); border-color: var(--mint-deep); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* vitals: a LIGHT readout strip in both themes — it is the light beat
   between the dark hero and the dark first section (alternation rule) */
.vitals {
  --text-hi: #12201b;
  --text-mid: #40534c;
  --text-dim: #56675f;
  --mint: #0b5fbf;
  --mint-deep: #084b96;
  --success: #0f6b36;
  --error: #b3261e;
  --chevron: var(--chevron-on-light);
  background: linear-gradient(180deg, #f6f9f7 0%, #e9efeb 100%);
  padding: 20px 0;
  color-scheme: light;
}
.vitals-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
.vitals .v {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mint);
}
.vitals .v .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint);
  animation: blink 2.2s ease-in-out infinite;
}
.vitals .v.dim { color: var(--text-dim); }
.vitals .v.dim .dot { background: var(--text-dim); animation: none; }

/* Mobile: the horizontal chip row wrapped into a lopsided checklist, and a
   centered stack left the dots scattered (each centered item put its dot at a
   different x). Lay it out as a 2×2 tile grid instead — dot centered on top of
   each label, equal tiles, nothing floating. Reads as a deliberate trust block. */
@media (max-width: 640px) {
  .vitals { padding: 18px 0; }
  .vitals-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    /* override the desktop row's align-items:center so tiles stretch to equal
       heights per row (a 1-line tile matches its 2-line neighbour) */
    align-items: stretch;
  }
  .vitals .v {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 9px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(18, 32, 27, 0.08);
    border-radius: 12px;
    font-size: 11.5px;
    line-height: 1.4;
  }
}

/* ---------- 12. Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface-hi) 0%, var(--surface) 60px);
  border: 1px solid var(--border);
  border-top-color: var(--border-strong);
  border-radius: var(--r-l);
  padding: 24px;
}
.card h3 { font-size: 21px; }
.card.hover:hover { border-color: var(--mint-deep); }
.card .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-m);
  background: var(--mint-wash);
  color: var(--mint);
  margin-bottom: 14px;
}
.card .ico svg { width: 22px; height: 22px; }

/* service card (replaces the old prescription-pad card) */
.svc-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-hi) 0%, var(--surface) 60px);
  border: 1px solid var(--border);
  border-top-color: var(--border-strong);
  border-radius: var(--r-l);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
/* mint pulse line across the top, revealed on hover */
.svc-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mint), var(--mint-deep));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.svc-card:hover { border-color: var(--mint-deep); transform: translateY(-4px); }
.svc-card:hover::before { transform: scaleX(1); }
.svc-card .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--r-m);
  background: var(--mint-wash);
  color: var(--mint);
  margin-bottom: 16px;
}
.svc-card .ico svg { width: 23px; height: 23px; }
.svc-card h3 { font-size: clamp(20px, 2.4vw, 23px); margin-bottom: 0.4em; }
.svc-card p { font-size: 15px; flex: 1; margin-bottom: 16px; }
.svc-card .more {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--mint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.svc-card .more:hover { color: var(--text-hi); }

/* card with a photo header */
.card.has-img { padding: 0; overflow: hidden; }
.card.has-img > img { width: 100%; height: clamp(210px, 16vw, 320px); object-fit: cover; }
.card.has-img .card-body { padding: 22px 24px 24px; }

/* info row (contact page, jail pages) */
.info-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: 0; }
.info-row .ico {
  width: 40px; height: 40px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-m);
  background: var(--mint-wash);
  color: var(--mint);
}
.info-row .ico svg { width: 20px; height: 20px; }
.info-row .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 2px;
}
.info-row .v-big { font-size: 18px; color: var(--text-hi); font-weight: 600; }

/* ---------- 13. Full-width photo/text split ---------- */
.split {
  /* photo splits are DARK sections in both themes (alternation rule) */
  --bg-0: #0b1014;
  --surface: #141c23;
  --surface-hi: #1a242d;
  --border: #243039;
  --border-strong: #32424e;
  --text-hi: #eaf2f0;
  --text-mid: #9fb3ae;
  --text-dim: #7a8f89;
  --mint: #4da3ff;
  --mint-deep: #1e6fd9;
  --success: #4ade80;
  --error: #f87171;
  --chevron: var(--chevron-on-dark);
  --mint-wash: rgba(77, 163, 255, 0.07);
  --btn-ghost-bd: rgba(234, 242, 240, 0.55);
  display: grid;
  background: linear-gradient(135deg, #121a21 0%, #0d1318 100%);
  color: var(--text-mid);
  color-scheme: dark;
  /* no border lines — the heartbeat seams (::before/::after) mark the edges */
}
.split-media { position: relative; min-height: 260px; }
.split-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.split-body {
  padding: clamp(36px, 5vw, 80px) clamp(20px, 4vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-body > :last-child { margin-bottom: 0; }
@media (min-width: 920px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.flip .split-media { order: 2; }
  .split-media { min-height: clamp(420px, 36vw, 660px); }
}

/* ---------- statewide county list (service area) ---------- */
.statewide { margin-top: clamp(30px, 4.5vw, 52px); text-align: center; }
.statewide .mono-label { display: inline-block; margin-bottom: 16px; }
.county-tags {
  list-style: none;
  margin: 0 auto 16px;
  padding: 0;
  max-width: 62ch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: center;
}
/* The statewide counties as a tidy PIN GRID rather than a loose drift of pills.
   Two big photo cards above a scatter of bare tags read as two unrelated things;
   uniform tiles with a pin each make it one deliberate list. auto-fill keeps it
   dense (5-6 up on desktop, 3 up on a phone) so it stays compact. */
.county-grid {
  list-style: none;
  margin: 0 auto 18px;
  padding: 0;
  max-width: 940px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  text-align: left;
}
.county-grid li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-mid);
  background: var(--surface);
}
/* pin drawn as a mask so it takes the accent colour and needs no markup per item */
.county-grid li::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--mint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 22s8-4.5 8-11a8 8 0 1 0-16 0c0 6.5 8 11 8 11Zm0-8.4a2.6 2.6 0 1 0 0-5.2 2.6 2.6 0 0 0 0 5.2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 22s8-4.5 8-11a8 8 0 1 0-16 0c0 6.5 8 11 8 11Zm0-8.4a2.6 2.6 0 1 0 0-5.2 2.6 2.6 0 0 0 0 5.2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
@media (max-width: 600px) {
  /* 3 up on a phone instead of 2, so twenty counties stay a short block */
  .county-grid { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 6px; }
  .county-grid li { padding: 8px 9px; font-size: 11.5px; gap: 6px; letter-spacing: 0; }
  .county-grid li::before { width: 11px; height: 11px; }
}
/* label that ties the two home-county cards to the section instead of leaving
   them looking like two stray boxes */
.area-label { display: block; margin-bottom: 14px; }
.statewide > p.small { max-width: 60ch; margin: 0 auto; }

/* ---------- "meet the owner" ----------
   A contained portrait shown at its NATURAL size beside the story. Deliberately
   not a cover-cropped column: a portrait photo forced to fill a tall box becomes
   an extreme face close-up. Here the whole photo shows, at a sensible size. */
.owner {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  /* HARD RULE: the photo column and the text column are the SAME height. */
  align-items: stretch;
}
.owner-photo {
  position: relative;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--surface);
}
/* the caption rides the bottom of the photo so the image can fill the frame */
.owner-photo figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 24px 16px 11px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #dfe9e6;
  background: linear-gradient(to top, rgba(8, 12, 15, 0.85), rgba(8, 12, 15, 0));
}
.owner-text { min-width: 0; }
/* HARD RULE: image left, copy right, SIDE BY SIDE — same 920px breakpoint as every
   other two-column section on the site. Never stack this into photo-on-top /
   text-below on desktop or tablet; that reads as broken and breaks the rhythm.
   The portrait is square (720x720), so the column is sized to stay TALLER than it
   is wide at every width: cover then trims the sides (a normal portrait crop that
   always keeps his whole head) and never the top/bottom, which would cut his hair
   off — there is no headroom above it. Wide screens show essentially the full photo. */
@media (min-width: 920px) {
  .owner { grid-template-columns: clamp(360px, 38vw, 520px) 1fr; }
  .owner-photo img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    /* Measured: Dave occupies x=115..662, so his centre sits at 54% of the frame,
       not 50%. Centre the crop on HIM so his face stays dead centre in the column
       at every width instead of drifting toward one edge.
       Vertical `top` is a safety catch: normally the column is taller than it is
       wide so there is no vertical crop at all, but on a very wide screen the copy
       shortens and the box can go landscape — then any trim comes off the BOTTOM
       (table/arms) instead of the top, which would cut his hair off. */
    object-position: 54% top;
  }
}
@media (max-width: 919px) {
  /* PHONES ONLY — the one width where every section on this site stacks. The photo
     spans the FULL content width, edge for edge with the copy beneath it (never a
     narrower inset box), and keeps its natural square aspect so nothing is cropped. */
  .owner { display: block; }
  .owner-photo { max-width: none; margin: 0; }
  .owner-photo img { display: block; width: 100%; height: auto; }
  .owner-text { margin-top: clamp(22px, 5vw, 34px); }
}

/* ---------- full-bleed photo row ----------
   A .duo stops at the --wrap gutter (1680px), so on a 2000px desktop it leaves
   ~320px of dead margin and the row reads as a small box floating in a big page.
   A .bleed row spans the full viewport instead: the photo runs clean off its own
   edge of the screen and the text fills the other half. Exactly two halves,
   1fr / 1fr, stretched — same width AND same height, by construction.
   Used for the sections that should feel like the page is full as you scroll past. */
.section.bleed { padding: 0; }
.section.bleed > .wrap { max-width: 100%; padding: 0; }

.bleed-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}
.bleed-row > .bleed-media {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  margin: 0; /* it's a <figure> */
}
.bleed-row > .bleed-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* caption rides the bottom of the photo instead of adding a row that would
   break the equal-height promise */
.bleed-row > .bleed-media figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 26px clamp(18px, 2vw, 30px) 16px;
  font-size: 13px;
  line-height: 1.45;
  color: #dfe9e6;
  background: linear-gradient(to top, rgba(8, 12, 15, 0.88), rgba(8, 12, 15, 0));
}
.bleed-row > .bleed-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 5vw, 96px) clamp(22px, 4vw, 92px);
}
.bleed-row > .bleed-text > *:last-child { margin-bottom: 0; }

@media (min-width: 920px) {
  .bleed-row {
    grid-template-columns: 1fr 1fr;
    /* tall enough that the row owns the screen on the way past */
    min-height: clamp(500px, 46vw, 820px);
  }
  .bleed-row.flip > .bleed-media { order: -1; }
}

/* numbered steps stacked inside a .bleed-text column (the wide .steps card grid
   doesn't fit a half-width column, and would reintroduce the dead space these
   rows exist to remove) */
.flow { list-style: none; margin: 26px 0 0; padding: 0; }
.flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.flow-step:first-child { border-top: 0; padding-top: 0; }
.flow-num {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  color: var(--mint);
  min-width: 44px;
  padding-top: 2px;
}
.flow-step h3 { margin: 0 0 6px; font-size: 19px; }
.flow-step p { margin: 0; color: var(--text-mid); font-size: 15px; line-height: 1.6; }

/* content photo in prose */
figure.photo {
  position: relative;
  margin: 0 0 1.4em;
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  overflow: hidden;
}
figure.photo img { width: 100%; }
/* The caption RIDES THE BOTTOM OF THE PHOTO — it is not a strip underneath it.
   As a strip it did two bad things: it ate ~60px of the box, squeezing the photo
   into a 2.05 letterbox band, and because it had no background of its own it read
   as an empty rounded-off panel bolted under the picture. Overlaid on a scrim it
   gives the whole box back to the image and the frame reads as one object.
   Same treatment as .owner-photo, so every photo on the site matches. */
figure.photo figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dfe9e6;
  padding: 26px 14px 11px;
  border-top: 0;
  background: linear-gradient(to top, rgba(8, 12, 15, 0.88), rgba(8, 12, 15, 0));
}

/* ---------- 14. Process steps ---------- */
.steps { display: grid; gap: 24px; position: relative; }
@media (min-width: 880px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-hi) 0%, var(--surface) 70px);
  border: 1px solid var(--border);
  border-top-color: var(--border-strong);
  border-radius: var(--r-l);
  padding: 26px 24px 24px;
  overflow: hidden;
  z-index: 1;
}
.step-card .ghost-numeral {
  position: absolute;
  right: 8px;
  top: -14px;
  font-size: clamp(84px, 11vw, 116px);
  opacity: 0.85;
}
.step-card h3 { position: relative; font-size: 23px; }
.step-card p { position: relative; font-size: 15px; margin: 0; }
.step-card .steptag {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  position: relative;
}

/* connecting pulse line (desktop) */
.steps::before {
  content: "";
  position: absolute;
  display: none;
  top: 50%;
  left: 2%; right: 2%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint-deep) 12%, var(--mint-deep) 88%, transparent);
  opacity: 0.22;
}
@media (min-width: 880px) { .steps::before { display: block; } }

/* ---------- 15. FAQ accordion ---------- */
.clipboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 8px 22px;
}
details.faq {
  border-bottom: 1px solid var(--border);
}
details.faq:last-child { border-bottom: 0; }
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 34px 18px 0;
  position: relative;
  color: var(--text-hi);
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.4;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .qno {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--mint);
  flex: none;
  min-width: 44px;
}
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--mint);
  transition: transform 200ms ease;
}
details.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.faq .faq-a {
  padding: 0 0 20px 58px;
  font-size: 15.5px;
}
details.faq .faq-a > :last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  details.faq summary { gap: 10px; }
  details.faq summary .qno { min-width: 36px; }
  details.faq .faq-a { padding-left: 0; }
}

/* ---------- 16. Forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-hi);
  margin-bottom: 7px;
}
.field label .opt {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 13px;
}
/* labels that wrap their input (cloned template blocks) */
.field label .lbl-inline { display: block; margin-bottom: 7px; }
.field .hint {
  font-size: 13px;
  color: var(--text-dim);
  margin: 6px 0 0;
}
/* Opt-OUT, not opt-in. This was a list of four specific types, so adding an
   <input type="time"> silently produced an unstyled 104px box next to 301px
   neighbours — no width, no border, no padding. Any text-like input now inherits
   the field styling automatically; only checkbox and radio, which style
   themselves elsewhere, are excluded. */
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-m);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color 140ms ease;
}
.field select {
  appearance: none;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field textarea { resize: vertical; min-height: 120px; }
/* Native date/time controls carry an intrinsic height from the picker widget that
   min-height cannot pull back down: date rendered 50px and time 51px against the
   48px every other control sits at. Side by side in a .grid row — date-of-birth
   next to a select, court date next to court time — the boxes visibly disagreed.
   An explicit height beats min-height here because the floor was never the
   problem; box-sizing is border-box globally, so 48px matches the others exactly. */
.field input[type="date"],
.field input[type="time"],
.field input[type="datetime-local"] { height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 1px var(--mint);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); opacity: 0.7; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: var(--error);
}
.field-error {
  color: var(--error);
  font-size: 13.5px;
  margin: 6px 0 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.field-error::before { content: "✕"; font-size: 11px; flex: none; }

.form-msg {
  border: 1px solid var(--error);
  background: rgba(248, 113, 113, 0.08);
  color: var(--error);
  border-radius: var(--r-m);
  padding: 12px 14px;
  font-size: 14.5px;
  margin-bottom: 18px;
}
.form-msg.ok {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.08);
  color: var(--success);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.6;
  cursor: pointer;
  margin: 10px 0 18px;
}
.check input[type="checkbox"] {
  width: 19px; height: 19px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--mint);
}

fieldset { border: 0; padding: 0; margin: 0; }

/* radio pills */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14.5px;
  color: var(--text-mid);
  cursor: pointer;
  font-weight: 500;
  margin: 0;
}
.pills input { accent-color: var(--mint); margin: 0; }
.pills label:has(input:checked) {
  border-color: var(--mint);
  color: var(--mint);
  background: var(--mint-wash);
}

/* ---------- 17. Application wizard ---------- */
/* ---------- bond application wizard ----------
   The shell used to be a bare `max-width: 780px` column, which left ~362px of
   dead margin either side at 1600px (and ~450px at 2000px) — a narrow strip
   floating in a wide page, nothing like the rest of the site. It's a two-column
   layout now: the form, and a sticky aside that carries the "just call instead"
   route and the what-you'll-need list. The aside uses the width that was being
   wasted, and the form column stays a sane measure — a 1200px-wide text input
   would be its own kind of broken. */
.wizard-shell { max-width: 780px; margin: 0 auto; }

.wizard-layout { display: grid; gap: clamp(26px, 3vw, 46px); }
.wizard-main { min-width: 0; }
.wizard-aside { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

@media (min-width: 1040px) {
  .wizard-layout {
    /* The form column FILLS the remaining width — it must not be a fixed size
       centred in the wrap. A fixed 980px + `justify-content: center` inset the
       whole wizard by 54px on each side, so the form's left edge missed the
       hero headline above it and the aside's right edge missed the page edge.
       Hero and content have to share one left and one right edge. */
    grid-template-columns: minmax(0, 1fr) clamp(310px, 25vw, 400px);
    align-items: start;
  }
  /* follows you down the form; 96px clears the sticky header */
  .wizard-aside { position: sticky; top: 96px; }
}

.aside-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 22px;
}
.aside-card h2 {
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--text-hi);
}
.aside-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: var(--text-mid); }
.aside-card p:last-child { margin-bottom: 0; }
.aside-list { list-style: none; margin: 0; padding: 0; }
.aside-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-mid);
}
.aside-list li:first-child { border-top: 0; padding-top: 0; }
.aside-list li::before { content: "—"; color: var(--mint); }
/* Numbered variant — used for "what happens after you send this", where the order is
   the point (the signing step comes AFTER a human call, never before it).
   NAMED `is-numbered`, NOT `steps`: `.steps` is already the 3-column Process-steps
   component further down this file, complete with a connecting pulse line, and reusing
   that name laid this list out in three columns with a rule struck through it. */
.aside-list.is-numbered { counter-reset: step; }
.aside-list.is-numbered li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--mint);
}
.aside-figure { margin: 0; border: 1px solid var(--border); border-radius: var(--r-l); overflow: hidden; }
.aside-figure img { display: block; width: 100%; height: auto; }
.aside-figure figcaption {
  padding: 10px 14px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-dim);
  background: var(--bg-0);
}

/* big, obvious numbered steps: circles + connecting line + always-visible labels */
.progress {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0 0 14px;
}
.progress li {
  flex: 1;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
/* line segment connecting each circle to the previous one */
.progress li + li::before {
  content: "";
  position: absolute;
  top: 19px;
  right: calc(50% + 25px);
  left: calc(-50% + 25px);
  height: 2px;
  background: var(--border-strong);
}
.progress li.done + li::before,
.progress li.done + li.current::before { background: var(--mint-deep); }
.progress .pnum {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  position: relative;
  z-index: 1;
}
.progress li.current .pnum {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--bg-0);
  box-shadow: 0 0 0 5px rgba(77, 163, 255, 0.15);
}
.progress li.done .pnum {
  background: var(--mint-deep);
  border-color: var(--mint-deep);
  color: var(--bg-0);
  font-size: 0;
}
.progress li.done .pnum::after { content: "✓"; font-size: 17px; }
.progress li .plabel {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-dim);
  max-width: 84px;
}
.progress li.current .plabel { color: var(--mint); }
.progress li.done .plabel { color: var(--text-mid); }
@media (min-width: 700px) {
  .progress li + li::before { top: 22px; right: calc(50% + 29px); left: calc(-50% + 29px); }
  .progress .pnum { width: 44px; height: 44px; font-size: 17px; }
  .progress li.done .pnum::after { font-size: 19px; }
  .progress li .plabel { font-size: 12.5px; }
}
.progress-status {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-hi);
  margin: 0 0 24px;
}
.progress-status .stepno { color: var(--mint); }

.step-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: clamp(22px, 4vw, 34px);
}

/* A <legend> is painted INTO the fieldset's top border by default — the border
   is cut away behind it and the text straddles the edge of the card. It reads as
   a broken box ("the title on the box is slightly overlapped to the box, which
   kinda looks weird"). Floating the legend takes it out of that border cut-out
   and makes it lay out as an ordinary block inside the panel, so the card's top
   border draws unbroken. The float is the fix, not a style: `display:block`
   alone does NOT stop a legend straddling the border. */
.step-panel > legend {
  float: left;
  width: 100%;
  padding: 0;
}
.step-panel > legend + * { clear: both; }
.step-panel legend, .step-panel .step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 4vw, 32px);
  text-transform: uppercase;
  color: var(--text-hi);
  line-height: 1.05;
  padding: 0;
  margin-bottom: 6px;
}
.step-panel .step-note {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.step-panel .step-note::before {
  content: "●";
  color: var(--mint);
  font-size: 9px;
  flex: none;
}

.wizard-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: stretch; /* Back and Continue always match height */
  margin-top: 26px;
}
.wizard-nav .btn { flex: 1; }
@media (min-width: 700px) {
  .wizard-nav { justify-content: flex-end; }
  .wizard-nav .btn { flex: 0 0 auto; min-width: 160px; }
}

.subcard {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-m);
  padding: 18px;
  margin-bottom: 16px;
  position: relative;
}
.subcard legend, .subcard .subcard-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 12px;
  display: block;
}
/* right must equal .subcard's padding (18px), not a smaller nudge: every field in
   the block ends at the padding edge, so a 12px offset hung the button 6px past
   the column of input boxes and read as a misaligned box overhanging the card. */
.subcard .remove-block {
  position: absolute;
  top: 12px; right: 18px;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  border-radius: var(--r-s);
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}
.subcard .remove-block:hover { color: var(--error); border-color: var(--error); }

.add-block {
  background: none;
  border: 1px dashed var(--mint-deep);
  color: var(--mint);
  border-radius: var(--r-m);
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.add-block:hover { background: var(--mint-wash); }

/* review step */
.review-group {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.review-group:last-of-type { border-bottom: 0; }
.review-group .rg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.review-group .rg-head .t {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mint);
}
.review-group .rg-head button {
  background: none;
  border: none;
  color: var(--mint);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  margin: -8px -10px -8px 0;
  border-radius: var(--r-s);
}
.review-group .rg-head button:hover { color: var(--text-hi); }
.review-group dl { margin: 0; display: grid; gap: 4px; }
.review-group dl div { display: flex; gap: 10px; font-size: 14.5px; }
.review-group dt { color: var(--text-dim); flex: none; min-width: 130px; }
.review-group dd { margin: 0; color: var(--text-hi); overflow-wrap: anywhere; }

/* ---- the agreement (step 5): verbatim Guarantee Agreement, rendered as a
   readable document. Nothing is scroll-clipped — the co-signer sees the whole
   thing, which is the point. Also used on the standalone /guarantee-agreement
   page, so it must stand alone outside the wizard too. ---- */
.agreement-doc {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-l);
  background: var(--bg-1);
  padding: clamp(18px, 3.2vw, 30px);
  margin: 4px 0 20px;
}
.agreement-doc > :first-child { margin-top: 0; }
.agreement-doc > :last-child { margin-bottom: 0; }
.agreement-doc .ad-head {
  text-align: center;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 16px;
  margin-bottom: 18px;
}
.ad-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.ad-title {
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.01em;
}
.ad-caution {
  border: 1px solid var(--mint-deep);
  background: var(--mint-wash);
  border-radius: var(--r-m);
  padding: 12px 15px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-hi);
  margin: 0 0 18px;
}
.agreement-doc .ad-h {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 20px 0 10px;
  line-height: 1.4;
}
.ad-body, .ad-meta, .ad-affirm {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-mid);
  margin: 0 0 14px;
}
.ad-affirm { color: var(--text-hi); }
.ad-body strong, .ad-affirm strong { color: var(--text-hi); }
.ad-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
}
/* the fill-in blanks from the paper form, shown as underlined gaps so the
   sentence reads as the form reads — completed with the agent, not here */
.ad-fill {
  display: inline-block;
  min-width: 78px;
  border-bottom: 1px solid var(--text-dim);
  margin: 0 2px;
  vertical-align: baseline;
}
.ad-fill.sm { min-width: 34px; }
.ad-emphasis {
  text-align: center;
  font-weight: 700;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.4;
  color: var(--text-hi);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 14px 8px;
  margin: 18px 0;
}
.ad-conditions {
  margin: 0 0 14px;
  padding-left: 22px;
  display: grid;
  gap: 9px;
}
.ad-conditions li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
  padding-left: 4px;
}
.ad-fulllink { margin: 0 0 18px; font-size: 14px; }
.ad-fulllink a { color: var(--mint); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.check .note {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* draft banner + success panel */
.draft-banner[hidden] { display: none; }
.draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  background: var(--mint-wash);
  border: 1px solid var(--mint-deep);
  border-radius: var(--r-m);
  padding: 10px 16px;
  font-size: 14.5px;
  color: var(--text-hi);
  margin-bottom: 22px;
}
.draft-banner button {
  background: none;
  border: none;
  color: var(--mint);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 12px;
  margin: -6px;
  min-height: 44px;
}

.success-panel textarea {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-m);
  color: var(--text-mid);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 14px;
  min-height: 200px;
  margin: 14px 0;
}

/* ---------- 18. CTA band (photo-capable) ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  padding: clamp(52px, 8vw, 96px) 0;
  text-align: center;
}
.cta-band.has-photo {
  background-image:
    linear-gradient(rgba(var(--ov), 0.86), rgba(var(--ov), 0.86)),
    var(--band-img);
  background-size: cover;
  background-position: center;
}
/* light CTA variant — used when the section above is dark (alternation rule) */
.cta-band.has-photo.light {
  --text-hi: #12201b;
  --text-mid: #40534c;
  --text-dim: #56675f;
  --mint: #0b5fbf;
  --mint-deep: #084b96;
  --success: #0f6b36;
  --error: #b3261e;
  --chevron: var(--chevron-on-light);
  --mint-wash: rgba(11, 95, 191, 0.08);
  --btn-ghost-bd: rgba(18, 32, 27, 0.5);
  /* flat paper — must match the #e9efeb seam fills of the dark section above */
  background-image: none;
  background-color: #e9efeb;
  color-scheme: light;
}
.cta-band h2 { max-width: 22ch; margin: 0 auto 14px; }
.cta-band .lead { margin: 0 auto 28px; }
.cta-band .hero-actions { justify-content: center; }
.cta-band .subline {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- 19. Footer ---------- */
.footer {
  background: #080c0f;
  border-top: 1px solid var(--border);
  padding: clamp(44px, 6vw, 64px) 0 calc(28px + var(--callbar-h));
  font-size: 14.5px;
}
@media (min-width: 880px) { .footer { padding-bottom: 28px; } }
.footer-grid {
  display: grid;
  gap: 36px 28px;
  margin-bottom: 40px;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer .blurb { color: var(--text-dim); margin: 14px 0; max-width: 34ch; }
.footer .footer-h {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 500;
}
.footer-grid a {
  display: block;
  color: var(--text-mid);
  padding: 5px 0;
}
.footer-grid a:hover { color: var(--mint); }
.footer .fphone {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-hi);
  margin-top: 4px;
}
.footer .fphone:hover { color: var(--mint); }
.footer .fphone svg { width: 18px; height: 18px; color: var(--cta); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-legal {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 90ch;
}

/* ---------- 20. Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  /* Don't let columns crush on a phone. Without a floor, a four-column table squeezed
     into 390px wraps to roughly one word per line and becomes unreadable — the wrapper
     already scrolls horizontally, so give the table room to stay legible and let people
     swipe it instead. No effect on desktop, where the table is wider than this anyway. */
  min-width: 560px;
}
table.data th, table.data td {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--border);
}
table.data th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
  background: var(--surface);
  font-weight: 500;
}
table.data td { color: var(--text-mid); }
table.data td strong { color: var(--text-hi); }

/* callout */
.callout {
  border-left: 3px solid var(--mint);
  background: var(--mint-wash);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  padding: 16px 18px;
  margin: 0 0 1.2em;
  font-size: 15px;
}
.callout.warn { border-left-color: var(--cta); background: rgba(255, 107, 53, 0.07); }
.callout > :last-child { margin-bottom: 0; }

/* ---------- 21. Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1), transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---------- 22. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ekg-hero .trace-lit { animation: none; stroke-dasharray: none; }
  .chip .dot, .vitals .v .dot { animation: none; }
  .callbar .ico::after { display: none; }
}

/* ---------- 23. Print ---------- */
@media print {
  .nav, .callbar, .footer, .cta-band { display: none; }
  body { background: #fff; color: #000; }
}
