.banking-period-toolbar,
.banking-content-section,
.banking-executive-section,
.banking-source-section {
    margin-bottom: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
}

.banking-period-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.4rem;
    border-left: 4px solid #0f766e;
}

.banking-period-toolbar h2,
.banking-section-heading h2 {
    margin: .1rem 0 .2rem;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

.banking-period-toolbar p,
.banking-section-heading p { margin: 0; color: #64748b; font-size: .88rem; }
.banking-toolbar-eyebrow,
.banking-section-kicker {
    color: #0f766e;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.banking-period-controls { display: flex; align-items: end; gap: .65rem; }
.banking-period-controls label { min-width: 155px; }
.banking-period-controls label span {
    display: block;
    margin-bottom: .3rem;
    color: #475569;
    font-size: .75rem;
    font-weight: 700;
}
.banking-period-controls .btn { display: inline-flex; align-items: center; gap: .35rem; }

.banking-executive-section,
.banking-content-section,
.banking-source-section { padding: 1.25rem 1.4rem; }
.banking-section-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.banking-comparison-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
}
.banking-comparison-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: .8rem;
    background: #f8fafc;
}
.banking-score-card { background: #ecfdf5; border-color: #a7f3d0; }
.banking-comparison-card > span {
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.banking-comparison-card strong { margin-top: .35rem; color: #0f172a; font-size: 1.65rem; }
.banking-comparison-card small { color: #64748b; }
.banking-comparison-card em {
    margin-top: auto;
    padding-top: .65rem;
    font-size: .75rem;
    font-style: normal;
    font-weight: 700;
}

.delta-good { color: #15803d !important; }
.delta-bad { color: #b91c1c !important; }
.delta-neutral { color: #64748b !important; }

.banking-comparison-table thead th {
    border-bottom: 1px solid #cbd5e1;
    background: #eef2f7;
    color: #334155;
    font-size: .76rem;
    text-transform: uppercase;
}
.banking-comparison-table th:first-child { width: 34%; }
.banking-comparison-table td:not(:first-child),
.banking-comparison-table thead th:not(:first-child) { text-align: right; }
.banking-comparison-table tbody th small {
    display: block;
    color: #94a3b8;
    font-size: .65rem;
    text-transform: uppercase;
}
.banking-total-row { background: #f8fafc; font-weight: 800; }
.banking-quality {
    display: inline-block;
    min-width: 65px;
    margin-right: .55rem;
    padding: .18rem .4rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    text-align: center;
    font-size: .76rem;
    font-weight: 800;
}
.banking-quality-estimated { background: #fef3c7; color: #92400e; }
.banking-quality-verified { background: #dcfce7; color: #166534; }
.banking-quality-manual { background: #ffedd5; color: #9a3412; }
.banking-section-note,
.banking-method-note {
    margin: .9rem 0 0;
    padding: .7rem .85rem;
    border-radius: .6rem;
    background: #fff7ed;
    color: #9a3412;
    font-size: .8rem;
}

.banking-diagnosis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.banking-diagnosis-grid > div { padding: 1rem; border-radius: .75rem; background: #f8fafc; }
.banking-diagnosis-grid h3 { display: flex; gap: .4rem; font-size: .92rem; font-weight: 800; }
.banking-diagnosis-grid ul { margin: 0; padding-left: 1.1rem; color: #475569; font-size: .86rem; }

.banking-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.banking-source-grid article {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .9rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: .7rem;
    background: #f8fafc;
}
.banking-source-grid span { color: #334155; font-weight: 700; }
.banking-source-grid small { overflow-wrap: anywhere; color: #64748b; }

.banking-credit-overview {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.banking-score-card,
.banking-pillar-panel,
.banking-monitor-card {
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(8, 10, 12, .075);
}

.banking-score-card {
    display: flex;
    min-height: 190px;
    padding: 16px;
    flex-direction: column;
    border-left: 4px solid #078157;
    background: #fbfffd;
}

.banking-score-card > span {
    color: #475467;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.banking-score-card > strong {
    margin-top: 8px;
    color: #087a4b;
    font-size: 2rem;
    line-height: 1;
}

.banking-score-card > b { margin-top: 6px; color: #122044; font-size: .94rem; }
.banking-score-card > em { margin-top: 8px; font-size: .84rem; font-style: normal; font-weight: 800; }
.banking-score-card > small { margin-top: auto; padding-top: 12px; color: #667085; font-size: .82rem; line-height: 1.45; }

.banking-pillar-panel { padding: 15px; }
.banking-pillar-panel h3,
.banking-monitor-card h3 {
    margin: 0 0 12px;
    color: #122044;
    font-size: .94rem;
    font-weight: 900;
}

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

.banking-pillar-grid article {
    padding: 11px 12px;
    border: 1px solid #e7edf6;
    border-radius: 7px;
    background: #f8fafc;
}

.banking-pillar-grid span { display: block; color: #667085; font-size: .8rem; font-weight: 800; }
.banking-pillar-grid strong { display: block; margin-top: 6px; color: #122044; font-size: 1.12rem; }

.banking-score-drivers {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.banking-score-drivers strong { color: #475467; font-size: .8rem; }
.banking-score-drivers span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef5ff;
    color: #16479a;
    font-size: .78rem;
    font-weight: 800;
}

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

.banking-monitor-card { overflow: hidden; }
.banking-monitor-card h3 {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #e7edf6;
    background: #f8fbff;
}

.banking-monitor-card h3 i { margin-right: 6px; color: #2459ad; }
.banking-monitor-table { margin: 0; }
.banking-monitor-table th,
.banking-monitor-table td { padding: 11px 12px; border-color: #e7edf6; vertical-align: top; }
.banking-monitor-table th { width: 63%; color: #122044; font-size: .86rem; }
.banking-monitor-table td { text-align: right; }
.banking-monitor-table td > strong { display: block; color: #122044; font-size: 1rem; }
.banking-monitor-table td .banking-quality { margin: 5px 0 0; }
.banking-monitor-table td > em { display: block; margin-top: 6px; font-size: .8rem; font-style: normal; font-weight: 800; line-height: 1.35; }
.banking-monitor-table details { margin-top: 5px; color: #667085; font-weight: 400; }
.banking-monitor-table summary { color: #2459ad; cursor: pointer; font-size: .8rem; font-weight: 800; }
.banking-monitor-table details p { margin: 6px 0; font-size: .8rem; line-height: 1.45; }
.banking-monitor-table details code { display: block; color: #475467; font-size: .76rem; white-space: normal; }
.banking-monitor-table details small { display: block; margin-top: 5px; color: #b54708; font-size: .76rem; }

.banking-data-coverage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.banking-data-coverage-grid article {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid #e7edf6;
    border-radius: 7px;
    background: #f8fafc;
}

.banking-data-coverage-grid article i { color: #98a2b3; }
.banking-data-coverage-grid article.is-available i { color: #078157; }
.banking-data-coverage-grid article span { color: #344054; font-size: .84rem; font-weight: 800; }
.banking-data-coverage-grid article strong { color: #667085; font-size: .78rem; }
.banking-data-coverage-grid article.is-available strong { color: #087a4b; }

.banking-multi-year-picker {
    position: relative;
    min-width: 210px;
}
.banking-multi-year-picker > span {
    display: block;
    margin-bottom: 4px;
    color: #475467;
    font-size: .76rem;
    font-weight: 800;
}
.banking-multi-year-picker details { position: relative; }
.banking-multi-year-picker summary {
    min-width: 210px;
    padding: 8px 32px 8px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #122044;
    cursor: pointer;
    font-size: .86rem;
    font-weight: 700;
    list-style: none;
}
.banking-multi-year-picker summary::-webkit-details-marker { display: none; }
.banking-multi-year-picker summary::after {
    position: absolute;
    top: 10px;
    right: 11px;
    content: "⌄";
    color: #475467;
}
.banking-year-options {
    position: absolute;
    z-index: 25;
    top: calc(100% + 5px);
    right: 0;
    width: 230px;
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}
.banking-year-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 8px;
    border-radius: 5px;
    color: #122044;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 700;
}
.banking-year-options label:hover { background: #f0f6ff; }
.banking-year-options input { width: 16px; height: 16px; accent-color: #2459ad; }
.banking-year-options input:disabled + span { color: #98a2b3; }
.banking-year-actions {
    display: flex;
    gap: 6px;
    padding: 0 0 7px;
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 4px;
}
.banking-year-actions button {
    padding: 4px 8px;
    border: 1px solid #b9c7db;
    border-radius: 5px;
    background: #f8fbff;
    color: #16479a;
    font-size: .74rem;
    font-weight: 800;
}

.banking-multiple-guide {
    margin-top: 12px;
    padding: 13px 15px;
    border: 1px solid #c9dcf8;
    border-radius: 8px;
    background: #f5f9ff;
    color: #344054;
    font-size: .82rem;
    line-height: 1.45;
}
.banking-multiple-guide > strong { display: block; color: #16479a; font-size: .88rem; }
.banking-multiple-guide > strong i { margin-right: 6px; }
.banking-multiple-guide p { margin: 6px 0; }
.banking-multiple-guide ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 22px; margin: 0; padding-left: 18px; }

.banking-history-legend {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin: -2px 0 9px;
    color: #667085;
    font-size: .7rem;
}
.banking-history-legend span { display: inline-flex; align-items: center; gap: 4px; }
.banking-history-legend .is-improving { color: #087a4b; font-weight: 800; }
.banking-history-legend .is-worsening { color: #c02626; font-weight: 800; }
.banking-history-scroll {
    max-height: min(56vh, 540px);
    overflow: auto;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    scrollbar-gutter: stable;
}
.table-responsive.banking-history-scroll.cfo-sticky-table {
    height: auto !important;
    max-height: min(56vh, 540px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable !important;
}
.banking-history-table { width: 100%; min-width: 820px; margin: 0; table-layout: fixed; }
.banking-history-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 7px 9px;
    border-bottom: 1px solid #cbd5e1;
    background: #eaf0f8;
    color: #122044;
    text-align: right;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}
.banking-history-table thead th:first-child,
.banking-history-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 31%;
    min-width: 245px;
    text-align: left;
}
.banking-history-table thead th:first-child { z-index: 4; }
.banking-history-table thead th small { display: block; color: #2459ad; font-size: .59rem; }
.banking-history-scroll .banking-history-table tbody th,
.banking-history-scroll .banking-history-table tbody td {
    height: 43px;
    padding: 5px 9px !important;
    border-color: #e7edf6;
    vertical-align: middle;
}
html[data-cfo-table-layout] body
.banking-history-scroll.cfo-sticky-table
.banking-history-table > tbody > tr > :is(th, td) {
    height: 43px !important;
    padding: 5px 9px !important;
}
.banking-history-table tbody th { background: #fff; color: #122044; font-size: .76rem; }
.banking-history-label-line { display: flex !important; align-items: center; gap: 7px; min-width: 0; margin: 0 !important; }
.banking-history-label-line b { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.banking-history-label-line small {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    min-height: 17px;
    padding: 2px 5px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #52627a !important;
    font-size: .55rem !important;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}
.banking-history-table tbody th em {
    display: block;
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    color: #667085;
    font-size: .62rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.banking-history-table tbody td {
    min-width: 82px;
    color: #122044;
    text-align: center;
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}
.banking-history-value { display: inline-block; vertical-align: middle; }
.banking-history-trend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin-left: 5px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    vertical-align: middle;
}
.banking-history-trend.is-improving { background: #dcfce7; color: #087a4b; }
.banking-history-trend.is-worsening { background: #fee2e2; color: #c02626; }
.banking-history-table .is-primary { background: #eef7ff; color: #16479a; }

.analysis-bva-toolbar .cfo-measure-toolbar-title { font-size: .82rem; }
.banking-priority-kpis .area-home-status-card > span { font-size: .82rem; }
.banking-priority-kpis .analysis-page-status-note { font-size: .8rem; }
.banking-priority-kpis .analysis-page-status-delta { font-size: .82rem; }

@media (max-width: 1100px) {
    .banking-comparison-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .banking-monitor-grid,
    .banking-data-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .banking-multiple-guide ul { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .banking-period-toolbar,
    .banking-period-controls { align-items: stretch; flex-direction: column; }
    .banking-period-controls label { min-width: 0; }
    .banking-comparison-cards,
    .banking-diagnosis-grid,
    .banking-source-grid,
    .banking-credit-overview,
    .banking-pillar-grid,
    .banking-monitor-grid,
    .banking-data-coverage-grid { grid-template-columns: 1fr; }
    .banking-multi-year-picker,
    .banking-multi-year-picker summary { min-width: 0; width: 100%; }
    .banking-year-options { right: auto; left: 0; width: 100%; }
    .banking-history-scroll { max-height: 480px; }
    .table-responsive.banking-history-scroll.cfo-sticky-table { max-height: 480px !important; }
    .banking-history-table { min-width: 760px; }
    .banking-history-table thead th:first-child,
    .banking-history-table tbody th { width: 220px; min-width: 220px; }
}
