/* =========================================================================
   ALMODARRESIEH — THE BLACK FIELD (v2)
   Outside of time. Asymmetry over grid. Typography over color.
   The line connects, not just divides. The name is a seal.
   ========================================================================= */

:root {
  --bg:        #07080b;
  --bg-deep:   #040507;
  --ink:       #e8e4dc;
  --ink-soft:  rgba(232, 228, 220, 0.55);
  --ink-mute:  rgba(232, 228, 220, 0.30);
  --ink-faint: rgba(232, 228, 220, 0.10);
  --ink-ghost: rgba(232, 228, 220, 0.04);
  --accent:    #8a7fb8;  /* appears ONCE only — in the glyph */
  --line:      rgba(232, 228, 220, 0.06);
  --line-mid:  rgba(232, 228, 220, 0.14);
  --line-conn: rgba(232, 228, 220, 0.20);

  --serif: "Source Serif Pro", "Charter", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(1.5rem, 5vw, 4rem);
  --maxw:   880px;
  --maxw-wide: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 16px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 350;
  line-height: 1.65;
  letter-spacing: 0.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 1px solid var(--ink-soft); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}
.wrap--wide { max-width: var(--maxw-wide); }

/* Asymmetric section padding — NOT uniform */
.section--void    { padding-block: clamp(7rem, 18vw, 14rem); }  /* vast breathing room */
.section--normal  { padding-block: clamp(4rem, 10vw, 7rem); }
.section--dense   { padding-block: clamp(2.5rem, 5vw, 4rem); }  /* compressed data */
.section--canyon  { padding-block: clamp(10rem, 24vw, 18rem); } /* dramatic pause */

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--ink); color: var(--bg);
  padding: 0.6rem 1rem; font-size: 0.85rem;
  z-index: 300; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Signature bar (materializes, doesn't fade) ---------- */
.signature-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 1.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  background: linear-gradient(180deg, rgba(7,8,11,0.92) 0%, rgba(7,8,11,0) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.signature-bar.visible {
  opacity: 1;
  transform: translateY(0);
}
.signature-bar > * { pointer-events: auto; }

.sig-mark {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sig-mark .glyph {
  width: 24px; height: 8px;
  color: var(--accent);
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 0.1rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0.3rem 0.5rem;
  transition: color 0.4s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-mid);
  align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.nav-toggle svg { width: 16px; height: 16px; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="false"] .icon-close { display: none; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; right: var(--gutter);
    flex-direction: column; gap: 0;
    background: var(--bg-deep);
    border: 1px solid var(--line-mid);
    padding: 0.4rem;
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s;
  }
  .nav-links[data-open="true"] { max-height: 60vh; }
  .nav-links a { padding: 0.7rem 1rem; }
}

/* ---------- THRESHOLD (first screen) — vast, constructed void ---------- */
.threshold {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem var(--gutter);
  position: relative;
}

/* The name as institutional seal — extreme letter-spacing, rule line, archival */
.seal {
  font-family: var(--mono);
  font-size: clamp(0.62rem, 0.55rem + 0.2vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(5rem, 14vw, 10rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.seal::before, .seal::after {
  content: "";
  flex: 0 0 2rem;
  height: 1px;
  background: var(--ink-faint);
}
.seal::after { flex: 1 1 auto; max-width: 16rem; }

/* The statement — monumental, no color, scale + silence only */
.statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1rem + 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 16ch;
}
.statement .line { display: block; }
/* No violet italic. Rhythm through scale + position only. */
.statement .unstable {
  font-style: italic;
  color: var(--ink);  /* same color — instability through form, not color */
  font-weight: 300;
}

/* ENTER as protocol — not a button, a command */
.enter-protocol {
  position: absolute;
  bottom: clamp(2rem, 5vw, 4rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  border: 1px solid var(--line-mid);
  background: transparent;
  transition: color 0.6s, border-color 0.6s, letter-spacing 0.6s;
}
.enter-protocol:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
  letter-spacing: 0.44em;
}
.enter-protocol .glyph-pulse {
  width: 24px; height: 8px;
  color: var(--ink-mute);
  opacity: 0.6;
  transition: opacity 0.6s;
}
.enter-protocol:hover .glyph-pulse { opacity: 1; color: var(--ink); }

/* The instrument (everything after ENTER) */
.instrument {
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.instrument.revealed { opacity: 1; }

/* ---------- The Line — connects, not just divides ---------- */
.line {
  height: 1px;
  background: var(--line-mid);
  width: 100%;
}
.line--void { margin-block: clamp(5rem, 12vw, 9rem); }
.line--tight { margin-block: clamp(2rem, 4vw, 3rem); }

/* A connecting line — horizontal, extends beyond container */
.line-connect {
  height: 1px;
  background: var(--line-conn);
  width: 100%;
  position: relative;
}
.line-connect::before {
  content: "";
  position: absolute;
  left: 0; top: -2px;
  width: 5px; height: 5px;
  background: var(--ink);
  border-radius: 50%;
}
.line-connect::after {
  content: "";
  position: absolute;
  right: 0; top: -2px;
  width: 5px; height: 5px;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
}

/* ---------- Coordinates (section markers) ---------- */
.coord {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.coord .num { color: var(--ink-soft); }
.coord::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 6rem;
}

/* ---------- Section titles — scale + silence, no color ---------- */
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: 22ch;
  margin-bottom: 1.5rem;
}
/* Emphasis through italic + weight, NEVER color */
.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink); /* same color */
}

.section-lede {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 50ch;
  line-height: 1.55;
}

/* ---------- The Field — asymmetric, not uniform grid ---------- */
.field-coords {
  margin-top: 2rem;
}
.field-coord {
  padding: clamp(1.8rem, 4vw, 2.8rem) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.08fr) minmax(0, 0.92fr);
  gap: 1.5rem;
  align-items: baseline;
  transition: padding-left 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.field-coord:first-child { border-top: 1px solid var(--line); }
.field-coord:hover, .field-coord:focus-within { padding-left: 1.2rem; }
/* Vary density — some coords are taller */
.field-coord--major { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.field-coord .num {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.field-coord .name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  color: var(--ink);
  letter-spacing: 0.01em;
  font-weight: 400;
}
.field-coord--major .name {
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.8rem);
}
.field-coord .name small {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mute);
  margin-top: 0.4rem;
  letter-spacing: 0;
  max-width: 40ch;
}
@media (max-width: 600px) {
  .field-coord { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---------- Questions — 3x architectural room, each a doorway ---------- */
.q-list {
  margin-top: 2rem;
}
.q-item {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;  /* much taller than before */
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.06fr) minmax(0, 0.94fr);
  gap: 1.5rem;
  align-items: baseline;
  position: relative;
  transition: padding-left 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.q-item:first-child { border-top: 1px solid var(--line); }
.q-item:hover, .q-item:focus-within { padding-left: 1.2rem; }
/* The connecting line that appears on hover — extends left */
.q-item::before {
  content: "";
  position: absolute;
  left: -2rem; top: 50%;
  width: 0; height: 1px;
  background: var(--ink-soft);
  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.q-item:hover::before, .q-item:focus-within::before { width: 1.5rem; }
@media (max-width: 600px) {
  .q-item { grid-template-columns: 1fr; gap: 0.5rem; }
}
.q-item .q-num {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.q-item .q-text {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
  font-weight: 400;
  max-width: 28ch;
}
/* Emphasis through italic + weight, NEVER color */
.q-item .q-text em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
}
.q-item .q-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 1rem;
  transition: color 0.4s;
}
.q-item .q-link:hover { color: var(--ink); }

/* ---------- Constructions — COMPRESSED dense index ---------- */
.c-index {
  margin-top: 2rem;
  /* Dense — almost a table, not spacious rows */
}
.c-row {
  border-bottom: 1px solid var(--line);
  position: relative;
}
.c-row:first-child { border-top: 1px solid var(--line); }
.c-row summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;  /* compressed */
  display: grid;
  grid-template-columns: minmax(0, 0.05fr) minmax(0, 0.45fr) minmax(0, 0.35fr) minmax(0, 0.15fr);
  gap: 1rem;
  align-items: baseline;
  transition: padding-left 0.4s, color 0.4s;
}
.c-row summary::-webkit-details-marker { display: none; }
.c-row summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 1.1rem;
  font-family: var(--mono);
  color: var(--ink-mute);
  font-size: 0.85rem;
  transition: transform 0.3s;
}
.c-row[open] summary::after { content: "−"; }
.c-row summary:hover { padding-left: 0.6rem; color: var(--ink); }
@media (max-width: 600px) {
  .c-row summary {
    grid-template-columns: minmax(0, 0.12fr) minmax(0, 0.88fr);
    gap: 0.4rem;
  }
  .c-row summary .premise, .c-row summary .status { grid-column: 2; }
}
.c-row .num {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.c-row .name {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.003em;
}
.c-row .premise {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
/* Epistemic status — typographic, not a badge. A condition of the text. */
.c-row .status {
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
  font-weight: 400;
}
/* Status affects the NAME's weight, not a colored tag */
.c-row .status[data-s="HYPOTHESIS"]    ~ * .name,
.c-row:has(.status[data-s="HYPOTHESIS"]) .name { font-weight: 300; font-style: italic; }
.c-row .status[data-s="REVISED"]       { color: var(--ink-soft); }
.c-row .status[data-s="EXPERIMENT"]    { color: var(--ink-soft); }

.c-detail {
  padding: 0 0 2rem 0;
  display: grid;
  grid-template-columns: minmax(0, 0.05fr) minmax(0, 0.95fr);
  gap: 1rem;
}
@media (max-width: 600px) { .c-detail { grid-template-columns: 1fr; } }
.c-detail .field { margin-bottom: 1rem; }
.c-detail .field-label {
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);  /* NOT accent — muted */
  display: block;
  margin-bottom: 0.3rem;
}
.c-detail .field-body {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.c-detail .field-body em { color: var(--ink); font-style: italic; font-weight: 300; }
.c-detail .field-body strong { color: var(--ink); font-weight: 400; }
.c-detail .repo {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink-faint);
}

/* ---------- Manuscript (Onturgism) ---------- */
.manuscript {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 58ch;
}
.manuscript p { margin-bottom: 1.4rem; }
.manuscript p:last-child { margin-bottom: 0; }
.manuscript em { color: var(--ink); font-style: italic; font-weight: 300; }
.manuscript strong { color: var(--ink); font-weight: 400; }
.manuscript .drop {
  font-size: 2.8rem;
  float: left;
  line-height: 0.9;
  margin-right: 0.5rem;
  margin-top: 0.2rem;
  color: var(--ink);
  font-style: italic;
  font-weight: 300;
}

.ontacture-block {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}
.ontacture-block .label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 1rem;
}
.ontacture-block .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
}

/* ---------- Possibility — thresholds with dying lines ---------- */
.possibility {
  margin-top: 2rem;
}
.p-step {
  display: grid;
  grid-template-columns: minmax(0, 0.08fr) minmax(0, 0.92fr);
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.p-step:first-child { border-top: 1px solid var(--line); }
.p-step:hover, .p-step:focus-within { padding-left: 1.2rem; }
.p-step::before {
  content: "";
  position: absolute;
  left: -2rem; top: 50%;
  width: 0; height: 1px;
  background: var(--ink-soft);
  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.p-step:hover::before, .p-step:focus-within::before { width: 1.5rem; }
@media (max-width: 600px) { .p-step { grid-template-columns: 1fr; gap: 0.3rem; } }
.p-step .stage-num {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.p-step .stage-name {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  color: var(--ink);
  letter-spacing: -0.003em;
}
.p-step .stage-name small {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mute);
  margin-top: 0.3rem;
  letter-spacing: 0;
}
/* Current stage — weight shift, not color */
.p-step[data-current="true"] .stage-name {
  font-weight: 400;
  font-style: italic;
}
.p-step[data-current="true"] .stage-num {
  color: var(--ink-soft);
}

/* The dying line between stages */
.p-step::after {
  content: "";
  position: absolute;
  left: 4rem;
  bottom: 0;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, var(--line-conn), transparent);
  opacity: 0.5;
}

/* ---------- The hidden question ---------- */
.hidden-question {
  padding: clamp(6rem, 14vw, 11rem) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-block: clamp(5rem, 12vw, 9rem);
}
.hidden-question p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.4rem);
  color: var(--ink-mute);
  line-height: 1.8;
  max-width: 32ch;
  margin-inline: auto;
}
.hidden-question p + p { margin-top: 1rem; }
.hidden-question .final {
  color: var(--ink-soft);
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: 2.5rem;
  display: block;
}

/* ---------- THE ENDING — massive, isolated, a release ---------- */
.ending {
  padding-block: clamp(10rem, 24vw, 18rem);
  text-align: center;
  /* No contact links here — those live on /trace/ only */
}
.ending .prompt {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.4rem + 4vw, 4.5rem);  /* 400% larger than before */
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 14ch;
  margin: 0 auto 2.5rem;
}
.ending .prompt em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
}
.ending .sub {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mute);
  max-width: 38ch;
  margin: 0 auto;
  line-height: 1.6;
}
/* The name at the very bottom — seal, isolated */
.ending .seal-final {
  margin-top: clamp(6rem, 14vw, 10rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.ending .seal-final .glyph {
  width: 24px; height: 8px;
  color: var(--accent);  /* the ONE place accent appears */
  opacity: 0.8;
}

/* ---------- Interior page head ---------- */
.page-head {
  padding-block: clamp(7rem, 16vw, 12rem) clamp(3rem, 6vw, 5rem);
}
.page-head .coord { margin-bottom: 2rem; }
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--ink);
  max-width: 18ch;
  margin-bottom: 1.5rem;
}
.page-head h1 em { font-style: italic; font-weight: 300; color: var(--ink); }
.page-head .lede {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.55;
}

/* ---------- Prose ---------- */
.prose { max-width: 58ch; }
.prose p {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.008em;
}
.prose h2 em { font-style: italic; font-weight: 300; color: var(--ink); }
.prose h3 {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 2rem 0 0.8rem;
}
.prose ul, .prose ol {
  margin-bottom: 1.6rem;
  padding-left: 1.3rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); font-weight: 400; }
.prose em { color: var(--ink); font-style: italic; font-weight: 300; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--ink-faint); }
.prose a:hover { border-bottom-color: var(--ink-soft); }
.prose blockquote {
  border-left: 1px solid var(--ink-soft);
  padding-left: 1.4rem;
  margin: 2rem 0;
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
}
.prose hr { border: none; border-top: 1px solid var(--line); margin: 3rem 0; }
.prose code { font-family: var(--mono); font-size: 0.85em; color: var(--ink-soft); }

/* ---------- Trace layers ---------- */
.trace-layer {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.12fr) minmax(0, 0.88fr);
  gap: 1.5rem;
}
.trace-layer:first-child { border-top: 1px solid var(--line); }
@media (max-width: 600px) { .trace-layer { grid-template-columns: 1fr; gap: 0.4rem; } }
.trace-layer .layer-depth {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.trace-layer .layer-content {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.trace-layer .layer-content strong { color: var(--ink); font-weight: 400; }
.trace-layer .layer-content em { color: var(--ink); font-style: italic; font-weight: 300; }
.trace-layer .layer-content a {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink-faint);
}

/* ---------- Contact channels (only on /trace/) ---------- */
.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2rem;
}
.channels a {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line-mid);
  padding: 0.5rem 0.9rem;
  transition: color 0.4s, border-color 0.4s;
}
.channels a:hover { color: var(--ink); border-color: var(--ink-soft); }

/* ---------- Misc ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ===================================================================
   EPISTEMIC COMPONENTS — Functional accent for state changes only
   =================================================================== */
:root {
  --accent-fn: #7A8B79;  /* muted sage — functional accent for interactions */
  --accent-fn-soft: rgba(122, 139, 121, 0.40);
}

/* ---------- COMPONENT 1: The Five Coordinates (caliper) ---------- */
.coords-instrument {
  position: relative;
  padding-block: 2rem;
}
.coords-axis {
  position: absolute;
  left: clamp(3rem, 8vw, 5rem);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ink-ghost);
  transition: background var(--dur-slow, 800ms) cubic-bezier(0.16, 1, 0.3, 1);
}
.coords-instrument:has(.coord-node:hover) .coords-axis,
.coords-instrument:has(.coord-node:focus-visible) .coords-axis {
  background: var(--ink-faint);
}
.coords-list { list-style: none; position: relative; }
.coord-node {
  display: grid;
  grid-template-columns: clamp(2rem, 6vw, 4rem) 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: clamp(1.8rem, 4vw, 2.8rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: default;
  transition: padding-left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.coord-node:first-child { border-top: 1px solid var(--line); }
.coord-node::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0; height: 1px;
  background: var(--accent-fn-soft);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.coord-node:hover::before, .coord-node:focus-visible::before {
  width: clamp(2rem, 6vw, 4rem);
}
.coord-node:hover, .coord-node:focus-visible {
  padding-left: 1rem; outline: none;
}
.coord-num {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  transition: color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.coord-node:hover .coord-num, .coord-node:focus-visible .coord-num {
  color: var(--accent-fn);
}
.coord-body { display: flex; align-items: baseline; gap: 0; flex-wrap: wrap; }
.coord-name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 300;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  transition: font-weight 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.coord-node:hover .coord-name, .coord-node:focus-visible .coord-name {
  font-weight: 500; color: var(--ink);
}
.coord-marginalia {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin-left: 0;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 120ms,
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 120ms,
              margin-left 0.6s cubic-bezier(0.16, 1, 0.3, 1) 120ms;
  white-space: nowrap;
}
.coord-node:hover .coord-marginalia, .coord-node:focus-visible .coord-marginalia {
  opacity: 1; transform: translateX(0); margin-left: 1.5rem;
}
@media (max-width: 720px) {
  .coords-axis { display: none; }
  .coord-node::before { display: none; }
  .coord-node { grid-template-columns: 1fr; gap: 0.3rem; }
  .coord-marginalia { white-space: normal; }
  .coord-node:hover .coord-marginalia, .coord-node:focus-visible .coord-marginalia { margin-left: 0; }
}

/* ---------- COMPONENT 2: The Six Thresholds (topological map) ---------- */
.thresh-instrument { position: relative; padding-block: 2rem; }
.thresh-controls { display: flex; gap: 0.6rem; margin-bottom: 4rem; }
.thresh-btn {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line-mid);
  background: transparent;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.thresh-btn:hover { color: var(--ink); border-color: var(--ink-soft); }
.thresh-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.thresh-list { list-style: none; position: relative; }
.thresh-node {
  display: grid;
  grid-template-columns: clamp(2rem, 5vw, 3rem) 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.8rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.thresh-node:first-child { border-top: 1px solid var(--line); }
.thresh-node { opacity: 0.22; }
.thresh-node[data-state="active"] { opacity: 1; }
.thresh-node[data-state="completed"] { opacity: 0.85; }
.thresh-marker {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
  transition: color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.thresh-node[data-state="completed"] .thresh-marker { color: var(--ink-soft); }
.thresh-node[data-state="active"] .thresh-marker { color: var(--accent-fn); }
.thresh-num {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  display: block;
  margin-bottom: 0.3rem;
  transition: color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.thresh-node[data-state="active"] .thresh-num,
.thresh-node[data-state="completed"] .thresh-num { color: var(--ink-soft); }
.thresh-name {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  font-weight: 300;
  color: var(--ink-soft);
  letter-spacing: -0.003em;
  transition: font-weight 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.thresh-node[data-state="active"] .thresh-name { font-weight: 400; color: var(--ink); }
.thresh-node[data-state="completed"] .thresh-name { font-weight: 400; color: var(--ink); }
.thresh-def {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mute);
  margin-top: 0.3rem;
  letter-spacing: 0;
  max-width: 42ch;
}
.thresh-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.thresh-node[data-state="active"] .thresh-grain { opacity: 1; }
.thresh-grain svg {
  position: absolute;
  top: 0; left: -10%;
  width: 120%; height: 100%;
  animation: grain-drift 20s linear infinite;
}
@keyframes grain-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-8%); }
}
@media (prefers-reduced-motion: reduce) { .thresh-grain svg { animation: none; } }
.thresh-path {
  position: absolute;
  left: clamp(1rem, 2.5vw, 1.5rem);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
@media (max-width: 720px) {
  .thresh-node { grid-template-columns: 1fr; gap: 0.3rem; }
  .thresh-path { left: 0.5rem; }
}
