:root {
    --bg: #0a0a0a;
    --surface: rgba(10, 10, 10, 0.86);
    --surface-light: #111111;
    --text: #ffffff;
    --text-secondary: #a7a7a7;
    --accent: #0066ff;
    --accent-alt: #00e5ff;
    --impact: #ff2d55;
    --border: rgba(255, 255, 255, 0.16);
    --border-hover: rgba(0, 102, 255, 0.72);
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.625rem;
    --radius-2xl: 0.75rem;
    --shadow-glow: 0 0 48px rgba(0, 102, 255, 0.55);
    --shadow-blue: 0 0 20px rgba(0, 102, 255, 0.8);
    --font-sans: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Raleway', var(--font-sans);
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --scrollbar-size: 6px;
    --scrollbar-track: rgba(255, 255, 255, 0.05);
    --scrollbar-thumb: linear-gradient(180deg, var(--accent) 0%, var(--accent-alt) 100%);
    --scrollbar-thumb-hover: linear-gradient(180deg, #1a7aff 0%, #4df0ff 100%);
    --scrollbar-glow: 0 0 14px rgba(0, 102, 255, 0.55);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--scrollbar-track);
}

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at 50% 100%, rgba(0, 102, 255, 0.18), transparent 28rem),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        var(--bg);
    background-size: auto, 72px 72px, 72px 72px, auto;
    color: var(--text);
    height: 100%;
    min-height: 100%;
    line-height: 1.5;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

*::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 1px solid rgba(0, 102, 255, 0.35);
    box-shadow: var(--scrollbar-glow);
    transition: background 220ms ease, box-shadow 220ms ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

*::-webkit-scrollbar-corner {
    background: var(--bg);
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0, rgba(0, 102, 255, 0.18) 50%, transparent 100%) 50% 100% / 22rem 1px no-repeat,
        radial-gradient(circle at 50% 100%, rgba(0, 102, 255, 0.35), transparent 9rem);
    opacity: 0.9;
    z-index: 0;
}

::selection {
    background: rgba(0, 113, 227, 0.3);
    color: #fff;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100svh;
    max-height: 100svh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    grid-column: 1;
    justify-self: start;
}
.brand-logo {
    width: 2.75rem;
    height: 2.75rem;
    background: #000;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 22px rgba(0, 102, 255, 0.22);
    flex-shrink: 0;
    overflow: hidden;
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.brand-name {
    width: 7.5rem;
    height: 1.35rem;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.progress-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    grid-column: 3;
    justify-self: end;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo), visibility 0s linear 0.7s;
}
.progress-group.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo), visibility 0s;
}
.progress-info {
    min-width: 9rem;
    text-align: right;
}
.progress-section {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 2px;
}
.progress-label {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.65);
}
.progress-track {
    width: 6.25rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    border-radius: 0;
    box-shadow: var(--shadow-blue);
    transition: width 0.7s var(--ease-out-expo);
}
@media (min-width: 640px) {
    .progress-section {
        letter-spacing: 0.08em;
    }
    .progress-track {
        width: 8rem;
    }
}
@media (max-width: 420px) {
    .header-inner {
        padding: 0.85rem 1rem;
        column-gap: 0.75rem;
    }
    .brand {
        gap: 0.5rem;
    }
    .brand-logo {
        width: 2.15rem;
        height: 2.15rem;
    }
    .brand-name {
        width: 6.1rem;
        height: 1.1rem;
    }
    .progress-group {
        gap: 0.55rem;
    }
    .progress-info {
        min-width: 6.4rem;
    }
    .progress-section {
        font-size: 0.52rem;
        letter-spacing: 0.02em;
    }
    .progress-label {
        font-size: 0.62rem;
    }
    .progress-track {
        width: 4.5rem;
    }
}

.main {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
@media (min-width: 768px) {
    .main {
        padding: 4rem 2rem;
    }
}
@media (min-width: 1024px) {
    .main {
        padding: 5rem 6rem;
    }
}

.question-wrapper {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2.4rem);
    background:
        linear-gradient(135deg, rgba(0, 102, 255, 0.08), transparent 28%),
        rgba(4, 4, 4, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.question-wrapper::before,
.question-wrapper::after {
    content: '';
    position: absolute;
    width: 2.2rem;
    height: 2.2rem;
    pointer-events: none;
}
.question-wrapper::before {
    top: 1rem;
    left: 1rem;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}
.question-wrapper::after {
    right: 1rem;
    bottom: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.question-wrapper.exiting {
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
}
.question-wrapper.entering {
    opacity: 0;
    transform: translateY(20px);
}
.question-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.section-badge {
    display: inline-block;
    padding: 0 0 0.45rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    animation: blurIn 0.6s 0.05s var(--ease-out-expo) both;
}

.question-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 0.98;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    animation: blurIn 0.6s 0.1s var(--ease-out-expo) both;
}
@media (min-width: 768px) {
    .question-title {
        font-size: 3.25rem;
    }
}
@media (min-width: 1024px) {
    .question-title {
        font-size: 3.8rem;
    }
}
.question-helper {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 520px;
    animation: blurIn 0.6s 0.15s var(--ease-out-expo) both;
}
@media (min-width: 768px) {
    .question-helper {
        font-size: 1.08rem;
    }
}

.choices-grid {
    display: grid;
    gap: 0.65rem;
    animation: blurIn 0.6s 0.2s var(--ease-out-expo) both;
}
.choice-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(6, 6, 6, 0.82);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    text-align: left;
    transition: all 0.25s var(--ease-smooth);
    position: relative;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.choice-btn:hover {
    border-color: var(--border-hover);
    background: rgba(0, 102, 255, 0.07);
    transform: translateY(-1px);
}
.choice-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}
.choice-btn.selected {
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.18), rgba(0, 229, 255, 0.04));
    border-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent), 0 0 24px rgba(0, 102, 255, 0.2);
}
.choice-num {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0;
    border: 1px solid rgba(0, 102, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
    background: rgba(0, 102, 255, 0.08);
    color: var(--accent-alt);
}
.choice-btn.selected .choice-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.choice-arrow {
    position: absolute;
    right: 1.5rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s var(--ease-out-expo);
    color: var(--accent-alt);
    display: flex;
    align-items: center;
}
.choice-btn.selected .choice-arrow {
    opacity: 1;
    transform: translateX(0);
}

.textarea-wrap {
    animation: blurIn 0.6s 0.2s var(--ease-out-expo) both;
}
.custom-choice-field {
    display: none;
    margin-top: 0.9rem;
}
.custom-choice-field.visible {
    display: block;
}
.textarea-input {
    width: 100%;
    min-height: 140px;
    padding: 1.25rem 1.35rem;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-weight: 300;
    font-family: var(--font-sans);
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    line-height: 1.6;
}
.textarea-input::placeholder {
    color: rgba(134, 134, 139, 0.35);
}
.textarea-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(0, 102, 255, 0.16);
}

.fields-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: blurIn 0.6s 0.2s var(--ease-out-expo) both;
}
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.field-label {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    padding-left: 0.25rem;
}
.field-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.3s ease;
}
.field-input::placeholder {
    color: rgba(134, 134, 139, 0.3);
}
.field-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(0, 102, 255, 0.16);
}

.intro-card {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: blurIn 0.6s 0.2s var(--ease-out-expo) both;
}
.intro-card::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    bottom: -1.5rem;
    width: 8rem;
    height: 8rem;
    background: rgba(0, 102, 255, 0.18);
    border-radius: 50%;
    filter: blur(54px);
}
.intro-card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}
.intro-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0;
    background: rgba(0, 102, 255, 0.12);
    border: 1px solid rgba(0, 102, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-alt);
}
.intro-card h4 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}
.intro-card p {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.95rem;
}

.error-msg {
    color: var(--impact);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.25rem;
    margin-top: 0.9rem;
    animation: errorFadeIn 0.28s ease both;
}
.error-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--impact);
    flex-shrink: 0;
}

.nav-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    transition: margin-top 0.3s var(--ease-smooth), padding-top 0.3s var(--ease-smooth);
    animation: blurIn 0.6s 0.3s var(--ease-out-expo) both;
}
.error-msg + .nav-footer {
    margin-top: 1rem;
    padding-top: 1.25rem;
}
.turnstile-wrap {
    min-height: 65px;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}
.btn-back:hover {
    color: #fff;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}
.btn-back:disabled {
    opacity: 0;
    pointer-events: none;
}
.btn-back:active {
    transform: scale(0.95);
}
.btn-next {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 229, 255, 0.2);
    background: linear-gradient(90deg, var(--accent), #0052cc);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 28px rgba(0, 102, 255, 0.32);
    outline: none;
    white-space: nowrap;
}
.btn-next:hover {
    background: linear-gradient(90deg, #0077ff, var(--accent-alt));
    box-shadow: 0 0 38px rgba(0, 102, 255, 0.45);
    transform: translateY(-1px);
}
.btn-next:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}
.btn-next:disabled {
    opacity: 0.65;
    cursor: progress;
    transform: none;
}
.loading-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    animation: loadingPulse 0.9s ease-in-out infinite;
}
.loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}
.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

.success-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.2), transparent 24rem),
        var(--bg);
}
.success-inner {
    max-width: 520px;
    text-align: center;
    padding: 2.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(5, 5, 5, 0.82);
    animation: fadeInScale 0.7s var(--ease-spring) both;
}
.success-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.success-icon {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: popIn 0.7s var(--ease-spring) both, pulseGlow 2.5s ease-in-out infinite;
}
.success-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .success-title {
        font-size: 3rem;
    }
}
.success-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes blurIn {
    from { opacity: 0; transform: translateY(8px); filter: blur(8px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0px); }
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
}
@keyframes errorFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes pulseGlow {
    0%,100% { box-shadow: 0 0 30px rgba(0,113,227,0.45); }
    50% { box-shadow: 0 0 55px rgba(0,113,227,0.7); }
}
@keyframes loadingPulse {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}