/* ==========================================================================
   relativity.quest // Spacetime Instrument Panel
   Sci-fi HUD overlay with phosphor green CRT aesthetic
   ========================================================================== */

:root {
    --c-deep-space: #050A0D;
    --c-relativity-green: #00E5A0;
    --c-phosphor-mist: #C8E6D8;
    --c-dark-chlorophyll: #0A2A1E;
    --c-instrument-panel: #1A3D2E;
    --c-caution-amber: #FFD166;
    --c-starlight: #E8E0F0;
    --c-hull-shadow: #0D1A14;

    --hud-inset: 24px;
    --header-h: 80px;
    --telemetry-h: 60px;

    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --font-sans: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
    --font-tech: 'Share Tech Mono', 'IBM Plex Mono', monospace;
}

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

html, body {
    background-color: var(--c-hull-shadow);
    color: var(--c-phosphor-mist);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.8;
    overflow-x: hidden;
    overscroll-behavior: none;
    min-height: 100vh;
}

body {
    position: relative;
    background:
        radial-gradient(ellipse at 50% 50%, var(--c-deep-space) 0%, var(--c-hull-shadow) 80%),
        var(--c-hull-shadow);
}

/* ==========================================================================
   Deep Space Background Layers
   ========================================================================== */

.space-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.starfield {
    position: absolute;
    inset: 0;
    background: var(--c-deep-space);
    overflow: hidden;
}

.starfield .star {
    position: absolute;
    width: 1px;
    height: 1px;
    background: var(--c-starlight);
    border-radius: 50%;
    opacity: var(--star-opacity, 0.6);
    box-shadow: 0 0 2px rgba(232, 224, 240, 0.4);
    animation: twinkle var(--star-twinkle, 4s) ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: var(--star-opacity, 0.6); }
    50% { opacity: calc(var(--star-opacity, 0.6) * 0.3); }
}

.spacetime-grid {
    position: absolute;
    left: 50%;
    top: 60%;
    width: 220vw;
    height: 110vh;
    transform: translate(-50%, 0) perspective(700px) rotateX(60deg);
    transform-origin: center top;
    background-image:
        linear-gradient(to right, rgba(0, 229, 160, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 160, 0.12) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center top, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center top, black 0%, transparent 75%);
    animation: grid-drift 24s linear infinite;
    opacity: 0.85;
}

@keyframes grid-drift {
    from { background-position: 0 0; }
    to { background-position: 0 60px; }
}

.coordinate-axes {
    position: absolute;
    inset: var(--hud-inset);
    pointer-events: none;
}

.coordinate-axes .axis-h,
.coordinate-axes .axis-v {
    position: absolute;
    background: var(--c-instrument-panel);
}

.coordinate-axes .axis-h {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    opacity: 0.55;
}

.coordinate-axes .axis-v {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    opacity: 0.55;
}

.orbit-paths {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orbit-paths ellipse {
    fill: none;
    stroke: var(--c-caution-amber);
    stroke-width: 0.5;
    opacity: 0.2;
}

.orbit-paths ellipse:nth-child(2) {
    stroke: var(--c-relativity-green);
    opacity: 0.12;
    transform: rotate(28deg);
    transform-origin: 800px 500px;
}

.orbit-paths ellipse:nth-child(3) {
    transform: rotate(-15deg);
    transform-origin: 800px 500px;
}

.orbit-paths ellipse:nth-child(4) {
    stroke: var(--c-relativity-green);
    opacity: 0.08;
    transform: rotate(72deg);
    transform-origin: 800px 500px;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 229, 160, 0.03) 0px,
        rgba(0, 229, 160, 0.03) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 50;
}

/* ==========================================================================
   HUD Frame and Corner Brackets
   ========================================================================== */

.hud-frame {
    position: fixed;
    inset: var(--hud-inset);
    border: 1px solid rgba(0, 229, 160, 0.4);
    pointer-events: none;
    z-index: 40;
    backdrop-filter: contrast(1.05) brightness(0.98);
    -webkit-backdrop-filter: contrast(1.05) brightness(0.98);
}

.corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: rgba(0, 229, 160, 0.7);
    border-style: solid;
    border-width: 0;
}

.corner-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.corner-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.corner-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.corner-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ==========================================================================
   Corner Telemetry Clusters
   ========================================================================== */

.corner-cluster {
    position: fixed;
    z-index: 45;
    font-family: var(--font-tech);
    font-size: 8px;
    line-height: 1.5;
    color: rgba(0, 229, 160, 0.3);
    letter-spacing: 0.06em;
    pointer-events: none;
    text-transform: uppercase;
}

.corner-cluster div {
    white-space: nowrap;
}

.corner-cluster .amber {
    color: var(--c-caution-amber);
    opacity: 0.8;
}

.cluster-tl {
    top: calc(var(--hud-inset) + var(--header-h) + 12px);
    left: calc(var(--hud-inset) + 12px);
    text-align: left;
}

.cluster-tr {
    top: calc(var(--hud-inset) + var(--header-h) + 12px);
    right: calc(var(--hud-inset) + 12px);
    text-align: right;
}

.cluster-bl {
    bottom: calc(var(--hud-inset) + var(--telemetry-h) + 12px);
    left: calc(var(--hud-inset) + 12px);
    text-align: left;
}

.cluster-br {
    bottom: calc(var(--hud-inset) + var(--telemetry-h) + 12px);
    right: calc(var(--hud-inset) + 12px);
    text-align: right;
}

/* ==========================================================================
   Mission Header (Zone 1)
   ========================================================================== */

.mission-header {
    position: fixed;
    top: var(--hud-inset);
    left: var(--hud-inset);
    right: var(--hud-inset);
    height: var(--header-h);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 0 28px;
    border-bottom: 1px solid rgba(26, 61, 46, 0.9);
    background: linear-gradient(
        to bottom,
        rgba(13, 26, 20, 0.85) 0%,
        rgba(13, 26, 20, 0.65) 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 60;
    font-family: var(--font-tech);
    font-size: 11px;
    color: var(--c-relativity-green);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.header-zone {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-zone.left { justify-content: flex-start; }
.header-zone.center { justify-content: center; }
.header-zone.right { justify-content: flex-end; }

.header-bullet {
    width: 8px;
    height: 8px;
    background: var(--c-relativity-green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 229, 160, 0.7);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.header-label {
    color: rgba(0, 229, 160, 0.55);
    font-weight: 400;
}

.header-value {
    color: var(--c-relativity-green);
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' on;
}

/* ==========================================================================
   Primary Display (Zone 2 — scrollable content)
   ========================================================================== */

.primary-display {
    position: relative;
    z-index: 10;
    padding-top: calc(var(--hud-inset) + var(--header-h));
    padding-bottom: calc(var(--hud-inset) + var(--telemetry-h));
    padding-left: calc(var(--hud-inset) + 60px);
    padding-right: calc(var(--hud-inset) + 60px);
    max-width: 100vw;
}

.screen {
    min-height: calc(100vh - var(--hud-inset) * 2 - var(--header-h) - var(--telemetry-h));
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

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

.screen-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-tech);
    font-size: 10px;
    color: rgba(0, 229, 160, 0.55);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 36px;
}

.meta-tag {
    white-space: nowrap;
}

.meta-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(0, 229, 160, 0.4), rgba(0, 229, 160, 0.05));
}

.screen-title {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(28px, 4.6vw, 56px);
    color: var(--c-starlight);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 36px;
}

.screen-body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.8;
    color: var(--c-phosphor-mist);
    max-width: 720px;
    margin: 0 auto 16px;
    text-align: center;
}

/* ==========================================================================
   Screen 1 — Spacetime Curvature / E=mc²
   ========================================================================== */

.equation-stage {
    position: relative;
    padding: 80px 0 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.radial-guides {
    position: absolute;
    width: 520px;
    height: 520px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: rotate-slow 90s linear infinite;
}

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

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(0, 229, 160, 0.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ripple-1 { width: 200px; height: 200px; animation: ripple-out 6s ease-out infinite; animation-delay: 0s; }
.ripple-2 { width: 200px; height: 200px; animation: ripple-out 6s ease-out infinite; animation-delay: 1.5s; }
.ripple-3 { width: 200px; height: 200px; animation: ripple-out 6s ease-out infinite; animation-delay: 3s; }
.ripple-4 { width: 200px; height: 200px; animation: ripple-out 6s ease-out infinite; animation-delay: 4.5s; }

@keyframes ripple-out {
    0% {
        width: 80px; height: 80px;
        opacity: 0.5;
    }
    100% {
        width: 720px; height: 720px;
        opacity: 0;
    }
}

.equation {
    position: relative;
    z-index: 2;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(80px, 14vw, 180px);
    color: var(--c-starlight);
    letter-spacing: 0.04em;
    line-height: 1;
    text-shadow:
        0 0 24px rgba(0, 229, 160, 0.35),
        0 0 60px rgba(0, 229, 160, 0.18);
    display: flex;
    align-items: baseline;
    gap: 0.08em;
}

.equation .eq-eq {
    color: var(--c-relativity-green);
    margin: 0 0.05em;
}

.equation .eq-c {
    position: relative;
}

.equation .eq-c sup {
    font-size: 0.55em;
    color: var(--c-caution-amber);
    vertical-align: super;
    margin-left: 0.04em;
}

.equation-caption {
    position: relative;
    z-index: 2;
    margin-top: 28px;
    font-family: var(--font-tech);
    font-size: 10px;
    letter-spacing: 0.24em;
    color: rgba(0, 229, 160, 0.7);
    text-transform: uppercase;
}

.equation-caption .caption-bracket {
    color: var(--c-caution-amber);
    margin: 0 8px;
}

#screen-1 .screen-body {
    margin-top: 24px;
}

/* ==========================================================================
   Screen 2 — Time Dilation / Clock Pair
   ========================================================================== */

.clock-pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 36px;
    align-items: stretch;
    margin: 24px 0 48px;
}

.clock {
    background: linear-gradient(
        to bottom,
        rgba(10, 42, 30, 0.7),
        rgba(13, 26, 20, 0.7)
    );
    border: 1px solid rgba(26, 61, 46, 0.9);
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
}

.clock::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 229, 160, 0.5),
        transparent
    );
}

.clock-label {
    font-family: var(--font-tech);
    font-size: 10px;
    color: rgba(0, 229, 160, 0.65);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.clock-face {
    position: relative;
    padding: 18px 24px;
    background: rgba(5, 10, 13, 0.65);
    border: 1px solid rgba(26, 61, 46, 0.7);
    overflow: hidden;
    min-width: 220px;
    text-align: center;
}

.clock-face::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(0, 229, 160, 0.04) 2px,
        rgba(0, 229, 160, 0.04) 3px
    );
    pointer-events: none;
}

.clock-digits {
    font-family: var(--font-tech);
    font-size: 38px;
    color: var(--c-relativity-green);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 16px rgba(0, 229, 160, 0.5);
    position: relative;
    z-index: 1;
    transition: transform 600ms ease-out;
    display: inline-block;
}

.clock-digits.stretched {
    transform: scaleX(1.3);
    transform-origin: center;
    color: var(--c-caution-amber);
    text-shadow: 0 0 16px rgba(255, 209, 102, 0.45);
}

.clock-tick {
    width: 6px;
    height: 6px;
    background: var(--c-relativity-green);
    border-radius: 50%;
    margin: 8px auto 0;
    box-shadow: 0 0 8px rgba(0, 229, 160, 0.7);
    animation: tick 1s steps(2) infinite;
    position: relative;
    z-index: 1;
}

.clock-moving .clock-tick {
    background: var(--c-caution-amber);
    box-shadow: 0 0 8px rgba(255, 209, 102, 0.6);
    animation: tick var(--moving-tick, 1.4s) steps(2) infinite;
}

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

.clock-meta {
    font-family: var(--font-tech);
    font-size: 10px;
    color: rgba(200, 230, 216, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.clock-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(0, 229, 160, 0.5);
    font-family: var(--font-tech);
    font-size: 11px;
    letter-spacing: 0.12em;
}

.divider-arrow {
    font-size: 22px;
    color: var(--c-caution-amber);
    opacity: 0.7;
}

.divider-label {
    color: rgba(200, 230, 216, 0.6);
    text-transform: uppercase;
}

/* ==========================================================================
   Screen 3 — Light Cones
   ========================================================================== */

.cone-stage {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
    margin-top: 12px;
}

.cone-diagram {
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.cone-text {
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    padding: 30px 50px 50px;
    background: linear-gradient(
        to bottom,
        rgba(10, 42, 30, 0.4),
        rgba(10, 42, 30, 0.1)
    );
    position: relative;
}

.cone-text .screen-title {
    margin-bottom: 24px;
    font-size: clamp(22px, 3vw, 36px);
    text-align: left;
}

.cone-text .screen-body {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

/* ==========================================================================
   Screen 4 — Gravitational Lensing
   ========================================================================== */

.lensing-stage {
    position: relative;
    margin-top: 16px;
    min-height: 480px;
}

.lens-mass {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    z-index: 2;
}

.lens-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--c-caution-amber);
    border-radius: 50%;
    box-shadow:
        0 0 12px rgba(255, 209, 102, 0.8),
        0 0 32px rgba(255, 209, 102, 0.35);
}

.lens-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 229, 160, 0.3);
    border-radius: 50%;
}

.halo-1 { width: 32px; height: 32px; opacity: 0.8; }
.halo-2 { width: 60px; height: 60px; opacity: 0.5; }
.halo-3 { width: 100px; height: 100px; opacity: 0.25; }

.lens-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    position: relative;
    z-index: 1;
}

.lens-col {
    color: var(--c-phosphor-mist);
    font-size: 14px;
    line-height: 1.85;
    padding: 20px 0;
}

.lens-col p {
    margin-bottom: 16px;
}

.lens-col-left {
    text-align: right;
}

.lens-col-right {
    text-align: left;
}

.lens-shape {
    width: 110px;
    height: 360px;
    /* invisible shape used by shape-outside to bend the text inward toward center */
}

.lens-shape-left {
    float: right;
    shape-outside: polygon(0% 0%, 100% 25%, 100% 75%, 0% 100%);
    -webkit-shape-outside: polygon(0% 0%, 100% 25%, 100% 75%, 0% 100%);
}

.lens-shape-right {
    float: left;
    shape-outside: polygon(0% 25%, 100% 0%, 100% 100%, 0% 75%);
    -webkit-shape-outside: polygon(0% 25%, 100% 0%, 100% 100%, 0% 75%);
}

/* ==========================================================================
   Screen 5 — The Observer
   ========================================================================== */

.observer-stage {
    position: relative;
    padding: 60px 40px;
    text-align: center;
    margin-top: 12px;
}

.observer-crosshair {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 36px;
}

.ch-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(0, 229, 160, 0.55);
    border-radius: 50%;
    animation: ring-pulse 3s ease-in-out infinite;
}

.ch-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--c-caution-amber);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 209, 102, 0.7);
}

@keyframes ring-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.55; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.85; }
}

.ch-tick {
    position: absolute;
    background: var(--c-relativity-green);
}

.ch-tick.ch-top {
    top: 0; left: 50%; width: 1px; height: 14px; transform: translateX(-50%);
}
.ch-tick.ch-bottom {
    bottom: 0; left: 50%; width: 1px; height: 14px; transform: translateX(-50%);
}
.ch-tick.ch-left {
    top: 50%; left: 0; width: 14px; height: 1px; transform: translateY(-50%);
}
.ch-tick.ch-right {
    top: 50%; right: 0; width: 14px; height: 1px; transform: translateY(-50%);
}

.observer-tag {
    font-family: var(--font-tech);
    font-size: 10px;
    letter-spacing: 0.24em;
    color: rgba(0, 229, 160, 0.65);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.observer-title {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(32px, 5vw, 64px);
    color: var(--c-starlight);
    letter-spacing: 0.15em;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 32px;
    text-shadow: 0 0 20px rgba(232, 224, 240, 0.15);
}

.observer-body {
    max-width: 660px;
    margin: 0 auto 18px;
    color: var(--c-phosphor-mist);
}

.observer-signoff {
    margin-top: 36px;
    font-family: var(--font-tech);
    font-size: 11px;
    letter-spacing: 0.32em;
    color: var(--c-caution-amber);
    text-transform: uppercase;
}

.observer-signoff .signoff-bracket {
    color: rgba(0, 229, 160, 0.55);
    margin: 0 14px;
}

/* ==========================================================================
   Telemetry Bar (Zone 3)
   ========================================================================== */

.telemetry-bar {
    position: fixed;
    bottom: var(--hud-inset);
    left: var(--hud-inset);
    right: var(--hud-inset);
    height: var(--telemetry-h);
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr 0.8fr;
    align-items: center;
    padding: 0 28px;
    gap: 28px;
    border-top: 1px solid rgba(26, 61, 46, 0.9);
    background: linear-gradient(
        to top,
        rgba(13, 26, 20, 0.9) 0%,
        rgba(13, 26, 20, 0.65) 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 60;
    font-family: var(--font-tech);
}

.telemetry-cell {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
    font-size: 10px;
    color: var(--c-relativity-green);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cell-label {
    color: rgba(0, 229, 160, 0.55);
    grid-column: 1;
    grid-row: 1;
    white-space: nowrap;
}

.cell-value {
    color: var(--c-relativity-green);
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    text-shadow: 0 0 6px rgba(0, 229, 160, 0.4);
    text-align: right;
}

.cell-value.amber {
    color: var(--c-caution-amber);
    text-shadow: 0 0 6px rgba(255, 209, 102, 0.4);
}

.cell-bar {
    grid-column: 1 / span 2;
    grid-row: 2;
    height: 2px;
    background: rgba(26, 61, 46, 0.8);
    overflow: hidden;
    position: relative;
}

.cell-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: var(--c-relativity-green);
    box-shadow: 0 0 8px rgba(0, 229, 160, 0.6);
    transition: width 120ms linear;
}

.cell-bar-fill.amber-bar {
    background: var(--c-caution-amber);
    box-shadow: 0 0 8px rgba(255, 209, 102, 0.6);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    :root {
        --hud-inset: 14px;
        --header-h: 64px;
        --telemetry-h: 88px;
    }

    .corner-cluster {
        font-size: 7px;
    }

    .mission-header {
        padding: 0 14px;
        font-size: 10px;
    }

    .header-zone.left .header-label,
    .header-zone.right .header-label {
        display: none;
    }

    .primary-display {
        padding-left: calc(var(--hud-inset) + 18px);
        padding-right: calc(var(--hud-inset) + 18px);
    }

    .clock-pair {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .clock-divider {
        flex-direction: row;
    }

    .cone-stage {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cone-text {
        clip-path: none;
        padding: 12px 0 0;
    }

    .lens-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .lens-col-left,
    .lens-col-right {
        text-align: left;
    }

    .lens-shape {
        display: none;
    }

    .lens-mass {
        display: none;
    }

    .telemetry-bar {
        grid-template-columns: 1fr 1fr;
        gap: 10px 18px;
        padding: 10px 14px;
        height: auto;
        min-height: var(--telemetry-h);
    }

    .telemetry-cell:last-child {
        grid-column: 1 / span 2;
    }
}

@media (max-width: 540px) {
    .equation {
        font-size: 80px;
    }

    .clock-face {
        min-width: 0;
        width: 100%;
    }

    .clock-digits {
        font-size: 30px;
    }
}
