/*
 * Reference-aligned visual layer
 *
 * The base file retains component behavior and responsive structure. This
 * layer replaces the visual system with the source site's colder, stricter
 * editorial language: Libre Baskerville, Poppins, bone white, and ruled grids.
 */

:root {
  --bg: #020202;
  --surface: #050505;
  --surface-2: #090909;
  --ink: #f1f1ef;
  --muted: rgba(241, 241, 239, 0.55);
  --dim: rgba(241, 241, 239, 0.28);
  --line: rgba(241, 241, 239, 0.18);
  --line-soft: rgba(241, 241, 239, 0.09);
  --accent: #cfcfcf;
  --gilt: #b8ab97;
  --serif: "Libre Baskerville", Baskerville, "Times New Roman", serif;
  --sans: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --header-h: 58px;
  --sidebar-w: 184px;
  --page-x: clamp(2rem, 3.75vw, 3rem);
}

/* v7 — reference-led decision instruments. The modules share one technical
   surface, while each lens gets its own visual grammar and information weight. */
.clarity-console,
.decision-console {
  position: relative;
  max-width: 86rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(241, 241, 239, 0.18);
  border-radius: 2rem;
  background:
    linear-gradient(rgba(241, 241, 239, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 241, 239, 0.045) 1px, transparent 1px),
    rgba(5, 5, 5, 0.7);
  background-size: 5rem 5rem;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 2rem 8rem rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.8rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(241, 241, 239, 0.15);
  color: rgba(241, 241, 239, 0.42);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.console-bar span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.console-bar i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0.8rem rgba(241, 241, 239, 0.68);
  animation: console-pulse 2.8s ease-in-out infinite;
}

@keyframes console-pulse {
  50% { opacity: 0.3; }
}

.clarity-board {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(19rem, 0.78fr);
  grid-template-rows: minmax(28rem, auto) minmax(18rem, auto);
}

.clarity-module {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  transition: background-color 0.45s ease;
}

.clarity-module:hover {
  background-color: rgba(241, 241, 239, 0.025);
}

.clarity-market {
  border-right: 1px solid rgba(241, 241, 239, 0.15);
  border-bottom: 1px solid rgba(241, 241, 239, 0.15);
}

.clarity-capital {
  grid-row: 1 / 3;
  grid-column: 2;
  display: flex;
  flex-direction: column;
}

.clarity-future {
  border-right: 1px solid rgba(241, 241, 239, 0.15);
}

.clarity-meta {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  color: rgba(241, 241, 239, 0.4);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.clarity-module h3 {
  position: relative;
  z-index: 2;
  max-width: 11ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 4.2vw, 5.1rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.clarity-module > p,
.future-copy p {
  position: relative;
  z-index: 2;
  max-width: 30rem;
  margin: 1.2rem 0 0;
  color: rgba(241, 241, 239, 0.52);
  font-size: 0.78rem;
  line-height: 1.75;
}

.clarity-module footer {
  position: absolute;
  z-index: 3;
  right: clamp(1.5rem, 3vw, 2.75rem);
  bottom: 1.4rem;
  left: clamp(1.5rem, 3vw, 2.75rem);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(241, 241, 239, 0.15);
  color: rgba(241, 241, 239, 0.34);
  font-size: 0.61rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.clarity-module footer strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.signal-map {
  position: absolute;
  right: -4%;
  bottom: 2rem;
  width: min(50%, 27rem);
  aspect-ratio: 1;
  border: 1px solid rgba(241, 241, 239, 0.1);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 241, 239, 0.05), transparent 64%);
}

.signal-map::before,
.signal-map::after,
.signal-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px solid rgba(241, 241, 239, 0.14);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.signal-map::before { width: 72%; height: 72%; }
.signal-map::after { width: 42%; height: 42%; }
.signal-ring.ring-a { width: 14%; height: 14%; }
.signal-ring.ring-b { width: 1px; height: 92%; border-width: 0 0 0 1px; border-radius: 0; }

.signal-dot {
  position: absolute;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 1rem rgba(241, 241, 239, 0.7);
}

.dot-a { top: 17%; left: 51%; }
.dot-b { top: 47%; left: 22%; }
.dot-c { top: 60%; right: 16%; }
.dot-d { right: 37%; bottom: 13%; }

.signal-map b {
  position: absolute;
  top: 49%;
  left: 50%;
  color: rgba(241, 241, 239, 0.38);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.clarity-capital h3 {
  font-size: clamp(2.65rem, 3.7vw, 4.4rem);
}

.clarity-capital > p {
  max-width: 23rem;
}

.capital-profile {
  width: min(100%, 17rem);
  height: auto;
  margin: auto auto 4.6rem;
  overflow: visible;
}

.profile-grid {
  fill: none;
  stroke: rgba(241, 241, 239, 0.12);
  stroke-width: 1;
}

.profile-shape {
  fill: rgba(241, 241, 239, 0.18);
  stroke: rgba(241, 241, 239, 0.86);
  stroke-width: 2;
  filter: drop-shadow(0 0 12px rgba(241, 241, 239, 0.16));
}

.profile-points {
  fill: var(--ink);
}

.clarity-future {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: 4.8rem;
}

.clarity-future .clarity-meta {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.clarity-future h3 {
  font-size: clamp(2.4rem, 3.4vw, 4rem);
}

.horizon-track {
  position: relative;
  align-self: center;
  height: 8.5rem;
  border-top: 1px solid rgba(241, 241, 239, 0.25);
  border-bottom: 1px solid rgba(241, 241, 239, 0.1);
}

.horizon-track > span {
  position: absolute;
  top: -1.7rem;
  color: rgba(241, 241, 239, 0.35);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.horizon-year { right: 0; }
.horizon-now { left: 0; }

.horizon-track i {
  position: absolute;
  top: -0.24rem;
  width: 0.45rem;
  height: 0.45rem;
  border: 1px solid rgba(241, 241, 239, 0.72);
  border-radius: 50%;
  background: var(--bg);
}

.horizon-track i:nth-of-type(1) { left: 0; }
.horizon-track i:nth-of-type(2) { left: 25%; }
.horizon-track i:nth-of-type(3) { left: 50%; }
.horizon-track i:nth-of-type(4) { left: 75%; }
.horizon-track i:nth-of-type(5) { right: 0; }

.horizon-path {
  position: absolute;
  top: 48%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 241, 239, 0.12), rgba(241, 241, 239, 0.55));
  transform-origin: left;
}

.path-a { transform: rotate(-8deg); }
.path-b { opacity: 0.66; transform: rotate(4deg); }
.path-c { opacity: 0.35; transform: rotate(14deg); }

.decision-console {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.decision-readout {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: end;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border-bottom: 1px solid rgba(241, 241, 239, 0.15);
}

.decision-readout div:last-child {
  text-align: right;
}

.decision-readout span,
.decision-footer {
  color: rgba(241, 241, 239, 0.36);
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.decision-readout strong {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.decision-readout p {
  max-width: 28rem;
  margin: 0 auto;
  color: rgba(241, 241, 239, 0.48);
  font-size: 0.74rem;
  line-height: 1.7;
  text-align: center;
}

.decision-console .decision-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 28rem;
  max-width: none;
  margin: 0;
  padding: 0;
}

.decision-console .decision-route::before {
  position: absolute;
  z-index: 0;
  top: 4.9rem;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 241, 239, 0.2), rgba(241, 241, 239, 0.8), rgba(241, 241, 239, 0.2));
  content: "";
}

.decision-console .decision-step,
.decision-console .decision-step-a,
.decision-console .decision-step-b,
.decision-console .decision-step-c,
.decision-console .decision-step-d {
  position: relative;
  z-index: 1;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  display: block;
  width: auto;
  padding: 3.25rem clamp(1.25rem, 2.3vw, 2.3rem) 2.5rem;
  border-right: 1px solid rgba(241, 241, 239, 0.14);
  transition: background-color 0.4s ease;
}

.decision-console .decision-step:last-child {
  border-right: 0;
}

.decision-console .decision-step:hover {
  background: rgba(241, 241, 239, 0.025);
}

.decision-console .decision-marker {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 3.2rem;
  border-color: rgba(241, 241, 239, 0.72);
  background: #080808;
  box-shadow: 0 0 0 0.45rem rgba(5, 5, 5, 0.84);
}

.decision-console .decision-step > div {
  padding-top: 0;
  border-top: 0;
}

.decision-console .decision-step > div > span {
  font-size: 0.58rem;
}

.decision-console .decision-step h3 {
  min-height: 2.2em;
  margin: 1rem 0 1rem;
  font-size: clamp(2rem, 2.8vw, 3.25rem);
  line-height: 0.95;
}

.decision-console .decision-step p {
  font-size: 0.73rem;
}

.decision-console .decision-step:nth-child(2) h3 { margin-top: 2rem; }
.decision-console .decision-step:nth-child(3) h3 { margin-top: 0.55rem; }
.decision-console .decision-step:nth-child(4) h3 { margin-top: 2.8rem; }

.decision-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(241, 241, 239, 0.15);
}

body[data-active-chapter="02"] .dice-stage,
body[data-active-chapter="03"] .dice-stage {
  opacity: 0.5;
}

body[data-active-chapter="02"] #dice-canvas,
body[data-active-chapter="03"] #dice-canvas {
  filter: grayscale(1) brightness(0.62) contrast(1.18);
}

@media (max-width: 920px) {
  .clarity-console,
  .decision-console {
    border-radius: 1.4rem;
  }

  .clarity-board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .clarity-market {
    grid-column: 1 / -1;
    min-height: 28rem;
    border-right: 0;
  }

  .clarity-capital {
    grid-row: 2;
    grid-column: 1;
    min-height: 36rem;
    border-right: 1px solid rgba(241, 241, 239, 0.15);
  }

  .clarity-future {
    grid-row: 2;
    grid-column: 2;
    display: block;
    min-height: 36rem;
    padding-bottom: 5rem;
    border-right: 0;
  }

  .horizon-track {
    margin-top: 5rem;
  }

  .decision-console .decision-route {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .decision-console .decision-route::before {
    display: none;
  }

  .decision-console .decision-step,
  .decision-console .decision-step-a,
  .decision-console .decision-step-b,
  .decision-console .decision-step-c,
  .decision-console .decision-step-d {
    min-height: 25rem;
    border-bottom: 1px solid rgba(241, 241, 239, 0.14);
    transform: none;
  }

  .decision-console .decision-step:nth-child(2n) { border-right: 0; }
}

@media (max-width: 640px) {
  .console-bar {
    min-height: 3.3rem;
    padding: 0 1rem;
    font-size: 0.5rem;
    letter-spacing: 0.17em;
  }

  .clarity-board {
    display: block;
  }

  .clarity-module,
  .clarity-market,
  .clarity-capital,
  .clarity-future {
    display: block;
    min-height: 31rem;
    padding: 1.35rem 1.25rem 5rem;
    border-right: 0;
    border-bottom: 1px solid rgba(241, 241, 239, 0.15);
  }

  .clarity-future { min-height: 34rem; }
  .clarity-module:last-child { border-bottom: 0; }
  .clarity-meta { margin-bottom: 2rem; }
  .clarity-module h3,
  .clarity-capital h3,
  .clarity-future h3 { font-size: clamp(2.8rem, 13vw, 4rem); }
  .clarity-module footer { right: 1.25rem; left: 1.25rem; }
  .signal-map { right: -9%; bottom: 1.6rem; width: 78%; }
  .capital-profile { width: 13rem; margin: 2.4rem auto 0; }
  .horizon-track { margin-top: 5.5rem; }

  .decision-readout {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
  }

  .decision-readout > div {
    min-width: 0;
  }

  .decision-readout p {
    grid-row: 2;
    grid-column: 1 / -1;
    margin: 0;
    text-align: left;
  }

  .decision-readout strong {
    font-size: 1.6rem;
    white-space: nowrap;
  }

  .decision-readout div:first-child strong { font-size: 1.4rem; }

  .decision-console .decision-route {
    display: block;
  }

  .decision-console .decision-step,
  .decision-console .decision-step-a,
  .decision-console .decision-step-b,
  .decision-console .decision-step-c,
  .decision-console .decision-step-d {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 1rem;
    min-height: 0;
    padding: 1.8rem 1.25rem 2.2rem;
    border-right: 0;
  }

  .decision-console .decision-marker {
    width: 2.65rem;
    height: 2.65rem;
    margin: 0;
  }

  .decision-console .decision-step h3,
  .decision-console .decision-step:nth-child(n) h3 {
    min-height: 0;
    margin: 0.65rem 0 0.8rem;
    font-size: clamp(2.2rem, 10.5vw, 3.1rem);
  }

  .decision-footer {
    gap: 1rem;
    padding: 1rem;
    font-size: 0.48rem;
    letter-spacing: 0.14em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .console-bar i { animation: none; }
}

html,
body {
  background: var(--bg);
}

body {
  background-image: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

body::after {
  opacity: 0.1;
  mix-blend-mode: screen;
}

/* Header sits inside the central stage, leaving the page index untouched. */
.site-header {
  z-index: 60;
  isolation: isolate;
  transform: translateZ(0);
  top: 20px;
  right: clamp(12rem, 19.5vw, 15.5rem);
  left: calc(var(--sidebar-w) + var(--page-x));
  height: var(--header-h);
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  padding: 0 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 1.8rem;
  background: rgba(2, 2, 2, 0.83);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(14px);
}

.brand {
  gap: 0;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
}

.brand-die {
  display: none;
}

.header-nav {
  gap: clamp(1.35rem, 2.8vw, 2.6rem);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
}

.header-nav a,
.footer-links a,
.footer-links button {
  color: rgba(241, 241, 239, 0.6);
}

.header-nav a::after,
.footer-links a::after,
.footer-links button::after {
  background: var(--ink);
}

.button {
  border-color: rgba(241, 241, 239, 0.2);
  background: transparent;
  color: var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(241, 241, 239, 0.45);
  background: rgba(241, 241, 239, 0.07);
  color: var(--ink);
}

.button-large,
.button-light {
  border-color: var(--ink);
  background: var(--ink);
  color: #090909;
}

.button-large:hover,
.button-large:focus-visible,
.button-light:hover,
.button-light:focus-visible {
  border-color: #d8d8d5;
  background: #d8d8d5;
  color: #090909;
}

.page-index {
  top: 50%;
  width: calc(var(--sidebar-w) - 1rem);
  transform: translateY(-43%);
}

.page-index > p,
.index-key,
.chapter-label,
.project div > span,
.build-block > span,
.contact-aside span,
.system-column > span,
.heatmap-meta,
.heatmap-legend {
  color: rgba(241, 241, 239, 0.35);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
}

.page-index ol {
  gap: 0.46rem;
}

.page-index a {
  grid-template-columns: 1.45rem 1fr;
  min-height: 27px;
  gap: 0.6rem;
  color: rgba(241, 241, 239, 0.28);
  font-size: 0.73rem;
}

.page-index a span {
  color: rgba(241, 241, 239, 0.18);
  font-size: 0.5rem;
}

.page-index a.active,
.page-index a:hover,
.page-index a:focus-visible {
  color: var(--ink);
}

.page-index a.active span {
  color: rgba(241, 241, 239, 0.72);
}

.index-key {
  color: rgba(241, 241, 239, 0.32);
}

.index-key span:first-child {
  color: rgba(241, 241, 239, 0.7);
}

.sound-toggle {
  top: 2.65rem;
  bottom: auto;
  color: rgba(241, 241, 239, 0.32);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
}

.sound-toggle.playing,
.sound-toggle:focus-visible {
  color: var(--ink);
}

@media (hover: hover) {
  .sound-toggle:hover { color: var(--ink); }
}

/* The central ruled plane is visible through every transparent chapter. */
main,
.site-footer {
  margin-left: calc(var(--sidebar-w) + var(--page-x));
}

main {
  position: relative;
  z-index: 2;
  background-image: linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-position: -1px 0;
  background-size: 25% 100%;
}

.chapter {
  scroll-margin-top: 0;
}

.section,
.hero {
  z-index: 4;
  background-color: transparent;
}

/* Persistent WebGL stage. Page content stays above it, as on the reference. */
.dice-stage {
  position: fixed;
  z-index: 3;
  top: 0;
  right: 0;
  bottom: 0;
  left: calc(var(--sidebar-w) + var(--page-x));
  opacity: 0.92;
  transform: none;
  cursor: default;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1), filter 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

body[data-active-chapter="00"] .dice-stage {
  opacity: 1;
  cursor: grab;
  pointer-events: auto;
}

body[data-active-chapter="00"] .dice-stage:active {
  cursor: grabbing;
}

body:not([data-active-chapter="00"]) .dice-stage {
  opacity: 0.34;
}

body:not([data-active-chapter="00"]) #dice-canvas {
  filter: grayscale(1) brightness(0.46) contrast(1.22);
}

body[data-active-chapter="04"] .dice-stage,
body[data-active-chapter="05"] .dice-stage {
  opacity: 0.12;
}

#dice-canvas {
  filter: grayscale(1) contrast(1.07);
}

.dice-instruction {
  color: rgba(241, 241, 239, 0.36);
  font-size: 0.64rem;
  letter-spacing: 0.25em;
}

body:not([data-active-chapter="00"]) .dice-instruction {
  opacity: 0;
}

.dice-instruction b {
  color: rgba(241, 241, 239, 0.62);
}

.hero {
  min-height: 100dvh;
  grid-template-columns: minmax(360px, 0.78fr) minmax(460px, 1.22fr);
  padding: 8.5rem var(--page-x) 4rem;
}

.hero::before {
  display: none;
}

.hero-copy {
  z-index: 5;
  max-width: 37rem;
}

.chapter-label span:first-child {
  color: rgba(241, 241, 239, 0.81);
}

.hero h1 {
  margin-top: 1.15rem;
  font-size: clamp(5rem, 8.5vw, 7.35rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.94;
}

.hero h1 em {
  color: var(--ink);
  font-weight: 400;
}

.hero-tagline {
  margin-top: 1.65rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  line-height: 1.2;
}

.hero-description {
  max-width: 31rem;
  margin-top: 1rem;
  color: rgba(241, 241, 239, 0.56);
  font-size: 0.94rem;
  line-height: 1.65;
}

.scroll-indicator {
  color: rgba(241, 241, 239, 0.35);
  font-size: 0.64rem;
  letter-spacing: 0.25em;
}

.scroll-indicator i::after {
  background: var(--ink);
}

.section {
  min-height: 100dvh;
  padding: clamp(8rem, 12vw, 10.5rem) var(--page-x) clamp(8.5rem, 13vw, 11.5rem);
}

.section-heading h2,
.studio-copy h2,
.faq-title h2,
.system-intro h2,
.contact-copy h2,
.build-manifesto h2 {
  max-width: 12ch;
  margin: 1.2rem 0 1.15rem;
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.95;
  text-wrap: balance;
}

.section-heading > p:last-child,
.system-intro > p:last-child,
.contact-copy > p:last-of-type,
.studio-copy > p:not(.chapter-label) {
  color: rgba(241, 241, 239, 0.55);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* Editorial rules replace the original bento treatment in the stats chapter. */
.numbers-section {
  grid-template-columns: minmax(280px, 0.82fr) minmax(440px, 1.18fr);
  gap: clamp(4rem, 9vw, 8rem);
}

.numbers-section::after,
.services-section::after,
.implementation-section::after,
.process-section::after,
.faq-section::after,
.activity-section::after,
.contact-section::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 2, 2, 0.34), rgba(2, 2, 2, 0.68));
  content: "";
  pointer-events: none;
}

.stats-grid {
  display: block;
  margin: 0;
  border-top: 1px solid rgba(241, 241, 239, 0.62);
  border-left: 0;
  background: rgba(2, 2, 2, 0.18);
}

.stat,
.stat-wide {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(8rem, 0.65fr) 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-right: 0;
  border-bottom: 1px solid rgba(241, 241, 239, 0.62);
  background: transparent;
}

.stat dt {
  color: rgba(241, 241, 239, 0.46);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
}

.stat dd {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  align-items: baseline;
  gap: 0.8rem;
}

.stat strong {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
}

.stat dd span {
  color: rgba(241, 241, 239, 0.55);
  font-size: 0.78rem;
}

.stat-accent {
  background: transparent;
  color: var(--ink);
}

.stat-accent dt,
.stat-accent dd span {
  color: rgba(241, 241, 239, 0.55);
}

.services-section .section-heading {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.service-row {
  min-height: 128px;
  border-color: rgba(241, 241, 239, 0.26);
}

.service-row:hover {
  padding-right: 1rem;
  padding-left: 1rem;
  background: rgba(241, 241, 239, 0.025);
}

.service-row > span,
.service-row:hover i {
  color: rgba(241, 241, 239, 0.72);
}

.service-row h3 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.service-row p {
  color: rgba(241, 241, 239, 0.5);
  font-size: 0.84rem;
}

/* 02: an asymmetric decision field, not a repeated service list. */
.clarity-field {
  position: relative;
  min-height: 49rem;
  max-width: 82rem;
  margin: 0 auto;
  isolation: isolate;
}

.clarity-path,
.decision-route-line {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.clarity-path path,
.decision-route-line path {
  fill: none;
  stroke: rgba(241, 241, 239, 0.22);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke-dashoffset 1.35s cubic-bezier(0.23, 1, 0.32, 1);
}

body[data-active-chapter="02"] .clarity-path path,
body[data-active-chapter="03"] .decision-route-line path {
  stroke-dashoffset: 0;
}

.clarity-point {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(16rem, 0.95fr) minmax(13rem, 0.65fr);
  gap: 2.5rem;
  width: min(60%, 45rem);
  padding-top: 1rem;
  border-top: 1px solid rgba(241, 241, 239, 0.68);
}

.clarity-point::before {
  position: absolute;
  top: -5px;
  left: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(241, 241, 239, 0.9);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}

.clarity-point-a { top: 1rem; left: 0; }
.clarity-point-b { top: 15rem; right: 0; width: min(53%, 40rem); }
.clarity-point-c { top: 31rem; left: 14%; width: min(64%, 48rem); }

.clarity-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: rgba(241, 241, 239, 0.42);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.clarity-point h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 5.1vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.86;
}

.clarity-point-b h3 { font-size: clamp(2.8rem, 4.4vw, 4.8rem); }
.clarity-point-c h3 { font-size: clamp(3.2rem, 5.5vw, 6rem); }

.clarity-point p {
  align-self: end;
  max-width: 28rem;
  margin: 0 0 0.3rem;
  color: rgba(241, 241, 239, 0.54);
  font-size: 0.84rem;
  line-height: 1.7;
}

.implementation-section {
  background: transparent;
}

.build-stack {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-color: var(--line);
  background: rgba(2, 2, 2, 0.42);
}

.build-block {
  min-height: 300px;
  border-color: var(--line);
  background: transparent;
}

.build-block::before {
  border-color: rgba(241, 241, 239, 0.55);
}

.build-block:hover {
  transform: none;
  background: rgba(241, 241, 239, 0.025);
}

.build-block h3 {
  font-size: clamp(1.55rem, 2.15vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.build-block p {
  color: rgba(241, 241, 239, 0.48);
}

/* 03: the method is a routed decision, not four equal feature cards. */
.decision-route {
  position: relative;
  min-height: 46rem;
  max-width: 82rem;
  margin: clamp(4rem, 8vw, 7rem) auto 0;
  padding: 0;
  list-style: none;
  isolation: isolate;
}

.decision-step {
  position: absolute;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  width: min(38%, 29rem);
}

.decision-step-a { top: 1.75rem; left: 0; }
.decision-step-b { top: 10.25rem; left: 42%; }
.decision-step-c { top: 24rem; left: 15%; }
.decision-step-d { right: 0; bottom: 0.8rem; width: min(42%, 32rem); }

.decision-marker {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgba(241, 241, 239, 0.54);
  border-radius: 50%;
  background: var(--bg);
  color: rgba(241, 241, 239, 0.74);
  font-size: 0.61rem;
  letter-spacing: 0.16em;
}

.decision-step > div {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(241, 241, 239, 0.55);
}

.decision-step > div > span {
  color: rgba(241, 241, 239, 0.4);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.decision-step h3 {
  max-width: 9ch;
  margin: 1.1rem 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 3.8vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.92;
}

.decision-step p {
  max-width: 27rem;
  margin: 0;
  color: rgba(241, 241, 239, 0.5);
  font-size: 0.8rem;
  line-height: 1.7;
}

.work-grid {
  background: rgba(241, 241, 239, 0.16);
}

.project {
  background: var(--bg);
}

.project img {
  filter: grayscale(1) brightness(0.64) contrast(1.22);
}

.project:hover img,
.project:focus-visible img {
  filter: grayscale(1) brightness(0.78) contrast(1.18);
}

.project > div {
  min-height: 168px;
}

.project h3 {
  font-size: clamp(1.9rem, 3vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.project:not(.project-featured) h3 {
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
}

.project p,
.studio-copy > p:not(.chapter-label),
.timeline p,
.accordion-panel p,
.system-column p,
.system-result p {
  color: rgba(241, 241, 239, 0.5);
}

.project:hover div > i,
.project:focus-visible div > i {
  color: var(--ink);
}

.studio-orbit {
  border-color: rgba(241, 241, 239, 0.16);
  background: radial-gradient(circle, rgba(241, 241, 239, 0.055), transparent 37%);
}

.orbit-center {
  background: var(--ink);
  color: #090909;
}

.orbit-node {
  border-color: rgba(241, 241, 239, 0.16);
  background: #050505;
  color: rgba(241, 241, 239, 0.64);
}

.timeline li,
.accordion-item,
.contact-aside,
.contact-aside > div {
  border-color: rgba(241, 241, 239, 0.26);
}

.timeline > li > span,
.accordion-item.open button i,
.accordion-item.open button i::after {
  color: rgba(241, 241, 239, 0.75);
  background: rgba(241, 241, 239, 0.75);
}

.timeline h3,
.accordion-item button span {
  font-weight: 400;
  letter-spacing: -0.015em;
}

.system-section {
  background-color: transparent;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
}

.system-column,
.system-result {
  border-color: rgba(241, 241, 239, 0.22);
  background: rgba(2, 2, 2, 0.86);
}

.system-operator {
  color: rgba(241, 241, 239, 0.72);
}

.system-result {
  background: var(--ink);
  color: #090909;
}

.system-result p {
  color: rgba(9, 9, 9, 0.62);
}

.mini-die {
  border-color: rgba(9, 9, 9, 0.58);
}

.heatmap-wrap {
  border-color: rgba(241, 241, 239, 0.22);
  background: rgba(2, 2, 2, 0.66);
}

.heatmap i,
.heatmap-legend i {
  border-color: rgba(241, 241, 239, 0.04);
  background: #101010;
}

.heatmap i[data-level="1"],
.heatmap-legend i[data-level="1"] { background: #353535; }

.heatmap i[data-level="2"],
.heatmap-legend i[data-level="2"] { background: #777; }

.heatmap i[data-level="3"],
.heatmap-legend i[data-level="3"] { background: #d7d7d4; }

.contact-section {
  background: radial-gradient(circle at 24% 48%, rgba(241, 241, 239, 0.035), transparent 30rem);
}

.contact-copy h2 {
  max-width: 9ch;
  font-size: clamp(3.8rem, 6.7vw, 5.75rem);
}

.contact-aside a:hover {
  color: var(--ink);
}

.site-footer {
  color: rgba(241, 241, 239, 0.42);
}

.cookie-consent {
  right: clamp(7rem, 20vw, 15rem);
  left: calc(var(--sidebar-w) + var(--page-x) + clamp(2rem, 5vw, 5rem));
  max-width: 720px;
  border-color: rgba(241, 241, 239, 0.17);
  border-radius: 0;
  background: rgba(5, 5, 5, 0.97);
}

.cookie-copy > p:nth-child(2) {
  color: rgba(241, 241, 239, 0.72);
}

:focus-visible {
  outline-color: var(--gilt);
}

@media (max-width: 1180px) {
  :root {
    --sidebar-w: 166px;
    --page-x: clamp(1.5rem, 3vw, 2.25rem);
  }

  .site-header {
    right: 2.25rem;
  }

  .hero h1 {
    font-size: clamp(4.8rem, 8.9vw, 6.6rem);
  }
}

@media (max-width: 920px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    top: 0;
    right: 0;
    left: 0;
    grid-template-columns: 1fr auto;
    padding: 0 var(--page-x);
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .brand-die {
    display: none;
  }

  main,
  .site-footer {
    margin-left: 0;
  }

  main {
    background-size: 33.333% 100%;
  }

  .dice-stage {
    left: 0;
  }

  .sound-toggle {
    top: auto;
    bottom: 1rem;
  }

  .dice-instruction {
    bottom: 4rem;
  }

  body:not([data-active-chapter="00"]) .dice-stage {
    opacity: 0.1;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-h) + 3.25rem);
  }

  .clarity-field {
    display: grid;
    gap: 4.5rem;
    min-height: 0;
  }

  .clarity-path,
  .decision-route-line {
    display: none;
  }

  .clarity-point,
  .clarity-point-a,
  .clarity-point-b,
  .clarity-point-c {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
  }

  .decision-route {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem 2.5rem;
    min-height: 0;
  }

  .decision-step,
  .decision-step-a,
  .decision-step-b,
  .decision-step-c,
  .decision-step-d {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
  }

  .decision-step-b,
  .decision-step-d {
    transform: translateY(5rem);
  }

  .numbers-section,
  .studio-section,
  .process-section,
  .faq-section,
  .activity-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .cookie-consent {
    right: clamp(1rem, 6vw, 4rem);
    left: clamp(1rem, 6vw, 4rem);
  }
}

@media (max-width: 640px) {
  :root {
    --page-x: 1.2rem;
  }

  body {
    font-size: 14px;
  }

  .sound-toggle {
    top: auto;
    bottom: 1rem;
  }

  .dice-stage {
    top: 43%;
    left: 18%;
    transform: translateX(19%);
  }

  .clarity-field {
    gap: 3.75rem;
  }

  .clarity-point {
    grid-template-columns: 1fr;
    gap: 1.3rem;
    padding-left: 1.5rem;
  }

  .clarity-point h3,
  .clarity-point-b h3,
  .clarity-point-c h3 {
    font-size: clamp(3.15rem, 15vw, 4.5rem);
  }

  .clarity-point p {
    max-width: 29rem;
  }

  .decision-route {
    grid-template-columns: 1fr;
    gap: 3.75rem;
  }

  .decision-step,
  .decision-step-b,
  .decision-step-d {
    grid-template-columns: 2.65rem 1fr;
    transform: none;
  }

  .decision-marker {
    width: 2.65rem;
    height: 2.65rem;
  }

  .decision-step h3 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }

  .hero h1 {
    font-size: clamp(4.35rem, 21vw, 6rem);
    line-height: 0.96;
  }

  .hero-tagline {
    max-width: 78%;
    font-size: 1.25rem;
  }

  .hero-description {
    max-width: 72%;
    font-size: 0.82rem;
  }

  .section-heading h2,
  .studio-copy h2,
  .faq-title h2,
  .system-intro h2,
  .build-manifesto h2 {
    font-size: clamp(2.65rem, 13vw, 3.8rem);
  }

  .stats-grid {
    border-top-color: rgba(241, 241, 239, 0.45);
  }

  .stat,
  .stat-wide {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 0;
  }

  .stat dd {
    grid-template-columns: 4rem 1fr;
  }

  .service-row h3 {
    font-size: 1.9rem;
  }

  .contact-copy h2 {
    font-size: clamp(3.7rem, 19vw, 5.2rem);
  }

  .cookie-consent {
    right: 0.75rem;
    left: 0.75rem;
  }
}
