/* ================================================================
   turingtest.quest // Cathode Interrogation palette
   Palette: #0a0c10 void, #e8e6df bone, #eb3b5a ident-red,
            #50faff spectral-cyan, #6f6a62 dust, #232028 hover-ink,
            #a8895a brass, #000000 absolute
   Type: JetBrains Mono (display), IBM Plex Mono (body),
         Space Mono (meta), Shadows Into Light Two (marginalia)
   ================================================================ */

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

:root {
    --void: #0a0c10;
    --void-deep: #000000;
    --bone: #e8e6df;
    --ident-red: #eb3b5a;
    --spectral-cyan: #50faff;
    --dust: #6f6a62;
    --hover-ink: #232028;
    --brass: #a8895a;

    --grid-gutter: clamp(0.5rem, 1.3vw, 1.3rem);
    --hud-width: clamp(48px, 8vw, 110px);
    --edge-pad: clamp(1.2rem, 3.6vw, 3rem);
    --chromatic-r: rgba(235, 59, 90, 0.42);
    --chromatic-c: rgba(80, 250, 255, 0.42);

    --font-display: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    --font-body: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    --font-meta: "Space Mono", "IBM Plex Mono", ui-monospace, monospace;
    --font-hand: "Shadows Into Light Two", "Bradley Hand", cursive;

    --ease-bureaucratic: cubic-bezier(0.77, 0, 0.175, 1);
}

html, body {
    background: var(--void);
    color: var(--bone);
    font-family: var(--font-body);
    font-size: clamp(0.92rem, 1.05vw, 1.05rem);
    line-height: 1.72;
    font-weight: 400;
    font-feature-settings: 'ss01', 'ss02', 'zero';
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    position: relative;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='20' viewBox='0 0 12 20'><rect x='1' y='17' width='10' height='2' fill='%23eb3b5a'/></svg>") 2 18, text;
    padding-right: var(--hud-width);
}

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

/* ================================================================
   Glitch canvas backdrop
   ================================================================ */
#glitch-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.42;
    pointer-events: none;
    mix-blend-mode: screen;
}

body::before {
    /* scanline texture — always on, subtle */
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(232, 230, 223, 0.02) 0,
            rgba(232, 230, 223, 0.02) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: overlay;
}

body::after {
    /* soft vignette */
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(10,12,16,0) 45%, rgba(10,12,16,0.62) 100%);
}

/* ================================================================
   HUD right-rail overlay
   ================================================================ */
.hud-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--hud-width);
    height: 100vh;
    z-index: 40;
    border-left: 1px solid rgba(111, 106, 98, 0.35);
    background: linear-gradient(180deg, rgba(10,12,16,0.82), rgba(10,12,16,0.92));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.2rem 0.6rem 1.4rem 0.6rem;
    font-family: var(--font-meta);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dust);
    backdrop-filter: blur(2px);
}

.hud-block {
    text-align: center;
    padding: 0.25rem 0;
}

.hud-block--top { margin-top: 0; }
.hud-block--bottom { margin-bottom: 0; }

.hud-label {
    color: var(--dust);
    font-size: 0.52rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.22em;
}

.hud-value {
    color: var(--spectral-cyan);
    font-family: var(--font-display);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(80, 250, 255, 0.35);
}

.hud-value--small {
    font-size: 0.62rem;
}

.hud-sine {
    width: 100%;
    height: 48%;
    flex-shrink: 0;
    margin: 0.2rem auto;
    opacity: 0.72;
}

.hud-meter {
    position: relative;
    display: block;
    margin: 0 auto;
}

.hud-meter-bar {
    position: relative;
    width: 80%;
    height: 4px;
    margin: 0.4rem auto 0.3rem auto;
    background: rgba(111, 106, 98, 0.35);
    overflow: hidden;
}

.hud-meter-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, var(--ident-red), var(--spectral-cyan));
    transition: width 0.18s linear;
}

.hud-meter-value {
    color: var(--bone);
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* ================================================================
   Minimal navigation + terminal drawer
   ================================================================ */
.min-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: var(--hud-width);
    z-index: 60;
    pointer-events: none;
}

.min-nav-trigger {
    pointer-events: auto;
    appearance: none;
    background: transparent;
    border: none;
    color: var(--bone);
    padding: 1.2rem var(--edge-pad);
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    align-items: baseline;
    transition: color 0.24s var(--ease-bureaucratic), text-shadow 0.24s var(--ease-bureaucratic);
    text-shadow: 1px 0 0 var(--chromatic-r), -1px 0 0 var(--chromatic-c);
}

.min-nav-trigger:hover {
    color: var(--spectral-cyan);
}

.min-nav-carets { color: var(--ident-red); }
.min-nav-sep { color: var(--dust); }
.min-nav-chapter { color: var(--spectral-cyan); }

.terminal-drawer {
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 520ms var(--ease-bureaucratic), opacity 320ms var(--ease-bureaucratic);
    background: linear-gradient(180deg, rgba(10,12,16,0.98), rgba(10,12,16,0.94));
    border-bottom: 1px solid rgba(111, 106, 98, 0.42);
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.terminal-drawer.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.terminal-drawer-inner {
    padding: 2rem var(--edge-pad);
    max-width: 860px;
}

.terminal-drawer-header {
    color: var(--dust);
    font-family: var(--font-meta);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.terminal-drawer-prompt {
    color: var(--ident-red);
    margin-right: 0.4rem;
}

.terminal-drawer-cmd {
    color: var(--bone);
}

.ascii-index {
    color: var(--dust);
    font-family: var(--font-display);
    font-size: 0.7rem;
    line-height: 1.25;
    white-space: pre;
    margin-bottom: 1.2rem;
    overflow-x: auto;
}

.terminal-index {
    list-style: none;
    column-count: 2;
    column-gap: 2rem;
}

.terminal-index li {
    margin-bottom: 0.35rem;
    break-inside: avoid;
}

.terminal-index a {
    color: var(--bone);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    transition: color 180ms var(--ease-bureaucratic);
    display: inline-block;
}

.terminal-index a:hover {
    color: var(--spectral-cyan);
}

/* ================================================================
   Transcript / main column
   ================================================================ */
.transcript {
    position: relative;
    z-index: 10;
    padding-top: 6rem;
}

.chapter {
    position: relative;
    padding: clamp(4rem, 8vh, 7rem) var(--edge-pad) clamp(4rem, 8vh, 7rem) var(--edge-pad);
    /* 13-column fractional grid, primes */
    display: grid;
    grid-template-columns:
        minmax(0, 1.3fr) minmax(0, 1.69fr) minmax(0, 1.07fr)
        minmax(0, 1.27fr) minmax(0, 1.51fr) minmax(0, 1.37fr)
        minmax(0, 0.89fr) minmax(0, 1.13fr) minmax(0, 1.48fr)
        minmax(0, 1.22fr) minmax(0, 0.97fr) minmax(0, 1.31fr)
        minmax(0, 1.09fr);
    column-gap: var(--grid-gutter);
    row-gap: 1.4rem;
    max-width: 1560px;
    margin: 0 auto;
}

.chapter-header {
    grid-column: 1 / 13;
    position: relative;
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(111, 106, 98, 0.4);
}

.chapter-numeral {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.6vw, 1.6rem);
    color: var(--ident-red);
    letter-spacing: -0.02em;
    font-variation-settings: 'wght' 780;
    margin-bottom: 0.3rem;
}

.chapter-title {
    font-family: var(--font-display);
    font-variation-settings: 'wght' 780;
    font-weight: 780;
    font-size: clamp(2.4rem, 7.2vw, 6.8rem);
    line-height: 0.94;
    letter-spacing: -0.045em;
    color: var(--bone);
    margin-bottom: 0.7rem;
    text-shadow: 1px 0 0 var(--chromatic-r), -1px 0 0 var(--chromatic-c);
    position: relative;
    max-width: 22ch;
}

.chapter-tag {
    font-family: var(--font-meta);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    color: var(--dust);
    margin-bottom: 0.7rem;
}

.chapter-qr {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    border: 1px solid var(--dust);
    padding: 3px;
}

.qr-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-svg rect {
    fill: var(--bone);
}

/* ================================================================
   P(HUMAN) inline meter motif
   ================================================================ */
.phuman-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-meta);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dust);
    font-weight: 700;
    cursor: pointer;
}

.phuman-label {
    color: var(--ident-red);
}

.phuman-bar {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 6px;
    background: rgba(111, 106, 98, 0.3);
    border: 1px solid rgba(111, 106, 98, 0.4);
    overflow: hidden;
}

.phuman-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ident-red) 0%, var(--brass) 50%, var(--spectral-cyan) 100%);
    transition: width 240ms var(--ease-bureaucratic);
}

.phuman-value {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--bone);
    letter-spacing: 0.02em;
    min-width: 5ch;
    display: inline-block;
    text-align: left;
}

.phuman-inline:hover .phuman-bar-fill {
    filter: hue-rotate(20deg) saturate(1.4);
}

.phuman-inline:hover {
    animation: phumanGlitch 300ms steps(4) 1;
}

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

/* ================================================================
   CH_00 — hero
   ================================================================ */
.chapter--hero {
    min-height: 100vh;
    grid-template-rows: 1fr auto;
    padding-top: calc(var(--edge-pad) + 3rem);
}

.hero-inner {
    grid-column: 2 / 12;
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: center;
    min-height: calc(100vh - 14rem);
    padding: 0 0 6rem 0;
}

.hero-meta {
    font-family: var(--font-meta);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dust);
    margin-bottom: 1.4rem;
    display: inline-flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hero-meta-sep { color: var(--ident-red); }

.hero-title {
    font-family: var(--font-display);
    font-variation-settings: 'wght' 800;
    font-weight: 800;
    font-size: clamp(3.6rem, 13vw, 12rem);
    line-height: 0.9;
    letter-spacing: -0.055em;
    color: var(--bone);
    position: relative;
    margin-bottom: 1.4rem;
    text-shadow: 2px 0 0 var(--chromatic-r), -2px 0 0 var(--chromatic-c);
}

.hero-title::before,
.hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero-title::before {
    color: var(--ident-red);
    clip-path: polygon(0 0, 100% 0, 100% 42%, 0 46%);
    animation: glitchDriftA 7200ms steps(6) infinite;
    opacity: 0.55;
}

.hero-title::after {
    color: var(--spectral-cyan);
    clip-path: polygon(0 54%, 100% 58%, 100% 100%, 0 100%);
    animation: glitchDriftB 9400ms steps(8) infinite;
    opacity: 0.55;
}

@keyframes glitchDriftA {
    0%, 92%, 100% { transform: translate(0,0); }
    94% { transform: translate(-3px, 1px); }
    96% { transform: translate(2px, -2px); }
    98% { transform: translate(-1px, 0); }
}

@keyframes glitchDriftB {
    0%, 88%, 100% { transform: translate(0,0); }
    90% { transform: translate(2px, -1px); }
    93% { transform: translate(-2px, 2px); }
    97% { transform: translate(1px, 0); }
}

.hero-sub {
    margin-bottom: 2rem;
}

.hero-cursor-line {
    font-family: var(--font-display);
    font-size: clamp(0.98rem, 1.3vw, 1.2rem);
    color: var(--bone);
    letter-spacing: -0.005em;
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
    min-height: 2rem;
}

.prompt-caret {
    color: var(--ident-red);
}

.typed {
    color: var(--bone);
    white-space: pre;
}

.blink-cursor {
    color: var(--spectral-cyan);
    animation: blinkCursor 1.1s steps(2, start) infinite;
}

@keyframes blinkCursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-qr {
    position: absolute;
    top: 0;
    right: 0;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.hero-qr .qr-svg {
    width: 72px;
    height: 72px;
    border: 1px solid var(--dust);
    padding: 3px;
}

.hero-qr-caption {
    font-family: var(--font-meta);
    font-size: 0.56rem;
    letter-spacing: 0.22em;
    color: var(--dust);
    text-transform: uppercase;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.hero-particles .particle {
    position: absolute;
    font-family: var(--font-display);
    color: var(--bone);
    opacity: 0.04;
    font-size: 0.9rem;
    will-change: transform;
    animation: particleDrift 22s linear infinite;
}

@keyframes particleDrift {
    from { transform: translate3d(-4vw, 0, 0); }
    to   { transform: translate3d(104vw, 0, 0); }
}

/* Chapter footer dot-matrix rule */
.chapter-footer {
    grid-column: 1 / 13;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
    color: var(--dust);
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.dot-rule {
    display: inline-block;
    font-family: var(--font-display);
    letter-spacing: 0.25em;
    color: var(--dust);
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    text-overflow: clip;
}

.chapter-seal {
    color: var(--brass);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.06em;
    font-size: 0.76rem;
    border: 1px solid var(--brass);
    padding: 0.24rem 0.6rem;
}

/* ================================================================
   Prose
   ================================================================ */
.prose {
    grid-column: 3 / 10;
    max-width: 65ch;
    font-size: clamp(0.95rem, 1.05vw, 1.08rem);
    line-height: 1.72;
    color: var(--bone);
}

.prose p + p { margin-top: 1rem; }

.prose--narrow { grid-column: 4 / 10; }
.prose em { color: var(--spectral-cyan); font-style: normal; border-bottom: 1px dotted var(--spectral-cyan); }

/* ================================================================
   CH_01 — Imitation table
   ================================================================ */
.imitation-table {
    grid-column: 1 / 13;
    display: grid;
    grid-template-columns: 0.9fr 1fr 1fr;
    gap: 0.6rem var(--grid-gutter);
    border-top: 1px solid rgba(111, 106, 98, 0.35);
    border-bottom: 1px solid rgba(111, 106, 98, 0.35);
    padding: 1.4rem 0;
    margin-top: 1rem;
    position: relative;
}

.imitation-row {
    display: contents;
}

.imitation-col {
    padding: 0.6rem 0.8rem;
    border-left: 1px dashed rgba(111, 106, 98, 0.3);
    position: relative;
    transition: background 240ms var(--ease-bureaucratic);
}

.imitation-col:first-child {
    border-left: none;
}

.imitation-col:hover {
    background: var(--hover-ink);
}

.imitation-col p {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--bone);
}

.imitation-col--q p { color: var(--bone); }
.imitation-col--c p { color: var(--bone); }
.imitation-col--b p { color: var(--spectral-cyan); }

.imitation-table.is-swapped .imitation-col--c p { color: var(--spectral-cyan); }
.imitation-table.is-swapped .imitation-col--b p { color: var(--bone); }

.speaker {
    display: inline-block;
    font-family: var(--font-meta);
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    margin-bottom: 0.35rem;
    border: 1px solid currentColor;
}

.speaker--interrogator { color: var(--ident-red); }
.speaker--c { color: var(--bone); }
.speaker--b { color: var(--spectral-cyan); }

.imitation-table.is-redacted .speaker--c,
.imitation-table.is-redacted .speaker--b {
    color: transparent;
    background: var(--void-deep);
    border-color: var(--void-deep);
}

.imitation-redaction {
    grid-column: 1 / -1;
    margin-top: 1.2rem;
    position: relative;
}

.redaction-bar {
    height: 6px;
    background: var(--void-deep);
    border-top: 1px solid var(--ident-red);
    border-bottom: 1px solid var(--ident-red);
    margin-bottom: 0.6rem;
    position: relative;
    overflow: hidden;
}

.redaction-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg,
        var(--void-deep) 0, var(--void-deep) 8px,
        rgba(235,59,90,0.25) 8px, rgba(235,59,90,0.25) 9px
    );
}

.redaction-note {
    font-family: var(--font-meta);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ident-red);
    font-weight: 700;
}

/* ================================================================
   Marginalia
   ================================================================ */
.marginalia {
    font-family: var(--font-hand);
    font-size: 1.15rem;
    color: var(--ident-red);
    line-height: 1.3;
    max-width: 18ch;
    transform: rotate(-3.4deg);
    opacity: 0;
    transition: opacity 520ms var(--ease-bureaucratic), transform 520ms var(--ease-bureaucratic);
    padding: 0.4rem 0;
    position: relative;
}

.marginalia::before {
    content: "✎";
    color: var(--ident-red);
    font-family: var(--font-display);
    margin-right: 0.35rem;
    font-size: 0.9rem;
}

.marginalia.is-visible {
    opacity: 1;
}

.marginalia--left {
    grid-column: 1 / 3;
    margin-top: 1.2rem;
    transform: rotate(-4.2deg);
    align-self: start;
}

.marginalia--right {
    grid-column: 11 / 13;
    margin-top: 1.2rem;
    transform: rotate(2.8deg);
    align-self: end;
    justify-self: end;
}

.marginalia--inline {
    display: block;
    margin: 0.6rem 0 0 0;
    max-width: 24ch;
    transform: rotate(-1.6deg);
}

/* ================================================================
   CH_02 — cards grid (broken grid, tilted)
   ================================================================ */
.cards-grid {
    grid-column: 1 / 13;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
    margin-top: 1.6rem;
}

.tilt-card {
    position: relative;
    background: var(--hover-ink);
    border: 1px solid rgba(111, 106, 98, 0.45);
    padding: 1rem;
    transform: rotate(0deg);
    transition: transform 360ms var(--ease-bureaucratic), border-color 360ms var(--ease-bureaucratic), background 360ms var(--ease-bureaucratic);
    will-change: transform;
}

.tilt-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(232, 230, 223, 0.035) 0,
        rgba(232, 230, 223, 0.035) 1px,
        transparent 1px,
        transparent 4px
    );
}

.tilt-card:hover {
    border-color: var(--spectral-cyan);
    background: #2a2730;
    transform: rotate(0deg) translateY(-2px) !important;
}

.tilt-card-plate {
    position: relative;
    width: 100%;
    aspect-ratio: 340 / 180;
    background: var(--void-deep);
    border: 1px solid rgba(111, 106, 98, 0.5);
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.flow-field {
    width: 100%;
    height: 100%;
    display: block;
}

.flow-field path {
    fill: none;
    stroke: var(--bone);
    stroke-width: 0.6;
    opacity: 0.7;
}

.tilt-card-caption {
    position: absolute;
    bottom: 4px;
    left: 8px;
    font-family: var(--font-meta);
    font-size: 0.52rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dust);
    background: rgba(10,12,16,0.7);
    padding: 2px 6px;
}

.tilt-card-title {
    font-family: var(--font-display);
    font-variation-settings: 'wght' 780;
    font-weight: 780;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    letter-spacing: -0.02em;
    color: var(--ident-red);
    margin-bottom: 0.5rem;
    text-shadow: 1px 0 0 var(--chromatic-r), -1px 0 0 var(--chromatic-c);
}

.tilt-card p {
    font-size: 0.92rem;
    line-height: 1.62;
    color: var(--bone);
}

.tilt-card-meta {
    margin-top: 0.8rem;
    font-family: var(--font-meta);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dust);
    font-weight: 700;
}

.tilt-card-meta em {
    color: var(--spectral-cyan);
    font-style: normal;
}

/* ================================================================
   CH_03 — split-screen centerpiece
   ================================================================ */
.split-stage {
    grid-column: 1 / 13;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0;
    margin-top: 1.2rem;
    position: relative;
    min-height: 60vh;
    transition: grid-template-columns 800ms var(--ease-bureaucratic);
}

.split-stage.is-expanded {
    grid-template-columns: 1.85fr 1px 0.15fr;
}

.split-col {
    padding: 1.4rem 1.2rem;
}

.split-col--room {
    text-align: left;
    border-right: none;
}

.split-col--observer {
    text-align: right;
    border-left: none;
}

.split-col-label {
    font-family: var(--font-meta);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ident-red);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.split-col--observer .split-col-label {
    color: var(--spectral-cyan);
}

.split-col p {
    font-size: 0.96rem;
    line-height: 1.72;
    color: var(--bone);
    max-width: 55ch;
    margin-bottom: 0.9rem;
}

.split-col--observer p {
    margin-left: auto;
}

.observer-footnote {
    color: var(--dust) !important;
    font-size: 0.82rem !important;
    font-style: italic;
    border-top: 1px dashed rgba(111,106,98,0.4);
    padding-top: 0.6rem;
    margin-top: 1rem !important;
}

.split-divider {
    width: 1px;
    height: 100%;
    align-self: stretch;
    justify-self: center;
}

.ascii-art {
    color: var(--spectral-cyan);
    font-family: var(--font-display);
    font-size: 0.72rem;
    line-height: 1.3;
    white-space: pre;
    margin: 1rem 0;
    text-shadow: 0 0 4px rgba(80, 250, 255, 0.3);
    overflow-x: auto;
}

/* ================================================================
   CH_04 — intermission
   ================================================================ */
.chapter--intermission {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: 1fr;
    background: var(--void-deep);
    position: relative;
    padding: 2rem var(--edge-pad);
}

.chapter--intermission::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(235,59,90,0.015) 3px, rgba(235,59,90,0.015) 4px);
    pointer-events: none;
}

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

.intermission-meta {
    font-family: var(--font-meta);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dust);
    margin-bottom: 2rem;
}

.intermission-question {
    font-family: var(--font-display);
    font-variation-settings: 'wght' 760;
    font-weight: 760;
    font-size: clamp(3rem, 18vw, 16rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
    color: var(--bone);
    text-shadow: 4px 0 0 var(--chromatic-r), -4px 0 0 var(--chromatic-c);
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: filter 800ms var(--ease-bureaucratic);
}

.intermission-question::before,
.intermission-question::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.intermission-question::before {
    color: var(--ident-red);
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 40%);
    opacity: 0.7;
    animation: glitchDriftA 6200ms steps(6) infinite;
}

.intermission-question::after {
    color: var(--spectral-cyan);
    clip-path: polygon(0 62%, 100% 58%, 100% 100%, 0 100%);
    opacity: 0.7;
    animation: glitchDriftB 8100ms steps(8) infinite;
}

.intermission-question.is-inverted {
    mix-blend-mode: difference;
    filter: invert(1);
}

.intermission-sub {
    margin-top: 2rem;
    font-family: var(--font-meta);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dust);
}

/* ================================================================
   CH_05 — Replika
   ================================================================ */
.replika-transcript {
    grid-column: 2 / 12;
    margin-top: 1.2rem;
    position: relative;
    display: grid;
    gap: 2rem;
}

.rep-exchange {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0 1.4rem;
    position: relative;
    padding-bottom: 1.4rem;
    border-bottom: 1px dashed rgba(111, 106, 98, 0.25);
}

.rep-exchange::after {
    content: "";
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    width: 1px;
    background: rgba(111, 106, 98, 0.35);
    align-self: stretch;
}

.rep-q {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    text-align: left;
    padding-right: 1rem;
}

.rep-a {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    text-align: right;
    padding-left: 1rem;
}

.rep-q p, .rep-a p {
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 52ch;
}

.rep-q p { color: var(--bone); }
.rep-a p { color: var(--spectral-cyan); }

.rep-q .speaker { color: var(--ident-red); }
.rep-a .speaker { color: var(--spectral-cyan); }

.rep-a p { margin-left: auto; }

.rep-exchange .marginalia--inline {
    grid-column: 1 / 4;
    grid-row: 2 / 3;
    justify-self: end;
    margin-top: 0.8rem;
    color: var(--ident-red);
}

/* ================================================================
   CH_06 — verdict
   ================================================================ */
.chapter--verdict {
    padding-bottom: 6rem;
}

.verdict-grid {
    grid-column: 2 / 12;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem 2rem;
    margin: 2rem 0 3rem 0;
}

.verdict-cell {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.8rem;
    row-gap: 0.3rem;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(111, 106, 98, 0.3);
}

.verdict-bar {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    width: 100%;
    height: 8px;
}

.verdict-value {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--bone);
    font-variation-settings: 'wght' 640;
    text-shadow: 1px 0 0 var(--chromatic-r), -1px 0 0 var(--chromatic-c);
}

.verdict-cap {
    grid-row: 2 / 3;
    grid-column: 1 / 3;
    font-family: var(--font-meta);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dust);
}

.prose--verdict {
    grid-column: 2 / 12;
    max-width: 68ch;
}

.final-rule {
    grid-column: 1 / 13;
    font-family: var(--font-display);
    color: var(--brass);
    letter-spacing: 0.25em;
    font-size: 0.72rem;
    margin: 2rem 0 1.4rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.final-seal {
    grid-column: 2 / 12;
    font-family: var(--font-display);
    font-variation-settings: 'wght' 720;
    font-weight: 720;
    font-size: clamp(1.4rem, 2.4vw, 2.2rem);
    letter-spacing: 0.14em;
    color: var(--brass);
    border-top: 1px solid var(--brass);
    border-bottom: 1px solid var(--brass);
    padding: 0.9rem 0;
    text-align: center;
    margin-bottom: 1.4rem;
}

.final-meta {
    grid-column: 2 / 12;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-family: var(--font-meta);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dust);
}

/* ================================================================
   Hallucination overlay (idle ghost)
   ================================================================ */
.hallucinate-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms linear;
    font-family: var(--font-display);
    font-variation-settings: 'wght' 600;
    color: var(--bone);
    font-size: clamp(1.4rem, 3.6vw, 4rem);
    letter-spacing: -0.02em;
    text-shadow: 8px 0 0 var(--chromatic-r), -8px 0 0 var(--chromatic-c);
    mix-blend-mode: screen;
}

.hallucinate-overlay.is-active {
    opacity: 1;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 880px) {
    :root { --hud-width: 42px; }

    .hud-overlay {
        padding: 0.6rem 0.3rem;
        font-size: 0.52rem;
    }

    .hud-sine { height: 36%; }
    .hud-meter-bar { width: 90%; }
    .hud-label { font-size: 0.44rem; }
    .hud-value { font-size: 0.58rem; }

    .terminal-index { column-count: 1; }

    .split-stage {
        grid-template-columns: 1fr;
    }

    .split-divider { display: none; }

    .split-col--observer { text-align: left; }

    .rep-exchange {
        grid-template-columns: 1fr;
    }
    .rep-exchange::after { display: none; }
    .rep-q, .rep-a {
        grid-column: 1 / 2 !important;
        text-align: left !important;
        padding: 0 !important;
    }
    .rep-q { grid-row: 1; }
    .rep-a { grid-row: 2; margin-top: 0.6rem; }
    .rep-a p { margin-left: 0; color: var(--spectral-cyan); }

    .imitation-table {
        grid-template-columns: 1fr;
    }

    .imitation-col { border-left: none; border-top: 1px dashed rgba(111,106,98,0.3); }
    .imitation-col:first-child { border-top: none; }

    .chapter-qr { width: 48px; height: 48px; top: 0; right: 0; }

    .marginalia--left, .marginalia--right {
        grid-column: 1 / 13;
        justify-self: start;
        margin-top: 1.4rem;
    }
}

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

    .blink-cursor { animation: none; opacity: 1; }
    .hero-title::before, .hero-title::after,
    .intermission-question::before, .intermission-question::after {
        animation: none;
    }

    .hero-particles { display: none; }
}
