/* QERYX — quantumentanglement.io
   THE OBSERVATORY: the page is an instrument, not a brochure.
   True black + Serpent green phosphor. System monospace only — no third-party
   fonts, no external requests of any kind. */

:root {
    --bg: #000000;
    --surface: #0A0A0A;
    --surface-alt: #111111;
    --surface-elev: #1A1A1A;
    --primary: #00AA00;
    --bright: #00FF41;
    --dim: #006600;
    --ghost: #003300;
    --ultra-dim: #001A00;
    --text: #00CC00;
    --text-2: #008800;
    --muted: #004400;
    --border: #1A3A1A;
    --warning: #FF6600;
    --critical: #FF3333;
    --horizon-gold: #FFB300;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--primary); color: var(--bg); }

a { color: var(--bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
    font-family: var(--mono);
    color: var(--bright);
    background: var(--ultra-dim);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.92em;
    word-break: break-all;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--ghost); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

:focus-visible {
    outline: 1px solid var(--bright);
    outline-offset: 3px;
}

/* ===================== BOOT OVERLAY ===================== */

#boot {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg);
    cursor: pointer;
    transition: opacity 700ms ease;
}

#boot.boot-done { opacity: 0; pointer-events: none; }
#boot.boot-removed { display: none; }

#boot-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.boot-glyph {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(40px, 8vw, 96px);
    color: var(--bright);
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.6), 0 0 90px rgba(0, 255, 65, 0.25);
    letter-spacing: 0.04em;
    opacity: 0;
    animation: glyph-in 1100ms ease 200ms forwards;
}

@keyframes glyph-in {
    0% { opacity: 0; filter: blur(14px); transform: translate(-50%, -50%) scale(1.6); }
    60% { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.boot-readout {
    position: absolute;
    left: clamp(16px, 5vw, 64px);
    bottom: clamp(20px, 6vh, 64px);
    max-width: 92vw;
}

#boot-lines {
    font-family: var(--mono);
    font-size: clamp(10px, 1.6vw, 13px);
    line-height: 1.8;
    color: var(--text-2);
    white-space: pre-wrap;
    min-height: 9em;
}

#boot-lines .ok { color: var(--bright); }
#boot-lines .hdr { color: var(--bright); letter-spacing: 2px; }

.boot-skip {
    margin-top: 14px;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-2);
    animation: breathe 2s ease-in-out infinite;
}

/* ===================== FIELD + GRAIN ===================== */

#field {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.18) 2px,
        rgba(0, 0, 0, 0.18) 3px
    );
}

/* ===================== TOP BAR ===================== */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.6) 70%, transparent);
}

.wordmark {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--bright);
    text-shadow: 0 0 18px rgba(0, 255, 65, 0.5);
}
.wordmark:hover { text-decoration: none; }

.chip {
    font-size: 9px;
    letter-spacing: 2px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    color: var(--text-2);
    white-space: nowrap;
}

.chip-preview {
    border-color: var(--primary);
    color: var(--bright);
    animation: breathe 3s ease-in-out infinite;
}

.chip-progress { border-color: var(--warning); color: var(--warning); }

.topnav {
    margin-left: auto;
    display: flex;
    gap: clamp(10px, 2.5vw, 28px);
}

.topnav a {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-2);
}
.topnav a:hover { color: var(--bright); text-decoration: none; }

/* ===================== RAIL ===================== */

.rail {
    position: fixed;
    left: clamp(10px, 1.6vw, 24px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rail a {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rail a:hover { text-decoration: none; }

.rail-dot {
    width: 7px;
    height: 7px;
    border: 1px solid var(--dim);
    transform: rotate(45deg);
    transition: all 250ms ease;
    flex: none;
}

.rail-label {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--muted);
    background: var(--bg);
    padding: 2px 5px;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 250ms ease;
}

.rail a:hover .rail-label { opacity: 1; transform: none; color: var(--text-2); }
.rail a.active .rail-dot {
    background: var(--bright);
    border-color: var(--bright);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.8);
}
.rail a.active .rail-label { opacity: 1; transform: none; color: var(--bright); }

/* ===================== LAYOUT ===================== */

main { position: relative; z-index: 3; }

section {
    position: relative;
    max-width: 1060px;
    margin: 0 auto;
    padding: clamp(80px, 14vh, 160px) clamp(20px, 6vw, 48px);
}

.section-head { margin-bottom: clamp(32px, 6vh, 56px); }

.section-tag {
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--bright);
    border: 1px solid var(--ghost);
    background: rgba(0, 26, 0, 0.45);
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 22px;
}

h2 {
    font-size: clamp(26px, 4.4vw, 44px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--bright);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.lead {
    font-size: clamp(14px, 1.7vw, 16px);
    color: var(--text);
    max-width: 72ch;
}

.lead strong, .subline strong, p strong { color: var(--bright); font-weight: 700; }

/* reveal-on-scroll */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ===================== HERO ===================== */

.hero {
    min-height: 100vh;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 110px;
}

.hero-inner {
    max-width: 1060px;
    width: 100%;
    padding: 0 clamp(4px, 2vw, 16px);
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-2);
    margin-bottom: 28px;
}

.blink-cursor {
    color: var(--bright);
    animation: blink 1.1s steps(1) infinite;
    margin-right: 8px;
}

@keyframes blink { 50% { opacity: 0; } }

h1 {
    font-size: clamp(44px, 9.5vw, 124px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--bright);
    text-shadow: 0 0 40px rgba(0, 255, 65, 0.28);
    margin-bottom: 30px;
}

.subline {
    font-size: clamp(14px, 1.8vw, 17px);
    max-width: 72ch;
    color: var(--text);
    margin-bottom: 36px;
}

.hero-meters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
}

.meter-chip {
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.7);
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 168px;
}

.meter-chip.live {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 170, 0, 0.25);
    animation: breathe-border 3s ease-in-out infinite;
}

@keyframes breathe-border {
    0%, 100% { box-shadow: 0 0 14px rgba(0, 170, 0, 0.18); }
    50% { box-shadow: 0 0 26px rgba(0, 170, 0, 0.4); }
}

.mc-label { font-size: 9px; letter-spacing: 2px; color: var(--text-2); }
.mc-value { font-size: 19px; font-weight: 700; color: var(--bright); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.btn-primary, .btn-ghost {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 26px;
    cursor: pointer;
    transition: all 160ms ease;
    border-radius: 0;
}

.btn-primary {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--bg);
}
.btn-primary:hover {
    background: var(--bright);
    border-color: var(--bright);
    color: var(--bg);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.45);
    text-decoration: none;
}

.btn-ghost {
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--text);
}
.btn-ghost:hover {
    border-color: var(--bright);
    color: var(--bright);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.25);
    text-decoration: none;
}

.scroll-cue {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 56px;
    background: var(--ghost);
    overflow: hidden;
}
.scroll-cue span {
    position: absolute;
    top: -40%;
    left: 0;
    width: 100%;
    height: 40%;
    background: var(--bright);
    animation: cue-fall 1.8s ease-in-out infinite;
}
@keyframes cue-fall { to { top: 110%; } }

/* ===================== BELL LAB ===================== */

.lab-bench {
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.85);
    box-shadow: 0 0 40px rgba(0, 170, 0, 0.07), inset 0 0 80px rgba(0, 26, 0, 0.4);
}

.lab-stage {
    position: relative;
    height: clamp(240px, 36vw, 340px);
    border-bottom: 1px solid var(--border);
    background-image: repeating-linear-gradient(
        0deg, transparent, transparent 3px,
        rgba(0, 20, 0, 0.25) 3px, rgba(0, 20, 0, 0.25) 4px);
}

#lab-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.lab-detector {
    position: absolute;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.lab-detector-a { left: clamp(8px, 4vw, 48px); }
.lab-detector-b { right: clamp(8px, 4vw, 48px); }

.dial {
    width: clamp(58px, 9vw, 84px);
    height: clamp(58px, 9vw, 84px);
    border: 1px solid var(--primary);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, var(--ultra-dim), var(--surface));
    cursor: grab;
    position: relative;
    box-shadow: 0 0 18px rgba(0, 170, 0, 0.25), inset 0 0 14px rgba(0, 0, 0, 0.8);
    touch-action: none;
}
.dial:active { cursor: grabbing; border-color: var(--bright); }
.dial:hover { box-shadow: 0 0 26px rgba(0, 255, 65, 0.35), inset 0 0 14px rgba(0,0,0,0.8); }

.dial-face {
    position: absolute;
    inset: 0;
    transition: transform 80ms linear;
}

.dial-tick {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 38%;
    margin-left: -1px;
    background: var(--bright);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.9);
}

.dial-readout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.dr-name { font-size: 9px; letter-spacing: 2px; color: var(--text-2); }
.dr-angle { font-size: 15px; font-weight: 700; color: var(--bright); }

.lab-console { padding: clamp(16px, 3vw, 28px); display: grid; gap: 18px; }

.lab-source-toggle { display: flex; gap: 0; border: 1px solid var(--border); width: fit-content; max-width: 100%; }

.src-btn {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 11px 18px;
    background: transparent;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    transition: all 160ms ease;
}
.src-btn.active {
    background: var(--ghost);
    color: var(--bright);
    box-shadow: inset 0 0 18px rgba(0, 255, 65, 0.12);
}
.src-btn:not(.active):hover { color: var(--text); }

.lab-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-controls .btn-primary, .lab-controls .btn-ghost { padding: 11px 18px; font-size: 11px; }

.lab-tallies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.tally {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.t-label { font-size: 9px; letter-spacing: 1.5px; color: var(--text-2); }
.t-val { font-size: 16px; font-weight: 700; color: var(--text); }

.lab-gauge {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 20px;
    align-items: center;
}

#lab-gauge-svg { width: 100%; height: auto; }

.gauge-readout { display: flex; flex-direction: column; gap: 6px; }
.g-s { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; color: var(--bright); }
.g-verdict { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-2); }
.g-verdict.violated { color: var(--bright); text-shadow: 0 0 14px rgba(0, 255, 65, 0.6); }
.g-verdict.classical { color: var(--warning); }

.lab-note {
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-2);
    border-left: 2px solid var(--ghost);
    padding-left: 16px;
    max-width: 78ch;
}

/* ===================== VERIFY ===================== */

.verify-box {
    border: 1px solid var(--primary);
    background: rgba(10, 10, 10, 0.85);
    padding: clamp(16px, 3vw, 26px);
    display: grid;
    gap: 16px;
    box-shadow: 0 0 30px rgba(0, 170, 0, 0.12);
}

.vfield { display: grid; gap: 7px; }
.vfield > span { font-size: 11px; letter-spacing: 1.5px; color: var(--text-2); }
.vfield em { color: var(--dim); font-style: normal; }

.vfield input {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 14px;
    width: 100%;
    border-radius: 0;
    caret-color: var(--bright);
}
.vfield input:focus {
    outline: 1px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(0, 170, 0, 0.25);
}
.vfield input::placeholder { color: var(--dim); }

.vbtns { display: flex; flex-wrap: wrap; gap: 12px; }

.verify-result {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: clamp(14px, 2.6vw, 22px);
    margin-top: 18px;
    font-size: 13px;
}

.vsummary {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.vsummary.ok {
    color: var(--bg);
    background: var(--primary);
    border-color: var(--bright);
    text-shadow: none;
}
.vsummary.bad { color: var(--critical); border-color: var(--critical); }
.vsummary.neutral { color: var(--text-2); }

.vrow {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--ultra-dim);
}
.vlabel { color: var(--text-2); flex: none; max-width: 46%; }
.vval { text-align: right; color: var(--text); word-break: break-all; }
.vrow.ok .vval { color: var(--bright); }
.vrow.bad .vval { color: var(--critical); }
.vdim { color: var(--muted); }
.vdivider { height: 1px; background: var(--border); margin: 12px 0; }

.vnote { font-size: 12px; color: var(--text-2); margin-top: 12px; }
.vnote.warn { color: var(--warning); border-left: 2px solid var(--warning); padding-left: 12px; }
.vnote.warn code { word-break: normal; color: var(--warning); background: rgba(255, 102, 0, 0.08); }

span.ok { color: var(--bright); }
span.bad { color: var(--critical); }

.checks-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 24px;
}

.check-col {
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.7);
    padding: 20px;
}
.check-col h3 {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bright);
    margin-bottom: 14px;
}
.check-col ul { list-style: none; display: grid; gap: 12px; }
.check-col li {
    font-size: 13px;
    color: var(--text);
    padding-left: 14px;
    border-left: 1px solid var(--ghost);
}
.ok-col { border-color: var(--ghost); }
.download-col { border-style: dashed; }

.fp { color: var(--bright); }

.curby-watch {
    margin-top: 28px;
    border: 1px dashed var(--warning);
    padding: 22px;
    background: rgba(255, 102, 0, 0.05);
}
.cw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.cw-head h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text); }
.curby-watch > p { font-size: 13px; color: var(--text-2); max-width: 80ch; margin-bottom: 16px; }
.curby-result { margin-top: 14px; font-size: 13px; }
.curby-result .vrow { border-bottom-color: rgba(255, 102, 0, 0.25); }

/* ===================== PIPELINE ===================== */

.tech-steps { display: grid; gap: 0; }

.tech-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
    padding: 22px 0;
    position: relative;
}

.tech-step::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 60px;
    bottom: -8px;
    width: 1px;
    background: linear-gradient(to bottom, var(--primary), var(--ultra-dim));
}
.tech-step:last-child::before { display: none; }

.ts-n {
    width: 56px;
    height: 56px;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--bright);
    background: var(--bg);
    box-shadow: 0 0 18px rgba(0, 170, 0, 0.2);
    flex: none;
}

.tech-step h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--bright);
    margin-bottom: 8px;
}
.tech-step p { font-size: 14px; color: var(--text); max-width: 78ch; }

/* ===================== LADDER ===================== */

.rungs {
    list-style: none;
    display: grid;
    gap: 18px;
    position: relative;
    padding-left: clamp(18px, 3vw, 30px);
}

.rungs::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(to bottom, var(--bright), var(--ghost) 55%, var(--horizon-gold));
}

.rung {
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.8);
    padding: 22px 24px;
    position: relative;
    transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}

.rung::before {
    content: "";
    position: absolute;
    left: calc(-1 * clamp(18px, 3vw, 30px) - 0.5px + 5.5px);
    top: 30px;
    width: 9px;
    height: 9px;
    transform: rotate(45deg) translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--dim);
}

.rung:hover { transform: translateX(4px); }

.rung.shipped { border-color: var(--primary); box-shadow: 0 0 24px rgba(0, 170, 0, 0.12); }
.rung.shipped::before { background: var(--bright); border-color: var(--bright); box-shadow: 0 0 10px rgba(0,255,65,0.8); }
.rung.shipped:hover { box-shadow: 0 0 34px rgba(0, 170, 0, 0.22); }

.rung.progress { border-color: rgba(255, 102, 0, 0.5); }
.rung.progress::before { background: var(--warning); border-color: var(--warning); }
.rung.progress:hover { box-shadow: 0 0 24px rgba(255, 102, 0, 0.15); }

.rung.horizon { border-color: rgba(255, 179, 0, 0.45); }
.rung.horizon::before { background: var(--horizon-gold); border-color: var(--horizon-gold); }
.rung.horizon:hover { box-shadow: 0 0 30px rgba(255, 179, 0, 0.16); }

.rung-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.rung-id {
    font-size: 22px;
    font-weight: 800;
    color: var(--bright);
    min-width: 48px;
}
.rung.progress .rung-id { color: var(--warning); }
.rung.horizon .rung-id { color: var(--horizon-gold); }
.rung.roadmap .rung-id, .rung.research .rung-id { color: var(--text-2); }

.rung-status {
    font-size: 9px;
    letter-spacing: 2px;
    padding: 4px 10px;
    border: 1px solid;
}
.st-shipped { color: var(--bright); border-color: var(--primary); background: var(--ultra-dim); animation: breathe 2.6s ease-in-out infinite; }
.st-progress { color: var(--warning); border-color: var(--warning); }
.st-roadmap { color: var(--text-2); border-color: var(--border); }
.st-research { color: var(--text-2); border-color: var(--border); border-style: dashed; }
.st-horizon { color: var(--horizon-gold); border-color: var(--horizon-gold); }

.rung h3 {
    font-size: 17px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 10px;
}
.rung.shipped h3, .rung.horizon h3 { color: var(--bright); }
.rung.horizon h3 { color: var(--horizon-gold); }

.rung p { font-size: 13.5px; color: var(--text); max-width: 86ch; }
.rung p + p { margin-top: 10px; }
.rung-honesty { color: var(--text-2); border-left: 2px solid var(--ghost); padding-left: 14px; }

/* ===================== FLOOR ===================== */

.prim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.prim {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 200ms ease;
}
.prim:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 170, 0, 0.18);
    transform: translateY(-3px);
}
.prim-name { font-size: 15px; font-weight: 700; color: var(--bright); }
.prim-role { font-size: 11px; letter-spacing: 0.5px; color: var(--text-2); }

.tech-floor {
    border: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.8);
    padding: 22px 24px;
}
.tech-floor h3 {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bright);
    margin-bottom: 14px;
}
.tech-floor ul { list-style: none; display: grid; gap: 12px; }
.tech-floor li {
    font-size: 13.5px;
    color: var(--text);
    padding-left: 14px;
    border-left: 1px solid var(--ghost);
}

/* ===================== JOIN / CARDS ===================== */

.cards { display: grid; gap: 12px; }

.card {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    border: 1px solid var(--primary);
    background: rgba(10, 10, 10, 0.7);
    padding: 20px 22px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 180ms ease;
}
a.card:hover {
    background: var(--ultra-dim);
    color: var(--bright);
    box-shadow: 0 0 26px rgba(0, 170, 0, 0.25);
    transform: translateX(6px);
    text-decoration: none;
}
.card-arrow { color: var(--bright); font-weight: 700; }
.card.pending {
    border: 1px dashed var(--border);
    color: var(--text-2);
    cursor: default;
}
.card.pending .card-arrow { color: var(--text-2); }
.card.pending .chip { margin-left: auto; }

/* ===================== FOOTER ===================== */

footer {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    max-width: 1060px;
    margin: 0 auto;
    padding: 40px clamp(20px, 6vw, 48px) 60px;
    border-top: 1px solid var(--ultra-dim);
    font-size: 12px;
    color: var(--text-2);
}

/* ===================== SHARED ANIM ===================== */

@keyframes breathe {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
    .rail { display: none; }
    .checks-split { grid-template-columns: 1fr; }
    .lab-gauge { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    /* keep the hash nav on phones; drop the chip instead so the bar fits 360px */
    .topbar { padding: 12px 14px; gap: 10px; }
    .wordmark { letter-spacing: 4px; font-size: 16px; }
    .chip-preview { display: none; }
    .topnav { gap: 10px; }
    .topnav a { font-size: 10px; letter-spacing: 1px; }
    h1 { font-size: clamp(38px, 12vw, 64px); }
    .hero-meters { gap: 8px; }
    .meter-chip { min-width: 0; flex: 1 1 45%; }
    .tech-step { grid-template-columns: 40px 1fr; gap: 12px; }
    .ts-n { width: 40px; height: 40px; font-size: 15px; }
    .tech-step::before { left: 19px; top: 46px; }
    .vrow { flex-direction: column; gap: 2px; }
    .vlabel { max-width: 100%; }
    .vval { text-align: left; }
}

/* ===================== REDUCED MOTION ===================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    #boot { display: none; }
}
