/* =========================================================
   KLARITEE — Sense-making walk
   journey.css — trail/expedition layout + editorial components.
   Builds only on tokens from colors_and_type.css.
   ========================================================= */

:root {
  --spine-w: 248px;
  --ledger-w: 440px;
  --masthead-h: 57px;
}

html, body { height: 100%; }
body { overflow: hidden; }              /* the stage scrolls, not the page */

/* hairline helper that respects theme */
.hair { background: var(--rule-color); }

/* ---------------------------------------------------------
   MASTHEAD
   --------------------------------------------------------- */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--masthead-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  padding: 0 var(--sp-4) 0 var(--sp-5);
  background: var(--surface);
  border-top: var(--rule-thick) solid var(--ink);
  border-bottom: var(--rule-thin) solid var(--rule-color);
}
.masthead__brand { display: flex; align-items: baseline; gap: var(--sp-3); min-width: 0; }
.wordmark {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg1); white-space: nowrap;
}
.masthead__sep { width: 1px; height: 14px; background: var(--rule-color-soft); }
.masthead__session {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.masthead__tools { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }

/* small square chrome buttons */
.chrome-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 34px; padding: 0 12px;
  background: transparent; color: var(--fg1);
  border: var(--rule-thin) solid var(--ink); border-radius: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.chrome-btn:hover { background: var(--hover-overlay); }
.chrome-btn:active { transform: translateY(1px); }
.chrome-btn--icon { width: 34px; padding: 0; justify-content: center; }
.chrome-btn .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--ink); color: var(--surface);
  font-size: 11px; letter-spacing: 0; margin-left: 2px;
}
.chrome-btn .count.is-signal { background: var(--signal); color: #fff; }

/* ---------------------------------------------------------
   SHELL  (spine | stage)
   --------------------------------------------------------- */
.shell {
  position: fixed; inset: var(--masthead-h) 0 0 0;
  display: grid; grid-template-columns: var(--spine-w) 1fr;
}

/* ---------- the TRAIL SPINE ---------- */
.spine {
  position: relative;
  border-right: var(--rule-thin) solid var(--rule-color);
  background: var(--surface);
  padding: var(--sp-5) 0 var(--sp-5) 0;
  overflow-y: auto;
}
.spine__head {
  padding: 0 var(--sp-4) var(--sp-4) var(--sp-5);
  display: flex; flex-direction: column; gap: 6px;
}
.spine__title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg2); }
.spine__progress { font-family: var(--font-mono); font-size: 11px; color: var(--fg3); letter-spacing: 0.06em; }

.trail { position: relative; padding: var(--sp-3) 0; }
/* the path line runs through the nodes */
.trail__line {
  position: absolute; left: calc(var(--sp-5) + 6px); top: 0; bottom: 0; width: 1px;
  background: var(--rule-color-soft);
}
.trail__line--walked {
  position: absolute; left: calc(var(--sp-5) + 6px); top: 0; width: 1px;
  background: var(--ink);
  transition: height var(--dur-slow) var(--ease);
}

.waypoint {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px;
  align-items: start;
  padding: 11px var(--sp-4) 11px var(--sp-5);
  cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left;
  font-family: inherit; color: inherit;
  transition: background var(--dur-fast) var(--ease);
}
.waypoint:hover:not(.is-locked) { background: var(--hover-overlay); }
.waypoint.is-locked { cursor: default; opacity: 0.4; }
.waypoint:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }

.node {
  width: 13px; height: 13px; margin-top: 2px; position: relative; z-index: 2;
  border: 1.5px solid var(--ink); background: var(--surface);
  transition: all var(--dur) var(--ease);
}
.waypoint.is-locked .node { border-color: var(--fog); }
.waypoint.is-done .node { background: var(--ink); }
.waypoint.is-current .node {
  border-color: var(--signal); background: var(--surface);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--signal);
}
.waypoint__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.waypoint__num { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--fg2); }
.waypoint.is-current .waypoint__num { color: var(--signal); }
.waypoint__name { font-size: 15px; font-weight: var(--fw-medium); letter-spacing: -0.01em; line-height: 1.2; }
.waypoint__key { font-size: 12px; color: var(--fg2); line-height: 1.3; }
.waypoint__marks {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg3);
  letter-spacing: 0.04em; margin-top: 3px;
}
.waypoint.is-done .waypoint__marks { color: var(--fg2); }

.spine__foot {
  margin-top: var(--sp-5); padding: var(--sp-4) var(--sp-4) 0 var(--sp-5);
  border-top: var(--rule-thin) solid var(--rule-color-soft);
}
.spine__spineline {
  font-family: var(--font-serif); font-style: italic; font-size: 14px;
  line-height: 1.5; color: var(--fg2);
}

/* ---------------------------------------------------------
   STAGE  (the scrollable content surface)
   --------------------------------------------------------- */
.stage { position: relative; overflow-y: auto; overflow-x: hidden; }
.stage__inner {
  max-width: 920px; margin: 0 auto;
  padding: clamp(40px, 6vh, 96px) var(--gutter) 200px var(--gutter);
}

/* arrival header of a stage */
.arrival { display: flex; flex-direction: column; gap: var(--sp-4); }
.arrival__coord {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg2);
}
.arrival__coord .dash { width: 28px; height: 1px; background: var(--ink); }
.arrival__title { font-size: clamp(48px, 7vw, 72px); font-weight: var(--fw-black); line-height: 0.95; letter-spacing: -0.035em; }
.arrival__lede { font-size: var(--fs-body-l); line-height: 1.55; color: var(--fg2); max-width: 60ch; }

/* the three questions of a stage */
.questions { display: flex; flex-direction: column; gap: 2px; margin-top: var(--sp-2); }
.q {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline;
  padding: 10px 0; border-top: var(--rule-thin) solid var(--rule-color-soft);
}
.q:last-child { border-bottom: var(--rule-thin) solid var(--rule-color-soft); }
.q__i { font-family: var(--font-mono); font-size: 11px; color: var(--fg3); letter-spacing: 0.08em; }
.q__t { font-size: var(--fs-h3); font-weight: var(--fw-medium); letter-spacing: -0.01em; color: var(--fg1); }

/* section divider with eyebrow */
.section { margin-top: clamp(48px, 8vh, 96px); }
.section__eyebrow {
  display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg2);
}
.section__eyebrow .dash { flex: 1; height: 1px; background: var(--rule-color-soft); }

/* arrival/explainer microcopy block */
.note {
  border-left: var(--rule-thick) solid var(--ink);
  padding: 4px 0 4px var(--sp-4); color: var(--fg2);
  font-size: var(--fs-body); line-height: 1.6; max-width: 62ch;
}
.note--signal { border-left-color: var(--signal); }

/* pull-quote (editorial reframe) */
.pull {
  border-left: var(--rule-thick) solid var(--ink);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; letter-spacing: -0.01em;
  color: var(--fg1); max-width: 26ch;
}

/* ---------- SIGNAL CARDS (Listening) · click to open ---------- */
.signal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border-top: var(--rule-thin) solid var(--rule-color); border-left: var(--rule-thin) solid var(--rule-color); }
.signal {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4); min-height: 150px;
  border-right: var(--rule-thin) solid var(--rule-color);
  border-bottom: var(--rule-thin) solid var(--rule-color);
  background: var(--surface);
  transition: background var(--dur-fast) var(--ease);
}
.signal:hover { background: var(--hover-overlay); }
.signal.is-marked, .signal.is-marked:hover { background: var(--surface-alt); }
.signal__open {
  display: flex; flex-direction: column; gap: var(--sp-3); flex: 1;
  background: transparent; border: 0; padding: 0; margin: 0; width: 100%;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.signal__open[disabled] { cursor: default; }
.signal__open:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
.signal__src { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg3); }
.signal__t { font-size: 17px; line-height: 1.42; letter-spacing: -0.01em; color: var(--fg1); }
.signal[data-kind="quote"] .signal__t { font-weight: var(--fw-medium); }
.signal[data-kind="obs"] .signal__t { color: var(--fg2); font-style: normal; }
.signal__more { font-size: 14px; line-height: 1.55; color: var(--fg2); padding-top: var(--sp-3); border-top: var(--rule-thin) dotted var(--rule-color-soft); }
.signal__marks { display: flex; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-3); }

/* small mark toggle (important / surprising) */
.mark {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; background: transparent;
  border: var(--rule-thin) solid var(--rule-color-soft); border-radius: 0;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg2); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.mark:hover { border-color: var(--ink); color: var(--fg1); }
.mark .glyph { width: 9px; height: 9px; border: 1.5px solid currentColor; display: inline-block; }
.mark.important.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.mark.important.on .glyph { background: var(--surface); border-color: var(--surface); }
.mark.surprising.on { background: var(--signal); border-color: var(--signal); color: #fff; }
.mark.surprising.on .glyph { background: #fff; border-color: #fff; border-radius: 50%; }

/* ---------- CHOICE LIST · select control + click-to-expand ---------- */
.choices { display: flex; flex-direction: column; border-top: var(--rule-thin) solid var(--rule-color); }
.choice { border-bottom: var(--rule-thin) solid var(--rule-color); transition: background var(--dur-fast) var(--ease); }
.choice:hover { background: var(--hover-overlay); }
.choice.is-on, .choice.is-on:hover { background: var(--surface-alt); }
.choice__row { display: grid; grid-template-columns: auto 1fr auto; align-items: start; }
.choice__select {
  display: flex; align-items: flex-start; cursor: pointer;
  background: transparent; border: 0; padding: var(--sp-4) var(--sp-3);
}
.choice__select:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.choice__box {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  border: 1.5px solid var(--ink); background: var(--surface);
  position: relative; transition: all var(--dur-fast) var(--ease);
}
.choice__select:hover .choice__box { border-color: var(--signal); }
.choice.is-on .choice__box { background: var(--signal); border-color: var(--signal); }
.choice.is-on .choice__box::after { content: ""; position: absolute; inset: 3px; background: #fff; }
.choice--radio .choice__box { border-radius: 50%; }
.choice--radio.is-on .choice__box::after { border-radius: 50%; }
.choice__main {
  min-width: 0; display: flex; flex-direction: column; gap: 5px;
  text-align: left; background: transparent; border: 0; color: inherit; font: inherit;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 0; cursor: default;
}
.choice.can-open .choice__main { cursor: pointer; }
.choice.can-open .choice__main:hover .choice__t { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--fog); }
.choice__main:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.choice__t { font-size: var(--fs-h3); font-weight: var(--fw-medium); letter-spacing: -0.01em; line-height: 1.25; color: var(--fg1); }
.choice__d { font-size: var(--fs-body); color: var(--fg2); line-height: 1.5; max-width: 60ch; }
.choice__rank { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); margin-top: 2px; }
.choice.is-on .choice__rank { color: var(--signal); }
.choice__exp {
  display: flex; align-items: flex-start; cursor: pointer; color: var(--fg2);
  background: transparent; border: 0; padding: var(--sp-4) var(--sp-3);
}
.choice__exp:hover { color: var(--fg1); }
.choice__exp:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.choice__more {
  font-size: 15px; line-height: 1.6; color: var(--fg2);
  margin: 0 var(--sp-5) var(--sp-4) calc(var(--sp-3) + 18px + var(--sp-3));
  padding-top: var(--sp-3); border-top: var(--rule-thin) dotted var(--rule-color-soft);
  max-width: 64ch;
}

/* ---------- SCALE (Transformation) ---------- */
.scale { padding: var(--sp-5) 0; border-bottom: var(--rule-thin) solid var(--rule-color-soft); }
.scale__head { display: flex; flex-direction: column; gap: 3px; margin-bottom: var(--sp-4); }
.scale__name { font-size: var(--fs-h2); font-weight: var(--fw-medium); letter-spacing: -0.015em; }
.scale__attr { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg2); }
.scale__track { position: relative; height: 56px; margin: var(--sp-3) 0; }
.scale__rail { position: absolute; left: 0; right: 0; top: 27px; height: 1px; background: var(--rule-color-soft); }
.scale__stops { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; }
.scale__stop { width: 1px; height: 9px; background: var(--rule-color-soft); }
/* gap fill between today & tomorrow */
.scale__gap { position: absolute; top: 27px; height: 3px; margin-top: -1px; background: var(--signal); opacity: 0.28; transition: all var(--dur) var(--ease); }
/* draggable handles */
.handle {
  position: absolute; top: 27px; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: grab; touch-action: none;
}
.handle:active { cursor: grabbing; }
.handle__dot { width: 16px; height: 16px; border: 1.5px solid var(--ink); background: var(--surface); transition: transform var(--dur-fast) var(--ease); }
.handle.today .handle__dot { background: var(--ink); }
.handle.tomorrow .handle__dot { background: var(--surface); border-color: var(--signal); box-shadow: inset 0 0 0 3px var(--signal); }
.handle:hover .handle__dot { transform: scale(1.18); }
.handle__lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg2); white-space: nowrap; position: absolute; top: 18px; }
.handle.today .handle__lbl { color: var(--fg1); }
.handle.tomorrow .handle__lbl { color: var(--signal); }
.scale__ends { display: flex; justify-content: space-between; gap: var(--sp-5); margin-top: var(--sp-2); }
.scale__end { font-size: 13px; color: var(--fg2); line-height: 1.45; max-width: 34ch; }
.scale__end.hi { text-align: right; }
.scale__gapread { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--signal); margin-top: var(--sp-2); }

/* ---------- VISION line ---------- */
.vision-line {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(28px, 4vw, 42px); line-height: 1.18; letter-spacing: -0.01em;
  color: var(--fg1); max-width: 22ch;
}

/* ---------- TEXT MARK (write into the ledger) ---------- */
.textmark { display: flex; flex-direction: column; gap: var(--sp-3); }
.textmark__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg2); }
.textmark textarea {
  width: 100%; background: transparent; color: var(--fg1);
  border: var(--rule-thin) solid var(--ink); border-radius: 0;
  padding: var(--sp-4); font-family: var(--font-serif); font-size: 22px; line-height: 1.45;
  outline: none; resize: vertical; min-height: 96px;
}
.textmark textarea::placeholder { color: var(--fg3); font-style: italic; }
.textmark textarea:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.textmark__hint { font-size: 13px; color: var(--fg3); }

/* ---------- IMAGES (Integration sensory) ---------- */
.images { display: grid; gap: 0; border-top: var(--rule-thin) solid var(--rule-color); }
.image-row {
  display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-5);
  padding: var(--sp-5) 0; border-bottom: var(--rule-thin) solid var(--rule-color);
}
.image-row__h { font-family: var(--font-serif); font-style: italic; font-size: 28px; letter-spacing: -0.01em; color: var(--fg1); }
.image-row__t { font-size: var(--fs-body-l); line-height: 1.55; color: var(--fg2); max-width: 56ch; }

/* identity block */
.identity {
  border: var(--rule-thin) solid var(--ink); background: var(--surface-alt);
  padding: var(--sp-6); margin-top: var(--sp-5);
}
.identity__eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); margin-bottom: var(--sp-4); }
.identity__t { font-size: clamp(22px, 2.8vw, 30px); font-weight: var(--fw-medium); line-height: 1.4; letter-spacing: -0.015em; }

/* ---------- ADVANCE (the gated continue) ---------- */
.advance {
  margin-top: clamp(56px, 9vh, 112px); padding-top: var(--sp-5);
  border-top: var(--rule-thick) solid var(--ink);
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap;
}
.advance__meta { display: flex; flex-direction: column; gap: 6px; }
.advance__next { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg2); }
.advance__nexttitle { font-size: var(--fs-h2); font-weight: var(--fw-medium); letter-spacing: -0.015em; }
.advance__gate { font-family: var(--font-mono); font-size: 11px; color: var(--signal); letter-spacing: 0.04em; }
.advance__hint { font-family: var(--font-mono); font-size: 11px; color: var(--fg3); letter-spacing: 0.04em; max-width: 52ch; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px; border-radius: 0; cursor: pointer;
  font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-medium); letter-spacing: 0.01em;
  border: var(--rule-thin) solid var(--ink); background: transparent; color: var(--fg1);
  transition: background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn--primary:hover { background: var(--ink-hover); }
.btn--ghost:hover { background: var(--hover-overlay); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:hover .arrow { transform: none; }
.btn:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

.btn-text {
  background: transparent; border: 0; padding: 8px 2px; cursor: pointer;
  font-family: var(--font-sans); font-size: 14px; font-weight: var(--fw-medium); color: var(--fg1);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-text span.u { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.btn-text:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------------------------------------------------------
   REVEAL — quiet rise, gated. Visibility flips instantly via the
   `.in` class (no opacity transition — those freeze in backgrounded
   tabs and would strand content invisible). Only the slide is a
   transition; if it freezes, content is still fully visible.
   --------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(12px); transition: transform var(--dur-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------
   LEDGER DRAWER
   --------------------------------------------------------- */
.ledger-scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,10,10,0.28);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease);
}
.ledger-scrim.open { opacity: 1; pointer-events: auto; }
.ledger {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
  width: min(var(--ledger-w), 92vw);
  background: var(--surface); border-left: var(--rule-thick) solid var(--ink);
  transform: translateX(100%); transition: transform var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.ledger.open { transform: none; }
.ledger__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5); border-bottom: var(--rule-thin) solid var(--ink);
}
.ledger__title { display: flex; flex-direction: column; gap: 4px; }
.ledger__title h3 { font-size: 20px; font-weight: var(--fw-bold); letter-spacing: -0.02em; }
.ledger__title .sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg2); }
.ledger__body { overflow-y: auto; padding: var(--sp-4) var(--sp-5) var(--sp-7); flex: 1; }
.ledger__empty { color: var(--fg3); font-size: 14px; line-height: 1.6; margin-top: var(--sp-5); font-style: italic; font-family: var(--font-serif); }

.ledger-group { margin-bottom: var(--sp-5); }
.ledger-group__head {
  display: flex; align-items: baseline; gap: 10px; padding-bottom: var(--sp-2);
  border-bottom: var(--rule-thin) solid var(--rule-color); margin-bottom: var(--sp-3);
}
.ledger-group__num { font-family: var(--font-mono); font-size: 10px; color: var(--fg3); letter-spacing: 0.1em; }
.ledger-group__name { font-size: 14px; font-weight: var(--fw-medium); letter-spacing: -0.01em; }
.ledger-entry { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.ledger-entry__k { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg3); }
.ledger-entry__v { font-size: 14px; line-height: 1.45; color: var(--fg1); }
.ledger-entry__v.serif { font-family: var(--font-serif); font-style: italic; font-size: 16px; }
.ledger-entry .dot { color: var(--signal); }

/* ---------------------------------------------------------
   RECEIPT (closing artifact)
   --------------------------------------------------------- */
.receipt {
  border: var(--rule-thin) solid var(--ink); background: var(--surface);
  max-width: 620px; margin: var(--sp-5) 0 0;
}
.receipt__top { padding: var(--sp-5) var(--sp-5) var(--sp-4); border-bottom: var(--rule-thin) dashed var(--rule-color); text-align: center; }
.receipt__mark { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg2); }
.receipt__title { font-size: 30px; font-weight: var(--fw-black); letter-spacing: -0.03em; margin: var(--sp-2) 0 6px; }
.receipt__meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--fg3); }
.receipt__rows { padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; }
.receipt-row { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 11px 0; border-bottom: var(--rule-thin) dotted var(--rule-color-soft); }
.receipt-row:last-child { border-bottom: 0; }
.receipt-row__n { font-family: var(--font-mono); font-size: 10px; color: var(--fg3); letter-spacing: 0.06em; padding-top: 3px; }
.receipt-row__b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.receipt-row__k { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg2); }
.receipt-row__v { font-size: 14px; line-height: 1.4; color: var(--fg1); }
.receipt-row__v em { font-family: var(--font-serif); font-size: 16px; }
.receipt__foot { padding: var(--sp-4) var(--sp-5) var(--sp-5); border-top: var(--rule-thin) dashed var(--rule-color); text-align: center; display: flex; flex-direction: column; gap: var(--sp-2); }
.receipt__hash { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--fg2); word-break: break-all; }
.receipt__stamp {
  align-self: center; margin-top: var(--sp-2); padding: 8px 18px;
  border: 2px solid var(--signal); color: var(--signal);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  transform: rotate(-3deg);
}

/* ---------------------------------------------------------
   Responsive — collapse spine under 980px
   --------------------------------------------------------- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .spine { display: none; }
}

/* ---------------------------------------------------------
   HOME / TRAILHEAD
   --------------------------------------------------------- */
.home {
  position: fixed; inset: var(--masthead-h) 0 0 0; overflow-y: auto;
  background: var(--surface);
}
.home__inner { max-width: var(--max-content); margin: 0 auto; padding: clamp(40px, 7vh, 104px) var(--gutter) 120px; }

.hero {
  position: relative; min-height: 60vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--sp-6);
}
.hero__main { max-width: none; }
.hero__eyebrow {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg2); margin-bottom: var(--sp-5);
}
.hero__eyebrow-dash { width: 40px; height: 1px; background: var(--ink); }
.hero__title {
  font-size: clamp(42px, 6.4vw, 86px); font-weight: var(--fw-black);
  line-height: 0.95; letter-spacing: -0.04em; color: var(--fg1);
  margin: 0 0 var(--sp-5); text-wrap: balance; max-width: 15ch;
}
.hero__title .serif-em { font-weight: 400; letter-spacing: -0.01em; }
.hero__sub {
  font-size: var(--fs-body-l); line-height: 1.6; color: var(--fg2);
  max-width: 60ch; margin-bottom: var(--sp-6);
}
.hero__cta { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }

/* marker card (flows below the hero copy; corner-pinned on wide screens) */
.marker {
  border: var(--rule-thin) solid var(--ink); background: var(--surface);
  padding: var(--sp-4); width: 100%; max-width: 300px; margin-top: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
@media (min-width: 1041px) {
  .marker { position: absolute; bottom: 0; right: 0; width: 248px; max-width: none; margin-top: 0; }
}
.marker__row { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; }
.marker__k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg2); }
.marker__v { font-size: 13px; font-weight: var(--fw-medium); color: var(--fg1); text-align: right; }
.marker__rule { height: 1px; background: var(--rule-color); margin: var(--sp-2) 0; }
.marker__sig { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg1); }

.home__spine-quote { margin: clamp(56px, 10vh, 120px) 0 0; }
.home__spine-quote .pull { max-width: 40ch; }

/* trail preview map */
.trailmap { margin-top: clamp(56px, 9vh, 104px); }
.trailmap__list { border-top: var(--rule-thin) solid var(--rule-color); }
.tm-row {
  width: 100%; text-align: left; cursor: pointer; background: transparent;
  border: 0; border-bottom: var(--rule-thin) solid var(--rule-color);
  display: grid; grid-template-columns: 56px 24px 1fr auto; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-2); font-family: inherit; color: inherit;
  transition: background var(--dur-fast) var(--ease), padding-left var(--dur) var(--ease);
}
.tm-row:hover:not(.is-ahead) { background: var(--hover-overlay); padding-left: var(--sp-4); }
.tm-row:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.tm-row.is-ahead { cursor: default; }
.tm-row.is-ahead .tm-row__title, .tm-row.is-ahead .tm-row__q { color: var(--fg3); }
.tm-row__num { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; color: var(--fg2); }
.tm-row__node { width: 12px; height: 12px; border: 1.5px solid var(--ink); background: var(--surface); }
.tm-row.is-done .tm-row__node { background: var(--ink); }
.tm-row.is-ahead .tm-row__node { border-color: var(--fog); }
.tm-row__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-row__title { font-size: var(--fs-h2); font-weight: var(--fw-medium); letter-spacing: -0.015em; line-height: 1.1; }
.tm-row__q { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--fg2); }
.tm-row__state { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); white-space: nowrap; }
.tm-row.is-done .tm-row__state { color: var(--fg1); }

.home__foot {
  margin-top: clamp(48px, 8vh, 88px); padding-top: var(--sp-4);
  border-top: var(--rule-thin) solid var(--rule-color-soft);
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg2);
}
.home__foot-sep { width: 1px; height: 12px; background: var(--rule-color-soft); }
.home__reset { margin-left: auto; color: var(--fg2); }

@media (max-width: 880px) {
  .hero { padding-top: var(--sp-4); }
  .tm-row { grid-template-columns: 40px 16px 1fr auto; }
}

/* utility */
.stack { display: flex; flex-direction: column; }
.muted { color: var(--fg2); }
.serif-em { font-family: var(--font-serif); font-style: italic; }
