:root {
    --portal-navy: #071d2b;
    --portal-navy-soft: #0d3043;
    --portal-blue: #174f68;
    --portal-gold: #c79a43;
    --portal-paper: #f8fafb;
    --portal-canvas: #e9f0f3;
    --portal-rail: #dce7ec;
    --portal-ink: #102636;
    --portal-muted: #526875;
    --portal-line: #b8c9d1;
    --portal-success: #1f6b51;
    --portal-danger: #8a2d2d;
    --portal-white: #ffffff;
    --portal-serif: Georgia, "Times New Roman", serif;
    --portal-sans: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.consumer-portal {
    background: var(--portal-canvas);
    color: var(--portal-ink);
    font-family: var(--portal-sans);
    line-height: 1.45;
    margin: 0;
    min-width: 320px;
}

button,
input,
select { font: inherit; }

a { color: var(--portal-blue); }

a:hover { color: var(--portal-navy); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #f4bc55;
    outline-offset: 3px;
}

.portal-skip-link {
    background: var(--portal-white);
    color: var(--portal-navy);
    font-weight: 800;
    left: 16px;
    padding: 12px 16px;
    position: fixed;
    top: -100px;
    z-index: 100;
}

.portal-skip-link:focus { top: 12px; }

.portal-header { color: var(--portal-white); }

.portal-header__primary { background: var(--portal-navy); }

.portal-header__secondary {
    background: var(--portal-navy-soft);
    border-bottom: 2px solid var(--portal-gold);
}

.portal-header__inner,
.portal-footer__inner {
    margin: 0 auto;
    max-width: 1240px;
    padding-inline: 24px;
}

.portal-header__primary .portal-header__inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 76px;
    padding-block: 14px;
}

.portal-brand {
    align-items: center;
    display: flex;
    gap: 14px;
    min-width: 0;
}

.portal-brand__logo {
    background: var(--portal-white);
    max-height: 46px;
    max-width: 150px;
    object-fit: contain;
    padding: 3px;
}

.portal-brand__name {
    display: block;
    font-family: var(--portal-serif);
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: .035em;
    line-height: 1.15;
}

.portal-brand__label,
.portal-eyebrow,
.statement-label,
.section-kicker,
.rail-kicker {
    color: var(--portal-gold);
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.portal-brand__label { margin-top: 6px; }

.portal-security {
    align-items: center;
    display: flex;
    font-size: .72rem;
    font-weight: 800;
    gap: 8px;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-security__dot {
    background: #49bf7a;
    border: 2px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    height: 10px;
    width: 10px;
}

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

.progress li {
    align-items: center;
    color: #b9cad2;
    display: flex;
    font-size: .68rem;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    letter-spacing: .1em;
    min-height: 46px;
    padding: 8px 5px;
    text-transform: uppercase;
}

.progress li::before {
    border: 1px solid #77919e;
    border-radius: 50%;
    content: attr(data-step);
    display: grid;
    flex: 0 0 22px;
    height: 22px;
    place-items: center;
}

.progress li.done,
.progress li.current { color: var(--portal-white); }

.progress li.done::before {
    background: var(--portal-blue);
    border-color: #91b6c7;
}

.progress li.current {
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 -3px var(--portal-gold);
}

.progress li.current::before {
    background: var(--portal-gold);
    border-color: var(--portal-gold);
    color: var(--portal-navy);
}

.shell {
    margin: 0 auto;
    max-width: 1240px;
    min-height: 55vh;
    padding: 30px 24px 48px;
}

.panel,
.statement-card,
.statement-rail {
    border: 1px solid var(--portal-line);
}

.panel {
    background: var(--portal-paper);
    margin: 0 auto;
    max-width: 860px;
    padding: clamp(22px, 4vw, 42px);
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 { color: var(--portal-navy); }

h1 {
    font-family: var(--portal-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -.025em;
    line-height: 1.05;
    margin-bottom: 12px;
}

h2 {
    font-family: var(--portal-serif);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.15;
}

h3 { font-size: 1rem; }

.lead {
    color: var(--portal-muted);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 70ch;
}

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

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.field input,
.field select {
    background: var(--portal-white);
    border: 1px solid #8fa7b3;
    border-radius: 0;
    color: var(--portal-ink);
    font-size: 1rem;
    min-height: 48px;
    padding: 11px 12px;
    width: 100%;
}

.field input:focus,
.field select:focus {
    border-color: var(--portal-blue);
    box-shadow: 0 0 0 2px rgba(23, 79, 104, .18);
}

.btn,
.button {
    align-items: center;
    background: var(--portal-blue);
    border: 1px solid var(--portal-blue);
    border-radius: 0;
    color: var(--portal-white);
    cursor: pointer;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 900;
    justify-content: center;
    letter-spacing: .08em;
    min-height: 44px;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.btn:hover,
.button:hover {
    background: var(--portal-navy);
    border-color: var(--portal-navy);
    color: var(--portal-white);
}

.btn.secondary,
.button.secondary {
    background: transparent;
    color: var(--portal-navy);
}

.btn.secondary:hover,
.button.secondary:hover {
    background: var(--portal-navy);
    color: var(--portal-white);
}

.button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
}

.alert {
    background: #fff3f0;
    border: 1px solid #d6a49d;
    color: var(--portal-danger);
    margin-bottom: 18px;
    padding: 13px 15px;
}

.account-summary {
    background: #f1f6f8;
    border: 1px solid var(--portal-line);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1px;
}

.account-summary > div {
    background: var(--portal-paper);
    min-width: 0;
    padding: 14px;
}

.account-summary small,
.info-cell small {
    color: var(--portal-muted);
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.account-summary strong,
.info-cell strong {
    color: var(--portal-navy);
    display: block;
    overflow-wrap: anywhere;
}

.amount {
    color: var(--portal-navy);
    font-family: var(--portal-serif);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
}

.statement-page__intro {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.statement-page__intro .portal-eyebrow { color: var(--portal-blue); }

.statement-page__intro p {
    color: var(--portal-muted);
    margin: 0;
}

.statement-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.statement-card {
    background: var(--portal-paper);
    padding: clamp(20px, 3.6vw, 38px);
}

.statement-rail {
    background: var(--portal-rail);
    border-left: 0;
    padding: clamp(20px, 3vw, 28px);
}

.statement-header {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding-bottom: 22px;
}

.statement-header h1 { margin-bottom: 8px; }

.statement-header__meta {
    min-width: 170px;
    text-align: right;
}

.statement-reference {
    color: var(--portal-muted);
    display: block;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.status-pill {
    border: 1px solid var(--portal-blue);
    border-radius: 999px;
    color: var(--portal-blue);
    display: inline-block;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    padding: 6px 11px;
    text-transform: uppercase;
}

.statement-section {
    border-top: 1px solid var(--portal-line);
    padding: 22px 0;
}

.statement-section:last-child { padding-bottom: 0; }

.statement-section__heading {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.statement-section__heading h2 {
    font-family: var(--portal-sans);
    font-size: .78rem;
    letter-spacing: .12em;
    margin: 0;
    text-transform: uppercase;
}

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

.info-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.info-cell {
    border-bottom: 1px solid #d6e0e5;
    min-width: 0;
    padding: 12px 18px 12px 0;
}

.info-grid--three .info-cell:nth-last-child(-n + 3),
.info-grid:not(.info-grid--three) .info-cell:nth-last-child(-n + 2) { border-bottom: 0; }

.balance-block {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.balance-note {
    color: var(--portal-muted);
    font-size: .82rem;
    max-width: 38ch;
    text-align: right;
}

.arrangement-notice {
    background: #edf5f1;
    border-left: 4px solid var(--portal-success);
    color: #244f40;
    margin-bottom: 18px;
    padding: 13px 15px;
}

.schedule-disclosure {
    border: 1px solid var(--portal-line);
    margin-top: 18px;
}

.schedule-disclosure summary {
    color: var(--portal-navy);
    cursor: pointer;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .1em;
    min-height: 44px;
    padding: 14px 16px;
    text-transform: uppercase;
}

.schedule-disclosure[open] summary { border-bottom: 1px solid var(--portal-line); }

.schedule-list { padding: 0 16px; }

.schedule-row {
    align-items: center;
    border-bottom: 1px solid #d6e0e5;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 50px;
    padding: 10px 0;
}

.schedule-row:last-child { border-bottom: 0; }

.schedule-row strong { text-align: right; }

.rail-section {
    border-bottom: 1px solid var(--portal-line);
    padding: 0 0 24px;
}

.rail-section + .rail-section { padding-top: 24px; }

.rail-section:last-child { border-bottom: 0; }

.rail-section h2 {
    font-size: 1.5rem;
    margin: 5px 0 16px;
}

.rail-actions {
    display: grid;
    gap: 10px;
}

.rail-actions .btn,
.rail-actions form,
.rail-actions form .btn { width: 100%; }

.document-list {
    border-top: 1px solid var(--portal-line);
    list-style: none;
    margin: 0;
    padding: 0;
}

.document-item {
    border-bottom: 1px solid var(--portal-line);
    padding: 14px 4px;
}

.document-item__title {
    color: var(--portal-navy);
    display: block;
    font-family: var(--portal-serif);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.document-item__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.document-item__links a {
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.document-item small,
.rail-help {
    color: var(--portal-muted);
    display: block;
    font-size: .78rem;
    margin-top: 6px;
}

.settlement-card {
    background: var(--portal-paper);
    border: 1px solid var(--portal-line);
    padding: 16px;
}

.settlement-card .amount {
    display: block;
    font-size: 2rem;
    margin: 8px 0;
}

.saving {
    color: var(--portal-success);
    font-weight: 800;
}

.option-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
    background: var(--portal-white);
    border: 1px solid var(--portal-line);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
}

.option-card h2 {
    font-family: var(--portal-sans);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.option-card form,
.option-card .button { margin-top: auto; width: 100%; }

.schedule {
    border-collapse: collapse;
    margin: 14px 0;
    width: 100%;
}

.schedule td,
.schedule th {
    border-bottom: 1px solid var(--portal-line);
    font-size: .82rem;
    padding: 9px 6px;
    text-align: left;
}

.review-section {
    border-top: 1px solid var(--portal-line);
    margin-top: 20px;
    padding-top: 16px;
}

.agreement-check {
    background: #eef4f6;
    border: 1px solid var(--portal-line);
    display: flex;
    gap: 10px;
    line-height: 1.5;
    margin-top: 20px;
    padding: 15px;
}

.exit-form { margin-top: 24px; text-align: center; }

.exit-form button {
    background: transparent;
    border: 0;
    color: var(--portal-muted);
    cursor: pointer;
    min-height: 44px;
    text-decoration: underline;
}

.portal-footer {
    background: var(--portal-navy);
    color: #c4d2d9;
    font-size: .78rem;
}

.portal-footer__inner { padding-block: 28px; }

.portal-footer p { margin-bottom: 7px; max-width: 92ch; }

.portal-footer__disclosure { color: var(--portal-white); }

@media (max-width: 980px) {
    .statement-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .option-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .portal-header__inner,
    .portal-footer__inner { padding-inline: 16px; }

    .portal-header__primary .portal-header__inner {
        align-items: flex-start;
        gap: 12px;
        min-height: 0;
    }

    .portal-brand__name { font-size: 1.12rem; }
    .portal-security span:last-child { display: none; }

    .progress li { min-height: 48px; }
    .progress li span { display: none; }
    .progress li::before { flex-basis: 26px; height: 26px; }

    .shell { padding: 20px 16px 36px; }

    .statement-page__intro {
        align-items: flex-start;
        display: block;
    }

    .statement-page__intro p { margin-top: 7px; }

    .statement-layout { grid-template-columns: 1fr; }

    .statement-rail {
        border-left: 1px solid var(--portal-line);
        border-top: 0;
    }

    .statement-header {
        display: block;
        padding-bottom: 18px;
    }

    .statement-header__meta {
        border-top: 1px solid var(--portal-line);
        margin-top: 18px;
        padding-top: 14px;
        text-align: left;
    }

    .info-grid--three { grid-template-columns: 1fr; }

    .info-grid--three .info-cell:nth-last-child(-n + 3) { border-bottom: 1px solid #d6e0e5; }
    .info-grid--three .info-cell:last-child { border-bottom: 0; }

    .balance-block { align-items: flex-start; display: block; }
    .balance-note { margin-top: 12px; text-align: left; }

    .grid,
    .account-summary { grid-template-columns: 1fr; }

    .actions { display: grid; }
    .actions .btn,
    .actions button { width: 100%; }

    .schedule-row { align-items: flex-start; display: block; }
    .schedule-row strong { display: block; margin-top: 4px; text-align: left; }
}

@media (max-width: 480px) {
    .portal-header__primary .portal-header__inner { padding-block: 12px; }
    .portal-brand__logo { display: none; }
    .portal-brand__label { font-size: .6rem; }
    .panel,
    .statement-card,
    .statement-rail { padding: 20px 16px; }
    .info-grid { grid-template-columns: 1fr; }
    .info-grid:not(.info-grid--three) .info-cell:nth-last-child(-n + 2) { border-bottom: 1px solid #d6e0e5; }
    .info-grid .info-cell:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
