/* ===========================================================================
   AMPL Advisory — shared five-page prototype
   Warm paper / ink with one copper accent. Stage identity is carried by a
   numeral and a filled segment bar rather than competing stage colours.
   =========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin-var.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('fonts/source-serif-4-latin-var.woff2') format('woff2-variations');
  font-weight: 200 900; font-style: normal; font-display: swap;
}

:root {
  --paper:       #f8f5f0;
  --paper-2:     #f1ece3;
  --paper-card:  #fffefb;
  --ink:         #191814;
  --ink-2:       #474338;
  --ink-3:       #635e52;
  --rule:        #d9d3c6;
  --rule-soft:   #e7e1d6;
  --copper:      #9d4a1f;
  --copper-dk:   #7a3614;
  --copper-wash: #f3e5d9;

  /* dark band — used sparingly to spotlight one idea per page */
  --dark:        #1d1b16;
  --dark-2:      #2a2721;
  --on-dark:     #f4f0e8;
  --on-dark-2:   #b8b1a2;
  --on-dark-3:   #8d8678;
  --copper-lt:   #e08c54;

  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', ui-serif, Georgia, 'Times New Roman', serif;

  --measure: 36rem;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --sec-gap: clamp(3.25rem, 7vw, 6rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.16vw, 1.0625rem);
  line-height: 1.62;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 450; line-height: 1.12; letter-spacing: -0.012em;
  margin: 0; text-wrap: balance;
}
h1 { font-size: clamp(2.05rem, 1.4rem + 2.9vw, 3.5rem); letter-spacing: -0.022em; }
h2 { font-size: clamp(1.6rem, 1.22rem + 1.7vw, 2.4rem); letter-spacing: -0.018em; }
h3 { font-size: clamp(1.18rem, 1.08rem + 0.45vw, 1.4rem); }
h4, .h-compact {
  font-size: 1.0625rem; font-family: var(--sans); font-weight: 600;
  letter-spacing: -0.005em; line-height: 1.4;
}

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

.lede {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.04rem + 0.45vw, 1.35rem);
  line-height: 1.5; color: var(--ink-2);
}

.label {
  font-family: var(--sans);
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--ink-3); margin: 0;
}

.note { font-size: 0.875rem; line-height: 1.55; color: var(--ink-3); }
.prose { max-width: var(--measure); }
.prose p { color: var(--ink-2); }

/* ---------- links & focus ---------- */

a { color: var(--copper); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--copper-dk); }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--copper);
  outline-offset: 3px; border-radius: 2px;
}
summary:focus-visible { outline-offset: 1px; }

.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.1rem; border-radius: 3px;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  transition: top .15s ease;
}
.skip:focus { top: 0.5rem; color: var(--paper); }

/* ---------- shell ---------- */

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- masthead & navigation ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.masthead__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; min-height: 4.25rem;
}

.brand { display: flex; align-items: baseline; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__name {
  font-family: var(--serif); font-size: 1.28rem; font-weight: 550;
  letter-spacing: -0.015em; white-space: nowrap;
}
.brand__slogan {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper); white-space: nowrap;
}
@media (max-width: 64rem) { .brand__slogan { display: none; } }

/* the desktop row — always painted, never inside a disclosure */
.nav { display: flex; align-items: center; gap: clamp(1rem, 1.9vw, 1.65rem); }
.nav a {
  font-size: 0.9375rem; color: var(--ink-2); text-decoration: none; font-weight: 500;
  white-space: nowrap; padding-block: 0.2rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--copper); border-bottom-color: var(--rule); }
.nav a.is-current, .nav a.is-section { color: var(--ink); font-weight: 600; }
.nav a.is-current { border-bottom-color: var(--copper); }
.nav a.is-section { border-bottom-color: var(--rule); }
.nav .nav__cta {
  color: var(--paper); background: var(--ink);
  padding: 0.52rem 1rem; border-radius: 3px; font-weight: 550; border-bottom: 0;
}
.nav .nav__cta:hover { background: var(--copper-dk); color: var(--paper); border-bottom: 0; }

.navtoggle {
  display: none; align-items: center; gap: 0.5rem;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--ink);
  background: transparent; border: 1px solid var(--rule); border-radius: 3px;
  padding: 0.5rem 0.8rem; cursor: pointer;
}
.navtoggle[hidden] { display: none; }
.navtoggle__bars { display: inline-grid; gap: 3px; width: 0.95rem; }
.navtoggle__bars span { height: 2px; background: var(--ink); border-radius: 1px; }

@media (max-width: 48rem) {
  /* JS present: the button appears and the nav collapses into a dropdown. */
  .navtoggle:not([hidden]) { display: inline-flex; }
  .masthead[data-nav="collapsed"] .nav { display: none; }
  .masthead[data-nav="open"] .nav,
  .masthead[data-nav="collapsed"] .nav,
  .masthead[data-nav="open"] .nav {
    position: absolute; right: var(--gutter); top: calc(100% + 0.55rem);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-card); border: 1px solid var(--rule);
    border-radius: 4px; padding: 0.4rem; min-width: 13.5rem;
    box-shadow: 0 10px 28px -14px rgb(25 24 20 / 0.3);
  }
  .masthead[data-nav="open"] .nav { display: flex; }
  .masthead[data-nav="open"] .nav a,
  .masthead[data-nav="collapsed"] .nav a {
    padding: 0.62rem 0.7rem; border-radius: 3px; border-bottom: 0; white-space: normal;
  }
  .masthead[data-nav="open"] .nav a.is-current { background: var(--copper-wash); color: var(--copper); }
  .masthead[data-nav="open"] .nav a.is-section { background: var(--paper-2); color: var(--ink); }
  .masthead[data-nav="open"] .nav .nav__cta { margin-top: 0.3rem; text-align: center; }

  /* JS absent: data-nav stays "static", so the nav simply wraps and stays
     visible. Nothing is ever hidden behind a control that cannot appear. */
  .masthead[data-nav="static"] .nav {
    flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: flex-end;
  }
  .masthead[data-nav="static"] .nav a { font-size: 0.875rem; }
}
@media (max-width: 30rem) {
  .masthead[data-nav="open"] .nav,
  .masthead[data-nav="collapsed"] .nav { left: var(--gutter); right: var(--gutter); min-width: 0; }
}

/* ---------- numbered, document-like sections ---------- */

.sec { padding-block: var(--sec-gap); border-top: 1px solid var(--rule); }
.sec--band { background: var(--paper-2); }
.sec--plain { border-top: 0; }
[id] { scroll-margin-top: 5.25rem; }

.sec__head { display: grid; gap: 0.85rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.sec__num {
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--copper);
  display: flex; align-items: center; gap: 0.75rem;
}
.sec__num::after { content: ''; flex: 1; height: 1px; background: var(--rule); max-width: 7rem; }
.sec__head .lede { max-width: 42rem; }

/* a two-column "statement left, detail right" section — compact and scannable */
.split {
  display: grid; gap: clamp(1.5rem, 4vw, 3.25rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start;
}
@media (max-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr); } }
.split--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }

/* ---------- dark band ---------- */

.dark {
  background: var(--dark); color: var(--on-dark);
  padding-block: var(--sec-gap); border-top: 0;
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--on-dark); }
.dark p { color: var(--on-dark-2); }
.dark .lede { color: var(--on-dark-2); }
.dark .label { color: var(--on-dark-3); }
.dark .note { color: var(--on-dark-3); }
.dark .sec__num { color: var(--copper-lt); }
.dark .sec__num::after { background: #43402f; }
.dark a { color: var(--copper-lt); }
.dark a:hover { color: #f0a877; }
.dark :where(a, button, summary):focus-visible { outline-color: var(--copper-lt); }

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem 0.9rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.9375rem; font-weight: 550; text-decoration: none;
  padding: 0.72rem 1.25rem; border-radius: 3px; border: 1px solid transparent;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--copper-dk); color: var(--paper); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--copper); color: var(--copper); }
.dark .btn--primary { background: var(--on-dark); color: var(--dark); }
.dark .btn--primary:hover { background: var(--copper-lt); color: var(--dark); }
.dark .btn--ghost { border-color: #4a4638; color: var(--on-dark); }
.dark .btn--ghost:hover { border-color: var(--copper-lt); color: var(--copper-lt); }

/* ---------- home hero ---------- */

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero__grid {
  display: grid; gap: clamp(2rem, 4.5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
}
@media (max-width: 62rem) { .hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--copper); }
.hero__sub { max-width: 30rem; }

.slogan__rule { display: flex; gap: 3px; max-width: 15rem; margin-bottom: 1.5rem; }
.slogan__rule span { height: 3px; flex: 1; background: var(--copper); border-radius: 1px; }
.slogan__rule span:nth-child(2) { opacity: 0.74; }
.slogan__rule span:nth-child(3) { opacity: 0.52; }
.slogan__rule span:nth-child(4) { opacity: 0.32; }

/* ---------- recognisable situations ---------- */

.recog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.75rem, 4vw, 3.25rem); }
@media (max-width: 48rem) { .recog { grid-template-columns: minmax(0, 1fr); } }
.recog > li { list-style: none; padding-block: 0.95rem; border-top: 1px solid var(--rule-soft); display: flex; gap: 0.75rem; }
.recog > li:first-child, .recog > li:nth-child(2) { border-top: 0; padding-top: 0; }
@media (max-width: 48rem) {
  .recog > li:nth-child(2) { border-top: 1px solid var(--rule-soft); padding-top: 0.95rem; }
}
.recog { margin: 0; padding: 0; }
.recog__mark { color: var(--copper); font-weight: 700; flex: 0 0 auto; }
.recog b { font-weight: 600; display: block; font-size: 0.9688rem; line-height: 1.4; }
.recog span.t { font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- compact stage overview ---------- */

.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
@media (max-width: 62rem) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .stages { grid-template-columns: minmax(0, 1fr); } }

.stage {
  padding: 1.35rem clamp(0.9rem, 1.7vw, 1.4rem);
  border-left: 1px solid #3a3730;
  display: flex; flex-direction: column; gap: 0.5rem; position: relative;
}
.stage:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 62rem) {
  .stage:nth-child(3) { border-left: 0; padding-left: 0; }
  .stage:nth-child(1), .stage:nth-child(2) { border-bottom: 1px solid #3a3730; }
}
@media (max-width: 34rem) {
  .stage { border-left: 0; padding-left: 0; border-bottom: 1px solid #3a3730; }
  .stage:last-child { border-bottom: 0; }
}
.stage__top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.stage__n {
  font-family: var(--serif); font-size: 1rem; font-weight: 600;
  color: var(--copper-lt); font-variant-numeric: tabular-nums;
}
.stage h3 { font-size: 1.4rem; }
.stage__q { font-family: var(--serif); font-style: italic; font-size: 0.97rem; color: var(--on-dark-2); margin: 0; }
.stage__out { font-size: 0.8438rem; color: var(--on-dark-3); margin: 0; }
.stage__count {
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-dark-3); margin-top: auto; padding-top: 0.45rem;
}
@media (min-width: 62.0625rem) {
  .stage:not(:last-child)::after {
    content: '\2192'; position: absolute; right: -0.62rem; top: 1.35rem;
    color: var(--copper-lt); font-size: 0.88rem; line-height: 1;
    background: var(--dark); padding: 0.15rem 0.1rem;
  }
}

.loopback {
  height: 1.15rem; margin-top: 0.5rem;
  border: 1.5px dashed var(--copper-lt); border-top: 0; border-radius: 0 0 5px 5px;
  position: relative;
}
.loopback::before {
  content: '\25B2'; position: absolute; left: -0.46rem; top: -0.56rem;
  color: var(--copper-lt); font-size: 0.6rem; line-height: 1;
}
.loop { margin-top: 0.8rem; font-size: 0.8438rem; color: var(--on-dark-2); }
.loop b { color: var(--on-dark); font-weight: 650; }

/* segment bar — stage identity without a second colour system */
.segbar { display: inline-flex; gap: 2px; vertical-align: middle; }
.segbar span { width: 0.85rem; height: 0.28rem; border-radius: 1px; background: var(--rule); display: block; }
.segbar span.on { background: var(--copper); }
.dark .segbar span { background: #45413a; }
.dark .segbar span.on { background: var(--copper-lt); }

/* ---------- small illustrative previews (thumbnails) ---------- */

.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.2vw, 1.6rem); }
@media (max-width: 58rem) { .thumbs { grid-template-columns: minmax(0, 1fr); } }

.thumb {
  border: 1px solid var(--rule); border-radius: 5px; background: var(--paper-card);
  padding: clamp(0.95rem, 1.8vw, 1.25rem); display: flex; flex-direction: column; gap: 0.7rem;
}
.thumb__cap { font-size: 0.8438rem; color: var(--ink-2); line-height: 1.5; margin: 0; }
.thumb__name { font-weight: 600; font-size: 0.9688rem; line-height: 1.35; }
.thumb__art {
  background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 3px;
  padding: 0.75rem; min-height: 7.25rem; display: flex; flex-direction: column; gap: 0.4rem;
  justify-content: center;
}

/* mini artwork primitives, shared by the thumbnails */
.mini { display: flex; align-items: center; gap: 0.3rem; font-size: 0.6875rem; line-height: 1.25; flex-wrap: wrap; min-width: 0; }
.mini__box {
  border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-card);
  padding: 0.2rem 0.38rem; color: var(--ink-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.mini__box--on { border-color: var(--copper); color: var(--copper); background: var(--copper-wash); }
.mini__box--dash { border-style: dashed; color: var(--ink-3); }
.mini__arrow { color: var(--copper); flex: 0 0 auto; }
.mini__row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.6875rem; }
.mini__row span:first-child { color: var(--ink-3); }
.mini__row span:last-child { color: var(--ink-2); font-weight: 600; text-align: right; }
.mini__rule { height: 1px; background: var(--rule-soft); }

.illus {
  display: inline-block;
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--copper); background: var(--copper-wash);
  padding: 0.14rem 0.45rem; border-radius: 2px;
}
.dark .illus { color: var(--copper-lt); background: #3a2b20; }

/* ---------- services catalogue ---------- */

.cat { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }
@media (max-width: 58rem) { .cat { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.cat + .cat { margin-top: clamp(2rem, 4vw, 3rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule); }

.cat__side { position: sticky; top: 5.5rem; align-self: start; }
@media (max-width: 58rem) { .cat__side { position: static; } }
.cat__side h3 { font-size: 1.7rem; margin-bottom: 0.4rem; }
.cat__side .segbar { margin-bottom: 0.7rem; }
.cat__side p { font-size: 0.875rem; color: var(--ink-2); margin: 0; }

.svclist { list-style: none; margin: 0; padding: 0; }
.svclist > li { border-top: 1px solid var(--rule-soft); padding: 0.95rem 0; }
.svclist > li:first-child { border-top: 0; padding-top: 0; }
.svclist__top { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.svclist__n {
  font-family: var(--serif); font-size: 0.97rem; font-weight: 600;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.svclist__name { font-weight: 600; font-size: 1.0312rem; line-height: 1.35; }
.svclist__name a { color: var(--ink); text-decoration-color: var(--copper); }
.svclist__name a:hover { color: var(--copper); }
.svclist__out { font-size: 0.9062rem; color: var(--ink-2); line-height: 1.5; margin: 0.25rem 0 0; }
.svclist__del {
  font-size: 0.75rem; color: var(--ink-3); margin: 0.35rem 0 0;
  display: flex; align-items: center; gap: 0.4rem;
}

.pagetag {
  display: inline-block; font-size: 0.6875rem; font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--copper); background: var(--copper-wash);
  padding: 0.14rem 0.45rem; border-radius: 2px; white-space: nowrap;
}

.delmark {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 1px;
  border: 1.5px solid var(--copper); flex: 0 0 auto;
}
.delmark--direct { background: var(--copper); }

.legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem;
  font-size: 0.875rem; color: var(--ink-2); align-items: center;
}
.legend > span { display: inline-flex; align-items: center; gap: 0.45rem; }

/* ---------- panels, columns, steps, lists ---------- */

.panel {
  border: 1px solid var(--rule); border-radius: 5px; background: var(--paper-card);
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
}
.panel--accent { border-left: 3px solid var(--copper); }
.dark .panel { background: var(--dark-2); border-color: #3c3930; }

.cols2 { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 54rem) { .cols2 { grid-template-columns: minmax(0, 1fr); } }
.cols3 { display: grid; gap: clamp(1.1rem, 2.5vw, 1.9rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 54rem) { .cols3 { grid-template-columns: minmax(0, 1fr); } }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 1.35rem; }
.steps > li { position: relative; padding-left: 2.9rem; counter-increment: st; }
.steps > li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute; left: 0; top: 0.05rem;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
  color: var(--copper); font-variant-numeric: tabular-nums;
}
.dark .steps > li::before { color: var(--copper-lt); }
.steps h3, .steps h4 { margin-bottom: 0.25rem; }
.steps p { font-size: 0.9062rem; color: var(--ink-2); margin: 0; }
.dark .steps p { color: var(--on-dark-2); }

.marklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.marklist li {
  position: relative; padding-left: 1.5rem;
  font-size: 0.9062rem; line-height: 1.55; color: var(--ink-2);
}
.marklist li::before { position: absolute; left: 0; font-weight: 700; color: var(--copper); }
.marklist--yes li::before { content: '\2014'; }
.marklist--no li::before { content: '\00d7'; color: var(--ink-3); }
.dark .marklist li { color: var(--on-dark-2); }
.dark .marklist li::before { color: var(--copper-lt); }

/* ---------- page header (interior pages) ---------- */

.phead { padding-block: clamp(1.9rem, 4.5vw, 3rem) clamp(2rem, 4.5vw, 3.25rem); }
.crumbs { font-size: 0.875rem; color: var(--ink-3); margin-bottom: 1.4rem; }
.crumbs a { color: var(--ink-2); text-decoration-color: var(--rule); }
.crumbs a:hover { color: var(--copper); }
.crumbs span { margin-inline: 0.45rem; color: #726c62; }
.backlink { display: inline-block; font-size: 0.875rem; margin-bottom: 1.1rem; }

.phead__grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3.25rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start;
}
@media (max-width: 62rem) { .phead__grid { grid-template-columns: minmax(0, 1fr); } }

.svcnum {
  font-family: var(--serif); font-size: clamp(1.8rem, 1.35rem + 2vw, 2.6rem);
  font-weight: 600; color: var(--copper); line-height: 1;
  font-variant-numeric: tabular-nums; display: block; margin-bottom: 0.4rem;
}
.svcstage { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---------- simplified illustrative map ---------- */

.map { margin: 0; }
.map__cap {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: baseline;
  font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 1rem;
}
.map__board {
  border: 1px solid var(--rule); border-radius: 5px; background: var(--paper-card);
  padding: clamp(0.95rem, 2vw, 1.5rem);
}

/* desktop: four steps across, role above each, handoff arrows between */
.map__flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1.1rem; }
@media (max-width: 60rem) { .map__flow { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.mstep { position: relative; padding-top: 1.4rem; }
.mstep::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--rule);
}
.mstep--decide::before { background: var(--copper); }
.mstep__role {
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 0.3rem;
}
.mstep--decide .mstep__role { color: var(--copper); }
.mstep__name { font-weight: 650; font-size: 0.9688rem; line-height: 1.35; margin: 0 0 0.3rem; }
.mstep__name .ho { color: var(--copper); font-weight: 400; }
.mstep__t { font-size: 0.8438rem; color: var(--ink-2); line-height: 1.5; margin: 0; }
.mstep__t b { font-weight: 650; color: var(--ink); }
@media (max-width: 60rem) {
  .mstep { padding-bottom: 1.1rem; }
  .mstep:last-of-type { padding-bottom: 0; }
}

/* the one return path, drawn under the steps it spans */
.map__return {
  margin-top: 1.1rem; padding: 0.7rem 0.85rem 0.7rem 2rem;
  border: 1.5px dashed var(--copper); border-radius: 4px; background: var(--copper-wash);
  position: relative; font-size: 0.8438rem; line-height: 1.5; color: var(--ink-2);
}
.map__return::before {
  content: '\2190'; position: absolute; left: 0.75rem; top: 0.62rem;
  color: var(--copper); font-size: 0.95rem; line-height: 1;
}
.map__return b { color: var(--copper); font-weight: 650; }

.equiv { margin-top: 1rem; }
.equiv > summary {
  cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--copper);
  padding: 0.35rem 0; list-style: none;
}
.equiv > summary::-webkit-details-marker { display: none; }
.equiv > summary::before { content: '\2192  '; }
.equiv[open] > summary::before { content: '\2193  '; }
.equiv__body { font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); max-width: var(--measure); }

/* ---------- output extract preview ---------- */

.extract {
  margin: 0; background: var(--paper-card); border-radius: 5px;
  padding: clamp(1rem, 2.2vw, 1.5rem); color: var(--ink);
}
.extract__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.75rem; flex-wrap: wrap; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule); margin-bottom: 0.85rem;
}
.extract__title { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.extract dl { margin: 0; display: grid; gap: 0.6rem; }
.extract dl > div {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.4rem 0.9rem;
  font-size: 0.8438rem; line-height: 1.45;
}
@media (max-width: 34rem) { .extract dl > div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } }
.extract dt {
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
}
.extract dd { margin: 0; color: var(--ink-2); }
.extract__toc {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 0.5rem; counter-reset: toc;
}
.extract__toc li {
  display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); align-items: baseline;
  font-size: 0.875rem; line-height: 1.45; color: var(--ink-2);
}
.extract__toc li::before {
  counter-increment: toc; content: counter(toc, decimal-leading-zero);
  font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.06em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.extract__foot { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--rule-soft); font-size: 0.8125rem; color: var(--ink-3); }

/* The extract is a light card sitting on the dark band, so the .dark text
   rules above must not leak into it — they would put pale text on paper. */
.dark .extract,
.dark .extract p,
.dark .extract dd { color: var(--ink-2); }
.dark .extract dt,
.dark .extract .extract__toc li::before,
.dark .extract .extract__foot { color: var(--ink-3); }
.dark .extract .extract__toc li { color: var(--ink-2); }
.dark .extract .extract__title { color: var(--ink); }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--rule); max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 2.25rem 1.05rem 0;
  font-weight: 600; font-size: 1.0312rem; line-height: 1.4; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0.25rem; top: 0.88rem;
  font-size: 1.3rem; font-weight: 400; color: var(--copper); line-height: 1;
}
.faq details[open] summary::after { content: '\2212'; }
.faq__a { padding: 0 2.25rem 1.2rem 0; max-width: var(--measure); }
.faq__a p { font-size: 0.9062rem; color: var(--ink-2); }

/* ---------- contact ---------- */

.ways { margin: 0; }
.way {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.9rem 0; border-top: 1px solid var(--rule-soft); font-size: 0.9375rem;
}
.way:first-of-type { border-top: 0; }
.way dt {
  color: var(--ink-3); font-size: 0.75rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 650; flex: 0 0 auto;
}
.way dd { margin: 0; text-align: right; min-width: 0; }

/* ---------- onward routes ---------- */

.routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.9rem, 2vw, 1.5rem); }
@media (max-width: 54rem) { .routes { grid-template-columns: minmax(0, 1fr); } }
.route {
  border: 1px solid var(--rule); border-radius: 5px; background: var(--paper-card);
  padding: clamp(1rem, 2vw, 1.35rem); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 0.4rem;
}
.route:hover { border-color: var(--copper); color: var(--ink); }
.route__name { font-family: var(--serif); font-size: 1.2rem; font-weight: 550; }
.route__t { font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }
.route__go { font-size: 0.8125rem; font-weight: 650; color: var(--copper); margin-top: auto; padding-top: 0.4rem; }
.dark .route { background: var(--dark-2); border-color: #3c3930; color: var(--on-dark); }
.dark .route:hover { border-color: var(--copper-lt); color: var(--on-dark); }
.dark .route__t { color: var(--on-dark-2); }
.dark .route__go { color: var(--copper-lt); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--rule); background: var(--paper-2); padding-block: 2.5rem; }
.foot__grid { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; align-items: baseline; justify-content: space-between; }
.foot__brand { font-family: var(--serif); font-size: 1.1rem; font-weight: 550; }
.foot__slogan {
  font-size: 0.75rem; font-weight: 650; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper); margin-top: 0.25rem;
}
.foot__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.9062rem; }
.foot__links a { color: var(--ink-2); text-decoration-color: var(--rule); }
.foot__links a:hover { color: var(--copper); }
.foot__meta {
  font-size: 0.8125rem; color: var(--ink-3); width: 100%;
  padding-top: 1.1rem; margin-top: 1.1rem; border-top: 1px solid var(--rule);
}

/* ---------- utilities ---------- */

.vh {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-s { margin-top: 0.9rem; }
.mt-m { margin-top: 1.6rem; }
.mt-l { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }
