:root {
    --ink: #17181c;
    --ink-soft: #292a31;
    --muted: #656874;
    --paper: #ffffff;
    --canvas: #f3f2f6;
    --line: #dedde5;
    --accent: #7169c6;
    --accent-dark: #514aa0;
    --accent-soft: #efedff;
    --danger: #a52a32;
    --danger-soft: #fff1f2;
    --success: #24704a;
    --radius: 20px;
    --shadow: 0 24px 70px rgba(24, 24, 35, .09);
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 80% 4%, rgba(113, 105, 198, .13), transparent 28rem),
        var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

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

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: var(--accent-dark); }

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    padding: 18px clamp(20px, 5vw, 72px);
    background: var(--ink);
    color: white;
}

.wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    color: inherit;
    text-decoration: none;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(.95rem, 2vw, 1.28rem);
}

.wordmark strong { color: #aca6ff; font-weight: 700; }

.header-tag {
    color: #b8b8c1;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(36px, 7vw, 78px) 0 72px;
}

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr);
    gap: 42px;
    align-items: end;
    margin-bottom: 32px;
}

.eyebrow,
.section-kicker,
.legal-eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .15em;
    text-transform: uppercase;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.55rem, 7vw, 5.9rem);
    line-height: .92;
    letter-spacing: -.055em;
}

.intro-copy {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.time-note {
    margin: 14px 0 0;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 750;
}

.notice {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #d6b75a;
    border-radius: 12px;
    background: #fff9e7;
    color: #5d4a13;
}

.form-card {
    overflow: hidden;
    border: 1px solid rgba(23, 24, 28, .08);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.progress-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: #e2e1e7;
}

.progress-step {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 14px 22px;
    border: 0;
    background: #f5f4f7;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    text-align: left;
    transition: background .16s ease, color .16s ease;
}

.progress-step:not(:disabled) { cursor: pointer; }
.progress-step:disabled { opacity: 1; }
.progress-step.is-active { background: var(--accent-soft); color: var(--ink); }
.progress-step.is-complete { background: #f0f6f2; color: var(--success); }

.progress-step:focus-visible,
.button:focus-visible,
.clear-signature:focus-visible,
.wordmark:focus-visible {
    outline: 3px solid #b6b0ff;
    outline-offset: -3px;
}

.step-number {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.form-section { padding: clamp(26px, 5vw, 54px); }

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--ink);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.section-heading p:not(.section-kicker) { margin: 6px 0 0; color: var(--muted); }

.date-chip,
.document-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f4f3f6;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
}

.document-badge { background: var(--accent-soft); color: var(--accent-dark); text-transform: uppercase; }

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

.field { display: grid; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 760; }
.optional { margin-left: 4px; color: var(--muted); font-size: .75rem; font-weight: 550; }

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c7c7d0;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea { min-height: 88px; resize: vertical; }

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(113, 105, 198, .13);
}

.field-help,
.signature-hint {
    margin: -1px 0 0;
    color: var(--muted);
    font-size: .78rem;
}

.field--error input,
.field--error textarea,
.field--error canvas,
.was-validated input:invalid,
.was-validated textarea:invalid {
    border-color: var(--danger);
}

.errorlist {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    color: var(--danger);
    font-size: .8rem;
    font-weight: 700;
    list-style: none;
}

.subsection-title {
    grid-column: 1 / -1;
    margin: 18px 0 -4px;
    padding: 10px 14px;
    background: var(--ink);
    color: #fff;
    font-size: .8rem;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.mission-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
    padding: 18px;
    border: 1px solid #dbd8f4;
    border-radius: 14px;
    background: #f8f7ff;
}

.mission-note p { margin: 3px 0 0; color: var(--muted); }

.mission-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--ink);
    color: #c0baff;
    font-family: Georgia, serif;
    font-weight: 800;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.form-actions--end { justify-content: flex-end; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.button--primary { background: var(--ink); color: #fff; }
.button--primary:hover { background: #2d2e35; }
.button--secondary { border-color: #c8c8d0; background: #fff; color: var(--ink); }
.submit-loading { display: none; }
.is-submitting .submit-label { display: none; }
.is-submitting .submit-loading { display: inline; }

.legal-document {
    position: relative;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid #d5d4db;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(26, 26, 37, .06);
}

.legal-document::after {
    position: absolute;
    right: 24px;
    bottom: 12px;
    z-index: 0;
    color: rgba(113, 105, 198, .07);
    content: "BLUEPRINT";
    font-family: Georgia, serif;
    font-size: clamp(2.5rem, 9vw, 7rem);
    font-weight: 800;
    letter-spacing: -.07em;
    pointer-events: none;
}

.legal-document > * { position: relative; z-index: 1; }
.legal-document h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 3vw, 2.15rem); line-height: 1.16; text-align: center; text-transform: uppercase; }
.legal-document .legal-eyebrow { text-align: center; }
.legal-document p { font-family: Georgia, "Times New Roman", serif; font-size: .95rem; line-height: 1.7; }
.legal-document .legal-lead { margin: clamp(28px, 7vw, 70px) auto; max-width: 760px; font-size: clamp(1.12rem, 2.4vw, 1.55rem); line-height: 1.6; text-align: center; }
.legal-rule { height: 2px; margin: 20px 0 24px; background: var(--ink); }
.read-note { margin: 8px 0 0; color: var(--muted); font-family: inherit !important; font-size: .75rem !important; font-weight: 800; letter-spacing: .14em; text-align: center; text-transform: uppercase; }

.legal-document--scroll {
    max-height: 580px;
    overflow-y: auto;
    scrollbar-color: #aaa6d7 #efeff3;
}

.legal-document--scroll:focus-visible { outline: 4px solid rgba(113, 105, 198, .25); outline-offset: 3px; }

.terms-summary {
    margin-bottom: 22px;
    padding: 18px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: var(--accent-soft);
}

.terms-summary p { margin: 0 0 7px; }
.terms-summary ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; margin: 0; padding-left: 20px; font-size: .86rem; }

.attestation-card {
    display: grid;
    gap: 22px;
    margin-top: 24px;
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fafafd;
}

.attestation-card h3 { margin: 0; font-size: 1.15rem; }

.checkbox-field {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 5px 11px;
    align-items: start;
}

.checkbox-field input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--accent-dark);
}

.checkbox-field label { font-weight: 700; }
.checkbox-field .errorlist { grid-column: 2; }

.signature-field { display: grid; gap: 7px; }
.signature-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .85rem; font-weight: 750; }
.clear-signature { padding: 3px 4px; border: 0; background: transparent; color: var(--accent-dark); cursor: pointer; font-size: .78rem; font-weight: 800; }
.signature-field canvas { display: block; width: 100%; height: auto; aspect-ratio: 15 / 4; border: 1px dashed #aaa9b4; border-radius: 10px; background: #fff; cursor: crosshair; touch-action: none; }
.signature-field canvas:focus-visible { outline: 4px solid rgba(113, 105, 198, .18); }

.risk-card {
    margin-top: 28px;
    padding: 24px clamp(20px, 5vw, 38px);
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
}

.risk-card p:last-child { margin: 0; font-family: Georgia, serif; font-size: 1.06rem; line-height: 1.65; }
.risk-card .legal-eyebrow { color: #aca6ff; }

.final-consent {
    margin-top: 28px;
    padding: 22px;
    border: 2px solid var(--ink);
    border-radius: 14px;
}

.final-consent > p { margin: 9px 0 0 33px; color: var(--muted); font-size: .8rem; }

.form-errors {
    margin: 26px clamp(26px, 5vw, 54px) 0;
    padding: 16px 18px;
    border: 1px solid #e4a7ac;
    border-radius: 12px;
    background: var(--danger-soft);
    color: var(--danger);
}

.form-errors .errorlist { margin-top: 4px; }
.form-errors p { margin: 5px 0 0; }
.form-errors:focus-visible { outline: 4px solid rgba(165, 42, 50, .2); outline-offset: 3px; }

.honeypot {
    position: fixed !important;
    left: -100vw !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.privacy-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 22px 6px 0;
    color: var(--muted);
    font-size: .82rem;
}

.privacy-note svg { flex: 0 0 auto; margin-top: 2px; }

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px clamp(20px, 5vw, 72px);
    border-top: 1px solid #dfdee5;
    background: #ecebf0;
    color: var(--muted);
    font-size: .78rem;
}

.site-footer p { margin: 0; }
.site-footer p:first-child { color: var(--ink); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.completion-shell {
    display: grid;
    min-height: calc(100vh - 145px);
    place-items: center;
    padding: 48px 18px;
}

.completion-card {
    width: min(640px, 100%);
    padding: clamp(30px, 7vw, 62px);
    border: 1px solid rgba(23, 24, 28, .08);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.completion-card h1 { margin: 0 auto; font-size: clamp(2.7rem, 9vw, 5.3rem); }
.completion-copy { max-width: 480px; margin: 22px auto; color: var(--muted); font-size: 1.03rem; }
.success-mark { display: grid; width: 62px; height: 62px; margin: 0 auto 24px; place-items: center; border-radius: 50%; background: #e9f6ee; color: var(--success); }
.success-mark svg { width: 33px; }
.reference-box { display: grid; gap: 2px; max-width: 340px; margin: 26px auto 10px; padding: 15px; border: 1px dashed #b7b5c0; border-radius: 12px; background: #f7f6f9; }
.reference-box span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.reference-box strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; letter-spacing: .08em; }
.screenshot-note { max-width: 420px; margin: 10px auto 28px; color: var(--muted); font-size: .79rem; }

@media (max-width: 760px) {
    .site-header { min-height: 62px; }
    .header-tag { display: none; }
    .intro { grid-template-columns: 1fr; gap: 18px; }
    .progress-step { justify-content: center; min-height: 56px; padding: 12px 10px; }
    .progress-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .field-grid { grid-template-columns: 1fr; }
    .field--wide,
    .subsection-title { grid-column: auto; }
    .section-heading { display: block; }
    .date-chip,
    .document-badge { margin-top: 14px; }
    .terms-summary ul { grid-template-columns: 1fr; }
    .legal-document { padding: 24px 20px; }
    .legal-document--scroll { max-height: 520px; }
    .form-actions { align-items: stretch; }
    .form-actions .button { flex: 1; padding-inline: 15px; }
    .site-footer { display: grid; text-align: center; }
}

@media (max-width: 440px) {
    .page-shell { width: min(100% - 20px, 1120px); padding-top: 34px; }
    .form-section { padding: 24px 18px; }
    .form-actions { display: grid; }
    .wordmark { font-size: .84rem; }
}

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

html:not(.js) .progress-strip,
html:not(.js) [data-signature-pad],
html:not(.js) [data-next],
html:not(.js) [data-back] { display: none !important; }

@media print {
    .site-header,
    .site-footer,
    .progress-strip,
    .form-actions,
    .privacy-note { display: none !important; }
    body { background: #fff; }
    .page-shell { width: 100%; padding: 0; }
    .form-card { border: 0; box-shadow: none; }
    .form-step[hidden] { display: block !important; }
}
