:root {
    color-scheme: light;
    --navy: #17223b;
    --blue: #1d67d6;
    --pale: #eef5ff;
    --line: #dce3ed;
    --muted: #657087;
    --green: #137a4b;
    --red: #b42318;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 24px 14px 48px;
    background: #f4f7fb;
    color: var(--navy);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.card {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 5vw, 42px);
    background: #fff;
    border: 1px solid #e4eaf2;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(23, 34, 59, .08);
}
.narrow { width: min(680px, 100%); }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 8px 0 10px; font-size: clamp(28px, 6vw, 40px); line-height: 1.08; }
h2 { margin: 0 0 18px; font-size: 20px; }
.lead { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
section { padding: 26px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.zip-city { grid-template-columns: 140px 1fr; }
label { display: block; margin: 0 0 16px; font-size: 13px; font-weight: 700; }
input:not([type="checkbox"]) {
    width: 100%;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    font-size: 16px;
}
input:focus { outline: 3px solid rgba(29, 103, 214, .14); border-color: var(--blue); }
button {
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
button.secondary { background: var(--pale); color: var(--blue); }
button.text-button { width: auto; padding: 8px 0; background: none; color: var(--red); font-size: 13px; }
button.primary { margin-top: 18px; }
.notice { margin: 18px 0; padding: 14px 16px; border-radius: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.notice.success { background: #eaf8f1; color: var(--green); }
.notice.error { background: #fff0ef; color: var(--red); }
.notice.info { background: var(--pale); color: var(--navy); }
.notice a { color: inherit; }
.document-links { display: grid; gap: 10px; margin-bottom: 20px; }
.document-links a { display: flex; justify-content: space-between; padding: 15px; border: 1px solid #cbdcf5; border-radius: 10px; color: var(--blue); font-weight: 800; text-decoration: none; }
.document-links span { font-size: 11px; letter-spacing: .08em; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; line-height: 1.4; }
.check-row input { width: 20px; height: 20px; flex: 0 0 auto; }
.small { color: var(--muted); font-size: 14px; line-height: 1.5; }
#signature { width: 100%; height: 190px; border: 2px dashed #9cb8df; border-radius: 12px; background: #fff; touch-action: none; }
.success-panel { padding: 40px 0; text-align: center; }
.success-panel .check { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 50%; background: #eaf8f1; color: var(--green); font-size: 34px; font-weight: 900; }
.success-panel p { color: var(--muted); line-height: 1.6; }
.success-upload-cta,
.upload-again {
    display: inline-block;
    margin: 18px 0 4px;
    padding: 15px 22px;
    border-radius: 11px;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

body.upload-body {
    min-height: 100vh;
    padding: 32px 14px 54px;
    background:
        radial-gradient(circle at 15% 0%, rgba(29, 103, 214, .12), transparent 34%),
        linear-gradient(180deg, #eef4fb 0%, #f8fafc 58%, #eef3f8 100%);
}
.upload-shell {
    width: min(760px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(23, 34, 59, .12);
}
.upload-shell section { border-top: 0; }
.upload-hero {
    padding: clamp(30px, 7vw, 54px);
    background: linear-gradient(135deg, #17223b 0%, #1c3c68 100%);
    color: #fff;
}
.upload-brand {
    margin-bottom: 13px;
    color: #a9cdfc;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.upload-hero h1 {
    max-width: 590px;
    margin: 0 0 15px;
    font-size: clamp(31px, 7vw, 49px);
}
.upload-hero p {
    max-width: 610px;
    margin: 0;
    color: #d9e7f8;
    font-size: 17px;
    line-height: 1.65;
}
.upload-intro {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 30px clamp(22px, 6vw, 44px) 12px;
}
.upload-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #e1e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.upload-step > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--pale);
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}
.upload-step strong { display: block; margin: 2px 0 5px; font-size: 14px; line-height: 1.25; }
.upload-step small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.policy-upload-form { padding: 20px clamp(22px, 6vw, 44px) 38px; }
.upload-options { display: grid; grid-template-columns: minmax(0, 480px); justify-content: center; gap: 14px; }
.upload-option {
    min-height: 170px;
    margin: 0;
    padding: 23px 18px;
    border: 2px solid #cbdcf5;
    border-radius: 16px;
    background: #f7fbff;
    text-align: center;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.upload-option:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 10px 30px rgba(29,103,214,.11); }
.upload-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-option strong, .upload-option small { display: block; }
.upload-option strong { margin: 8px 0 5px; color: var(--navy); font-size: 18px; }
.upload-option small { color: var(--muted); font-size: 13px; font-weight: 600; }
.upload-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto;
    border-radius: 17px;
    background: #e2efff;
    color: var(--blue);
    font-size: 28px;
}
.clear-selected-files {
    display: block;
    width: auto;
    margin: 12px 0 0 auto;
    padding: 10px 13px;
    border: 1px solid #efc8c8;
    border-radius: 9px;
    background: #fff5f5;
    color: #a33a3a;
    font-size: 12px;
    font-weight: 800;
}
.clear-selected-files:hover { background: #fdeaea; }
.clear-selected-files[hidden] { display: none; }
.file-summary {
    margin: 14px 0;
    padding: 13px 15px;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}
.file-summary.has-files { background: #eaf8f1; color: var(--green); }
.next-photo-message {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 12px 0 14px;
    padding: 14px 15px;
    border: 1px solid #bfe3cf;
    border-radius: 11px;
    background: #f0faf5;
    color: #176642;
}
.next-photo-message[hidden] { display: none; }
.next-photo-message > span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-weight: 900;
}
.next-photo-message strong,
.next-photo-message small { display: block; }
.next-photo-message small { margin-top: 2px; color: #4f7563; line-height: 1.35; }
.selected-file-list {
    display: grid;
    gap: 7px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.selected-file-list:empty { display: none; }
.selected-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}
.selected-file-list li span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.selected-file-list button {
    width: auto;
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: #eef2f6;
    color: #536274;
    font-size: 11px;
    font-weight: 750;
}
.photo-hint {
    display: grid;
    gap: 5px;
    margin: 18px 0;
    padding: 17px;
    border-left: 4px solid #f0a324;
    border-radius: 8px 12px 12px 8px;
    background: #fff8e8;
    color: #6b4a10;
    font-size: 14px;
    line-height: 1.45;
}
.upload-submit { padding: 16px 20px; font-size: 16px; }
.upload-privacy { margin: 13px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.download-panel {
    margin: 0;
    padding: 32px clamp(22px, 6vw, 44px) 40px;
    border-top: 1px solid var(--line) !important;
    background: #f8fafc;
}
.download-panel h2 { margin-bottom: 8px; }
.download-panel > p { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.upload-complete { padding: 42px clamp(22px, 6vw, 44px); text-align: center; }
.upload-complete .check {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eaf8f1;
    color: var(--green);
    font-size: 34px;
    font-weight: 900;
}
.upload-complete h2 { font-size: 30px; }
.upload-complete p { color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) {
    body { padding: 0; background: #fff; }
    .card { min-height: 100vh; padding: 24px 18px 40px; border: 0; border-radius: 0; box-shadow: none; }
    .grid.two, .grid.zip-city { grid-template-columns: 1fr; gap: 0; }
    body.upload-body { padding: 0; background: #fff; }
    .upload-shell { border: 0; border-radius: 0; box-shadow: none; }
    .upload-hero { padding: 32px 21px 34px; }
    .upload-intro { grid-template-columns: 1fr; padding: 22px 18px 8px; }
    .upload-step { padding: 13px; }
    .policy-upload-form { padding: 18px 18px 32px; }
    .upload-options { grid-template-columns: 1fr; }
    .upload-option { min-height: 138px; padding: 18px; }
    .clear-selected-files { width: 100%; }
    .upload-icon { width: 50px; height: 50px; font-size: 24px; }
    .download-panel { padding: 28px 18px 36px; }
}
