/* ringworld.quest — retro-futuristic horizontal scroll megastructure */

:root {
    --orbital-night: #0A0A1E;
    --hull-steel: #2A3040;
    --sunside-gold: #E8C47A;
    --interior-sky: #B8D4E8;
    --habitat-cream: #E8DCD0;
    --viewport-blue: #7A9EB8;
    --engineering-blue: #4A6E8A;
    --terrain-green: #6B8E6B;
    --soil-band: #D4B896;

    --ring-height: 4px;
    --ring-progress: 0;
    --panel-count: 7;

    --font-head: "Chakra Petch", "Space Grotesk", sans-serif;
    --font-body: "Nunito Sans", "Inter", sans-serif;
    --font-mono: "Space Mono", "Roboto Mono", monospace;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--orbital-night);
    color: var(--habitat-cream);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
}

/* ---------- Curvature overlay (top dim gradient) ---------- */
.curvature-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background:
        linear-gradient(to bottom,
            rgba(10, 10, 30, 0.95) 0%,
            rgba(10, 10, 30, 0.55) 4%,
            rgba(10, 10, 30, 0) 8%,
            rgba(10, 10, 30, 0) 92%,
            rgba(10, 10, 30, 0.45) 96%,
            rgba(10, 10, 30, 0.85) 100%);
    mix-blend-mode: multiply;
}

/* ---------- Sun strip (interior daylight line) ---------- */
.sun-strip {
    position: fixed;
    top: 9vh;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right,
        rgba(232, 196, 122, 0) 0%,
        rgba(232, 196, 122, 0.6) 22%,
        rgba(232, 196, 122, 0.6) 78%,
        rgba(232, 196, 122, 0) 100%);
    box-shadow: 0 0 18px rgba(232, 196, 122, 0.35);
    opacity: calc(var(--ring-progress) * 1.1);
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.4s linear;
}

/* ---------- The Ring Band (fixed background element) ---------- */
.ring-band {
    position: fixed;
    left: 0;
    right: 0;
    top: 50%;
    height: var(--ring-height);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
    border-radius: 50% / 12vh;
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(232, 196, 122, 0.18),
        inset 0 0 0 1px rgba(232, 196, 122, 0.08);
    transition: height 0.18s ease-out;
}

.ring-layer {
    position: absolute;
    inset: 0;
}

.ring-outer {
    background:
        linear-gradient(to bottom,
            rgba(232, 196, 122, 0.95) 0%,
            rgba(232, 196, 122, 0.55) 18%,
            rgba(184, 212, 232, 0.18) 50%,
            rgba(232, 196, 122, 0.55) 82%,
            rgba(232, 196, 122, 0.95) 100%);
    opacity: calc(1 - var(--ring-progress) * 0.55);
}

.ring-atmosphere {
    background:
        linear-gradient(to bottom,
            rgba(184, 212, 232, 0) 0%,
            rgba(184, 212, 232, 0.55) 18%,
            rgba(184, 212, 232, 0.85) 35%,
            rgba(212, 184, 150, 0.35) 70%,
            rgba(212, 184, 150, 0) 100%);
    opacity: var(--ring-progress);
}

.ring-terrain {
    background:
        linear-gradient(to bottom,
            transparent 0%,
            transparent 56%,
            rgba(107, 142, 107, 0.55) 60%,
            rgba(107, 142, 107, 0.75) 70%,
            rgba(107, 142, 107, 0.45) 78%,
            transparent 82%);
    opacity: var(--ring-progress);
}

.ring-soil {
    background:
        linear-gradient(to bottom,
            transparent 0%,
            transparent 78%,
            rgba(212, 184, 150, 0.7) 84%,
            rgba(74, 110, 138, 0.85) 96%,
            rgba(74, 110, 138, 0.95) 100%);
    opacity: var(--ring-progress);
}

.ring-grid {
    background-image:
        repeating-linear-gradient(
            to right,
            rgba(74, 110, 138, 0.18) 0,
            rgba(74, 110, 138, 0.18) 1px,
            transparent 1px,
            transparent 80px);
    opacity: calc(var(--ring-progress) * 0.55);
    mix-blend-mode: screen;
}

/* ---------- HUD ---------- */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 22px 36px 18px;
    pointer-events: none;
    border-bottom: 1px solid rgba(232, 220, 208, 0.08);
    background: linear-gradient(to bottom, rgba(10, 10, 30, 0.55), rgba(10, 10, 30, 0));
    backdrop-filter: blur(2px);
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--viewport-blue);
}

.hud-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--engineering-blue);
    color: var(--habitat-cream);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
}

.hud-domain {
    color: var(--habitat-cream);
}

.hud-nav {
    pointer-events: auto;
    display: flex;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid rgba(74, 110, 138, 0.45);
    background: rgba(10, 10, 30, 0.4);
}

.hud-dot {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 28px;
    height: 22px;
    color: var(--viewport-blue);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    position: relative;
    padding: 0;
    transition: color 0.25s ease;
}

.hud-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 14px;
    height: 1px;
    background: currentColor;
    transform: translateX(-50%);
    opacity: 0.35;
    transition: opacity 0.25s ease, width 0.25s ease;
}

.hud-dot:hover {
    color: var(--habitat-cream);
}

.hud-dot.is-active {
    color: var(--sunside-gold);
}

.hud-dot.is-active::after {
    opacity: 1;
    width: 22px;
}

.hud-coords {
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.coord-label {
    color: var(--viewport-blue);
}

.coord-value {
    color: var(--habitat-cream);
    font-size: 12px;
    letter-spacing: 0.08em;
}

/* ---------- Track + Panels ---------- */
.ring-track {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ring-track::-webkit-scrollbar {
    display: none;
}

.panel {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    padding: 12vh 7vw 8vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Eyebrow / common ---------- */
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--viewport-blue);
    padding: 4px 10px;
    border: 1px solid rgba(122, 158, 184, 0.4);
    margin-bottom: 22px;
}

.panel-title {
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.05;
    font-size: clamp(36px, 5.8vw, 72px);
    color: var(--habitat-cream);
    margin-bottom: 24px;
}

/* ---------- Starfield ---------- */
.starfield {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.starfield-far {
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(232, 220, 208, 0.55), transparent 60%),
        radial-gradient(1px 1px at 27% 42%, rgba(184, 212, 232, 0.6), transparent 60%),
        radial-gradient(1px 1px at 41% 12%, rgba(232, 220, 208, 0.45), transparent 60%),
        radial-gradient(1px 1px at 58% 78%, rgba(232, 220, 208, 0.5), transparent 60%),
        radial-gradient(1px 1px at 71% 22%, rgba(184, 212, 232, 0.55), transparent 60%),
        radial-gradient(1px 1px at 85% 64%, rgba(232, 220, 208, 0.4), transparent 60%),
        radial-gradient(1px 1px at 92% 8%, rgba(232, 220, 208, 0.55), transparent 60%),
        radial-gradient(1px 1px at 4% 82%, rgba(184, 212, 232, 0.55), transparent 60%),
        radial-gradient(1px 1px at 33% 88%, rgba(232, 220, 208, 0.35), transparent 60%),
        radial-gradient(1px 1px at 64% 44%, rgba(184, 212, 232, 0.45), transparent 60%);
}

.starfield-near {
    background-image:
        radial-gradient(1.5px 1.5px at 18% 28%, rgba(232, 220, 208, 0.85), transparent 60%),
        radial-gradient(1.5px 1.5px at 47% 58%, rgba(232, 220, 208, 0.7), transparent 60%),
        radial-gradient(1.5px 1.5px at 73% 33%, rgba(232, 220, 208, 0.8), transparent 60%),
        radial-gradient(1.5px 1.5px at 88% 84%, rgba(232, 220, 208, 0.6), transparent 60%);
    opacity: 0.65;
    animation: stars-drift 38s linear infinite;
}

@keyframes stars-drift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-40vw); }
}

/* ---------- PANEL 1: APPROACH ---------- */
.panel-approach {
    background: var(--orbital-night);
}

.approach-stack {
    position: relative;
    z-index: 4;
    margin-top: auto;
    margin-bottom: 14vh;
    max-width: 56vw;
}

.approach-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(40px, 6.4vw, 88px);
    letter-spacing: 0.08em;
    line-height: 1.02;
    text-transform: uppercase;
    color: var(--habitat-cream);
    margin-bottom: 28px;
}

.approach-domain {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--sunside-gold);
    margin-bottom: 14px;
}

.approach-lede {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--habitat-cream);
    max-width: 38em;
    margin-bottom: 38px;
}

.scroll-prompt {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--viewport-blue);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.prompt-line {
    width: 32px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.prompt-arrow {
    width: 56px;
    height: 12px;
    color: var(--sunside-gold);
    animation: arrow-pulse 2.6s ease-in-out infinite;
}

@keyframes arrow-pulse {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50%      { transform: translateX(8px); opacity: 1; }
}

.telemetry {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 200px));
    gap: 16px 28px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.telemetry li {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--engineering-blue);
    padding-left: 10px;
}

.t-key {
    color: var(--viewport-blue);
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.t-val {
    color: var(--habitat-cream);
    font-size: 13px;
    margin-top: 2px;
}

/* ---------- PANEL 2: SCALE ---------- */
.panel-scale {
    background: linear-gradient(180deg, #0A0A1E 0%, #11132A 100%);
}

.scale-grid {
    position: relative;
    z-index: 4;
    flex: 1;
    display: grid;
    grid-template-rows: 1fr 1fr;
    align-items: stretch;
    gap: 8vh;
}

.scale-row-top {
    max-width: 60vw;
}

.scale-prose {
    color: var(--habitat-cream);
    font-size: 16px;
    max-width: 38em;
    line-height: 1.75;
    margin-top: 8px;
}

.scale-row-bottom {
    align-self: end;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    border-top: 1px solid rgba(74, 110, 138, 0.45);
    padding-top: 22px;
}

.figure-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.figure-key {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--viewport-blue);
}

.figure-val {
    font-family: var(--font-mono);
    font-size: clamp(32px, 3.6vw, 52px);
    color: var(--habitat-cream);
    letter-spacing: 0.04em;
    line-height: 1.05;
}

.figure-unit {
    display: block;
    font-size: 12px;
    color: var(--sunside-gold);
    letter-spacing: 0.18em;
    margin-top: 4px;
}

.annotation-scale {
    position: absolute;
    right: 6vw;
    top: 8vh;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--viewport-blue);
    text-transform: uppercase;
}

.anno-bracket {
    width: 14px;
    height: 14px;
    border: 1px solid var(--viewport-blue);
    border-right: 0;
    border-bottom: 0;
}

.anno-line {
    width: 60px;
    height: 1px;
    background: var(--viewport-blue);
}

/* ---------- PANEL 3: INTERIOR ---------- */
.panel-interior {
    background: linear-gradient(180deg, #B8D4E8 0%, #D9E5EF 60%, #E8DCD0 100%);
    color: var(--hull-steel);
}

.panel-interior .eyebrow {
    color: var(--engineering-blue);
    border-color: rgba(74, 110, 138, 0.45);
}

.panel-interior .panel-title {
    color: var(--hull-steel);
}

.interior-row {
    position: relative;
    z-index: 4;
}

.interior-row-top {
    max-width: 60vw;
}

.interior-prose {
    color: var(--hull-steel);
    font-size: 16px;
    line-height: 1.75;
    max-width: 38em;
    margin-top: 6px;
}

.interior-row-bottom {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 56px;
    align-items: end;
    border-top: 1px solid rgba(74, 110, 138, 0.45);
    padding-top: 22px;
}

.spec-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 28px;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(74, 110, 138, 0.35);
    padding-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.spec-key {
    color: var(--engineering-blue);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.spec-val {
    color: var(--hull-steel);
    letter-spacing: 0.06em;
}

.interior-caption {
    color: var(--hull-steel);
    font-size: 14px;
    line-height: 1.7;
    font-style: italic;
}

/* ---------- PANEL 4: CROSS-SECTION ---------- */
.panel-section {
    background: linear-gradient(180deg, #11132A 0%, #1B2238 100%);
    color: var(--habitat-cream);
}

.blueprint-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 48, 64, 0.55) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(42, 48, 64, 0.55) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.18;
    z-index: 1;
}

.section-header {
    position: relative;
    z-index: 4;
    max-width: 56vw;
}

.section-diagram {
    position: relative;
    z-index: 4;
    flex: 1;
    margin-top: 22px;
    border: 1px solid rgba(74, 110, 138, 0.55);
    background: rgba(10, 10, 30, 0.35);
    padding: 28px 32px 36px;
}

.section-diagram::before {
    content: "DRAWING REF · RW-04A · SHEET 1/1";
    position: absolute;
    top: 8px;
    left: 16px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.22em;
    color: var(--viewport-blue);
}

.section-diagram::after {
    content: "SCALE 1 : 1.6 × 10⁶";
    position: absolute;
    top: 8px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.22em;
    color: var(--viewport-blue);
}

.diagram-svg {
    width: 100%;
    height: 56vh;
    max-height: 520px;
    display: block;
}

.diagram-labels {
    list-style: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dlabel {
    position: absolute;
    left: var(--lx);
    top: var(--ly);
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--viewport-blue);
    text-transform: uppercase;
    text-align: center;
    min-width: 160px;
}

.dlabel-id {
    display: inline-block;
    color: var(--sunside-gold);
    margin-right: 6px;
}

.dlabel-name {
    color: var(--habitat-cream);
    font-size: 11px;
    letter-spacing: 0.18em;
}

.dlabel-spec {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    color: var(--viewport-blue);
    letter-spacing: 0.08em;
    text-transform: none;
    line-height: 1.4;
}

/* ---------- PANEL 5: LANDSCAPE ---------- */
.panel-landscape {
    background:
        linear-gradient(180deg, #B8D4E8 0%, #C6D9E5 35%, #D6CDB8 100%);
    color: var(--hull-steel);
    justify-content: flex-start;
}

.panel-landscape .eyebrow {
    color: var(--engineering-blue);
    border-color: rgba(74, 110, 138, 0.45);
}

.panel-landscape .panel-title {
    color: var(--hull-steel);
}

.landscape-frame {
    position: absolute;
    left: 0;
    right: 0;
    top: 38vh;
    bottom: 12vh;
    overflow: hidden;
    z-index: 1;
}

.terrain-curve {
    position: absolute;
    inset: 0;
    border-radius: 50% / 18vh;
    overflow: hidden;
    box-shadow: inset 0 0 60px rgba(74, 110, 138, 0.18);
}

.terrain-strip {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
}

.terrain-sky {
    top: 0; height: 22%;
    background: linear-gradient(180deg, rgba(184, 212, 232, 0.95), rgba(232, 220, 208, 0.55));
}

.terrain-mountain {
    top: 18%; height: 14%;
    background:
        linear-gradient(180deg, rgba(74, 110, 138, 0.65), rgba(74, 110, 138, 0.25));
    clip-path: polygon(
        0 100%, 4% 30%, 9% 65%, 14% 20%, 19% 55%, 25% 8%, 31% 50%, 37% 18%,
        43% 60%, 50% 12%, 56% 50%, 62% 22%, 69% 58%, 75% 14%, 82% 52%,
        88% 24%, 94% 45%, 100% 18%, 100% 100%);
}

.terrain-foothills {
    top: 30%; height: 12%;
    background: linear-gradient(180deg, rgba(107, 142, 107, 0.7), rgba(107, 142, 107, 0.45));
    clip-path: polygon(
        0 100%, 0 60%, 6% 40%, 14% 55%, 22% 38%, 30% 52%, 38% 36%,
        46% 50%, 54% 34%, 62% 48%, 70% 32%, 78% 46%, 86% 30%,
        94% 44%, 100% 36%, 100% 100%);
}

.terrain-plain {
    top: 40%; height: 18%;
    background: linear-gradient(180deg, rgba(107, 142, 107, 0.55), rgba(212, 184, 150, 0.45));
}

.terrain-river {
    top: 55%; height: 5%;
    background: linear-gradient(180deg, rgba(122, 158, 184, 0.95), rgba(74, 110, 138, 0.7));
    box-shadow: 0 0 24px rgba(184, 212, 232, 0.45);
}

.terrain-coast {
    top: 60%; height: 8%;
    background: linear-gradient(180deg, rgba(212, 184, 150, 0.85), rgba(122, 158, 184, 0.6));
}

.terrain-soil {
    top: 67%; height: 33%;
    background: linear-gradient(180deg, rgba(212, 184, 150, 0.95), rgba(74, 110, 138, 0.85));
}

.landscape-header {
    position: relative;
    z-index: 4;
    max-width: 60vw;
}

.landscape-prose {
    color: var(--hull-steel);
    font-size: 16px;
    line-height: 1.75;
    max-width: 38em;
    margin-top: 8px;
}

.landscape-legend {
    position: absolute;
    right: 6vw;
    bottom: 8vh;
    z-index: 4;
    list-style: none;
    display: grid;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(232, 220, 208, 0.7);
    border: 1px solid rgba(74, 110, 138, 0.45);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--hull-steel);
    text-transform: uppercase;
}

.landscape-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-swatch {
    width: 18px;
    height: 8px;
    display: inline-block;
}

.sw-mountain { background: #4A6E8A; }
.sw-plain    { background: #6B8E6B; }
.sw-river    { background: #7A9EB8; }
.sw-coast    { background: #D4B896; }

/* ---------- PANEL 6: FAR SIDE ---------- */
.panel-farside {
    background:
        radial-gradient(ellipse at 50% 50%, #C8DCEC 0%, #B0C8DC 60%, #8FA8C0 100%);
    color: var(--hull-steel);
    overflow: hidden;
    justify-content: flex-end;
}

.panel-farside .eyebrow {
    color: var(--engineering-blue);
    border-color: rgba(74, 110, 138, 0.45);
}

.panel-farside .panel-title {
    color: var(--hull-steel);
}

.farside-mirror {
    position: absolute;
    top: 12vh;
    left: 7vw;
    right: 7vw;
    z-index: 2;
    transform: scaleY(-1);
    opacity: 0.15;
    pointer-events: none;
    color: var(--hull-steel);
    max-width: 60vw;
}

.farside-mirror .panel-title {
    margin-bottom: 16px;
}

.farside-mirror .farside-prose {
    font-size: 16px;
    line-height: 1.7;
    max-width: 38em;
}

.farside-content {
    position: relative;
    z-index: 4;
    max-width: 60vw;
    margin-bottom: 4vh;
}

.farside-prose {
    color: var(--hull-steel);
    font-size: 16px;
    line-height: 1.75;
    max-width: 38em;
    margin-top: 6px;
}

.farside-secondary {
    margin-top: 18px;
    color: var(--hull-steel);
    font-size: 14px;
    line-height: 1.7;
    max-width: 38em;
    font-style: italic;
    opacity: 0.82;
}

/* ---------- PANEL 7: CONTINUATION ---------- */
.panel-continuation {
    background: linear-gradient(180deg, #1B2238 0%, #0A0A1E 70%, #050510 100%);
}

.continuation-stack {
    position: relative;
    z-index: 4;
    margin-top: auto;
    margin-bottom: 12vh;
    max-width: 60vw;
}

.continuation-prose {
    color: var(--habitat-cream);
    font-size: 16px;
    line-height: 1.75;
    max-width: 38em;
    margin-bottom: 32px;
}

.loop-button {
    appearance: none;
    background: transparent;
    border: 1px solid var(--sunside-gold);
    color: var(--sunside-gold);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 14px 22px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.loop-button:hover {
    background: rgba(232, 196, 122, 0.12);
    transform: translateX(-4px);
}

.loop-arrow {
    width: 44px;
    height: 12px;
    color: currentColor;
}

.continuation-coda {
    margin-top: 30px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--viewport-blue);
    text-transform: uppercase;
}

/* ---------- Rim footer (panel readout) ---------- */
.rim-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 36px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--viewport-blue);
    border-top: 1px solid rgba(232, 220, 208, 0.08);
    background: linear-gradient(to top, rgba(10, 10, 30, 0.55), rgba(10, 10, 30, 0));
    pointer-events: none;
}

.rim-tick {
    color: var(--engineering-blue);
}

.rim-label {
    color: var(--habitat-cream);
}

/* ---------- Responsive nudges ---------- */
@media (max-width: 900px) {
    .approach-stack,
    .scale-row-top,
    .interior-row-top,
    .section-header,
    .landscape-header,
    .farside-content,
    .continuation-stack {
        max-width: 86vw;
    }

    .scale-row-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .interior-row-bottom {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .telemetry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landscape-legend {
        right: 6vw;
        bottom: 6vh;
        font-size: 9px;
    }

    .hud-coords { display: none; }
    .hud { grid-template-columns: 1fr auto; padding: 16px 20px; }
    .panel { padding: 12vh 6vw 9vh; }
}
