.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.home-page .scene-hud { display: none; }

.home-page .hero {
  min-height: clamp(520px, 68svh, 680px);
  padding: 104px 6vw 46px;
  background: linear-gradient(90deg, rgba(3,7,12,.9), rgba(3,7,12,.3) 60%, rgba(3,7,12,.06));
}

.home-page .hero-copy { width: min(980px, 86vw); }
.home-page .hero-copy > p:last-of-type,
.home-page .hero-data, .home-page .resident-signal { display: none; }
.home-page .circle-link { width: auto; height: 52px; margin-top: 30px; padding: 0 20px; border-radius: 0; place-items: center start; }
.home-page .circle-link::before { display: none; }

.chapter-index {
  position: relative;
  z-index: 3;
  padding: 38px 5vw 64px;
  background: var(--contrast-bg);
}

.chapter-index-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.42);
}

.chapter-index-head p, .chapter-index-head span,
.chapter-number, .chapter-open {
  margin: 0;
  font: 700 12px/1.3 "DM Mono", monospace;
  letter-spacing: .14em;
}

.chapter-index-head span { color: var(--contrast-text-secondary); }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 2px;
  background: rgba(255,255,255,.3);
  border: 2px solid rgba(255,255,255,.3);
}

.chapter-card {
  position: relative;
  display: grid;
  min-height: 280px;
  padding: 20px;
  overflow: hidden;
  grid-template: auto 1fr auto / 1fr auto;
  background: var(--contrast-surface);
  color: var(--contrast-text);
  text-decoration: none;
  isolation: isolate;
  transition: background .25s ease, transform .25s ease;
}

.chapter-card:hover { z-index: 2; background: var(--contrast-surface-raised); transform: translateY(-4px); }
.chapter-number { position: relative; z-index: 3; color: var(--contrast-accent); }
.chapter-open { position: relative; z-index: 3; justify-self: end; color: var(--contrast-text); }
.chapter-open b { color: var(--contrast-accent); }
.chapter-card h2 { position: relative; z-index: 3; grid-column: 1 / -1; align-self: end; margin: 0; font: 500 clamp(22px, 2vw, 34px)/1.05 var(--display-font); letter-spacing: -.04em; }

.chapter-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  opacity: 1;
  background: linear-gradient(145deg, #0c2230, #050a10 70%);
}
.chapter-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,7,12,.08), rgba(3,7,12,.88)); }
.chapter-visual i { position: absolute; display: block; border: 1px solid var(--contrast-cyan); }
.chapter-city .chapter-visual { background-image: linear-gradient(rgba(142,239,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(142,239,255,.12) 1px, transparent 1px); background-size: 26px 26px; }
.chapter-city i:nth-child(1) { right: 18%; bottom: 22%; width: 42%; height: 42%; border-radius: 50% 50% 0 0; }
.chapter-life i { bottom: 20%; width: 1px; height: 50%; background: var(--contrast-cyan); border: 0; }
.chapter-life i:nth-child(1) { left: 18%; }.chapter-life i:nth-child(2) { left: 40%; height: 70%; }.chapter-life i:nth-child(3) { left: 62%; height: 38%; }.chapter-life i:nth-child(4) { left: 82%; height: 58%; }
.chapter-shell i { inset: 20% 10%; border-width: 10px; border-radius: 50%; }
.chapter-shell i:nth-child(2) { inset: 30% 20%; border-color: var(--contrast-accent); }
.chapter-systems i { width: 70px; height: 70px; border-radius: 50%; top: 26%; }
.chapter-systems i:nth-child(1) { left: 9%; }.chapter-systems i:nth-child(2) { left: 34%; border-color: var(--contrast-accent); }.chapter-systems i:nth-child(3) { left: 59%; }.chapter-systems i:nth-child(4) { left: 84%; border-color: var(--contrast-accent); }
.chapter-network i { top: 42%; width: 12px; height: 12px; border-radius: 50%; background: var(--contrast-cyan); }
.chapter-network i:nth-child(1) { left: 12%; }.chapter-network i:nth-child(2) { left: 38%; }.chapter-network i:nth-child(3) { left: 64%; }.chapter-network i:nth-child(4) { left: 88%; }
.chapter-network .chapter-visual::before { content: ""; position: absolute; top: calc(42% + 6px); right: 10%; left: 10%; border-top: 1px dashed var(--contrast-cyan); }
.chapter-construction i { bottom: 24%; width: 16%; background: rgba(142,239,255,.16); }
.chapter-construction i:nth-child(1) { left: 8%; height: 16%; }.chapter-construction i:nth-child(2) { left: 30%; height: 28%; }.chapter-construction i:nth-child(3) { left: 52%; height: 42%; }.chapter-construction i:nth-child(4) { left: 74%; height: 58%; border-color: var(--contrast-accent); }
.chapter-dossier i { left: 14%; right: 14%; height: 1px; border: 0; background: rgba(255,255,255,.48); }
.chapter-dossier i:nth-child(1) { top: 25%; }.chapter-dossier i:nth-child(2) { top: 40%; }.chapter-dossier i:nth-child(3) { top: 55%; }.chapter-dossier i:nth-child(4) { top: 70%; }
.chapter-operations i { width: 90px; height: 90px; border-radius: 50%; }
.chapter-operations i:nth-child(1) { top: 12%; left: 10%; }.chapter-operations i:nth-child(2) { top: 32%; left: 32%; border-color: var(--contrast-accent); }.chapter-operations i:nth-child(3) { top: 8%; right: 10%; }.chapter-operations i:nth-child(4) { right: 28%; bottom: 8%; border-color: var(--contrast-accent); }

.detail-page .detail-intro {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 340px;
  padding: 120px 5vw 48px;
  align-content: end;
  background: linear-gradient(90deg, rgba(3,7,12,.98), rgba(3,7,12,.68), rgba(3,7,12,.3));
}
.detail-intro a { width: fit-content; margin-bottom: 24px; color: var(--contrast-accent); font: 700 12px/1 "DM Mono", monospace; letter-spacing: .12em; text-decoration: none; }
.detail-intro p { margin: 0 0 12px; color: var(--contrast-cyan); font: 700 12px/1 "DM Mono", monospace; letter-spacing: .14em; }
.detail-intro h1 { max-width: 1050px; margin: 0; font: 400 clamp(48px, 7vw, 110px)/.92 var(--display-font); letter-spacing: -.06em; }

.detail-page .section, .detail-page .architecture, .detail-page .network {
  min-height: auto;
  padding: 64px 5vw 78px;
  background: var(--contrast-bg);
}
.detail-page .title-row, .detail-page .life-head, .detail-page .network-top,
.detail-page .build-head, .detail-page .dossier-head, .detail-page .deep-dives-head { margin-top: 24px; }
.detail-page .city-map, .detail-page .system-grid, .detail-page .route,
.detail-page .build-sequence, .detail-page .dossier-list,
.detail-page .deep-dive-list, .detail-page .day-timeline { margin-top: 38px; }
.detail-page .scene-hud { display: none; }

.detail-pagination {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--contrast-bg);
  border-top: 1px solid rgba(255,255,255,.35);
}
.detail-pagination a { min-height: 92px; padding: 22px 5vw; display: grid; align-content: center; color: var(--contrast-text); text-decoration: none; font: 700 13px/1.4 "DM Mono", monospace; letter-spacing: .1em; }
.detail-pagination a + a { text-align: right; border-left: 1px solid rgba(255,255,255,.35); }
.detail-pagination span { color: var(--contrast-accent); }

@media (max-width: 1100px) { .chapter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) {
  .home-page .hero { min-height: 560px; padding-inline: 7vw; }
  .chapter-index { padding: 26px 5vw 44px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-card { min-height: 230px; }
  .detail-page .detail-intro { min-height: 290px; padding: 104px 7vw 38px; }
  .detail-page .section, .detail-page .architecture, .detail-page .network { padding: 46px 7vw 58px; }
  .detail-pagination { grid-template-columns: 1fr; }
  .detail-pagination a + a { border-left: 0; border-top: 1px solid rgba(255,255,255,.35); text-align: left; }
}
