html, body {
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f4f7f6;
    color: #1d2939;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.hero {
    background: #ffffff;
    border: 1px solid #d9e2e2;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    padding: 1.35rem;
}

.hero-copy {
    min-width: 0;
}

.eyebrow {
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.05;
    margin: 0;
}

.lede {
    color: #475467;
    margin: 0.75rem 0 0;
    max-width: 820px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.hero-facts span,
.snapshot-mode {
    background: #eef6f5;
    border: 1px solid #cfe2df;
    border-radius: 999px;
    color: #0f766e;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.34rem 0.65rem;
}

.hero-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex-shrink: 0;
}

.refresh-button {
    border: 0;
    border-radius: 6px;
    background: #0f766e;
    color: white;
    font-weight: 700;
    min-width: 112px;
    padding: 0.7rem 1rem;
}

.refresh-button:disabled {
    background: #78928f;
}

.review-banner {
    align-items: center;
    background: #0b3b3a;
    border: 1px solid #0f5f59;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.review-banner span {
    color: #9fe4d9;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.review-banner strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.15;
}

.review-banner p {
    color: #d6f4ef;
    margin: 0.25rem 0 0;
    max-width: 860px;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.review-actions a,
.review-actions span {
    background: #ffffff;
    border-radius: 6px;
    color: #0b3b3a;
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.5rem 0.7rem;
    text-decoration: none;
}

.review-actions a:hover {
    background: #d6f4ef;
}

.score-band,
.panel,
.loading-panel,
.alert-message {
    background: #ffffff;
    border: 1px solid #d9e2e2;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.score-band {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(230px, auto) minmax(240px, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.score-summary span,
.score-number span,
.panel-header span {
    color: #667085;
    display: block;
    font-size: 0.86rem;
}

.score-summary strong {
    color: #1d2939;
    display: block;
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.score-number {
    text-align: center;
}

.score-number strong {
    color: #b42318;
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 0.95;
}

.score-number small {
    color: #667085;
    font-weight: 700;
}

.score-number em {
    border-radius: 999px;
    display: block;
    font-style: normal;
    font-weight: 800;
    margin: 0.5rem auto 0;
    max-width: max-content;
    padding: 0.28rem 0.7rem;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 0.85rem;
}

.pillar-card {
    background: #ffffff;
    border: 1px solid #d9e2e2;
    border-radius: 8px;
    min-height: 170px;
    padding: 1rem;
}

.pillar-name {
    color: #667085;
    display: block;
    font-size: 0.9rem;
    margin-top: 0.7rem;
}

.pillar-band {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.15;
    max-width: 100%;
    padding: 0.24rem 0.55rem;
    white-space: nowrap;
}

.band-low {
    background-color: #ecfdf3;
    color: #027a48;
}

.band-moderate {
    background-color: #fffaeb;
    color: #b54708;
}

.band-high {
    background-color: #fff1f3;
    color: #c01048;
}

.band-very-high {
    background-color: #fef3f2;
    color: #b42318;
}

.pillar-value {
    color: #101828;
    display: block;
    font-size: 1.9rem;
    margin: 0.2rem 0 0.65rem;
}

.meter {
    background: #e7eeee;
    border-radius: 999px;
    height: 0.55rem;
    overflow: hidden;
}

.meter div {
    height: 100%;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.chart-legend span {
    align-items: center;
    color: #475467;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 0.45rem;
}

.legend-line {
    border-radius: 999px;
    display: inline-block;
    height: 0.22rem;
    width: 2rem;
}

.analytics-controls {
    background: #fbfdfd;
    border: 1px solid #d9e2e2;
    border-radius: 8px;
    display: grid;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    padding: 0.85rem;
}

.analytics-controls summary {
    color: #1d2939;
    cursor: pointer;
    font-weight: 800;
}

.analytics-panel .analytics-controls {
    margin-bottom: 0;
}

.legacy-integrity-note {
    background: #eef6f5;
    border: 1px solid #cfe2df;
    border-radius: 7px;
    color: #344054;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
}

.legacy-integrity-note strong {
    color: #0f766e;
}

.control-actions,
.analytics-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.control-actions button {
    background: #ffffff;
    border: 1px solid #cbd5d5;
    border-radius: 6px;
    color: #344054;
    font-weight: 700;
    padding: 0.45rem 0.7rem;
}

.control-actions button:hover {
    background: #eef6f5;
    border-color: #0f766e;
    color: #0f766e;
}

.analytics-summary span {
    background: #ffffff;
    border: 1px solid #e4ebeb;
    border-radius: 999px;
    color: #475467;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.32rem 0.62rem;
}

.signal-table {
    max-height: 390px;
    overflow: auto;
}

.signal-table strong,
.signal-table small {
    display: block;
}

.signal-table small {
    color: #667085;
    margin-top: 0.12rem;
}

.signal-table input[type="checkbox"] {
    height: 1rem;
    width: 1rem;
}

.weight-input {
    background: #ffffff;
    border: 1px solid #cbd5d5;
    border-radius: 6px;
    color: #344054;
    max-width: 6rem;
    padding: 0.35rem 0.45rem;
    width: 100%;
}

.weight-input:disabled {
    background: #f2f4f4;
    color: #98a2b3;
}

.zoom-controls {
    background: #f8fbfb;
    border: 1px solid #e4ebeb;
    border-radius: 8px;
    display: grid;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    padding: 0.85rem;
}

.zoom-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.zoom-buttons button {
    background: #ffffff;
    border: 1px solid #cbd5d5;
    border-radius: 6px;
    color: #344054;
    font-weight: 700;
    padding: 0.45rem 0.7rem;
}

.zoom-buttons button:hover {
    background: #eef6f5;
    border-color: #0f766e;
}

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

.range-controls label {
    color: #475467;
    display: grid;
    font-size: 0.9rem;
    gap: 0.35rem;
}

.range-controls input {
    width: 100%;
}

.range-controls strong {
    color: #1d2939;
}

.zoom-summary {
    color: #667085;
    font-size: 0.9rem;
}

.nmi-line {
    background: #0f766e;
}

.classic-line {
    background: #b42318;
}

.chart-wrap {
    overflow-x: auto;
}

.history-chart {
    display: block;
    min-width: 720px;
    width: 100%;
}

.axis-line {
    stroke: #98a2b3;
    stroke-width: 1.2;
}

.grid-line {
    stroke: #edf2f2;
    stroke-width: 1;
}

.axis-label {
    fill: #667085;
    font-size: 13px;
}

.chart-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.nmi-path {
    stroke: #0f766e;
}

.classic-path {
    stroke: #b42318;
}

.chart-hit-area {
    cursor: crosshair;
    fill: transparent;
    pointer-events: all;
}

.chart-hit-area:hover {
    fill: rgba(15, 118, 110, 0.08);
}

.chart-marker-line {
    stroke: #344054;
    stroke-dasharray: 4 5;
    stroke-width: 1.2;
}

.chart-marker-point {
    fill: #ffffff;
    stroke: #0f766e;
    stroke-width: 3;
}

.chart-pin-label {
    pointer-events: none;
}

.chart-pin-label rect {
    fill: #0f766e;
    stroke: #ffffff;
    stroke-width: 1.4;
}

.chart-pin-label text {
    fill: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.chart-inspector {
    background: #fbfdfd;
    border: 1px solid #d9e2e2;
    border-radius: 8px;
    display: grid;
    gap: 0.85rem;
    margin-top: 0.9rem;
    padding: 0.9rem;
}

.chart-inspector.is-pinned {
    border-color: #0f766e;
    box-shadow: inset 4px 0 0 #0f766e;
}

.inspector-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.inspector-header span {
    color: #667085;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.inspector-header strong {
    color: #1d2939;
    display: block;
    font-size: 1.4rem;
}

.inspector-actions,
.source-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inspector-actions a,
.inspector-actions button,
.source-links a {
    background: #ffffff;
    border: 1px solid #cbd5d5;
    border-radius: 6px;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.34rem 0.5rem;
    text-decoration: none;
}

.inspector-actions button {
    cursor: pointer;
}

.inspector-actions a:hover,
.inspector-actions button:hover,
.source-links a:hover {
    background: #eef6f5;
    border-color: #0f766e;
    color: #0f766e;
}

.inspector-stats,
.inspector-pillars {
    display: grid;
    gap: 0.55rem;
}

.inspector-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inspector-pillars {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.inspector-stats span,
.inspector-pillars span {
    background: #ffffff;
    border: 1px solid #e4ebeb;
    border-radius: 7px;
    color: #475467;
    padding: 0.6rem 0.65rem;
}

.inspector-stats b,
.inspector-pillars b {
    color: #1d2939;
    display: block;
    font-size: 1rem;
}

.inspector-pillars small {
    color: #667085;
    display: block;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.inspector-table {
    max-height: 430px;
    overflow: auto;
}

.chart-note {
    color: #667085;
    font-size: 0.9rem;
    margin: 0.35rem 0 0;
}

.method-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-grid h3 {
    color: #1d2939;
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}

.method-grid p {
    color: #475467;
    font-size: 0.92rem;
    margin: 0;
}

.formula-box {
    background: #f8fbfb;
    border: 1px solid #d9e2e2;
    border-radius: 8px;
    color: #344054;
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.85rem;
}

.formula-box strong {
    color: #1d2939;
}

.coverage-box {
    background: #eef6f5;
    border: 1px solid #cfe2df;
    border-radius: 8px;
    color: #344054;
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.85rem;
}

.coverage-box strong {
    color: #0f766e;
}

.scale-box {
    background: #f8fbfb;
    border: 1px solid #d9e2e2;
    border-radius: 8px;
    color: #344054;
    margin-bottom: 1rem;
    padding: 0.9rem;
}

.scale-box strong {
    color: #1d2939;
    display: block;
    margin-bottom: 0.25rem;
}

.scale-box p {
    color: #475467;
    margin: 0 0 0.75rem;
}

.score-bands {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.score-bands span {
    background: #ffffff;
    border: 1px solid #e4ebeb;
    border-radius: 7px;
    color: #475467;
    padding: 0.55rem 0.65rem;
}

.score-bands b {
    color: #1d2939;
    display: block;
}

.pillar-meaning-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pillar-meaning-grid article {
    background: #fbfdfd;
    border: 1px solid #e4ebeb;
    border-radius: 8px;
    padding: 0.9rem;
}

.pillar-meaning-grid h3 {
    font-size: 0.98rem;
    margin: 0 0 0.45rem;
}

.pillar-current {
    color: #b42318;
    display: block;
    font-size: 0.86rem;
    margin-bottom: 0.55rem;
}

.pillar-meaning-grid p {
    color: #475467;
    font-size: 0.9rem;
    margin: 0 0 0.7rem;
}

.pillar-meaning-grid span {
    color: #0f766e;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
}

.definition-note {
    color: #667085;
    font-size: 0.9rem;
    margin: 0.9rem 0 0;
}

.steward-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steward-card {
    background: #fbfdfd;
    border: 1px solid #e4ebeb;
    border-radius: 8px;
    color: #344054;
    display: grid;
    gap: 0.35rem;
    min-height: 145px;
    padding: 0.85rem;
    text-decoration: none;
}

.steward-card:hover {
    background: #f7fbfa;
    color: #1d2939;
}

.steward-card strong {
    color: #1d2939;
}

.steward-card span {
    color: #475467;
    font-size: 0.9rem;
}

.steward-card small {
    color: #667085;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1rem;
}

.panel {
    padding: 1rem;
}

.panel-header {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.panel-header h2 {
    font-size: 1.05rem;
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}

th,
td {
    border-bottom: 1px solid #edf2f2;
    padding: 0.65rem 0.5rem;
    vertical-align: top;
}

td {
    color: #344054;
}

.compact td,
.compact th {
    padding: 0.52rem 0.45rem;
}

.source-list {
    display: grid;
    gap: 0.55rem;
}

.source-row {
    align-items: center;
    border: 1px solid #e4ebeb;
    border-radius: 7px;
    color: #344054;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    text-decoration: none;
}

.source-row:hover {
    background: #f7fbfa;
    color: #1d2939;
}

.source-row strong,
.source-row small {
    display: block;
}

.source-row small {
    color: #667085;
    margin-top: 0.15rem;
}

.source-row > span:last-child {
    color: #475467;
    flex-shrink: 0;
    font-size: 0.88rem;
    text-align: right;
}

.source-ok {
    border-left: 4px solid #0f766e;
}

.source-missing {
    border-left: 4px solid #b42318;
}

.source-planned {
    border-left: 4px solid #d97706;
}

.loading-panel,
.alert-message {
    padding: 1rem;
}

.alert-message {
    border-color: #fecdca;
    color: #b42318;
}

@media (max-width: 940px) {
    .hero,
    .review-banner,
    .panel-header,
    .source-row {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions {
        align-items: stretch;
        width: 100%;
    }

    .snapshot-mode,
    .refresh-button,
    .review-actions a,
    .review-actions span {
        text-align: center;
    }

    .review-actions {
        flex-direction: column;
    }

    .score-band,
    .content-grid,
    .method-grid,
    .pillar-meaning-grid,
    .steward-grid,
    .score-bands,
    .inspector-stats,
    .inspector-pillars,
    .range-controls {
        grid-template-columns: 1fr;
    }

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

    .score-number {
        text-align: left;
    }

    .score-number em {
        margin-left: 0;
    }

    .source-row > span:last-child {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .hero h1 {
        font-size: 2rem;
    }

    .pillar-grid {
        grid-template-columns: 1fr;
    }
}
