/* EnviroCommand site styles. One family (Archivo, self hosted), square corners, forest fields, amber signal. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand */
  --forest: #1A3A2A;
  --forest-2: #234733;
  --forest-deep: #122A1E;
  --amber: #E09A47;
  --amber-deep: #C97D2E;
  --amber-ink: #A8621C;

  /* neutrals, tinted green */
  --paper: #FFFFFF;
  --ground: #F3F6F2;
  --ink: #0F2219;
  --ink-2: #3E5247;
  --ink-3: #62756A;
  --rule: #D5DED7;
  --rule-strong: #0F2219;

  /* on forest */
  --on-forest: #FFFFFF;
  --on-forest-2: #C9DCCF;
  --forest-line: rgba(201, 220, 207, 0.22);

  /* deadline states */
  --soon-bg: #FBE7CF;
  --soon-fg: #7A4410;
  --ok-bg: #E3EFE6;
  --ok-fg: #1F4A31;
  --filed-bg: #EEF0EE;
  --filed-fg: #4F5E55;

  /* type widths (Archivo wdth axis) */
  --w-display: 72%;
  --w-head: 78%;
  --w-ui: 90%;

  /* layout */
  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 40px);
  --gap: 24px;
  --mast-h: 64px;

  /* motion (Emil Kowalski curves) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* depth: offset, soft, tinted */
  --shadow-sheet: 0 28px 56px -28px rgba(6, 22, 14, 0.55), 0 2px 6px -2px rgba(6, 22, 14, 0.18);
  --shadow-lift: 0 10px 24px -14px rgba(6, 22, 14, 0.35);

  /* layers */
  --z-menu: 40;
  --z-mast: 50;

  --focus: var(--forest);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--mast-h) + 16px);
  scrollbar-color: var(--forest) var(--ground);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  caret-color: var(--forest);
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.on-dark { --focus: var(--amber); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--amber); color: var(--ink); padding: 10px 14px; font-weight: 700;
  transition: transform 160ms var(--ease-out);
}
.skip:focus { transform: translateY(60px); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.icon { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* ---------- type ---------- */
.h-display {
  font-weight: 800;
  font-stretch: var(--w-display);
  line-height: 0.93;
  letter-spacing: -0.012em;
  word-spacing: 0.1em;
  text-wrap: balance;
}
.h-section {
  font-size: clamp(2rem, 1.1rem + 3.2vw, 3.5rem);
  font-weight: 800;
  font-stretch: var(--w-head);
  line-height: 0.98;
  letter-spacing: -0.01em;
  word-spacing: 0.08em;
  text-wrap: balance;
}
.lede { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.5; max-width: 38ch; text-wrap: pretty; }
.body { max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-size: 1rem; font-weight: 700; font-stretch: var(--w-ui); letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap;
  border: 2px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn .icon { font-size: 1.05em; transition: transform 200ms var(--ease-out); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-forest { background: var(--forest); color: var(--on-forest); }
.btn-ghost { border-color: currentColor; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-amber:hover { background: #EAAB5E; }
  .btn-forest:hover { background: var(--forest-2); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
  .btn:hover .icon-go { transform: translate(2px, -2px); }
  .btn:hover .icon-next { transform: translateX(3px); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-stretch: var(--w-ui);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  min-height: 48px;
  transition: text-decoration-color 150ms ease;
}
.link-arrow .icon { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover { text-decoration-color: currentColor; }
  .link-arrow:hover .icon { transform: translateX(3px); }
}

/* ---------- bands: the recurring structural motif ---------- */
.bands { display: grid; gap: 3px; }
.bands i { display: block; background: var(--amber); }
.bands i:nth-child(1) { height: 8px; }
.bands i:nth-child(2) { height: 4px; }
.bands i:nth-child(3) { height: 2px; }
.bands-forest i { background: var(--forest); }
.js.motion .bands {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 900ms var(--ease-out);
}
.js.motion .bands.is-in { clip-path: inset(0 0 0 0); }
.js.motion .bands i:nth-child(2) { transition-delay: 60ms; }

/* ---------- masthead ---------- */
.mast {
  position: sticky; top: 0; z-index: var(--z-mast);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.mast.is-stuck { box-shadow: 0 8px 20px -18px rgba(6, 22, 14, 0.6); }
.mast-inner { display: flex; align-items: center; gap: 20px; height: var(--mast-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.28rem; font-weight: 800; font-stretch: 84%; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand b { font-weight: inherit; color: var(--amber-ink); }
.brand-mark { width: 28px; height: 28px; --mark-bg: var(--forest); --mark-band: var(--amber); }
.mk-bg { fill: var(--mark-bg); }
.mk-band { fill: var(--mark-band); }
.on-dark .brand-mark, .dia-hub .brand-mark { --mark-bg: #2E5A42; }
.sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 10px 12px;
  font-size: 0.9375rem; font-weight: 600; font-stretch: var(--w-ui);
  color: var(--ink-2); text-decoration: none;
  transition: color 150ms ease;
}
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.nav a.is-current, .nav a[aria-current="page"] { color: var(--ink); }
.nav a.is-current::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
}
.mast-cta { margin-left: 10px; }
.burger {
  display: none; margin-left: auto;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: var(--forest); color: var(--on-forest);
  transition: transform 160ms var(--ease-out);
}
.burger:active { transform: scale(0.95); }
.burger .icon { font-size: 22px; }
.burger .i-close { display: none; }
.burger[aria-expanded="true"] .i-open { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }

.menu {
  position: fixed; left: 0; right: 0; top: var(--mast-h); z-index: var(--z-menu);
  max-height: calc(100dvh - var(--mast-h)); overflow-y: auto;
  background: var(--forest); color: var(--on-forest);
  padding: 8px var(--pad) 24px;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 180ms var(--ease-out), visibility 0s linear 180ms;
}
.menu.is-open {
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path 280ms var(--ease-drawer), visibility 0s linear 0s;
}
.menu a:not(.btn) {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  font-size: 1.75rem; font-weight: 800; font-stretch: var(--w-head); line-height: 1.1;
  color: var(--on-forest); text-decoration: none;
  border-bottom: 1px solid var(--forest-line);
}
.menu a:not(.btn) .icon { font-size: 22px; color: var(--amber); }
.menu .btn { width: 100%; margin-top: 20px; }

@media (max-width: 960px) {
  .nav, .mast-cta { display: none; }
  .burger { display: inline-flex; }
}

/* ---------- sheets (white document surfaces) ---------- */
.sheet { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sheet); }
.sheet-note { font-size: 0.8125rem; color: var(--ink-3); }

/* status chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  font-size: 0.8125rem; font-weight: 700; font-stretch: var(--w-ui); line-height: 1.3;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; background: currentColor; flex: none; }
.chip.is-soon { background: var(--soon-bg); color: var(--soon-fg); }
.chip.is-ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.is-filed { background: var(--filed-bg); color: var(--filed-fg); }
.chip.is-filed::before { display: none; }
.chip .icon { font-size: 0.95em; }

/* segmented control: active segment revealed by clip-path over a duplicate layer */
.seg { position: relative; display: inline-flex; border: 1px solid var(--rule); background: var(--paper); max-width: 100%; }
.seg-btn, .seg-top span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 36px; padding: 0 12px;
  font-size: 0.8125rem; font-weight: 700; font-stretch: var(--w-ui); letter-spacing: 0.02em;
}
.seg-btn { color: var(--ink-2); -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .seg-btn:hover { color: var(--ink); background: var(--ground); } }
.seg-top {
  position: absolute; inset: 0; display: flex; pointer-events: none;
  background: var(--forest); color: var(--on-forest);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 260ms var(--ease-out);
}

/* ---------- hero ---------- */
.hero { position: relative; background: var(--forest); color: var(--on-forest); }
.hero > .bands { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  padding-top: clamp(40px, 6vw, 80px);
}
.hero-copy { grid-column: 1 / span 6; container-type: inline-size; padding-bottom: 56px; }
.hero-title { font-size: clamp(2.75rem, 15.2cqi, 5.5rem); }
.hero-title .line { display: block; }
.hero-lede { margin-top: 28px; color: var(--on-forest-2); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }
.hero-actions .link-arrow { color: var(--on-forest); }

.hero-sheet { grid-column: 7 / span 6; align-self: start; margin-bottom: -112px; position: relative; z-index: 2; }
.hero + section { padding-top: calc(112px + clamp(64px, 8vw, 112px)); }

.sched-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.sched-title { font-size: 1.0625rem; font-weight: 800; font-stretch: var(--w-ui); }
.sched-count { font-size: 0.875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-left: 8px; font-weight: 500; }
.sched-cols, .sched-row {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr) 118px;
  column-gap: 16px; padding: 0 20px;
}
.sched-cols {
  border-top: 2px solid var(--rule-strong); border-bottom: 1px solid var(--rule);
  padding-top: 9px; padding-bottom: 9px;
  font-size: 0.72rem; font-weight: 700; font-stretch: 84%; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3);
}
.sched-cols span:last-child { text-align: left; }
.sched-row { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); align-items: start; background: var(--paper); transition: opacity 220ms ease; }
.sched-row.is-muted { opacity: 0.32; }
.sched-row.is-muted .chip { filter: grayscale(1); }
.sched-site { font-weight: 700; font-size: 0.9375rem; line-height: 1.3; }
.sched-where { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.35; }
.sched-req { font-size: 0.9375rem; line-height: 1.3; color: var(--ink-2); }
.sched-agency { font-size: 0.8125rem; font-weight: 700; color: var(--ink); letter-spacing: 0.01em; }
.sched-due { display: grid; justify-items: start; gap: 4px; }
.sched-date { font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sched-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px 16px; }

/* hero load choreography: type sets, sheet rises, rows print */
.js.motion .hero-title .line { overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.js.motion .hero-title .line > span { display: block; animation: set-line 760ms var(--ease-out) both; animation-delay: calc(140ms + var(--i) * 90ms); }
.js.motion .hero-lede, .js.motion .hero-actions { animation: rise 640ms var(--ease-out) both; animation-delay: 430ms; }
.js.motion .hero-actions { animation-delay: 500ms; }
.js.motion .hero-sheet { animation: rise-sheet 820ms var(--ease-out) both; animation-delay: 260ms; }
.js.motion .sched:not(.is-printed) .sched-row { animation: print 360ms var(--ease-out) both; animation-delay: calc(640ms + var(--i) * 55ms); }

@keyframes set-line { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise-sheet { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes print { from { clip-path: inset(0 0 100% 0); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

@media (max-width: 1079px) {
  .hero-copy { grid-column: 1 / -1; padding-bottom: 40px; }
  .hero-title { font-size: clamp(2.75rem, 15.5cqi, 5.5rem); }
  .hero-sheet { grid-column: 1 / -1; margin-bottom: -64px; }
  .hero + section { padding-top: calc(64px + clamp(56px, 8vw, 96px)); }
}
@media (max-width: 640px) {
  .hero-actions .btn { width: 100%; }
  .sched-head { padding: 16px 14px 12px; }
  .sched-cols { display: none; }
  .sched-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "site due" "req req";
    row-gap: 6px; padding: 12px 14px;
  }
  .sched-row > :nth-child(1) { grid-area: site; }
  .sched-row > :nth-child(2) { grid-area: req; }
  .sched-row > :nth-child(3) { grid-area: due; justify-items: end; }
  .sched-head .seg { width: 100%; }
  .sched-head .seg-btn, .sched-head .seg-top span { flex: 1 1 0; min-width: 0; padding: 0 4px; }
  .sched-foot { padding: 12px 14px 14px; flex-direction: column; gap: 2px; }
}

/* ---------- sections shared ---------- */
.sec { padding: clamp(72px, 9vw, 128px) 0; }
.sec-head { display: grid; gap: 18px; max-width: 760px; }
.sec-head .body { color: var(--ink-2); }
.on-dark .sec-head .body { color: var(--on-forest-2); }
.is-forest { background: var(--forest); color: var(--on-forest); }
.is-ground { background: var(--ground); }

/* ---------- plugs into your stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gap); align-items: center; }
.stack-copy { grid-column: 1 / span 5; }
.stack-copy .body { margin-top: 20px; color: var(--ink-2); }
.stack-diagram { grid-column: 6 / span 7; }
.dia { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.dia-col { display: grid; gap: 14px; }
.dia-node { position: relative; border: 1px solid var(--rule); background: var(--paper); padding: 12px 14px; }
.dia-node strong { display: block; font-weight: 700; font-size: 0.9375rem; line-height: 1.3; }
.dia-node span { display: block; font-size: 0.8125rem; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.dia-node::after { content: ""; position: absolute; top: 50%; width: 28px; border-top: 2px solid var(--forest); }
.dia-col.is-left .dia-node::after { right: -29px; }
.dia-col.is-right .dia-node::after { left: -29px; }
.dia-node.is-roadmap { border-style: dashed; border-color: #A9B6AD; }
.dia-node.is-roadmap::after { border-top-style: dashed; border-top-color: #8FA296; }
.dia-hub {
  margin: 0 28px; background: var(--forest); color: var(--on-forest);
  padding: 20px 16px; text-align: center; position: relative;
}
.dia-hub .brand-mark { width: 32px; height: 32px; margin: 0 auto 10px; }
.dia-hub strong { display: block; font-weight: 800; font-stretch: 80%; font-size: 1.125rem; line-height: 1.1; white-space: nowrap; }
.dia-hub span { display: block; font-size: 0.8125rem; color: var(--on-forest-2); margin-top: 4px; }
.dia-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-size: 0.8125rem; color: var(--ink-3); }
.dia-legend span { display: inline-flex; align-items: center; gap: 8px; }
.dia-legend i { width: 24px; border-top: 2px solid var(--forest); display: inline-block; }
.dia-legend i.is-dashed { border-top-style: dashed; border-top-color: #8FA296; }

@media (max-width: 1079px) {
  .stack-copy, .stack-diagram { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .dia { grid-template-columns: 1fr; gap: 0; padding-left: 18px; border-left: 2px solid var(--forest); }
  .dia-hub { margin: 0 0 14px; order: -1; text-align: left; display: flex; align-items: center; gap: 12px; }
  .dia-hub .brand-mark { margin: 0; }
  .dia-col { gap: 10px; }
  .dia-col.is-left { margin-bottom: 10px; }
  .dia-node::after, .dia-col.is-left .dia-node::after, .dia-col.is-right .dia-node::after { left: -20px; right: auto; width: 18px; }
  .dia-hub::after { content: ""; position: absolute; left: -20px; top: 50%; width: 18px; border-top: 2px solid var(--forest); }
}

/* ---------- product tour ---------- */
.tour-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; }
.tabs-wrap { margin-top: 44px; border-bottom: 1px solid var(--forest-line); }
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 20px 18px;
  font-size: 1rem; font-weight: 700; font-stretch: var(--w-ui);
  color: var(--on-forest-2);
  transition: color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.tab .icon { font-size: 18px; opacity: 0.75; }
.tab[aria-selected="true"] { color: var(--on-forest); }
.tab[aria-selected="true"] .icon { opacity: 1; color: var(--amber); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--on-forest); } }
.t-short { display: none; }
.tab-bar {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
}
.tab[aria-selected="true"] .tab-bar { transform: scaleX(1); }
[data-tour].is-auto .tab[aria-selected="true"] .tab-bar { transform: scaleX(0); }
.tour-hint { margin-top: 14px; font-size: 0.875rem; color: var(--on-forest-2); min-height: 1.5em; }

.panels { display: grid; margin-top: 40px; }
.panel {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gap); align-items: start;
  opacity: 0; visibility: hidden; filter: blur(2px);
  transition: opacity 200ms ease, filter 200ms ease, visibility 0s linear 200ms;
}
.panel.is-active { opacity: 1; visibility: visible; filter: none; transition: opacity 240ms ease, filter 240ms ease, visibility 0s linear 0s; }
.panel-copy { grid-column: 1 / span 4; }
.panel-copy h3 { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.25rem); font-weight: 800; font-stretch: var(--w-head); line-height: 1.02; word-spacing: 0.08em; text-wrap: balance; }
.panel-copy p { margin-top: 16px; color: var(--on-forest-2); max-width: 40ch; }
.panel-copy ul { margin-top: 20px; display: grid; gap: 10px; }
.panel-copy li { display: flex; gap: 10px; align-items: baseline; font-size: 0.9375rem; color: var(--on-forest); }
.panel-copy li .icon { color: var(--amber); transform: translateY(2px); }
.panel-copy .link-arrow { margin-top: 12px; color: var(--on-forest); }
.panel-view { grid-column: 5 / span 8; }
.view { padding: 22px 24px; }
.view-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding-bottom: 14px; border-bottom: 2px solid var(--rule-strong); }
.view-title { font-weight: 800; font-stretch: var(--w-ui); font-size: 1.0625rem; line-height: 1.25; }
.view-meta { font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.view-sample { margin-top: 14px; font-size: 0.75rem; color: var(--ink-3); }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.vrow-t { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.vrow-m { font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row-r { display: grid; justify-items: end; gap: 4px; }
.vamt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.9375rem; text-align: right; }

/* phase track */
.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 18px 0 6px; }
.phase { display: grid; gap: 8px; }
.phase i { display: block; height: 8px; background: var(--rule); }
.phase.is-done i { background: var(--forest); }
.phase.is-now i { background: var(--amber); }
.phase span { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); line-height: 1.25; }
.phase.is-done span, .phase.is-now span { color: var(--ink); }
.rule-src { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--forest); background: var(--ok-bg); padding: 2px 6px; margin-top: 4px; }
.loaded { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px; background: var(--ground); font-size: 0.875rem; color: var(--ink-2); }
.loaded .icon { color: var(--forest); font-size: 18px; }

/* white-label mini portal (tour + client portal page) */
.wl { --brand: #1E5A3C; }
.wl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--brand); color: #fff; }
.wl-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wl-mark { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,0.18); font-weight: 800; font-size: 0.9375rem; }
.wl-name { font-weight: 700; font-size: 0.9375rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: filter 140ms ease, opacity 140ms ease; }
.wl-dom { font-size: 0.75rem; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: filter 140ms ease, opacity 140ms ease; }
.wl.is-swapping .wl-name, .wl.is-swapping .wl-dom, .wl.is-swapping .wl-mark { filter: blur(2px); opacity: 0.4; }
.wl-text { min-width: 0; }
.wl-note { padding: 0 16px 14px; }
.close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.close-actions .link-arrow { color: var(--ink); }
.wl-client { font-size: 0.8125rem; flex: none; opacity: 0.9; white-space: nowrap; }
.wl-body { padding: 18px 16px 8px; }
.wl-prog { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--ink-2); margin: 14px 0 8px; font-variant-numeric: tabular-nums; }
.wl-track { height: 8px; background: var(--ground); }
.wl-fill { height: 100%; width: 68%; background: var(--brand); transition: background-color 240ms ease; }

/* field capture card */
.field { max-width: 360px; margin: 0 auto; border: 1px solid var(--rule); }
.field-top { padding: 12px 14px; background: var(--ground); display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; font-weight: 700; }
.field dl { display: grid; grid-template-columns: auto 1fr; }
.field dt, .field dd { padding: 10px 14px; border-top: 1px solid var(--rule); font-size: 0.875rem; }
.field dt { color: var(--ink-3); }
.field dd { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.field-sync { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--ok-fg); background: var(--ok-bg); font-weight: 700; }

@media (max-width: 1079px) {
  .panel-copy, .panel-view { grid-column: 1 / -1; }
  .panel { gap: 24px; }
}
@media (max-width: 640px) {
  .tabs-wrap { border-bottom: 0; margin-top: 32px; }
  .tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; gap: 6px; }
  .tab { grid-column: span 3; justify-content: center; padding: 12px 6px 14px; font-size: 0.9375rem; background: rgba(255, 255, 255, 0.06); }
  .tab .icon { display: none; }
  .t-full { display: none; }
  .t-short { display: inline; }
  .panel-copy ul { display: none; }
  .tab[aria-selected="true"] { background: var(--forest-2); }
  .tab .tab-bar { bottom: 0; }
  .view { padding: 16px 14px; min-height: 0; }
  .phases { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .phase span { font-size: 0.6875rem; }
  .vrow.is-stack { grid-template-columns: minmax(0, 1fr); }
  .vrow.is-stack > :last-child { justify-self: start; }
  .vamt { text-align: left; }
  .row-r { justify-items: start; grid-auto-flow: column; align-items: center; gap: 10px; }
}

/* ---------- getting started ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); margin-top: 56px; border-top: 2px solid var(--rule-strong); }
.step { position: relative; padding: 32px 24px 0 0; }
.step::before { content: ""; position: absolute; top: -9px; left: 0; width: 16px; height: 16px; background: var(--forest); }
.step:first-child::before { background: var(--amber); }
.step h3 { font-size: 1.5rem; font-weight: 800; font-stretch: var(--w-head); line-height: 1.05; word-spacing: 0.08em; }
.step p { margin-top: 12px; color: var(--ink-2); max-width: 34ch; }
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--rule-strong); margin-top: 40px; }
  .step { padding: 0 0 36px 28px; }
  .step:last-child { padding-bottom: 0; }
  .step::before { top: 4px; left: -9px; }
}

/* ---------- founder ---------- */
.founder-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gap); align-items: center; }
.founder-photo { grid-column: 1 / span 5; max-width: 440px; margin: 0; }
.founder-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #fff; border-bottom: 10px solid var(--forest); }
.founder-photo .bands { margin-top: 3px; }
.founder-copy { grid-column: 7 / span 6; }
.quote { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem); font-weight: 700; font-stretch: 86%; line-height: 1.2; letter-spacing: 0; word-spacing: 0.06em; text-wrap: balance; }
.quote-by { margin-top: 28px; display: grid; gap: 2px; }
.quote-by strong { font-weight: 800; font-size: 1.0625rem; }
.quote-by span { color: var(--ink-3); font-size: 0.9375rem; }
.contact { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 24px; }
.contact a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; font-stretch: var(--w-ui); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 2px; transition: text-decoration-color 150ms ease; }
.contact .icon { color: var(--forest); font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .contact a:hover { text-decoration-color: var(--amber); } }
@media (max-width: 900px) {
  .founder-photo { grid-column: 1 / -1; max-width: 320px; }
  .founder-copy { grid-column: 1 / -1; }
}

/* ---------- pricing: a fee schedule ---------- */
.fees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 2px solid var(--rule-strong); }
.tier { display: grid; grid-template-rows: subgrid; grid-row: span 4; padding: 28px 24px 28px; border-right: 1px solid var(--rule); }
.tier:last-child { border-right: 0; }
.tier.is-pick { background: var(--forest); color: var(--on-forest); border-right: 0; position: relative; }
.tier.is-pick::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 6px; background: var(--amber); }
.tier-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tier-name h3 { font-size: 1.5rem; font-weight: 800; font-stretch: var(--w-head); word-spacing: 0.08em; }
.tier-flag { font-size: 0.8125rem; font-weight: 700; color: var(--amber); }
.tier-price { margin-top: 18px; }
.tier-price .amt-roll { display: grid; overflow: hidden; padding: 0.07em 0; margin: -0.07em 0; font-size: clamp(3rem, 2.2rem + 2vw, 4rem); line-height: 1; }
.tier-price .amt { grid-area: 1 / 1; font-size: inherit; font-weight: 800; font-stretch: 74%; word-spacing: 0.08em; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tier-price .per { display: block; margin-top: 6px; font-size: 0.9375rem; color: var(--ink-3); }
.tier.is-pick .tier-price .per { color: var(--on-forest-2); }
.tier-found { margin-top: 14px; padding: 10px 12px; background: var(--ground); font-size: 0.9375rem; line-height: 1.35; }
.tier-found strong { font-variant-numeric: tabular-nums; color: #9A5B17; }
.tier.is-pick .tier-found { background: var(--forest-2); }
.tier.is-pick .tier-found strong { color: #ECB26A; }
.tier-list { margin-top: 24px; display: grid; gap: 0; align-content: start; }
.tier-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.35; }
.tier.is-pick .tier-list li { border-top-color: var(--forest-line); }
.tier-list .icon { font-size: 16px; margin-top: 2px; color: var(--forest); }
.tier.is-pick .tier-list .icon { color: var(--amber); }
.tier-list li.is-out { color: var(--ink-3); }
.tier-list li.is-out .icon { color: var(--rule); }
.tier.is-pick .tier-list li.is-out { color: #9DB8A6; }
.tier.is-pick .tier-list li.is-out .icon { color: #5E7F6B; }
.fees-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.fees-foot p { color: var(--ink-2); max-width: 56ch; }
@media (max-width: 900px) {
  .fees { grid-template-columns: 1fr; border-top: 0; gap: 16px; }
  .tier { grid-row: auto; grid-template-rows: none; border: 1px solid var(--rule); }
  .tier.is-pick { border-color: var(--forest); }
  .tier-list li.is-out { display: none; }
}

/* ---------- close: drenched amber ---------- */
.close { background: var(--amber); color: var(--ink); }
.close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gap); align-items: end; }
.close-copy { grid-column: 1 / span 6; }
.close-copy .body { margin-top: 20px; color: #3B2A12; }
.close-form { grid-column: 8 / span 5; }
.close .h-section { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem); }
.field-label { display: block; font-weight: 700; font-size: 0.9375rem; margin-bottom: 8px; }
.input-row { display: flex; gap: 0; }
.input {
  flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 14px;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-right: 0; border-radius: 0;
  font-size: 1rem; -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #6B6152; }
.input:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.input[aria-invalid="true"] { border-color: #5E140B; }
.close-form .btn { min-height: 52px; border-radius: 0; }
.form-help { margin-top: 10px; font-size: 0.875rem; color: #3B2A12; }
.form-msg { margin-top: 12px; font-size: 0.9375rem; font-weight: 600; min-height: 1.4em; }
.form-msg.is-error { color: #5E140B; }
.form-done { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--forest); color: var(--on-forest); }
.form-done .icon { color: var(--amber); font-size: 22px; margin-top: 1px; }
.form-done strong { display: block; font-size: 1.0625rem; }
.form-done span { color: var(--on-forest-2); font-size: 0.9375rem; }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.close-alt { margin-top: 18px; font-size: 0.9375rem; }
.close-alt a { font-weight: 700; }
.hp { display: none; }
@media (max-width: 900px) {
  .close-copy, .close-form { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .input-row { flex-direction: column; gap: 10px; }
  .input { border-right: 2px solid var(--ink); }
  .close-form .btn { width: 100%; }
}

/* ---------- footer ---------- */
.foot { background: var(--forest-deep); color: var(--on-forest-2); }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gap); padding: 64px 0 40px; }
.foot-brand { grid-column: 1 / span 5; }
.foot-brand .brand { color: var(--on-forest); }
.foot-brand .brand b { color: var(--amber); }
.foot-brand p { margin-top: 14px; max-width: 34ch; font-size: 0.9375rem; }
.foot-col { grid-column: span 2; }
.foot-col:last-child { grid-column: span 3; }
.foot-col h2 { font-size: 0.8125rem; font-weight: 700; font-stretch: 84%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.foot-col a { display: block; padding: 6px 0; color: var(--on-forest); text-decoration: none; font-size: 0.9375rem; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .foot-col a:hover { text-decoration: underline; } }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 0 32px; border-top: 1px solid var(--forest-line); font-size: 0.8125rem; }
@media (max-width: 900px) {
  .foot-brand { grid-column: 1 / -1; }
  .foot-col, .foot-col:last-child { grid-column: span 4; }
}
@media (max-width: 560px) {
  .foot-col, .foot-col:last-child { grid-column: span 6; }
  .foot-col:last-child { grid-column: 1 / -1; }
}

/* ---------- client portal page ---------- */
.cp-hero-copy { grid-column: 1 / span 6; container-type: inline-size; padding-bottom: 56px; }
.cp-title { font-size: clamp(2.5rem, 11.4cqi, 4.75rem); }
@media (max-width: 1079px) { .cp-title { font-size: clamp(2.5rem, 12.5cqi, 4.75rem); } }
.cp-sheet { grid-column: 7 / span 6; align-self: start; margin-bottom: -112px; position: relative; z-index: 2; }
.wl-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border-top: 1px solid var(--rule); }
.wl-switch-label { font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--sw); color: #fff; border: 2px solid transparent; outline-offset: 2px;
  transition: transform 160ms var(--ease-out);
}
.swatch:active { transform: scale(0.94); }
.swatch .icon { font-size: 16px; opacity: 0; transition: opacity 150ms ease; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.swatch[aria-pressed="true"] .icon { opacity: 1; }
.tl { display: grid; gap: 0; margin-top: 14px; }
.tl li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--rule); }
.tl-dot { width: 14px; height: 14px; margin-top: 3px; border: 2px solid var(--rule); background: #fff; }
.tl li.is-done .tl-dot { background: var(--brand, var(--forest)); border-color: var(--brand, var(--forest)); transition: background-color 240ms ease, border-color 240ms ease; }
.tl li.is-now .tl-dot { background: var(--amber); border-color: var(--amber); }
.tl-t { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.tl-m { font-size: 0.8125rem; color: var(--ink-3); }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
.doc-row > span:not(.fig-key) { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.doc-row .icon { color: var(--ink-3); font-size: 18px; }

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--gap); margin-top: 56px; }
.group h3 { font-size: 1.5rem; font-weight: 800; font-stretch: var(--w-head); line-height: 1.05; padding-bottom: 14px; border-bottom: 2px solid var(--rule-strong); }
.group dl { display: grid; }
.group dt { margin-top: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.group dt .icon { color: var(--forest); font-size: 20px; }
.group dd { margin-top: 6px; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 900px) { .groups { grid-template-columns: 1fr; gap: 40px; } }

.cmp { margin-top: 48px; background: var(--forest-2); }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.cmp-row + .cmp-row { border-top: 1px solid var(--forest-line); }
.cmp-cell { padding: 16px 20px; display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; }
.cmp-cell + .cmp-cell { border-left: 1px solid var(--forest-line); }
.cmp-head .cmp-cell { font-size: 0.75rem; font-weight: 700; font-stretch: 84%; letter-spacing: 0.07em; text-transform: uppercase; color: var(--on-forest-2); }
.cmp-head .cmp-new { color: #ECB26A; }
.cmp-lbl { font-weight: 700; }
.cmp-old { color: var(--on-forest-2); }
.cmp-old .icon { color: #E5968A; font-size: 16px; }
.cmp-new .icon { color: var(--amber); font-size: 16px; }
.cmp-tag { display: none; }
@media (max-width: 720px) {
  .cmp-head { display: none; }
  .cmp-row { grid-template-columns: 1fr; padding: 6px 0; }
  .cmp-cell { padding: 8px 16px; }
  .cmp-cell + .cmp-cell { border-left: 0; }
  .cmp-lbl { padding-top: 14px; }
  .cmp-tag { display: inline; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; min-width: 7.5em; color: var(--on-forest-2); }
  .cmp-new .cmp-tag { color: #ECB26A; }
}

.faq { margin-top: 48px; border-top: 2px solid var(--rule-strong); }
.faq-item { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px var(--gap); padding: 28px 0; border-bottom: 1px solid var(--rule); }
.faq-item h3 { grid-column: 1 / span 5; font-size: 1.25rem; font-weight: 800; font-stretch: 84%; line-height: 1.15; word-spacing: 0.05em; text-wrap: balance; }
.faq-item p { grid-column: 6 / span 7; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 800px) {
  .faq-item h3, .faq-item p { grid-column: 1 / -1; }
}

@media (max-width: 1079px) {
  .cp-hero-copy, .cp-sheet { grid-column: 1 / -1; }
  .cp-hero-copy { padding-bottom: 40px; }
  .cp-sheet { margin-bottom: -64px; }
}

/* ---------- reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .bands { clip-path: none !important; }
  .btn:active, .burger:active, .swatch:active { transform: none; }
  .menu, .menu.is-open { transition: visibility 0s; clip-path: none; }
  .menu:not(.is-open) { visibility: hidden; }
  .seg-top { transition: none; }
  .panel, .panel.is-active { filter: none; transition: opacity 150ms ease, visibility 0s; }
}

@media (max-width: 480px) {
  .wl-bar { flex-wrap: wrap; }
  .wl-name, .wl-dom { white-space: normal; overflow: visible; }
  .wl-client { width: 100%; padding-left: 40px; }
}

/* bands as section seams */
.sec, .foot { position: relative; }
.sec > .bands, .foot > .bands { position: absolute; top: 0; left: 0; right: 0; }
.close > .bands i { background: var(--forest); }
.foot > .bands { top: 6px; }

/* figure keys: callouts that tie the portal preview to its legend */
.fig-key {
  position: absolute; right: -11px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--amber); color: var(--ink);
  font-size: 0.75rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1;
  box-shadow: var(--shadow-lift);
}
.wl-bar, .wl-prog, .doc-row { position: relative; }
.wl-prog .fig-key, .doc-row .fig-key { right: -27px; }
.legend { margin-top: 48px; border-top: 2px solid var(--rule-strong); }
.legend-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px var(--gap); padding: 20px 0; border-bottom: 1px solid var(--rule); }
.legend-row dt { grid-column: 1 / span 5; display: flex; align-items: center; gap: 14px; font-weight: 800; font-stretch: 86%; font-size: 1.25rem; line-height: 1.2; word-spacing: 0.05em; }
.legend-row dd { grid-column: 6 / span 7; color: var(--ink-2); max-width: 60ch; }
.key { flex: none; width: 26px; height: 26px; display: grid; place-items: center; background: var(--amber); color: var(--ink); font-size: 0.8125rem; font-weight: 800; }
.key.is-open { visibility: hidden; }
.legend-note { margin-top: 16px; font-size: 0.875rem; color: var(--ink-3); }
@media (max-width: 800px) {
  .legend-row dt, .legend-row dd { grid-column: 1 / -1; }
  .legend-row dd { padding-left: 40px; }
}

/* =====================================================================
   Experience layer: map story, rules builder, micro-interactions.
   Everything below degrades to a readable, static page.
   ===================================================================== */

/* smooth wheel scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* masthead reading progress, driven by the scroll position itself */
@supports (animation-timeline: scroll()) {
  .mast::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--amber); transform-origin: left; transform: scaleX(0);
    animation: mast-progress linear both; animation-timeline: scroll(root);
  }
  @keyframes mast-progress { to { transform: scaleX(1); } }
}

/* hero sheet leans toward the pointer */
.hero-sheet { perspective: 1600px; }
.sheet-tilt { transform-origin: 50% 40%; }

/* ---------- map story ---------- */
.story { position: relative; background: var(--paper); padding-bottom: clamp(32px, 5vw, 72px); }
.story-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  align-items: center;
}
.story-copy { grid-column: 1 / span 4; }
.story-steps { display: grid; }
.story .h-section { font-size: clamp(2rem, 1.2rem + 2.2vw, 3.25rem); }
.story-step .body { margin-top: 18px; color: var(--ink-2); max-width: 36ch; }
.story-hint { margin-top: 18px; font-size: 0.875rem; color: var(--ink-3); display: flex; gap: 10px; align-items: baseline; }
.story-hint::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--amber); transform: translateY(-1px); }
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-fine { display: none; } .hint-touch { display: inline; } }
.story-step .link-arrow { margin-top: 12px; }

.story-stage {
  grid-column: 5 / span 8; position: relative; min-height: 0; overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
}
/* drawing sheet: inner border and zone ticks in the margin, like a plan set */
.story-stage::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--rule); pointer-events: none; }
.story-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 120px) left top / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 120px) left bottom / 100% 12px no-repeat;
}
/* the drawing is clipped to the inner border */
.story-canvas, .story-poster { position: absolute; inset: 13px; width: calc(100% - 26px); height: calc(100% - 26px); display: block; }
.story-canvas { opacity: 0; transition: opacity 400ms ease; touch-action: pan-y; }
.story.is-live .story-canvas { opacity: 1; }
.story-poster { object-fit: contain; opacity: 0; transition: opacity 300ms ease; }
.story-poster.is-on { opacity: 1; }
.story.is-live .story-poster { display: none; }

/* labels projected from the scene */
.story-labels { position: absolute; inset: 13px; pointer-events: none; overflow: hidden; }
.story-labels > div {
  position: absolute; left: 0; top: 0; opacity: 0; visibility: hidden;
  white-space: nowrap; will-change: transform, opacity; font-stretch: var(--w-ui); line-height: 1.2;
}
.st-label { translate: -50% -50%; display: grid; justify-items: center; padding: 3px 7px 4px; background: var(--forest); color: #fff; }
.st-label b { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.04em; }
.st-label span { font-size: 0.6875rem; font-weight: 600; color: var(--on-forest-2); }
.site-label { translate: -50% calc(-100% - 10px); display: grid; justify-items: center; padding: 4px 8px; background: var(--paper); border: 1px solid var(--ink); }
.site-label::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--lead, 9px); background: var(--ink); transform-origin: 50% 0; transform: rotate(var(--la, 0deg)); }
.st-label.is-east { translate: 14px -50%; }
.st-label.is-east::before { content: ""; position: absolute; right: 100%; top: 50%; width: 14px; height: 1px; background: var(--forest); }
.st-label.is-east.is-west { translate: calc(-100% - 14px) -50%; }
.st-label.is-east.is-west::before { right: auto; left: 100%; }
.axis-label.is-end { translate: calc(-100% - 4px) -100%; }
.axis-label { translate: 4px -100%; font-size: 0.6875rem; font-weight: 700; font-stretch: 84%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.site-label b { font-size: 0.75rem; font-weight: 700; }
.site-label span { font-size: 0.6875rem; font-weight: 700; color: var(--soon-fg); font-variant-numeric: tabular-nums; }
.row-label { translate: -100% -50%; font-size: 0.8125rem; text-align: right; }
.row-label b { font-weight: 700; color: var(--ink); }
.row-label span { margin-left: 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink-3); }
.day-label { translate: 0 -50%; padding: 0 3px; background: var(--paper); font-size: 0.75rem; font-weight: 700; color: var(--ok-fg); font-variant-numeric: tabular-nums; }
.day-label.is-soon { color: var(--soon-fg); }
.day-label.is-filed { color: var(--filed-fg); }
.north { display: grid; justify-items: center; gap: 1px; color: var(--ink); }
.north svg { transform-origin: 12px 17px; }
.north b { position: absolute; top: 36px; left: 50%; translate: -50% 0; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.04em; }
.row-more { translate: -100% -50%; font-size: 0.75rem; color: var(--ink-3); }

.story-tip {
  position: absolute; left: 0; top: 0; z-index: 3; width: max-content; max-width: 250px;
  display: grid; gap: 2px; padding: 10px 12px 11px;
  background: var(--paper); border-top: 3px solid var(--amber); box-shadow: var(--shadow-sheet);
  font-size: 0.8125rem; line-height: 1.35; color: var(--ink-2); pointer-events: none;
}
.story-tip b { font-size: 0.9375rem; color: var(--ink); font-stretch: var(--w-ui); }
.tip-due { justify-self: start; margin-top: 6px; padding: 2px 6px; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip-due.is-soon { background: var(--soon-bg); color: var(--soon-fg); }
.tip-due.is-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tip-due.is-filed { background: var(--filed-bg); color: var(--filed-fg); }

/* title block, as on a drawing sheet: also the view switcher */
.titleblock {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: grid; background: var(--paper);
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
}
.tb-meta { display: flex; font-size: 0.6875rem; font-weight: 700; font-stretch: 84%; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.tb-meta span { padding: 6px 10px; }
.tb-meta span + span { border-left: 1px solid var(--rule); }
.tb-views { display: grid; grid-template-columns: repeat(3, auto); border-top: 1px solid var(--rule); }
.tb-views button {
  min-height: 40px; padding: 0 14px;
  font-size: 0.8125rem; font-weight: 700; font-stretch: var(--w-ui); color: var(--ink-2);
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tb-views button + button { border-left: 1px solid var(--rule); }
.tb-views button[aria-pressed="true"] { background: var(--forest); color: var(--on-forest); }
.tb-views button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .tb-views button:not([aria-pressed="true"]):hover { background: var(--ground); color: var(--ink); } }
html:not(.js) .tb-views { display: none; }
.story-poster:not([src]) { visibility: hidden; }
.tb-rule { height: 3px; background: var(--amber); transform-origin: left; transform: scaleX(0); }
.tb-views button:focus-visible { outline-offset: -3px; }

/* pinned: copy crossfades, the drawing fills the frame */
.story.is-pinned .story-pin { height: calc(100svh - var(--mast-h)); }
.story.is-pinned .story-grid { height: 100%; padding-top: clamp(16px, 3vh, 32px); padding-bottom: clamp(16px, 3vh, 32px); }
.story.is-pinned .story-stage { height: 100%; }
.story.is-pinned .story-step {
  grid-area: 1 / 1; opacity: 0; transform: translateY(14px); filter: blur(4px); pointer-events: none;
  transition: opacity 260ms ease, transform 420ms var(--ease-out), filter 260ms ease;
}
.story.is-pinned .story-step.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }

/* static (reduced motion, short screens, or no GSAP): steps read as a list */
.story.is-static .story-grid { align-items: start; }
.story.is-static .story-steps { gap: 36px; }
.story.is-static .story-stage { position: sticky; top: calc(var(--mast-h) + 24px); aspect-ratio: 6 / 5; }

@media (max-width: 899px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .story-copy, .story-stage { grid-column: 1 / -1; }
  .story .h-section { font-size: clamp(1.75rem, 1.1rem + 3.4vw, 2.5rem); }
  .story-step .body { margin-top: 12px; font-size: 1rem; }
  .story-hint { margin-top: 10px; }
  .story-step .link-arrow { margin-top: 4px; min-height: 44px; }
  .story.is-pinned .story-grid { grid-template-rows: auto minmax(0, 1fr); align-items: stretch; }
  .story.is-pinned .story-copy { align-self: start; }
  .story.is-static .story-stage { position: relative; top: auto; aspect-ratio: 4 / 3.3; order: -1; }
  .story.is-static .story-steps { gap: 28px; }
  .site-label b { font-size: 0.6875rem; }
  .st-label { padding: 2px 5px; }
  .st-label b { font-size: 0.75rem; }
  .st-label span { display: none; }
  .row-label { font-size: 0.6875rem; }
  .row-label span { display: none; }
  .tb-meta { display: none; }
  .tb-views button { min-height: 44px; padding: 0 12px; }
}

/* ---------- rules builder ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gap); align-items: start; }
.rules-copy { grid-column: 1 / span 5; }
.rules-copy .body { margin-top: 20px; color: var(--ink-2); max-width: 40ch; }
.rules-ctl { margin-top: 36px; display: grid; justify-items: start; }
.ctl-label { font-size: 0.75rem; font-weight: 700; font-stretch: 84%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.ctl-label ~ .ctl-label { margin-top: 22px; }
.seg-wide .seg-btn, .seg-wide .seg-top span { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
.rules-out { grid-column: 7 / span 6; }
.rules-list .vrow:last-child { border-bottom: 0; }
.rules-sheet { overflow: hidden; }
.rules-sheet .loaded { margin-top: 14px; margin-bottom: 4px; }
[data-rules-count] { display: inline-block; min-width: 1ch; font-variant-numeric: tabular-nums; }
@media (max-width: 1079px) {
  .rules-copy, .rules-out { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .rules-ctl { justify-items: stretch; }
  .seg-wide, .seg-wide .seg-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-wide[data-key="st"], .seg-wide[data-key="st"] .seg-top { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .seg-wide .seg-btn, .seg-wide .seg-top span { padding: 0 6px; }
}

/* ---------- stack diagram: packets move while it is on screen ---------- */
.dia-node:not(.is-roadmap)::before {
  content: ""; position: absolute; top: calc(50% - 2px); width: 7px; height: 6px;
  background: var(--amber); opacity: 0; pointer-events: none;
}
.dia-col.is-left .dia-node::before { left: calc(100% + 1px); --pk-from: 21px; --pk-to: 0px; }
.dia-col.is-right .dia-node::before { left: -29px; --pk-from: 0px; --pk-to: 21px; }
.dia.is-flowing .dia-node:not(.is-roadmap)::before { animation: packet 2.4s var(--ease-in-out) infinite; }
.dia.is-flowing .dia-col.is-right .dia-node:first-child::before { animation-delay: 0.8s; }
.dia.is-flowing .dia-col.is-right .dia-node:nth-child(2)::before { animation-delay: 1.6s; }
@keyframes packet {
  0% { transform: translateX(var(--pk-from)); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translateX(var(--pk-to)); opacity: 1; }
  68%, 100% { transform: translateX(var(--pk-to)); opacity: 0; }
}
@media (max-width: 640px) {
  .dia-col.is-left .dia-node::before, .dia-col.is-right .dia-node::before { left: -20px; --pk-from: 0px; --pk-to: 11px; }
}

/* ---------- getting started: the rule fills as you read ---------- */
.steps { position: relative; }
.steps.is-scrubbed { border-top-color: var(--rule); }
.steps.is-scrubbed::after {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
  background: var(--rule-strong); transform-origin: left; transform: scaleX(var(--fill, 0));
}
.steps.is-scrubbed .step::before { background: var(--paper); box-shadow: inset 0 0 0 2px var(--rule-strong); transition: background-color 200ms ease, box-shadow 200ms ease; z-index: 1; }
.steps.is-scrubbed .step.is-on::before { background: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); }
@media (max-width: 800px) {
  .steps.is-scrubbed { border-top: 0; border-left-color: var(--rule); }
  .steps.is-scrubbed::after { left: -2px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform-origin: top; transform: scaleY(var(--fill, 0)); }
}

/* ---------- pricing: founding partner switch ---------- */
.switch {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 32px; min-height: 44px;
  font-weight: 700; font-stretch: var(--w-ui); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.switch-track { position: relative; flex: none; width: 46px; height: 26px; background: var(--rule); }
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--paper);
  box-shadow: 0 1px 3px rgba(6, 22, 14, 0.3);
  transition: transform 240ms var(--ease-out), background-color 200ms ease;
}
.switch-track { transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.switch:active .switch-track { transform: scale(0.97); }
.switch[aria-checked="true"] .switch-track { background: var(--forest); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(20px); background: var(--amber); }
.fees { margin-top: 24px; }

.amt-roll .amt { transition: transform 460ms var(--ease-out); }
.amt-roll .amt-fp { transform: translateY(115%); }
.fees.is-founding .amt-std { transform: translateY(-115%); }
.fees.is-founding .amt-fp { transform: none; }
.tier:nth-child(2) .amt { transition-delay: 45ms; }
.tier:nth-child(3) .amt { transition-delay: 90ms; }
.per-fp, .f-fp { display: none; }
.fees.is-founding .per-std, .fees.is-founding .f-std { display: none; }
.fees.is-founding .per-fp, .fees.is-founding .f-fp { display: inline; }
.fees.is-founding .tier-found strong { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.fees.is-founding .tier.is-pick .tier-found strong { color: var(--on-forest-2); }

/* ---------- founding access: received stamp ---------- */
.form-done { position: relative; }
.stamp {
  position: absolute; right: 14px; top: -20px;
  display: grid; justify-items: center; gap: 1px; padding: 5px 10px 6px;
  border: 2px solid var(--amber); color: var(--amber); background: var(--forest);
  font-size: 0.8125rem; font-weight: 800; font-stretch: 80%; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.1;
  transform: rotate(-9deg);
}
.stamp span { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; color: var(--amber); }
.form-done > div { padding-right: 96px; }

@media (prefers-reduced-motion: reduce) {
  .story.is-pinned .story-step { filter: none; transform: none; }
  .amt-roll .amt { transition: opacity 150ms ease; }
  .amt-roll .amt-fp, .fees.is-founding .amt-std { transform: none; opacity: 0; }
  .fees.is-founding .amt-fp { opacity: 1; }
  .switch-thumb { transition: background-color 150ms ease; }
}

/* ---------- client portal: brand wipe and legend links ---------- */
.wl-bar::before { content: ""; position: absolute; inset: 0; background: var(--brand-next, var(--brand)); clip-path: inset(0 100% 0 0); pointer-events: none; }
.wl-bar > :not(.fig-key) { position: relative; z-index: 1; }
.wl-bar > .fig-key { z-index: 2; }
[data-fig] { outline: 2px solid transparent; outline-offset: 10px; transition: outline-color 160ms ease, outline-offset 220ms var(--ease-out); }
[data-fig].is-lit { outline-color: var(--amber); outline-offset: 4px; }
[data-fig] .fig-key { transition: transform 200ms var(--ease-out), box-shadow 200ms ease; }
[data-fig].is-lit .fig-key { transform: translateY(-50%) scale(1.18); }
.legend-row[data-key] .key { transition: background-color 150ms ease, color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .legend-row[data-key]:hover .key { background: var(--forest); color: var(--on-forest); }
}
@media (prefers-reduced-motion: reduce) {
  [data-fig] { transition: outline-color 120ms ease; outline-offset: 4px; }
  [data-fig].is-lit .fig-key { transform: translateY(-50%); }
}
