/* ============================================================
   algoha.com v2  ::  CRT Terminal / HUD-Overlay / Layered-Depth
   Palette: #050508 #00ff41 #0a1628 #3a3a5c #f0f0f0 #00b4d8 #ff003c
   Fonts: Share Tech Mono, IBM Plex Sans, IBM Plex Sans KR, Red Hat Mono
   ============================================================ */

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

:root {
    --void: #050508;
    --phosphor: #00ff41;
    --slate: #0a1628;
    --indigo: #3a3a5c;
    --exit: #f0f0f0;
    --cyan: #00b4d8;
    --crimson: #ff003c;
    --mono: 'Share Tech Mono', monospace;
    --plex: 'IBM Plex Sans', system-ui, sans-serif;
    --plex-kr: 'IBM Plex Sans KR', 'IBM Plex Sans', sans-serif;
    --num: 'Red Hat Mono', monospace;
}

html, body {
    background: var(--void);
    color: var(--phosphor);
    font-family: var(--plex);
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
}

body {
    background: var(--void);
    transition: background 2000ms ease;
}

body.boot-shift {
    background: var(--slate);
}

body.inverted {
    background: var(--exit);
    color: #111;
}

body.inverted .scanlines,
body.inverted .data-streams,
body.inverted .jamo-rain {
    opacity: 0;
    transition: opacity 1500ms ease;
}

::selection {
    background: var(--phosphor);
    color: var(--void);
}

a { color: var(--cyan); text-decoration: none; }

/* --- CRT Scan-line overlay (persistent) --- */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 255, 65, 0.0) 0px,
            rgba(0, 255, 65, 0.0) 1px,
            rgba(0, 255, 65, 0.04) 1px,
            rgba(0, 255, 65, 0.04) 2px
        );
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 600ms ease;
}

.scanlines::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    top: -80px;
    background: linear-gradient(to bottom,
        rgba(0, 255, 65, 0) 0%,
        rgba(0, 255, 65, 0.10) 50%,
        rgba(0, 255, 65, 0) 100%);
    animation: scan-sweep 6s linear infinite;
}

.scanlines.is-on { opacity: 1; }

@keyframes scan-sweep {
    0%   { transform: translateY(0); }
    100% { transform: translateY(110vh); }
}

/* --- Korean jamo rain --- */
.jamo-rain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    opacity: 1;
    transition: opacity 1500ms ease;
}

.jamo {
    position: absolute;
    top: -10vh;
    font-family: var(--plex-kr);
    font-weight: 500;
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    user-select: none;
    will-change: transform, opacity;
    animation: jamo-fall linear forwards;
}

@keyframes jamo-fall {
    0%   { transform: translateY(0); opacity: 0.0; }
    10%  { opacity: 0.55; }
    80%  { opacity: 0.20; }
    100% { transform: translateY(115vh); opacity: 0; }
}

/* --- Data-stream columns --- */
.data-streams {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.55;
    transition: opacity 1500ms ease;
}

.stream-col {
    position: absolute;
    top: -50vh;
    width: 48px;
    font-family: var(--num);
    font-size: 13px;
    line-height: 1.4;
    color: rgba(0, 255, 65, 0.07);
    text-align: center;
    white-space: pre;
    user-select: none;
    will-change: transform;
}

.stream-col.s-up { animation: stream-up linear infinite; }

@keyframes stream-up {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-200vh); }
}

/* --- HUD Navigation --- */
.hud-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 56px;
    z-index: 100;
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid rgba(0, 255, 65, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 0 24px;
    transition: width 300ms ease;
    overflow: hidden;
}

.hud-nav:hover,
.hud-nav.is-open {
    width: 280px;
}

.hud-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-nav__item {
    display: grid;
    grid-template-columns: 24px 32px 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 255, 65, 0.5);
    border-left: 2px solid transparent;
    cursor: pointer;
    transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
}

.hud-nav__item:hover {
    color: var(--phosphor);
    background: rgba(0, 255, 65, 0.06);
}

.hud-nav__item.is-active {
    color: var(--phosphor);
    border-left-color: var(--phosphor);
    background: rgba(0, 255, 65, 0.10);
}

.hud-nav__cursor {
    color: var(--phosphor);
    animation: blink 530ms steps(1) infinite;
    opacity: 0;
}

.hud-nav__item.is-active .hud-nav__cursor {
    opacity: 1;
}

.hud-nav__abbr {
    color: var(--cyan);
    font-family: var(--num);
    font-weight: 500;
}

.hud-nav__label {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 200ms ease 80ms;
}

.hud-nav:hover .hud-nav__label,
.hud-nav.is-open .hud-nav__label {
    opacity: 1;
}

.hud-nav__meta {
    padding: 16px;
    border-top: 1px solid rgba(0, 255, 65, 0.15);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 200ms ease 100ms;
}

.hud-nav:hover .hud-nav__meta,
.hud-nav.is-open .hud-nav__meta {
    opacity: 1;
}

.hud-nav__meta-label {
    color: var(--indigo);
    display: block;
    margin-bottom: 4px;
}

.hud-nav__meta-value {
    color: var(--phosphor);
}

@keyframes blink {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.cursor-blink {
    display: inline-block;
    animation: blink 530ms steps(1) infinite;
    color: var(--phosphor);
    margin-left: 2px;
}

/* --- Hero / Boot section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 88px 120px 88px;
    z-index: 2;
}

.hero__inner {
    position: relative;
    text-align: center;
    max-width: 920px;
    width: 100%;
}

.hero__cursor {
    display: inline-block;
    color: var(--phosphor);
    font-family: var(--mono);
    font-size: clamp(28px, 4vw, 40px);
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.7);
    animation: blink 530ms steps(1) infinite;
    opacity: 0;
    transition: opacity 200ms ease;
}

.hero__cursor.is-on { opacity: 1; }

.hero__title {
    margin-top: 24px;
    font-family: var(--mono);
    font-weight: 400;
    font-size: clamp(28px, 5vw, 64px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--phosphor);
    text-shadow: 0 0 18px rgba(0, 255, 65, 0.45);
    min-height: 1.4em;
    line-height: 1.2;
    word-break: keep-all;
}

.hero__title-text { display: inline; }

.hero__title.is-glitching .hero__title-text {
    position: relative;
    animation: chroma 60ms steps(1) 6;
}

@keyframes chroma {
    0%   { text-shadow: 2px 0 var(--crimson), -2px 0 var(--phosphor); transform: translateX(-1px); }
    33%  { text-shadow: -3px 0 var(--crimson), 3px 0 var(--phosphor); transform: translateX(2px); }
    66%  { text-shadow: 2px 0 var(--cyan), -2px 0 var(--crimson); transform: translateX(-2px); }
    100% { text-shadow: 0 0 18px rgba(0, 255, 65, 0.45); transform: translateX(0); }
}

.hero__rule {
    margin: 28px auto 0;
    height: 1px;
    background: var(--phosphor);
    border: 0;
    width: 0;
    transition: width 800ms ease-out;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.hero__rule.is-drawn { width: 60%; }

.hero__sub {
    margin-top: 20px;
    font-family: var(--mono);
    font-size: clamp(14px, 1.6vw, 18px);
    letter-spacing: 0.1em;
    color: var(--cyan);
    text-transform: uppercase;
    min-height: 1.4em;
}

.hero__hud {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: rgba(0, 255, 65, 0.25);
    border: 1px solid rgba(0, 255, 65, 0.4);
    margin-top: 56px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease 1200ms, transform 600ms ease 1200ms;
}

.hero.is-revealed .hero__hud {
    opacity: 1;
    transform: translateY(0);
}

.hero__hud-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 8, 0.85);
    padding: 12px 16px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero__hud-row > span:first-child {
    color: var(--indigo);
}

.hero__hud-row .ok { color: var(--phosphor); }
.hero__hud-row .num { color: var(--cyan); font-family: var(--num); letter-spacing: 0.05em; }

.hero__warning {
    margin-top: 32px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crimson);
    opacity: 0;
    transition: opacity 800ms ease 1400ms;
}

.hero.is-revealed .hero__warning { opacity: 0.85; }

.hero__warning .alert {
    color: var(--crimson);
    margin-right: 8px;
    animation: pulse 1.2s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.hero__bottom-band {
    position: absolute;
    bottom: 24px;
    left: 88px;
    right: 88px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--phosphor);
    border-top: 1px solid rgba(0, 255, 65, 0.25);
    padding-top: 12px;
    opacity: 0;
    transition: opacity 800ms ease 1600ms;
}

.hero.is-revealed .hero__bottom-band { opacity: 0.7; }

.band-tick { color: var(--cyan); font-family: var(--num); }

/* --- Generic data-panel sections --- */
.panel-section {
    position: relative;
    padding: 140px 88px;
    min-height: 80vh;
    z-index: 2;
}

.panel-section--left .data-panel { margin-left: -48px; }
.panel-section--right .data-panel { margin-right: -56px; }

.grid-perspective {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    perspective: 800px;
    z-index: 0;
}

.grid-perspective::before {
    content: "";
    position: absolute;
    bottom: -40%;
    left: -20%;
    right: -20%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(58, 58, 92, 0.25) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(58, 58, 92, 0.25) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotateX(60deg) translateY(20%);
    transform-origin: center bottom;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 90%);
}

.grid-perspective--inverse::before {
    transform: rotateX(-60deg) translateY(-20%);
    transform-origin: center top;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 90%);
    bottom: auto;
    top: -40%;
}

.data-panel {
    position: relative;
    background: var(--slate);
    border: 1px solid rgba(0, 255, 65, 0.30);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 255, 65, 0.08) inset;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 400ms ease-out, transform 400ms ease-out, border-color 600ms ease;
    margin-bottom: 56px;
}

.data-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.data-panel__head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.25);
    background: rgba(0, 255, 65, 0.04);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.data-panel__id {
    color: var(--cyan);
    font-family: var(--num);
    font-weight: 500;
}

.data-panel__title {
    color: var(--phosphor);
    flex: 1;
}

.data-panel__status {
    padding: 2px 10px;
    border: 1px solid var(--phosphor);
    font-size: 10px;
    color: var(--phosphor);
}

.data-panel__status.alert {
    border-color: var(--crimson);
    color: var(--crimson);
}

.pulse {
    animation: pulse 1.4s ease-in-out infinite;
}

.data-panel__body {
    padding: 32px 28px;
}

.data-panel__lede {
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.7;
    color: rgba(240, 240, 240, 0.92);
    max-width: 70ch;
    margin-bottom: 36px;
}

.ko {
    font-family: var(--plex-kr);
    color: var(--cyan);
}

.alert-text { color: var(--crimson); }
.cyan-text  { color: var(--cyan); }
.dim        { color: var(--indigo); font-family: var(--num); }
.warn       { color: #ffb000; }
.ok         { color: var(--phosphor); }
.num        { font-family: var(--num); font-weight: 500; font-variant-numeric: tabular-nums; }

.data-panel__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: rgba(0, 255, 65, 0.20);
    border: 1px solid rgba(0, 255, 65, 0.20);
    margin-bottom: 32px;
}

.metric {
    background: rgba(5, 5, 8, 0.85);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric__label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--indigo);
}

.metric__value {
    font-family: var(--num);
    font-size: clamp(28px, 3vw, 40px);
    color: var(--phosphor);
    font-weight: 500;
    text-shadow: 0 0 14px rgba(0, 255, 65, 0.4);
}

.metric--alert .metric__value {
    color: var(--crimson);
    text-shadow: 0 0 14px rgba(255, 0, 60, 0.45);
}

.metric__unit {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--indigo);
    letter-spacing: 0.1em;
}

.data-panel__log {
    list-style: none;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(0, 0, 0, 0.4);
    padding: 16px 20px;
    font-family: var(--num);
    font-size: 13px;
    color: rgba(240, 240, 240, 0.78);
    line-height: 1.85;
}

.data-panel__log li::before {
    content: "› ";
    color: var(--phosphor);
    margin-right: 4px;
}

.log-time {
    color: var(--cyan);
    margin-right: 8px;
}

.data-panel__body--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.split p { margin-bottom: 14px; }

.data-panel__h2 {
    font-family: var(--mono);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--phosphor);
    font-size: clamp(22px, 2.4vw, 32px);
    margin-bottom: 18px;
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
    position: relative;
}

/* glitch text */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.glitch-text.is-glitching::before {
    color: var(--crimson);
    transform: translateX(-2px);
    clip-path: inset(20% 0 60% 0);
    animation: glitch-clip 150ms steps(3) 1;
}

.glitch-text.is-glitching::after {
    color: var(--cyan);
    transform: translateX(2px);
    clip-path: inset(60% 0 20% 0);
    animation: glitch-clip 150ms steps(3) 1 reverse;
}

@keyframes glitch-clip {
    0%   { clip-path: inset(0 0 80% 0); }
    25%  { clip-path: inset(45% 0 30% 0); }
    50%  { clip-path: inset(15% 0 60% 0); }
    75%  { clip-path: inset(70% 0 5% 0); }
    100% { clip-path: inset(20% 0 50% 0); }
}

/* --- Probability cone --- */
.split--cone {
    position: relative;
    min-height: 320px;
}

.cone {
    position: relative;
    width: 100%;
    height: 320px;
}

.cone__line {
    position: absolute;
    top: 50%;
    left: 0;
    height: 1px;
    background: linear-gradient(to right, var(--phosphor), rgba(0, 255, 65, 0.05));
    transform-origin: left center;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
    width: 96%;
}

.cone__line--1 { transform: rotate(-32deg); }
.cone__line--2 { transform: rotate(-16deg); }
.cone__line--3 { transform: rotate(0deg); }
.cone__line--4 { transform: rotate(16deg); background: linear-gradient(to right, var(--crimson), rgba(255, 0, 60, 0.05)); box-shadow: 0 0 8px rgba(255, 0, 60, 0.5); }
.cone__line--5 { transform: rotate(32deg); }

.cone__origin {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--void);
    color: var(--phosphor);
    font-family: var(--mono);
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid var(--phosphor);
    letter-spacing: 0.12em;
}

.cone__node {
    position: absolute;
    right: 0;
    background: var(--void);
    border: 1px solid rgba(0, 255, 65, 0.5);
    padding: 4px 10px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--phosphor);
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-transform: uppercase;
}

.cone__node--a { top: 6%; }
.cone__node--b { top: 26%; }
.cone__node--c { top: 48%; }
.cone__node--d { top: 68%; border-color: var(--crimson); color: var(--crimson); animation: pulse 1.4s ease-in-out infinite; }
.cone__node--e { top: 88%; }

.data-panel__foot {
    border-top: 1px solid rgba(0, 255, 65, 0.18);
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--indigo);
}

.foot-tag--alert { color: var(--crimson); }

/* --- Lattice table --- */
.lattice {
    border: 1px solid rgba(0, 255, 65, 0.20);
    margin-top: 24px;
    overflow-x: auto;
}

.lattice__head,
.lattice__row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr 1fr 1fr;
    gap: 1px;
    background: rgba(0, 255, 65, 0.18);
}

.lattice__head > span,
.lattice__row  > span {
    background: rgba(5, 5, 8, 0.92);
    padding: 12px 16px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lattice__head > span {
    color: var(--cyan);
    background: rgba(0, 180, 216, 0.08);
}

.lattice__label {
    color: var(--phosphor) !important;
    font-family: var(--num) !important;
    text-transform: lowercase !important;
    letter-spacing: 0.04em !important;
}

.lattice__row:hover > span {
    background: rgba(0, 255, 65, 0.06);
}

/* --- Terminal --- */
.terminal {
    background: #08080c;
    border: 1px solid rgba(0, 255, 65, 0.30);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 32px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.08), 0 12px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.terminal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal__chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #0d0d14, #08080c);
    border-bottom: 1px solid rgba(0, 255, 65, 0.18);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot--red    { background: var(--crimson); }
.dot--yellow { background: #ffb000; }
.dot--green  { background: var(--phosphor); box-shadow: 0 0 8px rgba(0, 255, 65, 0.6); }

.terminal__name {
    margin-left: 12px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--indigo);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.terminal__body {
    font-family: var(--num);
    font-size: 14px;
    line-height: 1.7;
    color: var(--phosphor);
    padding: 22px 24px;
    white-space: pre-wrap;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
    min-height: 180px;
    position: relative;
}

.terminal__body::after {
    content: "|";
    color: var(--phosphor);
    margin-left: 2px;
    animation: blink 530ms steps(1) infinite;
}

/* --- Protocol list --- */
.protocol-list {
    list-style: none;
    counter-reset: proto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255, 0, 60, 0.18);
    border: 1px solid rgba(255, 0, 60, 0.25);
}

.protocol-list li {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 18px;
    align-items: baseline;
    background: rgba(5, 5, 8, 0.92);
    padding: 18px 22px;
    font-size: 16px;
    line-height: 1.6;
}

.protocol__step {
    font-family: var(--num);
    color: var(--crimson);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.protocol__text {
    color: rgba(240, 240, 240, 0.95);
}

.protocol__hint {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--indigo);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.data-panel--alert {
    border-color: rgba(255, 0, 60, 0.45);
}

.data-panel--alert .data-panel__head {
    background: rgba(255, 0, 60, 0.06);
    border-color: rgba(255, 0, 60, 0.3);
}

/* --- Exit / inversion section --- */
.exit-section {
    position: relative;
    min-height: 100vh;
    background: var(--exit);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 88px 88px 200px 88px;
    transition: background 1500ms ease, color 1500ms ease;
    z-index: 3;
    overflow: hidden;
}

.exit-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0) 1px,
            rgba(0, 0, 0, 0.025) 1px,
            rgba(0, 0, 0, 0.025) 2px
        );
    pointer-events: none;
    opacity: 0;
    transition: opacity 1200ms ease 600ms;
}

.exit-section.is-visible::before {
    opacity: 1;
}

.exit-inner {
    position: relative;
    text-align: center;
    max-width: 880px;
    width: 100%;
}

.exit-pre {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    color: #888;
    margin-bottom: 32px;
}

.exit-statement {
    font-family: var(--mono);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(40px, 8vw, 96px);
    color: #111;
    line-height: 1.05;
}

.exit-statement::before,
.exit-statement::after { display: none; }

.exit-sub {
    margin-top: 28px;
    font-family: var(--plex-kr);
    font-size: clamp(14px, 1.4vw, 18px);
    letter-spacing: 0.04em;
    color: #444;
}

.exit-meta {
    margin-top: 64px;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #888;
}

.exit-silence {
    height: 400px;
}

/* --- Reveal helper for non-data-panel scrollables --- */
.reveal-panel { /* targeted by JS observer */ }

/* --- Responsive --- */
@media (max-width: 900px) {
    .hud-nav { width: 44px; }
    .hud-nav:hover, .hud-nav.is-open { width: 240px; }
    .hero { padding: 56px 24px 100px 24px; }
    .hero__bottom-band { left: 24px; right: 24px; }
    .panel-section { padding: 88px 24px; }
    .panel-section--left .data-panel,
    .panel-section--right .data-panel { margin-left: 0; margin-right: 0; }
    .data-panel__body--split {
        grid-template-columns: 1fr;
    }
    .lattice__head,
    .lattice__row {
        grid-template-columns: 1.2fr repeat(5, 1fr);
        font-size: 11px;
    }
}

@media (max-width: 560px) {
    .hud-nav { width: 36px; }
    .hud-nav:hover, .hud-nav.is-open { width: 100vw; }
    .lattice { font-size: 10px; }
    .lattice__head,
    .lattice__row {
        grid-template-columns: 1fr 0.7fr 0.7fr 0.9fr 0.7fr 0.9fr;
    }
    .protocol-list li {
        grid-template-columns: 40px 1fr;
        font-size: 14px;
    }
    .protocol__hint { grid-column: 1 / -1; }
    .hero__hud { grid-template-columns: 1fr 1fr; }
    .exit-statement { font-size: clamp(36px, 12vw, 64px); }
}

@media (prefers-reduced-motion: reduce) {
    .scanlines::after,
    .stream-col,
    .jamo,
    .pulse,
    .cursor-blink,
    .hud-nav__cursor {
        animation: none !important;
    }
}
