/* ============================================================
   HOLISTIC RADAR 5.0 — UPGRADE LAYER
   Loads after v2.css and site-system.css. Adds depth, the funnel
   rail, the sticky action bar, the two-part intake, and the board
   strip. Palette, type, and radii are inherited: no new colors.
   ============================================================ */

/* ---------- 1. HERO DIAGNOSTIC PANEL ----------
   The hero figure is the instrument itself: a six-layer scan running
   bottom to top, the constraint layer flagged, then the query-to-customer
   path tracing through. One 11s cycle, pure CSS, no library.
   Every element sits on an opaque surface, so the type stays legible. */
.scanp {
  display: grid; gap: 14px; align-content: start;
  container-type: inline-size;
}
.scan-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.scan-live {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--cop); box-shadow: 0 0 0 4px var(--cop-dim);
}
.scan-title { color: var(--ink); }
.scan-meta { margin-left: auto; color: var(--ink-3); }

.scan-body {
  position: relative; overflow: hidden;
  display: grid; gap: 1px;
  background: var(--ln);
  border: 1px solid var(--ln); border-radius: var(--r);
}
.scan-row {
  position: relative; z-index: 1;
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr) minmax(34px, .5fr) 26px;
  background: #FFFFFF; padding: 13px 15px;
}
.scan-key {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ink-3);
}
.scan-name { font-size: 14.5px; letter-spacing: -.01em; color: var(--ink); }
.scan-track {
  position: relative; height: 5px; border-radius: 3px;
  background: rgba(31, 27, 22, .07); overflow: hidden;
}
.scan-track i {
  position: absolute; inset: 0 auto 0 0; width: var(--w, 0%);
  border-radius: 3px; background: var(--ink);
}
.scan-val {
  font-family: var(--mono); font-size: 12.5px; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.scan-row.weak { background: rgba(198, 97, 63, .05); }
.scan-row.weak .scan-key,
.scan-row.weak .scan-val { color: var(--cop); }
.scan-row.weak .scan-track i { background: var(--cop); }
.scan-flag {
  grid-column: 2 / -1; justify-self: start;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; white-space: nowrap; color: #FFF9F5;
  background: var(--cop); border-radius: var(--r-sm);
  padding: 4px 8px; margin-top: 8px;
}
.scan-line {
  position: absolute; left: 0; right: 0; top: 100%; height: 2px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--cop) 18%, var(--cop) 82%, transparent);
  opacity: 0; pointer-events: none;
}

.scan-path { padding-top: 4px; }
.scan-path-h {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px;
}
.scan-rail {
  position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
  padding-top: 16px;
}
.scan-rail-base, .scan-rail-fill {
  position: absolute; left: 4%; top: 3px; height: 1px;
}
.scan-rail-base { right: 4%; background: var(--ln-2); }
.scan-rail-fill { width: 0; background: var(--cop); }
.scan-stop { display: grid; gap: 5px; justify-items: center; text-align: center; }
.scan-stop::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  margin-top: -20px; position: relative;
  background: #FFFFFF; border: 1.5px solid var(--ln-2);
}
.scan-stop b {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  font-weight: 400; color: var(--ink-3);
}
.scan-stop span { font-size: 12.5px; line-height: 1.2; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .scan-track i { width: 0; animation: scan-fill 11s var(--ease) var(--sd, 0s) infinite; }
  .scan-line { animation: scan-sweep 11s cubic-bezier(.4, .1, .3, 1) .5s infinite; }
  .scan-flag { animation: scan-flag 11s var(--ease) 0s infinite; }
  .scan-live { animation: scan-live 2.4s ease-in-out infinite; }
  .scan-rail-fill { animation: scan-rail 11s var(--ease) 6s infinite; }
  .scan-stop::before { animation: scan-stop 11s var(--ease) var(--pd, 0s) infinite; }
}
@keyframes scan-fill {
  0%, 2% { width: 0; }
  9%, 86% { width: var(--w, 0%); }
  94%, 100% { width: 0; }
}
@keyframes scan-sweep {
  0% { top: 100%; opacity: 0; }
  4% { opacity: .9; }
  40% { top: 0%; opacity: .9; }
  46%, 100% { top: 0%; opacity: 0; }
}
@keyframes scan-flag {
  0%, 42% { background: rgba(198, 97, 63, .32); box-shadow: none; }
  50%, 84% { background: var(--cop); box-shadow: 0 0 0 4px var(--cop-dim); }
  92%, 100% { background: rgba(198, 97, 63, .32); box-shadow: none; }
}
@keyframes scan-live {
  50% { box-shadow: 0 0 0 7px rgba(198, 97, 63, .08); }
}
@keyframes scan-rail {
  0% { width: 0; }
  26%, 42% { width: 92%; }
  50%, 100% { width: 0; }
}
@keyframes scan-stop {
  0% { background: #FFFFFF; border-color: var(--ln-2); }
  3%, 34% { background: var(--cop); border-color: var(--cop); box-shadow: 0 0 0 5px var(--cop-dim); }
  40%, 100% { background: #FFFFFF; border-color: var(--ln-2); box-shadow: none; }
}
@container (max-width: 360px) {
  .scan-row {
    grid-template-columns: 22px minmax(0, 1fr) 26px;
    row-gap: 9px; padding: 12px 13px;
  }
  .scan-name { grid-column: 2 / -1; font-size: 13.5px; }
  .scan-track { grid-column: 1 / 3; grid-row: 2; }
  .scan-val { grid-column: 3; grid-row: 2; }
  .scan-flag { grid-column: 1 / -1; margin-top: 2px; }
  .scan-meta { margin-left: 0; }
}
@container (max-width: 300px) {
  .scan-stop span { font-size: 11px; }
  .scan-path-h { margin-bottom: 12px; }
}
@media (max-width: 520px) {
  .scan-name { font-size: 13.5px; }
  .scan-stop span { font-size: 11px; }
}

/* ---------- 2. HERO INTAKE STARTER ---------- */
.scan-start {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
  margin-top: 28px; max-width: 30em;
}
.scan-start input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: #FFFFFF; border: 1px solid var(--ln-2); border-radius: var(--r);
  padding: 13px 15px; transition: border-color .24s, box-shadow .24s;
}
.scan-start input::placeholder { color: var(--ink-3); }
.scan-start input:focus { border-color: var(--cop); box-shadow: 0 0 0 3px var(--cop-dim); outline: none; }
.scan-start .btn { white-space: nowrap; }
.scan-note {
  margin-top: 10px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .04em; color: var(--ink-3);
}
.scan-note i { font-style: normal; color: var(--ln-2); margin: 0 6px; }
.hero-alt { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 520px) { .scan-start { grid-template-columns: 1fr; } }

/* ---------- 3. BOARD STRIP ---------- */
.board {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--ln); margin-top: 30px;
  border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden;
}
.board > div { background: #FFFFFF; padding: 14px 15px; }
.board dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink);
}
.board dd { margin: 5px 0 0; font-size: 13.5px; font-weight: 500; color: var(--ink-2); line-height: 1.35; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 4. FUNNEL RAIL ---------- */
.rail {
  position: fixed; left: 18px; top: 50%; transform: translateY(-50%);
  z-index: 88; display: none; padding: 14px 12px;
  border: 1px solid var(--ln); border-radius: var(--r-lg);
  background: rgba(254, 252, 247, .82); backdrop-filter: blur(9px);
}
.rail-h {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; padding-left: 2px;
}
.rail ol { display: grid; gap: 2px; }
.rail-i {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em;
  color: var(--ink-3); background: none; border: 0; padding: 5px 6px;
  border-radius: var(--r-sm); cursor: pointer; width: 100%; text-align: left;
  transition: color .24s, background .24s;
}
.rail-i::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  border: 1.5px solid var(--ln-2); background: transparent;
  transition: background .28s, border-color .28s, box-shadow .28s;
}
.rail-i:hover { color: var(--ink); background: rgba(31, 27, 22, .04); }
.rail-i.done::before { background: var(--ln-2); border-color: var(--ln-2); }
.rail-i.on { color: var(--ink); }
.rail-i.on::before { background: var(--cop); border-color: var(--cop); box-shadow: 0 0 0 4px var(--cop-dim); }
@media (min-width: 1420px) { body.is-front .rail { display: block; } }

/* ---------- 5. STICKY ACTION BAR ---------- */
.float { display: none !important; }
.prog { display: none; }
.jbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: flex; align-items: center; gap: 16px;
  padding: 11px clamp(14px, 3vw, 26px) 12px;
  background: rgba(24, 21, 18, .93); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(246, 241, 232, .12);
  transform: translateY(102%); opacity: 0; pointer-events: none;
  transition: transform .42s var(--ease), opacity .32s var(--ease);
}
.jbar.on { transform: none; opacity: 1; pointer-events: auto; }
.jbar-track { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: rgba(246, 241, 232, .1); }
.jbar-fill { display: block; height: 100%; width: 0; background: var(--cop); transition: width .12s linear; }
.jbar-meta { min-width: 0; display: grid; gap: 2px; }
.jbar-step {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cop);
}
.jbar-line {
  font-size: 14px; color: var(--on-dark); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jbar-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.jbar-wa {
  width: 38px; height: 38px; border-radius: var(--r); flex: 0 0 auto;
  display: grid; place-items: center; color: var(--on-dark);
  border: 1px solid rgba(246, 241, 232, .18);
  transition: background .24s, border-color .24s;
}
.jbar-wa:hover { background: rgba(246, 241, 232, .1); border-color: rgba(246, 241, 232, .34); color: var(--on-dark); }
.jbar-wa svg { width: 18px; height: 18px; }
.jbar-ghost {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  color: var(--on-dark-2); padding: 10px 4px;
}
.jbar-ghost:hover { color: var(--on-dark); }
@media (max-width: 760px) {
  .jbar-line { display: none; }
  .jbar-ghost { display: none; }
}

/* ---------- 6. DEPTH CHOREOGRAPHY ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* existing reveals gain a shallow rotation out of depth */
  .rv:not(.in) { transform: translateY(16px) scale(.994); }
  .hero-grid, .split { perspective: 1400px; }

  .rise-group > * {
    opacity: 0;
    transform: translate3d(0, 26px, -34px) rotateX(3.4deg);
    transform-origin: 50% 100%;
    transition:
      opacity .62s var(--ease) calc(var(--ri, 0) * 70ms),
      transform .72s var(--ease) calc(var(--ri, 0) * 70ms);
  }
  .rise-group.rise-in > * { opacity: 1; transform: none; }

  [data-par] { transform: translate3d(0, var(--par, 0px), 0); will-change: transform; }
}
.rise-group { transform-style: preserve-3d; }

/* section grid: a faint measured field behind content blocks */
.sec-grid { position: relative; }
.sec-grid::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, var(--ln) 0 1px, transparent 1px 25%),
    repeating-linear-gradient(0deg, var(--ln) 0 1px, transparent 1px 120px);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, #000 22%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 42%, #000 22%, transparent 78%);
  opacity: .8;
}
.sec-grid > .shell { position: relative; z-index: 1; }

/* ---------- 7. TWO-PART INTAKE ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 22px; }
.steps-i {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.steps-i b {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 500; color: var(--ink-3);
  border: 1px solid var(--ln-2); transition: background .24s, color .24s, border-color .24s;
}
.steps-i.on { color: var(--ink); }
.steps-i.on b { background: var(--cop); border-color: var(--cop); color: #FFF9F5; }
.steps-i.done b { background: var(--ln-2); border-color: var(--ln-2); color: var(--iv); }
.steps-act { display: flex; gap: 10px; margin-bottom: 14px; }
.form-grid > label.prefilled input { border-color: var(--cop); background: rgba(198, 97, 63, .04); }

/* ---------- 9. DARK BANDS, MADE DELIBERATE ---------- */
/* site-system.css had flattened .arch-dark to ivory, which left the
   "how the work runs" bands reading like unfinished sections. They are
   structural pauses in the page, so they get the real ink surface. */
.arch-dark {
  background: var(--char); color: var(--on-dark);
  position: relative; overflow: hidden;
  border-block: 1px solid rgba(198, 97, 63, .28);
}
.arch-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(246, 241, 232, .07) 0 1px, transparent 1px 12.5%),
    repeating-linear-gradient(0deg, rgba(246, 241, 232, .05) 0 1px, transparent 1px 116px);
  mask-image: radial-gradient(ellipse 76% 74% at 50% 40%, #000 18%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 76% 74% at 50% 40%, #000 18%, transparent 80%);
}
.arch-dark > .shell, .arch-dark > * { position: relative; z-index: 1; }
.arch-dark h1, .arch-dark h2, .arch-dark h3, .arch-dark h4, .arch-dark strong, .arch-dark b { color: var(--on-dark); }
.arch-dark p, .arch-dark li, .arch-dark dd,
.arch-dark .arch-section-head > p:last-child { color: var(--on-dark-2); }
.arch-dark .lbl { color: var(--cop); }
.arch-dark .lbl::before { background: var(--cop); }
.arch-dark .process-grid article,
.arch-dark .hgrid > *,
.arch-dark .card {
  background: rgba(246, 241, 232, .035);
  border-color: var(--ln-dark);
  box-shadow: none;
}
.arch-dark .process-grid article:hover,
.arch-dark .hgrid > *:hover { background: rgba(246, 241, 232, .07); border-color: rgba(198, 97, 63, .42); }
.arch-dark .process-grid article > span,
.arch-dark .hgrid > * > span:first-child { color: var(--cop); }
.arch-dark a:not(.btn) { color: var(--cop); }
.arch-dark a:not(.btn):hover { color: #E08A67; }
.arch-dark .btn-2 { color: var(--on-dark); border-color: rgba(246, 241, 232, .34); background: transparent; }
.arch-dark .btn-2:hover { background: rgba(246, 241, 232, .1); border-color: var(--on-dark); color: var(--on-dark); }
.arch-dark .tlink { color: var(--cop); }

/* ---------- 10. TEAM PROFILE ---------- */
.pro-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pro-chips span {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  color: var(--ink-2); background: #FFFFFF;
  border: 1px solid var(--ln-2); border-radius: var(--r-sm);
  padding: 7px 11px;
}
.pro-stats strong { font-variant-numeric: tabular-nums; }
.pro-own {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--ln-dark);
  border: 1px solid var(--ln-dark); border-radius: var(--r);
  overflow: hidden;
}
.pro-own > div { background: rgba(246, 241, 232, .04); padding: 26px 24px 28px; }
.pro-own span {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .16em; color: var(--cop); margin-bottom: 12px;
}
.pro-own h3 { font-size: clamp(17px, 1.5vw, 21px); color: var(--on-dark); }
.pro-role {
  margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline;
  font-size: 15.5px; color: var(--on-dark-2);
}
.pro-role b {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cop);
}
.pro-cred article > span { color: var(--cop); font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; }
.pro-cred article h2 { font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -.02em; margin: 12px 0 10px; }
.pro-cred article p { color: var(--ink-2); font-size: 15px; }
.profile-page .arch-card h2 { font-size: clamp(20px, 1.8vw, 27px); letter-spacing: -.02em; }

/* ---------- 12. SIX-LAYER DIAGNOSTIC ----------
   Built as stacked bands with the layer title inside each one, so the
   labels never detach from the shape and the whole thing reflows on a
   phone instead of shrinking to unreadable SVG text. */
.pyr-stack { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pyr-band {
  width: var(--w, 100%); min-width: fit-content; max-width: 100%; margin-inline: auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: nowrap;
  min-height: 62px; padding: 14px clamp(14px, 2.4vw, 28px);
  background: rgba(31, 27, 22, .04);
  border: 1px solid var(--ln-2);
  border-radius: 3px;
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .6s var(--ease);
  transition-delay: calc((5 - var(--i, 0)) * .09s);
}
.instr.live .pyr-band, .rise-in .pyr-band { opacity: 1; transform: none; }
.pyr-band.weak {
  background: var(--cop); border-color: var(--cop);
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
}
.pyr-k {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  color: var(--ink-3); flex: 0 0 auto;
}
.pyr-t {
  font-size: clamp(13px, 1.15vw, 16.5px); letter-spacing: -.012em;
  color: var(--ink); line-height: 1.25; white-space: nowrap;
}
/* the narrow top bands carry less room, so their titles step down with them */
.pyr-band:nth-child(1) .pyr-t { font-size: clamp(12.5px, .95vw, 14.5px); }
.pyr-band:nth-child(2) .pyr-t { font-size: clamp(12.5px, 1vw, 15px); }
.pyr-band.weak .pyr-k { color: rgba(255, 249, 245, .72); }
.pyr-band.weak .pyr-t { color: #FFF9F5; font-weight: 600; }
.pyr-c {
  margin-left: auto; flex: 0 0 auto; white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: #FFF9F5;
  border: 1px solid rgba(255, 249, 245, .5); border-radius: var(--r-sm);
  padding: 4px 9px;
}
.pyr-note {
  margin-top: 18px; font-size: 14px; color: var(--ink-2);
  max-width: 44em;
}
@media (prefers-reduced-motion: no-preference) {
  .instr.live .pyr-band.weak { animation: pyr-pulse 3s ease-in-out 1s infinite; }
}
@keyframes pyr-pulse {
  50% { box-shadow: 0 0 0 6px var(--cop-dim); }
}
/* on a phone the taper stops helping: full-width rows, titles first */
@media (max-width: 860px) {
  .pyr-band,
  .pyr-band.weak {
    width: 100%; clip-path: none; border-radius: var(--r-sm);
    min-height: 0; padding: 13px 15px; gap: 4px 12px; flex-wrap: wrap;
    min-width: 0;
  }
  /* the constraint band keeps its emphasis through colour, not a taper */
  .pyr-band.weak { box-shadow: inset 3px 0 0 #B8482A; }
  .pyr-band.weak .pyr-c {
    margin-left: 0; margin-top: 2px; font-size: 9.5px; padding: 3px 7px;
  }
  .pyr-band .pyr-t,
  .pyr-band:nth-child(1) .pyr-t,
  .pyr-band:nth-child(2) .pyr-t { font-size: 14px; white-space: normal; }
  .pyr-c { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pyr-band { opacity: 1; transform: none; }
}

.prov { margin-top: 26px; }
.prov dd { font-size: 13px; }
@media (max-width: 900px) { .prov { grid-template-columns: 1fr; } }
.res .fig-anim { margin-bottom: 22px; }

/* instrument panels: full width on narrow screens */
@media (max-width: 860px) {
  .instr-grid { grid-template-columns: 1fr; }
  .instr-wide { grid-column: auto; }
}

/* ---------- 13. REDUCED MOTION ---------- */@media (prefers-reduced-motion: reduce) {
  .rise-group > * { opacity: 1; transform: none; }
  .jbar { transition: none; }
}

/* ---------- 14. WARM ORANGE TINT SURFACES ----------
   The beige surface family (--beige #EFE6D8 / --beige-2 #E7DCCB) read as a
   dull grey-pink. It is replaced by a light tint drawn from #D85A35, kept
   pale enough that ink type holds its contrast on top. */
:root {
  --or:        #D85A35;
  --or-tint:   #FDF3EF;   /* lightest, large surfaces */
  --or-tint-2: #FBE7DE;   /* card and panel fill */
  --or-tint-3: #F7D9CD;   /* pressed and edges */
  --or-line:   rgba(216, 90, 53, .18);
  --beige:     #FBE7DE;
  --beige-2:   #F7D9CD;
  --or-grad:   linear-gradient(148deg, #FEF7F3 0%, #FBE8E0 54%, #F7DACE 100%);
}
.card-beige,
.dd-aside,
.layers > *:last-child,
.sec-cream .layers > *:last-child,
.profile-articles-section,
.intake-toast,
.arch-beige,
.scan-row.weak {
  background: var(--or-grad);
  border-color: var(--or-line);
}
.arch-beige { border-block: 1px solid var(--or-line); }
.scan-row.weak { background: linear-gradient(148deg, #FEF7F3 0%, #FBE8E0 100%); }
.brand-mark { background: var(--or-tint-2); border-color: var(--or-line); }
.dd-col a:hover { background: var(--or-tint); }
.btn-dark {
  background: var(--or-grad); border-color: var(--or); color: var(--ink);
}
.btn-dark:hover {
  background: linear-gradient(148deg, #FBE8E0 0%, #F5D2C4 100%);
  border-color: var(--or); color: var(--ink);
}
.pyr-band.weak { background: var(--or); border-color: var(--or); }
.pyr-band:not(.weak) { background: var(--or-tint); border-color: var(--or-line); }
.scan-flag { background: var(--or); }
@keyframes scan-flag {
  0%, 42% { background: #B8482A; box-shadow: none; }
  50%, 84% { background: var(--or); box-shadow: 0 0 0 4px rgba(216, 90, 53, .18); }
  92%, 100% { background: #B8482A; box-shadow: none; }
}

/* ---------- 15. PROCESS CARDS ----------
   The cards were flex columns with margin-top:auto on the title, so each
   title floated to its own card's base and no two lined up. They are now
   a grid of uniform cells: content starts at the top of every card, so
   numbers, titles, and copy align straight across the row. */
.process-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: 34px;
  background: var(--ln); border: var(--edge-w, 1px) solid var(--ln);
  border-radius: var(--r); overflow: hidden;
}
@media (max-width: 1100px) { .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .process-grid { grid-template-columns: 1fr; } }
/* specificity here matches the legacy site-system rules it has to replace:
   min-height:260px left 150px of dead space, and :first-child zeroed the
   left padding, which is what made the left edge read as ragged */
/* geometry reset only — no background here, so the fill rules below
   never lose the cascade to a :first-child selector */
.process-grid > article,
.process-grid > article:first-child,
.process-grid > article:last-child,
.architecture-page .process-grid > article,
.arch-dark .process-grid > article:first-child {
  display: grid; align-content: start; gap: 12px;
  min-height: 0; border: 0;
  /* the number, title, and copy all start on the same inset line */
  padding: 26px 26px 28px;
}
/* the section owns the surface; cards are separated by the 1px gutter only,
   so no white panel sits on top of a tinted or dark band. Each fill rule
   carries :first-child so it matches the reset's specificity. */
.process-grid { background: var(--or-line); }
.process-grid > article,
.process-grid > article:first-child {
  background: var(--iv);
}
.arch-dark .process-grid { background: var(--ln-dark); }
.arch-dark .process-grid > article,
.arch-dark .process-grid > article:first-child {
  background: rgba(246, 241, 232, .04);
}
.arch-beige .process-grid > article,
.arch-beige .process-grid > article:first-child,
.sec-cream .process-grid > article,
.sec-cream .process-grid > article:first-child {
  background: rgba(255, 255, 255, .62);
}
.process-grid article > span {
  margin: 0; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .16em; color: var(--cop);
}
.process-grid article h3 {
  margin: 0; font-size: clamp(17px, 1.5vw, 20px); letter-spacing: -.02em;
}
.process-grid article p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.arch-dark .process-grid {
  background: var(--ln-dark); border-color: var(--ln-dark);
}
.arch-dark .process-grid article { background: rgba(246, 241, 232, .04); }
.arch-dark .process-grid article:hover { background: rgba(246, 241, 232, .075); }

/* hero columns start at the same baseline instead of centering against
   the taller side */
.arch-hero-grid { align-items: start; }
.arch-radar { align-self: start; }

/* ---------- 16. HERO READOUT CARD + HAIRLINE ORANGE EDGES ----------
   The inner-page radar decoration is replaced by a readout card carrying
   content that belongs to its own page. Every orange surface is edged
   with the thinnest possible line in #D95C36 — a hairline on high-density
   screens, never a heavy border. */
:root {
  --edge: #D95C36;
  --edge-w: 1px;
  --or-line: rgba(217, 92, 54, .55);
}
@media (min-resolution: 2dppx) {
  :root { --edge-w: .5px; }
}
.hcard {
  align-self: start; width: 100%; max-width: 460px; margin-inline: auto;
  display: grid; gap: 0; align-content: start;
  background: #FFFFFF;
  border: var(--edge-w) solid var(--or-line);
  border-radius: var(--r); overflow: hidden;
}
.hcard-h {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2);
  background: linear-gradient(148deg, #FEF7F3 0%, #FBE8E0 100%);
  border-bottom: var(--edge-w) solid var(--or-line);
}
.hcard-live {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
  background: var(--edge); box-shadow: 0 0 0 3px rgba(217, 92, 54, .16);
}
.hcard-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.hcard-rows li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline; gap: 12px;
  padding: 14px 16px;
  border-top: var(--edge-w) solid rgba(217, 92, 54, .18);
}
.hcard-rows li:first-child { border-top: 0; }
.hcard-k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--edge);
}
.hcard-k:empty { display: none; }
.hcard-t { font-size: 14.5px; line-height: 1.35; color: var(--ink); }
.hcard-v {
  font-family: var(--mono); font-size: 13px; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.hcard-v:empty { display: none; }
.hcard-stats .hcard-v { font-size: clamp(15px, 1.4vw, 19px); color: var(--ink); letter-spacing: -.01em; }
.hcard-note {
  padding: 13px 16px;
  border-top: var(--edge-w) solid var(--or-line);
  font-size: 13px; line-height: 1.5; color: var(--ink-2);
  background: #FDF9F6;
}

/* every tinted surface takes the same hairline edge */
.card-beige, .dd-aside, .layers > *:last-child,
.sec-cream .layers > *:last-child, .profile-articles-section,
.intake-toast, .arch-beige, .pyr-band:not(.weak) {
  border-width: var(--edge-w); border-style: solid; border-color: var(--or-line);
}
.arch-beige { border-block-width: var(--edge-w); border-inline: 0; }
.btn-dark { border-width: var(--edge-w); border-color: var(--edge); }
.arch-final { border: var(--edge-w) solid var(--or-line); }
.scan-flag, .pyr-band.weak { border: var(--edge-w) solid var(--edge); }

/* ---------- 17. STRUCTURAL ALIGNMENT PASS ----------
   Three systemic faults, fixed at the rule rather than per page:

   1. .arch-section-head was a fixed 3-column grid (.52fr / 1.35fr / .7fr)
      with align-items:end. Sections built with two arguments left the third
      column empty, so their headings sat in a narrower measure than
      sections with three — and end-alignment dropped every eyebrow to the
      h2 baseline instead of lining up at the top.
   2. .arch-hero-grid carried min-height up to 790px, so short heroes held
      200px+ of dead space beneath the readout card.
   3. .arch-card (430px) and .audit-area-grid article (310px) pinned card
      heights, so short cards padded out unevenly against long ones.

   The head is now a two-track grid: eyebrow and title stack in one column,
   the description sits in the other, both starting on the same top line. */
.arch-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: clamp(20px, 3vw, 56px) clamp(28px, 4vw, 72px);
  align-items: start;
  margin-bottom: clamp(34px, 4.4vw, 62px);
}
.arch-section-head > .lbl {
  grid-column: 1; grid-row: 1;
  margin: 0 0 14px;
}
.arch-section-head h2 {
  grid-column: 1; grid-row: 2;
  max-width: 22ch;
  margin: 0;
  font-size: clamp(30px, 3.5vw, 52px);
  line-height: 1.08;
  text-wrap: pretty;
}
.arch-section-head > p:last-child:not(.lbl) {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: start;
  max-width: 46ch; margin: 0;
  padding-top: 6px;
  font-size: 16px; line-height: 1.65; color: var(--ink-2);
}
/* two-argument sections: the title takes the full measure instead of
   leaving an empty column */
.arch-section-head:not(:has(> p:last-child:not(.lbl))) {
  grid-template-columns: minmax(0, 1fr);
}
.arch-section-head:not(:has(> p:last-child:not(.lbl))) h2 { max-width: 26ch; }
@media (max-width: 900px) {
  .arch-section-head { grid-template-columns: minmax(0, 1fr); }
  .arch-section-head > p:last-child:not(.lbl) {
    grid-column: 1; grid-row: auto; padding-top: 0;
  }
}

/* heroes size to their content; no dead space under a short one */
.arch-hero-grid {
  min-height: 0;
  align-items: start;
  gap: clamp(40px, 5.5vw, 88px);
  padding-block: clamp(58px, 7vw, 104px);
}

/* cards size to content, so a row reads as one band instead of stepped
   blocks with different amounts of trailing space */
.arch-card, .audit-area-grid article, .library-card, .case-card {
  min-height: 0;
}
.arch-card-grid, .audit-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 14px;
  align-items: stretch;
}
.arch-card, .audit-area-grid article {
  display: grid; align-content: start; gap: 12px;
  padding: clamp(24px, 2.8vw, 38px);
}
.arch-card b, .arch-card > b:last-child {
  align-self: end; margin-top: 6px;
}

/* the closing CTA aligns its two halves on the same top line */
.arch-final {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.arch-final .cta-row { justify-self: end; padding-top: 6px; }
@media (max-width: 860px) {
  .arch-final { grid-template-columns: minmax(0, 1fr); }
  .arch-final .cta-row { justify-self: start; padding-top: 0; }
}

/* profile stat strip: even cells, no ragged final column */
.audit-stats > div { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.audit-stats div div:last-child { border-right: 0; }

/* ---------- 18. MOBILE: PYRAMID + FOOTER CLEARANCE ---------- */

/* The taper is meaningless below ~560px: a 40%-wide top band leaves no
   room for its title. Below that the stack becomes a plain ordered list
   with the layer number as a fixed gutter, so all six read at one size
   and the constraint stays obvious. */
@media (max-width: 560px) {
  .pyr-stack { gap: 5px; }
  .pyr-band {
    width: 100%; min-width: 0; max-width: 100%;
    clip-path: none; border-radius: var(--r-sm);
    display: grid; grid-template-columns: 26px minmax(0, 1fr);
    align-items: start; gap: 3px 10px;
    min-height: 0; padding: 12px 14px;
  }
  .pyr-band .pyr-k { grid-column: 1; grid-row: 1; font-size: 11px; }
  .pyr-band .pyr-t,
  .pyr-band:nth-child(1) .pyr-t,
  .pyr-band:nth-child(2) .pyr-t {
    grid-column: 2; grid-row: 1;
    font-size: 14px; white-space: normal; line-height: 1.3;
  }
  .pyr-band .pyr-c {
    grid-column: 2; grid-row: 2;
    margin-left: 0; justify-self: start; margin-top: 4px;
  }
  /* the taper animation loses its meaning here, so bands just fade up */
  .pyr-band { transform: translateY(8px); }
  .pyr-note { margin-top: 14px; font-size: 13.5px; }
}

/* The sticky action bar is fixed, so it sits on top of whatever the page
   ends with — on mobile that was the footer's social row. The footer now
   reserves the bar's height, and the bar reports its real height so the
   reserve tracks the actual control. */
:root { --jbar-h: 62px; }
@media (max-width: 760px) { :root { --jbar-h: 58px; } }
.foot .foot-bot { padding-bottom: calc(var(--jbar-h) + 18px); }
@supports (padding: env(safe-area-inset-bottom)) {
  .foot .foot-bot {
    padding-bottom: calc(var(--jbar-h) + 18px + env(safe-area-inset-bottom));
  }
  .jbar { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
/* the bar hides once the closing CTA is in view, but the reserve stays —
   which reads as intentional footer breathing room rather than a gap */

/* ---------- 17. DARK PROCESS CELLS + MOBILE QUERY FIGURES ----------
   The section-15 cells were painting #FFFFFF inside the ink band, which
   is the white block the eye read as a gradient. Dark-section cells now
   sit on the ink surface, and the first cell no longer loses its left
   padding to the legacy :first-child rule. */
.arch-dark .process-grid > article,
.arch-dark .process-grid > article:first-child,
.architecture-page .arch-dark .process-grid > article,
.architecture-page .arch-dark .process-grid > article:first-child {
  background: rgba(246, 241, 232, .045);
  min-height: 0; border-right: 0;
  padding: 26px 24px 28px;
}
.architecture-page .process-grid > article,
.architecture-page .process-grid > article:first-child {
  min-height: 0; padding: 26px 24px 28px; border-right: 0;
}
.arch-dark .process-grid { background: var(--ln-dark); border-color: var(--ln-dark); }
.arch-dark .process-grid > article:hover { background: rgba(246, 241, 232, .08); }

/* the node graphs carry 11px type inside a 720-unit viewBox, so on a
   phone they scale to about 5px. Below 760px the same information is
   shown as text instead. */
.q-mob { display: none; }
.q-mob-set { display: none; }
.q-mob-set.on { display: block; }
.q-mob-hub {
  font-family: var(--mono); font-size: 13px; color: var(--cop);
  border: var(--edge-w, 1px) solid var(--or-line); border-radius: var(--r-sm);
  padding: 10px 12px; text-align: center;
}
.q-mob-k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin: 14px 0 10px;
}
.q-mob-list, .q-mob-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-mob-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q-mob-list li, .q-mob-steps li {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  background: #FFFFFF; border: 1px solid var(--ln);
  border-radius: var(--r-sm); padding: 9px 11px;
}
.q-mob-steps { counter-reset: qs; }
.q-mob-steps li { display: flex; gap: 10px; align-items: baseline; counter-increment: qs; }
.q-mob-steps li::before { content: counter(qs, decimal-leading-zero); color: var(--cop); font-size: 10.5px; }
@media (max-width: 760px) {
  .instr-wide .stage .q-svg { display: none !important; }
  .q-mob { display: block; }
  .q-tabs { flex-wrap: wrap; }
}

/* ---------- 18. CLOSING CTA SPACING ----------
   .arch-final is a bordered card with margin-top:0, so it landed flush
   against the section above it (measured gap: 0px). It now owns its own
   separation on every template. */
.arch-final,
.architecture-page .arch-final,
#main > .arch-final {
  margin-top: clamp(30px, 5vw, 68px);
}

/* ---------- 19. TEAM PROFILE, MATCHED TO THE HOMEPAGE ----------
   Same vocabulary as the hero readout: hairline orange edges, mono keys
   in copper, ink type on white cells. */
.pro-chips:empty { display: none; }
.pro-chips span {
  border-width: var(--edge-w, 1px); border-color: var(--or-line);
}
.pro-stats > .shell { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; }
.pro-stats > .shell > div { padding: 16px 18px; }
.pro-stats strong { display: block; font-size: clamp(19px, 1.8vw, 26px); letter-spacing: -.02em; }
.pro-stats span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pro-own > div { padding: 24px 22px 26px; }
.pro-own h3 { font-size: clamp(16px, 1.4vw, 19px); }
.pro-cred article {
  background: #FFFFFF; padding: 22px 22px 24px;
  border: var(--edge-w, 1px) solid var(--or-line); border-radius: var(--r);
}
.pro-cred article h2 { margin: 10px 0 8px; }
.profile-page .arch-card-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.profile-page .team-g article {
  background: #FFFFFF; padding: 20px 20px 22px;
  border: var(--edge-w, 1px) solid var(--ln); border-radius: var(--r);
}
.profile-page .team-g h3 { margin: 6px 0 8px; font-size: clamp(17px, 1.5vw, 20px); }
.profile-page .team-lyr { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--edge); }
.profile-page .team-role { font-size: 14px; color: var(--ink-2); }
.profile-page .team-cred { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 760px) {
  .pro-stats > .shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 20. NARROW-SAFE GRIDS ----------
   Several inner-page grids used bare fr columns, so a long word or a form
   set the column's min-content and squeezed its sibling to a few dozen
   pixels — which is what made a heading render one letter per line. Every
   grid child now gets min-width:0, and the two-column layouts collapse to
   one column well before that point. */
.arch-hero-grid > *, .arch-two-col > *, .audit-form-grid > *,
.arch-lead-grid > *, .arch-contact-grid > *, .arch-subscribe-grid > *,
.case-story > *, .article-layout > *, .arch-section-head > *,
.process-grid > *, .arch-card-grid > *, .audit-area-grid > *,
.hgrid > *, .pro-own > *, .pro-cred > * { min-width: 0; }

/* the head sits inside columns of many widths, so it never splits by
   viewport: label, title, then description, one under the other */
.arch-section-head,
.architecture-page .arch-section-head,
.profile-page .arch-section-head {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
}
.arch-section-head > p:last-child:not(.lbl) { max-width: 62ch; margin: 0; }
.arch-section-head h2 { margin: 0; }
.arch-section-head .lbl { margin: 0; }
@media (max-width: 1040px) {
  .architecture-page .arch-hero-grid,
  .architecture-page .arch-two-col,
  .architecture-page .audit-form-grid,
  .architecture-page .arch-lead-grid,
  .architecture-page .arch-contact-grid,
  .architecture-page .arch-subscribe-grid,
  .architecture-page .case-story,
  .architecture-page .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .architecture-page .arch-card-grid,
  .architecture-page .audit-area-grid,
  .profile-page .arch-card-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .hcard { max-width: none; }
}
/* long URLs and mono strings must not set a column's width */
.arch-lead, .hcard-t, .scan-name, .pyr-t, .case-domain,
.arch-deliverables h3, .audit-area-grid p { overflow-wrap: anywhere; }
.pyr-t { overflow-wrap: normal; }

/* ---------- 21. FORM EDGES ----------
   Every form panel carries the same hairline #D95C36 edge as the rest of
   the orange surfaces. */
.arch-form, .audit-form-grid form, #request-scan form,
.arch-subscribe-grid form, .arch-contact-grid form {
  border: var(--edge-w, 1px) solid var(--or-line);
  border-radius: var(--r);
}
.arch-form input, .arch-form select, .arch-form textarea,
#request-scan input, #request-scan select, #request-scan textarea {
  border-width: var(--edge-w, 1px); border-color: var(--or-line);
}
.arch-form input:focus, .arch-form select:focus, .arch-form textarea:focus,
#request-scan input:focus, #request-scan select:focus, #request-scan textarea:focus {
  border-color: var(--edge); box-shadow: 0 0 0 3px rgba(217, 92, 54, .14);
}

/* ---------- 22. SECTION HEAD PLACEMENT + BREADCRUMB ----------
   Resetting the track list was not enough: a child-placement rule still
   put the description in column 2, which created an implicit second track
   and squeezed the title to 228px. The child placement is reset here, at
   a specificity above every earlier rule, so the head always reads
   label → title → description in one column. */
.arch-section-head > p:last-child:not(.lbl),
.architecture-page .arch-section-head > p:last-child:not(.lbl),
.profile-page .arch-section-head > p:last-child:not(.lbl),
.architecture-page .arch-section-head > *,
.arch-section-head > * {
  grid-column: 1;
  grid-row: auto;
}
.arch-breadcrumb, .arch-breadcrumb a, .arch-breadcrumb span {
  font-size: 11px; letter-spacing: .06em; color: var(--ink-2);
}
.arch-breadcrumb a:hover { color: var(--edge); }
.arch-breadcrumb [aria-current="page"] { color: var(--ink); }
