@import url("tokens.css");

/* ==========================================================================
   00 — Reset and base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--grotesk);
  font-size: var(--body);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: var(--track-tight);
  line-height: 1.04;
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); line-height: 1.06; }
h3 { font-size: var(--h3); line-height: 1.2; letter-spacing: -0.01em; }

p { text-wrap: pretty; }

a {
  color: var(--accent-text);
  text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: color var(--t-hover) linear,
              text-decoration-color var(--t-hover) linear;
}
a:hover { text-decoration-color: var(--accent-text); }

::selection { background: var(--accent); color: #fff; }

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

.skip {
  position: absolute; left: var(--s3); top: var(--s3);
  z-index: 200;
  padding: var(--s2) var(--s3);
  background: var(--accent); color: #fff;
  font: 500 var(--small)/1 var(--grotesk);
  text-decoration: none;
  transform: translateY(-400%);
}
.skip:focus-visible { transform: none; }

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

/* ==========================================================================
   01 — Layout primitives
   ========================================================================== */

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

/* The threshold rule: sections meet at a hard edge. No gradients between
   them, no soft fades. Off, then on. */
.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--rule);
}
.section--flush { border-top: 0; }
.section--tight { padding-block: clamp(48px, 6vw, 96px); }

.measure       { max-width: var(--measure); }
.measure-essay { max-width: var(--measure-essay); }

.lead {
  font-size: var(--lead);
  line-height: 1.45;
  color: var(--ink-dim);
  letter-spacing: -0.008em;
}

.body-lg { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.62; }

.dim { color: var(--ink-dim); }

/* Two-column section head: marker rail on the left, content on the right. */
.rail {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--s4);
}
@media (max-width: 900px) {
  .rail { grid-template-columns: 1fr; gap: var(--s3); }
}

/* ==========================================================================
   02 — The 01 motif system
   ========================================================================== */

/* Binary section markers. Visual only — aria-hidden in the markup, because a
   screen reader announcing "one zero" before every section is hostile. */
.marker {
  font: 400 var(--marker)/1 var(--mono);
  letter-spacing: var(--track-wide);
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.rail > .marker { padding-top: 0.5em; }

.eyebrow {
  display: block;
  font: 400 var(--marker)/1 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s4);
}
.eyebrow .marker-inline { color: var(--accent-text); }

/* The escaping stroke. The X's outbound stroke, extracted from the mark —
   the only graphic device on the site that is not type. */
.stroke-rule {
  display: block;
  width: 100%;
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--rule);
  position: relative;
}
.stroke-rule::after {
  content: "";
  position: absolute;
  right: 0; top: -5px;
  width: 22px; height: 11px;
  background: var(--ink-dim);
  clip-path: polygon(0 38%, 68% 38%, 68% 0, 100% 50%, 68% 100%, 68% 62%, 0 62%);
}

/* Forward link: text plus the escaping stroke as its arrow. */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--body);
  text-decoration: none;
  font-weight: 500;
}
.arrow-link::after {
  content: "";
  width: 20px; height: 10px;
  background: currentColor;
  clip-path: polygon(0 40%, 62% 40%, 62% 0, 100% 50%, 62% 100%, 62% 60%, 0 60%);
  transition: transform var(--t-hover) linear;
}
.arrow-link:hover::after { transform: translateX(4px); }

/* ==========================================================================
   03 — Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s4);
  font: 500 16px/1 var(--grotesk);
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--t-hover) linear,
              color var(--t-hover) linear,
              border-color var(--t-hover) linear;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-quiet); border-color: var(--accent-quiet); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn--ghost:hover { border-color: var(--ink-dim); color: var(--ink); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}

/* ==========================================================================
   04 — Navigation
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: color-mix(in srgb, var(--field) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-101%);
  transition: transform 400ms var(--ease);
}
/* Sticky after the hero, not from the top; reappears on upward scroll only. */
.nav[data-visible="true"] { transform: none; }
.nav[data-top="true"] {
  transform: none;
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  position: absolute;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 80px;
}

.nav__logo {
  display: block;
  flex: none;
  /* Clear space on all sides = the height of the Z in the wordmark. */
  padding: var(--s3) var(--s3) var(--s3) 0;
  margin-left: calc(var(--s3) * -1 + var(--s3));
}
.nav__logo img { width: 120px; height: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 36px);
  margin-left: auto;
}
.nav__links a {
  font-size: 15px;
  font-weight: 450;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.005em;
}
.nav__links a:hover { color: var(--ink-dim); }
/* The active item is marked with the accent colour, not an underline. */
.nav__links a[aria-current="page"] { color: var(--accent-text); }

.nav__cta { flex: none; }
.nav__cta .btn { min-height: 42px; padding-inline: var(--s3); font-size: 15px; }

.nav__toggle { display: none; }
.nav__menu { display: none; }

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__inner { min-height: 68px; }
  .nav__logo img { width: 96px; }

  /* Opened and closed by the same control in the same position. No hamburger
     that turns into an X that moves. */
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    margin-left: auto;
    min-height: 44px;
    padding: 0 var(--s2);
    background: none;
    border: 0;
    color: var(--ink);
    font: 400 var(--marker)/1 var(--mono);
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    cursor: pointer;
  }

  /* The header sits above its own overlay, so the control that opened the
     menu is the control that closes it, in the same position. */
  .nav__menu {
    position: fixed;
    inset: 0;
    z-index: 98;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: var(--s3);
    padding: var(--s6) var(--gutter) var(--s5);
    background: var(--field);
    overflow-y: auto;
  }
  .nav__menu[data-open="true"] { display: flex; }
  .nav__menu a {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: var(--track-tight);
    color: var(--ink);
    text-decoration: none;
    padding-block: var(--s1);
  }
  .nav__menu a[aria-current="page"] { color: var(--accent-text); }
  .nav__menu .btn { margin-top: var(--s4); align-self: flex-start; }
}

/* ==========================================================================
   05 — Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: clamp(140px, 18vh, 220px);
  padding-bottom: var(--section-y);
}
.hero__h1 { margin-block: 0 var(--s4); }
.hero__sub { max-width: 56ch; }

/* The mark assembling. Runs once in the hero, once as the loading state,
   and nowhere else. */
.hero__mark {
  width: clamp(88px, 12vw, 132px);
  margin-bottom: var(--s5);
}

/* ==========================================================================
   06 — The statement strip
   ========================================================================== */

.statement p {
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.18;
  letter-spacing: var(--track-tight);
  max-width: 22ch;
  text-wrap: balance;
}
.statement p + p { margin-top: var(--s4); color: var(--ink-dim); }
.statement p:last-child { color: var(--ink); }

/* ==========================================================================
   07 — Cards and grids
   ========================================================================== */

.grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
  margin-top: var(--s5);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.cell {
  background: var(--field);
  padding: var(--s4) clamp(20px, 3vw, 40px) var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.cell__marker { margin-bottom: var(--s3); }
.cell h3 { max-width: 24ch; }
.cell p { color: var(--ink-dim); font-size: 16px; line-height: 1.55; }
.cell .arrow-link { margin-top: auto; padding-top: var(--s4); }

/* The two doors on the home page. */
.doors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: var(--s5);
}
@media (max-width: 860px) { .doors { grid-template-columns: 1fr; } }
.door {
  background: var(--field);
  padding: clamp(32px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-height: 320px;
  transition: background var(--t-hover) linear;
}
.door:hover { background: var(--field-raised); }
.door h3 { font-size: clamp(22px, 2.4vw, 32px); max-width: 18ch; }
.door p { color: var(--ink-dim); max-width: 34ch; }
.door .arrow-link { margin-top: auto; padding-top: var(--s4); }

/* ==========================================================================
   08 — Numbered lists (principles, capabilities, beliefs)
   ========================================================================== */

.numbered { margin-top: var(--s5); border-top: 1px solid var(--rule); }
.numbered > li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s4);
  border-bottom: 1px solid var(--rule);
}
.numbered h3 { margin-bottom: var(--s2); }
.numbered p { color: var(--ink-dim); max-width: 62ch; }
@media (max-width: 720px) {
  .numbered > li { grid-template-columns: 1fr; gap: var(--s2); }
  .numbered .marker { margin-bottom: var(--s1); }
}

/* Two-column variant for dense reference lists (How we build). */
.numbered--split > li { grid-template-columns: 56px minmax(0, 20ch) minmax(0, 1.4fr); }
@media (max-width: 900px) {
  .numbered--split > li { grid-template-columns: 1fr; gap: var(--s2); }
}

/* ==========================================================================
   09 — Tables that become cards under 768px
   ========================================================================== */

.tbl { width: 100%; border-collapse: collapse; margin-top: var(--s5); }
.tbl th, .tbl td {
  text-align: left;
  vertical-align: top;
  padding: var(--s3) var(--s4) var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
.tbl th {
  font: 400 var(--marker)/1.4 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 400;
  padding-bottom: var(--s2);
}
.tbl td { font-size: 16px; line-height: 1.55; color: var(--ink-dim); }
.tbl td:first-child { color: var(--ink); font-weight: 500; }

@media (max-width: 768px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr {
    border-bottom: 1px solid var(--rule);
    padding-block: var(--s4);
  }
  .tbl td { border: 0; padding: 0 0 var(--s2) 0; }
  .tbl td:first-child { font-size: 20px; letter-spacing: -0.01em; margin-bottom: var(--s1); }
  .tbl td[data-label]::before {
    content: attr(data-label);
    display: block;
    font: 400 var(--marker)/1 var(--mono);
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: var(--s1);
  }
}

/* ==========================================================================
   10 — The inverse section. One per page, maximum.
   ========================================================================== */

.inverse {
  background: var(--inv-field);
  color: var(--inv-ink);
  border-top: 0;
}
.inverse h1, .inverse h2, .inverse h3 { color: var(--inv-ink); }
.inverse .dim, .inverse .lead, .inverse p { color: var(--inv-ink-dim); }
.inverse .marker, .inverse .eyebrow { color: var(--inv-ink-dim); }
/* An inverse section flips the field, so it flips the text accent with it. */
.inverse a, .inverse .eyebrow .marker-inline,
.inverse .arch__eval__label { color: var(--inv-accent-text); }
.inverse a { text-decoration-color: color-mix(in srgb, var(--inv-accent-text) 40%, transparent); }
.inverse .stroke-rule { background: var(--inv-rule); }
.inverse .stroke-rule::after { background: var(--inv-ink-dim); }
.inverse .btn--ghost { color: var(--inv-ink); border-color: var(--inv-rule); }
.inverse .btn--ghost:hover { border-color: var(--inv-ink-dim); }
.inverse .numbered, .inverse .numbered > li,
.inverse .tbl th, .inverse .tbl td { border-color: var(--inv-rule); }
.inverse .grid, .inverse .doors { background: var(--inv-rule); border-color: var(--inv-rule); }
.inverse .arch__eval, .inverse .arch__flow::before, .inverse .arch__eval::before { border-color: var(--inv-rule-strong); }
.inverse .cell, .inverse .door { background: var(--inv-field); }

/* The black lockup, small, in the corner — a watermark of register change. */
.inverse__watermark {
  width: 64px;
  opacity: 0.55;
  margin-bottom: var(--s4);
}

/* ==========================================================================
   11 — The essay register (thesis, journal)
   ========================================================================== */

.essay { max-width: var(--measure-essay); }
.essay h2 {
  font-size: clamp(26px, 2.8vw, 38px);
  margin-top: var(--s6);
  margin-bottom: var(--s4);
}
.essay h2:first-child { margin-top: 0; }
.essay p { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.65; }
.essay p + p { margin-top: var(--s4); }
.essay p em { font-style: italic; color: var(--ink); }
.essay__standfirst {
  font-size: var(--lead);
  line-height: 1.45;
  color: var(--ink-dim);
}
.essay__byline {
  font: 400 var(--marker)/1.6 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: var(--s4);
}

/* ==========================================================================
   12 — Forms
   ========================================================================== */

.form { margin-top: var(--s5); max-width: 560px; }
.field { margin-bottom: var(--s4); }
.field label {
  display: block;
  font: 400 var(--marker)/1 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: var(--s2);
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s2) var(--s3);
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font: 400 16px/1.5 var(--grotesk);
  transition: border-color var(--t-hover) linear;
}
.field textarea { min-height: 128px; padding-top: var(--s3); resize: vertical; }
.field select { appearance: none; cursor: pointer; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-dim); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); opacity: 0.7; }

/* Inline validation on blur, never on keypress. Errors next to the field. */
.field__error {
  display: none;
  margin-top: var(--s2);
  font-size: var(--small);
  color: #FF6B5A;
}
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea { border-color: #FF6B5A; }
.field[data-invalid="true"] .field__error { display: block; }

.form__note { margin-top: var(--s3); font-size: var(--small); color: var(--ink-dim); max-width: 48ch; }
.form__status { margin-top: var(--s3); font-size: 16px; }

/* A honeypot and a rate limit stop the same bots as a reCAPTCHA, and do not
   make a CTO prove they are human. */
.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.inline-form { display: flex; gap: var(--s2); flex-wrap: wrap; max-width: 520px; margin-top: var(--s4); }
.inline-form .field { flex: 1 1 260px; margin-bottom: 0; }
.inline-form .btn { flex: none; }

/* ==========================================================================
   13 — Footer
   ========================================================================== */

.footer { border-top: 1px solid var(--rule); padding-top: var(--section-y); }

.footer__line {
  font-size: clamp(30px, 6vw, 84px);
  line-height: 1;
  letter-spacing: var(--track-tight);
  font-weight: 500;
  margin-bottom: var(--s6);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s5) var(--s4);
  padding-bottom: var(--s5);
}
@media (max-width: 860px) { .footer__cols { grid-template-columns: repeat(2, 1fr); } }

.footer__col h2 {
  font: 400 var(--marker)/1 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 400;
  margin-bottom: var(--s3);
}
.footer__col li + li { margin-top: var(--s2); }
.footer__col a {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.footer__col a:hover { color: var(--ink-dim); }

.footer__bar {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-block: var(--s4);
  border-top: 1px solid var(--rule);
  font: 400 var(--small)/1.5 var(--grotesk);
  color: var(--ink-dim);
}
.footer__bar .footer__mark { margin-left: auto; font-family: var(--mono); letter-spacing: var(--track-wide); }

/* The theme toggle. 0 and 1, off and on — the brand's own idea made
   operable, and the one moment both logo files exist in the same product. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s2);
  margin-left: var(--s3);
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-dim);
  font: 400 var(--marker)/1 var(--mono);
  letter-spacing: var(--track-wide);
  transition: color var(--t-hover) linear;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle__digit { transition: color var(--t-hover) linear; }
.theme-toggle__digit[data-on="true"] { color: var(--accent-text); }

/* The logo crossfades between the two files. Everything else switches
   instantly, which makes the logo the thing the eye follows. */
.logo-swap { position: relative; display: block; }
.logo-swap img { transition: opacity var(--t-theme) linear; }
.logo-swap img + img { position: absolute; inset: 0; }
.logo-swap .logo--light { opacity: 1; }
.logo-swap .logo--dark  { opacity: 0; }
:root[data-theme="light"] .logo-swap .logo--light { opacity: 0; }
:root[data-theme="light"] .logo-swap .logo--dark  { opacity: 1; }

/* ==========================================================================
   14 — Motion
   ========================================================================== */

/* Entrances: opacity and 8px rise, once per element, never again on
   scroll-back. Applied only when JS is present — see .js on <html>. */
.js [data-enter] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-enter) var(--ease),
              transform var(--t-enter) var(--ease);
}
.js [data-enter][data-entered="true"] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .js [data-enter] { opacity: 1; transform: none; }
}

/* ==========================================================================
   15 — Error pages
   ========================================================================== */

.error-page {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.error-page h1 { margin-bottom: var(--s4); }

/* ==========================================================================
   16 — The architecture diagram
   A designed asset, not a scaled screenshot. It is built in the layout so it
   redraws vertically on a phone instead of scrolling sideways into a dead
   section. Five layers carry a request down. One carries the truth back up.
   ========================================================================== */

.arch {
  margin-top: var(--s5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(240px, 300px);
  gap: 0;
  align-items: start;
}

.arch__spine { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }

.arch__layer {
  background: var(--field);
  display: grid;
  grid-template-columns: 56px minmax(0, 15ch) minmax(0, 1.5fr);
  gap: var(--s3) var(--s4);
  padding: var(--s4) clamp(20px, 2.5vw, 32px);
  position: relative;
  transition: background var(--t-hover) linear;
}
.arch__layer:hover { background: var(--field-raised); }
.arch__layer h3 { font-size: 19px; }
.arch__layer p { font-size: 15px; line-height: 1.5; color: var(--ink-dim); }

/* The actors, above the spine — people and enterprises enter at the top. */
.arch__actors {
  background: var(--field-raised);
  padding: var(--s3) clamp(20px, 2.5vw, 32px);
  font: 400 var(--marker)/1.4 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* The corrections path, drawn rather than described: it leaves Intelligence,
   passes through Evaluation, and returns upward into Orchestration. It is the
   only line in the diagram that goes back up, and it is dashed because a
   feedback loop is not a call. */
.arch__flow {
  position: relative;
  align-self: stretch;
  margin-block: 22% 30%;
}
.arch__flow::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  border-left: 1px dashed var(--rule-strong);
}
.arch__flow::after {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  transform: translate(-50%, -1px);
  width: 9px; height: 7px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* Evaluation: the only layer that points back upward, and the only one drawn
   outside the spine. Dotted, because the path is a feedback loop, not a call. */
.arch__eval {
  border: 1px dashed var(--rule-strong);
  padding: var(--s4) var(--s4) var(--s5);
  margin-top: 22%;
  position: relative;
}
/* The branch out of the spine, into Evaluation. */
.arch__eval::before {
  content: "";
  position: absolute;
  right: 100%; top: var(--s5);
  width: 32px;
  border-top: 1px dashed var(--rule-strong);
}
.arch__eval h3 { font-size: 19px; margin-bottom: var(--s2); }
.arch__eval p { font-size: 15px; line-height: 1.5; color: var(--ink-dim); }
.arch__eval__label {
  font: 400 var(--marker)/1 var(--mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--accent-text);
  display: block;
  margin-bottom: var(--s3);
}

.arch__caption {
  margin-top: var(--s4);
  font-size: var(--small);
  color: var(--ink-dim);
}

@media (max-width: 900px) {
  /* Redrawn vertically, not scaled down. Evaluation becomes the last card in
     the stack, still marked as the return path. */
  .arch { grid-template-columns: 1fr; }
  .arch__flow { display: none; }
  .arch__eval::before { display: none; }
  .arch__eval { margin-top: var(--s4); }
  .arch__layer { grid-template-columns: 1fr; gap: var(--s2); padding-block: var(--s4); }
  .arch__layer .marker { margin-bottom: var(--s1); }
}
