:root {
    color-scheme: light;
    --page: #f4f7fb;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-soft: #edf3f9;
    --border: #d9e2ee;
    --border-strong: #bdcada;
    --text: #071329;
    --text-muted: #617087;
    --brand: #071b3f;
    --brand-text: #ffffff;
    --brand-soft: rgba(0, 103, 190, 0.11);
    --danger: #c52d3a;
    --success: #197a3b;
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --shadow: 0 28px 80px rgba(3, 24, 58, 0.12), 0 2px 8px rgba(3, 24, 58, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(0, 111, 201, 0.11), transparent 32rem),
        radial-gradient(circle at 88% 10%, rgba(0, 31, 78, 0.07), transparent 30rem),
        var(--page);
    color: var(--text);
    font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

button, input, textarea, select { font: inherit; }

a { color: inherit; }

[hidden] { display: none !important; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 76px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5eaf1;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(3, 24, 58, 0.04);
}

.topbar-inner,
.site-footer-inner {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wordmark { display: block; width: 158px; height: 42px; overflow: hidden; border-radius: 7px; background: #fff; }
.brand-logo { display: block; width: 158px; height: 158px; margin-top: -58px; object-fit: cover; }

.page {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
    padding: 64px 0 84px;
}

.intro { max-width: 780px; margin-bottom: 36px; }
.eyebrow { display: inline-block; margin-bottom: 12px; color: #006fc9; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: Manrope, ui-sans-serif, sans-serif; font-size: clamp(38px, 4.5vw, 54px); font-weight: 600; line-height: 1.06; letter-spacing: -0.055em; }
h2 { margin-bottom: 0; font-size: 20px; line-height: 1.3; letter-spacing: -0.025em; }
.intro p { max-width: 660px; margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.7; }

.card {
    display: flex;
    overflow: hidden;
    min-height: 590px;
    background: var(--surface);
    border: 1px solid rgba(7, 27, 63, 0.08);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.sidebar {
    width: 300px;
    flex: 0 0 300px;
    padding: 28px 22px;
    color: #f7f3e9;
    background: linear-gradient(155deg, #020712 0%, #061c43 62%, #075ba6 145%);
    border-right: 1px solid #061a3c;
}

.stepper { display: flex; flex-direction: column; }

.stepper-item {
    display: flex;
    gap: 16px;
    min-height: 88px;
    padding: 16px;
    border-radius: 22px;
    transition: background 180ms ease;
}

.stepper-item.active { background: rgba(0, 111, 201, 0.18); box-shadow: inset 0 0 0 1px rgba(75,170,245,.2); }
.step-marker { display: flex; flex-direction: column; align-items: center; }

.step-circle {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    color: rgba(255,255,255,.62);
    background: rgba(255,255,255,.035);
}

.stepper-item.active .step-circle,
.stepper-item.complete .step-circle {
    border-color: #39a2f2;
    color: #ffffff;
    background: linear-gradient(135deg, #0879d3, #0055a4);
}

.step-circle svg { width: 18px; height: 18px; }

.step-connector {
    width: 2px;
    height: 24px;
    margin: 4px 0 -20px;
    background: rgba(255,255,255,.18);
}

.stepper-item.complete .step-connector { background: #1689df; }
.step-copy { padding-top: 2px; }
.step-kicker { display: block; margin-bottom: 3px; color: rgba(255,255,255,.5); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.step-title { display: block; font-size: 14px; font-weight: 650; color: rgba(255,255,255,.65); }
.stepper-item.active .step-title { color: #ffffff; }
.step-description { margin: 5px 0 0; color: rgba(255,255,255,.55); font-size: 12px; line-height: 1.55; }

.form-panel {
    min-width: 0;
    flex: 1;
    padding: 38px 42px 44px;
    background:
        radial-gradient(circle at 100% 0%, rgba(0,111,201,.055), transparent 22rem),
        #ffffff;
}
.step { display: flex; flex-direction: column; gap: 16px; }
.step > h2 { font-family: Manrope, ui-sans-serif, sans-serif; font-size: 24px; font-weight: 650; letter-spacing: -.035em; }
.step > h2::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 12px; border-radius: 99px; background: linear-gradient(90deg, #071b3f, #0879d3); }
.muted { margin: -8px 0 0; color: var(--text-muted); }

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

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    background: linear-gradient(145deg, rgba(247,249,252,.98), rgba(239,244,249,.88));
    border: 1px solid #e7edf4;
    border-radius: 18px;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.field:hover { border-color: #d2deeb; box-shadow: 0 8px 24px rgba(7,27,63,.045); }
.field:focus-within { border-color: rgba(8,116,201,.3); box-shadow: 0 10px 28px rgba(0,82,164,.075); }
label, .static-label { padding: 0 5px; color: #26364e; font-size: 11px; font-weight: 700; letter-spacing: .025em; }
.field:has([required]) > label::after,
.field:has(input[name="currentlyWorking"][required]) > .static-label::after { content: " *"; color: #0874c9; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid rgba(164, 182, 203, .58);
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(7,27,63,.035), inset 0 0 0 1px rgba(255,255,255,.55);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], select { height: 48px; padding: 0 15px; }
textarea { min-height: 82px; padding: 13px 15px; resize: vertical; }
select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, #959595 50%), linear-gradient(135deg, #959595 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.custom-select { position: relative; width: 100%; }
.custom-select-trigger {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid rgba(164,182,203,.58);
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(7,27,63,.035), inset 0 0 0 1px rgba(255,255,255,.55);
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.custom-select-trigger::after { content: ""; width: 8px; height: 8px; margin: -4px 3px 0 14px; border-right: 1.5px solid #617087; border-bottom: 1.5px solid #617087; transform: rotate(45deg); transition: transform 160ms ease; }
.custom-select.open .custom-select-trigger::after { margin-top: 4px; transform: rotate(225deg); }
.custom-select-trigger.placeholder { color: #8190a3; }
.custom-select-trigger:hover { border-color: #7890aa; box-shadow: 0 4px 12px rgba(7,27,63,.06); }
.custom-select-trigger:focus-visible,
.custom-select.open .custom-select-trigger { border-color: #0874c9; box-shadow: 0 0 0 4px rgba(0,111,201,.12), 0 6px 18px rgba(7,27,63,.07); }
.custom-select.invalid .custom-select-trigger { border-color: var(--danger); }
.custom-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 286px;
    overflow-y: auto;
    padding: 7px;
    background: rgba(255,255,255,.98);
    border: 1px solid #d9e3ee;
    border-radius: 16px;
    box-shadow: 0 22px 50px rgba(3,24,58,.18), 0 4px 12px rgba(3,24,58,.08);
}
.custom-select-option {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    color: #172943;
    background: transparent;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: color 120ms ease, background 120ms ease;
}
.custom-select-option:hover,
.custom-select-option:focus-visible { color: #004d9a; background: #edf5fc; }
.custom-select-option.selected { color: #ffffff; background: linear-gradient(135deg, #0879d3, #0055a4); }

input:hover, textarea:hover, select:hover { border-color: #7890aa; box-shadow: 0 4px 12px rgba(7,27,63,.06); }
input:focus, textarea:focus, select:focus { border-color: #0874c9; box-shadow: 0 0 0 4px rgba(0, 111, 201, .12), 0 6px 18px rgba(7,27,63,.07); background: #ffffff; }
.invalid { border-color: var(--danger) !important; }
.field-error { min-height: 0; padding: 0 5px; color: var(--danger); font-size: 11px; font-weight: 600; }
.field-error:empty { display: none; }
.field-help { margin: 0; padding: 1px 5px 2px; color: var(--text-muted); font-size: 10.5px; line-height: 1.55; }
.step-error { padding: 11px 14px; color: var(--danger); background: #fff4f4; border: 1px solid rgba(190, 35, 35, .22); border-radius: 12px; font-size: 12px; font-weight: 650; }

.radio-row { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 5px; background: #ffffff; border: 1px solid rgba(164,182,203,.58); border-radius: 13px; }
.radio-option { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; cursor: pointer; color: var(--text); background: #f4f7fb; border-radius: 10px; font-size: 13px; font-weight: 600; }
.radio-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}
.radio-circle { width: 18px; height: 18px; border: 1px solid var(--border-strong); border-radius: 50%; display: grid; place-items: center; }
.radio-option input:checked + .radio-circle { border: 5px solid var(--brand); }
.radio-option input:focus-visible + .radio-circle { box-shadow: 0 0 0 3px rgba(0,111,201,.18); }

.btn-row, .pdf-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(0,111,201,.22); outline-offset: 2px; }
.btn-primary { color: #ffffff; background: linear-gradient(135deg, #0879d3, #004d9a); border-color: #0056a9; box-shadow: 0 8px 18px rgba(0,82,164,.2); }
.btn-primary:hover { background: linear-gradient(135deg, #1288e6, #005ab3); box-shadow: 0 10px 22px rgba(0,82,164,.26); }
.btn-primary::after { content: "→"; font-size: 16px; line-height: 1; transition: transform 140ms ease; }
.btn-primary:hover::after { transform: translateX(2px); }
.btn-secondary { color: var(--text); background: #ffffff; border-color: var(--border-strong); box-shadow: 0 4px 12px rgba(7,27,63,.055); }
.btn-secondary:hover { background: #e2ebf5; }
.btn-tertiary { color: var(--text); background: transparent; border-color: transparent; }
.btn-tertiary:hover { background: var(--surface-soft); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-spinner { width: 15px; height: 15px; border: 2px solid rgba(13,11,68,.25); border-top-color: var(--brand-text); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-panel { min-height: 440px; align-items: center; justify-content: center; text-align: center; }
.success-panel::before { content: "✓"; width: 64px; height: 64px; display: grid; place-items: center; color: #ffffff; background: linear-gradient(135deg, #0879d3, #004d9a); border-radius: 50%; box-shadow: 0 14px 28px rgba(0,82,164,.22); font-size: 26px; }
.success-panel h2 { font-size: 26px; }
.submit-error { margin: 16px 0 0; color: var(--danger); }

.site-footer { padding: 12px 0 22px; }
.site-footer-inner { min-height: 48px; }
.social-links { display: flex; align-items: center; gap: 14px; }
.social-links a { display: grid; place-items: center; width: 36px; height: 36px; color: #47617e; background: rgba(255,255,255,.62); border: 1px solid #dde6f0; border-radius: 50%; transition: color 140ms ease, background 140ms ease, transform 140ms ease; }
.social-links a:hover { color: #ffffff; background: #075ba6; border-color: #075ba6; transform: translateY(-2px); }

body.modal-open { overflow: hidden; }
.pdf-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.pdf-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 10, 25, .78); backdrop-filter: blur(10px); }
.pdf-viewer {
    position: relative;
    width: min(1180px, 100%);
    height: min(860px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #eef3f8;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 24px;
    box-shadow: 0 36px 100px rgba(0,8,24,.42);
    animation: pdfReveal 180ms ease-out;
}
.pdf-viewer-toolbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 18px 14px 22px; color: #ffffff; background: linear-gradient(110deg, #020712, #061c43 68%, #075ba6 150%); }
.pdf-viewer-heading { min-width: 0; }
.pdf-viewer-kicker { display: block; margin-bottom: 3px; color: #65b8f5; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pdf-viewer-heading h2 { overflow: hidden; margin: 0; color: #ffffff; font-size: 16px; font-weight: 650; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.pdf-viewer-actions { display: flex; align-items: center; gap: 9px; }
.pdf-download, .pdf-close { height: 40px; display: inline-flex; align-items: center; justify-content: center; color: #ffffff; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); text-decoration: none; cursor: pointer; transition: background 140ms ease, border-color 140ms ease; }
.pdf-download { padding: 0 16px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pdf-close { width: 40px; padding: 0 0 3px; border-radius: 50%; font-size: 25px; font-weight: 300; }
.pdf-download:hover, .pdf-close:hover { background: #0879d3; border-color: #3098e6; }
.pdf-download:focus-visible, .pdf-close:focus-visible { outline: 3px solid rgba(101,184,245,.5); outline-offset: 2px; }
.pdf-frame-wrap { min-height: 0; flex: 1; padding: 12px; }
.pdf-frame-wrap iframe { width: 100%; height: 100%; display: block; background: #ffffff; border: 0; border-radius: 14px; }
@keyframes pdfReveal { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }

@media (max-width: 780px) {
    body { font-size: 13px; }
    .topbar-inner, .site-footer-inner, .page { width: min(100% - 28px, 680px); }
    .page { padding: 40px 0 56px; }
    .card { flex-direction: column; }
    .sidebar { width: 100%; flex-basis: auto; padding: 14px; border-right: 0; border-bottom: 1px solid #061a3c; }
    .stepper { flex-direction: row; }
    .stepper-item { width: 33.333%; min-height: 0; padding: 12px; }
    .step-circle { width: 32px; height: 32px; }
    .step-connector { display: none; }
    .step-description { display: none; }
    .form-panel { padding: 28px 24px 32px; }
    .grid-2, .grid-3, #workingRow.three-columns { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .topbar { height: 56px; }
    .page { width: calc(100% - 20px); padding-top: 24px; }
    h1 { font-size: 36px; }
    .stepper-item { gap: 7px; padding: 9px 5px; }
    .step-kicker { font-size: 9px; }
    .step-title { font-size: 12px; }
    .form-panel { padding: 22px 14px 24px; }
    .field { padding: 10px; border-radius: 16px; }
    .btn-row .btn { flex: 1; }
    .site-footer-inner { width: calc(100% - 28px); }
    .pdf-modal { padding: 0; }
    .pdf-viewer { width: 100%; height: 100%; border: 0; border-radius: 0; }
    .pdf-viewer-toolbar { min-height: 68px; padding: 10px 12px 10px 16px; }
    .pdf-download { display: none; }
    .pdf-frame-wrap { padding: 6px; }
    .pdf-frame-wrap iframe { border-radius: 9px; }
}

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