/* =========================================================================
   SUBSTRATE — "Understorey"
   Warm nature-catalogue build: big transitional serif over flat green fields,
   pill buttons, 20px radii, hand-inked marks, chartreuse-sage accent.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  /* field */
  --ink:          #10291d;   /* green-black */
  --forest:       #0d3a2a;   /* deep pine — headings, footer slab */
  --olive:        #43663c;   /* hero field, primary pill */
  --olive-lift:   #4d7344;   /* hover step */
  --moss:         #617b57;   /* eyebrows, hover text */
  --sage:         #b6c5ad;   /* hairlines, rules */
  --chart:        #c9de8d;   /* chartreuse-sage — the accent */
  --chart-deep:   #b7cf75;
  --signal:       #c58a24;   /* amber — live indicator only */

  /* ground */
  --ground:       #f7f0e5;   /* page cream */
  --ground-soft:  #fcf8f1;   /* card cream */
  --ground-deep:  #ece2d1;   /* plate cream */
  --soil:         #4b382a;   /* body brown */
  --stone:        #8a7d6c;   /* muted meta */

  --hair:         rgba(13, 58, 42, .22);
  --hair-soft:    rgba(13, 58, 42, .12);

  /* type */
  --serif: 'Newsreader', 'Iowan Old Style', 'Times New Roman', Times, Georgia, serif;
  --sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mark:  'Archivo', 'Instrument Sans', Helvetica, Arial, sans-serif;

  --t-stat:    clamp(4.25rem, 2.2rem + 7.6vw, 9.25rem);
  --t-h1:      clamp(2.75rem, 0.6rem + 5.4vw, 4.5rem);
  --t-h3:      clamp(1.95rem, 1rem + 3.4vw, 3.5rem);
  --t-h4:      clamp(1.7rem, 1.1rem + 2.1vw, 2.5rem);
  --t-h5:      clamp(1.3rem, 1rem + 1.35vw, 2rem);
  --t-serif-s: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
  --t-lg:      clamp(1.0625rem, .96rem + .5vw, 1.375rem);
  --t-body:    1rem;
  --t-ui:      .875rem;
  --t-tag:     .75rem;

  /* rhythm */
  --gutter:  clamp(1.25rem, 3.75vw + .62rem, 4rem);
  --colgap:  clamp(1rem, .75vw + .82rem, 1.5rem);
  --pad-y:   clamp(3rem, 3.38vw + 2.21rem, 5.25rem);
  --r:       20px;
  --r-lg:    40px;
  --r-pill:  104px;
  --header-h: 86px;

  /* motion */
  --ease:      cubic-bezier(.33, 1, .68, 1);
  --ease-hand: cubic-bezier(.175, .885, .32, 1.125);
}

@media (max-width: 900px) { :root { --header-h: 72px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--soil);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--forest);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--chart); color: var(--ink); }

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

.u-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-160%);
  background: var(--ground-soft); color: var(--forest);
  padding: .7rem 1.1rem; border-radius: var(--r-pill);
  font-size: var(--t-ui); transition: transform .25s var(--ease);
}
.skip:focus-visible { transform: none; }

/* --------------------------------------------------------------- layout */
.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  max-width: 1600px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--colgap);
}
.section { padding-block: calc(var(--pad-y) * 1.35); }

/* --------------------------------------------------------------- type */
.h1 { font-size: var(--t-h1); line-height: 1; letter-spacing: -.01em; }
.h3 { font-size: var(--t-h3); line-height: 1.1; letter-spacing: -.02em; }
.h4 { font-size: var(--t-h4); line-height: 1.1; letter-spacing: -.02em; }
.h5 { font-size: var(--t-h5); line-height: 1.28; letter-spacing: -.02em; }

.label {
  font-size: var(--t-body);
  color: var(--moss);
  letter-spacing: .002em;
}
.lead { font-size: var(--t-lg); line-height: 1.42; color: var(--soil); }
.meta { font-size: var(--t-ui); color: var(--stone); }

.tag {
  display: inline-flex; align-items: center;
  font-size: var(--t-tag); line-height: 1.5; letter-spacing: -.01em;
  padding: .45em .85em;
  border-radius: var(--r-pill);
  background: var(--ground-deep);
  color: var(--ink);
  white-space: nowrap;
}
.tag--own { background: var(--chart); }
.tag--dark {
  background: rgba(11, 30, 21, .78);
  border: 1px solid rgba(252, 248, 241, .2);
  color: var(--ground-soft);
}
.tag--dark.tag--own { background: rgba(201, 222, 141, .94); border-color: transparent; color: var(--ink); }

/* --------------------------------------------------------------- buttons */
.cta-group { display: inline-flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem;
  border-radius: var(--r-pill);
  font-size: var(--t-ui); letter-spacing: .005em;
  background: var(--olive); color: var(--ground-soft);
  border: 1px solid transparent;
  transition: background-color .28s var(--ease), color .28s var(--ease),
              transform .2s var(--ease), border-color .28s var(--ease);
}
.arrow-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 50%;
  background: var(--olive); color: var(--ground-soft);
  border: 1px solid transparent;
  overflow: hidden;
  transition: background-color .28s var(--ease), transform .2s var(--ease), border-color .28s var(--ease);
}
.arrow-btn svg { width: 20px; height: 20px; transition: transform .34s var(--ease); }

.cta-group:hover .pill,
.cta-group:hover .arrow-btn { background: var(--olive-lift); }
.cta-group:hover .arrow-btn svg { transform: translateX(28px); }
.cta-group:hover .arrow-btn::after { transform: none; }
.cta-group:hover .pill { transform: translateY(-1px); }

/* second arrow that slides in from the left */
.arrow-btn { position: relative; }
.arrow-btn .arrow-ghost {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform: translateX(-28px); opacity: 0;
  transition: transform .34s var(--ease), opacity .2s var(--ease) .06s;
}
.cta-group:hover .arrow-ghost { transform: none; opacity: 1; }

/* light-on-dark variant */
.cta-group--chart .pill,
.cta-group--chart .arrow-btn { background: var(--chart); color: var(--ink); }
.cta-group--chart:hover .pill,
.cta-group--chart:hover .arrow-btn { background: var(--chart-deep); }

/* outlined variant */
.cta-group--line .pill,
.cta-group--line .arrow-btn {
  background: transparent; color: var(--forest);
  border-color: var(--hair);
}
.cta-group--line:hover .pill,
.cta-group--line:hover .arrow-btn { background: var(--forest); color: var(--ground-soft); border-color: var(--forest); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--t-ui); color: var(--forest);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* --------------------------------------------------------------- header */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--header-h);
  display: flex; align-items: center;
  padding-inline: var(--gutter);
  color: var(--ground-soft);
  transition: transform .6s var(--ease),
              color .25s var(--ease) .1s;
  will-change: transform;
}
.header.is-hidden { transform: translateY(calc(-1 * var(--header-h) - 8px)); }
.header.on-light { color: var(--forest); }

.header-inner {
  width: 100%; max-width: 1600px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.wordmark {
  font-family: var(--mark);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.1rem + .9vw, 1.9rem);
  letter-spacing: -.045em;
  text-transform: uppercase;
  line-height: 1;
  color: currentColor;
}
.wordmark .dot {
  display: inline-block; width: .2em; height: .2em;
  border-radius: 50%; background: var(--chart);
  margin-left: .06em; vertical-align: baseline;
  text-indent: -100em; overflow: hidden;
}
.header.on-light .wordmark .dot { background: var(--olive); }

.nav { display: flex; align-items: center; gap: clamp(.9rem, 1.5vw, 1.75rem); }
.nav a {
  font-size: var(--t-ui); line-height: 1;
  display: inline-flex; align-items: center; gap: .35rem;
  position: relative; padding-block: .4rem;
  transition: color .25s var(--ease), opacity .2s var(--ease);
}
.nav a .plus { opacity: .55; font-size: .95em; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
/* The underline sweep alone read as inert — the link itself takes the accent
   so the affordance matches the rest of the hover system. Suppressed mid-scroll
   like the card hovers. */
html:not(.lenis-scrolling) .nav a:hover { color: var(--chart); }
html:not(.lenis-scrolling) .header.on-light .nav a:hover { color: var(--olive); }
html:not(.lenis-scrolling) .nav a:hover .plus { opacity: 1; }

.header .pill { background: var(--chart); color: var(--ink); min-height: 42px; }
.header .pill:hover { background: var(--chart-deep); }

.burger {
  display: none;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--chart); color: var(--ink);
  place-items: center;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.burger:hover { background: var(--chart-deep); }
.burger { position: relative; }
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 17px; height: 1.5px; background: currentColor; border-radius: 2px;
  transform: translate(-50%, calc(-50% + var(--y, 0px)));
  transition: transform .35s var(--ease), opacity .2s var(--ease);
}
.burger span:nth-child(1) { --y: -5px; }
.burger span:nth-child(3) { --y: 5px; }
html.nav-open .burger span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
html.nav-open .burger span:nth-child(2) { opacity: 0; }
html.nav-open .burger span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 80;
  background: var(--forest);
  color: var(--ground-soft);
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden;
  transform: translateY(-14px);
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s linear .5s;
}
html.nav-open .drawer {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s;
}
.drawer-nav { display: flex; flex-direction: column; gap: .35rem; }
.drawer-nav a {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -.02em;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
html.nav-open .drawer-nav a { opacity: 1; transform: none; transition-delay: calc(.08s + var(--i) * .05s); }
.drawer-foot { display: grid; gap: 1.25rem; }
.drawer-foot .meta { color: rgba(252, 248, 241, .6); }

/* --------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--olive);
  color: var(--ground-soft);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: clip;
  isolation: isolate;
}
.hero-grain {
  position: absolute; inset: -6% 0 -6%;
  background: url('../../shared/assets/huts/hero.webp') center/cover no-repeat;
  opacity: .34;
  z-index: -2;
  will-change: transform;
}
.hero::after {
  /* woven paper tooth, cheap and static */
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    repeating-linear-gradient(0deg, rgba(252,248,241,.028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(16,41,29,.03) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.hero-horizon {
  position: absolute; left: 0; right: 0; top: 78%;
  height: 1px; background: rgba(182, 197, 173, .16);
  z-index: -1;
  will-change: transform;
}

.hero-body {
  align-self: center;
  padding-block: calc(var(--header-h) + 2rem) 0;
  text-align: center;
}
.hero-body .inner {
  grid-column: 2 / span 10;
  display: grid; justify-items: center; gap: clamp(1.75rem, 3vw, 2.75rem);
}
@media (max-width: 900px) { .hero-body .inner { grid-column: 1 / -1; } }

.hero h1 {
  color: var(--ground-soft);
  font-size: var(--t-h1);
  line-height: 1.02;
  letter-spacing: -.01em;
}
.hero .line > span { white-space: nowrap; }
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i) * .09s + .12s);
}
.is-loaded .line > span { transform: none; }

/* scribbled underline under two words */
.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble svg {
  position: absolute; left: -3%; bottom: -.22em; width: 106%; height: .34em;
  overflow: visible; color: var(--chart);
}
.scribble path {
  fill: none; stroke: currentColor; stroke-width: 4.5;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  transition: stroke-dashoffset .95s var(--ease);
}
.is-loaded .scribble path { stroke-dashoffset: 0; transition-delay: calc(.85s + var(--d, 0s)); }

.hero-cta { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease) .95s, transform .7s var(--ease) .95s; }
.is-loaded .hero-cta { opacity: 1; transform: none; }
.hero .pill, .hero .arrow-btn { background: var(--chart); color: var(--ink); }
.hero .cta-group:hover .pill, .hero .cta-group:hover .arrow-btn { background: var(--chart-deep); }

.hero-foot {
  padding-block: 0 clamp(1.75rem, 3vw, 2.5rem);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem;
  color: rgba(252, 248, 241, .68);
  font-size: var(--t-ui);
  opacity: 0; transform: translateY(10px);
  transition: opacity .8s var(--ease) 1.15s, transform .8s var(--ease) 1.15s;
}
.is-loaded .hero-foot { opacity: 1; transform: none; }
.hero-foot p { max-width: 34ch; }
.hero-foot .right { text-align: right; }
@media (max-width: 720px) { .hero-foot .right { display: none; } }
/* The variants switcher owns the bottom-right corner (fixed, never restyled),
   so the hero foot yields it rather than sitting under the badge. */
@media (min-width: 721px) { .hero-foot { padding-bottom: clamp(3.75rem, 4.5vw, 4.25rem); } }

/* --------------------------------------------------------- reveal utility */
.rv { opacity: 0; transform: translateY(20px); }
.rv.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }

/* --------------------------------------------------------------- rail */
.rail-head {
  text-align: center;
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.rail-head .h3 { max-width: 18ch; margin-inline: auto; }
.rail-head .label { margin-bottom: .9rem; }

.rail-stage { position: relative; }
.rail-sticky {
  position: sticky; top: 0;
  height: 100svh;
  display: grid; grid-template-rows: auto 1fr;
  align-content: center;
  overflow: hidden;
}
.rail-viewport { width: 100%; overflow: hidden; display: flex; align-items: center; }
.rail-track {
  display: flex; column-gap: var(--colgap);
  padding-inline: var(--gutter);
  will-change: transform;
}

.card {
  flex: 0 0 auto;
  width: clamp(255px, 28vw, 421px);
  height: min(576px, 62svh);
  perspective: 1200px;
}
.card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s var(--ease-hand);
}
html:not(.lenis-scrolling) .card:hover .card-inner,
.card:focus-within .card-inner { transform: rotateY(180deg); }

.card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--r);
  border: 1px solid var(--hair);
  background: var(--ground-soft);
  padding: clamp(1.1rem, 2vw, 1.75rem);
  display: grid;
  overflow: hidden;
}
.card-front { grid-template-rows: 1fr auto; row-gap: 1rem; }
.card-front .art { display: grid; place-items: center; min-height: 0; }
.card-front .art svg { width: 100%; height: 100%; max-height: 300px; }
.card-front .h5 { text-align: center; transition: color .25s var(--ease); }
html:not(.lenis-scrolling) .card:hover .card-front .h5 { color: var(--moss); }

.card-back {
  transform: rotateY(180deg);
  border-color: rgba(97, 123, 87, .55);
  grid-template-rows: auto 1fr auto;
  row-gap: 1rem;
  align-content: start;
}
.card-back .label { font-size: var(--t-ui); }
.card-back .h5 { margin-top: .4rem; }
.card-back p.body { font-size: var(--t-body); color: var(--soil); align-self: start; }
.card-back .num {
  font-family: var(--mark); font-weight: 700; font-size: var(--t-ui);
  letter-spacing: .06em; color: var(--moss);
}

/* --------------------------------------------------------- divider arrow */
.divider {
  display: grid; place-items: center;
  padding-block: clamp(1.5rem, 3vw, 2.75rem);
}
.divider svg { color: var(--olive); width: clamp(150px, 20vw, 240px); height: auto; overflow: visible; }
.divider--right { justify-items: end; padding-inline: 14%; }
.divider--left { justify-items: start; padding-inline: 12%; }
.ink path {
  fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len, 900); stroke-dashoffset: var(--len, 900);
  transition: stroke-dashoffset 1.15s var(--ease);
}
.ink.in path { stroke-dashoffset: 0; }
.ink .ink-b path { transition-delay: .35s; }

/* ------------------------------------------------------ back-and-forth */
.baf { padding-block: clamp(2rem, 4vw, 3.5rem); }
.baf .inner {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.baf--reverse .media { order: 2; }
.baf-copy { display: grid; gap: 1.25rem; justify-items: start; max-width: 34rem; }
.baf-copy .lead { color: var(--soil); }
.baf-copy .h4 { max-width: 16ch; }
.baf-copy .honesty {
  border-left: 2px solid var(--chart);
  padding-left: 1.1rem;
  display: grid; gap: .45rem;
}
.baf-copy .honesty strong { font-weight: 500; color: var(--forest); }

/* photo fan */
.fan { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.fan-plate {
  position: absolute; margin: 0;
  width: 72%; aspect-ratio: 1 / 1;
  border-radius: var(--r);
  overflow: clip;
  background: var(--ground-deep);
  box-shadow: 0 18px 42px -28px rgba(16, 41, 29, .55);
  opacity: 0;
  transform: rotate(0deg) scale(1.25);
  transition: opacity .7s var(--ease), transform .8s var(--ease-hand);
  transition-delay: var(--d, 0s);
}
/* Deal-out geometry lives here, not inline, so the small-screen rules can
   actually tighten it (an inline custom property would out-rank them). */
.fan-plate:nth-child(1) { --rot: -10deg; --d: 0s;    left: 1%;  top: 0; }
.fan-plate:nth-child(2) { --rot:   6deg; --d: .09s;  left: 17%; top: 13%; }
.fan-plate:nth-child(3) { --rot:  -2deg; --d: .18s;  left: 8%;  top: 7%; }
.fan.in .fan-plate { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1); }
.fan-plate img, .fan-plate svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.fan-plate figcaption {
  position: absolute; left: 12px; bottom: 12px;
  font-size: var(--t-tag); letter-spacing: -.01em;
  background: var(--ground-soft); color: var(--ink);
  padding: .35em .7em; border-radius: var(--r-pill);
}

/* --------------------------------------------------------- live console */
.console {
  border-radius: var(--r);
  border: 1px solid var(--hair);
  background: var(--ground-soft);
  overflow: hidden;
  box-shadow: 0 20px 50px -34px rgba(16, 41, 29, .5);
}
.console-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--hair-soft);
}
.console-head .lhs { display: flex; align-items: center; gap: .6rem; }
.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 0 rgba(197, 138, 36, .5);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(197, 138, 36, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(197, 138, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(197, 138, 36, 0); }
}
.console-head .sim {
  font-size: var(--t-tag); letter-spacing: .04em; text-transform: uppercase;
  color: var(--stone);
}
.console-stages { display: grid; gap: .55rem; padding: 1.15rem; border-bottom: 1px solid var(--hair-soft); }
.stage { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.stage-name { font-size: var(--t-ui); color: var(--soil); }
.stage-bar { height: 3px; border-radius: 3px; background: var(--ground-deep); overflow: hidden; }
.stage-fill {
  display: block; height: 100%; width: 0%;
  background: var(--moss); border-radius: 3px;
  transform-origin: left;
  transition: width .6s var(--ease), background-color .3s var(--ease);
}
.stage.done .stage-fill { background: var(--olive); }
.stage.active .stage-fill { background: var(--signal); }
.stage-pct { font-size: var(--t-tag); color: var(--stone); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }

.console-feed { height: 190px; overflow: hidden; padding: .5rem 0; }
.feed-row {
  display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto;
  min-width: 0;
  gap: .75rem; align-items: baseline;
  padding: .38rem 1.15rem;
  font-size: var(--t-tag);
  color: var(--soil);
  animation: feedIn .45s var(--ease) both;
}
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feed-row .ref { font-family: var(--mark); font-weight: 700; letter-spacing: .02em; color: var(--moss); }
.feed-row .amt { font-variant-numeric: tabular-nums; color: var(--stone); }
.feed-row:nth-child(n+7) { opacity: .55; }
.feed-row:nth-child(n+9) { opacity: .28; }
.console-foot {
  padding: .8rem 1.15rem; border-top: 1px solid var(--hair-soft);
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: var(--t-tag); color: var(--stone);
}

.findings { display: grid; gap: .85rem; }
.findings li {
  display: grid; grid-template-columns: auto 1fr; gap: .8rem;
  font-size: var(--t-body); color: var(--soil);
  padding-bottom: .85rem; border-bottom: 1px solid var(--hair-soft);
}
.findings li:last-child { border-bottom: 0; padding-bottom: 0; }
.findings .bullet {
  width: 6px; height: 6px; border-radius: 50%; background: var(--chart-deep);
  margin-top: .55em;
}

/* --------------------------------------------------------- work band */
.band { position: relative; background: var(--ink); }
.band-intro {
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(2rem, 4vw, 3.5rem);
  color: var(--ground-soft);
}
.band-intro .inner { grid-column: 1 / span 8; display: grid; gap: 1rem; }
.band-intro .h3 { color: var(--ground-soft); max-width: 20ch; }
.band-intro .label { color: var(--chart); }
@media (max-width: 900px) { .band-intro .inner { grid-column: 1 / -1; } }

.projects { position: relative; }
/* Each panel is taller than the viewport: its image fills the whole panel and
   its caption pins at the top of the viewport for the difference, then leaves
   before the next panel's caption arrives. Hard seams, no overlap. */
.proj { position: relative; display: block; height: 138svh; }

.proj-media { position: absolute; inset: 0; overflow: clip; z-index: 0; margin: 0; }
.proj-media > img, .proj-media > .plate { width: 100%; height: 100%; object-fit: cover; }
.proj-media img {
  opacity: 0; transition: opacity .9s var(--ease) .1s;
}
.proj-media img.loaded { opacity: 1; }
.proj-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(9, 22, 15, .72) 0%, rgba(9, 22, 15, .34) 44%, rgba(9, 22, 15, .06) 72%),
    linear-gradient(180deg, rgba(9, 22, 15, .3) 0%, rgba(9, 22, 15, 0) 26%);
}

.proj-content {
  position: absolute; inset: 0;
  z-index: 5; pointer-events: none;
}
.proj-sticky {
  position: sticky; top: 0; height: 100svh;
  display: grid; align-content: center;
  padding-inline: var(--gutter);
}
.proj-sticky .inner { max-width: 1600px; margin-inline: auto; width: 100%; }
.proj-cap { width: min(100%, 46rem); display: grid; gap: 1.5rem; justify-items: start; }
.proj-cap .n {
  font-family: var(--mark); font-weight: 700; font-size: var(--t-ui);
  letter-spacing: .12em; color: var(--chart);
}
.proj-cap h2 {
  color: var(--ground-soft);
  font-size: var(--t-h1); line-height: 1.02; letter-spacing: -.01em;
  max-width: 13ch;
}
.proj-cap .tags { display: flex; flex-wrap: wrap; gap: .4rem; max-width: 34rem; }
.proj-cap .surface { color: rgba(252, 248, 241, .8); font-size: var(--t-lg); max-width: 30rem; }

.band-out { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); position: relative; z-index: 6; }
.band-out .inner { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.band-out p { color: rgba(252, 248, 241, .72); max-width: 40ch; }
.band .cta-group .pill, .band .cta-group .arrow-btn { background: var(--chart); color: var(--ink); }
.band .cta-group:hover .pill, .band .cta-group:hover .arrow-btn { background: var(--chart-deep); }

/* --------------------------------------------------------- voice */
.voice { background: var(--ground-deep); }
.voice .inner { grid-column: 1 / -1; }
.voice h2 { margin-bottom: clamp(1.75rem, 3.5vw, 3rem); max-width: 20ch; }
.voice-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 26%; align-items: center; }
.quote-card {
  background: var(--ground-soft);
  border: 1px solid var(--hair-soft);
  border-radius: var(--r);
  padding: clamp(1.75rem, 4vw, 3.25rem);
  padding-right: clamp(1.75rem, 8vw, 7rem);
  display: grid; gap: 1.5rem;
}
.quote-mark { font-family: var(--serif); font-size: 5rem; line-height: .6; color: var(--olive); height: 2.6rem; }
.quote-card blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, .95rem + 1.1vw, 1.6rem);
  line-height: 1.38; color: var(--forest);
  max-width: 30ch;
}
.quote-attr { display: grid; gap: .15rem; }
.quote-attr .who { font-size: 1.125rem; color: var(--ink); }
.voice-photo {
  position: relative; z-index: 2;
  margin-left: -14%;
  border-radius: var(--r); overflow: clip;
  aspect-ratio: 4 / 5;
  box-shadow: 0 24px 60px -36px rgba(16, 41, 29, .6);
}
.voice-photo img { width: 100%; height: 100%; object-fit: cover; }
.voice-photo .tag { position: absolute; top: 12px; right: 12px; }

/* --------------------------------------------------------- people */
.people .inner { grid-column: 1 / -1; }
.people h2 { max-width: 22ch; }
.people .lead { max-width: 46ch; margin-top: 1rem; }
.people-grid {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem);
}
.person { border-top: 1px solid var(--hair); padding-top: 1.25rem; display: grid; gap: .6rem; align-content: start; }
.person .n { font-family: var(--mark); font-weight: 700; font-size: var(--t-tag); letter-spacing: .12em; color: var(--moss); }
.person .name { font-family: var(--serif); font-size: var(--t-h5); line-height: 1.2; color: var(--forest); letter-spacing: -.02em; }
.person .role { font-size: var(--t-ui); color: var(--stone); }
.person .resp { font-size: var(--t-body); color: var(--soil); }

/* --------------------------------------------------------- stats */
.stats .inner { grid-column: 1 / -1; }
.stats-head { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.stats-grid {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  column-gap: clamp(2rem, 5vw, 4.5rem);
}
.stats-rule { background: var(--hair); }
.stats-col { display: grid; }
.stats-col--right { padding-top: clamp(2.5rem, 6vw, 6.5rem); }

.stat { padding-block: clamp(1.5rem, 3vw, 2.25rem) clamp(2rem, 4vw, 3.25rem); border-bottom: 1px solid var(--hair); position: relative; }
.stat:last-child { border-bottom: 0; }
.stat .num {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--t-stat); line-height: 1; letter-spacing: -.013em;
  color: var(--forest);
  display: block;
}
.stat .num .char { display: inline-block; opacity: 0; transform: translateY(.14em); }
.stat.in .num .char {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--i) * 40ms);
}
.stat .cap { margin-top: 1rem; font-size: var(--t-body); color: var(--soil); max-width: 34ch; }
.stat .framing {
  margin-top: .85rem;
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--t-tag); letter-spacing: .02em;
  color: var(--moss);
}
.stat .framing::before { content: ''; width: 14px; height: 1px; background: var(--moss); }
.stat .num-row { position: relative; display: inline-block; max-width: 100%; }
.stat .emphasis {
  position: absolute; top: -.16em; left: 100%;
  width: clamp(42px, 4.6vw, 68px); color: var(--chart-deep);
  pointer-events: none;
  margin-left: .04em;
}
.stat .emphasis path {
  fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round;
  stroke-dasharray: var(--len, 60); stroke-dashoffset: var(--len, 60);
  transition: stroke-dashoffset .6s var(--ease);
}
.stat.in .emphasis path { stroke-dashoffset: 0; }
.stat.in .emphasis path:nth-child(2) { transition-delay: .1s; }
.stat.in .emphasis path:nth-child(3) { transition-delay: .2s; }

/* --------------------------------------------------------- cta panel */
.cta-panel {
  background: var(--chart);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  position: relative; overflow: hidden;
  margin-top: clamp(2rem, 5vw, 4rem);
}
.cta-panel .inner {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 4vw, 4rem); align-items: end;
  padding-left: clamp(0px, 13vw, 210px);
}
.cta-panel h2 { color: var(--ink); max-width: 16ch; }
.cta-panel .label { color: rgba(16, 41, 29, .62); margin-bottom: 1rem; }
.cta-panel p { color: rgba(16, 41, 29, .74); max-width: 42ch; margin-top: 1.25rem; }
.cta-panel .pill, .cta-panel .arrow-btn { background: var(--forest); color: var(--ground-soft); }
.cta-panel .cta-group:hover .pill, .cta-panel .cta-group:hover .arrow-btn { background: var(--ink); }
.cta-doodle {
  position: absolute; left: clamp(1rem, 2.5vw, 3rem); bottom: -4%;
  width: clamp(110px, 12vw, 170px); color: var(--olive); opacity: .85;
  pointer-events: none;
}
@media (max-width: 1100px) { .cta-doodle { display: none; } }
@media (max-width: 1100px) { .cta-panel .inner { padding-left: 0; } }

/* --------------------------------------------------------- footer */
.footer {
  background: var(--forest);
  color: var(--ground-soft);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin-top: -1px;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(1.75rem, 3vw, 2.5rem);
}
.footer .inner { grid-column: 1 / -1; }
.footer-mark { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.footer .wordmark {
  font-size: clamp(2.5rem, 10vw, 8.5rem);
  display: block; line-height: .88;
}
.footer-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.75rem, 3.5vw, 3.25rem); }
.footer-brand { display: grid; gap: 1rem; align-content: start; }
.footer-brand p { color: rgba(252, 248, 241, .62); max-width: 30ch; font-size: var(--t-ui); }
.foot-col { display: grid; gap: 1.5rem; align-content: start; }
.foot-group { display: grid; gap: .6rem; }
.foot-group h3 { font-family: var(--sans); font-size: var(--t-body); font-weight: 500; color: var(--chart); }
.foot-group a {
  font-family: var(--serif); font-size: var(--t-serif-s); line-height: 1.3;
  color: rgba(252, 248, 241, .88);
  transition: color .2s var(--ease), transform .25s var(--ease);
  display: inline-block;
}
.foot-group a:hover { color: var(--chart); transform: translateX(3px); }

.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(252, 248, 241, .16);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  font-size: var(--t-ui); color: rgba(252, 248, 241, .6);
}
.footer-bottom nav { display: flex; gap: 1.5rem; }
.footer-bottom a:hover { color: var(--chart); }

/* ============================================================== responsive */
@media (max-width: 1024px) {
  .baf .inner { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .baf--reverse .media { order: 0; }
  .fan { max-width: 26rem; aspect-ratio: 1 / .86; }
  .voice-row { grid-template-columns: minmax(0, 1fr); }
  /* The photo keeps its overlap onto the card, but the card grows a deeper
     foot so the image lands on padding — never on the attribution line that
     carries the own-business framing. */
  .quote-card { padding-bottom: 5.5rem; }
  .voice-photo { margin-left: 0; margin-top: -2.5rem; margin-right: auto; width: min(62%, 20rem); }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .cta-panel .inner { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 900px) {
  .nav, .header > .header-inner > .cta-group { display: none; }
  .header .desk-cta { display: none; }
  .burger { display: grid; }

  .rail-sticky { position: static; height: auto; }
  .rail-stage { height: auto !important; }
  .rail-viewport {
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rail-viewport::-webkit-scrollbar { display: none; }
  .rail-track { transform: none !important; padding-bottom: 1.5rem; }
  .card { scroll-snap-align: center; width: min(80vw, 340px); height: auto; perspective: none; }
  .card-inner { transform: none !important; height: auto; }
  .card-front { display: none; }
  .card-back { position: relative; transform: none; min-height: 22rem; }

  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .stats-rule { display: none; }
  .stats-col--right { padding-top: 0; }
  .stats-col--right .stat:first-child { border-top: 1px solid var(--hair); }

  .people-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .proj { height: 118svh; }
  .proj-cap h2 { max-width: 11ch; }
  .proj-cap .surface { display: none; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .divider--right, .divider--left { padding-inline: 8%; }
}

@media (max-width: 560px) {
  .hero .line > span { white-space: normal; }
  .quote-card { padding-right: clamp(1.5rem, 6vw, 2.5rem); }
  .voice-photo { width: min(72%, 16rem); }
  .stat .emphasis { width: 38px; }
  .fan-plate { width: 68%; }
  .fan-plate:nth-child(1) { left: 8%;  top: 0; }
  .fan-plate:nth-child(2) { left: 21%; top: 11%; }
  .fan-plate:nth-child(3) { left: 13%; top: 6%; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .line > span { transform: none; }
  .scribble path, .ink path, .emphasis path { stroke-dashoffset: 0 !important; }
  .rv { opacity: 1; transform: none; }
  .hero-cta, .hero-foot { opacity: 1; transform: none; }
  .fan-plate { opacity: 1; transform: rotate(var(--rot, 0deg)) scale(1); }
  .stat .num .char { opacity: 1; transform: none; }
  .proj-media img { opacity: 1; }
  .dot-live { animation: none; }
}

/* ------------------------------------------------------- generated plates */
.plate { position: relative; width: 100%; height: 100%; background: var(--ink); }
.plate svg { width: 100%; height: 100%; display: block; }
.plate::after {
  content: '';
  position: absolute; inset: 0;
  background: url('../../shared/assets/huts/hero.webp') center/cover no-repeat;
  opacity: .22;
  mix-blend-mode: normal;
  pointer-events: none;
}

/* ------------------------------------------------------------ misc glue */
html.nav-open body { overflow: hidden; }
.card-back .link-arrow { align-self: end; justify-self: start; }
.stat .num { font-variant-ligatures: none; }
.footer .foot-group > div { display: grid; gap: .6rem; }

/* =========================================================================
   Inner pages — work.html / method.html
   Same vocabulary as the home page: flat fields, one serif voice, hairline
   rules, pill chips, 20px radii. Nothing new invented.
   ========================================================================= */

.page-head .inner,
.ledger-intro .inner,
.protocol .inner,
.evidence .inner,
.agreement .inner,
.case .inner { grid-column: 1 / -1; }

/* ---------------------------------------------------------- page header */
.page-head {
  position: relative;
  background: var(--olive);
  color: var(--ground-soft);
  overflow: clip;
  isolation: isolate;
  padding-block: calc(var(--header-h) + clamp(4rem, 9vw, 8.5rem)) clamp(4rem, 9vw, 8rem);
}
.page-head::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    repeating-linear-gradient(0deg, rgba(252, 248, 241, .028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(16, 41, 29, .03) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.page-head .inner { display: grid; gap: 1.5rem; max-width: 62rem; }
.page-head .label { color: var(--chart); }
.page-head h1 {
  color: var(--ground-soft);
  font-size: var(--t-h1); line-height: 1.04; letter-spacing: -.01em;
}
.page-head .lead { color: rgba(252, 248, 241, .78); max-width: 46ch; }
.page-head .scribble svg { color: var(--chart); }
/* on an inner page the scribble draws on reveal rather than on load */
.page-head .rv.in .scribble path { stroke-dashoffset: 0; transition-delay: calc(.35s + var(--d, 0s)); }

.ledger-intro .inner { display: grid; gap: 1.25rem; }
.ledger-intro .h3 { max-width: 18ch; }
.ledger-intro .lead { max-width: 52ch; }

/* ------------------------------------------------------------ work case */
.case { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.case .inner { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
.case-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.case--reverse .media { order: 2; }
.case-copy { display: grid; gap: 1.1rem; align-content: start; }
.case-copy .system { color: var(--soil); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }

.frame {
  margin: 0; border-radius: var(--r); overflow: clip;
  aspect-ratio: 4 / 3.4;
  background: var(--ground-deep);
  border: 1px solid var(--hair-soft);
  box-shadow: 0 22px 56px -38px rgba(16, 41, 29, .5);
}
.frame img, .frame .plate { width: 100%; height: 100%; object-fit: cover; }
.frame img { opacity: 0; transition: opacity .8s var(--ease) .1s; }
.frame img.loaded { opacity: 1; }

/* ---------------------------------------------------------- metric list */
.metric-list { display: grid; gap: 1.1rem; margin-top: .5rem; }
.metric-list li {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem; row-gap: .2rem;
  align-items: baseline;
  padding-top: .9rem; border-top: 1px solid var(--hair-soft);
}
.metric-list .mv {
  grid-row: 1 / span 2;
  font-family: var(--serif); font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1; letter-spacing: -.02em; color: var(--forest);
  font-variant-numeric: lining-nums;
}
.metric-list .ml { font-size: var(--t-body); color: var(--soil); }
.metric-list .framing {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--t-tag); letter-spacing: .02em; color: var(--moss);
}
.metric-list .framing::before { content: ''; width: 12px; height: 1px; background: var(--moss); }
.metric-list .m-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.metric-list .m-meta .tag { font-size: 11px; padding: .3em .7em; }
.metric-list--tight { gap: .75rem; }
.metric-list--tight .mv { font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem); }

/* ---------------------------------------------------------------- ladder */
.ladder {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  counter-reset: none;
}
.ladder li {
  display: grid; gap: .5rem; align-content: start;
  padding-top: 1rem; border-top: 1px solid var(--hair);
}
.ladder .phase { font-size: var(--t-tag); letter-spacing: .08em; text-transform: uppercase; color: var(--moss); }
.ladder .lt { font-family: var(--serif); font-size: var(--t-serif-s); line-height: 1.25; color: var(--forest); }
.ladder p { font-size: var(--t-body); color: var(--soil); }

.case-quote {
  margin: 0;
  border-left: 2px solid var(--chart);
  padding-left: clamp(1rem, 2vw, 1.75rem);
  display: grid; gap: .6rem;
  max-width: 46rem;
}
.case-quote p {
  font-family: var(--serif);
  font-size: clamp(1.125rem, .95rem + .7vw, 1.5rem);
  line-height: 1.4; color: var(--forest);
}
.case-quote cite { font-style: normal; font-size: var(--t-ui); color: var(--stone); }

/* -------------------------------------------------------------- protocol */
.protocol .inner { display: grid; gap: 1.25rem; }
.protocol .h3 { max-width: 16ch; }
.protocol-grid {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}
.proto { display: grid; gap: .6rem; align-content: start; padding-top: 1.1rem; border-top: 1px solid var(--hair); }
.proto .n { font-family: var(--mark); font-weight: 700; font-size: var(--t-tag); letter-spacing: .12em; color: var(--moss); }
.proto p { font-size: var(--t-body); color: var(--soil); }

/* -------------------------------------------------------------- evidence */
.evidence .inner, .agreement .inner { display: grid; gap: 1.25rem; }
.evidence .h3, .agreement .h3 { max-width: 18ch; }
.evidence .lead, .agreement .lead { max-width: 52ch; }
.evidence-rows { margin-top: clamp(1.5rem, 3vw, 2.75rem); display: grid; gap: 0; }
.ev-row {
  display: grid; grid-template-columns: minmax(0, 22%) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--hair);
}
.ev-row:last-child { border-bottom: 1px solid var(--hair); }
.ev-head { display: grid; gap: .5rem; align-content: start; }
.ev-head .n { font-family: var(--mark); font-weight: 700; font-size: var(--t-tag); letter-spacing: .12em; color: var(--moss); }
.ev-stage {
  justify-self: start;
  font-family: var(--serif); font-size: var(--t-h5); line-height: 1.15;
  letter-spacing: -.02em; color: var(--forest);
}
.ev-body { display: grid; gap: .7rem; align-content: start; }
.ev-body .detail { font-size: var(--t-body); color: var(--soil); max-width: 52ch; }
.ev-body .meta { max-width: 52ch; }

/* ----------------------------------------------------------------- nodes */
.nodes {
  margin-top: clamp(1.5rem, 3vw, 2.75rem);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.nodes li {
  display: grid; gap: .5rem; align-content: start;
  padding-top: 1.6rem; position: relative;
  border-top: 1px solid var(--hair);
}
.nodes li::before {
  content: ''; position: absolute; top: -4.5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--chart); border: 1px solid var(--olive);
}
.nodes .n { font-family: var(--mark); font-weight: 700; font-size: var(--t-tag); letter-spacing: .12em; color: var(--moss); }
.nodes .nm { font-family: var(--serif); font-size: var(--t-serif-s); line-height: 1.2; color: var(--forest); }
.nodes p { font-size: var(--t-ui); color: var(--soil); }

/* --------------------------------------------------------- method rail */
.rail--method .card { width: clamp(270px, 34vw, 520px); }
.card-back .keep {
  display: grid; gap: .25rem;
  padding-top: .8rem; border-top: 1px solid var(--hair-soft);
  font-size: var(--t-ui);
}
.card-back .keep > span:first-child {
  font-size: var(--t-tag); letter-spacing: .08em; text-transform: uppercase; color: var(--moss);
}
.card-back .keep .keep-body { color: var(--soil); }
.rail--method .card-back { grid-template-rows: auto auto auto auto; row-gap: .85rem; }

@media (max-width: 1024px) {
  .case-top { grid-template-columns: minmax(0, 1fr); }
  .case--reverse .media { order: 0; }
  .protocol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ladder { grid-template-columns: minmax(0, 1fr); }
  .ev-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .protocol-grid, .nodes { grid-template-columns: minmax(0, 1fr); }
}
