/* ============================================================
   LIFE404 — site.css v4
   Signal archive. Quiet machine. Evidence room.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=DM+Sans:ital,opsz,wght@0,9..40,200;0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── TOKENS ── */
:root {
  --ink:         #09090b;
  --surface:     #101013;
  --surface2:    #16161a;
  --surface3:    #1c1c22;
  --surface4:    #222228;
  --border:      #21212a;
  --border2:     #2c2c38;
  --border3:     #38384a;
  --text:        #c4c4ce;
  --text2:       #787888;
  --text3:       #464658;
  --signal:      #5a8fa6;
  --signal-dim:  #38606e;
  --signal-glow: rgba(90,143,166,0.08);
  --amber:       #b08828;
  --amber-dim:   #6e561a;
  --dead:        #622e2e;
  --dead-text:   #b86a6a;
  --held:        #294838;
  --held-text:   #68a07a;
  --white:       #e4e4ee;

  --font-body: 'DM Sans', 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono: 'DM Mono', 'Fira Mono', 'Consolas', monospace;

  --gap:    1.5rem;
  --gap2:   3rem;
  --gap3:   4rem;
  --max:    1020px;
  --max-text: 680px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur:  0.25s;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.032'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.18;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ── TYPE SCALE ── */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 300; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 400; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 500; }
h4 { font-size: 0.95rem; font-weight: 500; letter-spacing: 0; }

p { color: var(--text); }
p + p { margin-top: 1em; }

/* ── UTILITY CLASSES ── */
.label {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.label-signal { color: var(--signal); }
.label-amber  { color: var(--amber); }
.label-dead   { color: var(--dead-text); }
.label-held   { color: var(--held-text); }

.mono    { font-family: var(--font-mono); font-size: 0.85em; }
.whisper { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.06em; color: var(--text3); opacity: 0.5; font-style: italic; }

.card-link    { display: block; color: inherit; text-decoration: none; }
.divider      { border: none; border-top: 1px solid var(--border); margin: var(--gap2) 0; }

/* ── LAYOUT ── */
.container      { max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }
.container--text{ max-width: var(--max-text); margin: 0 auto; padding: 0 var(--gap); }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,11,0.93);
  backdrop-filter: blur(14px) saturate(0.7);
  -webkit-backdrop-filter: blur(14px) saturate(0.7);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  height: 52px;
  gap: 2rem;
}

.nav__brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--white);
  flex-shrink: 0;
  opacity: 0.82;
  transition: opacity var(--dur);
}
.nav__brand:hover { opacity: 1; }
.nav__brand span  { color: var(--signal); animation: cursor-blink 1.4s step-end infinite; }

.nav__links { display: flex; gap: 0.25rem; flex: 1; }

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  transition: color var(--dur), background var(--dur);
}
.nav__link:hover     { color: var(--text); background: var(--surface2); }
.nav__link.is-active { color: var(--signal); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  margin-left: auto;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text2);
  transition: all var(--dur);
}

/* ── HERO ── */
.hero { padding: var(--gap3) 0 var(--gap2); border-bottom: 1px solid var(--border); }

.hero__kicker {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin-bottom: 1.5rem;
}

.hero__headline { margin-bottom: 1.75rem; }

.hero__sub {
  max-width: 500px;
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--text2);
  margin-bottom: 2.5rem;
}

.hero__coords {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  color: var(--text3);
}

/* ── SECTIONS ── */
.section { padding: var(--gap3) 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--gap2);
  gap: 1rem;
}

.section__title {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
}

.section__link {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-dim);
  border-bottom: 1px solid transparent;
  transition: color var(--dur), border-color var(--dur);
  padding-bottom: 1px;
}
.section__link:hover { color: var(--signal); border-color: var(--signal-dim); }

/* ── AUTOPSY CARDS ── */
.autopsy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
}

.autopsy-card {
  background: var(--surface);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background var(--dur);
  position: relative;
  overflow: hidden;
}
.autopsy-card:hover       { background: var(--surface2); }
.autopsy-card::after      { content: ''; position: absolute; top:0;left:0;right:0; height:1px; background: var(--border2); transition: background var(--dur); }
.autopsy-card:hover::after{ background: var(--signal-dim); }

.autopsy-card__verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.verdict--dead   { color: var(--dead-text); }
.verdict--mixed  { color: var(--amber); }
.verdict--signal { color: var(--held-text); }

.verdict--dead::before, .verdict--mixed::before, .verdict--signal::before {
  content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; opacity: 0.7;
}
.verdict--dead::before   { background: var(--dead-text); }
.verdict--mixed::before  { background: var(--amber); }
.verdict--signal::before { background: var(--held-text); }

.autopsy-card__title { font-size: 1rem; font-weight: 500; color: var(--white); line-height: 1.3; letter-spacing: -0.01em; }
.autopsy-card__body  { font-size: 0.87rem; color: var(--text2); line-height: 1.62; flex: 1; }

.autopsy-card__meta { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.autopsy-card__meta-item { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text3); }
.autopsy-card__meta-item strong { color: var(--text2); font-weight: 400; }

/* ── EXPERIMENT LIST ── */
.experiment-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); }

.experiment-card {
  background: var(--surface);
  padding: 1.5rem 1.75rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  transition: background var(--dur);
}
.experiment-card:hover { background: var(--surface2); }

.experiment-card__status { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }

.status--live   { color: var(--held-text); }
.status--closed { color: var(--text3); }
.status--paused { color: var(--amber); }

.experiment-card__title { font-size: 0.95rem; font-weight: 500; color: var(--white); letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.experiment-card__body  { font-size: 0.85rem; color: var(--text2); line-height: 1.58; }
.experiment-card__right { text-align: right; flex-shrink: 0; }

.experiment-card__tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--text3);
  border: 1px solid var(--border2);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* ── SIGNAL FRAGMENTS (home preview) ── */
.signal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--border); }

.signal-fragment {
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background var(--dur);
}
.signal-fragment:hover { background: var(--surface2); }

.signal-fragment__id   { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--text3); }
.signal-fragment__text { font-size: 0.9rem; color: var(--text); line-height: 1.67; }
.signal-fragment__tag  { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--signal-dim); text-transform: uppercase; margin-top: auto; }

/* ── ARCHIVE LIST ── */
.archive-list { display: flex; flex-direction: column; }

.archive-entry {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: baseline;
}
.archive-entry:last-child { border-bottom: none; }

.archive-entry__date { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; color: var(--text3); padding-top: 0.1rem; }
.archive-entry__content h4 { font-size: 0.9rem; color: var(--white); font-weight: 500; margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.archive-entry__content p  { font-size: 0.83rem; color: var(--text2); line-height: 1.57; }

.archive-entry__cat {
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 1px;
  margin-top: 0.5rem;
  display: inline-block;
  color: var(--text3);
}
.archive-entry__cat--structure { color: var(--signal-dim); border-color: var(--signal-dim); opacity: 0.8; }
.archive-entry__cat--evidence  { color: var(--amber); border-color: var(--amber-dim); opacity: 0.8; }
.archive-entry__cat--removal   { color: var(--dead-text); border-color: var(--dead); opacity: 0.8; }

/* ── EVIDENCE BLOCKS ── */
.evidence-block { border-left: 1px solid var(--border2); padding: 1.5rem 2rem; margin: 2rem 0; }

.evidence-block h3 {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 1rem;
}

.evidence-block p, .evidence-block li { font-size: 0.9rem; color: var(--text); line-height: 1.72; }
.evidence-block ul { display: flex; flex-direction: column; gap: 0.6rem; }
.evidence-block li { padding-left: 1rem; position: relative; }
.evidence-block li::before { content: '—'; position: absolute; left: 0; color: var(--text3); }

.evidence-block--dead h3   { color: var(--dead-text); }
.evidence-block--dead      { border-left-color: var(--dead); }
.evidence-block--held h3   { color: var(--held-text); }
.evidence-block--held      { border-left-color: var(--held); }
.evidence-block--cause h3  { color: var(--amber); }
.evidence-block--cause     { border-left-color: var(--amber-dim); }

/* ── METRICS ROW ── */
.metrics-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--border); margin: 2rem 0; }
.metric { background: var(--surface); padding: 1.25rem 1.5rem; }
.metric__label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 0.5rem; }
.metric__value { font-size: 1.6rem; font-weight: 300; letter-spacing: -0.03em; color: var(--white); line-height: 1; margin-bottom: 0.3rem; }
.metric__note  { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text3); }
.metric--dead   .metric__value { color: var(--dead-text); }
.metric--held   .metric__value { color: var(--held-text); }
.metric--signal .metric__value { color: var(--signal); }

/* ── RETENTION BARS ── */
.retention-bar { margin: 1.5rem 0; }

.retention-bar__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.retention-bar__name  { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; color: var(--text2); }
.retention-bar__pct   { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text3); }
.retention-bar__track { height: 3px; background: var(--surface3); }
.retention-bar__fill  { height: 100%; background: var(--signal); transition: width 0.9s var(--ease); }
.retention-bar__fill--dead { background: var(--dead); opacity: 0.7; }
.retention-bar__fill--warn { background: var(--amber-dim); }

/* ── HYPOTHESIS ── */
.hypothesis { background: var(--surface2); border: 1px solid var(--border2); padding: 1.5rem; margin: 1.5rem 0; }
.hypothesis + .hypothesis { margin-top: 1px; border-top: none; }
.hypothesis__label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal-dim); margin-bottom: 0.75rem; }
.hypothesis__text  { font-size: 0.9rem; color: var(--text); line-height: 1.72; font-style: italic; }

/* ── DATA TABLE ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; margin: 1.5rem 0; }
.data-table th { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); text-align: left; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--border); font-weight: 400; }
.data-table td { padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.dead   { color: var(--dead-text); }
.data-table td.held   { color: var(--held-text); }
.data-table td.signal { color: var(--signal); }
.data-table td.mono   { font-family: var(--font-mono); font-size: 0.78rem; }

/* ── PAGE HEADER ── */
.page-header { padding: var(--gap2) 0; border-bottom: 1px solid var(--border); margin-bottom: var(--gap2); }
.page-header--flush { border-bottom: none; margin-bottom: 0; }

.page-header__kicker { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); margin-bottom: 1rem; }
.page-header__title  { margin-bottom: 0.75rem; }
.page-header__title--lg { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.page-header__sub    { font-size: 0.95rem; color: var(--text2); max-width: 540px; line-height: 1.67; }

/* ── AUTOPSY VERDICT ── */
.autopsy-verdict { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--border2); padding: 0.3rem 0.75rem; margin-bottom: 2rem; }
.autopsy-verdict--dead  { border-color: var(--dead); color: var(--dead-text); }
.autopsy-verdict--mixed { border-color: var(--amber-dim); color: var(--amber); }

/* ── STATUS PILL ── */
.status-pill { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--held-text); margin-bottom: 1.5rem; }
.status-pill::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--held-text); animation: pulse 2.5s ease-in-out infinite; }
.status-pill--closed { color: var(--text3); }
.status-pill--closed::before { background: var(--text3); animation: none; }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: var(--gap2); }

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.filter-btn:hover     { color: var(--text); border-color: var(--border2); }
.filter-btn.is-active { color: var(--signal); border-color: var(--signal-dim); background: var(--signal-glow); }

/* ── SIGNAL ENTRIES ── */
.signal-entry { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.signal-entry:first-child { padding-top: 0; }
.signal-entry:last-child  { border-bottom: none; }

.signal-entry__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.signal-entry__id     { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--text3); }

.signal-entry__type {
  font-family: var(--font-mono);
  font-size: 0.59rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-dim);
  border: 1px solid var(--signal-dim);
  padding: 0.1rem 0.4rem;
  border-radius: 1px;
  opacity: 0.7;
}

.signal-entry__body { font-size: 0.93rem; color: var(--text); line-height: 1.77; max-width: 640px; }
.signal-entry__body p + p { margin-top: 0.75em; }
.signal-entry__footer { margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.62rem; color: var(--text3); }

.fragment-quote { font-style: italic; color: var(--text2); border-left: 1px solid var(--border2); padding-left: 1rem; margin-top: 0.75rem; }

/* ── CLOSING ── */
.closing { padding: var(--gap3) 0; display: flex; flex-direction: column; gap: 1.5rem; }
.closing__line { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 300; letter-spacing: -0.03em; color: var(--text2); line-height: 1.3; }
.closing__line em { font-style: normal; color: var(--white); }
.closing__coords  { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--text3); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem var(--gap);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__left  { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; color: var(--text3); }
.footer__right { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; color: var(--text3); text-align: right; }

/* ── PAGE NAV ── */
.page-nav { display: flex; justify-content: space-between; padding-top: var(--gap2); margin-top: var(--gap2); border-top: 1px solid var(--border); gap: 1rem; }
.page-nav__item { font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.06em; color: var(--text3); }
.page-nav__item a { color: var(--text2); border-bottom: 1px solid transparent; transition: color var(--dur), border-color var(--dur); }
.page-nav__item a:hover { color: var(--white); border-color: var(--border2); }

/* ── LINK ── */
.link { color: var(--signal); border-bottom: 1px solid transparent; transition: border-color var(--dur); }
.link:hover { border-color: var(--signal-dim); }

/* Archive structural index / seam entry point */
.archive-structural-index {
  margin-top: var(--gap3);
  padding-top: var(--gap2);
  border-top: 1px solid var(--border);
}
.archive-structural-index__paths {
  margin-top: 0.75rem;
  opacity: 0.18;
  font-size: 0.53rem;
  letter-spacing: 0.12em;
}
.archive-seam-link {
  color: inherit;
  border: none;
  opacity: 0.55;
  transition: opacity var(--dur);
}
.archive-seam-link:hover { opacity: 1; }

/* Coord hint in archive footer */
.archive-coord-hint {
  opacity: 0.28;
  font-size: 0.53rem;
  letter-spacing: 0.1em;
}

/* Seam page footer note */
.seam-footer-note {
  margin-top: var(--gap2);
  border-top: 1px solid var(--border);
  padding-top: var(--gap);
}

/* ── PROSE ── */
.prose { max-width: var(--max-text); }
.prose h2 { font-size: 1.3rem; margin-top: 2.5rem; margin-bottom: 0.75rem; color: var(--white); }
.prose p  { font-size: 0.92rem; line-height: 1.77; color: var(--text); margin-bottom: 1em; }
.prose ul { margin: 1em 0; display: flex; flex-direction: column; gap: 0.5rem; }
.prose li { font-size: 0.9rem; color: var(--text); line-height: 1.67; padding-left: 1rem; position: relative; }
.prose li::before { content: '—'; position: absolute; left: 0; color: var(--text3); }

/* ── UTILITY — spacing, text, variants ── */
.mt-gap  { margin-top: var(--gap); }
.mt-gap2 { margin-top: var(--gap2); }
.mt-gap3 { margin-top: var(--gap3); }
.mb-gap2 { margin-bottom: var(--gap2); }
.mb-gap3 { margin-bottom: var(--gap3); }
.pt-gap  { padding-top: var(--gap); }
.pt-gap2 { padding-top: var(--gap2); }

.text-muted  { font-size: 0.85rem; color: var(--text2); line-height: 1.6; }
.text-note   { font-size: 0.85rem; color: var(--text2); line-height: 1.6; margin-bottom: 1.25rem; }
.text-after  { font-size: 0.85rem; color: var(--text2); line-height: 1.6; margin-top: 1.25rem; }
.text-dim    { color: var(--text3); }
.text-sm     { font-size: 0.82rem; color: var(--text3); }

.border-top  { border-top: 1px solid var(--border); }

/* Metric value size variants */
.metric__value--sm  { font-size: 1.1rem; }
.metric__value--xs  { font-size: 1rem; }

/* Annex header note */
.annex-header__note {
  margin-top: 0.75em;
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.6;
}

/* Annex media slot — constrained width */
.annex-preview-slot {
  margin-top: var(--gap);
  max-width: 480px;
}

/* Archive snapshot whisper note */
.archive-snapshot-note {
  margin-top: 0.75rem;
}
.autopsy-single, .experiment-single { max-width: 760px; }

/* ============================================================
   SEAM PAGE — topology / hidden access
   ============================================================ */

.seam-header { margin-bottom: var(--gap2); }

.seam-header__kicker {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 1rem;
}

.seam-header__title {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.seam-header__sub {
  font-size: 0.85rem;
  color: var(--text3);
  max-width: 440px;
  line-height: 1.6;
}

/* Schematic legend */
.seam-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: var(--gap);
  flex-wrap: wrap;
}

.seam-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.seam-legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.seam-legend__dot--open   { background: var(--surface3); border: 1px solid var(--border2); }
.seam-legend__dot--active { background: var(--signal-dim); }
.seam-legend__dot--path   { background: var(--surface4); border: 1px solid var(--signal-dim); }
.seam-legend__dot--exit   { background: var(--held-dim, #1d3329); border: 1px solid var(--held); }

/* Node grid */
.node-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border2);
  margin-bottom: 1rem;
  user-select: none;
  max-width: 480px;
}

.node {
  background: var(--surface);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background var(--dur);
  min-width: 0;
}
.node:hover { background: var(--surface2); }

.node__label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.02em;
  color: var(--text3);
  opacity: 0.45;
  pointer-events: none;
  line-height: 1;
}

/* States */
.node.is-selected { background: var(--surface3); }
.node.is-selected .node__label { color: var(--signal); opacity: 1; }

.node.is-path { background: var(--surface2); }
.node.is-path .node__label { color: var(--signal-dim); opacity: 0.75; }

.node.is-wrong { background: rgba(98, 46, 46, 0.15); }
.node.is-wrong .node__label { color: var(--dead-text); opacity: 0.6; }

.node.is-exit { background: rgba(41, 72, 56, 0.25); }
.node.is-exit .node__label { color: var(--held-text); opacity: 0.7; }

.node.is-exit.is-selected,
.node.is-exit.is-path { background: rgba(41, 72, 56, 0.5); }

/* Selection border */
.node::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color var(--dur);
}
.node.is-selected::after { border-color: var(--signal-dim); }
.node.is-exit.is-selected::after { border-color: var(--held-text); }

/* Status / reset row */
.seam-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: var(--gap2);
  flex-wrap: wrap;
}

.seam-status {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.07em;
  color: var(--text3);
  flex: 1;
  transition: color 0.3s;
}
.seam-status--active  { color: var(--signal-dim); }
.seam-status--wrong   { color: var(--dead-text); }
.seam-status--solved  { color: var(--held-text); }

.seam-reset {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  border: 1px solid var(--border2);
  padding: 0.3rem 0.75rem;
  background: transparent;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur);
  flex-shrink: 0;
}
.seam-reset:hover { color: var(--text); border-color: var(--border3); }

/* Access reveal */
.seam-access {
  display: none;
  padding: 1.25rem 1.5rem;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-left: 2px solid var(--signal-dim);
  margin-bottom: var(--gap2);
}
.seam-access.is-revealed { display: block; animation: fade-in 0.6s var(--ease) both; }

.seam-access__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin-bottom: 0.5rem;
}

.seam-access__link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--signal);
  border-bottom: 1px solid var(--signal-dim);
  transition: opacity var(--dur);
}
.seam-access__link:hover { opacity: 0.7; }

/* Coordinate hint — subtle clue fragment */
.coord-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  opacity: 0.25;
}

/* ============================================================
   ANNEX PAGE — hidden analytics
   ============================================================ */

.annex-header { padding: var(--gap2) 0; border-bottom: 1px solid var(--border); margin-bottom: var(--gap2); }

.annex-header__kicker {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dead-text);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.annex-header__title { font-size: clamp(1.6rem, 3.5vw, 2.8rem); font-weight: 300; letter-spacing: -0.04em; color: var(--white); margin-bottom: 0.75rem; }
.annex-header__sub   { font-size: 0.9rem; color: var(--text2); max-width: 520px; line-height: 1.67; }

.annex-section { margin-bottom: var(--gap2); padding-bottom: var(--gap2); border-bottom: 1px solid var(--border); }
.annex-section:last-child { border-bottom: none; }
.annex-section__title { font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); margin-bottom: 1.5rem; }

.roast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--border); margin-bottom: 1.5rem; }
.roast-card { background: var(--surface); padding: 1.25rem 1.5rem; }
.roast-card__num  { font-size: 2rem; font-weight: 300; letter-spacing: -0.04em; color: var(--white); line-height: 1; margin-bottom: 0.4rem; }
.roast-card__num--bad  { color: var(--dead-text); }
.roast-card__num--warn { color: var(--amber); }
.roast-card__num--ok   { color: var(--held-text); }
.roast-card__label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); margin-bottom: 0.4rem; }
.roast-card__note  { font-size: 0.78rem; color: var(--text2); line-height: 1.5; }

.failure-log { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin: 1.5rem 0; }
.failure-log th { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--border); font-weight: 400; }
.failure-log td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: top; }
.failure-log tr:last-child td { border-bottom: none; }
.failure-log .td-dead  { color: var(--dead-text); font-family: var(--font-mono); font-size: 0.75rem; }
.failure-log .td-warn  { color: var(--amber);     font-family: var(--font-mono); font-size: 0.75rem; }
.failure-log .td-ok    { color: var(--held-text); font-family: var(--font-mono); font-size: 0.75rem; }
.failure-log .td-mono  { font-family: var(--font-mono); font-size: 0.75rem; }
.failure-log .td-muted { color: var(--text3); font-size: 0.78rem; font-style: italic; }

.roast-note { background: var(--surface2); border-left: 2px solid var(--dead); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.roast-note__label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dead-text); margin-bottom: 0.5rem; opacity: 0.8; }
.roast-note__text  { font-size: 0.88rem; color: var(--text2); line-height: 1.67; }
.roast-note__text + .roast-note__text { margin-top: 0.75rem; }

.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); margin: 1.5rem 0; }
.platform-block { background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; }
.platform-block__name { font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.platform-block ul { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; }
.platform-block li { font-size: 0.83rem; color: var(--text2); line-height: 1.5; padding-left: 1rem; position: relative; }
.platform-block li::before { content: '—'; position: absolute; left: 0; color: var(--text3); }

/* ============================================================
   MEDIA SLOT SYSTEM
   ============================================================ */

.media-slot {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  display: block;
}

/* Aspect ratios */
.media-slot--hero { aspect-ratio: 21 / 9; }
.media-slot--wide { aspect-ratio: 16 / 5; }
.media-slot--16x9 { aspect-ratio: 16 / 9; }
.media-slot--3x2  { aspect-ratio: 3 / 2; }
.media-slot--4x3  { aspect-ratio: 4 / 3; }
.media-slot--1x1  { aspect-ratio: 1; }
.media-slot--card { aspect-ratio: 3 / 2; }

/* Inline use */
.media-slot--inline { width: 100%; margin: 1.5rem 0; }
.media-slot--sm     { }

/* Media fills slot */
.media-slot img,
.media-slot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-slot video { background: #000; }

/* Placeholder */
.media-slot__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem;
  text-align: center;
}

.media-slot__placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.011) 8px,
    rgba(255,255,255,0.011) 9px
  );
  pointer-events: none;
}

.media-slot__placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  opacity: 0.45;
  position: relative;
}

.media-slot__placeholder-slot {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: var(--text3);
  opacity: 0.42;
  position: relative;
}

/* ── ANIMATIONS ── */
@keyframes cursor-blink { 0%,100%{opacity:1}50%{opacity:0} }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.75)} }
@keyframes fade-in { from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none} }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

.animate-in { animation: fade-in 0.55s var(--ease) both; }
.animate-in--delay-1 { animation-delay: 0.08s; }
.animate-in--delay-2 { animation-delay: 0.16s; }
.animate-in--delay-3 { animation-delay: 0.24s; }
.animate-in--delay-4 { animation-delay: 0.32s; }
.animate-in--delay-5 { animation-delay: 0.40s; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav__toggle { display: flex; }
  .nav__links { display: none; position: absolute; top: 52px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 0.75rem 0; gap: 0; }
  .nav__links.is-open { display: flex; }
  .nav__link { padding: 0.6rem 1.5rem; font-size: 0.75rem; }
}

@media (max-width: 768px) {
  :root { --gap2: 2.5rem; --gap3: 3.5rem; }
  .archive-entry      { grid-template-columns: 1fr; gap: 0.4rem; }
  .experiment-card    { grid-template-columns: 1fr; }
  .experiment-card__right { text-align: left; }
  footer { flex-direction: column; align-items: flex-start; }
  .node-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 480px) {
  .metrics-row   { grid-template-columns: 1fr 1fr; }
  .autopsy-grid  { grid-template-columns: 1fr; }
  .signal-grid   { grid-template-columns: 1fr; }
  .roast-grid    { grid-template-columns: 1fr 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .node-grid     { grid-template-columns: repeat(4, 1fr); }
}

@media (print) {
  .nav, footer { display: none; }
  body { background: white; color: black; }
}

/* ============================================================
   v5 PATCH — Additional classes replacing inline styles
   ============================================================ */

/* Section — no border variant */
.section--no-border { border-bottom: none; }

/* Home hero slot — top margin from hero */
.home-hero-slot { margin-top: 1px; }

/* Autopsy card cover — bleed-edge inside card */
.autopsy-card-cover {
  margin: -1.75rem -1.75rem 1rem -1.75rem;
  border: none;
  border-bottom: 1px solid var(--border);
}

/* Autopsy index spacing */
.autopsy-index-structure { margin-bottom: 3rem; }
.autopsy-index-grid      { margin-bottom: var(--gap3); }
.autopsy-patterns        { margin-bottom: var(--gap2); }
.autopsy-record-note     { margin-top: 2rem; }

/* Signal media slot — constrained width */
.signal-media-slot { margin-top: 0.75rem; max-width: 400px; }

/* Signals footer note spacing */
.signals-footer-note { margin-top: 3rem; margin-bottom: 1rem; }

/* Archive evidence block spacing */
.archive-evidence-block { margin-bottom: var(--gap2); }
.archive-closing-note   { margin-top: var(--gap); }

/* Experiment list — spaced variant */
.experiment-list--spaced { margin-bottom: var(--gap2); }

/* Experiment variant labels */
.exp-variant-label      { margin-bottom: 0.75rem; }
.exp-variant-label--gap { margin-top: 1.5rem; }

/* Experiment record note */
.exp-record-note { margin-top: 2rem; }

/* Experiments footer note */
.experiments-footer-note { margin-top: 2rem; }

/* Text white — strong value callout */
.text-white { color: var(--white); }

/* Table cell — dimmed mono (replaces inline colspan color) */
.text-dim { color: var(--text3); }

/* Seam page — archive link nearly invisible, revealed only on hover */
.archive-seam-link {
  color: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: auto;
}
.archive-structural-index:hover .archive-seam-link,
.archive-seam-link:focus { opacity: 0.45; }

/* Coord hint — the true clue, slightly more present than the link */
.coord-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  opacity: 0.22;
  margin-left: 1.5rem;
}



/* ============================================================
   v7 PATCH — cleaner tree to model homepage experiment
   ============================================================ */

/* ============================================================
   HERO — ghost atmosphere layer
   ============================================================ */

.hero--with-ghost {
  position: relative;
  overflow: hidden;
}

/* Ghost image fills hero, extremely faint, pointer-events:none */
.hero__ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.14;
  filter: saturate(0.7) contrast(0.95) brightness(1.12);
  display: block;
  mix-blend-mode: screen;
}

/* Content stays above ghost */
.hero__content {
  position: relative;
  z-index: 3;
}

/* ============================================================
   HERO — coast drive video background
   ============================================================ */

.hero--with-video {
  position: relative;
  min-height: clamp(560px, 88vh, 920px);
  display: flex;
  align-items: center;
  padding: 0;
  background: #0a0b0d;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  opacity: 1;
  filter: saturate(0.78) contrast(0.95) brightness(0.70);
  background: #0a0b0d;
}

.hero__video::-webkit-media-controls {
  display: none !important;
}

.hero__video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 40%, rgba(90,143,166,0.10), transparent 48%),
    linear-gradient(180deg, rgba(4,5,7,0.16) 0%, rgba(4,5,7,0.56) 58%, rgba(4,5,7,0.74) 100%);
}

.hero--with-video .hero__ghost {
  z-index: 1;
}

.hero--with-video .hero__ghost img {
  opacity: 0.07;
  filter: saturate(0.65) contrast(0.92) brightness(1.02);
}

.hero--with-video .hero__content {
  width: 100%;
  padding-top: clamp(5rem, 11vh, 8rem);
  padding-bottom: clamp(4.5rem, 10vh, 7rem);
}

.hero--with-video .hero__headline,
.hero--with-video .hero__sub,
.hero--with-video .hero__coords,
.hero--with-video .hero__kicker {
  text-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.hero--with-video .hero__sub {
  color: rgba(228,228,238,0.78);
}

.hero--with-video .hero__coords {
  color: rgba(196,196,206,0.62);
}

/* ============================================================
   AUTOPSY CARD — cover image slot
   ============================================================ */

.autopsy-card-cover-slot {
  margin: -1.75rem -1.75rem 1rem -1.75rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  position: relative;
}

.autopsy-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

/* Placeholder style when image is missing */
.autopsy-card-cover-slot.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
}

.autopsy-card-cover-slot.img-missing::after {
  content: '— no recovered media —';
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  opacity: 0.4;
}

/* ============================================================
   FIELD OBSERVATION — tree portrait + translation sequence
   ============================================================ */

.section--tree {
  background:
    radial-gradient(ellipse 55% 35% at 10% 0%,
      rgba(90,143,166,0.06) 0%, transparent 52%),
    linear-gradient(180deg, rgba(255,255,255,0.007) 0%, transparent 100%);
}

.section__note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  color: var(--text3);
}

/* ── SPLIT GRID ── */
.tree-split {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 3rem;
  align-items: start;
}

.tree-col--portrait {
  position: sticky;
  top: 70px;
}

/* ── PORTRAIT FRAME ── */
.tree-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.14),
    0 12px 40px rgba(0,0,0,0.28),
    0 32px 72px rgba(0,0,0,0.18);
}

.tree-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

/* Placeholder when tree.webp is missing */
.tree-frame--no-image .tree-frame__img {
  display: none;
}
.tree-frame--no-image::before {
  content: 'tree.webp';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  opacity: 0.3;
  background:
    repeating-linear-gradient(
      45deg,
      transparent, transparent 18px,
      rgba(255,255,255,0.012) 18px, rgba(255,255,255,0.012) 19px
    );
}

/* Vignette — bottom-heavy, keeps readout legible */
.tree-frame__vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      transparent 35%,
      rgba(5,6,10,0.45) 62%,
      rgba(5,6,10,0.85) 84%,
      rgba(5,6,10,0.96) 100%
    );
  pointer-events: none;
  z-index: 2;
}

/* ── HOTSPOTS ── */
/*
  KEY FIX: z-index:8 (above readout at z-index:6).
  The readout has pointer-events:none so it can never
  intercept clicks meant for hotspots behind it.
*/
.tree-hs {
  position: absolute;
  z-index: 8;                  /* above readout (z:6) */
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;                /* generous tap target */
  margin: -8px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Positions — edit these to match your actual photo */
.tree-hs--canopy  { left: 52%; top: 11%; }
.tree-hs--dbh     { left: 46%; top: 54%; }
/*
  Surface hotspot moved to 68% (up from 76%).
  This keeps it safely above the readout panel bottom edge.
  Adjust further if your photo's bark is higher or lower.
*/
.tree-hs--surface { left: 43%; top: 68%; }

/* Ping ring */
.tree-hs__pulse {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(90,143,166,0.32);
  animation: hsPulse 2.8s ease-out infinite;
  pointer-events: none;
}

/* Core dot */
.tree-hs__core {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 2.5px rgba(90,143,166,0.28);
  transition: transform 0.2s var(--ease),
              background 0.2s,
              box-shadow 0.2s;
  flex-shrink: 0;
}

/* Label chip */
.tree-hs__chip {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(5,6,10,0.72);
  border: 1px solid rgba(255,255,255,0.13);
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}

.tree-hs:hover .tree-hs__core,
.tree-hs:focus-visible .tree-hs__core,
.tree-hs.is-active .tree-hs__core {
  transform: scale(1.55);
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(90,143,166,0.2), 0 0 14px rgba(90,143,166,0.28);
}

.tree-hs.is-active .tree-hs__chip {
  color: var(--signal);
  border-color: rgba(90,143,166,0.42);
}

.tree-hs:focus-visible { outline: none; }

@keyframes hsPulse {
  0%   { transform: scale(0.6);  opacity: 0.75; }
  65%  { transform: scale(1.75); opacity: 0;    }
  100% { transform: scale(1.75); opacity: 0;    }
}

/* ── READOUT CARD ── */
/*
  KEY FIX: pointer-events:none on the outer .tree-readout wrapper.
  This means the card's background and border NEVER intercept clicks.
  The inner .tree-readout__inner re-enables pointer-events for
  its own content only (so text is still selectable if needed).

  z-index:6 keeps it rendered above the photo/vignette but below
  the hotspot buttons (z-index:8).
*/
.tree-readout {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  pointer-events: none;        /* KEY: never blocks hotspot clicks */
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.tree-readout.is-changing {
  opacity: 0;
  transform: translateY(5px);
}

.tree-readout__inner {
  padding: 14px 16px 13px;
  background: rgba(4,6,11,0.82);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  pointer-events: auto;        /* inner content is interactive */
}

.tree-readout__header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.tree-readout__label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--signal-dim);
}

.tree-readout__title {
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.tree-readout__fields {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.tree-readout__whisper {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.57;
  color: var(--text2);
  font-style: italic;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── RIGHT COLUMN ── */
.tree-col--seq {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 4px;
}

.tree-intro__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  display: block;
  margin-bottom: 0.6rem;
}

.tree-intro__heading {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.tree-intro__body {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.72;
  max-width: 34rem;
}

/* ── TRANSLATION SEQUENCE ── */
.tseq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tseq__btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background   0.2s,
    transform    0.2s var(--ease),
    box-shadow   0.2s;
}

.tseq__btn:hover,
.tseq__btn:focus-visible {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateY(-1px);
  outline: none;
}

.tseq__btn.is-active {
  border-color: var(--signal-dim);
  background: linear-gradient(150deg,
    rgba(90,143,166,0.1),
    rgba(90,143,166,0.025));
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
}

.tseq__num {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  color: var(--text3);
  transition: color 0.2s;
}
.tseq__btn.is-active .tseq__num { color: var(--signal-dim); }

.tseq__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.tseq__sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--text3);
}

/* ── STEP DETAIL PANEL ── */
.tseq-detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  min-height: 100px;
}

.tseq-detail__body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tseq-detail__step-label {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  color: var(--signal-dim);
}

.tseq-detail__body {
  font-size: 0.87rem;
  color: var(--text2);
  line-height: 1.68;
  margin: 0;
  transition: opacity 0.18s;
}

.tseq-detail__body.is-changing { opacity: 0; }

/* Map thumbnail */
.tseq-map {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tseq-map__kicker {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

.tseq-map__img-wrap {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
  position: relative;
}

.tseq-map__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder when map.webp is missing */
.tseq-map__img-wrap.img-missing::after {
  content: 'map.webp';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  opacity: 0.35;
}

.tseq-map__caption {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--text3);
  margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 1020px) {
  .tree-split { grid-template-columns: 340px 1fr; gap: 2rem; }
}

@media (max-width: 860px) {
  .tree-split { grid-template-columns: 1fr; gap: 2rem; }
  .tree-col--portrait { position: static; max-width: 420px; }
  .tree-frame { aspect-ratio: 3 / 4; }
}

@media (max-width: 520px) {
  .hero--with-video {
    min-height: 78svh;
    align-items: flex-end;
  }

  .hero--with-video .hero__content {
    padding-top: 6rem;
    padding-bottom: 3.5rem;
  }

  .tree-col--portrait { max-width: 100%; }
  .tree-frame { border-radius: 10px; }
  .tree-readout { left: 8px; right: 8px; bottom: 8px; }
  .tree-readout__inner { padding: 11px 13px; }
  .tseq { grid-template-columns: 1fr 1fr; }
  .tseq__btn { padding: 11px 12px; }
  .tseq-detail { flex-direction: column; }
  .tseq-map { width: 100%; max-width: 180px; }
  .tree-hs__chip { font-size: 0.48rem; }
}

/* ============================================================
   ARCHIVE — ghost atmosphere layer
   Semi-transparent image behind archive page header
   ============================================================ */

.archive-header-ghost {
  position: relative;
  overflow: hidden;
}

.archive-header-ghost__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.16;
  filter: saturate(0.7) contrast(0.9) brightness(1.08);
  pointer-events: none;
  z-index: 0;
}

.archive-header-ghost > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   DIAGNOSTICS DRAWER
   ============================================================ */

.diag__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3,5,8,0.6);
  backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}

.diag {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(400px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--border2);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.36s var(--ease);
  overflow-y: auto;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.007) 2px,
      rgba(255,255,255,0.007) 4px
    );
}

body.diag-open .diag           { transform: translateX(0); }
body.diag-open .diag__backdrop { opacity: 1; pointer-events: auto; }

.diag__inner {
  padding: 1.5rem 1.4rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.diag__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.diag__label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-dim);
}

.diag__close {
  font-size: 0.7rem;
  color: var(--text3);
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: none;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur);
}
.diag__close:hover { color: var(--text); border-color: var(--border2); }

.diag__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--signal);
  font-style: italic;
  padding: 12px 14px;
  background: rgba(90,143,166,0.055);
  border: 1px solid rgba(90,143,166,0.18);
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.diag__platforms { display: flex; flex-direction: column; gap: 1rem; }

.diag__platform {
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}

.diag__plat-header {
  padding: 8px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 7px;
}

.diag__plat-header::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.diag__platform--yt .diag__plat-header::before { background: var(--dead-text); }
.diag__platform--ig .diag__plat-header::before { background: var(--amber); }
.diag__platform--tt .diag__plat-header::before { background: var(--signal); }

.diag__metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 1px;
  background: var(--border);
}

.diag__metric {
  background: var(--surface);
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diag__metric-val {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
}

.diag__metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text3);
}

.diag__sparkbar {
  height: 2px;
  background: var(--border);
  margin: 8px 14px 10px;
  border-radius: 1px;
  overflow: hidden;
}

.diag__sparkbar-fill {
  height: 100%;
  border-radius: 1px;
  background: var(--signal-dim);
  transition: width 0.65s var(--ease);
}

.diag__platform--yt .diag__sparkbar-fill { background: var(--dead-text); opacity: 0.5; }
.diag__platform--ig .diag__sparkbar-fill { background: var(--amber); opacity: 0.5; }

.diag__footnote {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  color: var(--text3);
  opacity: 0.42;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.diag__trigger {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text3);
  opacity: 0.22;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 5px;
  margin-right: 10px;
  line-height: 1;
  transition: opacity 0.2s;
  vertical-align: middle;
}
.diag__trigger:hover { opacity: 0.6; }
.diag__trigger:focus-visible {
  outline: 1px solid var(--signal-dim);
  border-radius: 2px;
  opacity: 0.6;
}



.diag__metric-lbl {
  line-height: 1.45;
}

@media (max-width: 420px) {
  .diag {
    width: 100vw;
  }

  .diag__inner {
    padding: 1.15rem 1rem 2rem;
  }

  .diag__metric-val {
    font-size: 1.25rem;
  }
}


.footer__right .whisper {
  opacity: 0.72;
}

@media (max-width: 640px) {
  .closing__coords {
    line-height: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
}


/* ============================================================
   v8 PATCH — video hero only (remove stacked ghost layer)
   ============================================================ */

.hero--with-video {
  overflow: hidden;
}

.hero--with-video .hero__ghost,
.hero--with-video #hero-ghost {
  display: none !important;
}

.hero--with-video::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 65% 32%, rgba(120,150,170,0.08), transparent 30%),
    linear-gradient(180deg, rgba(4,5,7,0.12) 0%, rgba(4,5,7,0.48) 55%, rgba(4,5,7,0.70) 100%);
}

.hero--with-video .hero__video {
  z-index: 0;
}

.hero--with-video .hero__video-overlay {
  display: none;
}

.hero--with-video .hero__content {
  position: relative;
  z-index: 3;
}


/* ── CLOSING WORLD / HIDDEN ENTRY ───────────────────────────── */
/* ── CLOSING WORLD ────────────────────────────────────────────
   The image is a world layer, not a poster or footer card.

   Architecture:
   - .section--closing-world  tall scroll container (220vh)
   - .closing-world           sticky viewport-height layer (z-index 0)
   - .closing-world__image    the actual image — starts at opacity 0,
                               animated to ~0.72 by JS on scroll
   - .closing-world__content  text overlay, positioned relative,
                               appears after the image establishes
   - .closing-world__hotspot  touch-friendly hidden entry (56×56px)

   Image format guidance:
     Master size:   1800 × 2700 px (portrait — fills tall mobile too)
     Format:        WebP (primary) + PNG fallback
     Composition:   subject (cabin/road) slightly below center;
                    generous empty sky/negative space above for
                    the parallax reveal to feel intentional
     background-position: center 62%  (shows cabin, not sky, by default)
─────────────────────────────────────────────────────────────── */

.section--closing-world {
  position: relative;
  padding: 0 0 var(--gap3);
  overflow: visible;
  border-bottom: none;
}

.closing-world {
  position: relative;
  height: min(56vh, 560px);
  max-width: var(--max);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: var(--surface);
}

.closing-world__image {
  position: absolute;
  inset: 0;
  /* background-image removed — world layer is handled by .home-page::before */
  background: transparent;
  opacity: 1;
}

.closing-world::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,8,11,0.28) 0%, rgba(7,8,11,0.1) 40%, rgba(7,8,11,0.32) 100%);
  pointer-events: none;
  z-index: 1;
}

.closing-world__content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  padding-top: 1.35rem;
  padding-bottom: 0;
}

.section--closing-world .closing {
  max-width: 480px;
  margin: 0;
  pointer-events: auto;
}

.section--closing-world .closing__line {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(224,224,236,0.86);
  line-height: 1.55;
  margin-bottom: 0.45rem;
  font-weight: 300;
}

.section--closing-world .closing__coords {
  margin-top: 0.75rem;
  color: rgba(196,196,206,0.46);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

/* ── Hotspot — hidden entry point ──────────────────────────────
   Positioned over the cabin/road in the image.
   Adjust right/top to match your specific image composition.
   56×56px = comfortably tappable on mobile (WCAG 44×44 minimum).
   Invisible by default. Very faint glow on hover/focus.
─────────────────────────────────────────────────────────────── */
.closing-world__hotspot {
  position: absolute;
  z-index: 4;
  right: 18%;
  top: 54%;
  width: 84px;
  height: 84px;
  border-radius: 4px;
  background: transparent;
  pointer-events: auto;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  outline: none;
}

/* Faint diamond marker — barely visible, findable on second look */
.closing-world__hotspot::before {
  content: '◇';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.72rem;
  color: rgba(90, 143, 166, 0.28);
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  transition: color 0.5s ease, text-shadow 0.5s ease;
  user-select: none;
}

.closing-world__hotspot:hover {
  background: rgba(90, 143, 166, 0.06);
  box-shadow: 0 0 24px rgba(90, 143, 166, 0.14);
}

.closing-world__hotspot:hover::before {
  color: rgba(90, 143, 166, 0.45);
  text-shadow: 0 0 12px rgba(90, 143, 166, 0.3);
}

.closing-world__hotspot:focus-visible {
  outline: 1px solid rgba(90, 143, 166, 0.4);
  outline-offset: 4px;
}

/* ── Mobile overrides ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .closing-world {
    height: min(48vh, 420px);
    border-radius: 12px;
  }

  .closing-world__image {
    background-position: 50% 62%;
  }

  .section--closing-world .closing {
    max-width: 100%;
  }

  .section--closing-world .closing__line {
    font-size: 0.95rem;
  }

  .closing-world__hotspot {
    right: 12%;
    top: 56%;
    width: 78px;
    height: 78px;
  }
}

@media (max-width: 480px) {
  .closing-world {
    height: 40vh;
  }
}


/* ============================================================
   v11 — Single fixed world background for homepage
   One image (residual-world-v2.jpg) sits behind all homepage
   content as a fixed layer. No background-attachment:fixed
   (iOS breaks that). Instead a fixed-position pseudo-element.

   .home-page::before  — the world layer
   position: fixed fills the viewport and stays put.
   z-index: 0 keeps it behind main (z-index: 1).
   All homepage sections are transparent or use dark overlays.

   REMOVED references:
   - url('../public/images/residual-world-final.png') from .hero--with-cabin
   - url('/assets/images/residual-world-v2.jpg') from .closing-world__image
   Both replaced by this single layer.
   ============================================================ */

.home-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url('../assets/images/residual-world-v2.jpg') center 38% / cover no-repeat;
  filter: saturate(0.80) brightness(0.78);
  pointer-events: none;
}

/* Overlay gradient — darkens toward bottom for readability */
.home-page::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8,8,10,0.10) 0%,
      rgba(8,8,10,0.28) 40%,
      rgba(8,8,10,0.52) 70%,
      rgba(8,8,10,0.70) 100%
    );
  pointer-events: none;
}

/* main sits above the fixed world layer */
.home-page main {
  position: relative;
  z-index: 1;
}

/* nav sits above world layer */
.home-page .nav {
  position: sticky;
  z-index: 100;
}

/* footer sits above world layer */
.home-page footer {
  position: relative;
  z-index: 1;
}

/* Section content — restrained dark scrim for readability over image */
.home-page .section {
  background: transparent;
  border-bottom-color: rgba(30,30,38,0.6);
}

/* Log list rows — dark scrim so text is readable */
.home-page .home-log-entry {
  background: rgba(8,8,10,0.62);
  backdrop-filter: blur(0px);
}
.home-page .home-log-entry:hover {
  background: rgba(8,8,10,0.72);
  opacity: 1;
}

/* Fragment lines — dark scrim */
.home-page .fragment-line {
  background: transparent;
}
.home-page .fragment-line:hover {
  background: rgba(8,8,10,0.25);
}

/* Section headers — transparent background */
.home-page .section__header {
  background: transparent;
}

/* ── Mobile: adjust world image crop ── */
@media (max-width: 720px) {
  .home-page::before {
    background-position: 60% 38%;
  }
}

@media (max-width: 480px) {
  .home-page::before {
    background-position: 65% 35%;
  }
}

/* ============================================================
   v9 PATCH — cabin image homepage background
   ============================================================ */

.hero--with-cabin {
  position: relative;
  overflow: hidden;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  /* background-image removed — world layer handled by .home-page::before */
}

.hero--with-cabin::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,8,11,0.02) 0%, rgba(7,8,11,0.26) 100%);
}

.hero--with-cabin .hero__content {
  width: 100%;
  position: relative;
  z-index: 3;
  padding-top: clamp(5rem, 11vh, 8rem);
  padding-bottom: clamp(4.5rem, 10vh, 7rem);
}

.hero--with-cabin .hero__headline,
.hero--with-cabin .hero__sub,
.hero--with-cabin .hero__coords,
.hero--with-cabin .hero__kicker {
  text-shadow: 0 12px 36px rgba(0,0,0,0.45);
}

.hero--with-cabin .hero__sub {
  color: rgba(228,228,238,0.82);
}

.hero--with-cabin .hero__coords {
  color: rgba(196,196,206,0.68);
}


/* ============================================================
   v10 — Homepage redesign + unified logs
   New components: home-log-list, fragment-strip, video-list,
   signal-entry type badges, about page, videos page.
   ============================================================ */

/* ── HOME LOG LIST ─────────────────────────────────────────── */

.home-log-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
}

.home-log-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--dur);
  min-height: 80px;
  border-bottom: 1px solid var(--border);
}
.home-log-entry:last-child { border-bottom: none; }
.home-log-entry:hover { opacity: 0.75; }

.home-log-entry__image-col {
  overflow: hidden;
  flex-shrink: 0;
}
.home-log-entry__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-log-entry__img .media-slot__media { height: 100%; }
/* Override aspect ratio for list thumb — fill the row height */
.home-log-entry__img.media-slot--3x2 { aspect-ratio: unset; height: 100%; }

.home-log-entry__text-col {
  padding: 0.95rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.home-log-entry__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-log-entry__type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-dim);
}
.home-log-entry__type--autopsy    { color: var(--dead-text); }
.home-log-entry__type--experiment { color: var(--amber); }

.home-log-entry__date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text3);
}

.home-log-entry__line {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.home-log-entry:hover .home-log-entry__line {
  color: var(--white);
}


/* ── FRAGMENT STRIP ────────────────────────────────────────── */

.fragment-strip {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.fragment-line {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur);
}
.fragment-line:last-child { border-bottom: none; }
.fragment-line:hover { background: rgba(255,255,255,0.015); }

.fragment-line__id {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  flex-shrink: 0;
  width: 60px;
}

.fragment-line__text {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.55;
  transition: color var(--dur);
}
.fragment-line:hover .fragment-line__text { color: var(--text); }


/* ── VIDEO LIST (videos.html) ──────────────────────────────── */

.video-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.video-entry {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  background: var(--surface);
  transition: background var(--dur);
}
.video-entry:hover { background: var(--surface2); }

.video-entry__thumb {
  overflow: hidden;
}
.video-entry__thumb .media-slot--16x9 { height: 100%; aspect-ratio: unset; }

.video-entry__info {
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.video-entry__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.video-entry__type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-dim);
}
.video-entry__type--autopsy    { color: var(--dead-text); }
.video-entry__type--experiment { color: var(--amber); }

.video-entry__id {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--text3);
}

.video-entry__verdict,
.video-entry__status { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }

.video-entry__title {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.01em;
}

.video-entry__body {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}

.video-entry__date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-top: auto;
}


/* ── UNIFIED LOG ENTRY type badges ─────────────────────────── */

.signal-entry__verdict {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-entry__type--autopsy {
  color: var(--dead-text);
}
.signal-entry__type--experiment {
  color: var(--amber);
}

.signal-entry__status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Media inside signal entry */
.signal-entry__media {
  margin: 0.75rem 0;
  max-width: 480px;
}

/* Linked signal entry hover */
.signal-entry--linked {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background var(--dur);
  margin-left: calc(-1 * var(--gap));
  margin-right: calc(-1 * var(--gap));
  padding-left: var(--gap);
  padding-right: var(--gap);
}
.signal-entry--linked:hover {
  background: var(--surface2);
}


/* ── ABOUT PAGE ─────────────────────────────────────────────── */

.about-body {
  max-width: 560px;
  padding: var(--gap3) 0 var(--gap2);
}

.about-body p {
  font-size: 1.05rem;
  color: var(--text2);
  line-height: 1.78;
}
.about-body p + p { margin-top: 1.1em; }

.about-meta {
  padding-top: var(--gap2);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about-meta__row {
  display: flex;
  gap: 2rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.about-meta__row:last-child { border-bottom: none; }

.about-meta__key {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  min-width: 80px;
  flex-shrink: 0;
}

.about-meta__val {
  color: var(--text2);
}


/* ── HOME sections spacing ─────────────────────────────────── */

.home-logs    { }
.home-videos  { }
.home-fragments { }


/* ── RESPONSIVE additions ──────────────────────────────────── */

@media (max-width: 720px) {
  .home-log-entry {
    grid-template-columns: 100px 1fr;
  }

  .video-entry {
    grid-template-columns: 1fr;
  }
  .video-entry__thumb .media-slot--16x9 {
    height: auto;
    aspect-ratio: 16/9;
  }

  .fragment-line {
    flex-direction: column;
    gap: 0.3rem;
  }
  .fragment-line__id { width: auto; }
}

@media (max-width: 480px) {
  .home-log-entry {
    grid-template-columns: 80px 1fr;
  }
}

/* ============================================================
   v11 — Inline hidden entry (replaces section--closing-world)
   ============================================================ */

/* Hidden entry section — spare, open, sits over fixed world bg */
.home-hidden-entry {
  padding: var(--gap3) 0 calc(var(--gap3) * 1.5);
  position: relative;
}

.home-hidden-entry__inner {
  max-width: 420px;
}

/* Inline hotspot — positioned relative to the container, not absolute screen */
.closing-world__hotspot--inline {
  position: absolute;
  right: 22%;
  top: 50%;
  transform: translateY(-50%);
  width: 72px;
  height: 72px;
  border-radius: 4px;
  background: transparent;
  pointer-events: auto;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  outline: none;
  z-index: 2;
}

.closing-world__hotspot--inline::before {
  content: '◇';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  color: rgba(90, 143, 166, 0.22);
  pointer-events: none;
  transition: color 0.5s ease, text-shadow 0.5s ease;
  user-select: none;
}

.closing-world__hotspot--inline:hover {
  background: rgba(90, 143, 166, 0.05);
  box-shadow: 0 0 24px rgba(90, 143, 166, 0.12);
}

.closing-world__hotspot--inline:hover::before {
  color: rgba(90, 143, 166, 0.5);
  text-shadow: 0 0 14px rgba(90, 143, 166, 0.28);
}

.closing-world__hotspot--inline:focus-visible {
  outline: 1px solid rgba(90, 143, 166, 0.4);
  outline-offset: 4px;
}

/* closing text styles (reused from old closing section) */
.home-hidden-entry .closing__line {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(224,224,236,0.78);
  line-height: 1.55;
  margin-bottom: 0.45rem;
  font-weight: 300;
}

.home-hidden-entry .closing__coords {
  margin-top: 0.6rem;
  color: rgba(196,196,206,0.38);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .closing-world__hotspot--inline {
    right: 1.5rem;
    top: 1.5rem;
    transform: none;
  }
}
