:root {
    color-scheme: light;
    --navy: #0b1f40;
    --navy-soft: #33415c;
    --blue: #2456d8;
    --blue-strong: #1947c4;
    --blue-soft: #edf3ff;
    --teal: #168b91;
    --surface: #ffffff;
    --canvas: #f7f9fc;
    --line: #d9dee8;
    --line-strong: #b8c1d1;
    --muted: #63708a;
    --success: #10785e;
    --success-soft: #e9f7f2;
    --warning: #8b5b0a;
    --warning-soft: #fff6df;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-width: 320px;
    background: var(--canvas);
    color: var(--navy);
    -webkit-font-smoothing: antialiased;
}

body.is-embedded { background: transparent; }
body.is-embedded .progress-shell { padding-top: 20px; }
body.is-embedded .portal-main { width: min(1180px, calc(100% - 32px)); min-height: auto; padding-bottom: 24px; }

a { color: inherit; }
button, input, textarea { font: inherit; }

.material-symbols-rounded {
    font-size: 1.25em;
    line-height: 1;
    vertical-align: -0.18em;
}

.site-shell {
    width: min(1280px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header a,
.site-header button,
.site-footer a { text-decoration: none; }

.site-topbar {
    background: #3867d6;
    color: white;
    font-size: 0.88rem;
}

.topbar-inner {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-contact,
.site-account {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-contact a,
.site-account a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
}

.site-contact a {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgb(255 255 255 / 10%);
}

.site-contact a:hover,
.site-account a:hover { color: rgb(255 255 255 / 78%); }

.site-nav {
    position: relative;
    z-index: 20;
    background: white;
    box-shadow: 0 4px 16px rgb(15 23 42 / 10%);
}

.nav-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-brand img {
    display: block;
    width: 230px;
    height: 62px;
    object-fit: contain;
}

.site-menu {
    display: flex;
    align-items: center;
    gap: clamp(17px, 2.2vw, 34px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-menu > li > a,
.menu-dropdown > button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 32px 0;
    border: 0;
    background: transparent;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.site-menu > li > a:hover,
.menu-dropdown > button:hover { color: #3867d6; }

.menu-dropdown { position: relative; }
.submenu {
    position: absolute;
    top: calc(100% - 12px);
    left: 0;
    display: none;
    width: 240px;
    margin: 0;
    padding: 8px 0;
    border-radius: 10px;
    background: white;
    box-shadow: 0 14px 32px rgb(15 23 42 / 16%);
    list-style: none;
}
.menu-dropdown:hover .submenu,
.menu-dropdown:focus-within .submenu,
.menu-dropdown.is-open .submenu { display: block; }
.submenu a {
    display: block;
    padding: 11px 18px;
    color: #374151;
}
.submenu a:hover { background: #f3f4f6; color: #3867d6; }
.menu-toggle { display: none; border: 0; background: transparent; color: #374151; font-size: 1.5rem; }

.portal-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 4.5vw 0 2.5vw;
    background: #3564d4;
    color: #fff;
}

.brand {
    align-self: stretch;
    display: flex;
    align-items: center;
    width: 260px;
    padding: 8px 24px 8px 20px;
    margin-right: 8px;
    background: white;
    border-radius: 0 0 30px 0;
    overflow: hidden;
}

.brand img {
    display: block;
    width: 200px;
    height: 48px;
    object-fit: contain;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 600;
}

.header-contact a,
.help-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
}

.help-link { margin-left: auto; font-weight: 600; }
.header-contact a:hover, .help-link:hover { text-decoration: underline; }

.progress-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 32px 18px;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.progress-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    color: #687287;
    font-size: 0.95rem;
    font-weight: 600;
}

.progress-step::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 19px;
    left: calc(50% + 28px);
    width: calc(100% - 56px);
    height: 3px;
    border-radius: 3px;
    background: #d9dee8;
}

.progress-step:last-child::after { display: none; }
.progress-step.is-complete::after { background: var(--blue); }

.step-marker {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e7eaf0;
    color: #536075;
    font-size: 1rem;
}
.step-marker.material-symbols-rounded { font-size: 1.3rem; }

.progress-step.is-active,
.progress-step.is-complete { color: var(--blue); }

.progress-step.is-active .step-marker,
.progress-step.is-complete .step-marker {
    background: var(--blue);
    color: white;
    box-shadow: 0 0 0 5px rgb(36 86 216 / 10%);
}

.portal-main {
    width: min(1180px, calc(100% - 48px));
    min-height: calc(100vh - 260px);
    margin: 0 auto;
    padding: 10px 0 54px;
}

.page-heading {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.06; letter-spacing: -0.045em; }
h2 { margin: 0; font-size: 1.35rem; line-height: 1.3; }
h3 { margin: 0; font-size: 1rem; }
.lead { max-width: 680px; margin: 10px 0 0; color: var(--navy-soft); font-size: 1rem; line-height: 1.55; }

.access-grid,
.document-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.8fr);
    gap: 48px;
}

.access-form {
    width: min(100%, 580px);
    align-self: center;
    justify-self: center;
}

.access-heading {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}
.access-heading .lead { margin-right: auto; margin-left: auto; }
.client-instructions { text-align: left; }
.instruction-quote {
    margin: 0;
    padding: 18px 20px;
    border-left: 3px solid var(--blue);
    border-radius: 0 8px 8px 0;
    background: var(--blue-soft);
    color: var(--navy-soft);
    line-height: 1.6;
}
.client-instructions h1 { margin-top: 26px; font-size: clamp(1.65rem, 2.4vw, 2.15rem); }
.formula-block { margin-top: 14px; color: var(--navy-soft); line-height: 1.55; }
.formula-block strong { color: var(--navy); }
.formula-block p { margin: 5px 0 0; }
.access-shell { display: flex; justify-content: center; }
.access-card {
    width: min(100%, 640px);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: 0 14px 40px rgb(11 31 64 / 7%);
}
.access-card .code-boxes { justify-content: center; }
.access-card .field-hint { justify-content: center; text-align: center; }

.access-aside,
.document-aside {
    padding-left: 46px;
    border-left: 1px solid var(--line);
}

.field-group { margin: 0 0 20px; padding: 0; border: 0; }
.field-group legend,
.field-label { display: block; margin-bottom: 13px; color: var(--navy); font-weight: 750; }

.journeys { display: grid; gap: 12px; }
.journey-option { position: relative; display: block; cursor: pointer; }
.journey-option input { position: absolute; opacity: 0; pointer-events: none; }
.journey-content {
    display: grid;
    grid-template-columns: 28px 48px 1fr 24px;
    align-items: center;
    min-height: 70px;
    padding: 10px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    transition: border-color 160ms, box-shadow 160ms, background 160ms;
}
.journey-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #8390a5;
    border-radius: 50%;
    box-shadow: inset 0 0 0 5px white;
}
.journey-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.7rem;
}
.journey-title { font-weight: 700; }
.journey-arrow { color: var(--muted); }
.journey-option:hover .journey-content { border-color: #7192eb; }
.journey-option input:focus-visible + .journey-content { outline: 3px solid rgb(36 86 216 / 22%); outline-offset: 2px; }
.journey-option input:checked + .journey-content { border: 2px solid var(--blue); padding: 9px 17px; background: #fbfdff; box-shadow: 0 6px 20px rgb(36 86 216 / 8%); }
.journey-option input:checked + .journey-content .journey-radio { border-color: var(--blue); background: var(--blue); }

.code-boxes { display: flex; flex-wrap: wrap; gap: 9px; max-width: 100%; }
.code-separator { align-self: center; margin: 0 -3px; color: var(--navy); font-size: 1.7rem; font-weight: 800; line-height: 1; }
.code-suffix { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 54px; padding: 0 10px; border-radius: 8px; background: var(--navy); color: white; font-weight: 800; letter-spacing: 0.06em; }
.code-box {
    width: clamp(42px, 5vw, 58px);
    height: 54px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: white;
    color: var(--navy);
    font-size: 1.35rem;
    font-weight: 750;
    text-align: center;
    text-transform: uppercase;
}
.code-box:focus { border: 2px solid var(--blue); outline: 3px solid rgb(36 86 216 / 13%); }
.field-hint { display: flex; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: 0.87rem; line-height: 1.45; }

.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgb(36 86 216 / 16%);
    transition: background 160ms, transform 160ms, box-shadow 160ms;
}
.button:hover, button:hover { background: var(--blue-strong); transform: translateY(-1px); box-shadow: 0 10px 22px rgb(36 86 216 / 20%); }
.button:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgb(36 86 216 / 25%); outline-offset: 2px; }
.button.secondary, button.secondary { background: white; color: var(--navy); border: 1px solid var(--line-strong); box-shadow: none; }
.button.secondary:hover, button.secondary:hover { background: #f5f7fb; }
.button.full, button.full { width: 100%; }

.trust-panel { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.trust-heading { display: flex; align-items: center; gap: 11px; color: var(--blue); }
.trust-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 1.65rem;
}
.trust-panel p, .detail-list dd { color: var(--muted); line-height: 1.55; }
.detail-block { padding-top: 22px; }
.detail-list { display: grid; gap: 16px; margin: 16px 0 0; }
.detail-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.detail-row .material-symbols-rounded { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #eef2f8; color: var(--navy); }
.detail-list dt { color: var(--muted); font-size: 0.78rem; }
.detail-list dd { margin: 3px 0 0; color: var(--navy); font-weight: 650; }
.detail-disclosure { margin-top: 22px; }
.detail-disclosure summary { color: var(--blue); font-weight: 700; cursor: pointer; }
.detail-disclosure p { font-size: 0.78rem; word-break: break-all; }
.document-details h2 { font-size: 1.05rem; }

.error, .alert-error { color: var(--danger); }
.error { margin: 10px 0 0; font-size: 0.9rem; font-weight: 600; }
.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 22px;
    padding: 15px 17px;
    border-radius: 9px;
    background: var(--blue-soft);
    color: #173d98;
    line-height: 1.5;
}
.notice.success { background: var(--success-soft); color: var(--success); }
.notice.warning { background: var(--warning-soft); color: var(--warning); }

.document-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.document-title { margin-top: 6px; font-size: clamp(1.75rem, 2.5vw, 2.5rem); }
.document-kicker { color: var(--muted); font-size: 0.9rem; font-weight: 650; }
.secure-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.reader-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 10px 30px rgb(11 31 64 / 8%); }
.reader-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
.reader-toolbar strong { color: var(--navy); }
.reader-frame iframe { display: block; width: 100%; height: min(58vh, 620px); min-height: 430px; border: 0; background: white; }
.aside-card { margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.aside-card h2 { font-size: 1.12rem; }
.aside-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.actions { display: grid; gap: 10px; }

.signature { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.text-input, textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: white;
    color: var(--navy);
}
textarea { min-height: 112px; resize: vertical; }
.signature-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0 16px; }
.method-option { display: flex; min-width: 0; cursor: pointer; }
.method-option input { position: absolute; opacity: 0; }
.method-label { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 44px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-size: 0.86rem; font-weight: 650; }
.method-option input:checked + .method-label { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.drawn-signature[hidden] { display: none; }
.signature canvas { display: block; width: 100%; height: 150px; border: 1px dashed #8490a3; border-radius: 8px; background: #fcfdff; touch-action: none; }
.clear-signature { min-height: 40px; margin-top: 8px; padding: 8px 12px; }
.consent-label { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin: 16px 0; color: var(--navy-soft); font-size: 0.85rem; line-height: 1.5; }
.consent-label input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }

.status-shell { max-width: 860px; margin: 0 auto; }
.status-card { padding: 38px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 14px 40px rgb(11 31 64 / 7%); }
.status-hero { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.status-hero > .material-symbols-rounded { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 2rem; }
.status-hero.is-success > .material-symbols-rounded { background: var(--success-soft); color: var(--success); }
.status-hero h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); }
.status-hero p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.status-hero .eyebrow { margin: 0 0 13px; }
.status-hero h1 + p { margin-top: 16px; }
.status-card > .status-hero + .notice { margin-top: 30px; }
.status-actions { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.primary-download { padding: 22px; border-radius: 12px; background: var(--navy); color: white; }
.primary-download p { color: #c9d3e8; line-height: 1.5; }
.case-reference { margin-top: 24px; color: var(--muted); font-size: 0.78rem; }

.site-footer {
    position: relative;
    overflow: hidden;
    padding: 64px 0 24px;
    border-top: 2px solid #3867d6;
    background: linear-gradient(135deg, #0b0f1a, #0e1324 58%, #000);
    color: white;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 64px;
}
.footer-grid h2 { color: white; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-grid section:first-child h2 { font-size: 1.25rem; text-transform: none; letter-spacing: 0; }
.footer-grid p { color: #9ca3af; font-size: 0.88rem; line-height: 1.75; }
.footer-grid a { color: #cbd5e1; }
.footer-grid a:hover { color: white; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 54px;
    padding-top: 24px;
    border-top: 1px solid rgb(255 255 255 / 10%);
    color: #6b7280;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .site-account { display: none; }
    .menu-toggle { display: block; }
    .nav-inner { min-height: 76px; flex-wrap: wrap; }
    .site-brand img { width: 190px; height: 54px; }
    .site-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 18px; }
    .site-menu.is-open { display: flex; }
    .site-menu > li > a, .menu-dropdown > button { width: 100%; justify-content: space-between; padding: 12px 0; }
    .submenu { position: static; width: 100%; box-shadow: none; padding: 0 0 6px 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 38px; }
    .access-grid, .document-grid, .status-actions { grid-template-columns: 1fr; gap: 30px; }
    .access-form { width: 100%; justify-self: stretch; }
    .access-aside, .document-aside { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--line); }
    .reader-frame iframe { height: 58vh; }
}

@media (max-width: 620px) {
    .site-shell { width: min(100% - 28px, 1280px); }
    .topbar-inner { min-height: 48px; }
    .site-contact { width: 100%; justify-content: space-between; gap: 8px; }
    .site-contact a { padding: 7px 9px; font-size: 0.76rem; }
    .nav-inner { min-height: 70px; }
    .site-brand img { width: 166px; height: 50px; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .footer-bottom { flex-direction: column; }
    .progress-shell { padding: 28px 14px 18px; }
    .progress-step { font-size: 0.75rem; }
    .progress-step::after { left: calc(50% + 20px); width: calc(100% - 40px); top: 16px; }
    .step-marker { width: 32px; height: 32px; font-size: 0.82rem; }
    .portal-main { width: min(100% - 28px, 1180px); padding-top: 10px; }
    .page-heading { margin-bottom: 22px; padding-bottom: 22px; }
    .journey-content { grid-template-columns: 24px 40px 1fr; min-height: 72px; padding: 12px; }
    .journey-arrow { display: none; }
    .code-boxes { gap: 5px; }
    .code-box { width: clamp(32px, calc((100vw - 132px) / 7), 48px); height: 50px; border-radius: 6px; font-size: 1rem; }
    .access-card { padding: 24px 18px; border-radius: 10px; }
    .code-separator { margin: 0 -2px; font-size: 1.35rem; }
    .code-suffix { min-width: 42px; height: 50px; padding: 0 6px; font-size: 0.82rem; }
    .document-heading { display: block; }
    .secure-badge { margin-top: 14px; }
    .reader-frame iframe { min-height: 420px; }
    .status-card { padding: 24px 18px; }
    .status-hero { grid-template-columns: 48px 1fr; gap: 13px; }
    .status-hero > .material-symbols-rounded { width: 48px; height: 48px; font-size: 1.6rem; }
    .status-card > .status-hero + .notice { margin-top: 24px; }
}

@media print {
    .site-header, .progress-shell, .site-footer, .actions, .signature, .document-aside { display: none !important; }
    .portal-main { width: 100%; padding: 0; }
    .document-grid { display: block; }
    .reader-frame { border: 0; box-shadow: none; }
    .reader-frame iframe { height: 92vh; }
}
