:root {
    --nexus-navy: #050B15;
    --nexus-navy-soft: #0C1628;
    --nexus-white: #FFFFFF;
    --nexus-slate: #8892B0;
    --nexus-slate-soft: #A8B2D1;
    --tech-cyan: #64FFDA;
    --tech-cyan-hover: #4AE0BE;
    --error: #FF6B6B;
    --error-bg: #2A1416;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --transition: 160ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--nexus-white);
    background: var(--nexus-navy);
    background-image: radial-gradient(
        ellipse 60% 50% at 50% 0%,
        rgba(100, 255, 218, 0.08),
        transparent 60%
    );
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--tech-cyan); }
a:hover { color: var(--tech-cyan-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--tech-cyan);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    padding: 8px 16px;
    background: var(--tech-cyan);
    color: var(--nexus-navy);
    font-weight: 600;
    z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

.nx-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

.nx-header {
    padding: 24px 0;
    border-bottom: 1px solid rgba(136, 146, 176, 0.15);
}

.nx-logo img {
    display: block;
    height: 36px;
    width: auto;
}

.nx-main {
    padding: 48px 0 80px;
}

.nx-form-page { padding-top: 16px; }

.nx-card {
    background: var(--nexus-navy-soft);
    border: 1px solid rgba(136, 146, 176, 0.2);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
}

.nx-card--success {
    text-align: center;
    border-color: var(--tech-cyan);
}

.nx-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--tech-cyan);
    color: var(--nexus-navy);
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.nx-eyebrow {
    color: var(--tech-cyan);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.nx-title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--nexus-white);
}

.nx-lead {
    color: var(--nexus-slate-soft);
    font-size: 16px;
    margin: 0 0 32px;
}

.nx-muted { color: var(--nexus-slate); }

.nx-link { color: var(--tech-cyan); text-decoration: underline; }

.nx-form { display: flex; flex-direction: column; gap: 20px; }

.nx-field { display: flex; flex-direction: column; gap: 6px; }

.nx-fieldset {
    border: 1px solid rgba(136, 146, 176, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 0;
}

.nx-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--nexus-white);
}

.nx-required { color: var(--tech-cyan); margin-left: 2px; }

.nx-help {
    font-size: 13px;
    color: var(--nexus-slate);
    margin: 0;
}

.nx-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--nexus-white);
    background: rgba(5, 11, 21, 0.6);
    border: 1px solid rgba(136, 146, 176, 0.3);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background-color var(--transition);
}

.nx-input:hover { border-color: rgba(136, 146, 176, 0.5); }
.nx-input:focus { border-color: var(--tech-cyan); }

.nx-input--error {
    border-color: var(--error);
    background: rgba(255, 107, 107, 0.05);
}

.nx-textarea { resize: vertical; min-height: 120px; }
.nx-select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238892B0' d='M6 8 0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.nx-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    color: var(--nexus-slate-soft);
}
.nx-choice:hover { background: rgba(100, 255, 218, 0.05); }
.nx-choice input { accent-color: var(--tech-cyan); width: 18px; height: 18px; }

.nx-file {
    padding: 8px;
    cursor: pointer;
}
.nx-file::file-selector-button {
    padding: 8px 14px;
    margin-right: 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--nexus-navy);
    background: var(--tech-cyan);
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nx-error {
    color: var(--error);
    font-size: 13px;
    margin: 0;
    font-weight: 500;
}

.nx-alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
}
.nx-alert--error { background: var(--error-bg); color: var(--error); border: 1px solid var(--error); }
.nx-alert ul { margin: 6px 0 0; padding-left: 20px; }

.nx-form-actions { margin-top: 8px; }

.nx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 200px;
    padding: 0 28px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition), background-color var(--transition);
}

.nx-btn--primary {
    background: var(--tech-cyan);
    color: var(--nexus-navy);
}
.nx-btn--primary:hover { background: var(--tech-cyan-hover); transform: translateY(-1px); }
.nx-btn--primary:active { transform: translateY(0); }

.nx-footer {
    padding: 32px 0;
    text-align: center;
    color: var(--nexus-slate);
    font-size: 13px;
    border-top: 1px solid rgba(136, 146, 176, 0.15);
    margin-top: 80px;
}

.nx-btn--ghost {
    background: transparent;
    color: var(--nexus-slate-soft);
    border: 1px solid rgba(136, 146, 176, 0.3);
}
.nx-btn--ghost:hover:not(:disabled) {
    background: rgba(136, 146, 176, 0.08);
    border-color: var(--nexus-slate);
    color: var(--nexus-white);
}
.nx-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---------- Wizard multi-step ---------- */
.nx-form--wizard { gap: 0; }

.nx-wizard-progress {
    margin-bottom: 28px;
    padding: 12px 0;
}
.nx-wizard-progress__text {
    font-size: 13px;
    color: var(--nexus-slate-soft);
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}
.nx-wizard-progress__bar {
    width: 100%;
    height: 4px;
    background: rgba(136, 146, 176, 0.18);
    border-radius: 999px;
    overflow: hidden;
}
.nx-wizard-progress__fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--tech-cyan), #7affcf);
    border-radius: 999px;
    transition: width 240ms ease;
}

.nx-step {
    display: none;
    border: 0;
    padding: 0;
    margin: 0 0 24px;
    flex-direction: column;
    gap: 20px;
}
.nx-step--active {
    display: flex;
    animation: nx-step-in 280ms ease;
}
@keyframes nx-step-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nx-step__title {
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--nexus-white);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.nx-step__desc {
    color: var(--nexus-slate-soft);
    font-size: 14px;
    margin: -8px 0 8px;
    line-height: 1.55;
}

.nx-wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(136, 146, 176, 0.15);
    margin-top: 8px;
}
.nx-wizard-nav .nx-btn {
    min-width: 140px;
}
.nx-wizard-nav [data-submit] {
    margin-left: auto;
}

.nx-wizard-autosave {
    text-align: center;
    margin-top: 14px;
    min-height: 18px;
    font-size: 12px;
    color: var(--nexus-slate);
    opacity: 0;
    transition: opacity 200ms ease;
}
.nx-wizard-autosave.is-visible { opacity: 1; }

@media (max-width: 600px) {
    .nx-main { padding: 24px 0 60px; }
    .nx-card { padding: 28px 20px; }
    .nx-title { font-size: 24px; }
    .nx-step__title { font-size: 19px; }
    .nx-btn { width: 100%; min-width: 0; }
    .nx-wizard-nav { flex-direction: column-reverse; }
    .nx-wizard-nav [data-submit] { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
