/* ==========================================================================
   Security Passport — public site
   Original design system. No remote fonts, no CDNs, no external dependencies.
   Palette: maroon #7E192B · gold #F2D38A · espresso #34231E
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  --espresso: #34231e;
  --espresso-deep: #241714;
  --maroon: #7e192b;
  --maroon-text: #7e192b;
  --maroon-deep: #5e1220;
  --maroon-soft: #a83247;
  --maroon-surface: #7e192b;
  --gold: #f2d38a;
  --gold-deep: #c9a25a;
  --gold-ink: #7a5c16;      /* gold that is legible as text on parchment */

  --parchment: #fbf7f0;
  --parchment-2: #f5ede1;
  --card: #fffdf9;
  --ink: #2c1e19;
  --ink-2: #5a4740;
  --ink-3: #7c6a63;
  --line: #e4d7c2;
  --line-2: #d3c1a6;

  --ok: #1f6b4a;
  --ok-bg: #e7f3ec;
  --warn: #8a5a10;
  --warn-bg: #fbf0da;
  --stop: #8c1f28;
  --stop-bg: #fbe9e9;

  --shadow-s: 0 1px 2px rgba(52, 35, 30, .06), 0 2px 8px rgba(52, 35, 30, .05);
  --shadow-m: 0 2px 6px rgba(52, 35, 30, .07), 0 12px 32px rgba(52, 35, 30, .09);
  --shadow-l: 0 4px 10px rgba(52, 35, 30, .09), 0 28px 60px rgba(52, 35, 30, .13);

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;

  --shell: 1180px;
  --shell-narrow: 880px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step: 1.15rem;
  --fs-min: 12px;   /* nothing on the public site renders below 12px */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --espresso: #f0e7de;
  --espresso-deep: #efe4d9;
  --maroon: #c2566b;
  --maroon-text: #dc8294;
  --maroon-deep: #a83247;
  --maroon-soft: #d07a8c;
  --maroon-surface: #a83247;
  --gold: #f2d38a;
  --gold-deep: #e0bd76;
  --gold-ink: #f2d38a;

  --parchment: #17100e;
  --parchment-2: #1e1512;
  --card: #241a17;
  --ink: #f3ebe2;
  --ink-2: #cdbcb1;
  --ink-3: #a8978c;
  --line: #3a2b26;
  --line-2: #4a3831;

  --ok: #6cc79b;
  --ok-bg: #14301f;
  --warn: #e6bc72;
  --warn-bg: #2e2413;
  --stop: #f09aa0;
  --stop-bg: #33191b;

  --shadow-s: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-m: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-l: 0 10px 40px rgba(0, 0, 0, .5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  color: var(--espresso);
}

h1 { font-size: clamp(2.15rem, 1.35rem + 3.4vw, 3.9rem); }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + .6vw, 1.4rem); }
h4 { font-size: 1.02rem; letter-spacing: 0; }

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

a { color: var(--maroon-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--maroon-deep); }
[data-theme="dark"] a { color: var(--maroon-text); }
[data-theme="dark"] a:hover { color: var(--gold); }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }

strong { font-weight: 650; color: var(--espresso); }
[data-theme="dark"] strong { color: var(--espresso-deep); }

code, kbd, samp { font-family: var(--mono); font-size: .88em; }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
  margin: 2.5rem 0;
}

::selection { background: var(--gold); color: #2c1e19; }

:focus-visible {
  outline: 3px solid var(--maroon);
  outline-offset: 2px;
  border-radius: 3px;
}
[data-theme="dark"] :focus-visible { outline-color: var(--gold); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  background: var(--maroon);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  font-weight: 600;
  text-decoration: none;
  transition: top .15s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
.shell--narrow { width: min(100% - 2.5rem, var(--shell-narrow)); }

.section { padding: clamp(3.5rem, 2rem + 6vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem) 0; }
.section--tinted {
  background:
    radial-gradient(120% 90% at 10% 0%, rgba(242, 211, 138, .18), transparent 62%),
    var(--parchment-2);
  border-block: 1px solid var(--line);
}
.section--dark {
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(242, 211, 138, .13), transparent 60%),
    var(--espresso-deep);
  color: #f2e9df;
  border-block: 1px solid rgba(242, 211, 138, .18);
}
[data-theme="dark"] .section--dark {
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(242, 211, 138, .09), transparent 60%),
    #100b09;
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #f6efe6; }
.section--dark a { color: var(--gold); }
.section--dark strong { color: #f6efe6; }
.section--dark .lede { color: #d8c9bc; }

.page-head {
  padding: clamp(2.5rem, 1.6rem + 4vw, 4.5rem) 0 clamp(2rem, 1.4rem + 2.6vw, 3rem);
  background:
    radial-gradient(90% 120% at 12% -10%, rgba(242, 211, 138, .3), transparent 58%),
    linear-gradient(180deg, var(--parchment-2), var(--parchment));
  border-bottom: 1px solid var(--line);
}

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--split { grid-template-columns: 1.05fr .95fr; align-items: start; }
.grid--sidebar { grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 2.5rem; }

/* Grid children must be allowed to shrink below their content width,
   otherwise a wide table or a long word widens the whole page on a phone. */
.grid > *,
.grid--split > *,
.grid--sidebar > *,
.contact-layout > *,
.cta-band > *,
.stepper > *,
.process > *,
.routes > *,
.std > *,
.never > *,
.strip > * { min-width: 0; }

/* Section headings.
   The section header text is 25% wider than the first pass: the headline
   and the paragraph under it were both constrained well inside the column. */
.sec-head { max-width: 900px; margin-bottom: clamp(1.75rem, 1rem + 2.4vw, 3rem); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head .lede { max-width: 900px; }

/* Heading row: the heading text with its own mark to the right of it. */
.sec-head__title {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: clamp(.6rem, .9vw, 1.1rem);
}
.sec-head__title h2 { margin: 0; }
.sec-head--center .sec-head__title { justify-content: center; }
.sec-head--center .sec-head__icon { margin-inline-start: 0; }
.cta-band .sec-head__icon { color: var(--gold); }
.sec-head__icon {
  flex: 0 0 auto;
  width: clamp(3.25rem, 7vw, 6rem);
  height: clamp(3.25rem, 7vw, 6rem);
  margin-inline-start: auto;
  color: var(--maroon);
  opacity: .9;
}
[data-theme="dark"] .sec-head__icon { color: var(--gold); }

/* Match the graphic to the complete heading block without stretching its artwork. */
.sec-head:has(> .sec-head__icon),
.cta-band__heading {
  position: relative;
  padding-inline-end: min(26%, 12rem);
}
.sec-head:has(> .sec-head__icon) { max-width: none; }
.sec-head:has(> .sec-head__icon) .sec-head__title,
.sec-head:has(> .sec-head__icon) .lede { width: 100%; max-width: 900px; }
.sec-head:has(> .sec-head__icon) .sec-head__title h2 { flex: 1 1 100%; min-width: 0; }
.sec-head > .sec-head__icon,
.cta-band__heading > .sec-head__icon {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(24%, 11rem);
  height: 100%;
}
.cta-band__heading { grid-column: 1 / -1; }
.cta-band--landing { row-gap: 1rem; }
.cta-band--landing .cta-band__actions { grid-column: 1 / -1; align-items: start; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: max(var(--fs-min), .72rem);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 .9rem;
}
[data-theme="dark"] .eyebrow { color: var(--gold); }
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.lede {
  font-size: clamp(1.02rem, .98rem + .3vw, 1.16rem);
  color: var(--ink-2);
  max-width: 900px;
}
.sec-head--center .lede { margin-inline: auto; }

.page-mark {
  font-family: var(--mono);
  font-size: max(var(--fs-min), .72rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   4. Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--ease), background-color .16s var(--ease),
              border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--maroon-surface); color: #fff; box-shadow: var(--shadow-s); }
.btn--primary:hover { background: var(--maroon-deep); color: #fff; box-shadow: var(--shadow-m); }
[data-theme="dark"] .btn--primary { background: #a83247; }
[data-theme="dark"] .btn--primary:hover { background: #8f2438; }

.btn--gold { background: var(--gold); color: #33221c; box-shadow: var(--shadow-s); }
.btn--gold:hover { background: #f7e0a9; color: #33221c; box-shadow: var(--shadow-m); }

.btn--ghost { background: transparent; color: var(--espresso); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--maroon); color: var(--maroon); background: rgba(126, 25, 43, .04); }
[data-theme="dark"] .btn--ghost { color: #f0e7de; }
[data-theme="dark"] .btn--ghost:hover { background: rgba(242, 211, 138, .08); color: var(--gold); border-color: var(--gold-deep); }

.btn--sm { padding: .5rem 1rem; font-size: .86rem; }
.btn--lg { padding: .95rem 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.link-arrow::after {
  content: "→";
  transition: transform .16s var(--ease);
}
.link-arrow:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--parchment) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(52, 35, 30, .08); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 74px;
  padding-block: .6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__logo { height: 38px; width: auto; }
.brand__logo--dark { display: none; }
[data-theme="dark"] .brand__logo--light { display: none; }
[data-theme="dark"] .brand__logo--dark { display: block; }
.brand__tag {
  font-size: max(var(--fs-min), .68rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-left: 1px solid var(--line-2);
  padding-left: .8rem;
  line-height: 1.25;
  max-width: 9ch;
}

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li { margin: 0; }
.nav a {
  display: block;
  padding: .5rem .7rem;
  border-radius: var(--radius-s);
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--maroon); background: rgba(126, 25, 43, .06); }
[data-theme="dark"] .nav a:hover { color: var(--gold); background: rgba(242, 211, 138, .08); }
.nav a[aria-current="page"] { color: var(--maroon); font-weight: 650; }
[data-theme="dark"] .nav a[aria-current="page"] { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.theme-toggle:hover { border-color: var(--maroon); color: var(--maroon); }
[data-theme="dark"] .theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle__icon { font-size: .95rem; line-height: 1; }

.nav-toggle {
  display: none;
  padding: .45rem .8rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(3rem, 1.6rem + 5.4vw, 6rem) 0 clamp(3rem, 2rem + 4vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 88% 6%, rgba(242, 211, 138, .38), transparent 58%),
    radial-gradient(60% 70% at 4% 0%, rgba(126, 25, 43, .10), transparent 60%),
    linear-gradient(180deg, var(--parchment-2) 0%, var(--parchment) 70%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(126, 25, 43, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(126, 25, 43, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 30% 30%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 60% at 30% 30%, #000, transparent 78%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}

.hero h1 { margin-bottom: .55em; }
.hero h1 em {
  font-style: normal;
  color: var(--maroon);
  position: relative;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: .05em;
  text-underline-offset: .16em;
  text-decoration-color: currentColor;
}
[data-theme="dark"] .hero h1 em { color: var(--gold); }
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .06em;
  height: .28em;
  background: var(--gold);
  opacity: .38;
  z-index: -1;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: 1.4rem 0 1.9rem;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: var(--ink-2);
}
.hero__meta li { display: flex; align-items: center; gap: .45rem; margin: 0; }
.hero__meta li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-deep);
  flex-shrink: 0;
}

.hero__figure {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-l);
  border: 1px solid var(--line-2);
  background: var(--card);
}
.hero__image { position: relative; }
.hero__image img { display: block; width: 100%; height: auto; }
.hero__figure figcaption {
  padding: .85rem 1.1rem;
  font-size: .82rem;
  color: var(--ink-2);
  background: var(--card);
  border-top: 1px solid var(--line);
}
.hero__stamp {
  position: absolute;
  left: clamp(8px, 2%, 16px);
  bottom: clamp(8px, 2%, 16px);
  width: auto;
  height: 40%;
  aspect-ratio: 1;
  opacity: .95;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(52, 35, 30, .28));
}

/* Principle strip */
.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.strip__item { background: var(--card); padding: 1.05rem 1.15rem; }
.strip__item h2,
.strip__item h3 {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 .3rem;
  font-weight: 700;
}
[data-theme="dark"] .strip__item h2,
[data-theme="dark"] .strip__item h3 { color: var(--gold); }
.strip__item p { font-size: .92rem; color: var(--ink-2); margin: 0; }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-s);
  position: relative;
}
.card--raised { box-shadow: var(--shadow-m); }
.card--accent { border-top: 3px solid var(--maroon); }
.card--gold { border-top: 3px solid var(--gold-deep); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-2); font-size: .97rem; }

.card__num {
  font-family: var(--mono);
  font-size: max(var(--fs-min), .74rem);
  letter-spacing: .14em;
  color: var(--ink-3);
  display: block;
  margin-bottom: .55rem;
}

.card__list { margin: .9rem 0 0; padding-left: 1.05rem; font-size: .94rem; color: var(--ink-2); }
.card__list li { margin-bottom: .3rem; }

.card__tag {
  display: inline-block;
  font-size: max(var(--fs-min), .7rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon-text);
  background: rgba(126, 25, 43, .08);
  border: 1px solid rgba(126, 25, 43, .18);
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
[data-theme="dark"] .card__tag {
  color: var(--gold);
  background: rgba(242, 211, 138, .1);
  border-color: rgba(242, 211, 138, .22);
}

/* --------------------------------------------------------------------------
   8. Process steps — the signature component
   -------------------------------------------------------------------------- */
.process { counter-reset: step; display: grid; gap: 1.15rem; }

.process__step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  position: relative;
  box-shadow: var(--shadow-s);
}
.process__step::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 100%;
  width: 1px;
  height: 1.15rem;
  background: linear-gradient(var(--line-2), transparent);
}
.process__step:last-child::before { display: none; }

.process__badge {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #9c2436, var(--maroon) 62%);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  border: 1px solid rgba(242, 211, 138, .5);
  box-shadow: inset 0 0 0 4px rgba(242, 211, 138, .14);
}
[data-theme="dark"] .process__badge {
  background: radial-gradient(circle at 30% 25%, #8f2438, #5e1220 62%);
}
.process__step h3 { margin-bottom: .3em; }
.process__step > div > p { color: var(--ink-2); font-size: .98rem; margin-bottom: 0; }

.process__grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  border-top: 1px dashed var(--line-2);
  padding-top: .9rem;
}
.process__grid div { font-size: .88rem; }
.process__grid dt {
  font-size: max(var(--fs-min), .68rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: .2rem;
}
.process__grid dd { margin: 0; color: var(--ink-2); }

/* Horizontal stepper for phases */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  counter-reset: phase;
}
.stepper__item {
  counter-increment: phase;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-deep);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
  position: relative;
}
.stepper__item::after {
  content: counter(phase, decimal-leading-zero);
  font-family: var(--mono);
  font-size: max(var(--fs-min), .72rem);
  letter-spacing: .1em;
  color: var(--maroon-text);
  display: block;
  margin-bottom: .45rem;
}
.stepper__item h3 { font-size: 1.05rem; margin-bottom: .25em; }
.stepper__item p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.stepper__when {
  display: inline-block;
  margin-top: .6rem;
  font-size: max(var(--fs-min), .72rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   9. Panels, callouts, tables
   -------------------------------------------------------------------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.panel--maroon {
  background: linear-gradient(160deg, #8d2133, var(--maroon) 55%, var(--maroon-deep));
  border-color: transparent;
  color: #f7ece4;
}
.panel--maroon h3, .panel--maroon h4 { color: var(--gold); }
.panel--maroon a { color: var(--gold); }
.panel--maroon p, .panel--maroon li { color: #f2e2d8; }

.note {
  border-left: 3px solid var(--gold-deep);
  background: var(--warn-bg);
  padding: 1rem 1.15rem;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: .95rem;
  color: var(--ink-2);
}
.note strong { color: var(--espresso); }
[data-theme="dark"] .note strong { color: #f6efe6; }
.note--stop { border-left-color: var(--stop); background: var(--stop-bg); }
.note--ok { border-left-color: var(--ok); background: var(--ok-bg); }

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-s);
  -webkit-overflow-scrolling: touch;
}
.table-wrap--flat { box-shadow: none; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  min-width: 620px;
}
caption {
  text-align: left;
  padding: .95rem 1.15rem .6rem;
  font-size: .84rem;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
th, td {
  text-align: left;
  padding: .75rem 1.15rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  background: var(--parchment-2);
  font-size: max(var(--fs-min), .74rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 700;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(242, 211, 138, .1); }
td strong { display: block; }

/* --------------------------------------------------------------------------
   10. Story blocks
   -------------------------------------------------------------------------- */
.story {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-m);
}
.story__head {
  padding: 1.4rem 1.6rem;
  background: linear-gradient(140deg, var(--espresso-deep), var(--espresso));
  color: #f4e9df;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.story__head h3 { color: var(--gold); margin: 0; font-size: 1.25rem; }
.story__head p { margin: 0; font-size: .88rem; color: #cdb9ac; }
.story__body { padding: 1.6rem; }
.story__body p { color: var(--ink-2); }
.story__quote {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--espresso);
  border-left: 3px solid var(--gold-deep);
  padding-left: 1.1rem;
  margin: 0 0 1.2rem;
}
[data-theme="dark"] .story__quote { color: #f2e9df; }

.story__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin: 0 0 1.3rem;
}
.story__facts div { background: var(--card); padding: .8rem .9rem; }
.story__facts dt {
  font-size: max(var(--fs-min), .68rem);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.story__facts dd { margin: .15rem 0 0; font-size: .95rem; color: var(--espresso); font-weight: 600; }
[data-theme="dark"] .story__facts dd { color: #f2e9df; }

.composite-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: max(var(--fs-min), .7rem);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid rgba(138, 90, 16, .25);
  padding: .3rem .7rem;
  border-radius: 999px;
}

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: .6rem;
  bottom: .6rem;
  width: 2px;
  background: linear-gradient(var(--gold-deep), var(--line-2));
}
.timeline li { position: relative; padding: 0 0 1.5rem 2rem; margin: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--maroon);
}
.timeline li.is-done::before { background: var(--maroon); }
.timeline li h3 { font-size: 1.05rem; margin-bottom: .25em; }
.timeline li p { font-size: .95rem; color: var(--ink-2); margin-bottom: .35rem; }
.timeline__when {
  font-family: var(--mono);
  font-size: max(var(--fs-min), .72rem);
  letter-spacing: .08em;
  color: var(--ink-3);
  display: block;
  margin-bottom: .2rem;
}

/* --------------------------------------------------------------------------
   11. Accordion (FAQ) & disclosure lists
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: .7rem; }
details.faq__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
details.faq__item[open] { box-shadow: var(--shadow-s); border-color: var(--line-2); }
.faq__item summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 650;
  color: var(--espresso);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
[data-theme="dark"] .faq__item summary { color: #f2e9df; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--maroon);
  flex-shrink: 0;
}
details.faq__item[open] summary::after { content: "\2212"; }
.faq__item summary:hover { color: var(--maroon); }
.faq__body {
  padding: 0 1.2rem 1.15rem;
  font-size: .96rem;
  color: var(--ink-2);
}
.faq__body p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   12. Route (evidence) cards
   -------------------------------------------------------------------------- */
.routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.route {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
}
.route::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--maroon), var(--gold-deep));
}
.route--recommended { box-shadow: var(--shadow-m); border-color: var(--gold-deep); }
.route__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: max(var(--fs-min), .64rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--maroon);
  background: rgba(242, 211, 138, .3);
  border: 1px solid var(--gold-deep);
  padding: .22rem .55rem;
  border-radius: 999px;
}
.route h3 { margin-bottom: .35em; }
.route__who { font-size: .84rem; color: var(--ink-3); margin-bottom: .8rem; }
.route p { font-size: .95rem; color: var(--ink-2); }
.route__foot {
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px dashed var(--line-2);
  font-size: .86rem;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   13. Never / guarantee list
   -------------------------------------------------------------------------- */
.never { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.never__item { background: var(--card); padding: 1.3rem 1.35rem; }
.never__item h3 { font-size: 1.02rem; margin-bottom: .3em; display: flex; gap: .55rem; align-items: baseline; }
.never__item h3::before { content: "\2715"; color: var(--maroon); font-size: .85rem; }
.never__item p { font-size: .93rem; color: var(--ink-2); margin: 0; }

/* --------------------------------------------------------------------------
   14. Standards / mapping cards
   -------------------------------------------------------------------------- */
.std { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.std__card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  background: var(--card);
  display: flex;
  flex-direction: column;
}
.std__card h3 { font-size: 1.05rem; margin-bottom: .2em; }
.std__card .std__meta { font-size: .8rem; color: var(--ink-3); margin-bottom: .7rem; }
.std__card p { font-size: .93rem; color: var(--ink-2); }
.std__card footer { margin-top: auto; padding-top: .8rem; font-size: .86rem; }

/* --------------------------------------------------------------------------
   15. Tier ladder (Trust page)
   -------------------------------------------------------------------------- */
.ladder { display: grid; gap: .5rem; }
.ladder__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 92px;
  gap: 1rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: .8rem 1rem;
}
.ladder__row.is-current {
  border-color: var(--maroon);
  background: linear-gradient(90deg, rgba(126, 25, 43, .07), transparent 45%), var(--card);
  box-shadow: var(--shadow-s);
}
.ladder__name { font-weight: 650; color: var(--espresso); }
[data-theme="dark"] .ladder__name { color: #f2e9df; }
.ladder__bar { height: 10px; border-radius: 999px; background: var(--parchment-2); overflow: hidden; border: 1px solid var(--line); }
.ladder__fill { height: 100%; background: linear-gradient(90deg, var(--maroon), var(--gold-deep)); }
.ladder__fill--7 { width: 7%; }
.ladder__fill--20 { width: 20%; }
.ladder__fill--40 { width: 40%; }
.ladder__fill--69 { width: 69%; }
.ladder__fill--100 { width: 100%; }
.ladder__count { text-align: right; font-family: var(--mono); font-size: .86rem; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   16. Contact form
   -------------------------------------------------------------------------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
  box-shadow: var(--shadow-m);
}

.form-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  margin-bottom: 1.15rem;
  background: var(--parchment);
}
[data-theme="dark"] .form-step { background: var(--parchment-2); }
.form-step__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .3rem; }
.form-step__num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--maroon-surface);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
}
[data-theme="dark"] .form-step__num { background: #a83247; }
.form-step__num[aria-hidden="true"] { background: var(--line-2); color: var(--ink-2); }
.form-step h2,
.form-step h3 { margin: 0; font-size: 1.12rem; }
.form-step__hint { font-size: .92rem; color: var(--ink-2); margin: .35rem 0 0; }

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: .88rem;
  font-weight: 650;
  color: var(--espresso);
  margin-bottom: .3rem;
}
[data-theme="dark"] .field label { color: #f2e9df; }
.field .req { color: var(--maroon); font-weight: 700; }
[data-theme="dark"] .field .req { color: var(--gold); }
.field__hint { display: block; font-size: .82rem; color: var(--ink-3); margin-top: .3rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: var(--parchment);
  color: var(--ink);
  font: inherit;
  font-size: .98rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: #1b1310; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(126, 25, 43, .16);
}
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 211, 138, .18);
}
textarea { min-height: 120px; resize: vertical; }

[aria-invalid="true"] { border-color: var(--stop) !important; }

.field__error {
  display: none;
  margin-top: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--stop);
}
.field__error.is-shown { display: block; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.15rem; }
.form-grid .field--full { grid-column: 1 / -1; }

.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .9rem; }
.check {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--ink-2);
  cursor: pointer;
}
.check input { margin-top: .28rem; accent-color: var(--maroon); width: 16px; height: 16px; flex-shrink: 0; }

.form-status {
  display: none;
  border-radius: var(--radius-s);
  padding: .85rem 1rem;
  font-size: .94rem;
  margin-bottom: 1.1rem;
  border: 1px solid transparent;
}
.form-status.is-shown { display: block; }
.form-status--error { background: var(--stop-bg); border-color: rgba(140, 31, 40, .3); color: var(--stop); }
.form-status--ok { background: var(--ok-bg); border-color: rgba(31, 107, 74, .3); color: var(--ok); }
.form-status--info { background: var(--warn-bg); border-color: rgba(138, 90, 16, .3); color: var(--warn); }

.form-success {
  display: none;
  text-align: center;
  padding: 1rem .5rem;
}
.form-success.is-shown { display: block; }
.form-success h2 { font-size: 1.45rem; margin-bottom: .35em; }
/* The panel receives focus so screen readers announce it. Keep the indicator
   soft so it does not read as a bordered error box. */
.form-success:focus,
.form-success:focus-visible {
  outline: 2px dashed var(--gold-deep);
  outline-offset: 6px;
}
.form-success__mark {
  width: 66px; height: 66px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--ok-bg);
  border: 2px solid var(--ok);
  display: grid;
  place-items: center;
  color: var(--ok);
  font-size: 1.8rem;
}

.code-row { display: flex; gap: .7rem; align-items: stretch; }
.code-row input { flex: 1; letter-spacing: .35em; font-family: var(--mono); font-size: 1.05rem; }
.code-row .btn { white-space: nowrap; }

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   16b. Sample documents & photo frames
   -------------------------------------------------------------------------- */
.sample {
  background:
    linear-gradient(180deg, var(--card), var(--parchment));
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--maroon);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-s);
}
.sample .table-wrap { box-shadow: none; }
.sample h3 { margin-bottom: .2em; }

.photo-frame {
  position: relative;
  margin: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-m);
  background: var(--card);
}
.photo-frame img { width: 100%; height: auto; display: block; position: relative; z-index: 1; }
.photo-frame figcaption {
  position: relative;
  z-index: 2;
  padding: .85rem 1.1rem;
  font-size: .84rem;
  color: var(--ink-2);
  background: var(--card);
  border-top: 1px solid var(--line);
}
.photo-frame__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 90% at 80% 10%, rgba(242, 211, 138, .45), transparent 60%),
    linear-gradient(140deg, var(--espresso-deep), var(--maroon-deep));
}
.photo-frame__fallback span {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: .04em;
  padding: 1rem 2rem;
  border-top: 1px solid rgba(242, 211, 138, .5);
  border-bottom: 1px solid rgba(242, 211, 138, .5);
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--espresso-deep);
  color: #cdb9ac;
  padding: 3.5rem 0 2rem;
  border-top: 3px solid var(--gold-deep);
}
[data-theme="dark"] .site-footer { background: #0d0908; }
.site-footer h3, .site-footer h4 { color: var(--gold); font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer a { color: #e7d8cc; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-copyright {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.footer-copyright:hover { text-decoration-thickness: 2px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; font-size: .93rem; }
.footer-brand img { height: 40px; width: auto; margin-bottom: .9rem; }
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(242, 211, 138, .18);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  justify-content: space-between;
  font-size: .84rem;
  color: #a8968a;
}
.footer-bottom p { margin: 0; }

/* --------------------------------------------------------------------------
   18. Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 2.5rem; }
.measure { max-width: 62ch; }
.measure-s { max-width: 48ch; }
.measure-s--center { margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.tiny { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.stack-sm > * + * { margin-top: .6rem; }
.figure--wide { max-width: none; }
.btn-plain {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  color: var(--maroon-text);
}
.btn-plain:hover { color: var(--maroon-deep); }
[data-theme="dark"] .btn-plain { color: var(--gold); }
.fieldset-reset { border: 0; padding: 0; margin: 0; min-width: 0; }
.legend-tight { font-size: .88rem; font-weight: 650; margin-bottom: .4rem; padding: 0; }
.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.pill {
  font-size: .82rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
}

/* Call-to-action band */
.cta-band {
  background:
    radial-gradient(90% 140% at 12% 0%, rgba(242, 211, 138, .22), transparent 55%),
    linear-gradient(150deg, #8d2133, var(--maroon) 48%, var(--maroon-deep));
  color: #f7ece4;
  border-radius: var(--radius-l);
  padding: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-l);
}
.cta-band h2 { color: var(--gold); margin-bottom: .35em; }
.cta-band p { color: #f2e2d8; max-width: 900px; margin: 0; }
.cta-band__actions { display: flex; flex-direction: column; gap: .7rem; }
@media (max-width: 760px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-band__actions { flex-direction: row; flex-wrap: wrap; }
}

/* Aside list used on journey pages */
.aside {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  position: sticky;
  top: 96px;
}
.aside h2,
.aside h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); font-family: var(--sans); font-weight: 700; margin-bottom: .8rem; }
[data-theme="dark"] .aside h2,
[data-theme="dark"] .aside h3 { color: var(--gold); }
.aside ul { list-style: none; padding: 0; margin: 0; }
.aside li { margin-bottom: .45rem; font-size: .93rem; }
.aside li a { text-decoration: none; display: block; padding: .3rem .5rem; margin-left: -.5rem; border-radius: var(--radius-s); }
.aside li a:hover { background: rgba(126, 25, 43, .06); }
[data-theme="dark"] .aside li a:hover { background: rgba(242, 211, 138, .08); }

/* Journey pages: the "On this page" list marks the section being read. */
.aside li a.is-active {
  color: var(--maroon);
  font-weight: 650;
  background: rgba(242, 211, 138, .22);
  box-shadow: inset 3px 0 0 var(--gold-deep);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
[data-theme="dark"] .aside li a.is-active {
  color: var(--gold);
  background: rgba(242, 211, 138, .12);
  box-shadow: inset 3px 0 0 var(--gold);
}

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .brand__tag { display: none; }
  .nav a { padding: .5rem .55rem; font-size: .88rem; }
}

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__figure { order: -1; max-width: 640px; }
  .grid--split, .grid--sidebar, .contact-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .process__grid { grid-template-columns: 1fr; gap: .5rem; }
  .routes, .std, .never, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .header-actions .btn { display: none; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--parchment);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-m);
    padding: .6rem 1.25rem 1.1rem;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: .1rem; }
  .nav a { padding: .65rem .5rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav li:last-child a { border-bottom: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .shell { width: min(100% - 1.75rem, var(--shell)); }
  .routes, .std, .never, .grid--2, .grid--3, .grid--4, .stepper,
  .form-grid, .checkbox-grid, .strip, .story__facts { grid-template-columns: 1fr; }
  .process__step { grid-template-columns: 46px minmax(0, 1fr); gap: .9rem; padding: 1.1rem 1.1rem; }
  .process__badge { width: 46px; height: 46px; font-size: 1.15rem; }
  .process__step::before { left: 23px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .code-row { flex-direction: column; }
  .ladder__row { grid-template-columns: 110px minmax(0, 1fr); }
  .ladder__count { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 380px) {
  .shell { width: min(100% - 1.25rem, var(--shell)); }
}

/* --------------------------------------------------------------------------
   20. Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .site-footer, .hero__stamp, .skip-link, .btn-row { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 1rem 0; }
  .card, .panel, .story, .form-card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
}

/* --------------------------------------------------------------------------
   21. Dark theme only
   Every rule below is scoped to [data-theme="dark"]. The light theme keeps
   the appearance it had before this section existed.
   -------------------------------------------------------------------------- */

/* The Espresso wordmark stays readable over the dark footer. */
.footer-brand .footer-logo {
  background: #fff8ea;
  box-sizing: content-box;
  padding: .45rem .6rem;
  border-radius: .55rem;
}

/* "Contact sales" reads as a white button on the dark ground, with a thin
   gold outline when it takes the keyboard focus. */
[data-theme="dark"] .btn--contact-sales {
  background: #ffffff;
  color: #2c1e19;
  border-color: #ffffff;
  box-shadow: var(--shadow-s);
}
[data-theme="dark"] .btn--contact-sales:hover {
  background: #f3e9df;
  color: #2c1e19;
  border-color: #f3e9df;
}
[data-theme="dark"] .btn--contact-sales:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* The closing call to action is espresso in the dark theme, and stays
   espresso on hover: the maroon gradient is too loud at the end of a
   dark page. */
[data-theme="dark"] .cta-band {
  background:
    radial-gradient(90% 140% at 12% 0%, rgba(242, 211, 138, .10), transparent 55%),
    linear-gradient(150deg, #3d2a22 0%, #241714 62%);
  border: 1px solid rgba(242, 211, 138, .16);
}
[data-theme="dark"] .cta-band h2 { color: var(--gold); }
[data-theme="dark"] .cta-band p { color: #e7d8cc; }
[data-theme="dark"] .cta-band .btn--gold {
  background: #241714;
  color: var(--gold);
  border-color: rgba(242, 211, 138, .5);
  box-shadow: none;
}
[data-theme="dark"] .cta-band .btn--gold:hover {
  background: #34231e;
  color: var(--gold);
  border-color: var(--gold);
}
[data-theme="dark"] .cta-band .btn--ghost {
  color: #f0e7de;
  border-color: rgba(242, 211, 138, .38);
}
[data-theme="dark"] .cta-band .btn--ghost:hover {
  background: rgba(242, 211, 138, .08);
  color: var(--gold);
  border-color: var(--gold);
}

/* The Selegie panel keeps the cream-and-espresso reading of the light theme
   inside the dark page. */
[data-theme="dark"] .story--selegie {
  background: #fffdf9;
  border-color: #e4d7c2;
}
[data-theme="dark"] .story--selegie .story__head {
  background: linear-gradient(140deg, #241714, #34231e);
  color: #f4e9df;
}
[data-theme="dark"] .story--selegie .story__head h3 { color: #f2d38a; }
[data-theme="dark"] .story--selegie .story__head p { color: #cdb9ac; }
[data-theme="dark"] .story--selegie .story__body p { color: #5a4740; }
[data-theme="dark"] .story--selegie .story__quote {
  color: #34231e;
  border-left-color: #c9a25a;
}
[data-theme="dark"] .story--selegie .story__facts {
  background: #e4d7c2;
  border-color: #e4d7c2;
}
[data-theme="dark"] .story--selegie .story__facts div { background: #fffdf9; }
[data-theme="dark"] .story--selegie .story__facts dt { color: #7c6a63; }
[data-theme="dark"] .story--selegie .story__facts dd { color: #34231e; }
[data-theme="dark"] .story--selegie .note { color: #5a4740; }
[data-theme="dark"] .story--selegie .note strong { color: #2c1e19; }
[data-theme="dark"] .story--selegie .note--ok {
  background: #e7f3ec;
  border-left-color: #1f6b4a;
  color: #2c1e19;
}
[data-theme="dark"] .story--selegie .note--ok strong { color: #2c1e19; }
[data-theme="dark"] .story--selegie em { color: inherit; }

.std__source {
  align-self: flex-start;
  display: inline-block;
  margin-bottom: .65rem;
  border: 1px solid currentColor;
  border-radius: .35rem;
  padding: .3rem .55rem;
  color: var(--maroon);
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
}
.std__source:hover, .std__source:focus-visible { text-decoration: underline; }
[data-theme="dark"] .std__source { color: var(--gold); }

:root:not([data-theme="dark"]) .cta-band .cta-question { color: #fff; }
:root:not([data-theme="dark"]) .site-header .btn--contact-sales:focus,
:root:not([data-theme="dark"]) .cta-band--landing .btn:focus,
:root:not([data-theme="dark"]) .cta-band .cta-question:focus {
  color: #7e192b;
  background: #fff;
  border-color: #f2d38a;
  outline: 1px solid #f2d38a;
  outline-offset: 0;
}

/* The portal preview stays available when other header actions collapse. */
.header-actions .header-sign-in {
  display: inline-flex;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .header-inner { gap: .45rem; }
  .header-inner .brand__logo { height: 30px; }
  .header-actions { gap: .3rem; }
  .header-actions .theme-toggle,
  .header-actions .nav-toggle,
  .header-actions .header-sign-in { padding-inline: .48rem; }
  .header-actions .theme-toggle__label { display: none; }
}

.lede.measure { max-width: 900px; }
.lede.measure-s { max-width: 900px; }

/* Content columns and icon gutters can still constrain headings on narrow screens. */
main h1, main h2 { max-width: 900px; }
