* {
    box-sizing: border-box;
}

:root {
    --font-primary: "Plus Jakarta Sans", "Segoe UI", Inter, Arial, sans-serif;
    --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-soft: #eef2ff;
    --color-accent: #7c3aed;
    --color-text: #232d42;
    --color-muted: #5e6b82;
    --color-border: #e2e8f0;
    --color-page: #f8fafc;
    --color-card: rgba(255, 255, 255, 0.85);
    --color-error: #ef4444;
    --color-error-light: #fef2f2;
    --color-success: #10b981;
    --color-success-light: #ecfdf5;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.05), 0 0 1px 0 rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 30px 60px -20px rgba(99, 102, 241, 0.15);
    --shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

html {
    min-height: 100%;
    background: var(--color-page);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-primary);
    color: var(--color-text);
    background: var(--color-page);
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 55vw;
    height: 55vh;
    border-radius: 999px;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
}

body::before {
    top: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(168, 85, 247, 0) 70%);
}

body::after {
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(6, 182, 212, 0) 70%);
}

.page-shell {
    width: 100%;
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px;
}

.form-card {
    width: 100%;
    margin: 0 auto;
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    background: var(--color-card);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.form-card:hover {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-hover);
}

.form-header {
    text-align: center;
    padding-bottom: 0;
    margin-bottom: 36px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.brand img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    padding: 8px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.eyebrow {
    margin: -4px 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-family: var(--font-serif);
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
    color: #121826;
}

.lead {
    max-width: 670px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-muted);
}

.required-note {
    margin: 0 0 14px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.required-note b,
.consent b {
    color: var(--color-error);
}

[hidden] {
    display: none !important;
}

.trust-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.trust-panel > div,
.policy-panel,
.notice-box {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
}

.trust-panel > div {
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.trust-panel strong {
    display: block;
    margin-bottom: 6px;
    color: #121826;
    font-size: 14px;
    font-weight: 800;
}

.trust-panel p,
.policy-panel p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.55;
}

.process-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
    counter-reset: process;
}

.process-list li {
    position: relative;
    min-height: 54px;
    padding: 12px 10px 12px 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.76);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.process-list li::before {
    counter-increment: process;
    content: counter(process);
    position: absolute;
    top: 12px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    font-size: 11px;
}

.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    margin: 0 0 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    position: relative;
}

.stepper::before {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    top: 20px;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.step-tab {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 78px;
    min-height: 64px;
    border: 0;
    border-radius: 0;
    color: var(--color-muted);
    background: transparent;
    font: inherit;
    font-size: 0;
    font-weight: 700;
    cursor: pointer;
}

.step-tab::first-letter {
    font-size: 0;
}

.step-tab::before {
    content: attr(data-step-jump);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-muted);
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-tab span {
    display: block;
    max-width: 96px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.step-tab.active {
    color: var(--color-primary);
    background: transparent;
    box-shadow: none;
}

.step-tab.active::before {
    border-color: var(--color-primary);
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.step-tab.active span {
    color: var(--color-primary);
}

.step-tab.completed {
    color: var(--color-primary-dark);
    background: transparent;
}

.step-tab.completed::before {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.step-tab.completed span {
    color: var(--color-primary-dark);
}

.program-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 28px;
}

.program-switch button,
.submit-btn {
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.program-switch button {
    border: 1px solid var(--color-border);
    color: var(--color-text);
    background: #ffffff;
}

.program-switch button:hover,
.choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.45);
}

.program-switch button.active {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.24);
}

.program-switch button[aria-pressed="true"] {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.24);
}

.status {
    display: none;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
}

.status.success,
.status.error {
    display: block;
}

.status.success {
    color: #067647;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.status.error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.hidden-field {
    display: none;
}

.form-section {
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
}

.form-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.section-heading {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 24px;
}

.section-heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(99, 102, 241, 0.08);
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
    font-size: 15px;
    font-weight: 800;
}

.section-heading h2 {
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: #121826;
}

.section-heading p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.55;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field.wide,
.field-grid > .field:has(.choice-grid) {
    grid-column: 1 / -1;
}

.field span,
.consent span {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.field b {
    color: var(--color-error);
}

.field small {
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea,
.choice-grid.invalid .choice-card {
    border-color: var(--color-error);
    background: #fef2f2;
}

.field-help.over-limit,
.field-help.under-limit {
    color: var(--color-error);
}

input,
select,
textarea {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    color: var(--color-text);
    background: #ffffff;
    font: inherit;
    font-size: 15px;
    transition: all 0.15s ease;
    outline: none;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235e6b82' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.choice-card:has(input:focus-visible) {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.choice-grid {
    display: grid;
    gap: 12px;
}

.choice-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
    position: relative;
    display: grid;
    gap: 5px;
    min-height: 112px;
    padding: 18px 18px 18px 46px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.choice-card input {
    position: absolute;
    top: 20px;
    left: 18px;
    width: 17px;
    min-height: 17px;
    accent-color: var(--color-primary);
}

.choice-card strong {
    font-size: 14px;
    line-height: 1.35;
    color: #121826;
}

.choice-card small {
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

.choice-card:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.12);
}

.file-field {
    align-content: start;
    padding: 18px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-field:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.file-field input[type="file"] {
    min-height: auto;
    padding: 10px;
    border-style: solid;
    background: #f8fafc;
}

.file-field input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #ffffff;
    background: var(--color-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.notice-box {
    margin: 0 0 18px;
    padding: 14px 16px;
    color: #754d00;
    background: #fff7ed;
    border-color: #fed7aa;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.notice-box.success {
    color: #067647;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.policy-panel {
    display: grid;
    gap: 10px;
    margin: 20px 0;
    padding: 16px;
}

.policy-panel.compact {
    margin: 0 0 18px;
}

.policy-panel a {
    color: var(--color-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.policy-panel a:hover {
    text-decoration: underline;
}

.consent {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    margin-top: 4px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    color: #454e62;
}

.consent input {
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
    accent-color: var(--color-primary);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border);
}

.nav-btn,
.submit-btn {
    min-width: 220px;
    padding: 0 24px;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.nav-btn.primary,
.submit-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 15px 34px rgba(99, 102, 241, 0.25);
}

.nav-btn.secondary {
    min-width: 120px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    background: #ffffff;
}

.submit-btn:hover {
    transform: translateY(-1px);
}

.index-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    text-decoration: none;
}

.submit-btn:disabled,
.nav-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.form-actions a {
    color: var(--color-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.form-actions a:hover {
    text-decoration: underline;
}

@media (max-width: 820px) {
    .form-card {
        padding: 30px 24px;
    }

    .choice-grid-three {
        grid-template-columns: 1fr;
    }

    .trust-panel {
        grid-template-columns: 1fr;
    }

    .process-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 18px 12px;
    }

    .form-card {
        padding: 22px;
        border-radius: var(--radius-md);
    }

    .program-switch,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .stepper {
        margin-bottom: 26px;
    }

    .stepper::before {
        left: 20px;
        right: 20px;
        top: 17px;
    }

    .step-tab {
        width: 40px;
        min-height: 40px;
    }

    .step-tab::before {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .step-tab span {
        display: none;
    }

    .section-heading {
        grid-template-columns: 34px 1fr;
        gap: 11px;
    }

    .section-heading > span {
        width: 32px;
        height: 32px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
        min-width: 0;
    }

    .nav-btn {
        width: 100%;
        min-width: 0;
    }
}

/* Program switch descriptions */
.program-switch button {
    border-radius: 999px;
}

.program-switch button strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.program-switch button small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--color-muted);
    white-space: normal;
}

.program-switch button.active small,
.program-switch button[aria-pressed="true"] small {
    color: rgba(255, 255, 255, 0.85);
}

/* Quick answers */
.faq-block {
    margin: 0 0 30px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    overflow: hidden;
}

.faq-block details {
    border-top: 1px solid var(--color-border);
}

.faq-block details:first-of-type {
    border-top: 0;
}

.faq-block summary {
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 800;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
}

.faq-block summary::-webkit-details-marker {
    display: none;
}

.faq-block summary::after {
    content: "+";
    float: right;
    font-weight: 800;
    color: var(--color-primary-dark);
}

.faq-block details[open] summary::after {
    content: "\2013";
}

.faq-block details p {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--color-muted);
}

@media (max-width: 720px) {
    .trust-panel {
        grid-template-columns: 1fr;
    }

    .process-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
