:root {
    color-scheme: dark;
    --space: #090d13;
    --ink: #f3efe9;
    --muted: #c1c9cf;
    --amber: #ffba78;
    --line: #b6c4d43b;
    --mono: "IBM Plex Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--space);
    color: var(--ink);
    font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
    isolation: isolate;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
h1:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
.wrap { width: min(100% - 12vw, 1472px); margin-inline: auto; }

.scene, .scene canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.scene {
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at 75% 45%, #202e43, #080e18 57%, #06090e);
}
.scene.has-art {
    background: var(--space) url("relay-station.webp") 70% center / cover no-repeat;
}
#scene-effects { position: absolute; z-index: 1; }
.scene::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    background: linear-gradient(90deg, #090d13 0%, #090d13ed 23%, #090d1390 44%, transparent 76%),
        linear-gradient(0deg, #090d13 0%, #090d13a8 13%, transparent 35%),
        linear-gradient(180deg, #090d1396, transparent 20%);
}
.scene canvas { z-index: 3; opacity: .46; }
.gate {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 12%;
    width: min(43vw, 650px);
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translateY(-50%) rotate(-24deg) scaleX(.77);
    border: clamp(12px, 2.4vw, 36px) solid #334956;
    box-shadow: 0 0 84px #6aa9ee6e, inset 0 0 38px #72d6ffc9, 0 0 0 2px #bde5ff80;
    background: radial-gradient(ellipse, #060d19 27%, #102e4c 66%, #4c9fca 83%);
    animation: pulse 6s ease-in-out infinite alternate;
}
.gate::after {
    content: "";
    position: absolute;
    inset: -10%;
    border: 5px dashed #cda278;
    border-radius: inherit;
    opacity: .56;
}
.has-art .gate { display: none; }
@keyframes pulse { to { filter: brightness(.75); } }

.masthead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 32px;
    min-height: 88px;
    border-bottom: 1px solid var(--line);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 720;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .88rem;
}
.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    color: var(--amber);
}
.brand-mark::before, .brand-mark::after {
    content: "";
    position: absolute;
    border: 1px solid currentColor;
    border-radius: 50%;
    transform: rotate(-35deg);
    width: 13px;
    height: 28px;
}
.brand-mark::after { transform: rotate(55deg); }
nav { display: flex; flex-wrap: wrap; gap: 2px clamp(13px, 3.4vw, 48px); }
nav a {
    padding-block: 9px;
    color: var(--muted);
    border-bottom: 1px solid transparent;
    font: 600 .75rem/1.4 var(--mono);
    text-transform: uppercase;
    letter-spacing: .11em;
}
nav a:hover, nav a[aria-current] { color: var(--amber); }
nav a[aria-current] { border-color: var(--amber); }

main {
    display: grid;
    flex: 1;
    align-items: center;
    padding-block: clamp(46px, 9vh, 132px);
}
.panel { max-width: 700px; animation: appear .24s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }
.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 21px;
    color: var(--amber);
    font: 600 .75rem/1.5 var(--mono);
    letter-spacing: .18em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 25px; height: 1px; background: currentColor; }
h1 {
    margin: 0;
    font-size: clamp(3rem, 7.1vw, 7.4rem);
    line-height: .96;
    letter-spacing: -.077em;
    font-weight: 680;
    text-wrap: balance;
}
h1 em { display: block; color: var(--amber); font-style: normal; }
.panel:not([data-page="home"]) h1 { font-size: clamp(2.7rem, 5.2vw, 5.7rem); }
.description {
    margin: 26px 0 0;
    max-width: 46ch;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.4vw, 1.19rem);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 32px; }
.action {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    background: #111923bc;
    padding: 11px 16px;
    font-size: .88rem;
    font-weight: 670;
}
.action:first-child { border-color: var(--amber); background: var(--amber); color: #20170f; }
.action:hover { border-color: #ffe2c8; }
.action:first-child:hover { background: #ffe2c8; }
.details {
    list-style: none;
    margin: 23px 0 0;
    padding: 0;
    max-width: 470px;
    background: #090d1360;
}
.details li { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.details span { color: var(--muted); font-size: .91rem; }

footer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 24px;
    border-top: 1px solid var(--line);
}
.copyright {
    margin-inline-start: auto;
    padding-bottom: 20px;
    color: #a4afba;
    font-size: .75rem;
    white-space: nowrap;
}
.stats { display: flex; flex-wrap: wrap; gap: 14px clamp(22px, 6vw, 90px); padding: 16px 0 20px; margin: 0; }
.stats dt {
    color: var(--muted);
    font: .68rem/1.4 var(--mono);
    letter-spacing: .11em;
    text-transform: uppercase;
}
.stats dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 650; }

@media (max-width: 700px) {
    .wrap { width: calc(100% - 36px); }
    .masthead { align-items: flex-start; flex-direction: column; padding: 15px 0 9px; gap: 7px; }
    nav { width: 100%; gap: 2px 6px; justify-content: space-between; }
    .scene { height: 80svh; }
    .scene.has-art { background-size: auto 76%; background-position: 70% 0; }
    .scene::before {
        background: linear-gradient(0deg, #090d13 8%, #090d13ed 29%, #090d1388 54%, transparent 79%),
            linear-gradient(180deg, #090d13c9, transparent 29%);
    }
    .gate { width: 72vw; right: 8%; top: 36%; }
    main { align-items: end; padding-block: clamp(96px, 20vh, 165px) 36px; }
    .eyebrow { font-size: .68rem; margin-bottom: 14px; }
    .description { margin-top: 18px; }
    .actions { margin-top: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .panel, .gate { animation: none; }
}


.scene:not(.has-art)::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: -14%;
    bottom: -66vw;
    width: 90vw;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 42% 3%, #c88851bb, transparent 26%),
        radial-gradient(ellipse at 16% 14%, #6c84989c, transparent 37%),
        radial-gradient(ellipse at 35% 12%, #314351, #101820 39%, #090e15 66%);
    box-shadow: 0 -2px 6px #9acae9a6, 0 -12px 58px #4686b35e;
}
@media (max-width: 700px) {
    .scene:not(.has-art)::after { right: -45%; bottom: -89vw; width: 143vw; }
}


.terminal {
    --terminal-cyan: #7ce6ff;
    --terminal-edge: #6bdfff80;
    position: relative;
    isolation: isolate;
    width: min(475px, 100%);
    padding: 27px clamp(22px, 3.5vw, 37px) 29px;
    border: 1px solid var(--terminal-edge);
    border-radius: 32px;
    color: #effaff;
    background:
        radial-gradient(ellipse at 104% 82%, #16769a70, transparent 53%),
        radial-gradient(ellipse at -8% 30%, #17658966, transparent 49%),
        linear-gradient(145deg, #123851f5, #0b243bf5 54%, #133e58f5);
    box-shadow: 0 24px 70px #000a, 0 0 30px #24aeed2b, inset 0 0 20px #49c5ff2b;
}
.terminal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(ellipse 32px 85px at 0% 40%, #4fd9ffd0, transparent),
        radial-gradient(ellipse 47px 105px at 100% 73%, #67deffd9, transparent);
    opacity: .68;
    animation: terminal-glow 7s ease-in-out infinite alternate;
}
@keyframes terminal-glow {
    from { opacity: .45; }
    to { opacity: .82; }
}
@media (prefers-reduced-motion: reduce) {
    .terminal::before { animation: none; }
}
.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b6e4f6;
    font: 600 .68rem/1.35 var(--mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.terminal-port {
    width: 5px;
    height: 5px;
    flex: none;
    margin-inline-end: 1px;
    border-radius: 50%;
    background: var(--terminal-cyan);
    box-shadow: 0 0 9px var(--terminal-cyan);
}
.panel.auth-panel:not([data-page="home"]) h1 {
    display: grid;
    place-items: center;
    position: relative;
    isolation: isolate;
    min-height: 83px;
    margin: 8px 0 0;
    padding: 10px 0;
    color: #f0fbff;
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    letter-spacing: -.05em;
    text-align: center;
    text-shadow: 0 0 19px #61d9ff6b;
}
.terminal h1::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 6px 6% 3px;
    border: 1px solid #6fdbfa57;
    border-right-color: #54d4fd12;
    border-left-color: #54d4fd12;
    border-radius: 50%;
    background: radial-gradient(ellipse, #30b5e129, transparent 69%);
    pointer-events: none;
}
.auth-form { display: grid; gap: 13px; margin-top: 20px; }
.auth-form label { display: grid; gap: 4px; font-size: .88rem; }
.auth-form input {
    width: 100%;
    padding: 9px 10px;
    color: var(--ink);
    background: #081c33e8;
    border: 1px solid #72cef455;
    border-radius: 10px;
    font: inherit;
}
.auth-form input:focus-visible { outline: 2px solid var(--terminal-cyan); }
.auth-password-field { display: grid; gap: 4px; }
.auth-password-control { position: relative; }
.auth-password-control input { padding-inline-end: 48px; }
.password-toggle {
    position: absolute;
    inset: 3px 3px 3px auto;
    width: 40px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.password-toggle:hover, .password-toggle:focus-visible { color: var(--amber); }
.password-toggle:focus-visible { outline: 2px solid var(--amber); }
.password-toggle span {
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 70% 12%;
    display: grid;
    place-items: center;
    transform: rotate(45deg);
}
.password-toggle span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.password-toggle.is-visible span::after {
    content: "";
    position: absolute;
    height: 20px;
    width: 1.5px;
    background: currentColor;
}
.auth-form .auth-remember { display: flex; align-items: center; gap: 8px; width: fit-content; }
.auth-remember input { width: auto; margin: 0; accent-color: var(--amber); }
.auth-submit {
    justify-content: center;
    margin-top: 2px;
    color: #eefaff;
    background: linear-gradient(105deg, #0b3763, #176482);
    border-color: #74ddff80;
    border-radius: 12px;
    cursor: pointer;
}
.auth-submit:hover { background: linear-gradient(105deg, #104575, #227898); border-color: var(--terminal-cyan); }
.auth-submit:disabled { opacity: .65; cursor: wait; }
[data-auth="register"] .auth-submit:disabled { cursor: not-allowed; }
.auth-registration-field { display: grid; gap: 4px; }
.auth-label-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; }
.auth-availability { color: #b6e4f6; font-size: .75rem; }
.auth-availability[data-state="available"] { color: #9ce8bd; }
.auth-availability[data-state="taken"], .auth-availability[data-state="invalid"] { color: #ffce99; }
.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 18px;
    margin-top: 17px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}
.auth-links a { color: #b9edff; font-size: .85rem; text-decoration: underline; }
.auth-hint, .auth-feedback { margin: 0; color: var(--muted); font-size: .85rem; }
.auth-feedback:not(:empty) { margin-top: 12px; }
.auth-form input[aria-invalid="true"] {
    border-color: var(--terminal-cyan);
    box-shadow: 0 0 10px #5ad9ff30;
}
.auth-field-error, .auth-feedback.is-error {
    position: relative;
    margin: -4px 0 0;
    padding: 8px 11px;
    border: 1px solid #78dcff80;
    border-radius: 9px;
    background: linear-gradient(120deg, #102d49, #123f57);
    color: #e7f8ff;
    box-shadow: 0 0 14px #4ccaff25;
    font-size: .85rem;
    line-height: 1.4;
}
.auth-field-error { justify-self: start; max-width: 100%; }
.auth-field-error::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 16px;
    width: 7px;
    height: 7px;
    border-top: 1px solid #78dcff80;
    border-left: 1px solid #78dcff80;
    background: #102d49;
    transform: rotate(45deg);
}


.password-requirements { display: grid; gap: .2rem; margin-top: -.25rem; font-size: .75rem; line-height: 1.35; color: #b6cadd; }
.password-rule-line { display: flex; align-items: baseline; white-space: nowrap; gap: clamp(.25rem, 1vw, .65rem); }
[data-password-rule]::before { content: '✓ '; visibility: hidden; color: #8fe6ae; font-weight: 700; }
[data-password-rule].is-met::before { visibility: visible; }
.password-match { margin-inline-start: .45rem; font-size: .75rem; color: #8fe6ae; }
.password-confirmation-info { margin: -.25rem 0 0; font-size: .75rem; color: #f4b4b1; }
.auth-resend { margin-top: 1rem; }

.auth-resend > summary, .auth-resend [type="submit"] { font-size: .75rem; }

.registration-complete {
  width: min(100%, 42rem); padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: linear-gradient(135deg, #10243aef, #081421f2);
  border: 1px solid #6ccae16b; border-radius: 1rem;
  box-shadow: 0 1.25rem 4rem #0008;
}
.registration-complete-label { margin: 0 0 .65rem; color: #a4d8e9; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.panel.registration-complete h1 { margin: 0; font-size: clamp(2.35rem, 4vw, 3.75rem); }
.registration-complete-lead { margin: .75rem 0 1.15rem; color: #f5fbff; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 650; }
.registration-complete-steps { margin: 0; padding-inline-start: 1.35rem; }
.registration-complete-steps li + li { margin-top: .55rem; }
.registration-complete-steps li::marker { color: #ffd098; font-weight: 700; }
.registration-complete-note { margin: 1rem 0 0; color: #becddd; font-size: .9rem; }
.registration-complete [data-registration-delivery-warning] { color: #ffce9a; }
.registration-complete .actions { margin-top: 1.15rem; }

.registration-complete .action:disabled { opacity: .58; cursor: not-allowed; }
.registration-complete [data-resend-feedback]:empty { display: none; }
