/* ===========================================================
   thefirst.quest — Brutalist Mystery Dungeon
   Palette:
     #0D0D0D Void Black           #1A1A1A Bunker Concrete
     #2A2A2A Slab Outline         #242424 Slab Gray
     #E0E0E0 Chalk Line           #F0F0F0 Chalk White
     #B8B8B8 Concrete Gray        #FF6B35 Torch Orange
     #7B68EE Mystic Violet        #DC2626 Blood Red
     #22C55E Signal Green         #000000 Pure Black
   =========================================================== */

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

:root {
    --void: #0D0D0D;
    --void-pure: #000000;
    --bunker: #1A1A1A;
    --slab-outline: #2A2A2A;
    --slab: #242424;
    --chalk-line: #E0E0E0;
    --chalk-white: #F0F0F0;
    --concrete: #B8B8B8;
    --torch: #FF6B35;
    --mystic: #7B68EE;
    --blood: #DC2626;
    --signal: #22C55E;

    --margin-w: 60px;
    --gutter: 8px;
    --col: 12;
}

html, body {
    background: var(--void);
    color: var(--chalk-white);
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    overflow-y: hidden; /* unlocked by JS after intro */
}

body.scroll-unlocked {
    overflow-y: auto;
}

/* ----------------------------------------------------
   Persistent noise texture overlay
   ---------------------------------------------------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 200px 200px;
    background-position: 0 0;
    will-change: background-position;
}

/* ----------------------------------------------------
   Concrete grid (faint scored lines)
   ---------------------------------------------------- */
.concrete-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(to right, rgba(42,42,42,0.55) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(42,42,42,0.35) 1px, transparent 1px);
    background-size: calc(100vw / 12) 80px;
    background-position: 0 0;
    opacity: 0.55;
    mix-blend-mode: lighten;
}

/* ----------------------------------------------------
   Background question mark glyph field
   ---------------------------------------------------- */
.glyph-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-glyph {
    position: absolute;
    font-family: 'Rubik', system-ui, sans-serif;
    font-weight: 900;
    color: var(--chalk-white);
    opacity: 0.025;
    line-height: 0.9;
    user-select: none;
    transform-origin: center center;
    animation: glyph-rotate 120s linear infinite;
}

.bg-glyph.g1 { top: 8vh;  left: 70vw; font-size: 16rem; animation-duration: 140s; }
.bg-glyph.g2 { top: 110vh; left: 6vw; font-size: 20rem; animation-duration: 160s; animation-direction: reverse; }
.bg-glyph.g3 { top: 230vh; left: 60vw; font-size: 12rem; animation-duration: 110s; }
.bg-glyph.g4 { top: 350vh; left: 14vw; font-size: 18rem; animation-duration: 180s; animation-direction: reverse; }
.bg-glyph.g5 { top: 480vh; left: 65vw; font-size: 8rem;  animation-duration: 100s; }

@keyframes glyph-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ----------------------------------------------------
   "?" navigation toggle (top-left corner)
   ---------------------------------------------------- */
.nav-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    width: 56px;
    height: 56px;
    z-index: 50;
    background: var(--void);
    color: var(--torch);
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    font-size: 2.4rem;
    line-height: 1;
    border: 3px solid var(--chalk-line);
    cursor: pointer;
    transition: color 0.2s linear, background 0.2s linear, transform 0.15s linear, border-color 0.2s linear;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 6px;
}

.nav-toggle::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid var(--chalk-line);
    pointer-events: none;
}

.nav-toggle:hover {
    background: var(--torch);
    color: var(--void);
    border-color: var(--torch);
}

.nav-toggle.is-open {
    background: var(--chalk-white);
    color: var(--void);
    border-color: var(--chalk-white);
}

/* ----------------------------------------------------
   Full-screen overlay menu
   ---------------------------------------------------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(13, 13, 13, 0.96);
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/></svg>");
    background-size: 200px 200px;
    transform: scale(0.02);
    transform-origin: 46px 46px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease-out, opacity 0.2s linear;
}

.menu-overlay.is-open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.menu-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
    width: min(840px, 88vw);
}

.menu-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 26px 22px 22px;
    background: var(--bunker);
    border: 3px solid var(--chalk-line);
    color: var(--chalk-white);
    text-decoration: none;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.18s linear, color 0.18s linear, border-color 0.2s linear, transform 0.15s ease-out;
    opacity: 0;
    transform: translateY(24px);
    position: relative;
}

.menu-overlay.is-open .menu-block {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.is-open .menu-block:nth-child(1) { transition-delay: 0.05s; }
.menu-overlay.is-open .menu-block:nth-child(2) { transition-delay: 0.10s; }
.menu-overlay.is-open .menu-block:nth-child(3) { transition-delay: 0.15s; }
.menu-overlay.is-open .menu-block:nth-child(4) { transition-delay: 0.20s; }
.menu-overlay.is-open .menu-block:nth-child(5) { transition-delay: 0.25s; }
.menu-overlay.is-open .menu-block:nth-child(6) { transition-delay: 0.30s; }
.menu-overlay.is-open .menu-block:nth-child(7) { transition-delay: 0.35s; }

.menu-block:hover {
    background: var(--torch);
    color: var(--void);
    border-color: var(--torch);
}

.menu-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--mystic);
}

.menu-block:hover .menu-num {
    color: var(--void);
}

.menu-label {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.05;
}

/* ----------------------------------------------------
   Quest margin / progress sidebar
   ---------------------------------------------------- */
.quest-margin {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--margin-w);
    height: 100vh;
    z-index: 30;
    pointer-events: none;
    border-right: 1px solid rgba(224, 224, 224, 0.08);
}

.quest-track {
    position: absolute;
    top: 92px;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
}

.quest-track-line {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, var(--chalk-line) 0 6px, transparent 6px 14px);
    background-size: 2px 14px;
    background-repeat: repeat-y;
    opacity: 0.35;
}

.quest-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--torch);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
    transition: height 0.4s ease-out;
}

.quest-markers {
    position: absolute;
    top: -22px;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.qm {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void);
}

.qm .oct {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: var(--void);
    stroke: var(--chalk-line);
    stroke-width: 2;
    transition: stroke 0.25s linear, fill 0.25s linear;
}

.qm-num {
    position: relative;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--chalk-white);
    transition: color 0.25s linear;
}

.qm.is-active .oct {
    stroke: var(--torch);
    fill: var(--torch);
}

.qm.is-active .qm-num {
    color: var(--void);
}

.qm.is-current .oct {
    stroke: var(--torch);
    fill: var(--void);
    filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.6));
}

.qm.is-current .qm-num {
    color: var(--torch);
}

/* ----------------------------------------------------
   Main column (offset by margin)
   ---------------------------------------------------- */
.quest-main {
    position: relative;
    z-index: 3;
    margin-left: var(--margin-w);
    width: calc(100vw - var(--margin-w));
}

/* ----------------------------------------------------
   Chamber base
   ---------------------------------------------------- */
.chamber {
    position: relative;
    min-height: 100vh;
    padding: clamp(60px, 9vh, 120px) clamp(28px, 5vw, 88px);
    overflow: hidden;
}

.chamber-dark   { background: var(--void); }
.chamber-darker { background: var(--bunker); }

.chamber-inner {
    position: relative;
    max-width: 1480px;
    margin: 0 auto;
}

.chamber-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    border-top: 2px solid var(--chalk-line);
    padding-top: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--mystic);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chamber-meta .meta-stamp { color: var(--concrete); }

/* 12-column subgrid: header occupies left 8 cols, aside right 4 cols */
.chamber-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
}

.chamber-head {
    grid-column: 1 / span 7;
    margin-bottom: 28px;
}

.chamber-body {
    grid-column: 1 / span 8;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.chamber-aside {
    grid-column: 9 / span 4;
    position: relative;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--torch);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.chamber-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--chalk-white);
    line-height: 0.9;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    cursor: default;
}

.chamber-title:hover {
    animation: title-jitter 0.15s linear 0s 2;
}

@keyframes title-jitter {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-2px); }
    50%  { transform: translateX(2px); }
    75%  { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

/* ----------------------------------------------------
   Brutalist content panels
   ---------------------------------------------------- */
.panel {
    position: relative;
    background: var(--slab);
    border: 4px solid var(--chalk-line);
    padding: 24px 28px 26px;
    color: var(--concrete);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    margin-top: -20px; /* layered concrete-slab overlap */
    transition: border-color 0.3s linear;
}

.panel:first-child { margin-top: 0; }

.panel:hover {
    border-color: var(--mystic);
}

.panel-double::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 2px solid var(--chalk-line);
    pointer-events: none;
    transition: border-color 0.3s linear;
}

.panel-double:hover::after {
    border-color: var(--mystic);
}

.panel p + p {
    margin-top: 12px;
}

.panel-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--torch);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--torch);
}

.mono-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--mystic);
    background: var(--void);
    padding: 14px 16px;
    border-left: 3px solid var(--mystic);
    white-space: pre-wrap;
}

.dropped-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    color: var(--concrete);
}

.dropped-list li {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(224, 224, 224, 0.18);
}

/* Cipher panel */
.panel-cipher {
    background: var(--void);
    padding: 22px 24px;
    color: var(--chalk-white);
    border-color: var(--chalk-line);
}

.cipher-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.cipher-row span {
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    color: var(--chalk-white);
    text-align: center;
    line-height: 1;
    user-select: none;
}

.cipher-row span:nth-child(1)  { transform: rotate(180deg); }
.cipher-row span:nth-child(2)  { transform: rotate(90deg); }
.cipher-row span:nth-child(3)  { transform: rotate(-30deg); }
.cipher-row span:nth-child(4)  { transform: rotate(45deg); }
.cipher-row span:nth-child(5)  { transform: rotate(-90deg); }
.cipher-row span:nth-child(6)  { transform: rotate(15deg); }
.cipher-row span:nth-child(7)  { transform: rotate(-150deg); }
.cipher-row span:nth-child(8)  { transform: rotate(75deg); }

.cipher-row span.r { color: var(--torch); }
.cipher-row span.x { color: var(--mystic); }

/* ----------------------------------------------------
   Aside / decorative right column
   ---------------------------------------------------- */
.big-glyph {
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    color: var(--chalk-white);
    opacity: 0.08;
    font-size: clamp(8rem, 14vw, 14rem);
    line-height: 0.8;
    letter-spacing: -0.05em;
    margin-top: -12px;
    user-select: none;
}

.big-glyph.alt {
    color: var(--torch);
    opacity: 0.18;
}

.caveat {
    font-family: 'Caveat', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    color: var(--torch);
    text-shadow: 1px 1px 0 var(--void-pure);
    line-height: 1.3;
    transform: rotate(-2deg);
    max-width: 28ch;
}

.caveat-shift {
    transform: rotate(1.5deg) translateX(20px);
    margin-top: 6px;
}

.annotation-rule {
    width: 80%;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        var(--torch) 0 6px,
        transparent 6px 12px
    );
    opacity: 0.5;
}

.chevron-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--torch);
    opacity: 0.35;
    font-size: 1.2rem;
    line-height: 1;
}

.chevron-stack span {
    letter-spacing: 0.5em;
}

/* ----------------------------------------------------
   Diagonal cuts between chambers
   ---------------------------------------------------- */
.diagonal-cut {
    position: absolute;
    left: -10vw;
    right: -10vw;
    bottom: -1px;
    height: 80px;
    pointer-events: none;
    z-index: 4;
}

.diagonal-cut::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--torch);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.cut-a::before {
    clip-path: polygon(0 calc(100% - 2px), 100% calc(40% - 2px), 100% 40%, 0 100%);
}

.cut-b::before {
    clip-path: polygon(0 calc(40% - 2px), 100% calc(100% - 2px), 100% 100%, 0 40%);
}

.cut-a {
    background: linear-gradient(to bottom right,
        transparent 0%, transparent calc(50% - 1px),
        var(--bunker) 50%, var(--bunker) 100%);
    clip-path: polygon(0 100%, 100% 40%, 100% 100%);
}

.cut-b {
    background: linear-gradient(to bottom left,
        transparent 0%, transparent calc(50% - 1px),
        var(--void) 50%, var(--void) 100%);
    clip-path: polygon(0 40%, 100% 100%, 0 100%);
}

/* Chevron pattern under each cut */
.chamber:not(.chamber-final):not(.chamber-intro)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 36px;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.04) 0 6px,
        transparent 6px 14px
    );
    pointer-events: none;
    z-index: 3;
}

/* ----------------------------------------------------
   Reveal on scroll
   ---------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.4s linear, transform 0.2s ease-out;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal.is-visible p:nth-of-type(1) { animation: panel-text 0.4s linear 0.06s both; }
.reveal.is-visible p:nth-of-type(2) { animation: panel-text 0.4s linear 0.12s both; }
.reveal.is-visible p:nth-of-type(3) { animation: panel-text 0.4s linear 0.18s both; }

@keyframes panel-text {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ----------------------------------------------------
   Intro / opening sequence
   ---------------------------------------------------- */
.chamber-intro {
    background: var(--void);
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-stage {
    position: relative;
    width: min(92vw, 1100px);
    text-align: center;
}

.intro-title-top,
.intro-title-bottom {
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    color: var(--chalk-white);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1;
}

.intro-title-top { font-size: clamp(2.4rem, 6vw, 5rem); }
.intro-title-bottom {
    font-size: clamp(2.4rem, 6vw, 5rem);
    margin-top: 16px;
}

.intro-title-top .sp { display: inline-block; width: 0.5em; }

.intro-title-top span,
.intro-title-bottom span {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
}

.intro-title-top.is-revealed span,
.intro-title-bottom.is-revealed span {
    animation: letter-in 0.42s ease-out both;
}

@keyframes letter-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.intro-mark {
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    font-size: clamp(8rem, 18vw, 15rem);
    color: var(--torch);
    line-height: 1;
    margin: 24px 0 24px;
    opacity: 0;
    transform: scale(1);
    transition: opacity 0.6s linear, transform 0.4s ease-out;
}

.intro-mark.is-revealed {
    opacity: 1;
    animation: mark-pulse 3s ease-in-out infinite;
}

.intro-mark.is-leaving {
    animation: mark-descend 0.9s ease-in forwards;
}

@keyframes mark-pulse {
    0%, 100% { transform: scale(1.0); }
    50%      { transform: scale(1.05); }
}

@keyframes mark-descend {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(180px); opacity: 0; }
}

.scroll-prompt {
    margin-top: 24px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--torch);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    opacity: 0;
    transition: opacity 0.4s linear;
}

.scroll-prompt.is-revealed {
    opacity: 1;
}

.scroll-prompt .sp-chevron {
    font-size: 1.2rem;
    animation: chev-pulse 1.6s ease-in-out infinite;
}

@keyframes chev-pulse {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* ----------------------------------------------------
   Final chamber: inverted palette
   ---------------------------------------------------- */
.chamber-final {
    background: var(--chalk-white);
    color: var(--void);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

.chamber-final::before {
    /* override: dark grain on light bg */
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 200px 200px;
    opacity: 0.09;
}

.final-stage {
    position: relative;
    text-align: center;
    z-index: 2;
}

.final-rotor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    color: var(--void);
    opacity: 0.06;
    font-size: clamp(20rem, 40vw, 36rem);
    line-height: 0.9;
    z-index: 1;
    animation: final-rotate 120s linear infinite;
    user-select: none;
}

@keyframes final-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.final-title {
    position: relative;
    z-index: 2;
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 9vw, 7rem);
    color: var(--void);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
}

.final-caveat {
    position: relative;
    z-index: 2;
    margin-top: 32px;
    font-family: 'Caveat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    color: var(--torch);
    transform: rotate(-2deg);
}

.final-meta {
    position: relative;
    z-index: 2;
    margin-top: 42px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--mystic);
    letter-spacing: 0.2em;
}

/* ----------------------------------------------------
   Responsive
   ---------------------------------------------------- */
@media (max-width: 900px) {
    :root { --margin-w: 44px; }

    .chamber-head,
    .chamber-body,
    .chamber-aside {
        grid-column: 1 / -1;
    }

    .chamber-aside {
        padding-left: 0;
        margin-top: 8px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        width: 48px;
        height: 48px;
        font-size: 1.9rem;
    }

    .quest-track { top: 78px; }
}

@media (max-width: 540px) {
    .chamber {
        padding: 60px 18px 80px;
    }

    .panel {
        padding: 20px;
    }

    .cipher-row {
        gap: 6px;
    }

    .cipher-row span {
        font-size: 1.4rem;
    }
}
