.welcome {
    --bg: #080d14;
    --surface: #111b26;
    --surface-hover: #182735;
    --text: #f4f7fb;
    --muted: #a4b5c5;
    --line: #263443;
    --control: #728b9f;
    --primary: #70eeef;
    --focus: #70eeef;
    --cyan: #70eeef;
    --pink: #f0a0e5;
    --mint: #9befb7;
    --hero-text: #f4f7fb;
    --hero-accent: #70eeef;
    --hero-on-accent: #092429;
    background: var(--bg);
    color: var(--text);
    color-scheme: dark;
    position: relative;
    isolation: isolate;
}

html:has(.welcome) {
    background: #080d14;
    scroll-behavior: smooth;
}

.welcome :focus-visible {
    outline-color: var(--focus);
}

.welcome .skip {
    color: #092429;
}

.welcome-width {
    width: min(1280px, calc(100% - 96px));
    margin-inline: auto;
}

.scene-stage {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #080d14;
}

.scene-stage canvas,
#pulse-scene,
.scene-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-stage canvas {
    display: block;
    opacity: 0;
    transition: opacity 800ms ease;
}

.scene-fallback {
    object-fit: cover;
    object-position: 65% center;
    opacity: 1;
}

[data-scene="ready"] .scene-stage canvas {
    opacity: 1;
}

[data-scene="ready"] .scene-fallback {
    opacity: 0;
}

.scene-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #080d14ed 0%, #080d14ce 28%, #080d1440 56%, #080d1400 82%);
}

.welcome-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid #8aadc51c;
    background: #080d14e8;
}

.welcome-nav {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.welcome .brand {
    padding: 0;
    gap: 10px;
    color: var(--text);
    flex-shrink: 0;
}

.welcome .brand strong {
    display: flex;
    align-items: baseline;
    font-size: 1.625rem;
    font-weight: 650;
}

.welcome .brand-mark {
    border-radius: 0;
    background: transparent;
    color: var(--primary);
    width: 34px;
}

.welcome .brand-mark svg {
    width: 32px;
    height: 32px;
    stroke-width: 2;
}

.welcome .brand small {
    color: var(--muted);
    font-size: .6875rem;
}

.welcome .brand-dot {
    color: var(--primary);
}

.welcome-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.welcome-links>a:not(.button) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: .8125rem;
    color: var(--muted);
}

.welcome-links>a:hover,
.welcome-links [aria-current="page"] {
    color: var(--text) !important;
}

.welcome-links [aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 10px;
    text-decoration-color: var(--primary);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--line);
}

.welcome .icon-button {
    width: 44px;
    height: 44px;
    color: var(--text);
}

.motion-toggle {
    border: 1px solid #7894aa80;
    border-radius: 50%;
}

.motion-toggle[hidden] {
    display: none;
}

.motion-play,
.motion-toggle[aria-pressed="true"] .motion-pause {
    display: none !important;
}

.motion-toggle[aria-pressed="true"] .motion-play {
    display: block !important;
}

.welcome .button {
    min-height: 46px;
    border-radius: 4px;
    font-size: .8125rem;
}

.welcome .welcome-account {
    color: var(--text);
    background: #a0c9e30d;
    border-color: #728b9f80;
    gap: 18px;
}

.welcome .welcome-account:hover {
    border-color: var(--primary);
    background: #70eeef12;
}

.welcome-main {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: none;
}

.welcome-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: min(720px, calc(100svh - 160px));
}

.hero-inner {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    padding-block: 62px 52px;
}

.hero-copy {
    max-width: 570px;
}

.welcome-kicker {
    color: var(--primary);
    font-size: .6875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.kicker-line {
    width: 24px;
    height: 1px;
    background: var(--primary);
    box-shadow: 0 0 8px #70eeef70;
}

.welcome-hero h1 {
    font-size: 6.5rem;
    font-weight: 600;
    line-height: .98;
    margin: 0 0 28px;
}

.welcome-hero h1 span {
    display: block;
    font-size: 2.5rem;
    line-height: 1.3;
    font-weight: 450;
    margin-top: 12px;
    color: #d9e8f0;
}

.welcome-intro {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 450;
    margin-bottom: 16px;
}

.welcome-subtitle {
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 30px;
}

.welcome-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 26px;
}

.welcome .welcome-enter {
    min-height: 50px;
    background: var(--hero-accent);
    color: var(--hero-on-accent);
    border-color: var(--hero-accent);
    padding: 13px 20px;
    gap: 24px;
    box-shadow: 0 0 24px #70eeef14;
}

.welcome .welcome-enter:hover {
    background: #acfcf7;
    border-color: #acfcf7;
    box-shadow: 0 0 32px #70eeef30;
}

.welcome-explore {
    display: inline-flex;
    min-height: 46px;
    gap: 12px;
    align-items: center;
    color: #d4e1eb;
    font-size: .8125rem;
}

.welcome-explore:hover {
    color: var(--primary);
}

.hero-coordinate {
    position: absolute;
    right: 0;
    bottom: 55px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font: .625rem/1.6 Consolas, monospace;
    color: #b3d4e6;
    text-align: right;
}

.coordinate-cross {
    font-size: 1.375rem;
    color: var(--primary);
}

.hero-baseline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: var(--muted);
    min-height: 66px;
    font-size: .6875rem;
}

.hero-baseline>span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-baseline svg {
    width: 14px;
    height: 14px;
}

.hero-baseline>a {
    display: flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    color: var(--primary);
}

.scroll-stem {
    height: 22px;
    width: 1px;
    background: var(--primary);
    margin-right: -7px;
    transform: translateY(-9px);
    opacity: .6;
}

.welcome-index {
    background: #090f18b8;
    border-block: 1px solid #546c823e;
}

.welcome-index>div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.welcome-index a {
    display: flex;
    align-items: center;
    min-height: 94px;
    gap: 18px;
    color: #d4e1eb;
    font-size: .8125rem;
    padding-inline: 30px;
}

.welcome-index a:first-child {
    padding-left: 0;
}

.welcome-index a:last-child {
    padding-right: 0;
}

.welcome-index a+a {
    border-left: 1px solid #546c823e;
}

.welcome-index a span {
    color: var(--primary);
    font: .6875rem Consolas, monospace;
}

.welcome-index a:nth-child(2) span {
    color: var(--pink);
}

.welcome-index a:nth-child(3) span {
    color: var(--mint);
}

.welcome-index a svg {
    margin-left: auto;
    opacity: .75;
}

.welcome-index a:hover {
    color: var(--primary);
    background: #70eeef08;
}

.welcome-chapter {
    position: relative;
    scroll-margin-top: 88px;
    min-height: 640px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #8aadc51c;
}

#decider {
    isolation: isolate;
    overflow: clip;
}

.chapter-inner {
    position: relative;
    padding-block: 110px;
}

.chapter-copy {
    max-width: 510px;
}

.chapter-number {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .6875rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 24px;
}

.chapter-number>span {
    font: .75rem Consolas, monospace;
    color: var(--primary);
    border: 1px solid #70eeef4a;
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
}

.welcome-chapter h2 {
    font-size: 3.25rem;
    line-height: 1.15;
    font-weight: 500;
    margin-bottom: 26px;
}

.welcome-chapter h2 em {
    font-style: normal;
    color: var(--primary);
}

.chapter-summary {
    font-size: 1rem;
    color: #c0ceda;
    max-width: 355px;
    line-height: 1.7;
    margin-bottom: 26px;
}

.chapter-topics {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: .75rem;
    color: var(--muted);
}

.chapter-topics li {
    position: relative;
    padding-left: 12px;
}

.chapter-topics li::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    width: 3px;
    height: 3px;
    background: var(--primary);
}

.chapter-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    gap: 24px;
    border-bottom: 1px solid #70eeef80;
    font-size: .875rem;
    color: var(--text);
}

.chapter-link:hover {
    color: var(--primary);
}

.chapter-coordinate {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    color: #b3d4e6;
    font: .625rem Consolas, monospace;
}

#analyser {
    --primary: #f0a0e5;
}

#decider {
    --primary: #9befb7;
}

#analyser .chapter-number>span {
    border-color: #f0a0e54a;
}

#analyser .chapter-link {
    border-color: #f0a0e580;
}

#decider .chapter-number>span {
    border-color: #9befb74a;
}

#decider .chapter-link {
    border-color: #9befb780;
}

.welcome-entry {
    padding-block: 80px;
    background: #080d14db;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.welcome-entry .welcome-kicker {
    justify-content: center;
}

.welcome-entry h2 {
    font-size: 2rem;
    font-weight: 450;
    margin: 0 auto 28px;
    max-width: 600px;
}

.welcome-footer {
    background: #080d14;
    color: var(--muted);
    font-size: .6875rem;
}

.welcome-footer>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding-block: 28px;
}

.welcome-footer p {
    margin: 0;
}

.welcome-footer strong {
    color: var(--text);
    margin-right: 8px;
    font-size: .875rem;
}

.welcome-footer a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

@media (min-width: 1600px) {
    .welcome-width {
        width: min(1440px, calc(100% - 160px));
    }
}

@media (max-width: 1000px) {
    .welcome-width {
        width: calc(100% - 64px);
    }

    .welcome-links {
        gap: 18px;
    }

    .welcome-hero h1 {
        font-size: 5.5rem;
    }

    .hero-copy {
        max-width: 500px;
    }

    .hero-coordinate {
        display: none;
    }

    .chapter-copy {
        max-width: 440px;
    }

    .scene-veil {
        background: linear-gradient(90deg, #080d14e8 0%, #080d14b0 40%, #080d1415 100%);
    }
}

@media (max-width: 700px) {
    .welcome-width {
        width: calc(100% - 40px);
    }

    .welcome-nav {
        min-height: 76px;
        gap: 12px;
    }

    .welcome-links {
        gap: 10px;
    }

    .welcome .welcome-links>a.welcome-home-link,
    .welcome .welcome-links>a.welcome-radar-link,
    .nav-divider {
        display: none;
    }

    .welcome .brand strong {
        font-size: 1.375rem;
    }

    .welcome .brand {
        gap: 5px;
    }

    .welcome .brand-mark {
        width: 30px;
    }

    .welcome .brand small {
        font-size: .625rem;
    }

    .welcome .welcome-account {
        gap: 10px;
        padding-inline: 12px;
    }

    .scene-veil {
        background: linear-gradient(90deg, #080d14d9 0%, #080d1494 65%, #080d1455 100%);
    }

    .scene-fallback {
        object-position: 56% center;
    }

    .welcome-hero {
        min-height: calc(100svh - 145px);
    }

    .hero-inner {
        padding-block: 45px 32px;
    }

    .welcome-hero h1 {
        font-size: 4.75rem;
        margin-bottom: 24px;
    }

    .welcome-hero h1 span {
        font-size: 2rem;
    }

    .welcome-intro {
        font-size: 1.25rem;
    }

    .welcome-subtitle {
        font-size: .875rem;
        margin-bottom: 24px;
    }

    .welcome-hero-actions {
        gap: 10px 18px;
    }

    .welcome-kicker {
        font-size: .625rem;
        margin-bottom: 22px;
    }

    .hero-baseline {
        min-height: 55px;
    }

    .hero-baseline>span:last-child {
        display: none;
    }

    .welcome-index a {
        padding-inline: 14px;
        min-height: 78px;
        gap: 8px;
        font-size: .75rem;
    }

    .welcome-index a svg {
        display: none;
    }

    .welcome-chapter {
        min-height: 570px;
    }

    .chapter-inner {
        padding-block: 80px 100px;
    }

    .welcome-chapter h2 {
        font-size: 2.5rem;
    }

    .chapter-summary {
        max-width: 310px;
        font-size: .9375rem;
    }

    .chapter-coordinate {
        bottom: 30px;
        font-size: .5625rem;
    }

    .welcome-entry {
        padding-block: 66px;
    }

    .welcome-entry h2 {
        font-size: 1.75rem;
    }

    .welcome-footer>div {
        flex-wrap: wrap;
    }

    .welcome-footer p {
        width: 100%;
        order: 3;
    }
}

@media (max-width: 380px) {
    .welcome .welcome-account svg {
        display: none;
    }

    .welcome-links {
        gap: 8px;
    }

    .welcome .brand-mark {
        width: 26px;
    }

    .welcome .brand strong {
        font-size: 1.25rem;
    }

    .welcome-hero h1 {
        font-size: 4rem;
    }

    .welcome-hero h1 span {
        font-size: 1.75rem;
    }

    .welcome .welcome-enter {
        padding-inline: 16px;
        gap: 12px;
    }
}

@media (max-height: 760px) and (min-width: 701px) {
    .hero-inner {
        padding-block: 28px 24px;
    }

    .welcome-hero h1 {
        font-size: 4.5rem;
        margin-bottom: 20px;
    }

    .welcome-hero h1 span {
        font-size: 2rem;
        margin-top: 6px;
    }

    .welcome-intro {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .welcome-subtitle {
        margin-bottom: 20px;
    }

    .welcome-kicker {
        margin-bottom: 16px;
    }
}

@media (max-height: 650px) and (max-width: 700px) {
    .hero-inner {
        padding-block: 25px 18px;
    }

    .welcome-hero h1 {
        font-size: 3.5rem;
        margin-bottom: 16px;
    }

    .welcome-hero h1 span {
        font-size: 1.625rem;
        margin-top: 6px;
    }

    .welcome-intro {
        font-size: 1.125rem;
        margin-bottom: 10px;
    }

    .welcome-subtitle {
        margin-bottom: 14px;
    }

    .welcome-kicker {
        margin-bottom: 14px;
    }
}

@media (max-height: 500px) and (min-width: 600px) {
    .welcome-nav {
        min-height: 64px;
    }

    .welcome-hero {
        min-height: 0;
    }

    .hero-inner {
        padding-block: 18px 12px;
    }

    .welcome-hero h1 {
        font-size: 2.75rem;
        margin-bottom: 12px;
    }

    .welcome-hero h1 span {
        display: inline;
        font-size: 1.5rem;
        margin-left: 12px;
    }

    .welcome-kicker {
        display: none;
    }

    .welcome-intro {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    .welcome-intro br {
        display: none;
    }

    .welcome-subtitle {
        display: none;
    }

    .hero-baseline {
        min-height: 44px;
    }

    .welcome-index a {
        min-height: 60px;
    }
}

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

    .welcome *,
    .welcome *::before,
    .welcome *::after {
        animation: none !important;
        transition: none !important;
    }
}
