/* ============================================================
   xity.dev — Glassmorphic HUD Cockpit
   Palette: #12141a, #1a1d25, #1e2130, #4da6ff, #00d4aa,
            #ffa726, #e8e4dc, #4a4e58
   Type:    Nunito (display), Inter (body), JetBrains Mono (code/HUD)
   ============================================================ */

:root {
    --chrome-dark: #12141a;
    --chrome-mid: #1a1d25;
    --chrome-up: #1e2130;
    --frost: rgba(255, 255, 255, 0.08);
    --frost-strong: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(255, 255, 255, 0.15);
    --border-soft: rgba(255, 255, 255, 0.08);
    --star-blue: #4da6ff;
    --signal-cyan: #00d4aa;
    --alert-amber: #ffa726;
    --warm-chrome: #e8e4dc;
    --dim-steel: #4a4e58;

    --font-display: "Nunito", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --radius: 12px;
    --radius-lg: 18px;
    --radius-sm: 8px;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    background: var(--chrome-dark);
    color: var(--warm-chrome);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    font-feature-settings: 'cv01' 1, 'cv02' 1;
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(1100px 700px at 78% 12%, rgba(77, 166, 255, 0.10), transparent 60%),
        radial-gradient(900px 600px at 12% 88%, rgba(0, 212, 170, 0.08), transparent 60%),
        linear-gradient(135deg, #1a1d25 0%, #12141a 50%, #1e2130 100%);
    background-attachment: fixed;
    position: relative;
}

/* ============================================================
   Star field — fixed background layer
   ============================================================ */
.starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.starfield .star {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--star-blue);
    box-shadow: 0 0 6px var(--star-blue), 0 0 14px rgba(77, 166, 255, 0.25);
    opacity: 0.55;
}

.starfield .star.lg {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 10px var(--star-blue), 0 0 22px rgba(77, 166, 255, 0.35);
}

.starfield .star.cyan {
    background: var(--signal-cyan);
    box-shadow: 0 0 6px var(--signal-cyan), 0 0 14px rgba(0, 212, 170, 0.3);
}

.starfield .star.amber {
    background: var(--alert-amber);
    box-shadow: 0 0 6px var(--alert-amber), 0 0 14px rgba(255, 167, 38, 0.3);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.starfield .star.tw {
    animation: twinkle 4s ease-in-out infinite;
}

/* Constellation watermark */
.constellation {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
}

.constellation-lines line {
    stroke-dasharray: 4 6;
    animation: drift 30s linear infinite;
}

@keyframes drift {
    to { stroke-dashoffset: -120; }
}

/* ============================================================
   Glass Panel system
   ============================================================ */
.glass-panel {
    background: var(--frost);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    isolation: isolate;
    transition: transform 300ms cubic-bezier(.2, .7, .2, 1),
                box-shadow 300ms cubic-bezier(.2, .7, .2, 1),
                border-color 300ms ease;
}

.glass-panel[data-blur="low"] {
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.glass-panel[data-blur="med"] {
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.glass-panel[data-blur="high"] {
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 38px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(77, 166, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(77, 166, 255, 0.35);
}

/* ============================================================
   Cockpit / main scroll container
   ============================================================ */
.cockpit {
    position: relative;
    z-index: 1;
    padding: 0 clamp(1rem, 4vw, 4rem);
    padding-left: clamp(3.5rem, 6vw, 6rem);
    padding-bottom: 96px;
}

.section {
    min-height: 100vh;
    padding: clamp(4rem, 9vh, 8rem) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    margin-bottom: clamp(1.6rem, 3vh, 2.6rem);
    max-width: 880px;
}

.section-index {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--star-blue);
    letter-spacing: 0.18em;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0.55rem;
    background: rgba(77, 166, 255, 0.08);
    border: 1px solid rgba(77, 166, 255, 0.25);
    border-radius: 4px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    color: var(--warm-chrome);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0.4rem 0 0.6rem;
}

.section-sub {
    color: var(--dim-steel);
    font-size: 1.02rem;
    max-width: 60ch;
}

/* ============================================================
   BRIDGE / Hero
   ============================================================ */
.section-bridge {
    min-height: 100vh;
}

.hud-grid-hero {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: clamp(0.8rem, 1.4vw, 1.4rem);
    align-items: stretch;
}

.panel-bridge {
    padding: clamp(2rem, 4vw, 3.4rem);
    min-height: 56vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.2rem;
    overflow: hidden;
}

.panel-bridge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    pointer-events: none;
    background: radial-gradient(420px 200px at 80% 0%, rgba(77, 166, 255, 0.18), transparent 60%);
    z-index: -1;
}

.panel-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--dim-steel);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
}

.meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--star-blue);
    box-shadow: 0 0 8px var(--star-blue);
    animation: twinkle 2.4s ease-in-out infinite;
}

.meta-dot-cyan {
    background: var(--signal-cyan);
    box-shadow: 0 0 8px var(--signal-cyan);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--warm-chrome);
    text-shadow: 0 0 22px rgba(77, 166, 255, 0.18);
}

.hero-dot {
    color: var(--star-blue);
    text-shadow: 0 0 18px var(--star-blue);
}

.hero-tagline {
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    color: var(--warm-chrome);
    max-width: 56ch;
    opacity: 0.85;
}

.hero-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.control {
    --c: var(--warm-chrome);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c);
    border: 1px solid var(--border-glow);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 300ms ease,
                background 300ms ease,
                border-color 300ms ease,
                box-shadow 300ms ease,
                color 300ms ease;
}

.control:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.control-primary {
    --c: var(--chrome-dark);
    background: linear-gradient(135deg, var(--star-blue), var(--signal-cyan));
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.control-primary:hover {
    box-shadow: 0 8px 24px rgba(77, 166, 255, 0.35), 0 0 18px rgba(0, 212, 170, 0.25);
    color: var(--chrome-dark);
}

.control-ghost:hover {
    border-color: var(--star-blue);
    color: var(--star-blue);
}

.hero-coordinates {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--dim-steel);
    letter-spacing: 0.12em;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-soft);
    width: 100%;
}

.hero-coordinates span {
    color: var(--dim-steel);
}

.hero-coordinates span span {
    color: var(--star-blue);
}

/* Instrument side panels */
.panel-instrument {
    padding: 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 56vh;
}

.panel-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--star-blue);
    align-self: flex-start;
    padding: 0.2rem 0.5rem;
    background: rgba(77, 166, 255, 0.08);
    border: 1px solid rgba(77, 166, 255, 0.22);
    border-radius: 4px;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--warm-chrome);
    margin-top: 0.2rem;
}

.readout {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.readout li {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}

.readout-key {
    color: var(--dim-steel);
    letter-spacing: 0.1em;
}

.readout-val {
    color: var(--signal-cyan);
}

.readout-note {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--dim-steel);
    letter-spacing: 0.1em;
}

/* Mini star map */
.mini-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-top: 0.4rem;
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)) ,
        repeating-linear-gradient(0deg, transparent 0 24px, rgba(255, 255, 255, 0.03) 24px 25px),
        repeating-linear-gradient(90deg, transparent 0 24px, rgba(255, 255, 255, 0.03) 24px 25px);
    overflow: hidden;
}

.map-star {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--star-blue);
    box-shadow: 0 0 8px var(--star-blue);
    transform: translate(-50%, -50%);
}

.map-star-active {
    width: 10px;
    height: 10px;
    background: var(--signal-cyan);
    box-shadow: 0 0 12px var(--signal-cyan), 0 0 22px rgba(0, 212, 170, 0.4);
    animation: twinkle 2s ease-in-out infinite;
}

/* ============================================================
   SYSTEMS section
   ============================================================ */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.system-card {
    padding: 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.system-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--star-blue);
    background: rgba(77, 166, 255, 0.08);
    border: 1px solid rgba(77, 166, 255, 0.22);
}

.system-card h3 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--warm-chrome);
}

.system-card p {
    color: var(--warm-chrome);
    opacity: 0.78;
    font-size: 0.95rem;
}

.snippet {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--signal-cyan);
    background: rgba(0, 0, 0, 0.35);
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    display: block;
    margin-top: auto;
}

/* ============================================================
   LAYERS section
   ============================================================ */
.layers-stack {
    display: grid;
    gap: 0.9rem;
    perspective: 1200px;
}

.layer-card {
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transform-style: preserve-3d;
}

.layer-card[data-depth="1"] { backdrop-filter: blur(8px) saturate(140%); -webkit-backdrop-filter: blur(8px) saturate(140%); margin-left: 0%; opacity: 1; }
.layer-card[data-depth="2"] { backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); margin-left: 4%; opacity: 0.97; }
.layer-card[data-depth="3"] { backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); margin-left: 8%; opacity: 0.94; }
.layer-card[data-depth="4"] { backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); margin-left: 12%; opacity: 0.91; }
.layer-card[data-depth="5"] { backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%); margin-left: 16%; opacity: 0.88; }
.layer-card[data-depth="6"] { backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%); margin-left: 20%; opacity: 0.85; }

.layer-meta {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-shrink: 0;
    min-width: 220px;
}

.layer-num {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--star-blue);
    letter-spacing: 0.02em;
}

.layer-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--warm-chrome);
    font-size: 1rem;
}

.layer-card p {
    color: var(--warm-chrome);
    opacity: 0.78;
    font-size: 0.92rem;
    flex: 1;
}

/* ============================================================
   TELEMETRY section
   ============================================================ */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.telemetry-card {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.t-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    color: var(--dim-steel);
    text-transform: uppercase;
}

.t-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--star-blue);
    letter-spacing: -0.01em;
    line-height: 1;
}

.t-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.t-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--star-blue), var(--signal-cyan));
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(77, 166, 255, 0.5);
    transition: width 1.6s cubic-bezier(.2, .7, .2, 1);
}

.t-bar.live span {
    width: var(--w);
}

.t-foot {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--dim-steel);
}

.waveform-panel {
    padding: 1.2rem 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.waveform {
    width: 100%;
    height: 140px;
    display: block;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-soft);
}

.waveform-foot {
    display: flex;
    gap: 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--dim-steel);
    letter-spacing: 0.12em;
}

/* ============================================================
   DISPATCH section
   ============================================================ */
.dispatch-list {
    display: grid;
    gap: 0.8rem;
}

.dispatch-card {
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dispatch-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.dispatch-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--star-blue);
    letter-spacing: 0.1em;
}

.dispatch-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    border: 1px solid;
}

.tag-ok { color: var(--signal-cyan); border-color: rgba(0, 212, 170, 0.4); background: rgba(0, 212, 170, 0.06); }
.tag-warn { color: var(--alert-amber); border-color: rgba(255, 167, 38, 0.4); background: rgba(255, 167, 38, 0.06); }
.tag-info { color: var(--star-blue); border-color: rgba(77, 166, 255, 0.4); background: rgba(77, 166, 255, 0.06); }

.dispatch-region {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--dim-steel);
    letter-spacing: 0.1em;
    margin-left: auto;
}

.dispatch-msg {
    color: var(--warm-chrome);
    opacity: 0.85;
    font-size: 0.95rem;
}

/* ============================================================
   MANIFEST section
   ============================================================ */
.manifest-wrap {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.2rem;
    align-items: stretch;
}

.manifest-card {
    padding: 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.manifest-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--warm-chrome);
    font-weight: 700;
}

.manifest-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.manifest-list li {
    display: flex;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--warm-chrome);
    font-size: 0.96rem;
    transition: transform 300ms ease, border-color 300ms ease;
}

.manifest-list li:hover {
    transform: translateX(4px);
    border-color: rgba(77, 166, 255, 0.3);
}

.m-num {
    font-family: var(--font-mono);
    color: var(--star-blue);
    flex-shrink: 0;
    min-width: 2.4ch;
}

.manifest-cta p {
    color: var(--warm-chrome);
    opacity: 0.82;
    font-size: 0.95rem;
}

.cta-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.cta-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--dim-steel);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cta-form input {
    padding: 0.8rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--warm-chrome);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 300ms ease, background 300ms ease;
}

.cta-form input::placeholder {
    color: var(--dim-steel);
}

.cta-form input:hover {
    border-color: rgba(77, 166, 255, 0.45);
}

.cta-status {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--signal-cyan);
    min-height: 1.2em;
}

/* ============================================================
   Navigation Rail (left edge)
   ============================================================ */
.nav-rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 40px;
    width: 56px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.nav-stars {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 1.2rem 0.6rem;
    background: rgba(18, 20, 26, 0.55);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--border-glow);
    border-radius: 999px;
    margin-left: 0.6rem;
}

.nav-star {
    --size: 10px;
    width: var(--size);
    height: var(--size);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    transition: transform 300ms ease;
}

.nav-star .star-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dim-steel);
    box-shadow: 0 0 0 rgba(77, 166, 255, 0);
    transition: background 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}

.nav-star::before {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--warm-chrome);
    background: rgba(18, 20, 26, 0.85);
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.nav-star:hover::before {
    opacity: 1;
}

.nav-star:hover .star-dot {
    background: var(--star-blue);
    box-shadow: 0 0 10px var(--star-blue);
    transform: scale(1.3);
}

.nav-star.active .star-dot {
    background: var(--signal-cyan);
    box-shadow: 0 0 14px var(--signal-cyan), 0 0 26px rgba(0, 212, 170, 0.4);
    animation: twinkle 2s ease-in-out infinite;
}

/* ============================================================
   Status Bar Footer
   ============================================================ */
.status-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    z-index: 60;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid var(--border-glow);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.2rem;
    padding: 0 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    background: rgba(18, 20, 26, 0.7);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.status-bar:hover {
    transform: none;
}

.status-key {
    color: var(--dim-steel);
    margin-right: 0.4rem;
}

.status-val {
    color: var(--star-blue);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-center {
    overflow: hidden;
    white-space: nowrap;
    color: var(--warm-chrome);
    opacity: 0.8;
}

.status-marquee {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 38s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.status-spinner {
    display: inline-block;
    color: var(--signal-cyan);
    margin-left: 0.4rem;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Reveal animations on scroll
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms cubic-bezier(.2, .7, .2, 1),
                transform 700ms cubic-bezier(.2, .7, .2, 1);
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
    .hud-grid-hero {
        grid-template-columns: 1fr;
    }

    .panel-instrument {
        min-height: auto;
    }

    .manifest-wrap {
        grid-template-columns: 1fr;
    }

    .layer-card[data-depth] {
        margin-left: 0;
    }

    .layer-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .layer-meta {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .nav-rail {
        display: none;
    }

    .cockpit {
        padding-left: clamp(1rem, 4vw, 2rem);
    }

    .status-bar {
        font-size: 0.7rem;
        padding: 0 0.7rem;
        gap: 0.6rem;
    }

    .hero-coordinates {
        gap: 0.7rem;
        font-size: 0.7rem;
    }
}

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