/* ==========================================================================
   Larasguna — clinical botanical (navy / mint)
   ========================================================================== */

:root {
  --paper: #eef4f1;
  --paper-2: #e1ebe7;
  --card: #fbfdfc;
  --forest: #0b2a4f;
  --forest-2: #113a66;
  --forest-3: #1a4d80;
  --moss: #14a074;
  --sage: #8fdcc0;
  --sage-soft: #d3f1e5;
  --mustard: #2ef5a8;
  --mustard-deep: #0fae76;
  --mustard-soft: #c6f6e2;
  --clay: #e0674a;
  --ink: #0c1e33;
  --muted: #546577;
  --line: rgba(12, 30, 51, 0.12);
  --line-2: rgba(12, 30, 51, 0.2);
  --line-f: rgba(238, 244, 241, 0.16);

  --f-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", monospace;

  --r-xl: 40px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 0 rgba(12, 30, 51, 0.04), 0 18px 40px -28px rgba(11, 42, 79, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 72;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

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

.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.mono {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skip {
  position: fixed;
  left: 1rem;
  top: -60px;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  transition: top 0.2s;
}
.skip:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease);
}
.btn:hover svg {
  transform: translateX(3px);
}
.btn:active {
  transform: scale(0.98);
}
.btn-forest {
  background: var(--forest);
  color: var(--paper);
}
.btn-forest:hover {
  background: var(--forest-2);
}
.btn-mustard {
  background: var(--mustard);
  color: var(--ink);
}
.btn-mustard:hover {
  background: #6ff8c3;
}
.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--card);
}
.btn-sm {
  padding: 0.62rem 1rem;
  font-size: 0.86rem;
}

/* ---------- Header (floating capsule) ---------- */
.hdr {
  position: fixed;
  inset: 14px 0 auto;
  z-index: 50;
  pointer-events: none;
}
.hdr-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0.45rem 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(251, 253, 252, 0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 10px 30px -22px rgba(11, 42, 79, 0.5);
  transition: box-shadow 0.3s, background-color 0.3s;
}
.hdr.is-scrolled .hdr-bar {
  background: rgba(251, 253, 252, 0.92);
  box-shadow: 0 14px 34px -20px rgba(11, 42, 79, 0.45);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-inline: auto;
}
.nav .nav-paper {
  display: none;
}
.nav a {
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: background-color 0.25s, color 0.25s;
}
.nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
}
.nav a.is-active {
  color: var(--paper);
  background: var(--forest);
}
.nav-num {
  display: none;
}
.hdr-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-2);
}
.lang button {
  border: 0;
  background: transparent;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: background-color 0.25s, color 0.25s;
}
.lang button.is-on {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 6px -2px rgba(11, 42, 79, 0.3);
}
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--forest);
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--paper);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.burger span:first-child {
  top: 16px;
}
.burger span:last-child {
  top: 23px;
}
.burger[aria-expanded="true"] span:first-child {
  top: 19.5px;
  transform: rotate(45deg);
}
.burger[aria-expanded="true"] span:last-child {
  top: 19.5px;
  transform: rotate(-45deg);
}

/* ---------- Sections ---------- */
main {
  display: block;
}
.sec {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}
.sec--tight {
  padding-top: 0;
}
.sec--forest {
  background: var(--forest);
  color: var(--paper);
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 4.5rem);
  box-shadow: var(--shadow);
}
.sec-head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  color: var(--forest-3);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 0 4px var(--mustard-soft);
}
.sec--forest .eyebrow {
  color: var(--sage);
}
.sec--forest .eyebrow::before {
  box-shadow: 0 0 0 4px rgba(46, 245, 168, 0.22);
}
.sec h2,
.sec-head h2,
.h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}
.sec-head .lede,
.lede {
  margin-top: 1.1rem;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 64ch;
}
.sec--forest .lede {
  color: rgba(238, 244, 241, 0.72);
}
.mark {
  background: linear-gradient(transparent 62%, var(--mustard-soft) 62%, var(--mustard-soft) 92%, transparent 92%);
  padding-inline: 0.06em;
}
.sec--forest .mark {
  background: none;
  color: var(--mustard);
}
.muted {
  color: var(--muted);
}
.sec--forest .muted {
  color: rgba(238, 244, 241, 0.66);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.split--wide {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.split--wide-r {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.center {
  align-items: center;
}
.prose {
  display: grid;
  gap: 1.1rem;
  color: var(--muted);
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.sec--forest .prose {
  color: rgba(238, 244, 241, 0.74);
}
.sec--forest .prose strong {
  color: var(--paper);
}
.stack-gap {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

/* ---------- Evidence chips ---------- */
.ev {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ev b {
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1;
}
.ev--ok {
  background: var(--sage-soft);
  color: var(--forest-2);
}
.ev--dev {
  background: var(--mustard-soft);
  color: #07603f;
}
.ev--prop {
  background: transparent;
  border-color: var(--line-2);
  border-style: dashed;
  color: var(--muted);
}
.sec--forest .ev--prop {
  border-color: rgba(238, 244, 241, 0.35);
  color: rgba(238, 244, 241, 0.75);
}
.eyebrow .ev {
  text-transform: none;
  vertical-align: middle;
}
.legend-ev {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Home hero ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 120px 0 clamp(3rem, 6vw, 4.5rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.4rem 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}
.hero-tag b {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.7rem, 6vw, 5.1rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero-lead {
  margin-top: 1.5rem;
  max-width: 52ch;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}
.hero .legend-ev {
  margin-top: 2.25rem;
}

.vital {
  position: relative;
  aspect-ratio: 1 / 1.02;
  border-radius: 36px;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(20, 160, 116, 0.38), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(46, 245, 168, 0.16), transparent 60%),
    var(--forest);
  color: var(--paper);
  overflow: hidden;
  box-shadow: 0 40px 80px -50px rgba(11, 42, 79, 0.8);
}
.vital::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(238, 244, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 244, 241, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
}
.vital-top {
  position: absolute;
  left: 1.6rem;
  right: 1.6rem;
  top: 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--sage);
}
.vital svg {
  position: absolute;
  inset: 18% 0 auto;
  width: 100%;
  height: auto;
}
.vital .trace {
  fill: none;
  stroke: var(--mustard);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 3.2s var(--ease) 0.3s forwards;
}
.vital .arc {
  fill: none;
  stroke: rgba(238, 244, 241, 0.22);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}
.vital .pulse {
  fill: var(--mustard);
}
.node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem 0.5rem 0.55rem;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.55);
  animation: float 6s ease-in-out infinite;
}
.node i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  background: var(--sage-soft);
  color: var(--forest-2);
}
.node--b i {
  background: var(--mustard-soft);
  color: #07603f;
}
.node--c i {
  background: var(--forest);
  color: var(--paper);
}
.node--a {
  left: 7%;
  top: 60%;
}
.node--b {
  left: 38%;
  top: 72%;
  animation-delay: -2s;
}
.node--c {
  right: 7%;
  top: 60%;
  animation-delay: -4s;
}
.vital-foot {
  position: absolute;
  left: 1.6rem;
  right: 1.6rem;
  bottom: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-f);
  font-size: 0.86rem;
  color: rgba(238, 244, 241, 0.72);
}
.vital-foot strong {
  display: block;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.02em;
}

/* ---------- Etymology strip ---------- */
.etym {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--line);
}
.etym-word {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--forest);
}
.etym-word em {
  font-style: normal;
  color: var(--mustard-deep);
}
.etym p {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 34ch;
}
.etym p strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.stat {
  padding: 1.6rem 1.5rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--forest);
}
.stat span {
  display: block;
  margin-top: 0.85rem;
  font-size: 0.93rem;
  color: var(--muted);
}
.stat--accent {
  background: var(--forest);
  border-color: transparent;
}
.stat--accent strong {
  color: var(--mustard);
}
.stat--accent span {
  color: rgba(238, 244, 241, 0.75);
}
.sec--forest .stat {
  background: rgba(238, 244, 241, 0.05);
  border-color: var(--line-f);
}
.sec--forest .stat strong {
  color: var(--paper);
}
.sec--forest .stat span {
  color: rgba(238, 244, 241, 0.68);
}

/* ---------- Three-sided market ---------- */
.market {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  position: relative;
}
.side {
  position: relative;
  padding: 2rem 1.75rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.side:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.side .ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--sage-soft);
  color: var(--forest-2);
}
.side .ico svg {
  width: 26px;
  height: 26px;
}
.side:nth-child(2) .ico {
  background: var(--mustard-soft);
  color: #07603f;
}
.side:nth-child(3) .ico {
  background: var(--forest);
  color: var(--paper);
}
.side h3 {
  margin-top: 1.3rem;
  font-size: 1.5rem;
}
.side .role {
  display: block;
  margin-top: 0.4rem;
  color: var(--forest-3);
}
.side p {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.97rem;
}
.sec--forest .side {
  background: rgba(238, 244, 241, 0.05);
  border-color: var(--line-f);
}
.sec--forest .side p {
  color: rgba(238, 244, 241, 0.7);
}
.sec--forest .side .role {
  color: var(--sage);
}

/* ---------- Axioms ---------- */
.axioms {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.axiom {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 1.5rem 1.35rem;
  border-radius: var(--r-md);
  background: rgba(238, 244, 241, 0.05);
  border: 1px solid var(--line-f);
  transition: background-color 0.35s, transform 0.5s var(--ease);
}
.axiom:hover {
  background: rgba(238, 244, 241, 0.09);
  transform: translateY(-4px);
}
.axiom .num {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  color: var(--mustard);
}
.axiom h3 {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.axiom p {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: rgba(238, 244, 241, 0.7);
}

/* ---------- Layers (three stacked) ---------- */
.layers {
  display: grid;
  gap: 0.75rem;
}
.layer {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.layer .k {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  background: var(--paper-2);
  color: var(--forest-2);
}
.layer:nth-child(2) .k {
  background: var(--mustard-soft);
  color: #07603f;
}
.layer:nth-child(3) .k {
  background: var(--forest);
  color: var(--paper);
}
.layer h3 {
  font-size: 1.3rem;
}
.layer p {
  color: var(--muted);
  font-size: 0.95rem;
}
.split .layer {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  align-items: start;
}
.split .layer .k {
  grid-row: span 2;
}
.split .layer h3 {
  font-size: 1.18rem;
  padding-top: 0.2rem;
}

/* ---------- Is / is not ---------- */
.isnot {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
}
.is-card,
.not-card {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--r-lg);
}
.is-card {
  background: var(--forest);
  color: var(--paper);
}
.is-card h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-top: 0.8rem;
}
.is-card p {
  margin-top: 1rem;
  color: rgba(238, 244, 241, 0.74);
}
.is-card .mono {
  color: var(--mustard);
}
.not-card {
  background: var(--card);
  border: 1px solid var(--line);
}
.not-card .mono {
  color: var(--clay);
}
.not-list {
  margin-top: 1rem;
  display: grid;
}
.not-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.not-list li:last-child {
  border-bottom: 0;
}
.not-list li::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  background:
    linear-gradient(45deg, transparent 46%, var(--clay) 46%, var(--clay) 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, var(--clay) 46%, var(--clay) 54%, transparent 54%);
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.not-list strong {
  display: block;
  font-weight: 600;
}
.not-list span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Chapter index ---------- */
.chapter.chapter--paper {
  background: var(--mustard-soft);
  border-color: transparent;
}
.chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.chapter {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 1.6rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), background-color 0.3s, color 0.3s;
}
.chapter .mono {
  color: var(--forest-3);
}
.chapter h3 {
  margin-top: 0.6rem;
  font-size: 1.45rem;
}
.chapter p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.93rem;
}
.chapter .go {
  margin-top: auto;
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  transition: transform 0.45s var(--ease), background-color 0.3s;
}
.chapter .go svg {
  width: 15px;
  height: 15px;
}
.chapter:hover {
  transform: translateY(-4px);
  background: var(--forest);
  color: var(--paper);
}
.chapter:hover p {
  color: rgba(238, 244, 241, 0.72);
}
.chapter:hover .mono {
  color: var(--mustard);
}
.chapter:hover .go {
  background: var(--mustard);
  color: var(--ink);
  transform: rotate(-45deg);
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(2.25rem, 5vw, 4rem);
  border-radius: var(--r-xl);
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(46, 245, 168, 0.28), transparent 60%),
    var(--forest);
  color: var(--paper);
  overflow: hidden;
}
.cta h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  max-width: 20ch;
}
.cta p {
  margin-top: 0.9rem;
  color: rgba(238, 244, 241, 0.74);
  max-width: 56ch;
}

/* ---------- Page hero (inner) ---------- */
.phero {
  padding: clamp(8.5rem, 14vw, 10.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.phero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--forest-3);
}
.crumb b {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 0.5rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-weight: 400;
}
.phero h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.phero .lead {
  margin-top: 1.4rem;
  max-width: 58ch;
  font-size: 1.14rem;
  color: var(--muted);
}
.toc {
  padding: 1.4rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.toc > .mono {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
}
.toc a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 16px;
  gap: 0.6rem;
  align-items: center;
  padding: 0.62rem 0.4rem;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: background-color 0.25s;
}
.toc a + a {
  border-top: 1px dashed var(--line);
}
.toc a b {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--forest-3);
}
.toc a::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.3s var(--ease);
}
.toc a:hover {
  background: var(--paper);
}
.toc a:hover::after {
  transform: translateX(3px) rotate(-45deg);
}

/* ---------- Figures ---------- */
.fig {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
}
.fig-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  cursor: zoom-in;
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease);
}
.fig-frame img {
  width: 100%;
  border-radius: calc(var(--r-lg) - 10px);
}
.fig-frame:hover {
  transform: translateY(-3px);
}
.fig-frame .zoom {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: var(--paper);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.fig-frame .zoom svg {
  width: 15px;
  height: 15px;
}
.fig-frame:hover .zoom {
  opacity: 1;
  transform: none;
}
.fig figcaption {
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  margin-top: 0.9rem;
  padding-inline: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.fig figcaption .mono {
  flex-shrink: 0;
  color: var(--forest-3);
}
.sec--forest .fig-frame {
  border-color: var(--line-f);
}
.sec--forest .fig figcaption {
  color: rgba(238, 244, 241, 0.66);
}
.sec--forest .fig figcaption .mono {
  color: var(--sage);
}
.fig--flush {
  margin-top: 0;
}

/* ---------- Generic cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr));
  gap: 1rem;
}
.card {
  position: relative;
  padding: 1.75rem 1.6rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.card .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.card .k {
  color: var(--forest-3);
}
.card h3 {
  margin-top: 0.85rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.card p {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.96rem;
}
.card ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}
.card li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.94rem;
  color: var(--muted);
}
.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--moss);
}
.card--tint {
  background: var(--sage-soft);
  border-color: transparent;
}
.card--sun {
  background: var(--mustard-soft);
  border-color: transparent;
}
.card--dark {
  background: var(--forest);
  color: var(--paper);
  border-color: transparent;
}
.card--dark p,
.card--dark li {
  color: rgba(238, 244, 241, 0.72);
}
.card--dark .k {
  color: var(--mustard);
}
.card--dark li::before {
  border-color: var(--mustard);
}
.sec--forest .card {
  background: rgba(238, 244, 241, 0.05);
  border-color: var(--line-f);
}
.sec--forest .card p,
.sec--forest .card li {
  color: rgba(238, 244, 241, 0.7);
}
.sec--forest .card .k {
  color: var(--sage);
}
.sec--forest .card li::before {
  border-color: var(--mustard);
}

/* ---------- Numbered rows ---------- */
.rows {
  border-top: 1px solid var(--line);
}
.row {
  display: grid;
  grid-template-columns: 56px minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.row .n {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--forest-3);
  padding-top: 0.3rem;
}
.row h3 {
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}
.row p {
  color: var(--muted);
  font-size: 0.97rem;
}
.split .row {
  grid-template-columns: 44px minmax(0, 1fr);
  row-gap: 0.4rem;
}
.split .row p {
  grid-column: 2;
}
.sec--forest .rows,
.sec--forest .row {
  border-color: var(--line-f);
}
.sec--forest .row .n {
  color: var(--mustard);
}
.sec--forest .row p {
  color: rgba(238, 244, 241, 0.7);
}

/* ---------- Big stat callout ---------- */
.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-radius: var(--r-lg);
  background: var(--mustard-soft);
}
.callout strong {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--forest);
}
.callout p {
  color: #0e3f2d;
  font-size: 0.98rem;
}
.note {
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-2);
  font-size: 0.93rem;
  color: var(--muted);
}
.note .mono {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--clay);
}
.sec--forest .note {
  border-color: var(--line-f);
  color: rgba(238, 244, 241, 0.7);
}
.sec--forest .note .mono {
  color: var(--mustard);
}
.quote {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.quote em {
  font-style: normal;
  color: var(--moss);
}
.sec--forest .quote em {
  color: var(--mustard);
}

/* ---------- Funnel (detection-to-action) ---------- */
.funnel {
  display: grid;
  gap: 0.6rem;
}
.f-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 90px;
  gap: 1.25rem;
  align-items: center;
}
.f-row .lbl {
  font-size: 0.95rem;
  font-weight: 500;
}
.f-row .lbl small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}
.f-track {
  height: 38px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.f-bar {
  height: 100%;
  width: var(--w);
  min-width: 8px;
  border-radius: 999px;
  background: var(--moss);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease);
}
.funnel.is-in .f-bar {
  transform: scaleX(1);
}
.f-row:nth-child(1) .f-bar {
  background: var(--forest);
}
.f-row:last-child .f-bar {
  background: var(--clay);
}
.f-row .val {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  text-align: right;
}

/* ---------- Equation (PoC) ---------- */
.eq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: stretch;
}
.eq-op {
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--moss);
}
.eq-box {
  padding: 1.6rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.eq-box .sym {
  font-family: var(--f-mono);
  font-size: 1.05rem;
  color: var(--forest-3);
}
.eq-box h3 {
  margin-top: 0.8rem;
  font-size: 1.3rem;
}
.eq-box p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.93rem;
}
.eq-box--sun {
  background: var(--mustard-soft);
  border-color: transparent;
}
.eq-box--out {
  background: var(--forest);
  color: var(--paper);
  border-color: transparent;
}
.eq-box--out .sym {
  color: var(--mustard);
}
.eq-box--out p {
  color: rgba(238, 244, 241, 0.74);
}

/* ---------- Flow steps ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 0.75rem;
  counter-reset: f;
}
.flow-step {
  position: relative;
  padding: 1.4rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.flow-step::before {
  counter-increment: f;
  content: counter(f);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 0.7rem;
}
.flow-step h4 {
  margin-top: 1rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.flow-step p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.sec--forest .flow-step {
  background: rgba(238, 244, 241, 0.05);
  border-color: var(--line-f);
}
.sec--forest .flow-step::before {
  background: var(--mustard);
  color: var(--ink);
}
.sec--forest .flow-step p {
  color: rgba(238, 244, 241, 0.7);
}

/* ---------- Tier stack (L0–L4) ---------- */
.tiers {
  display: grid;
  gap: 0.6rem;
}
.tier {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 1.4rem;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  margin-left: calc(var(--s, 0) * 3%);
}
.tier .lv {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  color: var(--forest);
}
.tier h3 {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}
.tier p {
  color: var(--muted);
  font-size: 0.92rem;
}
.tier--base {
  background: var(--forest);
  color: var(--paper);
  border-color: transparent;
}
.tier--base .lv {
  color: var(--mustard);
}
.tier--base p {
  color: rgba(238, 244, 241, 0.74);
}

/* ---------- Component block (with evidence label) ---------- */
.comp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.comp:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.comp--rev > :first-child {
  order: 2;
}
.comp .top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.comp .top .mono {
  color: var(--forest-3);
}
.comp .card--dark .top .mono {
  color: var(--mustard);
}
.comp h2 {
  margin-top: 1rem;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}
.comp .prose {
  margin-top: 1.1rem;
}
.comp .card ul,
.comp ul.ticks {
  margin-top: 1.25rem;
}
.ticks {
  display: grid;
  gap: 0.6rem;
}
.ticks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--muted);
  font-size: 0.96rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sage-soft);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(0.35em + 4px);
  width: 6px;
  height: 4px;
  border-left: 1.5px solid var(--forest-2);
  border-bottom: 1.5px solid var(--forest-2);
  transform: rotate(-45deg);
}
.sec--forest .ticks li {
  color: rgba(238, 244, 241, 0.74);
}
.sec--forest .ticks li::before {
  background: rgba(46, 245, 168, 0.22);
}
.sec--forest .ticks li::after {
  border-color: var(--mustard);
}

/* ---------- Validator tiers ---------- */
.vtiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
}
.vtier {
  padding: 1.75rem 1.6rem;
  border-radius: var(--r-lg);
  background: rgba(238, 244, 241, 0.05);
  border: 1px solid var(--line-f);
}
.vtier:nth-child(2) {
  padding-top: 2.75rem;
}
.vtier:nth-child(3) {
  padding-top: 3.75rem;
  background: rgba(46, 245, 168, 0.12);
  border-color: rgba(46, 245, 168, 0.35);
}
.vtier .t {
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--mustard);
}
.vtier h3 {
  margin-top: 0.9rem;
  font-size: 1.3rem;
}
.vtier p {
  margin-top: 0.6rem;
  font-size: 0.93rem;
  color: rgba(238, 244, 241, 0.72);
}
.bond {
  display: flex;
  gap: 4px;
  margin-top: 1.25rem;
}
.bond i {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(238, 244, 241, 0.14);
}
.bond i.on {
  background: var(--mustard);
}

/* ---------- Permission matrix ---------- */
.matrix-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card);
}
.matrix {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.matrix th,
.matrix td {
  padding: 1rem 1.1rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.matrix thead th {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
}
.split .matrix {
  min-width: 0;
}
.matrix th[scope="row"] {
  text-align: left;
  font-weight: 600;
}
.matrix th[scope="row"] small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}
.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td {
  border-bottom: 0;
}
.dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  vertical-align: middle;
}
.dot--on {
  background: var(--forest);
}
.dot--ask {
  background: repeating-linear-gradient(45deg, var(--mustard) 0 2px, var(--mustard-soft) 2px 5px);
  border: 1.5px solid var(--mustard);
}
.dot--off {
  border: 1.5px dashed var(--line-2);
}
.matrix-key {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.matrix-key span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Tables ---------- */
.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card);
}
.tbl {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.tbl th,
.tbl td {
  padding: 1rem 1.2rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.tbl thead th {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl td:first-child {
  font-weight: 600;
}
.tbl td {
  color: var(--muted);
}
.tbl td:first-child {
  color: var(--ink);
}
.tbl .yes,
.tbl .no,
.tbl .part {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tbl .yes {
  background: var(--sage-soft);
  color: var(--forest-2);
}
.tbl .no {
  background: #fadcd2;
  color: #9a3820;
}
.tbl .part {
  background: var(--mustard-soft);
  color: #07603f;
}

/* ---------- Allocation bar ---------- */
.alloc-bar {
  display: flex;
  height: 72px;
  border-radius: 22px;
  overflow: hidden;
  gap: 4px;
}
.alloc-bar span {
  position: relative;
  flex: var(--p) 1 0;
  display: flex;
  align-items: flex-end;
  padding: 0.7rem 0.8rem;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  color: var(--paper);
  border-radius: 8px;
}
.alloc-bar span:first-child {
  border-radius: 22px 8px 8px 22px;
}
.alloc-bar span:last-child {
  border-radius: 8px 22px 22px 8px;
}
.a1 { background: #0b2a4f; }
.a2 { background: #2a6aa3; }
.a3 { background: #14a074; }
.a4 { background: #2ef5a8; color: var(--ink) !important; }
.a5 { background: #9cf3d1; color: var(--ink) !important; }
.a6 { background: #e0674a; }
.alloc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin-top: 2rem;
}
.alloc-item {
  display: grid;
  grid-template-columns: 14px 64px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.alloc-item i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  transform: translateY(1px);
}
.alloc-item b {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.alloc-item strong {
  display: block;
  font-weight: 600;
}
.alloc-item span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.sec--forest .alloc-item {
  border-color: var(--line-f);
}
.sec--forest .alloc-item span {
  color: rgba(238, 244, 241, 0.62);
}
.sec--forest .alloc-bar {
  box-shadow: 0 0 0 1px var(--line-f);
}
.sec--forest .a1 {
  background: #dce8e3;
}
.sec--forest .alloc-bar .a1 {
  color: var(--ink);
}

/* ---------- Vesting timeline ---------- */
.vest {
  display: grid;
  gap: 0.85rem;
}
.vest-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}
.vest-row .lbl strong {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}
.vest-row .lbl span {
  font-size: 0.82rem;
  color: rgba(238, 244, 241, 0.6);
}
.vest-track {
  position: relative;
  height: 34px;
  border-radius: 999px;
  background: rgba(238, 244, 241, 0.07);
}
.vest-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--from);
  right: calc(100% - var(--to));
  border-radius: 999px;
  background: var(--sage);
}
.vest-fill--decay {
  background: linear-gradient(90deg, var(--mustard), rgba(46, 245, 168, 0.18));
}
.vest-fill--cliff::before {
  content: "";
  position: absolute;
  left: 0;
  top: -6px;
  bottom: -6px;
  width: 3px;
  border-radius: 3px;
  background: var(--mustard);
}
.vest-axis {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 0.4rem;
}
.vest-axis div {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: rgba(238, 244, 241, 0.5);
}

/* ---------- Chambers ---------- */
.bicam {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: stretch;
}
.chamber {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.chamber--clin {
  background: var(--forest);
  color: var(--paper);
  border-color: transparent;
}
.chamber .mono {
  color: var(--forest-3);
}
.chamber--clin .mono {
  color: var(--mustard);
}
.chamber h3 {
  margin-top: 0.8rem;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}
.chamber .who {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.chamber--clin .who {
  color: rgba(238, 244, 241, 0.72);
}
.chamber ul {
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
}
.chamber--clin ul {
  border-top-color: var(--line-f);
}
.chamber li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.94rem;
  color: var(--muted);
}
.chamber--clin li {
  color: rgba(238, 244, 241, 0.78);
}
.chamber li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--moss);
}
.chamber--clin li::before {
  background: var(--mustard);
}
.veto {
  display: grid;
  place-items: center;
  position: relative;
}
.veto::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  border-top: 1.5px dashed var(--line-2);
}
.veto span {
  position: relative;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  background: var(--mustard);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
}
.axiom-cap {
  margin-bottom: 1rem;
  padding: 1rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 0.93rem;
}
.axiom-cap .mono {
  color: var(--mustard);
  margin-right: 0.6rem;
}

/* ---------- Gates ---------- */
.gates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.gate {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.gate .g {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: var(--mustard);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.5rem;
}
.gate h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
}
.gate dl {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.9rem;
  flex: 1;
}
.gate dt {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest-3);
}
.gate dd {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.gate .pause {
  margin-top: 1.1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px dashed rgba(224, 103, 74, 0.55);
  font-size: 0.85rem;
  color: #9a3820;
}
.gate .pause b {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

/* ---------- Phases ---------- */
.phases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: ph;
}
.phase {
  position: relative;
  padding: 2rem 1.75rem;
  border-radius: var(--r-lg);
  background: rgba(238, 244, 241, 0.05);
  border: 1px solid var(--line-f);
  overflow: hidden;
}
.phase::after {
  counter-increment: ph;
  content: counter(ph, upper-roman);
  position: absolute;
  right: 1.2rem;
  top: 0.4rem;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 5.5rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(238, 244, 241, 0.06);
}
.phase .mono {
  color: var(--mustard);
}
.phase h3 {
  margin-top: 0.9rem;
  font-size: 1.45rem;
  max-width: 14ch;
}
.phase p {
  margin-top: 0.8rem;
  font-size: 0.94rem;
  color: rgba(238, 244, 241, 0.72);
}

/* ---------- Flywheel chain ---------- */
.chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.chain span {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 500;
}
.chain span:first-child,
.chain span:last-child {
  background: var(--forest);
  color: var(--paper);
  border-color: transparent;
}
.chain i {
  width: 18px;
  height: 1.5px;
  background: var(--moss);
  position: relative;
}
.chain i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--moss);
  border-top: 1.5px solid var(--moss);
  transform: rotate(45deg);
}

/* ---------- Risks accordion ---------- */
.risks {
  display: grid;
  gap: 0.6rem;
}
.risk {
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.risk summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 32px;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem 1.4rem;
  cursor: pointer;
  list-style: none;
}
.risk summary::-webkit-details-marker {
  display: none;
}
.risk summary .mono {
  color: var(--clay);
}
.risk summary h3 {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}
.risk summary .pm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper-2);
  position: relative;
  transition: transform 0.35s var(--ease), background-color 0.3s;
}
.risk summary .pm::before,
.risk summary .pm::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.risk summary .pm::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.35s var(--ease);
}
.risk[open] summary .pm {
  background: var(--mustard);
}
.risk[open] summary .pm::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.risk .body {
  padding: 0 1.4rem 1.4rem calc(56px + 2.4rem);
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- Guilds ---------- */
.guilds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.guild {
  position: relative;
  padding: 1.9rem 1.75rem;
  border-radius: var(--r-lg);
  background: rgba(238, 244, 241, 0.05);
  border: 1px solid var(--line-f);
  overflow: hidden;
}
.guild .badge {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(46, 245, 168, 0.16);
  color: var(--mustard);
  font-family: var(--f-mono);
  font-size: 0.78rem;
}
.guild h3 {
  margin-top: 1.2rem;
  font-size: 1.35rem;
}
.guild p {
  margin-top: 0.6rem;
  font-size: 0.94rem;
  color: rgba(238, 244, 241, 0.72);
}
.guild .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.guild .tags span {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-f);
  font-size: 0.78rem;
  color: rgba(238, 244, 241, 0.75);
}

/* ---------- Pager ---------- */
.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), background-color 0.3s, color 0.3s;
}
.pager a .mono {
  color: var(--muted);
}
.pager a strong {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}
.pager a.next {
  grid-column: 2;
  text-align: right;
}
.pager a:hover {
  transform: translateY(-3px);
  background: var(--forest);
  color: var(--paper);
}
.pager a:hover .mono {
  color: var(--mustard);
}

/* ---------- Footer ---------- */
.ftr {
  margin: 0 clamp(0.6rem, 1.5vw, 1rem) clamp(0.6rem, 1.5vw, 1rem);
  border-radius: var(--r-xl);
  background: var(--forest);
  color: var(--paper);
  overflow: hidden;
}
.ftr-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.ftr .brand img {
  background: var(--card);
}
.ftr-brand p {
  margin-top: 1rem;
  max-width: 40ch;
  color: rgba(238, 244, 241, 0.7);
  font-size: 0.95rem;
}
.ftr h4 {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.9rem;
}
.ftr nav {
  display: grid;
  gap: 0.45rem;
}
.ftr nav a {
  color: rgba(238, 244, 241, 0.82);
  font-size: 0.95rem;
  transition: color 0.25s;
  width: fit-content;
}
.ftr nav a:hover {
  color: var(--mustard);
}
.ftr-word {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 17vw, 15rem);
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: rgba(238, 244, 241, 0.08);
  white-space: nowrap;
  user-select: none;
}
.ftr-bottom {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.5rem clamp(1.75rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line-f);
  font-size: 0.84rem;
  color: rgba(238, 244, 241, 0.6);
}
.ftr-bottom p {
  max-width: 78ch;
}
.ftr-bottom .mono {
  flex-shrink: 0;
  color: var(--sage);
}

/* ---------- Lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(11, 42, 79, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lb.is-open {
  opacity: 1;
  visibility: visible;
}
.lb img {
  max-height: 88vh;
  width: auto;
  border-radius: 18px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  transform: scale(0.97);
  transition: transform 0.4s var(--ease);
}
.lb.is-open img {
  transform: none;
}
.lb button {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--card);
  font-size: 1.5rem;
  line-height: 1;
}

/* ---------- Reveal ---------- */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.rv.is-in {
  opacity: 1;
  transform: none;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
  .vital .trace {
    stroke-dashoffset: 0;
  }
  .f-bar {
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .axioms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .axiom {
    min-height: 240px;
  }
  .gates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav a {
    padding-inline: 0.6rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 1060px) {
  .burger {
    display: block;
  }
  .hdr-bar {
    position: relative;
  }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.6rem;
    border-radius: 26px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 30px 60px -30px rgba(11, 42, 79, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0.3s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    color: var(--ink);
    border-radius: 16px;
  }
  .nav-num {
    display: inline;
    font-family: var(--f-mono);
    font-size: 0.66rem;
    color: var(--muted);
  }
  .nav a.is-active .nav-num {
    color: var(--mustard);
  }
  .nav .nav-paper {
    display: flex;
    margin-top: 0.35rem;
    background: var(--mustard-soft);
    font-weight: 600;
  }
  .nav .nav-paper .nav-num {
    color: var(--mustard-deep);
  }
  .hdr-tools {
    margin-left: auto;
  }
  .hero-grid,
  .phero-grid,
  .split,
  .split--wide,
  .split--wide-r,
  .comp,
  .isnot {
    grid-template-columns: minmax(0, 1fr);
  }
  .comp--rev > :first-child {
    order: 0;
  }
  .vital {
    max-width: 560px;
    width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .market,
  .phases,
  .vtiers {
    grid-template-columns: minmax(0, 1fr);
  }
  .chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vtier:nth-child(n) {
    padding-top: 1.75rem;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eq {
    grid-template-columns: minmax(0, 1fr);
  }
  .eq-op {
    height: 44px;
  }
  .bicam {
    grid-template-columns: minmax(0, 1fr);
  }
  .veto {
    height: 64px;
  }
  .veto::before {
    left: 50%;
    right: auto;
    top: 6px;
    bottom: 6px;
    border-top: 0;
    border-left: 1.5px dashed var(--line-2);
  }
  .ftr-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .ftr-brand {
    grid-column: 1 / -1;
  }
  .etym {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .tier {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 1rem;
  }
  .hdr {
    inset: 10px 0 auto;
  }
  .hdr .btn-sm {
    display: none;
  }
  .hero {
    padding-top: 100px;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }
  .node {
    font-size: 0.74rem;
    padding: 0.4rem 0.7rem 0.4rem 0.45rem;
  }
  .node i {
    width: 22px;
    height: 22px;
  }
  .node--a {
    left: 4%;
    top: 49%;
  }
  .node--c {
    right: 4%;
    top: 49%;
  }
  .node--b {
    left: 30%;
    top: 64%;
  }
  .vital-foot {
    font-size: 0.78rem;
  }
  .vital-foot strong {
    font-size: 1.05rem;
  }
  .axioms,
  .chapters,
  .cards,
  .flow,
  .gates,
  .guilds,
  .alloc-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .axiom {
    min-height: 0;
  }
  .axiom h3 {
    padding-top: 1.25rem;
  }
  .stats {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.6rem;
  }
  .stat {
    padding: 1.2rem 1.1rem;
  }
  .layer,
  .row,
  .split .row,
  .tier {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }
  .split .row p {
    grid-column: auto;
  }
  .f-row,
  .vest-row,
  .vest-axis {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }
  .f-row .val {
    text-align: left;
  }
  .vest-axis > span {
    display: none;
  }
  .callout,
  .cta {
    grid-template-columns: minmax(0, 1fr);
  }
  .etym {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }
  .etym p + .etym-word {
    margin-top: 1rem;
  }
  .alloc-bar {
    height: 56px;
  }
  .alloc-bar span {
    font-size: 0;
    padding: 0;
  }
  .risk summary {
    grid-template-columns: minmax(0, 1fr) 32px;
  }
  .risk summary .mono {
    grid-column: 1 / -1;
  }
  .risk .body {
    padding-left: 1.4rem;
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .pager a.next {
    grid-column: auto;
  }
  .ftr-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .ftr-bottom {
    flex-direction: column;
    gap: 0.8rem;
  }
  .panel {
    border-radius: var(--r-lg);
  }
}
