/* ==========================================================================
   MILLENNIUM SCIENCE SCHOOL — campus portal / containment failure
   ========================================================================== */

:root {
  --paper: #f2f7fc;
  --paper-2: #e8f1fa;
  --card: #ffffff;
  --ink: #081827;
  --muted: #60758a;
  --faint: #8fa2b4;
  --line: rgba(8, 24, 39, 0.12);
  --line-strong: rgba(8, 24, 39, 0.24);
  --blue: #1e5eff;
  --blue-deep: #123a9d;
  --cyan: #57d8eb;
  --signal: #ff6b2b;
  --danger: #d52b2b;
  --shadow: 0 28px 80px rgba(16, 45, 78, 0.14);
  --sans: "Blueaka", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --latin: "Blueaka", "Space Grotesk", "Noto Sans SC", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --container: min(1240px, calc(100vw - 96px));
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

body.stage-1 {
  --paper: #eef4fa;
  --paper-2: #e3edf7;
  --muted: #5b7085;
}

body.stage-2 {
  --paper: #e9f0f8;
  --paper-2: #dce8f4;
  --ink: #081522;
  --line: rgba(8, 21, 34, 0.16);
  --line-strong: rgba(8, 21, 34, 0.3);
  --blue: #1957e8;
  --signal: #e85a2a;
}

body.stage-3 {
  --paper: #dfe9f3;
  --paper-2: #d2dfed;
  --ink: #07131f;
  --muted: #566b80;
  --blue: #124fdb;
  --signal: #df4e24;
  --danger: #b51e24;
}

body.stage-4 {
  --paper: #070b11;
  --paper-2: #0b1119;
  --card: #0d1520;
  --ink: #dce8f4;
  --muted: #8da1b5;
  --faint: #5d7185;
  --line: rgba(220, 232, 244, 0.12);
  --line-strong: rgba(220, 232, 244, 0.24);
  --blue: #5b8dff;
  --cyan: #64d9ea;
  --signal: #ff6b2b;
  --danger: #ff4c3f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

body.stage-5 {
  --paper: #030507;
  --paper-2: #05080c;
  --card: #080d13;
  --ink: #cfdae5;
  --muted: #718398;
  --faint: #485a6d;
  --line: rgba(207, 218, 229, 0.1);
  --line-strong: rgba(207, 218, 229, 0.2);
  --blue: #7e9dff;
  --signal: #ff5b2e;
  --danger: #ff3d32;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color 1.3s var(--ease-soft), color 1.3s var(--ease-soft);
}

body.modal-open,
body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--blue);
  color: #fff;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.2;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.4px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding: 150px 0;
  position: relative;
}

/* Fixed atmosphere */

.grain {
  position: fixed;
  inset: -40%;
  z-index: 90;
  pointer-events: none;
  background-image: var(--noise);
  background-size: 260px 260px;
  opacity: 0.035;
  mix-blend-mode: multiply;
  animation: grainMove 0.9s steps(4) infinite;
  transition: opacity 1.2s;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 91;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(6, 16, 26, 0.06) 0, rgba(6, 16, 26, 0.06) 1px, transparent 1px, transparent 4px);
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 1.2s;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 48%, rgba(5, 15, 24, 0.12) 100%);
  opacity: 0.4;
}

body.stage-4 .grain {
  opacity: 0.08;
  mix-blend-mode: screen;
}

body.stage-4 .scanlines {
  opacity: 0.5;
  mix-blend-mode: screen;
}

body.stage-4 .vignette {
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 1;
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}

.flash.is-flashing {
  animation: flashOut 0.7s steps(1, end) both;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 130;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: background-color 1s;
}

body.stage-4 .scroll-progress span {
  background: var(--signal);
}

body.in-breach .site-header,
body.in-final .site-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

body.in-final .scroll-progress {
  opacity: 0;
}

/* Shared type */

.kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 11.2px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 1.2s;
}

.kicker span {
  color: var(--blue);
}

.kicker-light {
  color: rgba(220, 232, 244, 0.5);
}

.kicker-light span {
  color: var(--signal);
}

.section-title {
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 1.22;
  letter-spacing: -0.055em;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 80px;
  margin-bottom: 70px;
}

.section-lede {
  max-width: 380px;
  font-size: 14.6px;
  line-height: 2;
  color: var(--muted);
  padding-bottom: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 16px 26px;
  font-size: 14.6px;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, transform 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

body.stage-4 .btn-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: #090c10;
}

.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-small {
  padding: 11px 20px;
  font-size: 11.2px;
}

.btn-large {
  padding: 20px 32px;
  font-size: 15.7px;
}

.arrow {
  font-size: 15.7px;
  line-height: 1;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 12.3px;
  letter-spacing: 0.08em;
  transition: color 0.3s, border-color 0.3s;
}

.text-link span {
  transition: transform 0.3s;
}

.text-link:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.text-link:hover span {
  transform: translate(2px, 2px);
}

/* Swap mechanics */

.swap {
  display: grid;
}

.swap > span {
  grid-area: 1 / 1;
  transition: opacity 0.8s var(--ease), filter 0.8s, transform 0.8s;
}

.swap-wrong {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(4px);
  pointer-events: none;
}

.swap.is-mutated .swap-normal {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(-4px);
}

.swap.is-mutated .swap-wrong {
  opacity: 1;
  filter: none;
  transform: none;
}

[data-at] {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

[data-at].is-revealed {
  opacity: 1;
  visibility: visible;
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s, border-color 0.5s, opacity 0.5s, transform 0.5s;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}

body.stage-4 .site-header.is-scrolled {
  background: rgba(5, 9, 14, 0.86);
}

.header-inner {
  width: var(--container);
  height: 84px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  transition: height 0.4s;
}

.site-header.is-scrolled .header-inner {
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-logo {
  width: 42px;
  height: auto;
  transition: filter 0.5s, opacity 0.5s;
}

body.stage-4 .brand-logo {
  filter: invert(1) brightness(1.6);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-latin {
  font-family: var(--latin);
  font-weight: 600;
  font-size: 17.9px;
  line-height: 1;
  letter-spacing: 0.12em;
}

.brand-cn {
  font-size: 10.5px;
  letter-spacing: 0.19em;
  color: var(--muted);
}

.primary-nav {
  display: flex;
  gap: clamp(18px, 2.3vw, 34px);
  margin-left: auto;
  margin-right: auto;
}

.primary-nav a {
  position: relative;
  padding: 7px 0;
  font-size: 12.3px;
  letter-spacing: 0.07em;
  color: var(--muted);
  transition: color 0.3s;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--ink);
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-actions > .btn-small {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.header-actions > .btn-small:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.campus-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.campus-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1bcf92;
  box-shadow: 0 0 0 4px rgba(27, 207, 146, 0.12);
  animation: blinkDot 3s infinite;
}

body.stage-4 .campus-status {
  color: var(--signal);
}

body.stage-4 .campus-status i {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(255, 107, 43, 0.12);
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sound-toggle svg {
  width: 17px;
  height: 17px;
}

.sound-wave {
  opacity: 0.25;
  transition: opacity 0.3s;
}

body.sound-on .sound-wave {
  opacity: 1;
}

body.sound-on .sound-toggle svg {
  animation: soundBreathe 2.4s infinite;
}

.menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 8px 5px;
  border: 0;
  background: none;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s, opacity 0.3s;
}

body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease);
}

body.menu-open .mobile-nav {
  transform: translateY(0);
}

.mobile-nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.mobile-close {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.3px;
  letter-spacing: 0.1em;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  padding: 22px 0;
}

.mobile-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(26px, 8vw, 38px);
  font-weight: 500;
}

.mobile-links a span {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.mobile-nav-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-foot .btn {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.mobile-nav-foot p {
  font-size: 11.2px;
  color: var(--muted);
}

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  padding: 130px 0 70px;
  display: flex;
  align-items: center;
  overflow: clip;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 94, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 94, 255, 0.055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.hero-halo {
  position: absolute;
  width: 62vw;
  aspect-ratio: 1;
  right: -12vw;
  top: 6vh;
  border-radius: 50%;
  border: 1px solid rgba(30, 94, 255, 0.13);
  box-shadow:
    0 0 0 34px rgba(30, 94, 255, 0.025),
    0 0 0 90px rgba(30, 94, 255, 0.018),
    inset 0 0 90px rgba(87, 216, 235, 0.08);
  pointer-events: none;
}

.hero-halo::before,
.hero-halo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(30, 94, 255, 0.12);
}

.hero-halo::before {
  inset: 9%;
}

.hero-halo::after {
  inset: 22%;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.72fr);
  gap: clamp(46px, 7vw, 110px);
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(30, 94, 255, 0.1);
  animation: blinkDot 3s infinite;
}

.hero-title-wrap {
  position: relative;
}

.hero-outline {
  display: block;
  margin-bottom: 12px;
  font-family: var(--latin);
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(30, 94, 255, 0.22);
  white-space: nowrap;
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(58px, 7.8vw, 112px);
  line-height: 1.04;
  letter-spacing: -0.075em;
  font-weight: 500;
}

.hero h1 span {
  color: var(--blue);
}

.hero-tagline {
  margin-top: 22px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-lede {
  max-width: 510px;
  margin-top: 22px;
  font-size: 15.7px;
  line-height: 2;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.hero-meta span {
  position: relative;
}

.hero-meta span + span::before {
  content: "/";
  margin-right: 20px;
  color: var(--line-strong);
}

.hero-pass {
  position: relative;
  width: 100%;
  max-width: 450px;
  justify-self: end;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(232, 242, 252, 0.76)),
    var(--card);
  border: 1px solid rgba(30, 94, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(21, 54, 92, 0.16);
  overflow: hidden;
}

.hero-pass::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 94, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 94, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
  pointer-events: none;
}

.pass-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.pass-top img {
  width: 38px;
}

.pass-top > span:nth-child(2) {
  font-family: var(--latin);
  font-size: 11.2px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.pass-top small {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.pass-no {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.pass-mid {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 18px;
}

.pass-mark {
  font-family: var(--latin);
  font-size: 64px;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: var(--blue);
}

.pass-mid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pass-mid small,
.pass-mid strong {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.pass-mid small {
  font-size: 10.5px;
  color: var(--muted);
}

.pass-mid strong {
  font-size: 11.2px;
}

.pass-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.pass-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1bcf92;
}

.pass-status b {
  margin-left: auto;
  color: #139d70;
  font-weight: 500;
}

.pass-people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.pass-people figure {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  background: #dfeaf6;
}

.pass-people img {
  width: 100%;
  aspect-ratio: 0.88;
  object-fit: cover;
  object-position: 50% 18%;
  filter: saturate(0.85);
}

.pass-people figcaption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  color: #fff;
  font-size: 10.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.pass-people small {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.pass-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.hero-scroll i {
  position: relative;
  width: 1px;
  height: 36px;
  background: var(--line);
  overflow: hidden;
}

.hero-scroll i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--blue);
  animation: scrollDrop 2.2s infinite;
}

.reveal-up {
  opacity: 1;
  transform: none;
  animation: riseIn 0.9s var(--ease) both;
  animation-delay: var(--delay, 0s);
}

.reveal-up.is-settled {
  animation: none;
  opacity: 1;
  transform: none;
  filter: none;
}

/* Stats */

.stats-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 28px 22px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-number {
  font-family: var(--latin);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--blue);
}

.stat-label {
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat-infinity .stat-number {
  color: var(--faint);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: clamp(60px, 9vw, 140px);
  align-items: center;
}

.about-copy .section-title {
  margin-bottom: 34px;
}

.about-body {
  max-width: 560px;
  font-size: 15.7px;
  line-height: 2.05;
  color: var(--muted);
}

.about-body p + p {
  margin-top: 16px;
}

.about-body em {
  font-family: var(--latin);
  font-style: normal;
  color: var(--ink);
}

.about-punch {
  color: var(--ink) !important;
  font-size: 16.8px;
}

.about-punch strong {
  font-weight: 500;
  color: var(--blue);
}

.about-copy .text-link {
  margin-top: 32px;
}

.riddle-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(circle at 80% 0%, rgba(30, 94, 255, 0.1), transparent 45%),
    var(--card);
  box-shadow: var(--shadow);
}

.riddle-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.riddle-state {
  color: var(--signal);
}

.riddle-title {
  margin-top: 22px;
  font-size: 26px;
  font-weight: 500;
}

.riddle-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 130px;
  margin: 26px 0 14px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

.riddle-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, rgba(30, 94, 255, 0.18), rgba(30, 94, 255, 0.55));
}

.riddle-bars .bar-unknown {
  background: linear-gradient(to top, rgba(255, 107, 43, 0.22), rgba(255, 107, 43, 0.85));
  box-shadow: 0 0 22px rgba(255, 107, 43, 0.18);
}

.riddle-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.riddle-note {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 12.3px;
  line-height: 1.9;
  color: var(--muted);
}

/* Clubs */

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

.club-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.club-card {
  position: relative;
  min-height: 332px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s, background-color 1.2s;
}

.club-card:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.club-logo {
  width: 76px;
  height: 76px;
  margin: 24px 0 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(87, 216, 235, 0.3);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(87, 216, 235, 0.08), transparent 60%),
    #eef4fb;
  box-shadow: inset 0 0 22px rgba(87, 216, 235, 0.06);
}

.club-logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  opacity: 0.96;
}

.club-card[data-club="seminar"] .club-logo,
.club-card[data-club="engineering"] .club-logo {
  border-color: rgba(87, 216, 235, 0.3);
  background:
    linear-gradient(135deg, rgba(87, 216, 235, 0.13), transparent 60%),
    #081725;
}

body.stage-4 .club-logo {
  border-color: rgba(255, 91, 46, 0.3);
  background: linear-gradient(135deg, rgba(255, 91, 46, 0.1), transparent 60%), #eef4fb;
}

body.stage-4 .club-card[data-club="seminar"] .club-logo,
body.stage-4 .club-card[data-club="engineering"] .club-logo {
  background: linear-gradient(135deg, rgba(255, 91, 46, 0.1), transparent 60%), #081018;
}

.club-card:hover {
  transform: translateY(-5px);
  border-color: rgba(30, 94, 255, 0.36);
  box-shadow: var(--shadow);
}

.club-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(30, 94, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.club-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.club-state {
  color: var(--blue);
}

.club-icon {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 26px 0 22px;
  color: var(--blue);
}

.icon-seminar span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  background: currentColor;
  transform-origin: bottom;
}

.icon-seminar span:nth-child(1) { height: 38px; transform: translateX(-14px) rotate(-18deg); }
.icon-seminar span:nth-child(2) { height: 46px; transform: translateX(-1px); }
.icon-seminar span:nth-child(3) { height: 34px; transform: translateX(11px) rotate(18deg); }

.icon-cc span {
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.icon-cc span:first-child { inset: 7px 15px 7px 0; }
.icon-cc span:last-child { inset: 7px 0 7px 15px; }

.icon-eng span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.icon-eng span:nth-child(2) { width: 24px; height: 24px; }
.icon-eng span:nth-child(3) { width: 8px; height: 8px; background: currentColor; }

.icon-ver span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.icon-ver span:nth-child(1) { left: 6px; top: 24px; }
.icon-ver span:nth-child(2) { left: 22px; top: 10px; }
.icon-ver span:nth-child(3) { left: 38px; top: 30px; }
.icon-ver span:nth-child(4) { left: 23px; top: 40px; }
.icon-ver::before,
.icon-ver::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 26px;
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform: rotate(-32deg);
}
.icon-ver::after {
  transform: rotate(24deg);
}

.icon-game span {
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 8px;
}
.icon-game span:first-child { inset: 9px 2px 9px 18px; }
.icon-game span:last-child { inset: 9px 18px 9px 2px; opacity: 0.4; }

.icon-spd span {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.icon-spd span:nth-child(1) { width: 46px; height: 46px; opacity: 0.2; }
.icon-spd span:nth-child(2) { width: 28px; height: 28px; opacity: 0.5; }
.icon-spd span:nth-child(3) { width: 8px; height: 8px; background: currentColor; }

.club-card h3 {
  font-size: 23px;
  letter-spacing: -0.035em;
}

.club-card h3 small {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.09em;
  color: var(--faint);
}

.club-card p {
  margin-top: 14px;
  font-size: 13.4px;
  line-height: 1.9;
  color: var(--muted);
}

.club-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.club-note {
  margin-top: 24px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

/* Campus */

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

.campus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 42px;
  align-items: stretch;
}

.campus-map {
  position: relative;
  min-height: 580px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(30, 94, 255, 0.05), transparent 55%),
    var(--card);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 94, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 94, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 32%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 32%, transparent 82%);
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rail {
  fill: none;
  stroke: rgba(30, 94, 255, 0.23);
  stroke-width: 2;
  stroke-dasharray: 7 7;
}

.road {
  fill: none;
  stroke: rgba(8, 24, 39, 0.2);
  stroke-width: 1.2;
}

.road-inner {
  stroke-dasharray: 4 9;
}

.connector {
  stroke: rgba(255, 107, 43, 0.4);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.map-node circle:first-child {
  fill: var(--card);
  stroke: var(--blue);
  stroke-width: 1.5;
}

.map-node .pulse {
  fill: none;
  stroke: var(--blue);
  opacity: 0.2;
  animation: mapPulse 3s infinite;
}

.map-node text,
.map-hidden text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 12.3px;
  letter-spacing: 0.06em;
  text-anchor: middle;
}

.map-hidden {
  opacity: 0;
}

.map-hidden circle:first-child {
  fill: rgba(255, 107, 43, 0.16);
  stroke: var(--signal);
  stroke-width: 2;
}

.hidden-ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  opacity: 0.32;
  animation: mapPulse 2s infinite;
}

body.stage-3 .map-hidden {
  opacity: 1;
}

body.stage-3 .map-hidden text {
  fill: var(--signal);
}

.map-legend {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-blue { background: var(--blue); }
.dot-rail { border: 1px solid var(--blue); background: transparent; }
.dot-red { background: var(--signal); }
.legend-hidden { opacity: 0; }
body.stage-3 .legend-hidden { opacity: 1; }

.campus-side {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-strong);
}

.campus-block {
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.side-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.campus-block h3 {
  margin-top: 12px;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.campus-block p {
  margin-top: 10px;
  font-size: 12.3px;
  line-height: 1.9;
  color: var(--muted);
}

.campus-block-secret h3 {
  color: var(--signal);
}

/* Seminar */

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

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.person-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.person-card:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.person-open {
  display: inline-flex;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.person-open span {
  margin-left: 5px;
}

.person-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(30, 94, 255, 0.32);
}

.person-image {
  position: relative;
  overflow: hidden;
  background: #dbe8f5;
}

.person-image img {
  width: 100%;
  aspect-ratio: 0.9;
  object-fit: cover;
  object-position: 50% 18%;
  transition: transform 0.6s var(--ease), filter 0.6s;
}

.person-card:hover .person-image img {
  transform: scale(1.03);
}

body.stage-3 .person-image img {
  filter: saturate(0.6) contrast(1.1);
}

.person-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 28%;
  background: linear-gradient(to bottom, transparent, rgba(87, 216, 235, 0.25), transparent);
  opacity: 0;
}

body.stage-3 .person-scan {
  opacity: 1;
  animation: scanDown 4s linear infinite;
}

.person-copy {
  padding: 22px;
}

.person-role {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--blue);
}

.person-copy h3 {
  margin-top: 9px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.person-copy blockquote {
  min-height: 84px;
  margin-top: 17px;
  font-size: 14.6px;
  line-height: 1.95;
  color: var(--muted);
}

.person-status {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

body.stage-3 .person-status {
  color: var(--signal);
}

/* History */

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

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(50px, 9vw, 130px);
}

.history-copy {
  position: sticky;
  top: 120px;
  align-self: start;
}

.history-lede {
  max-width: 360px;
  margin-top: 30px;
  font-size: 14.6px;
  line-height: 2;
  color: var(--muted);
}

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

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 100px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-dot {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  width: 1px;
  height: 52px;
  background: var(--line);
}

.timeline-item:last-child .timeline-dot::after {
  display: none;
}

.timeline-year {
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.timeline-item h3 {
  font-size: 21.3px;
  letter-spacing: -0.02em;
}

.timeline-item p {
  margin-top: 5px;
  font-size: 12.3px;
  line-height: 1.9;
  color: var(--muted);
}

.timeline-wrong .timeline-dot {
  border-color: var(--signal);
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(255, 107, 43, 0.1);
}

.timeline-wrong .timeline-year {
  color: var(--signal);
}

.timeline-qed .timeline-dot {
  border-color: var(--danger);
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(213, 43, 43, 0.12);
}

.timeline-qed h3,
.timeline-qed .timeline-year {
  color: var(--danger);
}

/* Admissions */

.admissions {
  padding: 110px 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 82% 20%, rgba(30, 94, 255, 0.13), transparent 48%),
    var(--paper-2);
}

.admissions-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.admissions .kicker {
  justify-content: center;
}

.closing-title {
  font-size: clamp(46px, 7vw, 100px);
  line-height: 1.08;
  letter-spacing: -0.075em;
}

.admissions-row {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 38px;
}

.admissions-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
  text-align: left;
}

.admissions-date span,
.admissions-date small {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.admissions-date strong {
  font-family: var(--latin);
  font-size: 39px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.admissions-fine {
  max-width: 490px;
  margin-top: 36px;
  font-size: 10.5px;
  line-height: 1.9;
  color: var(--faint);
}

/* System strip */

.system-strip {
  background: #07101a;
  color: #dbe8f4;
  border-top: 1px solid rgba(219, 232, 244, 0.12);
  border-bottom: 1px solid rgba(219, 232, 244, 0.12);
}

.system-strip-inner {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.system-tag {
  color: #5b8dff;
}

.system-message {
  flex: 1;
  color: rgba(219, 232, 244, 0.62);
}

.system-clock {
  color: rgba(219, 232, 244, 0.36);
}

.system-blink {
  color: #ff6b2b;
  animation: blinkDot 1.2s steps(1) infinite;
}

body.stage-3 .system-tag,
body.stage-3 .system-blink {
  color: #ff4c3f;
}

body.stage-3 .system-message {
  color: #ffb09a;
}

/* Breach */

.breach {
  position: relative;
  height: 430vh;
  background: #04070b;
}

.breach-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255, 91, 46, 0.08), transparent 44%),
    radial-gradient(ellipse at 50% 100%, rgba(30, 94, 255, 0.08), transparent 50%),
    #04070b;
  color: #dbe8f4;
}

.breach-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(91, 141, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(91, 141, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 78%);
}

.breach-sigil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78vh, 70vw);
  transform: translate(-50%, -50%);
  opacity: 0.14;
  filter: invert(1) sepia(1) saturate(4) hue-rotate(330deg);
  pointer-events: none;
  transition: opacity 1.5s, transform 2s;
}

.breach[data-phase="2"] .breach-sigil {
  opacity: 0.24;
}

.breach[data-phase="3"] .breach-sigil,
.breach[data-phase="4"] .breach-sigil {
  opacity: 0.48;
  transform: translate(-50%, -50%) rotate(8deg) scale(1.08);
}

.breach-sigil img {
  width: 100%;
  animation: slowSpin 80s linear infinite;
}

.breach-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(22px, 4vw, 58px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(219, 232, 244, 0.32);
}

.breach-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8vw;
}

.breach-lines {
  position: relative;
  width: 100%;
  max-width: 1000px;
  display: grid;
  place-items: center;
  text-align: center;
}

.breach-line {
  grid-area: 1 / 1;
  font-size: clamp(28px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.04em;
  color: #e4edf5;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(8px);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease), filter 0.8s;
  text-wrap: balance;
}

.breach-line small {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: clamp(9px, 0.9vw, 11px);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(219, 232, 244, 0.38);
}

.breach-line em {
  font-family: var(--mono);
  font-style: normal;
  color: var(--signal);
}

.breach-line-qed {
  font-family: var(--latin);
  font-size: clamp(90px, 17vw, 260px);
  letter-spacing: -0.07em;
  color: var(--signal);
  text-shadow: 0 0 40px rgba(255, 91, 46, 0.2);
}

.breach[data-phase="0"] [data-bphase="0"],
.breach[data-phase="1"] [data-bphase="1"],
.breach[data-phase="2"] [data-bphase="2"],
.breach[data-phase="3"] [data-bphase="3"],
.breach[data-phase="4"] [data-bphase="4"] {
  opacity: 1;
  transform: none;
  filter: none;
}

.breach-terminal {
  position: absolute;
  left: clamp(22px, 5vw, 70px);
  bottom: 78px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(219, 232, 244, 0.32);
  text-align: left;
}

.breach-terminal b {
  color: var(--signal);
  font-weight: 500;
}

.breach[data-phase="0"] .breach-terminal,
.breach[data-phase="1"] .breach-terminal {
  opacity: 0.24;
}

.breach-foot {
  position: absolute;
  left: clamp(22px, 4vw, 58px);
  right: clamp(22px, 4vw, 58px);
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(219, 232, 244, 0.28);
}

.breach-meter {
  flex: 1;
  height: 1px;
  background: rgba(219, 232, 244, 0.12);
  overflow: hidden;
}

.breach-meter i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
}

/* Prophets */

.prophets {
  position: relative;
  padding: 150px 0 90px;
  background: #05080c;
  color: #dbe8f4;
  overflow: hidden;
}

.prophets::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 10%, rgba(30, 94, 255, 0.09), transparent 45%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 91, 46, 0.055), transparent 45%);
  pointer-events: none;
}

.prophets-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 72px;
}

.prophets-head .section-title {
  color: #e4edf5;
}

.prophets-meta {
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(219, 232, 244, 0.38);
}

.prophets-meta strong {
  color: var(--signal);
  font-weight: 500;
}

.prophets-meta p {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12.3px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  color: rgba(219, 232, 244, 0.48);
}

.deca-profile {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  gap: 50px;
  margin-bottom: 70px;
  padding: 34px;
  border: 1px solid rgba(255, 91, 46, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 88% 10%, rgba(255, 91, 46, 0.08), transparent 44%),
    rgba(8, 13, 19, 0.72);
}

.deca-profile-main h3 {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.05em;
  color: #e7eff6;
}

.deca-profile-main p {
  max-width: 650px;
  margin-top: 15px;
  font-size: 13.4px;
  line-height: 2;
  color: rgba(219, 232, 244, 0.52);
}

.deca-profile-main em {
  font-style: normal;
  color: var(--signal);
}

.deca-profile-main blockquote {
  margin-top: 22px;
  padding-left: 16px;
  border-left: 1px solid var(--signal);
  font-family: var(--mono);
  font-size: 12.3px;
  letter-spacing: 0.04em;
  color: rgba(255, 148, 119, 0.82);
}

.deca-facts {
  align-self: center;
  border-top: 1px solid rgba(219, 232, 244, 0.12);
}

.deca-facts div {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(219, 232, 244, 0.1);
}

.deca-facts dt,
.deca-facts dd {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.deca-facts dt {
  color: rgba(219, 232, 244, 0.26);
}

.deca-facts dd {
  color: rgba(219, 232, 244, 0.54);
}

.prophets-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 58px;
  align-items: start;
}

.tree-panel {
  align-self: stretch;
}

.tree-sticky {
  position: sticky;
  top: 100px;
}

.tree-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(219, 232, 244, 0.35);
}

.tree-svg {
  width: 100%;
  margin-top: 18px;
}

.tree-lines line {
  stroke: rgba(219, 232, 244, 0.13);
  stroke-width: 1;
  transition: stroke 0.6s;
}

.tree-node circle {
  fill: #05080c;
  stroke: rgba(219, 232, 244, 0.25);
  stroke-width: 1;
  transition: fill 0.5s, stroke 0.5s, filter 0.5s;
}

.tree-node text {
  fill: rgba(219, 232, 244, 0.5);
  font-family: var(--mono);
  font-size: 10.5px;
  text-anchor: middle;
  transition: fill 0.5s;
}

.tree-node .node-name {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-anchor: start;
  fill: rgba(219, 232, 244, 0.25);
}

.tree-node .node-left {
  text-anchor: end;
}

.tree-node.is-on circle {
  fill: rgba(255, 91, 46, 0.18);
  stroke: var(--signal);
  filter: drop-shadow(0 0 9px rgba(255, 91, 46, 0.45));
}

.tree-node.is-on text {
  fill: #ffb39b;
}

.tree-node.is-on .node-name {
  fill: var(--signal);
}

.tree-node.is-on + .tree-node circle {
  transition-delay: 0.08s;
}

.tree-status {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(219, 232, 244, 0.1);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(219, 232, 244, 0.4);
}

.tree-status span:first-child {
  color: var(--signal);
}

.tree-note {
  margin-top: 18px;
  font-size: 11.2px;
  line-height: 1.8;
  color: rgba(219, 232, 244, 0.3);
}

.prophet-list {
  border-top: 1px solid rgba(219, 232, 244, 0.12);
}

.prophet-card {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 26px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(219, 232, 244, 0.12);
  opacity: 0.35;
  transition: opacity 0.8s, background-color 0.5s;
}

.prophet-card.is-read {
  opacity: 1;
}

.prophet-img {
  position: relative;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(219, 232, 244, 0.14);
  border-radius: 4px;
  background: #0b151f;
}

.prophet-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 12, 0.75));
  pointer-events: none;
}

.prophet-img img {
  width: 100%;
  aspect-ratio: 0.886;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08);
  transition: filter 0.6s, transform 0.6s;
}

.prophet-card.is-read .prophet-img img {
  filter: saturate(1) contrast(1.05);
}

.prophet-card:hover .prophet-img img {
  transform: scale(1.04);
}

.img-index {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.7);
}

.prophet-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(219, 232, 244, 0.35);
}

.prophet-top span:last-child {
  color: rgba(255, 91, 46, 0.55);
}

.prophet-body h3 {
  margin-top: 12px;
  font-size: clamp(29px, 3vw, 40px);
  letter-spacing: -0.05em;
  color: #e7eff6;
}

.prophet-body h3 small {
  margin-left: 7px;
  font-family: var(--latin);
  font-size: 0.38em;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(219, 232, 244, 0.35);
}

.epithet {
  margin-top: 7px;
  font-size: 13.4px;
  letter-spacing: 0.03em;
  color: var(--signal);
}

.prophet-desc {
  max-width: 570px;
  margin-top: 13px;
  font-size: 13.4px;
  line-height: 1.95;
  color: rgba(219, 232, 244, 0.56);
}

.prophet-body dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid rgba(219, 232, 244, 0.09);
}

.prophet-body dl div {
  display: flex;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.prophet-body dt {
  color: rgba(219, 232, 244, 0.26);
}

.prophet-body dd {
  color: rgba(219, 232, 244, 0.52);
}

.prophet-malkuth {
  background: linear-gradient(90deg, rgba(255, 91, 46, 0.08), transparent 70%);
  border-color: rgba(255, 91, 46, 0.24);
}

.prophet-malkuth .prophet-body h3,
.prophet-malkuth .epithet {
  color: #ff9477;
}

.unlisted {
  margin-top: 38px;
  padding: 22px;
  border: 1px solid rgba(255, 91, 46, 0.18);
  border-radius: 10px;
  background: rgba(255, 91, 46, 0.035);
}

.unlisted-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(219, 232, 244, 0.4);
}

.unlisted-head span:last-child {
  color: var(--signal);
}

.unlisted-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 18px;
}

.unlisted-grid img {
  width: 100%;
  aspect-ratio: 1.7;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 4px;
  filter: saturate(0.4) contrast(1.1);
}

.unlisted-portraits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.unlisted-portraits img {
  aspect-ratio: 0.886;
  object-position: 50% 15%;
}

.unlisted-grid h3 {
  margin-top: 11px;
  font-size: 20.2px;
}

.unlisted-grid p {
  margin-top: 7px;
  font-size: 11.2px;
  line-height: 1.85;
  color: rgba(219, 232, 244, 0.45);
}

/* Final */

.final {
  position: relative;
  height: 380vh;
  background: #020305;
}

.final-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: #020305;
  color: #dbe8f4;
}

.final-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(91, 141, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(91, 141, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black, transparent 76%);
}

.final-sigil {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(100vh, 80vw);
  transform: translate(-50%, -50%);
  opacity: 0.08;
  filter: invert(1) sepia(1) saturate(5) hue-rotate(330deg);
}

.final-sigil img {
  animation: slowSpin 90s linear infinite;
}

.final-portrait {
  position: absolute;
  right: -8%;
  bottom: -20%;
  z-index: 1;
  width: min(56vw, 780px);
  opacity: 0.2;
  filter: grayscale(0.4) contrast(1.1) brightness(0.58);
  mask-image: radial-gradient(ellipse at 50% 45%, black 28%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, black 28%, transparent 72%);
  transform: scale(1.04);
  transition: opacity 2s, transform 3s, filter 1s;
}

.final[data-phase="3"] .final-portrait,
.final[data-phase="4"] .final-portrait,
.final[data-phase="5"] .final-portrait {
  opacity: 0.5;
  filter: grayscale(0.15) contrast(1.18) brightness(0.74);
  transform: scale(1);
}

.final-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(22px, 4vw, 58px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(219, 232, 244, 0.3);
}

.final-lines {
  position: absolute;
  inset: 0 6% 0;
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
}

.final-line {
  grid-area: 1 / 1;
  max-width: 980px;
  font-size: clamp(36px, 4.7vw, 72px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.04em;
  color: #e8f0f7;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(8px);
  transition: opacity 0.9s var(--ease), transform 1s var(--ease), filter 0.9s;
  text-wrap: balance;
}

.final-em {
  display: block;
  color: var(--signal);
}

.final-line .void-sub {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: clamp(9px, 0.9vw, 11px);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: rgba(219, 232, 244, 0.4);
}

.final-qed {
  font-family: var(--latin);
  font-size: clamp(100px, 20vw, 300px);
  letter-spacing: -0.08em;
  color: var(--signal);
  text-shadow: 0 0 50px rgba(255, 91, 46, 0.26);
}

.final[data-phase="0"] [data-fphase="0"],
.final[data-phase="1"] [data-fphase="1"],
.final[data-phase="2"] [data-fphase="2"],
.final[data-phase="3"] [data-fphase="3"],
.final[data-phase="4"] [data-fphase="4"],
.final[data-phase="5"] [data-fphase="5"],
.final[data-phase="6"] [data-fphase="6"],
.final[data-phase="7"] [data-fphase="7"],
.final[data-phase="8"] [data-fphase="8"],
.final[data-phase="9"] [data-fphase="9"],
.final[data-phase="10"] [data-fphase="10"] {
  opacity: 1;
  transform: none;
  filter: none;
}

.final-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  transform: translate(-50%, -50%) scale(0.94);
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(22px, 3.2vw, 44px);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.final-copy span {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.42em;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--signal);
}

body.scare .final-copy {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

body.scare .final-lines {
  opacity: 0;
  transition: opacity 0.2s;
}

body.scare-done .final-copy {
  opacity: 0.34;
  transform: translate(-50%, -50%) scale(1);
}

body.scare .final-sticky {
  animation: screenShake 0.4s steps(2, end) both;
}

body.scare .final[data-phase] .final-portrait {
  opacity: 1;
  filter: grayscale(0) contrast(1.5) brightness(1.2);
  transform: scale(1.3);
  transition: transform 0.16s, filter 0.16s;
}

body.scare .final-sigil {
  opacity: 0.4;
  transform: translate(-50%, -50%) scale(1.2);
}

body.scare-done .final[data-phase] .final-portrait {
  opacity: 0.2;
  filter: grayscale(0.5) contrast(1.2) brightness(0.5);
  transform: scale(1.04);
}

body.scare-done .final-lines {
  opacity: 0;
}

.final-foot {
  position: absolute;
  left: clamp(22px, 4vw, 58px);
  right: clamp(22px, 4vw, 58px);
  bottom: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(219, 232, 244, 0.28);
}

.final-meter {
  flex: 1;
  height: 1px;
  background: rgba(219, 232, 244, 0.12);
  overflow: hidden;
}

.final-meter i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
}

/* Afterword */

.afterword {
  padding: 90px 0 70px;
  background: #020305;
  color: #6f8296;
  text-align: center;
  border-top: 1px solid rgba(219, 232, 244, 0.08);
}

.afterword-inner {
  width: min(650px, calc(100% - 48px));
  margin-inline: auto;
}

.afterword-logo {
  margin: 0 auto 20px;
  filter: invert(1) brightness(1.3);
  opacity: 0.55;
}

.afterword-title {
  font-family: var(--latin);
  font-size: 20.2px;
  letter-spacing: 0.14em;
  color: #c3d2df;
}

.afterword-line {
  margin-top: 10px;
  font-size: 12.3px;
  color: #8da1b5;
}

.afterword-note {
  margin-top: 18px;
  font-size: 10.5px;
  line-height: 1.9;
  color: #5d7185;
}

.afterword-note a {
  color: #97b0c7;
  border-bottom: 1px solid rgba(151, 176, 199, 0.3);
}

.afterword-back {
  display: inline-flex;
  margin-top: 32px;
  padding: 12px 20px;
  border: 1px solid rgba(219, 232, 244, 0.16);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #98adc3;
  transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}

.afterword-back:hover {
  border-color: var(--signal);
  color: #e0ecf7;
  background: rgba(255, 91, 46, 0.06);
}

.afterword-fine {
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #4e6070;
}

/* Dialog */

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(3, 7, 12, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.visit-dialog {
  width: min(520px, calc(100vw - 34px));
  max-width: none;
}

.visit-shell {
  position: relative;
  padding: 40px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 82% 0%, rgba(30, 94, 255, 0.08), transparent 42%),
    var(--card);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.4);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.dialog-close span {
  font-size: 14.6px;
  line-height: 1;
}

.visit-view h2 {
  font-size: clamp(34px, 5vw, 50px);
  letter-spacing: -0.055em;
}

.visit-view .kicker {
  margin-bottom: 20px;
}

.visit-lede {
  margin-top: 15px;
  font-size: 13.4px;
  line-height: 1.9;
  color: var(--muted);
}

#visitForm {
  margin-top: 28px;
}

.field {
  display: block;
  margin-bottom: 19px;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.field input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 17.9px;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
}

.field input::placeholder {
  color: var(--faint);
  opacity: 0.6;
}

.check-field {
  display: flex;
  gap: 9px;
  margin: 24px 0;
  font-size: 11.2px;
  line-height: 1.7;
  color: var(--muted);
}

.check-field input {
  accent-color: var(--blue);
  margin-top: 3px;
}

.visit-view .btn {
  width: 100%;
  justify-content: space-between;
}

.form-fine {
  margin-top: 16px;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--faint);
}

.visit-ticket {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 26px 0;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.visit-ticket span,
.visit-ticket small {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.visit-ticket strong {
  font-family: var(--latin);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--blue);
}

.visit-after {
  margin-bottom: 22px;
  font-size: 12.3px;
  line-height: 1.9;
  color: var(--muted);
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 500;
  max-width: min(460px, calc(100vw - 40px));
  padding: 13px 19px;
  border: 1px solid rgba(219, 232, 244, 0.18);
  border-radius: 999px;
  background: rgba(5, 10, 16, 0.94);
  color: #dbe8f4;
  font-size: 11.2px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Keyframes */

@keyframes riseIn {
  from { transform: translateY(22px); }
  to { transform: none; }
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes soundBreathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes scrollDrop {
  0% { top: -45%; opacity: 0; }
  25% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

@keyframes grainMove {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
  100% { transform: translate(0, 0); }
}

@keyframes mapPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.12; }
  50% { transform: scale(1.3); opacity: 0.38; }
}

@keyframes scanDown {
  from { top: -25%; }
  to { top: 110%; }
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

@keyframes flashOut {
  0% { opacity: 0.96; }
  7% { opacity: 0; }
  12% { opacity: 0.82; }
  20% { opacity: 0; }
  38% { opacity: 0.28; background: #ff5b2e; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes screenShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 5px); }
  40% { transform: translate(7px, -6px); }
  60% { transform: translate(-5px, -3px); }
  80% { transform: translate(4px, 4px); }
  100% { transform: translate(0, 0); }
}

/* Responsive */

@media (max-width: 1120px) {
  :root { --container: min(1240px, calc(100vw - 64px)); }

  .primary-nav { gap: 17px; }
  .hero-layout { gap: 48px; }
  .hero-outline { font-size: clamp(48px, 7.4vw, 92px); }
  .club-card { min-height: 350px; }
  .prophets-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 38px; }
}

@media (max-width: 960px) {
  :root { --container: min(1240px, calc(100vw - 48px)); }

  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
  .campus-status { display: none; }
  .section { padding: 110px 0; }

  .hero { padding-top: 120px; min-height: auto; }
  .hero-layout { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 680px; }
  .hero-pass { justify-self: start; max-width: 540px; }
  .hero-scroll { display: none; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }

  .section-head { flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: 50px; }
  .section-lede { max-width: 500px; }
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .riddle-card { max-width: 520px; }
  .club-grid { grid-template-columns: 1fr 1fr; }
  .campus-layout { grid-template-columns: 1fr; }
  .campus-map { min-height: 500px; }
  .campus-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 0; }
  .campus-block { border-top: 1px solid var(--line); border-bottom: 0; }
  .people-grid { grid-template-columns: 1fr; }
  .person-card { display: grid; grid-template-columns: 220px 1fr; }
  .person-image img { height: 100%; aspect-ratio: auto; }
  .history-grid { grid-template-columns: 1fr; gap: 40px; }
  .history-copy { position: static; }
  .admissions-row { flex-direction: column; gap: 24px; }
  .admissions-date { align-items: center; border-left: 0; padding-left: 0; text-align: center; }

  .prophets-head { flex-direction: column; align-items: flex-start; gap: 28px; }
  .deca-profile { grid-template-columns: 1fr; gap: 26px; }
  .prophets-layout { grid-template-columns: 1fr; gap: 30px; }
  .tree-panel { display: none; }
  .prophet-card { grid-template-columns: 130px minmax(0, 1fr); gap: 18px; }

  .breach-top { font-size: 10.5px; }
  .breach-terminal { display: none; }
}

@media (max-width: 720px) {
  :root { --container: calc(100vw - 40px); }

  .header-inner { height: 72px; gap: 14px; }
  .site-header.is-scrolled .header-inner { height: 62px; }
  .brand-logo { width: 34px; }
  .brand-latin { font-size: 15.7px; }
  .brand-cn { font-size: 10.5px; }
  .sound-toggle { font-size: 0; gap: 0; }
  .sound-toggle svg { width: 19px; height: 19px; }
  .header-actions { gap: 10px; }
  .btn-small { padding: 10px 16px; font-size: 10.5px; }

  .hero { padding-top: 105px; padding-bottom: 50px; }
  .hero h1 { font-size: clamp(50px, 14.5vw, 82px); }
  .hero-outline { font-size: clamp(42px, 12vw, 72px); }
  .hero-lede { font-size: 14.6px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-meta { gap: 7px 12px; font-size: 10.5px; }
  .hero-meta span + span::before { margin-right: 12px; }
  .hero-pass { padding: 18px; border-radius: 16px; }
  .pass-mark { font-size: 50px; }
  .pass-people figcaption { font-size: 10.5px; }
  .pass-people small { display: none; }

  .section { padding: 84px 0; }
  .section-title { font-size: clamp(36px, 10.5vw, 52px); }
  .about-body { font-size: 14.6px; }
  .riddle-card { padding: 22px; }
  .club-grid { grid-template-columns: 1fr; }
  .club-card { min-height: 300px; }
  .campus-map { min-height: 390px; }
  .map-node text, .map-hidden text { font-size: 10.5px; }
  .campus-side { grid-template-columns: 1fr; gap: 0; }
  .campus-block { padding: 20px 0; }
  .person-card { grid-template-columns: 1fr; }
  .person-image img { aspect-ratio: 1.2; object-position: 50% 20%; }
  .person-copy blockquote { min-height: 0; }
  .timeline-item { grid-template-columns: 20px 80px 1fr; gap: 12px; }
  .closing-title { font-size: clamp(43px, 12vw, 68px); }
  .admissions { padding: 82px 0; }
  .admissions-fine { font-size: 10.5px; }

  .system-strip-inner { flex-wrap: wrap; gap: 7px 14px; padding: 11px 0; font-size: 10.5px; }
  .system-message { flex-basis: 100%; order: 3; }
  .system-clock { margin-left: auto; }

  .breach { height: 380vh; }
  .breach-line { font-size: clamp(24px, 7vw, 36px); }
  .breach-line-qed { font-size: clamp(70px, 22vw, 120px); }
  .breach-line small { font-size: 10.5px; }
  .breach-top { padding: 18px 20px; font-size: 10.5px; }
  .breach-top span:nth-child(2) { display: none; }
  .breach-sigil { width: 92vw; }
  .breach-content { padding: 0 6vw; }
  .breach-foot { left: 20px; right: 20px; bottom: 16px; font-size: 10.5px; }

  .prophets { padding: 90px 0 60px; }
  .deca-profile { padding: 24px 18px; margin-bottom: 46px; }
  .prophet-card { grid-template-columns: 94px minmax(0, 1fr); gap: 14px; padding: 19px 0; }
  .prophet-body h3 { font-size: 27px; }
  .prophet-body h3 small { display: block; margin: 2px 0 0; }
  .epithet { font-size: 11.2px; }
  .prophet-desc { font-size: 12.3px; }
  .prophet-body dl { gap: 5px 16px; }
  .prophet-body dl div { font-size: 10.5px; }
  .prophet-top { font-size: 10.5px; }
  .unlisted-grid { grid-template-columns: 1fr; gap: 18px; }

  .final { height: 340vh; }
  .final-line { font-size: clamp(24px, 7vw, 38px); }
  .final-qed { font-size: clamp(80px, 23vw, 130px); }
  .final-portrait { right: -32%; width: 110vw; }
  .final-top { padding: 18px 20px; font-size: 10.5px; }
  .final-top span:nth-child(2) { display: none; }
  .final-foot { left: 20px; right: 20px; bottom: 16px; font-size: 10.5px; }
  .final-copy { font-size: 21.3px; }
  .afterword { padding: 70px 0 56px; }
}

@media (max-width: 460px) {
  .btn { padding: 14px 20px; }
  .hero h1 { font-size: 48px; }
  .hero-outline { font-size: 44px; }
  .stat { gap: 8px; padding: 20px 12px; }
  .stat-number { font-size: 34px; }
  .stat-label { font-size: 10.5px; }
  .pass-people { gap: 5px; }
  .person-image img { aspect-ratio: 1.3; }
  .prophet-card { grid-template-columns: 78px minmax(0, 1fr); }
  .prophet-body h3 { font-size: 24px; }
  .prophet-body dl div { display: block; }
  .prophet-body dt { display: inline; }
  .prophet-body dd { display: inline; }
  .visit-shell { padding: 32px 22px 24px; }
}

/* --------------------------------------------------------------------------
   Club and student dialogs
   -------------------------------------------------------------------------- */

.club-dialog {
  width: min(900px, calc(100vw - 34px));
  max-width: none;
  max-height: calc(100vh - 34px);
}

.club-modal {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 88% 0%, rgba(30, 94, 255, 0.08), transparent 42%),
    var(--card);
  color: var(--ink);
  overflow: auto;
  max-height: calc(100vh - 34px);
}

.club-modal-head {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.club-modal-logo {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(87, 216, 235, 0.32);
  border-radius: 18px;
  background: #eef4fb;
}

.club-modal-logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.club-dialog[data-club="seminar"] .club-modal-logo,
.club-dialog[data-club="engineering"] .club-modal-logo {
  background: #071725;
}

.club-modal-head .kicker {
  margin-bottom: 10px;
}

.club-modal-head h2 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.05em;
}

.club-modal-en {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.club-modal-desc {
  max-width: 570px;
  margin-top: 16px;
  font-size: 14.6px;
  line-height: 1.9;
  color: var(--muted);
}

.club-members-label {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 10.6px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.club-members-label span {
  margin-right: 8px;
  color: var(--blue);
}

.club-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.club-member {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}

.club-member:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: rgba(30, 94, 255, 0.05);
}

.club-member img {
  width: 52px;
  height: 58px;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 6px;
  background: #dce8f4;
}

.club-member strong {
  display: block;
  font-size: 14.6px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.club-member small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.club-modal-note {
  margin-top: 22px;
  font-size: 11.2px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.student-dialog {
  width: min(780px, calc(100vw - 34px));
  max-width: none;
  max-height: calc(100vh - 34px);
}

.student-dialog .dialog-close {
  z-index: 4;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 16px rgba(4, 12, 20, 0.2);
}

.student-modal {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  max-height: calc(100vh - 34px);
  overflow: auto;
}

.student-visual {
  position: relative;
  min-height: 440px;
  background: #dce8f4;
  overflow: hidden;
}

.student-visual img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  object-position: 50% 17%;
}

.student-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 26%;
  background: linear-gradient(to bottom, transparent, rgba(87, 216, 235, 0.3), transparent);
  animation: scanDown 5s linear infinite;
}

.student-info {
  padding: 34px 30px;
}

.student-role {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--blue);
}

.student-info h2 {
  margin-top: 10px;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.student-name-jp {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.6px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.student-intro {
  margin-top: 22px;
  font-size: 13.4px;
  line-height: 2;
  color: var(--muted);
  white-space: pre-line;
}

.student-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.student-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.student-facts dt {
  font-family: var(--mono);
  font-size: 10.6px;
  color: var(--faint);
}

.student-facts dd {
  font-size: 12.3px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Final / true body
   -------------------------------------------------------------------------- */

.final-sigil {
  opacity: 0.07;
}

.final[data-phase="3"] .final-sigil,
.final[data-phase="4"] .final-sigil,
.final[data-phase="5"] .final-sigil,
.final[data-phase="6"] .final-sigil {
  opacity: 0.12;
}

.final[data-phase="7"] .final-sigil,
.final[data-phase="8"] .final-sigil,
.final[data-phase="9"] .final-sigil,
.final[data-phase="10"] .final-sigil,
.final[data-phase="11"] .final-sigil {
  opacity: 0.24;
}

.final-entity {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.8s var(--ease-soft), transform 2.4s var(--ease-soft), filter 1.2s;
}

.final-entity img {
  width: min(82vh, 70vw);
  max-width: 96vw;
  filter: contrast(1.22) brightness(0.94) saturate(0.74);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 45%, transparent 84%);
  mask-image: radial-gradient(circle at 50% 46%, #000 45%, transparent 84%);
  transform: translate(-5%, -2%) scale(1.02);
}

.final[data-phase="3"] .final-entity,
.final[data-phase="4"] .final-entity,
.final[data-phase="5"] .final-entity {
  opacity: 0.03;
}

.final[data-phase="6"] .final-entity,
.final[data-phase="7"] .final-entity,
.final[data-phase="8"] .final-entity {
  opacity: 0.06;
}

.final[data-phase="9"] .final-entity,
.final[data-phase="10"] .final-entity {
  opacity: 0.12;
}

.final[data-phase="11"] .final-entity {
  opacity: 0.38;
  transform: scale(1.03);
}

.final[data-phase="11"] .final-lines {
  opacity: 0;
}

.final-quote {
  font-family: var(--sans);
  font-size: clamp(27px, 3.1vw, 45px);
  line-height: 1.75;
  letter-spacing: -0.03em;
}

.final-quote-sub {
  display: block;
  margin-top: 12px;
  font-size: 0.86em;
  color: rgba(219, 232, 244, 0.68);
}

.final-sign {
  display: block;
  margin-top: 0;
  font-family: var(--latin);
  font-size: 0.82em;
  letter-spacing: 0.08em;
  color: var(--signal);
}

.final-title {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 4vw 9vh;
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  transition: opacity 1.2s var(--ease), transform 1.4s var(--ease);
}

.final[data-phase="11"] .final-title {
  opacity: 1;
  transform: none;
}

.final-title-kicker {
  font-family: var(--mono);
  font-size: 11.2px;
  letter-spacing: 0.22em;
  color: var(--signal);
}

.final-title h1 {
  font-family: var(--latin);
  font-size: clamp(34px, 9vw, 132px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--signal);
  text-shadow:
    0 0 22px rgba(255, 91, 46, 0.34),
    0 0 100px rgba(255, 91, 46, 0.2);
}

.final-title p {
  font-size: 13.4px;
  letter-spacing: 0.1em;
  color: rgba(219, 232, 244, 0.58);
}

.final-title p span {
  margin: 0 8px;
  color: var(--signal);
}

body.scare .final[data-phase] .final-entity {
  opacity: 1;
  transform: scale(1.18);
  filter: contrast(1.5) brightness(1.22) saturate(0.8);
  transition: transform 0.16s, filter 0.16s, opacity 0.16s;
}

body.scare .final[data-phase] .final-title h1 {
  transform: scale(1.04);
  text-shadow: 0 0 34px rgba(255, 91, 46, 0.45), 0 0 120px rgba(255, 91, 46, 0.2);
}

body.scare-done .final[data-phase] .final-entity {
  opacity: 0.28;
  transform: scale(1.02);
  filter: contrast(1.2) brightness(0.55) saturate(0.5);
}

/* --------------------------------------------------------------------------
   Legibility pass — Blueaka needs a little more room than Noto Sans
   -------------------------------------------------------------------------- */

body {
  font-size: 17.9px;
  line-height: 1.78;
}

.primary-nav a {
  font-size: 14.6px;
}

.brand-cn {
  font-size: 11.2px;
}

.campus-status {
  font-size: 10.6px;
}

.sound-toggle {
  font-size: 11.2px;
}

.btn-small {
  font-size: 12.3px;
}

.eyebrow {
  font-size: 12.3px;
}

.hero-meta {
  font-size: 12.3px;
  color: rgba(16, 35, 52, 0.48);
}

.kicker {
  font-size: 12.9px;
}

.section-lede {
  font-size: 15.7px;
}

.about-body {
  font-size: 17.4px;
}

.riddle-head,
.riddle-foot {
  font-size: 10.6px;
}

.riddle-note {
  font-size: 13.4px;
}

.stat-label {
  font-size: 12.3px;
}

.club-top {
  font-size: 11.2px;
}

.club-card p {
  font-size: 15.1px;
}

.club-foot {
  font-size: 11.2px;
}

.club-note {
  font-size: 12.3px;
}

.side-label {
  font-size: 10.6px;
}

.campus-block p {
  font-size: 14px;
}

.map-node text,
.map-hidden text {
  font-size: 13.4px;
}

.map-legend {
  font-size: 10.5px;
}

.person-role {
  font-size: 10.6px;
}

.person-copy blockquote {
  font-size: 16.2px;
}

.person-status {
  font-size: 10.6px;
}

.person-open {
  font-size: 11.2px;
}

.timeline-year {
  font-size: 11.2px;
}

.timeline-item p {
  font-size: 14px;
}

.admissions-date span,
.admissions-date small {
  font-size: 10.6px;
}

.admissions-fine {
  font-size: 11.8px;
}

.system-strip-inner {
  font-size: 10.6px;
}

.breach-top {
  font-size: 10.5px;
}

.breach-line small {
  font-size: 11.8px;
}

.breach-terminal {
  font-size: 11.2px;
}

.breach-foot {
  font-size: 10.5px;
}

.prophets-meta {
  font-size: 10.6px;
}

.prophets-meta p {
  font-size: 14px;
}

.tree-label,
.tree-status {
  font-size: 10.6px;
}

.tree-node .node-name {
  font-size: 10.5px;
}

.tree-note {
  font-size: 12.3px;
}

.prophet-top {
  font-size: 11.2px;
}

.epithet {
  font-size: 14.6px;
}

.prophet-desc {
  font-size: 15.1px;
}

.prophet-body dl div {
  font-size: 11.2px;
}

.prophet-body dt,
.prophet-body dd {
  color: rgba(219, 232, 244, 0.46);
}

.unlisted-head {
  font-size: 10.5px;
}

.unlisted-grid p {
  font-size: 12.9px;
}

.final-top,
.final-foot {
  font-size: 10.5px;
}

.final-line .void-sub {
  font-size: 11.8px;
}

.afterword-line {
  font-size: 13.4px;
}

.afterword-note {
  font-size: 11.8px;
}

.visit-lede {
  font-size: 14.6px;
}

.field > span {
  font-size: 10.6px;
}

.form-fine {
  font-size: 10.6px;
}

.visit-ticket span,
.visit-ticket small {
  font-size: 10.5px;
}

.club-modal-desc {
  font-size: 15.1px;
}

.club-member strong {
  font-size: 15.7px;
}

.club-member small {
  font-size: 10.6px;
}

.student-intro {
  font-size: 14.6px;
}

.student-facts dd {
  font-size: 13.4px;
}

@media (max-width: 720px) {
  .header-actions > .btn-small {
    display: none;
  }

  .final-top {
    gap: 8px;
    font-size: 9px;
    letter-spacing: 0.04em;
  }

  .final-top #finalClock {
    display: none;
  }

  .student-modal {
    grid-template-columns: 1fr;
  }

  .student-visual,
  .student-visual img {
    min-height: 300px;
    max-height: 340px;
  }

  .student-info {
    padding: 25px 20px;
  }

  .club-modal {
    padding: 24px 18px;
  }

  .club-modal-head {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
  }

  .club-modal-logo {
    width: 78px;
    height: 78px;
  }

  .club-modal-head h2 {
    font-size: 32px;
  }

  .club-members {
    grid-template-columns: 1fr 1fr;
  }

  .club-member {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 8px;
  }

  .club-member img {
    width: 40px;
    height: 46px;
  }

  .final-entity img {
    width: 108vw;
    max-width: none;
  }

  .final-title {
    padding-bottom: 12vh;
  }

  .final-title h1 {
    font-size: clamp(28px, 8.2vw, 48px);
  }

  .final-title p {
    font-size: 11.2px;
  }

  .final-quote {
    font-size: clamp(23px, 6.8vw, 33px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-up { opacity: 1 !important; transform: none !important; filter: none !important; }
  body.scare .final-sticky { animation: none; }
}
