/* Novum Engineering PLLC — site stylesheet (v1.1)
   Design tokens are documented in docs/DESIGN_SYSTEM.md */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-var.woff2") format("woff2-variations"),
       url("/assets/fonts/source-serif-4-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-italic-var.woff2") format("woff2-variations"),
       url("/assets/fonts/source-serif-4-latin-italic-var.woff2") format("woff2");
}

:root {
  --ink: #14233a;
  --ink-2: #1e3150;
  --ink-3: #0f1b2e;
  --charcoal: #2b2f33;
  --muted: #56606c;
  --rule: #d6dbe0;
  --rule-strong: #aab3bd;
  --paper: #fafbfa;
  --paper-2: #f0f2f3;
  --mark: #f2cf4a;
  --on-ink: #e9edf2;
  --on-ink-muted: #a9b5c4;
  --line-on-ink: #c9d3df;
  --rule-on-ink: #33476a;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-3: clamp(2.6rem, 1.6rem + 4vw, 5rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 78rem;
  --measure: 36rem;
  --section: clamp(4.5rem, 10vw, 8rem);
  --header: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-stretch: 112%;
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.55em;
  text-wrap: balance;
}
h1 { font-size: var(--step-3); line-height: 1; font-weight: 650; letter-spacing: -0.025em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-stretch: 105%; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--mark); color: var(--ink); padding: 0.6rem 1rem;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step--1);
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

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

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--on-ink);
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--header);
}
.site-header.is-solid {
  background: rgba(250, 251, 250, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.page-light .site-header { background: rgba(250, 251, 250, 0.96); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; }
.brand-mark { width: 2.25rem; height: 2.25rem; flex: none; }
.brand-name {
  font-family: var(--font-display); font-stretch: 118%; font-weight: 650;
  font-size: 1.125rem; letter-spacing: -0.005em; line-height: 1;
}
.brand-name span { font-weight: inherit; }

.site-nav ul { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--font-display); font-size: 0.975rem; font-weight: 520;
  text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; opacity: .88;
}
.site-nav a:hover { opacity: 1; border-bottom-color: currentColor; }
.site-nav a.is-current { opacity: 1; border-bottom-color: var(--mark); }
.site-nav .nav-cta {
  border: 1.5px solid currentColor; padding: 0.55rem 0.95rem; border-radius: 2px; opacity: 1;
}
.site-nav .nav-cta:hover { background: var(--mark); color: var(--ink); border-color: var(--mark); }

.nav-toggle {
  display: none; appearance: none; border: 1.5px solid currentColor; background: transparent; color: inherit;
  font-family: var(--font-display); font-size: var(--step--1); font-weight: 580;
  padding: 0.55rem 0.85rem; border-radius: 2px; cursor: pointer;
}

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

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; font-stretch: 108%; line-height: 1;
  text-decoration: none; padding: 1rem 1.4rem; border: 1.5px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: #fff; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.button:hover { background: var(--ink-2); }
.button-mark { background: var(--mark); border-color: var(--mark); color: var(--ink); }
.button-mark:hover { background: #ffdc5c; border-color: #ffdc5c; }
.button-ghost { background: transparent; color: inherit; border-color: currentColor; }
.button-ghost:hover { background: rgba(255,255,255,.08); }
.button-quiet { background: transparent; color: var(--ink); }
.button-quiet:hover { background: var(--paper-2); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Hero (dark) ---------- */

.hero {
  background: var(--ink);
  color: var(--on-ink);
  padding-top: var(--header);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* faint drafting grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(201, 211, 223, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 211, 223, .06) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero .wrap {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  align-items: center; gap: clamp(2rem, 5vw, 4.5rem);
  min-height: min(56rem, calc(100svh - var(--header)));
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero h1 { color: #fff; max-width: 12em; font-size: clamp(2.4rem, 1.3rem + 2.7vw, 3.6rem); text-wrap: pretty; }
.hero-lede { font-size: 1.25rem; line-height: 1.55; color: var(--on-ink); max-width: 31rem; }
.hero-firm {
  font-family: var(--font-display); font-size: 0.95rem; color: var(--on-ink-muted);
  margin-top: 2.25rem; max-width: none;
}
.hero-firm strong { color: var(--on-ink); font-weight: 600; }

.loadpath { margin: 0; color: var(--line-on-ink); }
.loadpath svg { width: 100%; overflow: visible; touch-action: pan-y; cursor: ew-resize; }
.loadpath-readout {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--rule-on-ink);
  font-family: var(--font-display); font-size: 0.95rem; color: var(--on-ink-muted);
}
.loadpath-readout output { color: #fff; font-weight: 600; }
.loadpath-readout .hint { color: var(--on-ink-muted); }
.lp-range { width: 100%; margin: 0.75rem 0 0; accent-color: var(--mark); height: 1.5rem; cursor: ew-resize; }

/* Hero drawing styles (light line work on navy) */
.hd-grid { stroke: rgba(201, 211, 223, .35); stroke-width: 1; stroke-dasharray: 14 4 2 4; fill: none; }
.hd-bubble circle { fill: var(--ink); stroke: var(--line-on-ink); stroke-width: 1.25; }
.hd-bubble text, .hd-note text {
  font-family: var(--font-display); fill: var(--line-on-ink); font-size: 17px; font-weight: 560;
}
.hd-bubble text { text-anchor: middle; dominant-baseline: central; font-size: 18px; }
.hd-note text { font-size: 15px; font-weight: 460; fill: var(--on-ink-muted); }
.hd-leader { stroke: var(--on-ink-muted); stroke-width: 1; fill: none; }
.hd-dot { fill: var(--on-ink-muted); }
.hd-col { stroke: var(--line-on-ink); stroke-width: 3.5; fill: none; stroke-linecap: square; }
.hd-beam { stroke: var(--line-on-ink); stroke-width: 2.4; fill: none; stroke-linecap: square; }
.hd-roof { stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: square; }
.hd-brace { stroke: var(--line-on-ink); stroke-width: 1.5; fill: none; opacity: .8; }
.hd-found { stroke: var(--line-on-ink); stroke-width: 1.5; fill: var(--ink-2); }
.hd-ground { stroke: var(--line-on-ink); stroke-width: 2; fill: none; }
.hd-hatch { stroke: rgba(201, 211, 223, .4); stroke-width: 1; fill: none; }
.hd-lp { stroke: var(--mark); stroke-width: 9; fill: none; stroke-linecap: round; opacity: 0; transition: opacity .2s ease; }
.hd-lpf { fill: var(--mark); opacity: 0; transition: opacity .2s ease; }
.hd-arrow line { stroke: var(--mark); stroke-width: 3; }
.hd-arrow path { fill: var(--mark); }
.hd-arrow text { font-family: var(--font-display); font-size: 16px; font-weight: 650; fill: var(--mark); text-anchor: middle; }
.hd-react text { font-family: var(--font-display); font-size: 16px; font-weight: 650; fill: var(--mark); text-anchor: middle; }
.hd-react { opacity: 0; transition: opacity .2s ease; }

@media (prefers-reduced-motion: no-preference) {
  .js .loadpath .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s cubic-bezier(.45,0,.2,1) forwards; }
  .js .loadpath .g-found .draw { animation-delay: .25s; }
  .js .loadpath .g-cols .draw { animation-delay: .5s; }
  .js .loadpath .g-beams .draw { animation-delay: .85s; }
  .js .loadpath .g-braces .draw { animation-delay: 1.2s; }
  .js .loadpath .fade { opacity: 0; animation: fade .6s ease forwards; animation-delay: 1.6s; }
  .js .loadpath .hd-bubble.fade { animation-delay: .2s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

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

.section { padding-block: var(--section); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--muted); font-size: 1.1875rem; }
.band-grey { background: var(--paper-2); }
.band-ink { background: var(--ink); color: var(--on-ink); }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .section-head p { color: var(--on-ink-muted); }

/* ---------- Sequence (scroll-driven) ---------- */

.sequence-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.sequence-figure {
  position: sticky; top: calc(var(--header) + 1.5rem);
  margin: 0; background: #fff; border: 1px solid var(--rule);
  padding: clamp(0.75rem, 2vw, 1.5rem);
}
.sequence-figure svg { width: 100%; }
.seq-rail {
  display: flex; gap: 0.5rem; list-style: none; margin: 0 0 0.9rem; padding: 0; flex-wrap: wrap;
}
.seq-rail button {
  appearance: none; display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--rule-strong); background: var(--paper); color: var(--charcoal);
  border-radius: 999px; padding: 0.3rem 0.8rem 0.3rem 0.3rem; cursor: pointer;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 540;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.seq-rail button span {
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1.25px solid currentColor; font-weight: 650; font-size: 0.8rem;
}
.seq-rail button:hover { border-color: var(--ink); color: var(--ink); }
.seq-rail button[aria-current="step"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seq-rail button[aria-current="step"] span { background: var(--mark); border-color: var(--mark); color: var(--ink); }
.sequence-figure figcaption {
  font-family: var(--font-display); font-size: var(--step--1); color: var(--muted); margin-top: 0.75rem;
}

.sequence-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.seq-step {
  counter-increment: s;
  min-height: 72vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 2rem;
  opacity: .38; transition: opacity .35s ease;
}
.seq-step:first-child { min-height: 60vh; justify-content: flex-start; padding-top: 0; }
.seq-step:last-child { min-height: 60vh; }
.no-js .seq-step, .seq-step.is-active { opacity: 1; }
.seq-step .seq-label {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 560; color: var(--muted);
  margin-bottom: 0.9rem;
}
.seq-step .seq-label::before {
  content: counter(s);
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1.5px solid var(--ink); color: var(--ink); font-weight: 650; font-size: 0.95rem;
}
.seq-step.is-active .seq-label::before { background: var(--mark); border-color: var(--mark); }
.seq-step h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); }
.seq-step p { color: var(--charcoal); }
.seq-step .deliverables { font-family: var(--font-display); font-size: 0.95rem; color: var(--muted); margin: 0.25rem 0 0.4rem; }
.seq-step ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); max-width: var(--measure); }
.seq-step li { padding: 0.55rem 0 0.55rem 1.6rem; border-bottom: 1px solid var(--rule); position: relative; font-size: 1.0625rem; }
.seq-step li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem; width: 0.7rem; height: 0.7rem;
  border: 1.5px solid var(--ink); transform: rotate(45deg);
}

/* Sequence drawing */
.sq-text, .sq-tag text, .sq-inset text {
  font-family: var(--font-display); font-size: 15px; font-weight: 480; fill: var(--charcoal);
}
.sq-tag text { font-size: 13px; font-weight: 650; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.sq-grid { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 14 4 2 4; fill: none; }
.sq-bubble circle { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.sq-bubble text { font-family: var(--font-display); font-size: 15px; font-weight: 600; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.sq-ground { stroke: var(--ink); stroke-width: 2; fill: none; }
.sq-hatch { stroke: var(--rule-strong); stroke-width: 1; fill: none; }
.sq-soil { fill: #e9e5dc; stroke: none; }
.sq-air { fill: #fff; stroke: none; }
.sq-nb { fill: var(--paper-2); stroke: var(--muted); stroke-width: 1.3; }
.sq-nb-win { fill: none; stroke: var(--muted); stroke-width: 1; }
.sq-nb-found { fill: #dfe3e7; stroke: var(--muted); stroke-width: 1.3; }
.sq-crack { stroke: #b23a2e; stroke-width: 1.8; fill: none; }
.sq-tag circle { fill: #fff; stroke: var(--ink); stroke-width: 1.4; transition: fill .3s ease; }
.seq-svg[data-stage="1"] .tg1 circle, .seq-svg[data-stage="2"] .tg2 circle, .seq-svg[data-stage="3"] .tg3 circle,
.seq-svg[data-stage="4"] .tg4 circle, .seq-svg[data-stage="5"] .tg5 circle { fill: var(--mark); stroke-width: 2; }
.sq-up { fill: #c9d0d8; stroke: var(--ink); stroke-width: 1.3; }
.sq-pile { stroke: var(--ink); stroke-width: 3.2; fill: none; }
.sq-lag { stroke: var(--ink); stroke-width: 1; fill: none; }
.sq-raker { stroke: var(--ink); stroke-width: 2.4; fill: none; }
.sq-block { fill: #c9d0d8; stroke: var(--ink); stroke-width: 1.2; }
.sq-util { fill: #fff; stroke: var(--ink); stroke-width: 1.3; }
.sq-mat { fill: #c9d0d8; stroke: var(--ink); stroke-width: 1.4; }
.sq-mp { stroke: var(--ink); stroke-width: 2; fill: none; stroke-dasharray: 6 3; }
.sq-wall { fill: #dfe3e7; stroke: var(--ink); stroke-width: 1.3; }
.sq-col { stroke: var(--ink); stroke-width: 3.4; fill: none; stroke-linecap: square; }
.sq-beam { stroke: var(--ink); stroke-width: 2.4; fill: none; stroke-linecap: square; }
.sq-brace { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.sq-leader { stroke: var(--charcoal); stroke-width: .9; fill: none; }
.sq-hl { fill: var(--mark); opacity: .5; }
.sq-inset rect.pit { fill: #fff; stroke: var(--ink); stroke-width: 1; }
.sq-inset rect.pit-fill { fill: var(--ink); opacity: 0; }
.sq-inset .wall { fill: var(--paper-2); stroke: var(--muted); stroke-width: 1; }
.sq-inset text.pl { font-size: 12px; font-weight: 650; text-anchor: middle; fill: var(--ink); }

/* stage visibility: elements tagged .st2–.st5 appear when the drawing reaches that stage */
.seq-svg .st2, .seq-svg .st3, .seq-svg .st4, .seq-svg .st5 { opacity: 0; transition: opacity .5s ease; }
.seq-svg[data-stage="2"] .st2,
.seq-svg[data-stage="3"] .st2, .seq-svg[data-stage="3"] .st3,
.seq-svg[data-stage="4"] .st2, .seq-svg[data-stage="4"] .st3, .seq-svg[data-stage="4"] .st4,
.seq-svg[data-stage="5"] .st2, .seq-svg[data-stage="5"] .st3, .seq-svg[data-stage="5"] .st4, .seq-svg[data-stage="5"] .st5 { opacity: 1; }
/* labels only for the current stage */
.seq-svg .lb { opacity: 0; transition: opacity .35s ease; }
.seq-svg[data-stage="1"] .lb1, .seq-svg[data-stage="2"] .lb2, .seq-svg[data-stage="3"] .lb3,
.seq-svg[data-stage="4"] .lb4, .seq-svg[data-stage="5"] .lb5 { opacity: 1; }
/* stage-1 survey tags fade once survey is done */
.seq-svg .st1x { transition: opacity .4s ease; }
.seq-svg[data-stage="3"] .st1x, .seq-svg[data-stage="4"] .st1x, .seq-svg[data-stage="5"] .st1x { opacity: .25; }
/* sequenced appearance inside a stage */
.seq-svg .d1 { transition-delay: .25s; } .seq-svg .d2 { transition-delay: .5s; } .seq-svg .d3 { transition-delay: .75s; }
.seq-svg .d4 { transition-delay: 1s; } .seq-svg .d5 { transition-delay: 1.25s; }
/* underpinning pit sequence inset: groups A, B, C */
.seq-svg[data-stage="2"] .pitA .pit-fill, .seq-svg[data-stage="2"] .pitB .pit-fill, .seq-svg[data-stage="2"] .pitC .pit-fill { opacity: .85; transition: opacity .4s ease; }
.seq-svg[data-stage="2"] .pitB .pit-fill { transition-delay: .9s; }
.seq-svg[data-stage="2"] .pitC .pit-fill { transition-delay: 1.8s; }

@media (prefers-reduced-motion: reduce) {
  .seq-svg * { transition: none !important; }
}

/* ---------- Practice ---------- */

.practice {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem);
}
.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts div {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem;
  padding: 0.95rem 0; border-bottom: 1px solid var(--rule);
}
.facts dt { font-family: var(--font-display); font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; font-family: var(--font-display); font-weight: 580; color: var(--ink); font-stretch: 105%; }
.principles { display: grid; gap: 2rem; margin-top: 3rem; }
.principles h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.principles p { margin: 0; color: var(--charcoal); }

/* ---------- Inquiry builder ---------- */

.inquiry {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.inq-form fieldset { border: 0; margin: 0 0 2rem; padding: 0; }
.inq-form legend, .inq-form .field-label {
  font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 1.0625rem; margin-bottom: 0.8rem; padding: 0;
}
.inq-form .field-label { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1.5px solid var(--rule-on-ink); border-radius: 999px; padding: 0.55rem 0.95rem;
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 520; color: var(--on-ink);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip input:hover + span { border-color: var(--on-ink-muted); }
.chip input:checked + span { background: var(--mark); border-color: var(--mark); color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--mark); outline-offset: 3px; }
.inq-form > .field { margin-bottom: 1.5rem; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-family: var(--font-display); font-weight: 560; font-size: 0.95rem; color: var(--on-ink); }
.field select, .field input, .field textarea {
  width: 100%; font: inherit; font-family: var(--font-display); font-size: 1rem; color: #fff;
  background: var(--ink-3); border: 1.5px solid var(--rule-on-ink); border-radius: 2px; padding: 0.75rem 0.8rem;
}
.field textarea { min-height: 8rem; resize: vertical; font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.5; }
.field select:focus, .field input:focus, .field textarea:focus { outline: 3px solid var(--mark); outline-offset: 1px; }
.field ::placeholder { color: #7f8ea3; }

.email-sheet {
  position: sticky; top: calc(var(--header) + 1.5rem);
  background: var(--paper); color: var(--charcoal); border: 1px solid var(--rule);
}
.email-sheet .es-head {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.2rem 0.75rem;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--rule);
  font-family: var(--font-display); font-size: 0.95rem;
}
.email-sheet .es-head dt { color: var(--muted); }
.email-sheet .es-head dd { margin: 0; color: var(--ink); font-weight: 580; overflow-wrap: anywhere; }
.email-sheet pre {
  margin: 0; padding: 1.25rem; white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: var(--font-text); font-size: 1rem; line-height: 1.55; color: var(--charcoal);
  max-height: 24rem; overflow: auto;
}
.email-sheet .es-actions {
  display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 1rem 1.25rem; border-top: 1px solid var(--rule); background: var(--paper-2);
}
.email-sheet .es-note { font-family: var(--font-display); font-size: 0.875rem; color: var(--muted); padding: 0 1.25rem 1.1rem; margin: 0; background: var(--paper-2); max-width: none; }
.copy-status { font-family: var(--font-display); font-size: 0.9rem; color: var(--ink); align-self: center; min-height: 1em; }
.direct-email { margin-top: 0.5rem; font-family: var(--font-display); color: var(--on-ink-muted); }
.direct-email a { color: #fff; font-weight: 600; }

/* ---------- Inner pages ---------- */

.page-head { padding-top: var(--header); border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); }
.page-head p { font-size: 1.25rem; max-width: 36rem; }
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-1); margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.not-found { padding-block: calc(var(--header) + clamp(4rem, 10vw, 8rem)) clamp(4rem, 10vw, 8rem); }

/* ---------- Footer: drawing title block ---------- */

.site-footer { background: var(--paper); border-top: 2px solid var(--ink); font-family: var(--font-display); font-size: var(--step--1); color: var(--charcoal); }
.title-block {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
  border-left: 1px solid var(--rule-strong); margin-block: 2.5rem 1.5rem;
}
.title-block > div { border: 1px solid var(--rule-strong); border-left: 0; padding: 0.85rem 1rem 1rem; min-width: 0; }
.title-block dl { margin: 0; }
.title-block dt { font-size: 0.75rem; color: var(--muted); font-weight: 480; margin-bottom: 0.3rem; }
.title-block dd { margin: 0; color: var(--ink); font-weight: 580; font-size: 0.975rem; font-stretch: 104%; overflow-wrap: break-word; }
.tb-firm { display: flex; align-items: center; gap: 0.85rem; color: var(--ink); }
.tb-firm .brand-mark { width: 2.75rem; height: 2.75rem; }
.tb-firm p { margin: 0; color: var(--muted); }
.tb-firm strong { display: block; color: var(--ink); font-stretch: 118%; font-weight: 650; font-size: 1.05rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 2.5rem; }
.footer-base ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.footer-base p { margin: 0; color: var(--muted); max-width: none; }

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

@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .loadpath { max-width: 40rem; }
  .sequence-layout { grid-template-columns: 1fr; }
  .sequence-figure { top: var(--header); z-index: 5; padding: 0.6rem; border-inline: 0; margin-inline: calc(var(--gutter) * -1); }
  .sequence-figure figcaption { display: none; }
  .seq-rail { margin-bottom: 0.5rem; }
  .seq-rail button { font-size: 0; padding: 0.2rem; gap: 0; }
  .seq-rail button span { font-size: 0.8rem; }
  .seq-step, .seq-step:first-child, .seq-step:last-child { min-height: 0; padding-block: 2.5rem; justify-content: flex-start; }
  .practice, .inquiry { grid-template-columns: 1fr; }
  .email-sheet { position: static; }
  .title-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .title-block > .tb-firm { grid-column: 1 / -1; border-bottom: 0; border-left: 0; }
}

@media (max-width: 760px) {
  :root { --header: 4rem; }
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-header:has(.site-nav.is-open) { background: var(--paper); color: var(--ink); }
  .site-nav { width: 100%; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 1rem; }
  .site-nav a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; }
  .site-nav .nav-cta { margin-top: 0.75rem; text-align: center; border-bottom: 1.5px solid currentColor; }
  .no-js .nav-toggle { display: none; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 0.15rem; }
  .sequence-figure svg { max-height: 38vh; }
}

@media (max-width: 520px) {
  .hero-lede, .page-head p { font-size: 1.125rem; }
  .button-row .button { flex: 1 1 100%; }
  .field-row { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block > div:last-child { grid-column: 1 / -1; }
}

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

@media print {
  .site-header, .nav-toggle, .skip-link, .inquiry form { display: none !important; }
  .hero { background: #fff; color: #000; }
}
