/* Query me — Living Archive site system.
   Shared evolution: ivory + bottle green + brass + graphite.
   Green = active/routed. Brass = canonical/persistent. Gray = dormant/cold. */

:root {
  --paper:        #f4f1e8;
  --paper-raised: #fcfaf4;
  --paper-sunk:   #ebe8df;
  --ink:          #171c1a;
  --ink-soft:     #3f4944;
  --ink-faint:    #5c6761;
  --rule:         #d8d4c8;
  --rule-strong:  #171c1a;
  --accent:       #1f5145;
  --accent-deep:  #143a32;
  --mark:         #c28a22;

  --la-canvas: #f4f1e8;
  --la-surface: #fcfaf4;
  --la-graphite: #171c1a;
  --la-slate: #58635d;
  --la-green: #1f5145;
  --la-forest: #143a32;
  --la-brass: #c28a22;
  --la-brass-soft: #d2aa5a;
  --la-dormant: #64706a;
  --la-rule: #d8d4c8;
}

body.living-archive-site {
  position: relative;
  background: var(--la-canvas);
  color: var(--la-graphite);
}

.living-archive-site .btn--primary,
.living-archive-site .btn--primary:hover {
  color: #fffdf7;
}

.living-archive-site .masthead {
  background: color-mix(in srgb, var(--la-canvas) 94%, white 6%);
}

.living-archive-site .wordmark {
  position: relative;
  padding-left: 1.05rem;
}

.living-archive-site .wordmark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--la-brass);
  transform: translateY(-50%);
}

.living-archive-site .issueline {
  background: #eeece4;
}

.living-archive-site .nav a[aria-current="page"] {
  position: relative;
  color: var(--la-green);
}

.living-archive-site .nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  background: var(--la-brass);
}

.living-archive-site .nav a.btn--primary[aria-current="page"] {
  color: #fffdf7;
}

.living-archive-site .nav a.btn--primary[aria-current="page"]::after {
  display: none;
}

.living-archive-site main {
  position: relative;
  isolation: isolate;
}

/* ---------- shared interior language ---------- */
.living-archive-site:not(.home-living-archive) main > section:first-child {
  position: relative;
  overflow: clip;
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(3.25rem, 6vw, 5.25rem);
}

.living-archive-site:not(.home-living-archive) main > section:first-child::after {
  content: "";
  position: absolute;
  left: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  bottom: clamp(1.75rem, 3vw, 2.75rem);
  width: clamp(4.5rem, 9vw, 8rem);
  height: 1px;
  background: linear-gradient(90deg, var(--la-brass), color-mix(in srgb, var(--la-brass) 20%, transparent));
}

.living-archive-site:not(.home-living-archive) .page-title {
  max-width: 15ch;
  font-size: clamp(2.75rem, 6vw, 5.25rem);
  line-height: 0.99;
  letter-spacing: -0.04em;
  margin-bottom: 1.35rem;
}

.living-archive-site:not(.home-living-archive) .eyebrow--accent {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--la-green);
}

.living-archive-site:not(.home-living-archive) .eyebrow--accent::before {
  content: "◆";
  color: var(--la-brass);
  font-size: 0.62rem;
}

.living-archive-site .band {
  background: color-mix(in srgb, var(--paper-sunk) 82%, var(--la-surface) 18%);
}

.living-archive-site .section-head h2 {
  max-width: 18ch;
}

.living-archive-site .section-head .eyebrow {
  color: var(--la-green);
}

.living-archive-site .btn {
  transition: transform 130ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.living-archive-site .btn:active {
  transform: scale(0.97);
}

.living-archive-site .rulelist > div {
  position: relative;
  padding-left: 1.2rem;
}

.living-archive-site .rulelist > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.9rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--la-brass);
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms ease;
}

.living-archive-site .numbered > div,
.living-archive-site .evidence__col {
  border-top-color: var(--la-rule);
}

.living-archive-site .numbered .num {
  color: var(--la-green);
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.living-archive-site .tree,
.living-archive-site .tablewrap,
.living-archive-site .figure__frame,
.living-archive-site .offer {
  box-shadow: 0 18px 44px rgba(23, 28, 26, 0.045);
}

.living-archive-site .tree__row--head,
.living-archive-site thead th {
  background: #f0eee7;
}

.living-archive-site .tree__row,
.living-archive-site tbody tr,
.living-archive-site .offer,
.living-archive-site .faq details {
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.living-archive-site .tree__row:not(.tree__row--head):hover,
.living-archive-site tbody tr:hover {
  background: #f2f6f1;
}

.living-archive-site .tree__row:not(.tree__row--head):hover .tree__name,
.living-archive-site tbody tr:hover th {
  color: var(--la-green);
}

.living-archive-site td.is-ours,
.living-archive-site thead th.is-ours {
  background: #edf3ef;
}

.living-archive-site thead th.is-ours {
  color: var(--la-green);
  box-shadow: inset 0 -2px var(--la-green);
}

.living-archive-site td.is-ours {
  box-shadow: inset 2px 0 color-mix(in srgb, var(--la-green) 50%, transparent);
}

.living-archive-site .offer--feature {
  position: relative;
  border-color: var(--la-green);
}

.living-archive-site .offer--feature::before {
  content: "◆ canonical offer";
  position: absolute;
  right: 1.1rem;
  top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #745321;
}

.living-archive-site .offer--feature .offer__kicker,
.living-archive-site .flow__node--core .flow__label {
  color: var(--la-green);
}

.living-archive-site .offer li::before,
.living-archive-site .faq summary::after {
  color: var(--la-green);
}

.living-archive-site .flow__node--source {
  border-left: 3px solid var(--la-brass);
}

.living-archive-site .flow__node--core {
  border-color: var(--la-green);
  background: #f2f6f1;
}

.living-archive-site .flow__stamp {
  color: #745321;
}

.living-archive-site .flow__link path {
  stroke: var(--la-green);
}

.living-archive-site .flow__loop {
  border-top-color: color-mix(in srgb, var(--la-green) 42%, transparent);
  color: var(--la-green);
}

.living-archive-site .evidence__col--yes h3,
.living-archive-site .evidence__col--yes li::before {
  color: var(--la-green);
}

.living-archive-site .evidence__col--no li::before,
.living-archive-site .tag--pending {
  color: var(--la-dormant);
}

.living-archive-site .evidence__col--no h3 {
  color: var(--la-slate);
}

/* ---------- evidence as a measured ledger ---------- */
.metric-ledger {
  display: grid;
  gap: 1px;
  background: var(--la-rule);
  border: 1px solid var(--la-rule);
  box-shadow: 0 18px 44px rgba(23, 28, 26, 0.045);
}

.metric-chart {
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(18rem, 1.18fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: 0;
  padding: clamp(1.35rem, 3.2vw, 2.35rem);
  background: var(--la-surface);
  align-items: center;
}

.metric-chart figcaption {
  display: grid;
  gap: 0.45rem;
}

.metric-chart figcaption strong {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  line-height: 1.08;
  font-weight: 500;
}

.metric-chart figcaption > span:last-child,
.metric-chart__note {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.52;
}

.metric-chart__index {
  font-family: var(--mono);
  color: var(--la-green);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-chart__plot {
  display: grid;
  gap: 0.8rem;
}

.metric-bar {
  display: grid;
  grid-template-columns: 4.6rem minmax(7rem, 1fr) 5.2rem;
  gap: 0.75rem;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.76rem;
}

.metric-bar__label {
  color: var(--ink-faint);
}

.metric-bar strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--la-graphite);
  text-align: right;
}

.metric-bar__track {
  display: block;
  height: 0.72rem;
  background: #e5e2da;
  overflow: hidden;
}

.metric-bar__fill {
  display: block;
  height: 100%;
  transform-origin: left center;
}

.metric-bar__fill--100 { width: 100%; }
.metric-bar__fill--46 { width: 46%; }
.metric-bar__fill--41 { width: 41%; }
.metric-bar__fill--35 { width: 35%; }
.metric-bar__fill--active { background: var(--la-green); }
.metric-bar__fill--dormant { background: var(--la-dormant); }

.metric-chart__note {
  grid-column: 2;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--la-rule);
  font-family: var(--sans);
  font-size: 0.7rem;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--la-rule);
}

.proof-strip > div {
  position: relative;
  padding: 1.25rem clamp(1rem, 2.5vw, 1.6rem);
  border-right: 1px solid var(--la-rule);
}

.proof-strip > div:last-child { border-right: 0; }
.proof-strip > div::before {
  content: "";
  position: absolute;
  top: -2px;
  left: clamp(1rem, 2.5vw, 1.6rem);
  width: 2.1rem;
  height: 3px;
  background: var(--la-brass);
}

.proof-strip dt {
  font-family: var(--mono);
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  color: var(--la-green);
}

.proof-strip dd {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
}

.evidence-details {
  max-width: 52rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.evidence-details details { border-top: 1px solid var(--la-rule); }
.evidence-details details:last-child { border-bottom: 1px solid var(--la-rule); }
.evidence-details summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
}
.evidence-details summary::-webkit-details-marker { display: none; }
.evidence-details summary::after {
  content: "+";
  position: absolute;
  right: 0.35rem;
  color: var(--la-green);
  font-size: 1.2rem;
}
.evidence-details details[open] summary::after { content: "−"; }
.evidence-details details > div { padding: 0 2.5rem 1.2rem 0; color: var(--ink-soft); max-width: var(--measure); }

.evidence-roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: evidence-step;
  border-block: 1px solid var(--la-rule);
}

.evidence-roadmap li {
  counter-increment: evidence-step;
  display: grid;
  gap: 0.45rem;
  padding: 1.25rem clamp(1rem, 2.4vw, 1.5rem);
  border-right: 1px solid var(--la-rule);
}
.evidence-roadmap li:last-child { border-right: 0; }
.evidence-roadmap li::before {
  content: "0" counter(evidence-step);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #745321;
}
.evidence-roadmap strong { font-size: 1.08rem; font-weight: 500; }
.evidence-roadmap span { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }

/* ---------- how it works: state and route trace ---------- */
.route-trace {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  border-top: 1px solid var(--la-rule);
}
.route-trace li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.6rem;
  padding: 1rem;
  border-right: 1px solid var(--la-rule);
}
.route-trace li:last-child { border-right: 0; }
.route-trace span { grid-row: 1 / span 2; font-family: var(--mono); font-size: 0.68rem; color: #745321; }
.route-trace strong { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--la-green); }
.route-trace small { color: var(--ink-soft); font-size: 0.78rem; line-height: 1.45; }

.living-archive-site .tree__row {
  grid-template-columns: minmax(13rem, 19rem) minmax(0, 1fr) minmax(6rem, 8rem);
}
.tree__state {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tree__row--head .tree__state { font-family: var(--sans); color: var(--ink-faint); }
.tree__state--active { color: var(--la-green); }
.tree__state--canonical { color: #745321; }
.tree__state--dormant { color: var(--la-dormant); }

.living-archive-site:not(.home-living-archive) .page-title--compact {
  max-width: 18ch;
  font-size: clamp(2.6rem, 5vw, 4.35rem);
}

.living-archive-site .faq details[open] {
  background: color-mix(in srgb, var(--la-surface) 78%, var(--la-green) 2%);
}

.living-archive-site .faq details[open] summary {
  color: var(--la-green);
}

.living-archive-site .policy > h2 {
  position: relative;
  padding-top: 0.85rem;
  border-top: 1px solid var(--la-rule);
}

.living-archive-site .policy > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 2.75rem;
  height: 3px;
  background: var(--la-brass);
}

.living-archive-site .notice {
  border: 1px solid var(--la-rule);
  border-left: 3px solid var(--la-brass);
  background: var(--la-surface);
}

.living-archive-site .release-card {
  border-color: var(--la-rule);
  border-top-color: var(--la-green);
}

.living-archive-site footer {
  background: var(--paper-sunk);
}

@media (hover: hover) {
  .living-archive-site .rulelist > div:hover::before {
    transform: translateX(4px);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--la-brass) 14%, transparent);
  }

  .living-archive-site .offer:hover {
    transform: translateY(-3px);
  }
}

@media (min-width: 1280px) {
  .living-archive-site:not(.home-living-archive) main::before,
  .living-archive-site:not(.home-living-archive) main::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: clamp(20rem, 27vw, 30rem);
    bottom: 8%;
    width: calc(max(0px, (100vw - var(--shell)) / 2) + 1.25rem);
    pointer-events: none;
    opacity: 0.52;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 88%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 88%, transparent);
  }

  .living-archive-site:not(.home-living-archive) main::before {
    left: 0;
    background:
      radial-gradient(ellipse at 0 11%, color-mix(in srgb, var(--la-green) 12%, transparent) 0 11%, transparent 11.5%),
      radial-gradient(circle at 68% 31%, var(--la-brass) 0 2px, transparent 3px),
      radial-gradient(ellipse at 14% 63%, color-mix(in srgb, var(--la-green) 10%, transparent) 0 8%, transparent 8.5%),
      repeating-linear-gradient(0deg, transparent 0 9.5rem, color-mix(in srgb, var(--la-rule) 62%, transparent) 9.5rem 9.55rem);
  }

  .living-archive-site:not(.home-living-archive) main::after {
    right: 0;
    background:
      radial-gradient(circle at 31% 16%, var(--la-brass-soft) 0 2px, transparent 3px),
      radial-gradient(ellipse at 100% 43%, color-mix(in srgb, var(--la-green) 12%, transparent) 0 12%, transparent 12.5%),
      radial-gradient(ellipse at 62% 79%, color-mix(in srgb, var(--la-green) 9%, transparent) 0 7%, transparent 7.5%),
      repeating-linear-gradient(0deg, transparent 0 11.8rem, color-mix(in srgb, var(--la-rule) 60%, transparent) 11.8rem 11.85rem);
  }
}

.home-living-archive .hero--living {
  padding-top: clamp(3rem, 6vw, 5.75rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: clip;
}

/* Diffuse archive fragments occupy the wide side field without framing the page. */
@media (min-width: 1120px) {
  .home-living-archive main::before,
  .home-living-archive main::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: clamp(22rem, 34vw, 34rem);
    bottom: clamp(13rem, 10vw, 20rem);
    width: calc(max(0px, (100vw - var(--shell)) / 2) + clamp(1rem, 1.8vw, 2.25rem));
    pointer-events: none;
    opacity: 0.68;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 91%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 91%, transparent);
  }

  .home-living-archive main::before {
    left: 0;
    background:
      radial-gradient(circle at 18% 7%, var(--la-brass) 0 2px, transparent 3px),
      radial-gradient(ellipse at 0 19%, color-mix(in srgb, var(--la-green) 15%, transparent) 0 12%, transparent 12.5%),
      radial-gradient(ellipse at 58% 36%, color-mix(in srgb, var(--la-green) 11%, transparent) 0 8%, transparent 8.5%),
      radial-gradient(circle at 72% 58%, var(--la-brass-soft) 0 2px, transparent 3px),
      radial-gradient(ellipse at 9% 78%, color-mix(in srgb, var(--la-green) 13%, transparent) 0 10%, transparent 10.5%),
      linear-gradient(73deg, transparent 0 48%, color-mix(in srgb, var(--la-green) 22%, transparent) 48% 48.25%, transparent 48.25%) 0 10rem / 72% 22rem no-repeat,
      repeating-linear-gradient(0deg, transparent 0 8.6rem, color-mix(in srgb, var(--la-rule) 68%, transparent) 8.6rem 8.65rem);
  }

  .home-living-archive main::after {
    right: 0;
    background:
      radial-gradient(ellipse at 100% 10%, color-mix(in srgb, var(--la-green) 13%, transparent) 0 14%, transparent 14.5%),
      radial-gradient(circle at 34% 27%, var(--la-brass) 0 2px, transparent 3px),
      radial-gradient(ellipse at 69% 48%, color-mix(in srgb, var(--la-green) 10%, transparent) 0 9%, transparent 9.5%),
      radial-gradient(circle at 91% 69%, var(--la-brass-soft) 0 2px, transparent 3px),
      radial-gradient(ellipse at 32% 88%, color-mix(in srgb, var(--la-green) 14%, transparent) 0 11%, transparent 11.5%),
      linear-gradient(107deg, transparent 0 51%, color-mix(in srgb, var(--la-green) 20%, transparent) 51% 51.25%, transparent 51.25%) 100% 18rem / 76% 24rem no-repeat,
      repeating-linear-gradient(0deg, transparent 0 10.8rem, color-mix(in srgb, var(--la-rule) 65%, transparent) 10.8rem 10.85rem);
  }
}

.home-living-archive .hero__grid--living {
  grid-template-columns: minmax(0, 0.92fr) minmax(32rem, 1.08fr);
  gap: clamp(2.5rem, 6vw, 6.5rem);
  align-items: center;
}

.home-living-archive .hero__copy {
  max-width: 39rem;
}

.home-living-archive .hero--living h1 {
  max-width: 10.5ch;
  font-size: clamp(3rem, 6.5vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 1.5rem;
}

.home-living-archive .hero__lede--living {
  max-width: 39ch;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.62;
  color: var(--la-slate);
}

.home-living-archive .hero__lede--living strong {
  color: var(--la-graphite);
  font-weight: 650;
}

.home-living-archive .hero__note--living {
  max-width: 44ch;
  border-left: 2px solid var(--la-brass-soft);
  padding-left: 0.9rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--la-slate);
  margin-bottom: 2rem;
}

/* ---------- the recurring product object ---------- */
.living-memory {
  margin: 0;
}

.memory-system {
  position: relative;
  isolation: isolate;
  background: var(--la-surface);
  border: 1px solid var(--la-rule);
  box-shadow: 0 24px 60px rgba(23, 28, 26, 0.08);
}

.memory-system::before,
.memory-system::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid var(--la-rule);
  background: var(--la-canvas);
}

.memory-system::before {
  transform: translate(10px, 10px);
}

.memory-system::after {
  transform: translate(20px, 20px);
  opacity: 0.55;
}

.memory-system__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid var(--la-rule);
  background: #f8f6ef;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--la-slate);
}

.memory-system__canonical {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #745321;
  font-weight: 600;
}

.memory-system__canonical::before {
  content: "◆";
  color: var(--la-brass);
  font-size: 0.73rem;
}

.memory-system__body {
  display: grid;
  grid-template-columns: 8.25rem minmax(0, 1fr);
  min-height: 27rem;
}

.story-index {
  margin: 0;
  padding: 1.25rem 0.9rem;
  list-style: none;
  border-right: 1px solid var(--la-rule);
  background: #f6f4ed;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--la-dormant);
}

.story-index li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.56rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--la-rule) 68%, transparent);
}

.story-index li:last-child {
  border-bottom: 0;
}

.story-index .is-current {
  color: var(--la-green);
  font-weight: 600;
}

.story-index .is-complete {
  color: var(--la-slate);
}

.story-index .is-complete::after {
  content: "◆";
  color: var(--la-brass);
  font-size: 0.48rem;
  align-self: center;
  justify-self: end;
}

.memory-workspace {
  min-width: 0;
  padding: 1rem 1rem 1.15rem;
}

.memory-query {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.9rem;
  background: #f1f3ee;
  border: 1px solid #d7ddd7;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--la-graphite);
}

.memory-query__agent {
  font-family: var(--mono);
  color: var(--la-green);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.memory-route {
  position: relative;
  height: 1.35rem;
  margin-left: 1.2rem;
  border-left: 1px solid var(--la-green);
}

.memory-route::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--la-green);
}

.memory-directory {
  border: 1px solid var(--la-rule);
  background: var(--la-surface);
}

.memory-row {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--la-rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--la-dormant);
}

.memory-row:last-child {
  border-bottom: 0;
}

.memory-row__branch {
  color: var(--la-dormant);
}

.memory-row__state {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.memory-row--active {
  position: relative;
  color: var(--la-graphite);
  background: #f2f6f1;
}

@media (hover: hover) {
  .living-memory:hover .memory-row--active {
    transform: translateX(4px);
  }

  .living-memory:hover .memory-excerpt {
    background: #fffaf0;
    border-left-color: var(--la-brass);
  }

}

.memory-row--active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 3px;
  background: var(--la-green);
}

.memory-row--active .memory-row__branch,
.memory-row--active .memory-row__state {
  color: var(--la-green);
}

.memory-excerpt {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--la-brass);
  background: #faf8f1;
}

.memory-excerpt__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.52rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--la-slate);
}

.memory-excerpt__meta strong {
  color: #745321;
  font-weight: 600;
}

.memory-excerpt p {
  font-size: 0.93rem;
  line-height: 1.48;
  color: var(--la-graphite);
}

.memory-readers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--la-slate);
}

.memory-reader {
  padding: 0.28rem 0.48rem;
  border: 1px solid var(--la-rule);
  background: #f8f6ef;
}

.memory-reader--ready {
  border-color: #b7c8bd;
  color: var(--la-green);
  background: #f1f5f1;
}

.memory-reader--ready::before {
  content: "✓ ";
}

.living-memory figcaption {
  max-width: 46rem;
  margin-top: 1rem;
  padding-left: 0.1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--la-slate);
}

/* A distinct lower chapter: navigation becomes a deep archive index, not another ivory section. */
.home-living-archive .explore-chapter {
  position: relative;
  overflow: clip;
  background: var(--la-forest);
  color: #f8f4e9;
  border-block: 1px solid #0d2a24;
}

.home-living-archive .explore-chapter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(248, 244, 233, 0.07) calc(25% - 1px) 25%);
}

.home-living-archive .explore-chapter .shell {
  position: relative;
  z-index: 1;
}

.home-living-archive .explore-chapter .eyebrow,
.home-living-archive .explore-chapter .rulelist h3 a {
  color: #f8f4e9;
}

.home-living-archive .explore-chapter .section-head p,
.home-living-archive .explore-chapter .rulelist p {
  color: #cbd7d1;
}

.home-living-archive .explore-chapter .rulelist > div {
  border-color: rgba(248, 244, 233, 0.2);
}

.home-living-archive .explore-chapter .rulelist > div::before {
  background: var(--la-brass);
  box-shadow: 0 0 0 3px rgba(194, 138, 34, 0.19);
}

.home-living-archive .explore-chapter a:focus-visible {
  outline-color: #f8f4e9;
}

/* ---------- explanatory motion only ---------- */
@media (prefers-reduced-motion: no-preference) {
  .memory-query {
    animation: archive-query-in 520ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }

  .memory-route::after {
    animation: route-pulse 1.1s cubic-bezier(0.23, 1, 0.32, 1) 380ms both;
  }

  .memory-row--active {
    animation: active-record 620ms cubic-bezier(0.23, 1, 0.32, 1) 620ms both;
    transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 220ms ease;
  }

  .memory-excerpt {
    animation: archive-excerpt-in 560ms cubic-bezier(0.23, 1, 0.32, 1) 900ms both;
    transition: background-color 220ms ease, border-color 220ms ease;
  }

  .memory-readers {
    animation: archive-readers-in 420ms cubic-bezier(0.23, 1, 0.32, 1) 1.14s both;
  }

  .living-archive-site:not(.home-living-archive) .page-title {
    animation: archive-page-title-in 500ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}

@keyframes archive-query-in {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes route-pulse {
  0% { transform: translateY(-1rem); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes active-record {
  from { transform: translateX(-4px); box-shadow: inset 0 0 0 rgba(31, 81, 69, 0); opacity: 0.6; }
  to { transform: translateX(0); box-shadow: inset 14px 0 24px -24px rgba(31, 81, 69, 0.55); opacity: 1; }
}

@keyframes archive-excerpt-in {
  from { transform: translateY(5px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes archive-readers-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes archive-page-title-in {
  from { transform: translateY(7px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 960px) {
  .metric-chart { grid-template-columns: 1fr; }
  .metric-chart__note { grid-column: 1; }
  .proof-strip, .evidence-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-strip > div:nth-child(2) { border-right: 0; }
  .proof-strip > div:nth-child(-n + 2) { border-bottom: 1px solid var(--la-rule); }
  .evidence-roadmap li:nth-child(2) { border-right: 0; }
  .evidence-roadmap li:nth-child(-n + 2) { border-bottom: 1px solid var(--la-rule); }
  .living-archive-site .tree__row { grid-template-columns: minmax(0, 1fr); }
  .tree__state { margin-top: 0.2rem; }

  .home-living-archive .hero__grid--living {
    grid-template-columns: 1fr;
  }

  .home-living-archive .hero__copy {
    max-width: 46rem;
  }

  .home-living-archive .hero--living h1 {
    max-width: 12ch;
  }
}

@media (max-width: 620px) {
  .metric-bar { grid-template-columns: 3.5rem minmax(4rem, 1fr) 4.8rem; gap: 0.5rem; }
  .proof-strip, .evidence-roadmap, .route-trace { grid-template-columns: 1fr; }
  .proof-strip > div, .proof-strip > div:nth-child(2), .evidence-roadmap li, .evidence-roadmap li:nth-child(2), .route-trace li {
    border-right: 0;
    border-bottom: 1px solid var(--la-rule);
  }
  .proof-strip > div:last-child, .evidence-roadmap li:last-child, .route-trace li:last-child { border-bottom: 0; }
  .living-archive-site .offer--feature {
    padding-top: 3.35rem;
  }

  .living-archive-site .offer--feature::before {
    top: 1.1rem;
    left: 1.35rem;
    right: auto;
  }

  .home-living-archive .explore-chapter::after {
    display: none;
  }
  .memory-system__body {
    grid-template-columns: 1fr;
  }

  .story-index {
    display: flex;
    overflow-x: auto;
    gap: 0.85rem;
    border-right: 0;
    border-bottom: 1px solid var(--la-rule);
    padding: 0.75rem;
  }

  .story-index li {
    flex: 0 0 auto;
    display: flex;
    gap: 0.3rem;
    border: 0;
    padding: 0;
    white-space: nowrap;
  }

  .story-index .is-complete::after {
    margin-left: 0.2rem;
  }

  .memory-workspace {
    padding: 0.8rem;
  }

  .memory-system::before {
    transform: translate(6px, 6px);
  }

  .memory-system::after {
    display: none;
  }

  .memory-query {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .memory-excerpt__meta {
    display: grid;
    gap: 0.25rem;
  }
}
