:root {
    --bg: #070a0b;
    --surface: rgba(14, 19, 20, 0.88);
    --surface-strong: #101617;
    --text: #f2f6f5;
    --muted: #a6b4b3;
    --quiet: #687877;
    --cyan: #30dce4;
    --cyan-soft: #bffcff;
    --gold: #e4b46c;
    --line: rgba(208, 235, 233, 0.14);
    --line-strong: rgba(208, 235, 233, 0.28);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    min-width: 320px;
    min-height: 100svh;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    letter-spacing: 0;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.guide-canvas,
.guide-noise,
.guide-beam {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.guide-canvas { width: 100%; height: 100%; }

.guide-noise {
    z-index: 1;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(215, 239, 237, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(215, 239, 237, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(to bottom, transparent 4%, #000 28%, #000 82%, transparent);
}

.guide-beam {
    z-index: 1;
    opacity: 0.2;
    background: linear-gradient(112deg, transparent 42%, rgba(48, 220, 228, 0.22) 50%, transparent 58%);
    transform: translateX(-65%);
    animation: beam-scan 10s ease-in-out infinite;
}

.guide-header,
.guide-footer,
.guide-main,
.guide-progress { position: fixed; z-index: 3; }

.guide-header {
    inset: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 88px;
    padding-inline: clamp(20px, 4vw, 64px);
    border-bottom: 1px solid var(--line);
    background: rgba(7, 10, 11, 0.62);
}

.guide-brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 11px;
}

.guide-brand img {
    width: 56px;
    height: 30px;
    object-fit: cover;
    object-position: center;
}

.guide-brand span { display: grid; gap: 1px; line-height: 1; }
.guide-brand strong { font-size: 17px; }
.guide-brand small { color: var(--muted); font-family: ui-monospace, monospace; font-size: 9px; }

.guide-status {
    display: flex;
    gap: 22px;
    color: var(--quiet);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    text-transform: uppercase;
}

.guide-close,
.guide-back {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(12, 16, 17, 0.72);
    font-size: 24px;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.guide-close { justify-self: end; }
.guide-close:hover, .guide-back:hover { color: var(--cyan-soft); border-color: var(--cyan); background: #111718; }

.guide-progress {
    top: 87px;
    right: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.035);
}

.guide-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(48, 220, 228, 0.65);
    transition: width 650ms cubic-bezier(.2, .8, .2, 1);
}

.guide-main {
    inset: 89px 0 70px;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 42px clamp(20px, 6vw, 92px);
}

.guide-screen {
    width: min(1120px, 100%);
    margin: auto;
    animation: screen-enter 650ms cubic-bezier(.2, .8, .2, 1) both;
}

.guide-screen.is-leaving { animation: screen-leave 240ms ease both; }

.guide-intro { width: min(900px, 100%); text-align: center; margin-inline: auto; }

.guide-kicker {
    margin: 0 0 30px;
    color: var(--cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}

.guide-intro h1,
.guide-question h1,
.guide-result h1 {
    margin: 0;
    font-size: clamp(42px, 6.2vw, 82px);
    font-weight: 720;
    line-height: 1.12;
}

.guide-intro h1 span { display: block; color: var(--cyan-soft); }

.guide-lead {
    max-width: 660px;
    margin: 30px auto 44px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.guide-primary,
.guide-secondary,
.guide-option {
    border-radius: 4px;
    cursor: pointer;
}

.guide-primary,
.guide-secondary {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid var(--cyan);
    font-size: 14px;
    font-weight: 700;
}

.guide-primary { color: #001719; background: var(--cyan); }
.guide-primary::after { margin-left: 18px; content: "→"; font-size: 18px; }
.guide-primary:hover { background: var(--cyan-soft); border-color: var(--cyan-soft); }
.guide-secondary { color: var(--text); background: transparent; border-color: var(--line-strong); }
.guide-secondary:hover { color: var(--cyan-soft); border-color: var(--cyan); }

.guide-question-head {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(280px, 1.18fr);
    gap: clamp(40px, 8vw, 120px);
    align-items: end;
    margin-bottom: 58px;
}

.guide-question h1 { font-size: clamp(36px, 4.6vw, 64px); }

.guide-question-copy {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    border-left: 1px solid var(--cyan);
    line-height: 1.75;
}

.guide-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.guide-option {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr 28px;
    gap: 18px;
    align-items: center;
    min-height: 128px;
    padding: 24px;
    overflow: hidden;
    color: var(--text);
    text-align: left;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.guide-option::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    content: "";
    background: var(--cyan);
    transform: scaleY(0);
    transition: transform 180ms ease;
}

.guide-option:hover,
.guide-option:focus-visible {
    z-index: 1;
    border-color: var(--line-strong);
    background: var(--surface-strong);
    transform: translateY(-3px);
}

.guide-option:hover::before,
.guide-option:focus-visible::before { transform: scaleY(1); }

.guide-option-index { color: var(--cyan); font-family: ui-monospace, monospace; font-size: 11px; }
.guide-option-copy { display: grid; gap: 7px; }
.guide-option-copy strong { font-size: 19px; }
.guide-option-copy span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.guide-option-arrow { color: var(--cyan-soft); font-size: 19px; transition: transform 180ms ease; }
.guide-option:hover .guide-option-arrow { transform: translateX(5px); }

.guide-result { width: min(920px, 100%); margin-inline: auto; text-align: center; }
.guide-result-mark { display: grid; width: 76px; height: 76px; place-items: center; margin: 0 auto 32px; border: 1px solid var(--cyan); color: var(--cyan); font-size: 28px; transform: rotate(45deg); }
.guide-result-mark span { transform: rotate(-45deg); }
.guide-result h1 { margin-bottom: 22px; font-size: clamp(42px, 5vw, 70px); }
.guide-result-copy { max-width: 670px; margin: 0 auto 34px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.guide-result-reason { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 38px; border-block: 1px solid var(--line); }
.guide-result-reason span { padding: 18px; color: var(--muted); border-right: 1px solid var(--line); font-size: 13px; }
.guide-result-reason span:last-child { border-right: 0; }
.guide-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.guide-footer {
    inset: auto 0 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 70px;
    padding-inline: clamp(20px, 4vw, 64px);
    border-top: 1px solid var(--line);
    background: rgba(7, 10, 11, 0.76);
}

.guide-back { width: 38px; height: 38px; justify-self: start; font-size: 18px; }
.guide-path { display: flex; gap: 8px; justify-content: center; min-width: 0; }
.guide-path span { max-width: 180px; overflow: hidden; padding: 5px 8px; color: var(--quiet); border: 1px solid var(--line); font-family: ui-monospace, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.guide-index { justify-self: end; color: var(--quiet); font-family: ui-monospace, monospace; font-size: 9px; }
.guide-index b { color: var(--cyan); font-weight: 500; }

noscript { position: fixed; z-index: 10; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }

@keyframes screen-enter { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes screen-leave { to { opacity: 0; transform: translateY(-16px); filter: blur(6px); } }
@keyframes beam-scan { 0%, 18% { transform: translateX(-65%); } 72%, 100% { transform: translateX(65%); } }

@media (max-width: 760px) {
    .guide-header { height: 72px; grid-template-columns: 1fr auto; }
    .guide-status { display: none; }
    .guide-progress { top: 71px; }
    .guide-main { inset: 73px 0 62px; padding: 30px 18px; }
    .guide-brand img { width: 48px; height: 26px; }
    .guide-question-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
    .guide-question-copy { font-size: 14px; }
    .guide-options { grid-template-columns: 1fr; }
    .guide-option { min-height: 102px; padding: 18px; }
    .guide-result-reason { grid-template-columns: 1fr; }
    .guide-result-reason span { border-right: 0; border-bottom: 1px solid var(--line); }
    .guide-result-reason span:last-child { border-bottom: 0; }
    .guide-footer { min-height: 62px; grid-template-columns: 48px 1fr auto; padding-inline: 14px; }
    .guide-path { justify-content: flex-start; overflow: hidden; }
    .guide-path span { max-width: 100px; }
}

@media (max-width: 420px) {
    .guide-intro h1, .guide-question h1, .guide-result h1 { font-size: 36px; }
    .guide-kicker { margin-bottom: 20px; }
    .guide-lead { margin-block: 24px 32px; font-size: 15px; }
    .guide-option { grid-template-columns: 28px 1fr 20px; gap: 10px; }
    .guide-option-copy strong { font-size: 17px; }
}

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