:root {
  color-scheme: dark;
  --bg: #020509;
  --bg-soft: #071019;
  --panel: rgba(5, 13, 20, 0.74);
  --panel-strong: rgba(6, 14, 20, 0.92);
  --line: rgba(128, 202, 255, 0.2);
  --line-strong: rgba(130, 215, 255, 0.46);
  --text: #f2f7fb;
  --muted: #9eaeb9;
  --quiet: #647684;
  --cyan: #34c8ff;
  --amber: #f6b94e;
  --red: #ff4141;
  --violet: #b070ff;
  --teal: #31e6d2;
  --white-dim: rgba(242, 247, 251, 0.7);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.noise,
.scanline {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.noise {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px);
  background-size: 43px 47px, 71px 67px;
  mix-blend-mode: screen;
}

.scanline {
  opacity: 0.14;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 5px,
    rgba(145, 221, 255, 0.08) 6px
  );
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(101, 179, 229, 0.13);
  background: linear-gradient(180deg, rgba(1, 5, 9, 0.88), rgba(1, 5, 9, 0.52));
  backdrop-filter: blur(18px);
  transition: transform 420ms ease, opacity 420ms ease, background 420ms ease;
}

.site-header.is-hidden {
  transform: translateY(-105%);
  opacity: 0;
  pointer-events: none;
}

.brand,
.nav-links,
.sound-toggle,
.terminal-line,
.chapter-number,
.chapter-status,
.archive-stats,
.rail-header,
.console-row span,
.signal-links small,
.site-footer {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #d8f4ff;
  font-size: 0.78rem;
  font-weight: 600;
}

.brand span:last-child {
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 24px;
  color: var(--cyan);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  filter: drop-shadow(0 0 12px rgba(52, 200, 255, 0.8));
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.8vw, 34px);
  color: var(--muted);
  font-size: 0.68rem;
}

.nav-links a {
  position: relative;
  padding-block: 8px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.entry-nav-link {
  color: var(--cyan);
}

.entry-nav-link {
  text-shadow: 0 0 16px rgba(52, 200, 255, 0.5);
}

.entry-nav-link::before {
  content: ">";
  margin-right: 0.45em;
  color: var(--teal);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.sound-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(119, 202, 255, 0.28);
  background: rgba(5, 15, 23, 0.72);
  color: var(--white-dim);
  cursor: pointer;
  font-size: 0.64rem;
}

.sound-toggle:hover,
.sound-toggle:focus-visible,
.sound-toggle[aria-pressed="true"] {
  color: var(--teal);
  border-color: rgba(49, 230, 210, 0.5);
}

.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.splash-section {
  position: fixed;
  inset: 0;
  z-index: 40;
  height: 100dvh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 5svh, 82px) clamp(22px, 5vw, 76px) clamp(28px, 6svh, 88px);
  isolation: isolate;
  overflow: hidden;
  background: #020509;
  border-bottom: 1px solid rgba(128, 202, 255, 0.18);
  transition:
    opacity 640ms ease,
    visibility 640ms ease,
    transform 640ms ease;
}

.splash-section.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.012);
}

.splash-backdrop {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(circle at 87% 24%, rgba(52, 200, 255, 0.16), transparent 23%),
    radial-gradient(circle at 7% 86%, rgba(255, 65, 65, 0.14), transparent 24%),
    linear-gradient(90deg, rgba(2, 5, 9, 0.28), rgba(2, 5, 9, 0.08) 46%, rgba(2, 5, 9, 0.18)),
    linear-gradient(180deg, rgba(2, 5, 9, 0.04), rgba(2, 5, 9, 0.26) 62%, #020509 100%),
    url("./assets/archive-background.png") center / cover no-repeat;
}

.splash-backdrop::before,
.splash-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-backdrop::before {
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.9), rgba(2, 5, 9, 0.52) 29%, transparent 68%, rgba(2, 5, 9, 0.2)),
    radial-gradient(ellipse at 31% 83%, rgba(52, 200, 255, 0.12), transparent 30%);
}

.splash-backdrop::after {
  background:
    linear-gradient(180deg, rgba(2, 5, 9, 0.28), transparent 34%, rgba(2, 5, 9, 0.4)),
    linear-gradient(0deg, rgba(2, 5, 9, 0.4), transparent 24%);
}

.splash-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(128, 202, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 202, 255, 0.07) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(circle at 72% 25%, black, transparent 45%);
}

.splash-copy {
  position: relative;
  z-index: 1;
  width: min(640px, 56vw);
  max-height: calc(100dvh - clamp(52px, 11svh, 170px));
  color: var(--text);
}

.splash-status {
  margin: 0 0 clamp(10px, 2svh, 20px);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.splash-title {
  max-width: 640px;
  font-family: var(--display);
  font-size: clamp(4rem, min(7.3vw, 11.2svh), 8.8rem);
  line-height: 0.86;
  letter-spacing: 0.11em;
}

.splash-title span {
  display: block;
  white-space: nowrap;
}

.splash-subtitle {
  margin: clamp(14px, 2.4svh, 24px) 0 0;
  color: rgba(246, 185, 78, 0.92);
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.25vw, 1rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.splash-audio-note {
  max-width: 560px;
  margin: clamp(14px, 2.4svh, 24px) 0 0;
  padding: 12px 0 12px 18px;
  border-left: 2px solid rgba(52, 200, 255, 0.72);
  background: linear-gradient(90deg, rgba(52, 200, 255, 0.08), transparent 78%);
  color: rgba(216, 232, 242, 0.86);
  font-family: var(--mono);
  font-size: clamp(0.62rem, 0.9vw, 0.76rem);
  letter-spacing: 0.18em;
  line-height: 1.75;
  text-transform: uppercase;
}

.splash-intro {
  max-width: 440px;
  margin: clamp(18px, 3.3svh, 34px) 0 0;
  color: rgba(216, 232, 242, 0.8);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
}

.splash-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: clamp(22px, 3.8svh, 36px);
}

.splash-actions span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.splash-enter {
  min-width: 204px;
}

.splash-start {
  min-width: 218px;
}

.splash-footer {
  position: absolute;
  left: clamp(22px, 5vw, 76px);
  right: clamp(22px, 5vw, 76px);
  bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgba(198, 211, 220, 0.62);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  padding: 92px clamp(22px, 3.2vw, 46px) 18px;
  isolation: isolate;
  border: 1px solid rgba(128, 202, 255, 0.12);
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.26), rgba(2, 5, 9, 0.72) 58%, rgba(2, 5, 9, 0.94)),
    linear-gradient(180deg, rgba(2, 5, 9, 0.1), rgba(2, 5, 9, 0.88) 74%, #020509 100%),
    url("./assets/archive-background.png") center / cover no-repeat;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 22%, rgba(52, 200, 255, 0.18), transparent 22%),
    radial-gradient(circle at 46% 58%, rgba(255, 65, 65, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(2, 5, 9, 0.2), rgba(2, 5, 9, 0.8) 76%);
}

.constellation {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.constellation::before,
.constellation::after {
  content: "";
  position: absolute;
  width: 58vw;
  height: 50vh;
  left: 0;
  top: 4vh;
  opacity: 0.38;
  background:
    linear-gradient(32deg, transparent 31%, rgba(52, 200, 255, 0.24) 31.2%, transparent 31.8%),
    linear-gradient(154deg, transparent 42%, rgba(52, 200, 255, 0.22) 42.2%, transparent 42.7%),
    linear-gradient(12deg, transparent 58%, rgba(52, 200, 255, 0.18) 58.2%, transparent 58.8%);
}

.constellation::after {
  left: 36vw;
  top: 12vh;
  width: 44vw;
  transform: rotate(11deg);
  opacity: 0.24;
}

.constellation span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(52, 200, 255, 0.9);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(430px, 0.9fr) minmax(340px, 0.84fr) minmax(410px, 0.92fr);
  align-items: stretch;
  gap: clamp(24px, 3vw, 48px);
  max-width: 1680px;
  min-height: clamp(650px, calc(100vh - 292px), 760px);
  margin: 0 auto;
}

.title-panel {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: clamp(26px, 4vh, 42px);
  padding-top: 0;
  padding-right: clamp(8px, 2vw, 28px);
}

.title-copy {
  align-self: center;
  min-width: 0;
}

.terminal-line {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 600;
}

h1,
h2 {
  margin: 0;
  font-weight: 300;
  letter-spacing: 0;
}

h1 {
  max-width: 500px;
  font-family: var(--display);
  font-size: clamp(4.6rem, 5.4vw, 7rem);
  line-height: 0.78;
  color: rgba(247, 250, 252, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-shadow:
    0 0 22px rgba(242, 247, 251, 0.16),
    0 0 4px rgba(242, 247, 251, 0.45);
}

.story-title {
  display: grid;
  justify-items: start;
  gap: 0.035em;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.title-before {
  letter-spacing: 0.13em;
}

.title-the {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  width: 100%;
  margin-left: 0;
  font-size: 0.38em;
  line-height: 1;
  letter-spacing: 0.32em;
}

.title-the::before,
.title-the::after {
  content: "";
  display: block;
  width: 1.9em;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 247, 251, 0.7), transparent);
}

h2 {
  font-size: clamp(2rem, 4.4vw, 4.75rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.subtitle {
  max-width: 470px;
  margin: 22px 0 0;
  color: rgba(242, 247, 251, 0.82);
  font-family: var(--mono);
  font-size: clamp(0.76rem, 1.15vw, 0.96rem);
  line-height: 1.45;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-copy,
.section-copy p {
  max-width: 620px;
  color: var(--white-dim);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.7;
}

.hero-copy {
  width: 100%;
  max-width: 430px;
  margin: 28px 0 0;
  color: rgba(198, 211, 220, 0.82);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(119, 202, 255, 0.34);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-action {
  color: #031018;
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  box-shadow: 0 0 28px rgba(52, 200, 255, 0.28);
}

.secondary-action {
  color: var(--cyan);
  background: rgba(5, 15, 23, 0.72);
}

.primary-action:hover,
.secondary-action:hover,
.chapter-card:hover,
.chapter-card:focus-visible {
  transform: translateY(-1px);
}

.archive-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  max-width: none;
  margin: 0;
  border: 1px solid rgba(128, 202, 255, 0.2);
  background: rgba(128, 202, 255, 0.13);
}

.archive-stats div {
  padding: 13px 16px;
  background: rgba(3, 9, 14, 0.72);
}

.archive-stats dt {
  color: var(--quiet);
  font-size: 0.58rem;
}

.archive-stats dd {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 0.78rem;
}

.archive-side-panels {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(220px, 0.72fr);
  gap: 14px;
  max-width: 560px;
}

.memory-panel {
  padding: 18px;
  border: 1px solid rgba(128, 202, 255, 0.2);
  background: rgba(3, 9, 14, 0.72);
  color: rgba(209, 222, 231, 0.82);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  line-height: 1.65;
  text-transform: uppercase;
}

.memory-panel p {
  margin: 0;
}

.memory-panel p + p {
  margin-top: 10px;
}

.memory-panel span {
  display: block;
  height: 26px;
  margin-top: 16px;
  background: linear-gradient(90deg, transparent, rgba(52, 200, 255, 0.44), transparent);
  clip-path: polygon(0 50%, 20% 50%, 24% 18%, 30% 84%, 37% 50%, 100% 50%, 100% 56%, 37% 56%, 29% 95%, 23% 32%, 20% 56%, 0 56%);
  opacity: 0.45;
}

.newcomer-panel {
  position: relative;
  width: min(100%, 540px);
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid rgba(128, 202, 255, 0.34);
  border-left: 2px solid rgba(52, 200, 255, 0.9);
  background:
    radial-gradient(circle at 92% 18%, rgba(49, 230, 210, 0.12), transparent 30%),
    linear-gradient(90deg, rgba(52, 200, 255, 0.12), transparent 82%),
    rgba(3, 9, 14, 0.8);
  box-shadow:
    inset 0 0 44px rgba(52, 200, 255, 0.07),
    0 0 42px rgba(52, 200, 255, 0.08);
}

.newcomer-panel strong,
.recommended-entry,
.newcomer-actions a,
.start-rule,
.signal-choice span,
.signal-choice strong,
.signal-choice small {
  font-family: var(--mono);
  text-transform: uppercase;
}

.newcomer-panel strong {
  display: block;
  color: var(--cyan);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
}

.recommended-entry {
  display: block;
  margin-top: 10px;
  color: rgba(246, 185, 78, 0.94);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.newcomer-panel p {
  max-width: 450px;
  margin: 14px 0 0;
  color: rgba(231, 238, 244, 0.82);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
}

.newcomer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.newcomer-actions a {
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.newcomer-actions .newcomer-primary {
  min-height: 34px;
  padding: 9px 13px;
  border: 1px solid rgba(52, 200, 255, 0.54);
  background: linear-gradient(90deg, rgba(52, 200, 255, 0.22), rgba(49, 230, 210, 0.12));
  color: var(--text);
  box-shadow: 0 0 18px rgba(52, 200, 255, 0.12);
}

.newcomer-actions a::after {
  content: " ->";
}

.newcomer-actions .newcomer-primary::after {
  content: "";
}

.signal-core {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.signal-core::before {
  content: "";
  position: absolute;
  inset: 2% -18% 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(52, 200, 255, 0.18), transparent 28%),
    radial-gradient(ellipse at 50% 58%, rgba(255, 65, 65, 0.13), transparent 30%),
    radial-gradient(ellipse at 50% 88%, rgba(49, 230, 210, 0.14), transparent 24%);
  filter: blur(10px);
}

.spine {
  position: relative;
  width: min(100%, 390px);
  height: calc(100% - 34px);
  min-height: 620px;
  align-self: start;
  pointer-events: none;
}

.spine::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent,
    var(--cyan) 7%,
    var(--amber) 24%,
    var(--red) 44%,
    var(--violet) 68%,
    var(--teal) 96%,
    transparent
  );
  box-shadow:
    0 0 22px rgba(52, 200, 255, 0.9),
    0 0 54px rgba(255, 65, 65, 0.5),
    0 0 86px rgba(49, 230, 210, 0.22);
}

.spine::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 224px;
  height: 56px;
  transform: translateX(-50%);
  border: 1px solid rgba(49, 230, 210, 0.55);
  border-radius: 50%;
  box-shadow:
    0 0 26px rgba(49, 230, 210, 0.42),
    inset 0 0 26px rgba(49, 230, 210, 0.2);
}

.pulse {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: white;
  box-shadow: 0 0 25px currentColor;
  animation: breathe 3.8s ease-in-out infinite;
}

.pulse-one {
  top: 11%;
  color: var(--cyan);
}

.pulse-two {
  top: 55%;
  color: var(--red);
  animation-delay: 1s;
}

.pulse-three {
  top: 83%;
  color: var(--violet);
  animation-delay: 2s;
}

.glyph {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cyan);
  filter: drop-shadow(0 0 16px currentColor);
  pointer-events: none;
}

.glyph svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph::before {
  content: "";
  position: absolute;
  inset: -22%;
  background: var(--glyph) center / contain no-repeat;
  filter: saturate(1.18) contrast(1.12) drop-shadow(0 0 14px currentColor);
  mix-blend-mode: screen;
}

.glyph svg {
  opacity: 0;
}

.heart {
  --glyph: url("./assets/chapter-icons/chapter-01-glyph-alpha.png?v=2");
  top: 2%;
  width: 126px;
  height: 126px;
}

.heart svg {
  fill: rgba(52, 200, 255, 0.08);
}

.dna {
  --glyph: url("./assets/chapter-icons/chapter-02-glyph-alpha.png?v=2");
  top: 18%;
  width: 110px;
  height: 158px;
  color: var(--amber);
}

.root {
  --glyph: url("./assets/chapter-icons/chapter-03-glyph-alpha.png?v=2");
  top: 37%;
  width: 156px;
  height: 166px;
  color: var(--red);
}

.ghost-node {
  --glyph: url("./assets/chapter-icons/chapter-04-glyph-alpha.png?v=2");
  top: 49%;
  width: 142px;
  height: 142px;
  color: #d7e7f4;
}

.fork-node {
  --glyph: url("./assets/chapter-icons/chapter-05-glyph-alpha.png?v=2");
  top: 61%;
  width: 150px;
  height: 150px;
  color: var(--violet);
}

.deadair-node {
  --glyph: url("./assets/chapter-icons/chapter-06-glyph-alpha.png?v=2");
  top: 71%;
  width: 172px;
  height: 122px;
  color: #ff5d8f;
}

.heartbeat-node {
  --glyph: url("./assets/chapter-icons/chapter-07-glyph-alpha.png?v=2");
  top: 80%;
  width: 180px;
  height: 104px;
  color: var(--red);
}

.starfall-node {
  --glyph: url("./assets/chapter-icons/chapter-08-glyph-alpha.png?v=2");
  bottom: 9%;
  width: 142px;
  height: 152px;
  color: var(--cyan);
}

.silent-node {
  --glyph: url("./assets/chapter-icons/chapter-09-glyph-alpha.png?v=2");
  bottom: 1%;
  width: 150px;
  height: 134px;
  color: var(--violet);
}

.after-node {
  --glyph: url("./assets/chapter-icons/chapter-10-glyph-alpha.png?v=2");
  bottom: 1%;
  width: 140px;
  height: 154px;
  color: var(--teal);
}

.chapter-rail {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 16px 18px 16px 0;
  border: 1px solid rgba(128, 202, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.86), rgba(3, 10, 16, 0.68)),
    radial-gradient(circle at 16% 10%, rgba(52, 200, 255, 0.12), transparent 34%);
  box-shadow:
    inset 1px 0 0 rgba(128, 202, 255, 0.12),
    inset 0 0 44px rgba(52, 200, 255, 0.04),
    0 24px 80px rgba(0, 0, 0, 0.28);
}

.chapter-rail::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 0 10px 28px;
  background: linear-gradient(90deg, transparent, rgba(52, 200, 255, 0.5), transparent);
}

.rail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 14px 28px;
  color: var(--quiet);
  font-size: 0.63rem;
}

.chapters {
  display: grid;
  gap: 0;
}

.chapter-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px 56px 1fr;
  gap: 12px;
  width: 100%;
  min-height: clamp(50px, 5.8vh, 64px);
  padding: clamp(5px, 0.6vh, 7px) 0 clamp(5px, 0.6vh, 7px) 28px;
  border: 0;
  border-top: 1px solid rgba(128, 202, 255, 0.2);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.chapter-card::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 26px;
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--bg);
}

.chapter-card:hover,
.chapter-card:focus-visible,
.chapter-card.active {
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 16%, transparent), transparent 70%),
    rgba(5, 18, 27, 0.28);
  outline: none;
}

.chapter-card.locked {
  color: rgba(210, 224, 232, 0.68);
}

.chapter-card.locked:hover,
.chapter-card.locked:focus-visible {
  color: var(--violet);
}

.chapter-number {
  color: currentColor;
  font-size: 1.38rem;
  line-height: 1;
}

.chapter-copy {
  min-width: 0;
}

.chapter-name {
  display: block;
  min-width: 0;
  color: currentColor;
  font-family: var(--mono);
  font-size: clamp(0.82rem, 0.96vw, 1.02rem);
  letter-spacing: 0.24em;
  line-height: 1.1;
  text-transform: uppercase;
}

.chapter-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.chapter-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  opacity: 0.42;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.chapter-card:hover .chapter-actions,
.chapter-card:focus-visible .chapter-actions,
.chapter-card.active .chapter-actions {
  opacity: 1;
}

.chapter-action {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, currentColor 36%, transparent);
  background: rgba(1, 5, 9, 0.46);
  color: currentColor;
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 0 10px currentColor;
  box-shadow: inset 0 0 16px color-mix(in srgb, currentColor 10%, transparent);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.chapter-action:hover,
.chapter-action:focus-visible {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 13%, rgba(1, 5, 9, 0.78));
  box-shadow:
    inset 0 0 18px color-mix(in srgb, currentColor 18%, transparent),
    0 0 18px color-mix(in srgb, currentColor 26%, transparent);
  outline: none;
  transform: translateY(-1px);
}

.chapter-action.disabled {
  opacity: 0.26;
  cursor: not-allowed;
  filter: saturate(0);
  pointer-events: auto;
}

.chapter-theme {
  display: block;
  margin-top: 4px;
  color: var(--white-dim);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.chapter-question {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: clamp(0.54rem, 0.65vw, 0.62rem);
  line-height: 1.32;
}

.chapter-status {
  display: block;
  margin-top: 5px;
  color: currentColor;
  font-size: 0.55rem;
  font-weight: 600;
}

.chapter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: currentColor;
}

.chapter-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 15px currentColor) saturate(1.18) contrast(1.15);
  mix-blend-mode: screen;
}

.chapter-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px currentColor);
}

.selected-node {
  position: relative;
  z-index: 4;
  min-height: 64px;
  max-width: 1680px;
  margin: 14px auto 0;
  padding: 14px clamp(16px, 2vw, 24px);
  border: 1px solid rgba(128, 202, 255, 0.16);
  background: rgba(3, 9, 14, 0.76);
  color: var(--white-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-preview-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr 0.9fr 1fr;
  gap: 14px;
  max-width: 1680px;
  margin: 14px auto 0;
}

.preview-card {
  position: relative;
  display: grid;
  grid-template-columns: 44% 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 190px;
  border: 1px solid rgba(128, 202, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(5, 16, 24, 0.78), rgba(2, 7, 11, 0.9)),
    rgba(3, 9, 14, 0.78);
  box-shadow:
    inset 0 0 34px rgba(52, 200, 255, 0.05),
    0 18px 50px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.preview-card:hover,
.preview-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(52, 200, 255, 0.58);
  background: rgba(5, 16, 24, 0.86);
  outline: none;
}

.preview-title,
.preview-index,
.preview-link {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.preview-title {
  grid-column: 1 / -1;
  padding: 14px 16px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 600;
}

.sparrow-preview .preview-title,
.sparrow-preview .preview-link {
  color: var(--amber);
}

.preview-index {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--quiet);
  font-size: 0.68rem;
}

.preview-visual {
  display: block;
  margin: 0 0 12px 16px;
  min-height: 124px;
  border-right: 1px solid rgba(128, 202, 255, 0.12);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.48);
}

.radar {
  border: 1px solid rgba(52, 200, 255, 0.2);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.38)),
    url("./assets/chapter-panels/chapter-01-panel.png") center / cover no-repeat;
}

.portrait {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42)),
    url("./assets/sparrow-file.png") 48% 28% / 210% auto no-repeat;
}

.echo-ring {
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(1, 5, 9, 0.04), rgba(1, 5, 9, 0.5)),
    url("./assets/characters/echo-mirror-cache.png") 54% 45% / cover no-repeat;
  filter: drop-shadow(0 0 18px rgba(176, 112, 255, 0.28));
  box-shadow:
    inset 0 0 40px rgba(1, 5, 9, 0.42),
    0 0 50px rgba(176, 112, 255, 0.14);
}

.preview-copy {
  align-self: center;
  padding: 0 16px 12px;
  color: rgba(202, 216, 225, 0.82);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.media-list {
  grid-column: 1 / -1;
  padding-top: 8px;
  color: rgba(202, 216, 225, 0.88);
}

.preview-link {
  grid-column: 2;
  align-self: end;
  padding: 0 16px 16px;
  color: var(--cyan);
  font-size: 0.66rem;
}

.signals-preview .preview-link,
.signals-preview .preview-title {
  grid-column: 1 / -1;
}

.inline-link {
  display: inline-flex;
  margin-left: 14px;
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.archive-section.chapter-library {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1680px;
  padding-top: clamp(46px, 6vw, 86px);
}

.archive-section.chapter-library .section-copy {
  max-width: 760px;
}

.chapter-library-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-self: start;
}

.library-card {
  position: relative;
  display: grid;
  grid-column: span 2;
  min-height: 340px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, rgba(128, 202, 255, 0.16));
  background: rgba(3, 9, 14, 0.78);
  color: var(--text);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 0 34px color-mix(in srgb, var(--accent) 12%, transparent),
    0 18px 54px rgba(0, 0, 0, 0.2);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    filter 180ms ease;
}

.library-card.open {
  grid-column: span 4;
  min-height: 460px;
}

.library-card.locked {
  min-height: 260px;
}

.library-card:hover,
.library-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 78%, white 8%);
  filter: brightness(1.08);
  outline: none;
}

.library-card.locked {
  cursor: default;
  filter: saturate(0.72);
}

.library-card.locked:hover,
.library-card.locked:focus-visible {
  transform: none;
}

.library-image {
  position: absolute;
  inset: 0;
}

.library-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 5, 9, 0.03) 12%, rgba(2, 5, 9, 0.42) 52%, rgba(2, 5, 9, 0.98) 100%),
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 44%);
}

.library-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.9;
}

.library-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 7px;
  min-height: 100%;
  padding: 18px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.82);
}

.library-number,
.library-title,
.library-theme,
.library-status,
.library-action {
  font-family: var(--mono);
  text-transform: uppercase;
}

.library-number {
  position: absolute;
  top: 14px;
  left: 16px;
  color: var(--accent);
  font-size: 1.7rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 18px currentColor;
}

.library-title {
  color: var(--accent);
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.library-card.open .library-title {
  font-size: clamp(1.05rem, 1.4vw, 1.34rem);
  letter-spacing: 0.22em;
}

.library-theme {
  color: rgba(231, 238, 244, 0.72);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
}

.library-question {
  color: rgba(231, 238, 244, 0.8);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.45;
}

.library-card.locked .library-question {
  display: none;
}

.library-status {
  color: var(--accent);
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.library-action {
  margin-top: 4px;
  color: rgba(247, 250, 252, 0.82);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.signal-mode .scanline {
  opacity: 0.24;
}

.start-page {
  background:
    radial-gradient(circle at 34% 14%, rgba(52, 200, 255, 0.12), transparent 28%),
    radial-gradient(circle at 84% 72%, rgba(246, 185, 78, 0.08), transparent 26%),
    #020509;
}

.start-shell {
  min-height: 100vh;
}

.start-hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  padding: 118px clamp(18px, 5vw, 76px) clamp(44px, 7vw, 96px);
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(128, 202, 255, 0.14);
}

.start-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.86), rgba(2, 5, 9, 0.4) 48%, rgba(2, 5, 9, 0.84)),
    linear-gradient(180deg, rgba(2, 5, 9, 0.12), #020509 92%),
    url("./assets/archive-background.png") center / cover no-repeat;
}

.start-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(52, 200, 255, 0.14), transparent 28%),
    linear-gradient(180deg, transparent 45%, rgba(2, 5, 9, 0.78));
}

.start-copy {
  width: min(100%, 860px);
  max-width: 860px;
  min-width: 0;
}

.start-copy h1 {
  max-width: 760px;
  font-size: clamp(4.2rem, 10vw, 8rem);
  letter-spacing: 0.14em;
}

.start-lede {
  width: min(100%, 760px);
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(231, 238, 244, 0.84);
  font-family: var(--mono);
  font-size: clamp(0.92rem, 1.25vw, 1.1rem);
  line-height: 1.75;
  overflow-wrap: break-word;
  white-space: normal;
}

.start-rule {
  width: min(100%, 690px);
  max-width: 690px;
  margin: 24px 0 0;
  padding: 18px 0 18px 20px;
  border-left: 2px solid rgba(52, 200, 255, 0.72);
  background: linear-gradient(90deg, rgba(52, 200, 255, 0.08), transparent 82%);
  color: var(--text);
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  letter-spacing: 0.16em;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.start-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(300px, 0.54fr);
  gap: clamp(28px, 6vw, 86px);
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) clamp(18px, 4vw, 54px);
  border-top: 1px solid rgba(128, 202, 255, 0.13);
}

.start-note {
  align-self: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(128, 202, 255, 0.22);
  background: rgba(3, 9, 14, 0.74);
  color: rgba(231, 238, 244, 0.78);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
}

.start-note p {
  margin: 0;
}

.start-note p + p {
  margin-top: 18px;
}

.start-signals {
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
}

.signal-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal-choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, rgba(128, 202, 255, 0.14));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 74%),
    rgba(3, 9, 14, 0.74);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.signal-choice:hover,
.signal-choice:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 76%, white 8%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 78%),
    rgba(6, 18, 26, 0.9);
  outline: none;
}

.signal-choice span {
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
}

.signal-choice strong {
  color: var(--accent);
  font-size: clamp(0.82rem, 1vw, 1rem);
  letter-spacing: 0.18em;
}

.signal-choice small {
  grid-column: 2;
  color: rgba(231, 238, 244, 0.74);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.signal-mode .spine::before {
  animation: signal-flare 2.4s ease-in-out infinite;
}

.archive-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.78fr);
  gap: clamp(28px, 6vw, 96px);
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(72px, 11vw, 150px) clamp(18px, 4vw, 54px);
  border-top: 1px solid rgba(128, 202, 255, 0.13);
}

.archive-section::before {
  content: "";
  position: absolute;
  inset: 0 clamp(18px, 4vw, 54px);
  z-index: -1;
  border-left: 1px solid rgba(128, 202, 255, 0.1);
  border-right: 1px solid rgba(128, 202, 255, 0.1);
  pointer-events: none;
}

.section-copy p {
  margin: 24px 0 0;
}

.compact {
  align-self: center;
}

.origin-console {
  align-self: center;
  border: 1px solid rgba(128, 202, 255, 0.18);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.console-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 20px;
  border-top: 1px solid rgba(128, 202, 255, 0.12);
}

.console-row:first-child {
  border-top: 0;
}

.console-row span {
  color: var(--cyan);
  font-size: 0.76rem;
}

.console-row p {
  margin: 0;
  color: var(--white-dim);
  line-height: 1.55;
}

.split {
  align-items: center;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 42px);
}

.portrait-mark {
  display: grid;
  place-items: center;
  flex: 0 0 clamp(116px, 18vw, 210px);
  aspect-ratio: 1;
  border: 1px solid rgba(246, 185, 78, 0.46);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.42)),
    url("./assets/sparrow-file.png") 48% 22% / 230% auto no-repeat;
  color: transparent;
  font-family: var(--mono);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  box-shadow: 0 0 50px rgba(246, 185, 78, 0.12);
}

.echo {
  background:
    radial-gradient(circle at 72% 48%, rgba(176, 112, 255, 0.12), transparent 28%),
    transparent;
}

.echo-visual {
  position: relative;
  min-height: 320px;
  border: 1px solid rgba(176, 112, 255, 0.22);
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.14), rgba(2, 5, 9, 0.02) 48%, rgba(2, 5, 9, 0.48)),
    linear-gradient(180deg, rgba(176, 112, 255, 0.03), rgba(2, 5, 9, 0.32)),
    url("./assets/characters/echo-mirror-cache.png") 54% 46% / cover no-repeat;
  overflow: hidden;
  box-shadow:
    inset 0 0 70px rgba(2, 5, 9, 0.42),
    0 28px 80px rgba(0, 0, 0, 0.28);
}

.echo-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 58% 42%, rgba(176, 112, 255, 0.2), transparent 24%),
    radial-gradient(circle at 32% 72%, rgba(52, 200, 255, 0.12), transparent 24%),
    linear-gradient(180deg, transparent 56%, rgba(2, 5, 9, 0.7));
  pointer-events: none;
  mix-blend-mode: screen;
}

.signals {
  grid-template-columns: minmax(0, 0.76fr) minmax(320px, 1fr);
  padding-bottom: clamp(90px, 12vw, 160px);
}

.signal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  align-self: center;
  border: 1px solid rgba(128, 202, 255, 0.18);
  background: rgba(128, 202, 255, 0.13);
}

.signal-links a {
  min-height: 126px;
  padding: 22px;
  background: rgba(5, 13, 20, 0.82);
  transition:
    background 180ms ease,
    color 180ms ease;
}

.signal-links a:hover,
.signal-links a:focus-visible {
  background: rgba(8, 25, 36, 0.95);
  color: var(--cyan);
  outline: none;
}

.signal-links span {
  display: block;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.signal-links small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.55;
}

.audio-story {
  grid-template-columns: minmax(0, 0.68fr) minmax(420px, 1fr);
  align-items: start;
}

.tracklist {
  display: grid;
  border: 1px solid rgba(128, 202, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(5, 16, 24, 0.82), rgba(2, 7, 11, 0.92)),
    rgba(3, 9, 14, 0.78);
  box-shadow:
    inset 0 0 44px rgba(52, 200, 255, 0.05),
    0 22px 70px rgba(0, 0, 0, 0.24);
}

.tracklist article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(190px, 0.8fr);
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(128, 202, 255, 0.13);
}

.tracklist article:last-child {
  border-bottom: 0;
}

.tracklist span,
.tracklist strong,
.tracklist small {
  font-family: var(--mono);
  text-transform: uppercase;
}

.tracklist span {
  color: var(--cyan);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.tracklist strong {
  color: rgba(247, 250, 252, 0.9);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.tracklist small {
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.tracklist .locked {
  opacity: 0.58;
}

.tracklist .locked span,
.tracklist .locked strong {
  color: rgba(198, 211, 220, 0.66);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 4vw, 54px);
  border-top: 1px solid rgba(128, 202, 255, 0.16);
  color: var(--quiet);
  font-size: 0.66rem;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.54;
    transform: translate(-50%, -50%) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

@keyframes signal-flare {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.5);
  }
}

@media (max-width: 1320px) {
  .hero-grid {
    grid-template-columns: minmax(390px, 0.9fr) minmax(310px, 0.84fr) minmax(360px, 0.92fr);
    gap: clamp(18px, 2vw, 28px);
  }

  .chapter-rail {
    padding-right: 14px;
  }
}

@media (max-height: 900px) and (min-width: 821px) {
  .splash-section {
    padding-top: clamp(18px, 3.2svh, 34px);
    padding-bottom: clamp(18px, 3.6svh, 42px);
  }

  .splash-copy {
    max-height: calc(100dvh - 68px);
  }

  .splash-title {
    font-size: clamp(3.7rem, min(6.4vw, 10.4svh), 7.1rem);
    line-height: 0.84;
  }

  .splash-status {
    margin-bottom: 10px;
  }

  .splash-subtitle,
  .splash-audio-note {
    margin-top: 14px;
  }

  .splash-intro {
    margin-top: 18px;
  }

  .splash-actions {
    margin-top: 22px;
  }

  .splash-footer {
    display: none;
  }
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    order: 3;
    grid-column: 1 / -1;
  }

  .splash-section {
    align-items: end;
    min-height: 100svh;
  }

  .splash-copy {
    width: min(620px, 72vw);
    padding-bottom: clamp(28px, 9svh, 110px);
  }

  .audio-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  }

  .title-panel {
    grid-template-columns: 1fr;
  }

  .archive-side-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-core {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 480px;
  }

  .spine {
    height: 470px;
    min-height: 470px;
  }

  .chapter-rail {
    align-self: start;
  }

  h1 {
    font-size: clamp(4rem, 12vw, 7rem);
  }

  .archive-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-section,
  .start-signals {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter-library {
    grid-template-columns: 1fr;
  }

  .chapter-library-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .library-card,
  .library-card.open {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: fixed;
    padding: 14px 16px;
    gap: 12px;
  }

  .brand {
    font-size: 0.65rem;
  }

  .sound-toggle {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 0.58rem;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-section {
    padding: 42px 16px 28px;
    overflow: hidden;
  }

  .splash-section {
    align-items: flex-start;
    justify-content: center;
    min-height: 100svh;
    padding: 56px 16px 34px;
  }

  .splash-copy {
    width: min(100%, 390px);
    padding-bottom: 0;
  }

  .splash-title {
    font-size: clamp(3.35rem, 15vw, 5.25rem);
    letter-spacing: 0.07em;
  }

  .splash-subtitle {
    margin-top: 18px;
    letter-spacing: 0.2em;
  }

  .splash-intro {
    max-width: 330px;
    margin-top: 24px;
    font-size: 0.76rem;
    line-height: 1.65;
  }

  .splash-audio-note {
    max-width: 330px;
    margin-top: 18px;
    padding-left: 14px;
    letter-spacing: 0.13em;
  }

  .splash-footer {
    display: none;
  }

  .hero-grid,
  .archive-section,
  .signals {
    grid-template-columns: minmax(0, 1fr);
  }

  .title-panel {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(3.15rem, 15vw, 5.2rem);
    letter-spacing: 0.11em;
  }

  .title-before {
    letter-spacing: 0.09em;
  }

  .title-the {
    letter-spacing: 0.24em;
  }

  .title-the::before,
  .title-the::after {
    width: 1.35em;
  }

  h2 {
    font-size: clamp(2.3rem, 12vw, 4rem);
  }

  .subtitle {
    letter-spacing: 0.18em;
  }

  .hero-copy {
    max-width: 330px;
    font-size: 0.74rem;
  }

  .archive-stats {
    grid-template-columns: 1fr;
  }

  .signal-core {
    grid-row: 3;
    min-height: 420px;
  }

  .spine {
    width: 220px;
    height: 410px;
    min-height: 410px;
  }

  .heart {
    width: 58px;
    height: 58px;
  }

  .dna {
    width: 58px;
    height: 96px;
  }

  .root {
    width: 86px;
    height: 96px;
  }

  .waveform {
    width: 110px;
  }

  .sparrow {
    width: 98px;
  }

  .chapter-rail {
    grid-row: 2;
    border-left: 0;
    margin-top: 24px;
  }

  .rail-header,
  .chapter-card {
    padding-left: 0;
  }

  .chapter-card {
    grid-template-columns: 30px 46px 1fr;
    gap: 10px;
    padding-right: 8px;
    padding-block: 12px;
  }

  .chapter-name-row {
    display: block;
    gap: 8px;
  }

  .chapter-actions {
    margin-top: 7px;
    gap: 4px;
  }

  .chapter-action {
    width: 20px;
    height: 20px;
    font-size: 0.56rem;
  }

  .chapter-name {
    font-size: 0.96rem;
    letter-spacing: 0.18em;
    overflow-wrap: anywhere;
  }

  .chapter-question {
    display: none;
  }

  .chapter-status {
    font-size: 0.55rem;
  }

  .chapter-card::before {
    display: none;
  }

  .archive-side-panels {
    grid-template-columns: 1fr;
  }

  .archive-preview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .newcomer-panel {
    width: 100%;
    max-width: 100%;
  }

  .newcomer-panel p {
    max-width: none;
    overflow-wrap: break-word;
  }

  .start-hero {
    width: 100vw;
    max-width: 100vw;
    min-height: 72vh;
    padding: 92px 16px 44px;
  }

  .start-copy h1 {
    max-width: min(100%, 340px);
    font-size: clamp(2.85rem, 13vw, 4.1rem);
    letter-spacing: 0.05em;
    overflow-wrap: break-word;
  }

  .start-copy,
  .start-lede,
  .start-rule,
  .start-section .section-copy,
  .start-note {
    width: min(100%, 318px);
    max-width: calc(100vw - 72px);
    min-width: 0;
  }

  .start-page .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .start-page .primary-action,
  .start-page .secondary-action {
    width: min(100%, 260px);
  }

  .start-section {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }

  .start-lede,
  .start-section .section-copy p,
  .start-note,
  .signal-choice small {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .start-section h2 {
    font-size: clamp(2.35rem, 10vw, 3rem);
    letter-spacing: 0.06em;
  }

  .start-lede {
    font-size: 0.82rem;
  }

  .start-rule {
    padding-left: 14px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .signal-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter-library-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter-library {
    grid-template-columns: minmax(0, 1fr);
  }

  .chapter-library .section-copy,
  .chapter-library-grid {
    min-width: 0;
    width: 100%;
  }

  .library-card {
    grid-column: auto;
    min-width: 0;
    min-height: 260px;
  }

  .library-card.open {
    grid-column: auto;
    min-height: 320px;
  }

  .preview-card {
    grid-template-columns: 110px 1fr;
    min-height: 150px;
  }

  .preview-visual {
    min-height: 92px;
  }

  .signals-preview .preview-copy {
    grid-column: 1 / -1;
  }

  .archive-section {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
    gap: 24px;
  }

  .archive-section::before {
    inset-inline: 16px;
  }

  .identity-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .signal-links {
    grid-template-columns: 1fr;
  }

  .tracklist article {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  .tracklist small {
    grid-column: 2;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  .site-header {
    grid-template-columns: auto 1fr;
  }

  .sound-toggle {
    display: none;
  }

  .splash-section {
    padding-top: 48px;
  }

  .splash-title {
    max-width: 340px;
    font-size: clamp(3.2rem, 15vw, 4.05rem);
    letter-spacing: 0.06em;
  }

  .splash-status {
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }

  .splash-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .splash-enter {
    width: min(100%, 260px);
  }

  h1 {
    font-size: clamp(2.8rem, 17vw, 3.7rem);
    letter-spacing: 0.08em;
  }

  .title-before {
    letter-spacing: 0.07em;
  }

  .title-the {
    letter-spacing: 0.18em;
  }

  .subtitle {
    max-width: 20rem;
    letter-spacing: 0.12em;
  }

  .hero-copy {
    max-width: min(330px, calc(100vw - 48px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
