/* Walili site styles
   Light theme by default, dark theme via [data-theme="dark"].
   Brand maroon is reserved for the primary action and the rule above the form. */

/* Fonts are served from this site (no requests to Google). Both are variable fonts. */
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin.woff2") format("woff2");
}

:root,
:root[data-theme="light"] {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --inset: #eaecee;
  --window: #ffffff;
  --line: #dde0e4;
  --line-strong: #c1c6cc;
  --text: #16181b;
  --muted: #555c64;
  --faint: #d4d8dc;
  --tick: 22, 24, 27;
  --tick-min: 0.05;
  --tick-max: 0.5;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --error: #a3261c;
  --ok: #1f6b45;
  --maroon: #8d021f;
  --maroon-hover: #a8062a;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #16181b;
  --surface: #1d2024;
  --inset: #1d2024;
  --window: #2a2e33;
  --line: #2e3237;
  --line-strong: #454a51;
  --text: #eceef0;
  --muted: #9ba1a8;
  --faint: #3d4248;
  --tick: 236, 238, 240;
  --tick-min: 0.035;
  --tick-max: 0.7;
  --nav-bg: rgba(29, 32, 36, 0.94);
  --error: #f3a6a6;
  --ok: #8fd1ae;
  color-scheme: dark;
}

:root {
  --font-display: "Jost", "Futura", "Avenir Next", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section: clamp(88px, 11vw, 152px);
  --radius: 4px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 1.375rem; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: 500 1rem/1.2 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
  touch-action: manipulation;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--maroon); color: #fff; }
.btn--primary:hover { background: var(--maroon-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 16px 0 auto; z-index: 50; padding-inline: var(--gutter); pointer-events: none; }
.nav__bar {
  pointer-events: auto;
  max-width: 880px; margin-inline: auto;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 20px;
  background: var(--nav-bg);
  border: 1px solid var(--line); border-radius: 8px;
}
.nav__brand { display: block; padding: 10px 0; color: var(--text); margin-right: auto; }
.wordmark { width: 92px; height: auto; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  padding: 8px 10px; border-radius: var(--radius);
  color: var(--muted); font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
  transition: color 160ms ease;
}
.nav__links a:hover, .nav__links a.is-current { color: var(--text); }

.theme-toggle {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); cursor: pointer; transition: border-color 160ms ease;
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__bar { gap: 10px; padding-left: 16px; }
  .wordmark { width: 80px; }
}
@media (max-width: 390px) {
  .nav__bar { gap: 8px; padding-left: 12px; }
  .wordmark { width: 64px; }
  .theme-toggle { width: 36px; height: 36px; }
  .nav .btn--small { padding-inline: 10px; font-size: 0.8125rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: 140px clamp(48px, 8vh, 88px);
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 4%, color-mix(in srgb, var(--bg) 90%, transparent) 26%, transparent 52%),
    linear-gradient(to right, color-mix(in srgb, var(--bg) 85%, transparent) 0%, color-mix(in srgb, var(--bg) 35%, transparent) 40%, transparent 62%);
}
.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 5.75rem);
  line-height: 1.02; letter-spacing: -0.025em; font-weight: 500;
  max-width: 14ch;
}
.hero__foot {
  margin-top: clamp(32px, 5vh, 56px); padding-top: 28px;
  border-top: 1px solid var(--line-strong);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 64px;
}
.hero__sub { max-width: 40ch; color: var(--muted); font-size: 1.1875rem; }

/* Page-load sequence: the one orchestrated motion moment on the page. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title, .js .hero__foot, .js .hero__field {
    opacity: 0; transform: translateY(18px);
    animation: rise 900ms var(--ease-out) forwards;
  }
  .js .hero__foot { animation-delay: 220ms; }
  .js .hero__field { transform: none; animation: fade 1600ms ease 200ms forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); border-bottom: 1px solid var(--line); }
.section__head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head p { color: var(--muted); font-size: 1.125rem; max-width: 60ch; }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; }
.split__label { font-size: 1.125rem; line-height: 1.5; color: var(--muted); font-family: var(--font-body); font-weight: 500; }
.split__label--large { font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; color: var(--text); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Problem: one stat, then where pilots stall */
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 16px 40px; padding-bottom: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line-strong); }
.stat__num { font-family: var(--font-display); font-weight: 500; font-size: clamp(6rem, 17vw, 13rem); line-height: 0.8; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat__body { display: grid; gap: 12px; padding-bottom: 6px; }
.stat__text { font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2.25rem); line-height: 1.2; max-width: 20ch; }
.stat__src { font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 640px) { .stat { grid-template-columns: 1fr; } }

.stuck__label { margin: clamp(40px, 6vw, 72px) 0 32px; font-family: var(--font-body); font-size: 1.125rem; line-height: 1.5; font-weight: 500; color: var(--muted); }
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative; }
.track::before { content: ""; position: absolute; top: 18px; left: 18px; right: calc(25% - 42px); height: 1px; background: var(--line-strong); transform-origin: left; }
.stop { position: relative; display: grid; gap: 8px; align-content: start; }
.stop__node {
  width: 36px; height: 36px; margin-bottom: 12px; display: grid; place-items: center;
  border-radius: 50%; font-size: 0.875rem; font-weight: 600;
  background: var(--text); color: var(--bg);
}
.stop--ok .stop__node { background: var(--bg); color: var(--ok); border: 1px solid var(--ok); }
.stop h3 { font-size: 1.25rem; }
.stop p { color: var(--muted); max-width: 26ch; }
.stuck__close { margin-top: clamp(40px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.25; }
@media (max-width: 760px) {
  .track { grid-template-columns: 1fr; gap: 28px; }
  .track::before { display: none; }
  .stop:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 32px; bottom: -24px; width: 1px; background: var(--line-strong); transform-origin: top; }
  .stop { padding-left: 56px; }
  .stop__node { position: absolute; left: 0; top: -4px; margin: 0; }
}

/* ---------- What we build ---------- */
.uses {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong);
}
.use {
  display: grid; gap: 12px; align-content: start;
  padding: clamp(20px, 3vw, 36px);
  border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.use h3 { margin-top: 12px; }
.use p { color: var(--muted); max-width: 46ch; }
.use--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 24px 48px; }
.use__text { display: grid; gap: 12px; align-content: center; }
.use--wide h3 { margin-top: 0; }
.use__link { justify-self: start; margin-top: 8px; font-weight: 500; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.use__link:hover { text-decoration-color: currentColor; }
@media (max-width: 760px) {
  .uses { grid-template-columns: 1fr; }
  .use--wide { grid-template-columns: 1fr; }
  .use--wide .vignette { order: -1; }
}

/* Vignettes: small, literal previews of each tool. Decorative (aria-hidden). */
.vignette {
  background: var(--inset); border-radius: 2px;
  min-height: clamp(260px, 24vw, 320px); display: grid; place-items: center;
  padding: clamp(16px, 3vw, 32px);
  font-size: 0.8125rem; line-height: 1.45; color: var(--text);
  overflow: hidden;
}
.win {
  width: 100%; max-width: 380px;
  background: var(--window); border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 14px 16px;
  box-shadow: 0 1px 0 var(--line), 0 12px 24px -16px rgba(0, 0, 0, 0.25);
}
.win__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.win__foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.pill { flex: none; font-size: 0.6875rem; font-weight: 500; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--muted); }
.mark { flex: none; width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 0.625rem; font-weight: 600; background: var(--text); color: var(--bg); }

/* 1. Experiment planner */
.plot { width: 100%; height: auto; overflow: visible; }
.plot__grid { stroke: var(--line); stroke-width: 1; fill: none; }
.plot__axis { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.plot__label { font-size: 10px; fill: var(--muted); }
.plot__note { font-size: 10.5px; font-weight: 500; fill: var(--text); }
.plot__run { fill: var(--window); stroke: var(--muted); stroke-width: 1.5; }
.plot__best { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 1; stroke-dashoffset: 0; }
.plot__ring { fill: none; stroke: var(--text); stroke-width: 1.25; stroke-dasharray: 3 3; }
.plot__next { fill: var(--ok); }
.plot circle { transform-box: fill-box; transform-origin: center; }
.plan-result { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.plan-result__val { font-weight: 600; color: var(--ok); white-space: nowrap; }

/* 2. Property prediction */
.predict { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center; }
.mol { width: 100%; height: auto; overflow: visible; }
.mol path { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.mol text { font-size: 11px; font-weight: 500; fill: var(--text); }
.props { display: grid; }
.prop { display: grid; gap: 1px; padding: 6px 0; font-size: 0.75rem; }
.prop + .prop { border-top: 1px solid var(--line); }
.prop > span:first-child { color: var(--muted); }
.prop > span:last-child { font-weight: 500; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }

/* 3. Experiment search */
.win--ask { display: grid; gap: 12px; }
.ask-q { justify-self: end; max-width: 88%; padding: 8px 12px; border-radius: 10px 10px 2px 10px; background: var(--text); color: var(--bg); }
.hits { display: grid; }
.hits__head { font-size: 0.6875rem; color: var(--muted); padding-bottom: 6px; }
.hit { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.75rem; line-height: 1.4; }
.hit em { font-style: normal; color: var(--muted); }
.sys { flex: none; width: 44px; text-align: center; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 0; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); }

/* 4. Literature watch */
.feed { display: grid; gap: 2px; }
.feed__item { display: flex; align-items: center; gap: 10px; padding: 5px 0; opacity: 0.4; }
.feed__item.is-hit { opacity: 1; }
.kind { flex: none; width: 50px; font-size: 0.6875rem; color: var(--muted); }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--line-strong); }
.dot { flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--ok); }
.brief { display: grid; gap: 4px; margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 4px; font-size: 0.75rem; }
.cite { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px; font-size: 0.625rem; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); vertical-align: 1px; }

/* 5. Scope */
.scope { display: grid; }
.scope__row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 7px 0; font-size: 0.75rem; }
.scope__row + .scope__row { border-top: 1px solid var(--line); }
.scope__row > span:first-child { color: var(--muted); }
.scope__row > span:last-child { font-weight: 500; }

/* Each .play block (vignettes, the stall track) plays once when it scrolls into view (main.js adds .is-in).
   Animations sit paused on their first frame until then. Without JS or with
   reduced motion, the finished state shows. */
@media (prefers-reduced-motion: no-preference) {
  .js .play .a {
    animation: var(--anim, v-rise) var(--dur, 520ms) var(--ease-out) var(--d, 0ms) both paused;
  }
  .js .play .a--pulse { animation: v-pulse 1300ms ease-out var(--d, 0ms) both paused; }
  .js .play .feed__item:not(.is-hit) { --anim: v-rise-dim; --dur: 2000ms; }
  .js .play .scope .a { --dur: 800ms; animation-timing-function: steps(28, end); }
  .js .play.is-in .a { animation-play-state: running; }
  .js .track.play::before { animation: v-grow-x 1900ms linear both paused; }
  .js .track.play.is-in::before { animation-play-state: running; }
  .js .track.play .stop::after { animation: v-grow-y 600ms linear var(--d) both paused; }
  .js .track.play.is-in .stop::after { animation-play-state: running; }
}
@keyframes v-grow-x { from { transform: scaleX(0); } }
@keyframes v-grow-y { from { transform: scaleY(0); } }
@keyframes v-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes v-fade { from { opacity: 0; } }
@keyframes v-pop { from { opacity: 0; transform: scale(0.3); } }
@keyframes v-draw { from { stroke-dashoffset: 1; } }
@keyframes v-type { from { clip-path: inset(0 100% 0 0); } }
@keyframes v-rise-dim {
  0% { opacity: 0; transform: translateY(8px); }
  25%, 70% { opacity: 1; transform: none; }
}
@keyframes v-pulse {
  0% { opacity: 0; transform: scale(0.4); }
  25% { opacity: 1; transform: scale(1.15); }
  45% { transform: scale(1); }
  65% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- Industries ---------- */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.field-col { display: grid; gap: 16px; align-content: start; }
.field-col > p { color: var(--muted); max-width: 44ch; }
@media (max-width: 760px) { .fields { grid-template-columns: 1fr; gap: 56px; } }

.ruled-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ruled-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- Work (portfolio) ---------- */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.work { display: grid; gap: 8px; align-content: start; padding: clamp(16px, 2.4vw, 24px); background: var(--surface); border: 1px solid var(--line); }
.work .vignette { margin-bottom: 12px; }
.work__client { font-size: 0.8125rem; color: var(--muted); }
.work h3 { font-size: 1.25rem; }
.work > p:not(.work__client) { color: var(--muted); max-width: 48ch; }
.work__tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.work__tags li { font-size: 0.75rem; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--muted); }
.works__toggle { display: flex; margin: clamp(28px, 4vw, 40px) auto 0; }
.works.is-collapsed .work--more { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .work--more.is-revealed { animation: v-rise 520ms var(--ease-out) both; }
}
@media (max-width: 760px) { .works { grid-template-columns: 1fr; } }

.vignette--sm { min-height: clamp(200px, 18vw, 240px); }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 0.6875rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.lg--hit { background: var(--ok); }
.lg--next { border: 1.5px solid var(--text); }
.lg--bar { width: 14px; height: 6px; border-radius: 3px; background: var(--text); }
.lg--bar2 { width: 14px; height: 6px; border-radius: 3px; background: var(--line-strong); }
.lg--tick { width: 2px; height: 12px; border-radius: 1px; background: var(--ok); }

.plate { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.plate span { aspect-ratio: 1; border-radius: 50%; background: var(--faint); }
.plate .is-hit { background: var(--ok); }
.plate .is-next { background: transparent; border: 1.5px solid var(--text); }

.rank { display: grid; gap: 8px; }
.rank__row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 56px; align-items: center; gap: 10px; font-size: 0.75rem; }
.rank__row > span:first-child { color: var(--muted); }
.meter { display: block; height: 8px; border-radius: 4px; background: var(--inset); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--line-strong); }
.rank__row.is-best > span:first-child { color: var(--text); font-weight: 500; }
.rank__row.is-best .meter i { background: var(--text); }
.rank__tag { font-size: 0.6875rem; font-weight: 600; color: var(--ok); }

.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-size: 13px; fill: var(--muted); }
.chart__grid { stroke: var(--line); fill: none; }
.chart__band { fill: var(--faint); opacity: 0.7; }
.chart__line { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.chart__line--dash { stroke-dasharray: 4 3; }
.chart__today { stroke: var(--line-strong); stroke-dasharray: 2 3; }
.chart__limit { stroke: var(--muted); stroke-dasharray: 5 4; }
.chart__alert { fill: var(--text); }
.alert { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px; border-radius: 4px; background: var(--inset); font-size: 0.75rem; font-weight: 500; }

.ledger { display: grid; }
.ledger__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 0; font-size: 0.75rem; }
.ledger__row + .ledger__row { border-top: 1px solid var(--line); }
.ledger .muted { color: var(--muted); }
.ledger .ok { color: var(--ok); font-weight: 500; }
.ledger .flagged { font-weight: 600; padding: 1px 8px; border-radius: 20px; background: var(--text); color: var(--bg); font-size: 0.6875rem; }
.pair { display: grid; gap: 3px; }
.pair i { display: block; height: 5px; border-radius: 3px; background: var(--text); }
.pair i + i { background: var(--line-strong); }

.funnel { display: grid; gap: 9px; }
.funnel__row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 0.75rem; color: var(--muted); }
.dots { display: flex; gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.funnel__row:last-child .dots i { background: var(--text); }

.skills { display: grid; gap: 10px; }
.skill { display: grid; gap: 4px; font-size: 0.75rem; color: var(--muted); }
.track2 { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--inset); }
.track2 i { display: block; height: 100%; border-radius: 4px; background: var(--text); }
.track2 b { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 1px; background: var(--ok); }

.chips { display: flex; gap: 6px; margin-bottom: 12px; }
.chips span { font-size: 0.6875rem; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--muted); }
.chips .is-on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 500; }
.notes { display: grid; gap: 9px; }
.notes div { display: flex; align-items: center; gap: 10px; }
.notes .n { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 0.625rem; color: var(--muted); }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; position: relative; }
.steps::before { content: ""; position: absolute; top: 18px; left: 18px; right: 0; height: 1px; background: var(--line-strong); }
.step { position: relative; display: grid; gap: 14px; align-content: start; }
.step__num {
  width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 50%;
  font-family: var(--font-display); font-weight: 500;
}
.step p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { top: 18px; bottom: 18px; left: 18px; right: auto; width: 1px; height: auto; }
  .step { padding-left: 60px; }
  .step__num { position: absolute; left: 0; top: -6px; margin: 0; }
}

/* ---------- Why ---------- */
.reasons { border-top: 1px solid var(--line-strong); }
.reason { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.reason h3 { font-size: 1.25rem; }
.reason p { color: var(--muted); }
@media (max-width: 640px) { .reason { grid-template-columns: 1fr; } }

/* ---------- Discovery call ---------- */
.book__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px 80px; align-items: center; }
.book__intro { display: grid; gap: 20px; }
.book__intro > p { color: var(--muted); font-size: 1.125rem; max-width: 40ch; }
.next { list-style: none; counter-reset: next; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.next li { counter-increment: next; display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.next li::before { content: counter(next); color: var(--text); font-family: var(--font-display); width: 1ch; }

.call-cta {
  display: grid; gap: 16px; justify-items: stretch;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface); border: 1px solid var(--line);
  border-top: 2px solid var(--maroon);   /* the one maroon rule on the page */
}
.call-cta__bonus {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.25;
  color: var(--maroon); text-align: center;
}
.call-cta__note { font-size: 0.875rem; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .book__grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
#contact { border-bottom: 0; }

.form {
  display: grid; gap: 20px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--surface); border: 1px solid var(--line);
}
.field { display: grid; gap: 8px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 520px) { .field-pair { grid-template-columns: 1fr; } }
.field label { font-weight: 500; font-size: 0.9375rem; }
.field label span, .form__req span { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font: 400 1rem/1.5 var(--font-body);
  transition: border-color 160ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none; cursor: pointer; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; border-color: var(--text); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__help { font-size: 0.875rem; color: var(--muted); }
.field__error { font-size: 0.875rem; color: var(--error); display: flex; gap: 6px; }
.field__error::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; margin-top: 2px; }
.form__req { font-size: 0.875rem; color: var(--muted); }
.form__req a { color: var(--text); text-underline-offset: 3px; }
.form__status { font-size: 0.9375rem; }
.form__status:empty { display: none; }
.form.is-sent .field, .form.is-sent .field-pair, .form.is-sent .form__req, .form.is-sent button { display: none; }
.form.is-sent .form__status { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.4; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 40px; color: var(--muted); font-size: 0.9375rem; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.footer a { color: var(--text); text-underline-offset: 3px; }
.wordmark--footer { width: 84px; color: var(--text); }
@media (max-width: 700px) { .footer__links { margin-left: 0; width: 100%; } }
.call-cta__note a { color: var(--text); text-underline-offset: 3px; }

/* ---------- Legal pages ---------- */
.legal { padding-top: clamp(128px, 14vw, 176px); border-bottom: 0; }
.legal__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; align-items: start; }
.legal__head { display: grid; gap: 12px; position: sticky; top: 112px; }
.legal__head h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.015em; }
.legal__back { justify-self: start; font-size: 0.9375rem; color: var(--muted); text-decoration: none; }
.legal__back:hover { color: var(--text); }
.legal__meta { font-size: 0.9375rem; color: var(--muted); }
.legal__body { max-width: 68ch; }
.legal__body h2 { font-size: 1.5rem; margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal__body h3 { font-size: 1.1875rem; margin: 28px 0 8px; }
.legal__body p { margin-bottom: 14px; color: var(--muted); }
.legal__body strong { color: var(--text); font-weight: 600; }
.legal__body ul, .legal__body ol { margin: 0 0 16px; padding-left: 22px; color: var(--muted); }
.legal__body li { margin-bottom: 6px; }
.legal__body a { color: var(--text); text-underline-offset: 3px; }
.legal__note { padding-left: 16px; border-left: 2px solid var(--line-strong); font-style: italic; }
.kv { margin: 8px 0 20px; border-top: 1px solid var(--line-strong); }
.kv div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-weight: 500; }
.kv dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) {
  .legal__grid { grid-template-columns: 1fr; }
  .legal__head { position: static; }
}
@media (max-width: 520px) { .kv div { grid-template-columns: 1fr; } }
.form__alt { font-size: 0.875rem; color: var(--muted); margin-top: 1rem; }
.form__alt a { color: var(--text); text-underline-offset: 3px; }
