:root {
    --bg-color: #010603;
    --bg-deep: #000201;
    --panel-bg: rgba(2, 12, 7, 0.78);
    --panel-bg-strong: rgba(2, 18, 9, 0.92);
    --primary-color: #32f067;
    --primary-soft: #19a84c;
    --primary-dim: rgba(50, 240, 103, 0.32);
    --primary-ghost: rgba(50, 240, 103, 0.08);
    --text-color: #b9c1bd;
    --text-strong: #d5dfda;
    --text-muted: #57745f;
    --border-color: rgba(50, 240, 103, 0.28);
    --border-bright: rgba(50, 240, 103, 0.82);
    --accent-amber: #e2c542;
    --danger: #ff5b6a;
    --offline-red: #ff3d57;
    --hal-red: #ff2344;
    --scanline-color: rgba(0, 0, 0, 0.38);
    --shadow-green: 0 0 22px rgba(50, 240, 103, 0.22);
    --font-display: 'my_font', 'Share Tech Mono', 'IBM Plex Mono', 'Courier New', Courier, monospace;
    --font-terminal: 'Share Tech Mono', 'IBM Plex Mono', 'Courier New', Courier, monospace;
    --ease-crt: cubic-bezier(.19, 1, .22, 1);
}

@font-face {
    font-family: 'my_font';
    src: url('my_font.ttf') format('truetype');
    font-display: swap;
}

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

html {
    min-height: 100%;
    background: var(--bg-color);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 26% 28%, rgba(34, 221, 95, 0.09), transparent 28rem),
        radial-gradient(circle at 76% 30%, rgba(34, 221, 95, 0.035), transparent 24rem),
        linear-gradient(180deg, #020704 0%, #000301 58%, #010603 100%);
    color: var(--text-color);
    font-family: var(--font-terminal);
    overflow-x: hidden;
    line-height: 1.42;
    letter-spacing: 0;
}

button,
a,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    background: transparent;
    color: inherit;
}

a {
    color: inherit;
}

.scanline,
.crt-overlay,
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.retro-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    width: 30px;
    height: 30px;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(var(--cursor-x, -80px), var(--cursor-y, -80px), 0);
    transition: opacity 140ms ease;
}

.retro-cursor.is-visible {
    opacity: 1;
}

.retro-cursor-glow,
.retro-cursor-mark {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.retro-cursor-glow {
    width: 30px;
    height: 30px;
    transform: translate(-9px, -8px) scale(var(--cursor-scale, 1));
    border-radius: 50%;
    background: radial-gradient(circle, rgba(50, 240, 103, 0.2) 0%, rgba(50, 240, 103, 0.09) 36%, transparent 70%);
    filter: blur(2px);
    opacity: 0.58;
    transition: transform 120ms ease, opacity 120ms ease;
}

.retro-cursor-mark {
    width: 16px;
    height: 22px;
    clip-path: polygon(0 0, 0 20px, 5px 15px, 8px 22px, 11px 20px, 8px 13px, 15px 13px);
    background: var(--primary-color);
    filter: drop-shadow(0 0 3px rgba(50, 240, 103, 0.52));
    opacity: 0.96;
}

.retro-cursor.is-active .retro-cursor-glow {
    opacity: 0.64;
}

.retro-cursor.is-active .retro-cursor-mark {
    background: #a8ffb6;
}

@media (hover: hover) and (pointer: fine) {
    html.has-retro-cursor,
    html.has-retro-cursor * {
        cursor: none !important;
    }
}

.scanline {
    z-index: 800;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 4px
        ),
        linear-gradient(180deg, transparent 0%, var(--scanline-color) 50%, transparent 100%);
    background-size: 100% 4px, 100% 140%;
    mix-blend-mode: screen;
    animation: scan-roll 7s linear infinite;
}

.crt-overlay {
    z-index: 801;
    background:
        radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.42) 100%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.025), rgba(0, 255, 65, 0.02), rgba(0, 64, 255, 0.025));
}

.noise-overlay {
    z-index: 802;
    opacity: 0.08;
    background-image:
        linear-gradient(115deg, transparent 0%, rgba(50, 240, 103, 0.12) 47%, transparent 54%),
        repeating-radial-gradient(circle at 20% 30%, rgba(255,255,255,.16) 0 1px, transparent 1px 5px);
    background-size: 180% 180%, 17px 17px;
    animation: noise-shift 900ms steps(2, end) infinite;
}

.power-transition {
    position: fixed;
    inset: 0;
    z-index: 860;
    display: grid;
    place-items: center;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
}

.power-transition::before,
.power-transition::after,
.power-collapse,
.power-dot,
.hal-boot-lens,
.hal-boot-readout {
    position: absolute;
    pointer-events: none;
}

.power-transition::before {
    content: "";
    inset: 0;
    opacity: 0;
    background:
        repeating-linear-gradient(180deg, rgba(50, 240, 103, 0.07) 0 1px, transparent 1px 5px),
        radial-gradient(circle at 50% 50%, rgba(50, 240, 103, 0.22), transparent 26rem),
        rgba(0, 0, 0, 0.94);
}

.power-transition::after {
    content: "";
    inset: 0;
    opacity: 0;
    background: radial-gradient(ellipse at center, transparent 0 18%, rgba(0, 0, 0, 0.62) 64%, rgba(0, 0, 0, 0.96) 100%);
}

.power-collapse {
    inset: 0;
    opacity: 0;
    transform-origin: 50% 50%;
    background:
        linear-gradient(180deg, transparent 0 calc(50% - 1px), rgba(180, 255, 190, 0.95) 50%, transparent calc(50% + 1px) 100%),
        radial-gradient(ellipse at 50% 50%, rgba(50, 240, 103, 0.28), transparent 36%),
        rgba(0, 0, 0, 0.94);
    box-shadow: inset 0 0 120px rgba(50, 240, 103, 0.18);
}

.power-dot {
    top: 50%;
    left: 50%;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
    background: #b8ffc7;
    box-shadow:
        0 0 10px rgba(184, 255, 199, 0.96),
        0 0 34px rgba(50, 240, 103, 0.64),
        0 0 92px rgba(50, 240, 103, 0.26);
}

.hal-boot-lens {
    top: 50%;
    left: 50%;
    width: clamp(116px, 16vw, 184px);
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.58);
    border: 1px solid rgba(255, 96, 87, 0.62);
    background:
        radial-gradient(circle at 50% 49%, #fff3d1 0 4%, #ffb94f 5% 12%, #ff344b 13% 27%, #52030b 28% 46%, rgba(9, 0, 2, 0.92) 47% 100%),
        radial-gradient(circle at 43% 36%, rgba(255, 255, 255, 0.34), transparent 16%);
    box-shadow:
        0 0 20px rgba(255, 35, 68, 0.68),
        0 0 82px rgba(255, 35, 68, 0.24),
        inset 0 0 24px rgba(255, 232, 150, 0.24);
}

.hal-boot-lens::before,
.hal-boot-lens::after {
    content: "";
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    border: 1px solid rgba(255, 197, 66, 0.28);
}

.hal-boot-lens::after {
    inset: -32%;
    border-color: rgba(50, 240, 103, 0.22);
    clip-path: polygon(0 47%, 100% 47%, 100% 53%, 0 53%);
}

.hal-boot-readout {
    top: calc(50% + clamp(80px, 11vw, 126px));
    left: 50%;
    transform: translateX(-50%);
    min-width: 18ch;
    opacity: 0;
    color: rgba(50, 240, 103, 0.78);
    font-size: clamp(0.78rem, 1vw, 0.96rem);
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

body.is-powering-down .power-transition,
body.is-offline .power-transition,
body.is-booting .power-transition {
    opacity: 1;
}

body.is-powering-down .power-transition::before {
    animation: crt-shutdown-field 920ms cubic-bezier(.55, 0, .12, 1) both;
}

body.is-powering-down .power-collapse {
    animation: crt-shutdown-collapse 920ms cubic-bezier(.55, 0, .12, 1) both;
}

body.is-powering-down .power-dot {
    animation: crt-shutdown-dot 920ms cubic-bezier(.55, 0, .12, 1) both;
}

body.is-offline .power-transition {
    background:
        radial-gradient(circle at 50% 50%, rgba(50, 240, 103, 0.06), transparent 9rem),
        rgba(0, 0, 0, 0.82);
}

body.is-offline .power-transition::after {
    opacity: 0.94;
}

body.is-offline .power-dot {
    opacity: 0.62;
    transform: translate(-50%, -50%) scale(0.72);
    animation: offline-center-dot 4.2s ease-in-out infinite;
}

body.is-booting .power-transition {
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 35, 68, 0.16), transparent 17rem),
        radial-gradient(circle at 50% 50%, rgba(50, 240, 103, 0.06), transparent 33rem),
        rgba(0, 0, 0, 0.96);
    animation: hal-boot-field 1280ms var(--ease-crt) both;
}

body.is-booting .power-transition::before {
    opacity: 0.34;
    animation: hal-scan-open 1280ms var(--ease-crt) both;
}

body.is-booting .hal-boot-lens {
    animation: hal-lens-ignite 1280ms var(--ease-crt) both;
}

body.is-booting .hal-boot-readout {
    animation: hal-readout 1280ms steps(7, end) both;
}

body.is-offline .terminal-screen,
body.is-offline .controls,
body.is-powering-down .terminal-screen,
body.is-powering-down .controls {
    opacity: 0.28;
    filter: brightness(0.24) saturate(0.7) contrast(1.25);
}

body.is-booting .terminal-screen,
body.is-booting .controls {
    animation: boot-reillumination 1280ms var(--ease-crt) both;
}

.system-bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    height: 72px;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 0 clamp(24px, 3.8vw, 54px);
    border-top: 1px solid rgba(50, 240, 103, 0.22);
    border-bottom: 1px solid rgba(50, 240, 103, 0.18);
    background: rgba(0, 5, 2, 0.86);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(50, 240, 103, 0.08), 0 0 34px rgba(0, 0, 0, 0.5);
}

body.is-powering-down .system-bar,
body.is-offline .system-bar,
body.is-booting .system-bar {
    z-index: 920;
}

.system-brand {
    color: rgba(50, 240, 103, 0.72);
    text-decoration: none;
    font-size: clamp(0.94rem, 1.15vw, 1.12rem);
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(50, 240, 103, 0.35);
    transition: color 160ms ease;
}

.system-brand:hover,
.system-brand:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.status-chip {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-width: 106px;
    min-height: 37px;
    padding: 7px 14px;
    border: 1px solid rgba(50, 240, 103, 0.17);
    border-radius: 5px;
    color: rgba(50, 240, 103, 0.88);
    background: rgba(2, 22, 10, 0.42);
    box-shadow: inset 0 0 18px rgba(50, 240, 103, 0.045);
    text-transform: uppercase;
    transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.status-label {
    display: inline-block;
    min-width: 6.6ch;
    text-align: left;
}

.status-chip:hover,
.status-chip:focus-visible {
    border-color: var(--border-bright);
    color: var(--primary-color);
    outline: none;
}

.status-chip.is-transitioning {
    pointer-events: none;
}

.status-chip.is-offline {
    border-color: rgba(255, 61, 87, 0.38);
    color: rgba(255, 94, 111, 0.88);
    background: rgba(24, 2, 6, 0.62);
    box-shadow: inset 0 0 18px rgba(255, 61, 87, 0.055);
}

.status-chip.is-offline:hover,
.status-chip.is-offline:focus-visible {
    border-color: rgba(255, 94, 111, 0.78);
    color: #ff92a0;
}

.status-chip.is-booting {
    border-color: rgba(226, 197, 66, 0.46);
    color: rgba(242, 215, 90, 0.94);
    background: rgba(28, 20, 4, 0.6);
}

.status-led,
.mini-led {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 11px rgba(50, 240, 103, 0.92);
    animation: led-pulse 1.6s ease-in-out infinite;
}

.status-chip.is-offline .status-led {
    background: var(--offline-red);
    box-shadow: 0 0 8px rgba(255, 61, 87, 0.7);
    animation: offline-led-pulse 2.8s ease-in-out infinite;
}

.status-chip.is-booting .status-led {
    background: var(--accent-amber);
    box-shadow: 0 0 10px rgba(226, 197, 66, 0.72);
}

.mini-led {
    width: 7px;
    height: 7px;
    margin-left: 7px;
}

.terminal-screen {
    position: relative;
    z-index: 5;
    min-height: calc(100vh - 138px);
    width: min(100%, 1600px);
    margin: 72px auto 66px;
    padding: clamp(66px, 7.4vh, 78px) clamp(22px, 6.4vw, 102px) clamp(36px, 5vh, 58px);
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(410px, 1fr);
    grid-template-areas:
        "intro data"
        "visual data";
    column-gap: clamp(54px, 6vw, 94px);
    row-gap: clamp(22px, 3vh, 42px);
    align-content: center;
}

.terminal-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(50, 240, 103, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 240, 103, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at 44% 48%, black 0%, transparent 67%);
}

@media (min-width: 1101px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .terminal-screen {
        height: calc(100vh - 138px);
        min-height: 0;
    }
}

.left-telemetry {
    position: fixed;
    left: clamp(26px, 2.6vw, 50px);
    top: 23%;
    bottom: 19%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: rgba(50, 240, 103, 0.35);
}

.left-telemetry::before,
.left-telemetry::after {
    content: "";
    display: block;
    width: 5px;
    height: 22px;
    background: rgba(50, 240, 103, 0.62);
    box-shadow: var(--shadow-green);
    animation: rail-lock 2.8s steps(3, end) infinite;
}

.left-telemetry span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(50, 240, 103, 0.42);
}

.intro-stack {
    grid-area: intro;
    align-self: start;
    min-width: 0;
    animation: boot-rise 720ms var(--ease-crt) both;
}

.operator-line,
.section-command {
    color: rgba(50, 240, 103, 0.78);
    font-size: clamp(0.82rem, 1.04vw, 1rem);
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(50, 240, 103, 0.36);
}

.operator-line {
    margin: 0 0 22px;
}

.terminal-cursor {
    animation: caret-blink 900ms steps(2, end) infinite;
}

.mega-title {
    --title-scale-x: 1.34;
    position: relative;
    width: fit-content;
    color: var(--primary-color);
    font-family: var(--font-display);
    font-size: clamp(5.1rem, 9.3vw, 9.4rem);
    line-height: 0.82;
    letter-spacing: 0;
    text-transform: uppercase;
    transform: scaleX(var(--title-scale-x));
    transform-origin: left center;
    filter: drop-shadow(0 0 18px rgba(50, 240, 103, 0.36));
    text-shadow:
        0 0 4px rgba(50, 240, 103, 0.55),
        0 0 18px rgba(50, 240, 103, 0.28),
        4px 0 0 rgba(15, 84, 35, 0.45);
    background:
        repeating-linear-gradient(
            180deg,
            #74ff8d 0 4px,
            #2ddf5a 4px 8px,
            #0d622a 8px 12px
        );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fx-enabled .mega-title {
    animation: title-flicker 2.8s steps(1, end) infinite;
}

.mega-title::before,
.mega-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    -webkit-text-fill-color: rgba(50, 240, 103, 0.5);
}

.fx-enabled .mega-title::before {
    transform: translate(-3px, 0);
    text-shadow: 2px 0 rgba(255, 39, 92, 0.28);
    animation: title-glitch 2.6s steps(1, end) infinite;
}

.fx-enabled .mega-title::after {
    transform: translate(3px, 0);
    text-shadow: -2px 0 rgba(72, 200, 255, 0.18);
    animation: title-glitch 3.1s steps(1, end) infinite reverse;
}

.system-callout {
    margin-top: 19px;
    width: min(100%, 640px);
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 16px;
    border: 1px solid rgba(50, 240, 103, 0.12);
    border-radius: 4px;
    color: #aeb8b2;
    background: rgba(1, 14, 7, 0.54);
    box-shadow: inset 0 0 22px rgba(50, 240, 103, 0.035);
    text-transform: uppercase;
    transition: opacity 250ms ease, transform 250ms ease, border-color 180ms ease;
}

.system-callout span {
    color: var(--primary-color);
}

.system-callout.subtitle-hidden {
    opacity: 0;
    transform: translateY(4px);
}

.interface-grid {
    display: contents;
}

.panel {
    position: relative;
    border: 1px solid var(--border-color);
    background:
        linear-gradient(180deg, rgba(50, 240, 103, 0.045), transparent 36%),
        var(--panel-bg);
    box-shadow:
        inset 0 0 0 1px rgba(50, 240, 103, 0.045),
        0 0 32px rgba(0, 0, 0, 0.55);
    transform: translate3d(calc(var(--tilt-x, 0) * 1px), calc(var(--tilt-y, 0) * 1px), 0);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.panel:focus-visible,
.panel.is-targeted,
.connect-protocol.is-targeted,
.quote-panel.is-targeted {
    outline: none;
    border-color: var(--border-bright);
    box-shadow: inset 0 0 0 1px rgba(50, 240, 103, 0.1);
}

.panel::after,
.quote-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(50, 240, 103, 0.2), transparent);
    transform: translateX(-100%);
}

.corner {
    position: absolute;
    z-index: 4;
    width: 12px;
    height: 12px;
    border-color: var(--border-bright);
    opacity: 0.95;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(50, 240, 103, 0.36));
    animation: corner-pulse 2.6s ease-in-out infinite;
}

.corner-tl {
    top: -2px;
    left: -2px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.corner-tr {
    top: -2px;
    right: -2px;
    border-top: 2px solid;
    border-right: 2px solid;
}

.corner-bl {
    bottom: -2px;
    left: -2px;
    border-bottom: 2px solid;
    border-left: 2px solid;
}

.corner-br {
    right: -2px;
    bottom: -2px;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

.visual-module {
    --visual-corner-color: rgba(96, 255, 132, 0.98);
    --visual-corner-glow-soft: rgba(50, 240, 103, 0.46);
    --visual-corner-glow-strong: rgba(181, 255, 198, 0.74);
    grid-area: visual;
    height: clamp(390px, 50vh, 466px);
    min-height: 390px;
    margin-top: -15px;
    overflow: hidden;
    animation: boot-rise 760ms var(--ease-crt) 120ms both;
}

.visual-module > .corner {
    z-index: 6;
    width: 30px;
    height: 18px;
    border-color: var(--visual-corner-color);
    opacity: 0.96;
    filter:
        drop-shadow(0 0 7px var(--visual-corner-glow-soft))
        drop-shadow(0 0 16px rgba(50, 240, 103, 0.24));
    animation: visual-corner-glow 2.8s ease-in-out infinite;
}

.visual-module > .corner-tl {
    top: 0;
    left: 0;
}

.visual-module > .corner-tr {
    top: 0;
    right: 0;
}

.visual-module > .corner-bl,
.visual-module > .corner-br {
    bottom: 0;
}

.visual-module > .corner-bl {
    left: 0;
}

.visual-module > .corner-br {
    right: 0;
}

.visual-module::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.54;
    mix-blend-mode: screen;
    background-image:
        linear-gradient(rgba(50, 240, 103, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 240, 103, 0.026) 1px, transparent 1px),
        linear-gradient(rgba(50, 240, 103, 0.048) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 240, 103, 0.048) 1px, transparent 1px);
    background-size: 16px 16px, 16px 16px, 64px 64px, 64px 64px;
    mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 86%, transparent 100%);
}

.panel-header {
    position: absolute;
    top: 14px;
    left: 22px;
    z-index: 3;
    color: rgba(50, 240, 103, 0.74);
    font-size: clamp(0.74rem, 0.82vw, 0.86rem);
    text-transform: uppercase;
}

canvas {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    transform-origin: 50% 52%;
    will-change: transform;
    touch-action: manipulation;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.visual-module.is-skull-shaking {
    border-color: rgba(194, 255, 208, 0.82);
}

.visual-module.is-skull-shaking canvas {
    animation: skull-shake-canvas var(--skull-shake-duration, 318ms) cubic-bezier(.2, .9, .2, 1) both;
}

.visual-module.is-skull-armed .panel-header {
    color: rgba(194, 255, 208, 0.86);
}

.visual-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 22px;
    border-top: 1px solid rgba(50, 240, 103, 0.2);
    background: rgba(3, 16, 8, 0.82);
    color: rgba(50, 240, 103, 0.58);
    font-size: clamp(0.72rem, 0.82vw, 0.84rem);
    text-transform: uppercase;
}

.data-module {
    grid-area: data;
    display: flex;
    flex-direction: column;
    gap: clamp(22px, 4.2vh, 42px);
    align-self: center;
    min-width: 0;
    animation: boot-rise 760ms var(--ease-crt) 210ms both;
}

.matrix-panel {
    min-height: 360px;
    padding: clamp(20px, 2.2vw, 28px) clamp(18px, 2vw, 28px) 12px;
}

.section-command {
    margin-bottom: 18px;
}

.retro-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border-top: 1px solid rgba(50, 240, 103, 0.14);
}

.retro-table tr {
    opacity: 0;
    animation: row-print 520ms steps(4, end) calc(420ms + (var(--row-index) * 88ms)) forwards;
}

.retro-table th,
.retro-table td {
    height: 43px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(50, 240, 103, 0.12);
    color: #aeb8b2;
    font-size: clamp(0.78rem, 0.95vw, 0.98rem);
    font-weight: normal;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.retro-table th {
    width: 40%;
    color: #b5beb9;
    border-right: 1px solid rgba(50, 240, 103, 0.12);
}

.retro-table td {
    color: #c2cbc6;
}

.connect-protocol {
    position: relative;
    scroll-margin-top: 100px;
}

.connect-protocol:focus-visible {
    outline: 1px solid var(--border-bright);
    outline-offset: 8px;
}

.actions {
    display: grid;
    grid-template-columns: 1.05fr 1.25fr 0.7fr 1.05fr 1.25fr;
    gap: clamp(12px, 1.3vw, 18px);
}

.choice-btn {
    position: relative;
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 9px 14px;
    border: 1px solid rgba(50, 240, 103, 0.24);
    border-radius: 4px;
    color: #c1cac5;
    background: rgba(0, 12, 6, 0.58);
    text-decoration: none;
    text-transform: uppercase;
    font-size: clamp(0.68rem, 0.78vw, 0.82rem);
    white-space: nowrap;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.choice-btn::before,
.choice-btn::after {
    content: attr(data-glitch);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: inherit;
    pointer-events: none;
    opacity: 0;
    color: var(--primary-color);
    text-shadow: none;
}

.choice-btn::before {
    clip-path: inset(0 0 54% 0);
}

.choice-btn::after {
    clip-path: inset(48% 0 0 0);
    color: rgba(242, 215, 90, 0.88);
}

body.fx-enabled .choice-btn:hover::before,
body.fx-enabled .choice-btn:focus-visible::before,
body.fx-enabled .choice-btn.is-glitching::before {
    opacity: 0.86;
    animation: contact-glitch-top 760ms steps(2, end) infinite;
}

body.fx-enabled .choice-btn:hover::after,
body.fx-enabled .choice-btn:focus-visible::after,
body.fx-enabled .choice-btn.is-glitching::after {
    opacity: 0.74;
    animation: contact-glitch-bottom 760ms steps(2, end) infinite;
}

.choice-btn:hover,
.choice-btn:focus-visible {
    color: var(--primary-color);
    border-color: rgba(50, 240, 103, 0.72);
    background: rgba(6, 28, 12, 0.86);
    outline: none;
}

.choice-btn-primary {
    color: #f2d75a;
    border-color: rgba(226, 197, 66, 0.86);
}

.choice-btn-primary:hover,
.choice-btn-primary:focus-visible {
    color: #ffe16a;
    border-color: #ffe16a;
}

.quote-panel {
    position: relative;
    min-height: clamp(156px, 14.6vh, 174px);
    height: auto;
    display: flex;
    align-items: stretch;
    padding: 0;
    border: 1px solid rgba(50, 240, 103, 0.16);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    background:
        radial-gradient(circle at 10% 50%, rgba(50, 240, 103, 0.07), transparent 34%),
        rgba(1, 12, 6, 0.75);
    color: rgba(50, 240, 103, 0.82);
    text-transform: uppercase;
    overflow: hidden;
    contain: layout paint;
}

.quote-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(50, 240, 103, 0.1), transparent);
    transform: translateX(-100%);
}

.quote-panel.is-decrypting::before,
.quote-panel.is-encrypting::before {
    opacity: 1;
    animation: cipher-sweep 620ms steps(12, end) both;
}

.quote-panel.is-encrypted .quote-text,
.quote-panel.is-encrypted .quote-citation,
.quote-panel.is-encrypted .quote-meta {
    color: rgba(50, 240, 103, 0.5);
}

.quote-panel.is-revealed {
    border-color: rgba(50, 240, 103, 0.28);
}

.quote-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    min-height: inherit;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: clamp(14px, 1.55vw, 18px) clamp(20px, 2.2vw, 28px);
    overflow: visible;
}

.quote-meta,
.quote-citation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: rgba(50, 240, 103, 0.46);
    font-size: clamp(0.56rem, 0.64vw, 0.7rem);
    line-height: 1.35;
    min-width: 0;
    overflow: hidden;
}

.quote-text {
    align-self: center;
    max-width: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
    color: rgba(50, 240, 103, 0.88);
    font-size: clamp(0.82rem, 1.05vw, 1.08rem);
    line-height: 1.48;
    text-shadow: 0 0 13px rgba(50, 240, 103, 0.25);
    overflow-wrap: break-word;
    white-space: pre-line;
}

.quote-citation {
    min-height: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(50, 240, 103, 0.12);
}

.quote-citation span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.quote-citation cite {
    flex: 0 0 auto;
    color: rgba(50, 240, 103, 0.72);
    font-style: normal;
    white-space: nowrap;
}

#quote-work {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-citation a {
    flex: 0 0 auto;
    color: rgba(242, 215, 90, 0.72);
    text-decoration: none;
    transition: color 160ms ease;
}

.quote-citation a:hover,
.quote-citation a:focus-visible {
    color: #ffe16a;
    outline: none;
}

.controls {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 42;
    min-height: 66px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    gap: clamp(18px, 2.2vw, 34px);
    padding: 0 clamp(30px, 2.6vw, 42px);
    border-top: 1px solid rgba(50, 240, 103, 0.18);
    border-bottom: 1px solid rgba(50, 240, 103, 0.12);
    background: rgba(0, 5, 2, 0.88);
    color: rgba(50, 240, 103, 0.42);
    backdrop-filter: blur(14px);
}

.footer-mark {
    min-width: 0;
    justify-self: start;
    color: rgba(50, 240, 103, 0.43);
    font-size: clamp(0.72rem, 0.86vw, 0.9rem);
    text-transform: uppercase;
    white-space: nowrap;
}

.control-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.4vw, 36px);
    justify-self: center;
}

.control-item {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: rgba(50, 240, 103, 0.46);
    font-size: clamp(0.72rem, 0.86vw, 0.9rem);
    text-transform: uppercase;
    transition: color 160ms ease;
}

.control-item:hover,
.control-item:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.key {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border: 1px solid rgba(50, 240, 103, 0.14);
    border-radius: 4px;
    color: rgba(50, 240, 103, 0.55);
    background: rgba(50, 240, 103, 0.04);
}

.system-uptime {
    min-width: 260px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 16px;
    color: rgba(50, 240, 103, 0.46);
    font-size: clamp(0.72rem, 0.86vw, 0.9rem);
    text-transform: uppercase;
}

.terminal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 34px);
    background:
        radial-gradient(circle at 50% 48%, rgba(50, 240, 103, 0.1), transparent 36rem),
        linear-gradient(180deg, rgba(0, 8, 3, 0.86), rgba(0, 2, 1, 0.94));
    backdrop-filter: blur(14px);
}

.terminal-overlay.hidden {
    display: none;
}

.terminal-content {
    position: relative;
    width: min(1080px, 94vw);
    height: min(690px, 82vh);
    min-height: 510px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border-bright);
    background:
        linear-gradient(180deg, rgba(50, 240, 103, 0.1), transparent 18%),
        radial-gradient(circle at 86% 12%, rgba(226, 197, 66, 0.09), transparent 20rem),
        rgba(0, 9, 4, 0.97);
    box-shadow: 0 28px 86px rgba(0, 0, 0, 0.74), inset 0 0 0 1px rgba(50, 240, 103, 0.08);
    animation: terminal-open 260ms var(--ease-crt) both;
}

.terminal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(50, 240, 103, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 240, 103, 0.035) 1px, transparent 1px);
    background-size: 18px 18px;
}

.terminal-content::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background: linear-gradient(180deg, transparent 0%, rgba(50, 240, 103, 0.1) 50%, transparent 100%);
    transform: translateY(-100%);
    animation: terminal-data-sweep 5.6s linear infinite;
}

.terminal-corner {
    position: absolute;
    z-index: 2;
    width: 23px;
    height: 23px;
    pointer-events: none;
    border-color: rgba(194, 255, 208, 0.82);
    animation: terminal-corner-pulse 2.8s ease-in-out infinite;
}

.terminal-corner-tl {
    top: 0;
    left: 0;
    border-top: 2px solid;
    border-left: 2px solid;
}

.terminal-corner-tr {
    top: 0;
    right: 0;
    border-top: 2px solid;
    border-right: 2px solid;
}

.terminal-corner-bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid;
    border-left: 2px solid;
}

.terminal-corner-br {
    right: 0;
    bottom: 0;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

.terminal-header {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 18px 24px 16px;
    border-bottom: 1px solid rgba(50, 240, 103, 0.2);
    background: rgba(1, 14, 7, 0.74);
}

.terminal-title-block {
    min-width: 0;
}

.terminal-kicker {
    display: block;
    margin-bottom: 5px;
    color: rgba(50, 240, 103, 0.52);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.terminal-title {
    color: var(--primary-color);
    font-size: clamp(1.02rem, 1.4vw, 1.35rem);
    text-transform: uppercase;
}

.terminal-status-strip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: rgba(185, 193, 189, 0.68);
    font-size: clamp(0.66rem, 0.78vw, 0.78rem);
    text-transform: uppercase;
    white-space: nowrap;
}

.terminal-status-strip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid rgba(50, 240, 103, 0.14);
    background: rgba(0, 20, 8, 0.42);
    line-height: 1;
}

.terminal-status-strip i {
    display: block;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 8px rgba(50, 240, 103, 0.42);
}

.terminal-close {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(50, 240, 103, 0.18);
    color: rgba(50, 240, 103, 0.72);
    font-size: 0.86rem;
    text-transform: uppercase;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.terminal-close:hover,
.terminal-close:focus-visible {
    color: var(--primary-color);
    border-color: rgba(50, 240, 103, 0.54);
    background: rgba(50, 240, 103, 0.06);
    outline: none;
}

.terminal-body {
    position: relative;
    z-index: 3;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(190px, 235px) minmax(0, 1fr);
}

.terminal-sidecar {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 18px;
    border-right: 1px solid rgba(50, 240, 103, 0.18);
    background:
        linear-gradient(180deg, rgba(50, 240, 103, 0.06), transparent 32%),
        rgba(0, 9, 4, 0.48);
}

.sidecar-section {
    padding: 12px 12px 11px;
    border: 1px solid rgba(50, 240, 103, 0.13);
    background: rgba(0, 17, 7, 0.46);
}

.sidecar-label {
    display: block;
    margin-bottom: 5px;
    color: rgba(50, 240, 103, 0.44);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.sidecar-section strong {
    color: rgba(213, 223, 218, 0.86);
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
}

.terminal-command-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: auto;
}

.terminal-command-grid button {
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid rgba(50, 240, 103, 0.18);
    color: rgba(50, 240, 103, 0.66);
    background: rgba(0, 18, 7, 0.42);
    font-size: 0.7rem;
    text-align: left;
    text-transform: uppercase;
    transition: color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.terminal-command-grid button::before {
    content: "> ";
    color: rgba(226, 197, 66, 0.72);
}

.terminal-command-grid button:hover,
.terminal-command-grid button:focus-visible {
    color: var(--primary-color);
    border-color: rgba(50, 240, 103, 0.52);
    transform: translateX(3px);
    outline: none;
}

.terminal-main {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 18px;
}

.terminal-stream-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 4px 10px;
    color: rgba(50, 240, 103, 0.44);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.cmd-output {
    position: relative;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(50, 240, 103, 0.15);
    background:
        linear-gradient(90deg, rgba(50, 240, 103, 0.05), transparent 20%),
        rgba(0, 5, 2, 0.68);
    color: #b8c2bd;
    font-size: clamp(0.78rem, 0.92vw, 0.94rem);
    text-transform: uppercase;
}

.cmd-output::-webkit-scrollbar {
    width: 8px;
}

.cmd-output::-webkit-scrollbar-thumb {
    background: rgba(50, 240, 103, 0.28);
}

.output-line {
    position: relative;
    margin-bottom: 12px;
    padding: 10px 12px 11px;
    border-left: 2px solid rgba(50, 240, 103, 0.44);
    background: rgba(2, 18, 9, 0.38);
    animation: terminal-line-in 180ms var(--ease-crt) both;
}

.output-line.is-warning {
    border-left-color: rgba(226, 197, 66, 0.72);
}

.output-line.is-danger {
    border-left-color: rgba(255, 91, 106, 0.8);
}

.output-line-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: rgba(50, 240, 103, 0.7);
    font-size: 0.68rem;
}

.output-command {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.output-status {
    color: rgba(226, 197, 66, 0.74);
    white-space: nowrap;
}

.output-body {
    color: rgba(213, 223, 218, 0.86);
    line-height: 1.5;
    white-space: pre-wrap;
}

.output-line.is-danger .output-body {
    color: rgba(255, 180, 188, 0.92);
}

.input-line {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(50, 240, 103, 0.22);
    background: rgba(0, 17, 7, 0.5);
}

.prompt {
    color: var(--primary-color);
    font-size: clamp(0.72rem, 0.86vw, 0.88rem);
    white-space: nowrap;
}

.input-line input[type="text"] {
    width: 100%;
    min-height: 34px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--primary-color);
    caret-color: var(--primary-color);
    text-transform: uppercase;
}

.input-caret {
    width: 9px;
    height: 22px;
    background: rgba(50, 240, 103, 0.7);
    animation: terminal-caret 1.1s steps(1, end) infinite;
}

.terminal-overlay {
    --terminal-accent-rgb: 50, 240, 103;
    --terminal-highlight-rgb: 226, 197, 66;
    --terminal-dark-rgb: 0, 9, 4;
    --terminal-panel-rgb: 1, 14, 7;
    --terminal-accent: rgb(var(--terminal-accent-rgb));
    --terminal-text: rgba(213, 223, 218, 0.88);
    --terminal-muted: rgba(var(--terminal-accent-rgb), 0.52);
    --terminal-border: rgba(var(--terminal-accent-rgb), 0.22);
    --terminal-border-bright: rgba(var(--terminal-accent-rgb), 0.82);
    --terminal-ghost: rgba(var(--terminal-accent-rgb), 0.07);
    background:
        radial-gradient(circle at 50% 48%, rgba(var(--terminal-accent-rgb), 0.12), transparent 36rem),
        linear-gradient(180deg, rgba(0, 8, 3, 0.86), rgba(0, 2, 1, 0.94));
    transition: background 260ms ease;
}

.terminal-overlay[data-terminal-tone="red"] {
    --terminal-accent-rgb: 255, 73, 86;
    --terminal-highlight-rgb: 255, 169, 92;
    --terminal-dark-rgb: 17, 2, 4;
    --terminal-panel-rgb: 24, 3, 6;
}

.terminal-overlay[data-terminal-tone="blue"] {
    --terminal-accent-rgb: 64, 172, 255;
    --terminal-highlight-rgb: 116, 231, 255;
    --terminal-dark-rgb: 1, 7, 18;
    --terminal-panel-rgb: 2, 11, 28;
}

.terminal-overlay .terminal-content {
    border-color: var(--terminal-border-bright);
    background:
        linear-gradient(180deg, rgba(var(--terminal-accent-rgb), 0.1), transparent 18%),
        radial-gradient(circle at 86% 12%, rgba(var(--terminal-highlight-rgb), 0.09), transparent 20rem),
        rgba(var(--terminal-dark-rgb), 0.97);
    box-shadow:
        0 28px 86px rgba(0, 0, 0, 0.74),
        inset 0 0 0 1px rgba(var(--terminal-accent-rgb), 0.08),
        0 0 34px rgba(var(--terminal-accent-rgb), 0.12);
    transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.terminal-overlay .terminal-content::before {
    background-image:
        linear-gradient(rgba(var(--terminal-accent-rgb), 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--terminal-accent-rgb), 0.035) 1px, transparent 1px);
}

.terminal-overlay .terminal-content::after {
    background: linear-gradient(180deg, transparent 0%, rgba(var(--terminal-accent-rgb), 0.1) 50%, transparent 100%);
}

.terminal-overlay .terminal-corner {
    border-color: rgba(var(--terminal-accent-rgb), 0.82);
    filter:
        drop-shadow(0 0 7px rgba(var(--terminal-accent-rgb), 0.48))
        drop-shadow(0 0 18px rgba(var(--terminal-accent-rgb), 0.22));
}

.terminal-overlay .terminal-header {
    border-bottom-color: rgba(var(--terminal-accent-rgb), 0.2);
    background: rgba(var(--terminal-panel-rgb), 0.74);
}

.terminal-overlay .terminal-kicker,
.terminal-overlay .sidecar-label,
.terminal-overlay .terminal-stream-header {
    color: var(--terminal-muted);
}

.terminal-overlay .terminal-title,
.terminal-overlay .prompt,
.terminal-overlay .input-line input[type="text"],
.terminal-overlay .terminal-close:hover,
.terminal-overlay .terminal-close:focus-visible,
.terminal-overlay .terminal-command-grid button:hover,
.terminal-overlay .terminal-command-grid button:focus-visible {
    color: var(--terminal-accent);
}

.terminal-overlay .terminal-status-strip span,
.terminal-overlay .terminal-close,
.terminal-overlay .terminal-command-grid button,
.terminal-overlay .cmd-output,
.terminal-overlay .input-line,
.terminal-overlay .sidecar-section {
    border-color: var(--terminal-border);
}

.terminal-overlay .terminal-status-strip span,
.terminal-overlay .terminal-command-grid button,
.terminal-overlay .input-line,
.terminal-overlay .sidecar-section {
    background: rgba(var(--terminal-panel-rgb), 0.48);
}

.terminal-overlay .terminal-status-strip i,
.terminal-overlay .input-caret {
    background: var(--terminal-accent);
    box-shadow: 0 0 9px rgba(var(--terminal-accent-rgb), 0.48);
}

.terminal-overlay .terminal-sidecar {
    border-right-color: rgba(var(--terminal-accent-rgb), 0.18);
    background:
        linear-gradient(180deg, rgba(var(--terminal-accent-rgb), 0.06), transparent 32%),
        rgba(var(--terminal-dark-rgb), 0.48);
}

.terminal-overlay .terminal-command-grid button {
    color: rgba(var(--terminal-accent-rgb), 0.66);
}

.terminal-overlay .terminal-command-grid button::before,
.terminal-overlay .output-status {
    color: rgba(var(--terminal-highlight-rgb), 0.76);
}

.terminal-overlay .terminal-command-grid button[data-active-tone] {
    box-shadow: inset 2px 0 0 rgba(var(--terminal-accent-rgb), 0.58);
}

.terminal-overlay .cmd-output {
    background:
        linear-gradient(90deg, rgba(var(--terminal-accent-rgb), 0.05), transparent 20%),
        rgba(var(--terminal-dark-rgb), 0.68);
}

.terminal-overlay .cmd-output::-webkit-scrollbar-thumb {
    background: rgba(var(--terminal-accent-rgb), 0.28);
}

.terminal-overlay .output-line {
    background: rgba(var(--terminal-panel-rgb), 0.38);
}

.terminal-overlay .output-line:not(.is-warning):not(.is-danger) {
    border-left-color: rgba(var(--terminal-accent-rgb), 0.48);
}

.terminal-overlay .output-line-head {
    color: rgba(var(--terminal-accent-rgb), 0.72);
}

.terminal-overlay .output-body,
.terminal-overlay .sidecar-section strong {
    color: var(--terminal-text);
}

.terminal-overlay .terminal-close {
    color: rgba(var(--terminal-accent-rgb), 0.72);
}

.terminal-overlay .terminal-close:hover,
.terminal-overlay .terminal-close:focus-visible,
.terminal-overlay .terminal-command-grid button:hover,
.terminal-overlay .terminal-command-grid button:focus-visible {
    border-color: rgba(var(--terminal-accent-rgb), 0.54);
    background: rgba(var(--terminal-accent-rgb), 0.06);
}

.terminal-overlay .input-line input[type="text"] {
    caret-color: var(--terminal-accent);
}

.game-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: rgba(0, 3, 1, 0.9);
    backdrop-filter: blur(7px);
}

.game-overlay.hidden {
    display: none;
}

.game-container {
    position: relative;
    width: min(640px, 90vw);
    aspect-ratio: 4 / 3;
    background: #000;
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 38px rgba(50, 240, 103, 0.25);
}

.game-close {
    position: absolute;
    top: -42px;
    right: 0;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(50, 240, 103, 0.22);
    color: var(--primary-color);
    text-transform: uppercase;
}

.game-close:hover,
.game-close:focus-visible {
    border-color: var(--border-bright);
    outline: none;
}

#game-canvas {
    width: 100%;
    height: 100%;
    cursor: none;
}

.game-instructions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -30px;
    text-align: center;
    color: rgba(50, 240, 103, 0.58);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.game-result {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(2px);
}

.game-result.hidden {
    display: none;
}

.result-content {
    padding: 2rem;
    border: 1px solid var(--border-bright);
    background: #020704;
    text-align: center;
    box-shadow: 0 0 24px rgba(50, 240, 103, 0.2);
}

.result-title {
    margin-bottom: 0.6rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    text-transform: uppercase;
}

.result-subtitle {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.restart-btn {
    min-height: 42px;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--border-bright);
    color: var(--primary-color);
    text-transform: uppercase;
}

.restart-btn:hover,
.restart-btn:focus-visible {
    background: rgba(50, 240, 103, 0.12);
    outline: none;
}

body.fx-muted .scanline,
body.fx-muted .noise-overlay,
body.fx-muted .mega-title::before,
body.fx-muted .mega-title::after,
body.fx-muted .corner,
body.fx-muted .status-led,
body.fx-muted .mini-led,
body.fx-muted .terminal-cursor {
    animation: none;
}

body.fx-muted .noise-overlay {
    opacity: 0.02;
}

body.fx-muted .panel,
body.fx-muted .quote-panel {
    transform: none;
}

@keyframes boot-rise {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes scan-roll {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 4px, 0 140%; }
}

@keyframes noise-shift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
    100% { transform: translate(0, 0); }
}

@keyframes crt-shutdown-field {
    0% { opacity: 0; transform: scaleY(1); }
    8% { opacity: 0.92; transform: scaleY(1.02); }
    42% { opacity: 1; transform: scaleY(0.028); }
    63% { opacity: 0.96; transform: scaleX(0.08) scaleY(0.012); }
    78% { opacity: 0.42; transform: scaleX(0.015) scaleY(0.015); }
    100% { opacity: 0; transform: scaleX(0.01) scaleY(0.01); }
}

@keyframes crt-shutdown-collapse {
    0% {
        opacity: 0;
        transform: scaleX(1) scaleY(1);
        filter: brightness(0.75) blur(0);
    }
    12% {
        opacity: 1;
        transform: scaleX(1) scaleY(1);
        filter: brightness(1.2) blur(0);
    }
    46% {
        opacity: 1;
        transform: scaleX(1) scaleY(0.018);
        filter: brightness(1.8) blur(0.5px);
    }
    68% {
        opacity: 0.92;
        transform: scaleX(0.075) scaleY(0.012);
        filter: brightness(1.45) blur(1px);
    }
    100% {
        opacity: 0;
        transform: scaleX(0.012) scaleY(0.012);
        filter: brightness(0.45) blur(3px);
    }
}

@keyframes crt-shutdown-dot {
    0%, 48% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.18);
    }
    64% {
        opacity: 0.98;
        transform: translate(-50%, -50%) scale(1.06);
    }
    100% {
        opacity: 0.42;
        transform: translate(-50%, -50%) scale(0.62);
    }
}

@keyframes offline-center-dot {
    0%, 100% {
        opacity: 0.46;
        transform: translate(-50%, -50%) scale(0.62);
    }
    50% {
        opacity: 0.72;
        transform: translate(-50%, -50%) scale(0.78);
    }
}

@keyframes hal-boot-field {
    0% { opacity: 1; filter: brightness(0.4); }
    22% { opacity: 1; filter: brightness(1); }
    76% { opacity: 1; filter: brightness(1.2); }
    100% { opacity: 0; filter: brightness(1.45); }
}

@keyframes hal-scan-open {
    0% { opacity: 0; clip-path: inset(50% 0 50% 0); }
    24% { opacity: 0.26; clip-path: inset(48% 0 48% 0); }
    62% { opacity: 0.4; clip-path: inset(0 0 0 0); }
    100% { opacity: 0; clip-path: inset(0 0 0 0); }
}

@keyframes hal-lens-ignite {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.46);
        filter: brightness(0.4) blur(2px);
    }
    24% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8);
        filter: brightness(1.25) blur(0);
    }
    54% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1.12) blur(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.18);
        filter: brightness(1.45) blur(3px);
    }
}

@keyframes hal-readout {
    0%, 18% { opacity: 0; }
    25%, 74% { opacity: 0.78; }
    100% { opacity: 0; }
}

@keyframes boot-reillumination {
    0% { opacity: 0.22; filter: brightness(0.18) saturate(0.55) contrast(1.4); }
    38% { opacity: 0.54; filter: brightness(0.64) saturate(0.9) contrast(1.2); }
    72% { opacity: 1; filter: brightness(1.14) saturate(1.08) contrast(1.04); }
    100% { opacity: 1; filter: none; }
}

@keyframes led-pulse {
    0%, 100% { opacity: 0.72; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes offline-led-pulse {
    0%, 100% { opacity: 0.54; transform: scale(0.88); }
    50% { opacity: 0.86; transform: scale(1); }
}

@keyframes caret-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes title-glitch {
    0%, 68%, 100% { opacity: 0; clip-path: inset(0 0 0 0); }
    69% { opacity: 0.68; clip-path: inset(7% 0 72% 0); transform: translate(-6px, -1px); }
    70% { opacity: 0.28; clip-path: inset(64% 0 8% 0); transform: translate(5px, 1px); }
    71% { opacity: 0.82; clip-path: inset(34% 0 41% 0); transform: translate(-4px, 0); }
    72% { opacity: 0.46; clip-path: inset(18% 0 58% 0); transform: translate(7px, -1px); }
    73% { opacity: 0; clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

@keyframes title-flicker {
    0%, 86%, 100% {
        filter: drop-shadow(0 0 18px rgba(50, 240, 103, 0.36));
        transform: scaleX(var(--title-scale-x)) translateX(0);
    }
    87% {
        filter: drop-shadow(0 0 26px rgba(50, 240, 103, 0.62));
        transform: scaleX(var(--title-scale-x)) translateX(-1px);
    }
    88% {
        filter: drop-shadow(0 0 12px rgba(50, 240, 103, 0.28));
        transform: scaleX(var(--title-scale-x)) translateX(2px);
    }
    89% {
        filter: drop-shadow(0 0 24px rgba(50, 240, 103, 0.56));
        transform: scaleX(var(--title-scale-x)) translateX(0);
    }
}

@keyframes panel-scan {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@keyframes button-scan {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@keyframes contact-glitch-top {
    0% { transform: translate(0, 0); opacity: 0.24; }
    11% { transform: translate(-5px, -1px); opacity: 0.86; }
    22% { transform: translate(4px, 1px); opacity: 0.42; }
    34% { transform: translate(-3px, 0); opacity: 0.9; }
    46% { transform: translate(5px, -1px); opacity: 0.58; }
    58% { transform: translate(-2px, 1px); opacity: 0.82; }
    70%, 100% { transform: translate(0, 0); opacity: 0.24; }
}

@keyframes contact-glitch-bottom {
    0% { transform: translate(0, 0); opacity: 0.2; }
    13% { transform: translate(4px, 1px); opacity: 0.74; }
    24% { transform: translate(-5px, 0); opacity: 0.36; }
    38% { transform: translate(3px, -1px); opacity: 0.78; }
    49% { transform: translate(-4px, 1px); opacity: 0.48; }
    62% { transform: translate(2px, 0); opacity: 0.7; }
    74%, 100% { transform: translate(0, 0); opacity: 0.2; }
}

@keyframes cipher-sweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@keyframes corner-pulse {
    0%, 100% {
        opacity: 0.78;
        filter:
            drop-shadow(0 0 5px rgba(50, 240, 103, 0.38))
            drop-shadow(0 0 12px rgba(50, 240, 103, 0.16));
    }
    50% {
        opacity: 1;
        filter:
            drop-shadow(0 0 8px rgba(50, 240, 103, 0.68))
            drop-shadow(0 0 20px rgba(50, 240, 103, 0.28));
    }
}

@keyframes visual-corner-glow {
    0%, 100% {
        opacity: 0.84;
        filter:
            drop-shadow(0 0 6px var(--visual-corner-glow-soft))
            drop-shadow(0 0 14px rgba(50, 240, 103, 0.18));
    }
    50% {
        opacity: 1;
        filter:
            drop-shadow(0 0 9px var(--visual-corner-glow-strong))
            drop-shadow(0 0 24px rgba(50, 240, 103, 0.34));
    }
}

@keyframes skull-shake-canvas {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    12% {
        transform: translate3d(var(--skull-shake-x-neg, -7px), var(--skull-shake-y-pos, 1.26px), 0) rotate(var(--skull-shake-roll-neg, -1.35deg));
    }
    25% {
        transform: translate3d(var(--skull-shake-x-pos, 5.95px), var(--skull-shake-y-neg, -1.54px), 0) rotate(var(--skull-shake-roll-pos, 1.35deg));
    }
    39% {
        transform: translate3d(var(--skull-shake-x-soft-neg, -3.85px), var(--skull-shake-y-pos, 1.26px), 0) rotate(var(--skull-shake-roll-soft-neg, -0.97deg));
    }
    55% {
        transform: translate3d(var(--skull-shake-x-soft-pos, 2.52px), var(--skull-shake-y-neg, -1.54px), 0) rotate(var(--skull-shake-roll-soft-pos, 0.57deg));
    }
    72% {
        transform: translate3d(var(--skull-shake-x-end-neg, -1.26px), var(--skull-shake-y-soft-pos, 0.56px), 0) rotate(var(--skull-shake-roll-end-neg, -0.3deg));
    }
}

@keyframes terminal-corner-pulse {
    0%, 100% { opacity: 0.58; }
    50% { opacity: 0.95; }
}

@keyframes terminal-data-sweep {
    0% { transform: translateY(-100%); }
    38%, 100% { transform: translateY(100%); }
}

@keyframes terminal-line-in {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes terminal-caret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes rail-lock {
    0%, 100% { transform: translateY(0); opacity: 0.46; }
    50% { transform: translateY(12px); opacity: 1; }
}

@keyframes row-print {
    from {
        opacity: 0;
        transform: translateX(-8px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes terminal-open {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1100px) {
    .system-bar {
        grid-template-columns: 1fr auto;
        height: auto;
        min-height: 72px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .status-chip {
        justify-self: end;
    }

    .terminal-screen {
        margin-top: 88px;
        grid-template-columns: 1fr;
        grid-template-areas:
            "intro"
            "visual"
            "data";
        align-content: start;
        row-gap: 26px;
    }

    .data-module {
        align-self: start;
    }
}

@media (min-width: 900px) and (max-height: 800px) {
    .system-bar {
        height: 56px;
        padding-left: 48px;
        padding-right: 48px;
    }

    .status-chip {
        min-height: 36px;
    }

    .terminal-screen {
        min-height: calc(100vh - 108px);
        margin-top: 56px;
        margin-bottom: 52px;
        padding-top: 34px;
        padding-bottom: 20px;
        column-gap: 76px;
        row-gap: 18px;
    }

    .operator-line {
        margin-bottom: 14px;
    }

    .mega-title {
        font-size: clamp(4.9rem, 8.4vw, 7rem);
    }

    .system-callout {
        min-height: 39px;
        margin-top: 15px;
        padding: 9px 14px;
    }

    .visual-module {
        height: 286px;
        min-height: 286px;
        margin-top: 0;
    }

    .visual-footer {
        padding: 9px 18px;
    }

    .data-module {
        gap: 20px;
    }

    .matrix-panel {
        min-height: 294px;
        padding-top: 20px;
        padding-bottom: 8px;
    }

    .section-command {
        margin-bottom: 14px;
    }

    .retro-table th,
    .retro-table td {
        height: 34px;
        padding-top: 6px;
        padding-bottom: 6px;
        font-size: 0.78rem;
    }

    .choice-btn {
        min-height: 36px;
        padding-top: 7px;
        padding-bottom: 7px;
        font-size: 0.72rem;
    }

    .quote-panel {
        min-height: 124px;
        height: auto;
        padding: 0;
    }

    .quote-shell {
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 6px;
        padding: 12px 24px;
    }

    .quote-text {
        min-height: 0;
        max-height: none;
        line-height: 1.42;
    }

    .controls {
        min-height: 52px;
    }
}

@media (min-width: 1101px) and (max-height: 800px) {
    .terminal-screen {
        height: calc(100vh - 108px);
    }
}

@media (max-width: 760px) {
    .system-bar {
        position: relative;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .status-chip {
        justify-self: end;
    }

    .terminal-screen {
        margin: 0 auto 0;
        padding: 30px 16px 36px;
    }

    .left-telemetry {
        display: none;
    }

    .mega-title {
        font-size: clamp(4.2rem, 19vw, 5.6rem);
    }

    .system-callout {
        font-size: 0.76rem;
    }

    .visual-module {
        height: 320px;
        min-height: 320px;
        margin-top: 0;
    }

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

    .retro-table {
        table-layout: auto;
    }

    .retro-table th,
    .retro-table td {
        height: 40px;
        padding: 8px 9px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

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

    .choice-btn {
        min-height: 42px;
    }

    .quote-panel {
        min-height: 170px;
        height: auto;
    }

    .quote-shell {
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .quote-text {
        min-height: 0;
        max-height: none;
    }

    .quote-meta,
    .quote-citation,
    .quote-citation span {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .quote-citation cite {
        white-space: normal;
    }

    #quote-work {
        white-space: normal;
    }

    .controls {
        position: relative;
        display: flex;
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .footer-mark {
        width: 100%;
        white-space: normal;
    }

    .control-cluster {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .system-uptime {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .terminal-overlay {
        align-items: stretch;
        padding: 10px;
    }

    .terminal-content {
        width: 100%;
        height: calc(100vh - 20px);
        height: calc(100dvh - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        min-height: 0;
    }

    .terminal-header {
        grid-template-columns: 1fr auto;
        min-height: auto;
        padding: 15px;
    }

    .terminal-status-strip {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-wrap: wrap;
        white-space: normal;
    }

    .terminal-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
    }

    .terminal-sidecar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        align-content: start;
        border-right: 0;
        border-bottom: 1px solid rgba(50, 240, 103, 0.18);
    }

    .sidecar-section {
        min-width: 0;
        padding: 8px;
    }

    .sidecar-section strong {
        display: block;
        font-size: 0.66rem;
        overflow-wrap: anywhere;
    }

    .terminal-command-grid {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0;
    }

    .terminal-command-grid button {
        text-align: center;
    }

    .terminal-main {
        min-height: 0;
        padding: 10px;
        overflow: hidden;
    }

    .prompt {
        max-width: 44%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 430px) {
    .operator-line,
    .section-command {
        font-size: 0.76rem;
    }

    .visual-module {
        height: 282px;
        min-height: 282px;
    }

    .visual-footer {
        flex-direction: column;
        gap: 4px;
        padding: 10px 15px;
    }

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

    .terminal-sidecar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
    }

    .terminal-header {
        gap: 8px;
        padding: 10px;
    }

    .terminal-kicker {
        margin-bottom: 3px;
        font-size: 0.6rem;
    }

    .terminal-title {
        font-size: 0.82rem;
    }

    .terminal-close {
        min-height: 30px;
        padding: 5px 8px;
        font-size: 0.72rem;
    }

    .sidecar-section {
        padding: 6px;
    }

    .sidecar-label {
        margin-bottom: 3px;
        font-size: 0.54rem;
    }

    .sidecar-section strong {
        font-size: 0.54rem;
        line-height: 1.35;
    }

    .terminal-command-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .terminal-status-strip span {
        min-height: 24px;
        padding: 3px 7px;
    }

    .terminal-command-grid button {
        min-height: 28px;
        padding: 5px 3px;
        font-size: 0.56rem;
        text-align: center;
    }

    .terminal-command-grid button::before {
        content: "";
    }

    .terminal-stream-header {
        gap: 8px;
        padding-bottom: 8px;
        font-size: 0.58rem;
    }

    .cmd-output {
        padding: 10px;
        font-size: 0.72rem;
    }

    .input-line {
        min-height: 46px;
        margin-top: 8px;
        padding: 6px 8px;
        gap: 7px;
    }

    .prompt {
        max-width: 37%;
        font-size: 0.62rem;
    }

    .input-caret {
        width: 7px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }

    .noise-overlay {
        opacity: 0.02;
    }
}
/* Archive navigation added when 2600th v1 moved beneath the main portfolio. */
.archive-return {
    position: fixed;
    right: clamp(0.75rem, 2vw, 1.5rem);
    bottom: clamp(0.75rem, 2vw, 1.5rem);
    z-index: 9999;
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid #42ff7c;
    background: rgba(2, 7, 4, 0.9);
    color: #42ff7c;
    font: 700 0.75rem/1 'Share Tech Mono', monospace;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 1.25rem rgba(66, 255, 124, 0.18);
    backdrop-filter: blur(0.5rem);
}

.archive-return:hover,
.archive-return:focus-visible {
    background: #42ff7c;
    color: #020704;
}

@media (max-width: 760px) {
    /* Keep the archive handoff in document flow so it cannot cover the console controls or content. */
    .archive-return {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        z-index: 42;
        display: flex;
        width: calc(100% - 2rem);
        min-height: 3rem;
        margin: 0.75rem 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .archive-return > [aria-hidden="true"] {
        flex: none;
    }

    .archive-return__label {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}
