:root {
    --font-sans: 'Instrument Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --bg: #f2eee6;
    --bg-deep: #e8e1d6;
    --surface: rgba(255, 252, 246, 0.9);
    --surface-soft: rgba(255, 255, 255, 0.52);
    --panel-dark: #121419;
    --panel-dark-soft: #181b22;
    --text: #111318;
    --text-soft: #5e6572;
    --text-faint: #7c8492;
    --text-on-dark: #f4f6fa;
    --text-on-dark-soft: rgba(244, 246, 250, 0.74);
    --line: rgba(17, 19, 24, 0.12);
    --line-strong: rgba(17, 19, 24, 0.18);
    --line-dark: rgba(255, 255, 255, 0.1);
    --accent: #5f4df4;
    --accent-soft: rgba(95, 77, 244, 0.12);
    --success: #1b8a57;
    --success-soft: rgba(27, 138, 87, 0.12);
    --warning: #b57617;
    --warning-soft: rgba(181, 118, 23, 0.12);
    --error: #b14444;
    --error-soft: rgba(177, 68, 68, 0.12);
    --shadow-soft: 0 24px 60px rgba(17, 19, 24, 0.08);
    --shadow-strong: 0 32px 70px rgba(17, 19, 24, 0.14);
    --radius-lg: 34px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(circle at 90% -8%, rgba(95, 77, 244, 0.1), transparent 38%),
        radial-gradient(circle at -6% 22%, rgba(95, 77, 244, 0.06), transparent 32%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(95, 77, 244, 0.24);
    outline-offset: 3px;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.wrap {
    width: min(100% - 48px, 1180px);
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    object-fit: cover;
    flex: 0 0 auto;
}

.brand-wordmark {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    white-space: nowrap;
    flex: 0 0 auto;
    transition:
        background-color 200ms ease,
        border-color 200ms ease,
        color 200ms ease,
        box-shadow 200ms ease,
        transform 200ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--panel-dark);
    color: var(--text-on-dark);
    box-shadow: 0 6px 16px rgba(17, 19, 24, 0.16);
}

.btn-primary:hover {
    background: #1d2129;
    box-shadow: 0 10px 24px rgba(17, 19, 24, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(17, 19, 24, 0.28);
}

.btn-full {
    width: 100%;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(95, 77, 244, 0.18);
    color: rgba(208, 200, 255, 0.95);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.glass-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fffdf9;
    color: var(--text);
    font-size: 1rem;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.field input:hover {
    border-color: rgba(17, 19, 24, 0.26);
}

.field input::placeholder {
    color: var(--text-faint);
}

.field input:disabled {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-faint);
    cursor: not-allowed;
}

.field input:focus {
    outline: none;
    border-color: rgba(95, 77, 244, 0.42);
    box-shadow: 0 0 0 4px rgba(95, 77, 244, 0.08);
}

.field-hint {
    margin: 6px 0 0;
    color: var(--text-faint);
    font-size: 0.88rem;
    line-height: 1.55;
    display: block;
}

.field-hint.is-warning {
    color: #b34800;
}

.consent-field {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
}

.consent-field input {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--accent);
}

.consent-copy {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.62;
}

.consent-copy strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.94rem;
}

.consent-copy a,
.utility-legal-links a,
.legal-card a {
    color: var(--accent);
    font-weight: 600;
}

.consent-copy a:hover,
.utility-legal-links a:hover,
.legal-card a:hover {
    color: var(--panel-dark);
}

.consent-disclosure {
    margin: 0;
    color: var(--text-faint);
    font-size: 0.88rem;
    line-height: 1.58;
}

.status-banner {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text-soft);
}

.status-banner[data-kind='success'] {
    border-color: rgba(27, 138, 87, 0.22);
    background: var(--success-soft);
    color: var(--success);
}

.status-banner[data-kind='warning'] {
    border-color: rgba(181, 118, 23, 0.22);
    background: var(--warning-soft);
    color: var(--warning);
}

.status-banner[data-kind='error'] {
    border-color: rgba(177, 68, 68, 0.22);
    background: var(--error-soft);
    color: var(--error);
}

.utility-page {
    min-height: 100vh;
}

.utility-shell {
    padding: 24px 0 32px;
}

.utility-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
    gap: 24px;
    align-items: stretch;
}

.utility-rail,
.utility-card {
    padding: clamp(24px, 3vw, 34px);
}

.utility-rail {
    display: grid;
    gap: 28px;
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 77, 244, 0.32), transparent 48%),
        linear-gradient(180deg, var(--panel-dark-soft) 0%, var(--panel-dark) 100%);
    color: var(--text-on-dark);
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.utility-card {
    display: grid;
    gap: 20px;
    align-content: start;
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.utility-title {
    margin: 18px 0 0;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.utility-copy {
    margin: 16px 0 0;
    color: var(--text-on-dark-soft);
    font-size: 1rem;
    line-height: 1.72;
}

.utility-points {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.utility-points li {
    padding: 16px 18px;
    border: 1px solid var(--line-dark);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-on-dark-soft);
    font-size: 0.95rem;
    line-height: 1.58;
    transition:
        background-color 200ms ease,
        border-color 200ms ease;
}

.utility-points li:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
}

.utility-points strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-on-dark);
    font-size: 0.95rem;
}

.summary-card,
.actions-card,
.success-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
}

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

.summary-grid.secondary {
    margin-top: 16px;
}

.summary-block {
    padding: 14px;
    border: 1px solid rgba(17, 19, 24, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
}

.summary-label {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.summary-value {
    margin-top: 8px;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.summary-value.secondary {
    font-size: 1rem;
}

.summary-description {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.success-card {
    text-align: center;
}

.success-card h2 {
    margin: 14px 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.success-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.66;
}

.success-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--success);
}

.step-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.step-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    transition:
        border-color 200ms ease,
        background-color 200ms ease,
        box-shadow 200ms ease,
        transform 200ms ease;
}

.step-card[data-state='current'] {
    border-color: rgba(95, 77, 244, 0.32);
    background: rgba(95, 77, 244, 0.08);
    box-shadow: 0 6px 18px rgba(95, 77, 244, 0.1);
    transform: translateY(-1px);
}

.step-card[data-state='current'] .step-index {
    color: var(--accent);
}

.step-card[data-state='done'] {
    border-color: rgba(27, 138, 87, 0.28);
    background: rgba(27, 138, 87, 0.08);
}

.step-card[data-state='done'] .step-index {
    color: var(--success);
}

.step-index {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.step-copy {
    display: grid;
    gap: 3px;
}

.step-copy strong {
    font-size: 0.94rem;
    line-height: 1.28;
}

.step-copy span {
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.help-card {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
}

.help-card h3 {
    margin: 0 0 8px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.help-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.62;
}

.legal-card {
    display: grid;
    gap: 12px;
}

.utility-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.help-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--text-soft);
}

.help-list li {
    line-height: 1.6;
}

.is-hidden {
    display: none !important;
}

[data-reveal] {
    opacity: 1;
    transform: none;
}

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

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

@media (max-width: 960px) {
    .utility-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .utility-card {
        order: 1;
    }

    .utility-rail {
        order: 2;
    }
}

@media (max-width: 720px) {
    .wrap {
        width: min(100% - 28px, 1180px);
    }

    .utility-shell {
        padding-top: 12px;
        padding-bottom: 24px;
    }

    .glass-card {
        border-radius: 26px;
    }

    .utility-rail,
    .utility-card {
        padding: 20px;
    }

    .utility-grid {
        gap: 14px;
    }

    .utility-title {
        margin-top: 14px;
        font-size: clamp(1.8rem, 10vw, 2.6rem);
        line-height: 1;
    }

    .utility-copy {
        margin-top: 14px;
        font-size: 0.98rem;
        line-height: 1.64;
    }

    .utility-points {
        gap: 10px;
    }

    .utility-points li {
        padding: 14px 15px;
    }

    .summary-card,
    .actions-card,
    .success-card {
        padding: 16px;
        border-radius: 18px;
    }

    .step-card {
        padding: 12px 14px;
        border-radius: 16px;
    }

    .consent-field {
        padding: 14px;
        border-radius: 16px;
    }

    .help-card {
        padding: 16px;
        border-radius: 18px;
    }
}

@media (max-width: 640px) {
    .wrap {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        gap: 10px;
    }

    .brand-wordmark {
        font-size: 0.96rem;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .step-strip {
        grid-template-columns: 1fr;
    }

    .utility-legal-links {
        display: grid;
        grid-template-columns: 1fr;
    }
}
