/* ==========================================================================
   reports.css — hand-rolled styles for the reporting dashboards.

   No MudBlazor components are used on these pages, but MudBlazor, Bootstrap
   and vimanager.css all load globally, so:

     1. Every class is prefixed .rpt- to avoid collisions.
     2. Bare elements (input, select, button, table) are explicitly reset
        inside .rpt-root, because Bootstrap styles them aggressively.

   Colours read MudBlazor's palette custom properties, which MudThemeProvider
   emits on :root. That means these pages track whichever theme the user has
   selected — including light/dark — without importing a single Mud component.
   Fallbacks are the BlueGold_Theme values.
   ========================================================================== */

.rpt-root {
    /* --- palette ------------------------------------------------------- */
    --rpt-primary: var(--mud-palette-primary, #1E3A8A);
    --rpt-primary-rgb: var(--mud-palette-primary-rgb, 30, 58, 138);
    --rpt-accent: var(--mud-palette-secondary, #FFD700);
    --rpt-accent-rgb: var(--mud-palette-secondary-rgb, 255, 215, 0);
    --rpt-surface: var(--mud-palette-surface, #FFFFFF);
    --rpt-canvas: var(--mud-palette-background, #FDF8E4);
    --rpt-text: var(--mud-palette-text-primary, #101828);
    --rpt-muted: var(--mud-palette-text-secondary, #5B6472);
    --rpt-line: var(--mud-palette-divider, #C4B998);
    --rpt-error: var(--mud-palette-error, #DC3545);
    --rpt-warning: var(--mud-palette-warning, #FFC107);
    --rpt-success: var(--mud-palette-success, #28A745);
    /* --- type ---------------------------------------------------------- */
    --rpt-sans: "DM Sans", Roboto, system-ui, -apple-system, sans-serif;
    --rpt-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    /* --- geometry ------------------------------------------------------ */
    --rpt-radius: 10px;
    --rpt-radius-sm: 6px;
    --rpt-gap: 0.75rem;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0.75rem 1rem 2rem;
    font-family: var(--rpt-sans);
    color: var(--rpt-text);
    -webkit-font-smoothing: antialiased;
}

    /* --------------------------------------------------------------- resets */
    /* Bootstrap and MudBlazor both style these; take them back locally. */

    .rpt-root *,
    .rpt-root *::before,
    .rpt-root *::after {
        box-sizing: border-box;
    }

    .rpt-root h1,
    .rpt-root h2,
    .rpt-root h3,
    .rpt-root p,
    .rpt-root ul,
    .rpt-root li {
        margin: 0;
        padding: 0;
        list-style: none;
        font-weight: inherit;
    }

    .rpt-root button {
        margin: 0;
        padding: 0;
        border: 0;
        background: none;
        font: inherit;
        color: inherit;
        text-align: inherit;
        cursor: pointer;
        border-radius: var(--rpt-radius-sm);
    }

    .rpt-root input:not([type="checkbox"]):not([type="radio"]),
    .rpt-root select {
        margin: 0;
        font: inherit;
        color: inherit;
        background-color: var(--rpt-surface);
        border: 1px solid var(--rpt-line);
        border-radius: var(--rpt-radius-sm);
        box-shadow: none;
    }

    .rpt-root input[type="checkbox"] {
        margin: 0;
        width: 1rem;
        height: 1rem;
        accent-color: var(--rpt-primary);
        cursor: pointer;
    }

    .rpt-root table {
        width: 100%;
        margin: 0;
        border-collapse: collapse;
        border-spacing: 0;
        color: inherit;
        background: none;
    }

    .rpt-root :focus-visible {
        outline: 2px solid var(--rpt-primary);
        outline-offset: 2px;
    }

/* ---------------------------------------------------------------- header */

.rpt-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--rpt-line);
}

.rpt-eyebrow {
    font-family: var(--rpt-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rpt-muted);
}

.rpt-title {
    margin-top: 0.125rem !important;
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.rpt-lede {
    margin-top: 0.125rem !important;
    font-size: 0.8125rem;
    color: var(--rpt-muted);
}

.rpt-stamp {
    font-family: var(--rpt-mono);
    font-size: 0.75rem;
    color: var(--rpt-muted);
    font-variant-numeric: tabular-nums;
}

.rpt-stamp-sep {
    opacity: 0.5;
    padding: 0 0.35rem;
}

/* --------------------------------------------------------------- toolbar */

.rpt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem 1rem;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.rpt-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.rpt-preset {
    padding: 0.4375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rpt-muted);
    border: 1px solid var(--rpt-line);
    background-color: var(--rpt-surface);
    transition: background-color 0.12s ease, color 0.12s ease;
}

    .rpt-preset:hover {
        color: var(--rpt-text);
        background-color: rgba(var(--rpt-primary-rgb), 0.06);
    }

.rpt-preset-on {
    color: var(--rpt-surface);
    background-color: var(--rpt-primary);
    border-color: var(--rpt-primary);
}

    .rpt-preset-on:hover {
        color: var(--rpt-surface);
        background-color: var(--rpt-primary);
        opacity: 0.9;
    }

.rpt-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rpt-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rpt-field-label {
    font-family: var(--rpt-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rpt-muted);
}

.rpt-input,
.rpt-select {
    padding: 0.4375rem 0.625rem;
    font-size: 0.875rem;
    min-height: 2.25rem;
}

.rpt-input {
    font-family: var(--rpt-mono);
    font-variant-numeric: tabular-nums;
}

.rpt-select {
    padding-right: 1.75rem;
}

/* ----------------------------------------------------------- print group */

.rpt-printgroup {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding-top: 0.25rem;
}

.rpt-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--rpt-muted);
    cursor: pointer;
    user-select: none;
}

    .rpt-check:hover {
        color: var(--rpt-text);
    }

.rpt-print-btn {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rpt-surface);
    background-color: var(--rpt-primary);
    border: 1px solid var(--rpt-primary);
    transition: opacity 0.12s ease;
}

    .rpt-print-btn:hover {
        opacity: 0.88;
    }

/* --------------------------------------------------------------- notices */

.rpt-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
    align-items: baseline;
    padding: 0.875rem 1rem;
    margin-bottom: var(--rpt-gap);
    font-size: 0.875rem;
    border-radius: var(--rpt-radius-sm);
    border-left: 3px solid var(--rpt-line);
    background-color: rgba(var(--rpt-primary-rgb), 0.04);
}

    .rpt-notice strong {
        font-weight: 600;
    }

    .rpt-notice span {
        color: var(--rpt-muted);
    }

.rpt-notice-warn {
    border-left-color: var(--rpt-accent);
    background-color: rgba(var(--rpt-accent-rgb), 0.12);
}

.rpt-notice-error {
    border-left-color: var(--rpt-error);
    background-color: rgba(220, 53, 69, 0.08);
}

.rpt-notice-action,
.rpt-inline-btn {
    font-size: inherit;
    font-weight: 600;
    color: var(--rpt-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rpt-inline-btn {
    margin-left: 0.375rem;
}

/* --------------------------------------------------------------- loading */

.rpt-loading {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 4rem 0;
    justify-content: center;
    font-size: 0.9375rem;
    color: var(--rpt-muted);
}

.rpt-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--rpt-line);
    border-top-color: var(--rpt-primary);
    border-radius: 50%;
    animation: rpt-spin 0.7s linear infinite;
}

@keyframes rpt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* -------------------------------------------------------- currency strip */

.rpt-currency-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.75rem;
    margin-bottom: var(--rpt-gap) !important;
    padding: 0.4375rem 0.625rem;
    background-color: var(--rpt-surface);
    border: 1px solid var(--rpt-line);
    border-radius: var(--rpt-radius-sm);
}

.rpt-currency {
    font-family: var(--rpt-mono);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: var(--rpt-muted);
}

.rpt-currency-on {
    color: var(--rpt-text);
    font-weight: 500;
}

.rpt-currency-count {
    display: inline-block;
    margin-left: 0.375rem;
    padding: 0.0625rem 0.375rem;
    font-size: 0.6875rem;
    border-radius: 999px;
    background-color: rgba(var(--rpt-primary-rgb), 0.1);
}

.rpt-currency-note {
    margin-left: auto;
    font-family: var(--rpt-sans);
    font-size: 0.8125rem;
    color: var(--rpt-muted);
}

/* ----------------------------------------------------------------- tiles */

.rpt-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.625rem;
    margin-bottom: var(--rpt-gap);
}

.rpt-tile {
    min-width: 0;
    padding: 0.625rem 0.75rem 0.6875rem;
    background-color: var(--rpt-surface);
    border: 1px solid var(--rpt-line);
    border-top: 2px solid var(--rpt-primary);
    border-radius: var(--rpt-radius);
}

.rpt-tile-accent {
    border-top-color: var(--rpt-accent);
}

.rpt-tile-label {
    font-family: var(--rpt-mono);
    font-size: 0.625rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--rpt-muted);
}

.rpt-tile-figure {
    margin-top: 0.25rem !important;
    overflow: hidden;
    font-family: var(--rpt-mono);
    font-size: clamp(1.125rem, 1.8vw, 1.4rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rpt-tile-sub {
    margin-top: 0.25rem !important;
    overflow: hidden;
    font-size: 0.75rem;
    color: var(--rpt-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rpt-tile-sep {
    opacity: 0.5;
    padding: 0 0.3rem;
}

/* ------------------------------------------------------------ card shell */

.rpt-card {
    padding: 1rem;
    margin-bottom: var(--rpt-gap);
    background-color: var(--rpt-surface);
    border: 1px solid var(--rpt-line);
    border-radius: var(--rpt-radius);
}

.rpt-card-head {
    margin-bottom: 0.75rem;
}

.rpt-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.rpt-card-note {
    margin-top: 0.1875rem !important;
    font-size: 0.8125rem;
    color: var(--rpt-muted);
}

/* ----------------------------------------------------------------- chart */

.rpt-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: var(--rpt-muted);
}

.rpt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.rpt-swatch {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 2px;
    display: inline-block;
}

.rpt-swatch-alloc {
    background-color: var(--rpt-primary);
}

.rpt-swatch-unalloc {
    background-color: var(--rpt-accent);
}

.rpt-chip-clear {
    margin-left: auto;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rpt-text);
    background-color: rgba(var(--rpt-accent-rgb), 0.2);
    border: 1px solid var(--rpt-accent);
}

.rpt-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.rpt-grid {
    stroke: var(--rpt-line);
    stroke-width: 1;
}

.rpt-grid-minor {
    stroke: var(--rpt-line);
    stroke-width: 1;
}

.rpt-axis-line {
    stroke: var(--rpt-line);
    stroke-width: 1.5;
}

.rpt-axis-x,
.rpt-axis-y {
    font-family: var(--rpt-mono);
    font-size: 13px;
    fill: var(--rpt-muted);
}

.rpt-col {
    cursor: pointer;
}

.rpt-col-hit {
    fill: transparent;
}

.rpt-col:hover .rpt-col-hit,
.rpt-col-on .rpt-col-hit {
    fill: rgba(var(--rpt-primary-rgb), 0.06);
}

.rpt-bar {
    transition: opacity 0.12s ease;
}

.rpt-bar-alloc {
    fill: var(--rpt-primary);
}

.rpt-bar-unalloc {
    fill: var(--rpt-accent);
}

.rpt-col:hover .rpt-bar {
    opacity: 0.82;
}

/* Dim the columns that aren't selected, so the filter is legible. */
.rpt-chart:has(.rpt-col-on) .rpt-col:not(.rpt-col-on) .rpt-bar {
    opacity: 0.32;
}

/* ------------------------------------------------------- breakdown grid */

.rpt-breakdowns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--rpt-gap);
    margin-bottom: var(--rpt-gap);
}

.rpt-panel {
    padding: 1.125rem 1.25rem 1.25rem;
    background-color: var(--rpt-surface);
    border: 1px solid var(--rpt-line);
    border-radius: var(--rpt-radius);
}

.rpt-panel-head {
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--rpt-line);
}

.rpt-panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.rpt-panel-note {
    margin-top: 0.1875rem !important;
    font-size: 0.78125rem;
    color: var(--rpt-muted);
}

.rpt-panel-empty {
    padding: 1.25rem 0;
    font-size: 0.875rem;
    color: var(--rpt-muted);
}

.rpt-bars {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.rpt-bar-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3125rem;
}

.rpt-bar-label {
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rpt-bar-value {
    flex: none;
    font-family: var(--rpt-mono);
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.rpt-bar-track {
    height: 6px;
    border-radius: 3px;
    background-color: rgba(var(--rpt-primary-rgb), 0.09);
    overflow: hidden;
}

.rpt-bar-fill {
    height: 100%;
    border-radius: 3px;
    background-color: var(--rpt-primary);
    transition: width 0.25s ease;
}

.rpt-bar-fill-accent {
    background-color: var(--rpt-accent);
}

.rpt-bar-sub {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.3125rem;
    font-size: 0.75rem;
    color: var(--rpt-muted);
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- table */

.rpt-tablewrap {
    overflow-x: auto;
    border: 1px solid var(--rpt-line);
    border-radius: var(--rpt-radius-sm);
}

.rpt-table {
    font-size: 0.875rem;
    min-width: 860px;
}

    .rpt-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        padding: 0;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
        background-color: var(--rpt-surface);
        border-bottom: 1.5px solid var(--rpt-line);
    }

.rpt-th-num {
    text-align: right;
}

.rpt-th-btn {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-weight: 600;
    color: var(--rpt-muted);
    text-align: inherit;
    border-radius: 0;
    transition: color 0.12s ease, background-color 0.12s ease;
}

.rpt-th-num .rpt-th-btn {
    text-align: right;
}

.rpt-th-btn:hover {
    color: var(--rpt-text);
    background-color: rgba(var(--rpt-primary-rgb), 0.05);
}

.rpt-th-on .rpt-th-btn {
    color: var(--rpt-primary);
}

.rpt-th-plain {
    padding: 0.625rem 0.75rem;
    color: var(--rpt-muted);
}

.rpt-table tbody td {
    padding: 0.5625rem 0.75rem;
    border-bottom: 1px solid var(--rpt-line);
    vertical-align: middle;
}

.rpt-table tbody tr:last-child td {
    border-bottom: 0;
}

.rpt-table tbody tr:hover td {
    background-color: rgba(var(--rpt-primary-rgb), 0.035);
}

.rpt-num {
    font-family: var(--rpt-mono);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rpt-num-strong {
    font-weight: 500;
}

.rpt-ref {
    font-family: var(--rpt-mono);
    font-size: 0.8125rem;
    max-width: 14ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rpt-table tfoot td {
    padding: 0.6875rem 0.75rem;
    font-weight: 600;
    border-top: 1.5px solid var(--rpt-line);
    background-color: rgba(var(--rpt-primary-rgb), 0.04);
}

.rpt-tablefoot {
    margin-top: 0.75rem !important;
    font-size: 0.8125rem;
    color: var(--rpt-muted);
}

/* -------------------------------------------------------- pills / flags */

.rpt-pill {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 999px;
}

.rpt-pill-ok {
    color: var(--rpt-primary);
    background-color: rgba(var(--rpt-primary-rgb), 0.1);
}

.rpt-pill-warn {
    color: var(--rpt-text);
    background-color: rgba(var(--rpt-accent-rgb), 0.28);
}

.rpt-flag {
    font-family: var(--rpt-sans);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--rpt-muted);
}

/* ----------------------------------------------------------- empty state */

.rpt-empty {
    padding: 3rem 1rem;
    text-align: center;
}

.rpt-empty-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.rpt-empty-hint {
    margin-top: 0.25rem !important;
    font-size: 0.875rem;
    color: var(--rpt-muted);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
    .rpt-root {
        padding: 0.75rem 0.75rem 2rem;
    }

    .rpt-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

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

    .rpt-currency-note {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .rpt-fields {
        gap: 0.625rem;
    }

    .rpt-field {
        flex: 1 1 8rem;
    }

    .rpt-tiles {
        grid-template-columns: 1fr 1fr;
    }

    .rpt-axis-x,
    .rpt-axis-y {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .rpt-tiles {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------- print / a11y */

@media (prefers-reduced-motion: reduce) {
    .rpt-root *,
    .rpt-root *::before,
    .rpt-root *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

@page {
    size: A4 landscape;
    margin: 10mm;
}

@media print {
    /* Interactive controls are not useful on paper. */
    .rpt-toolbar,
    .rpt-chip-clear,
    .rpt-tablefoot,
    .rpt-notice-action,
    .rpt-inline-btn {
        display: none !important;
    }

    /* Sections explicitly excluded by the page. */
    .rpt-no-print {
        display: none !important;
    }

    .rpt-root {
        --rpt-gap: 3mm;
        max-width: none;
        margin: 0;
        padding: 0;
        font-size: 9pt;
    }

    /* Compact, single-line report heading. */
    .rpt-head {
        flex-wrap: nowrap;
        align-items: baseline;
        gap: 8mm;
        margin: 0 0 2.5mm;
        padding: 0 0 2.5mm;
        break-after: avoid;
    }

    .rpt-eyebrow,
    .rpt-lede {
        display: none !important;
    }

    .rpt-title {
        margin: 0 !important;
        font-size: 16pt;
        line-height: 1;
        white-space: nowrap;
    }

    .rpt-stamp {
        margin-left: auto;
        font-size: 8pt;
        white-space: nowrap;
    }

    /* Compact currency information line. */
    .rpt-currency-strip {
        flex-wrap: nowrap;
        gap: 4mm;
        margin: 0 0 2.5mm !important;
        padding: 1.5mm 0 2mm;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--rpt-line);
        border-radius: 0;
        break-after: avoid;
    }

    .rpt-currency {
        font-size: 8pt;
        white-space: nowrap;
    }

    .rpt-currency-count {
        margin-left: 1mm;
        padding: 0 1mm;
        font-size: 6.5pt;
    }

    .rpt-currency-note {
        display: none !important;
    }

    /* Render the four KPI cards as one compact summary strip. */
    .rpt-tiles {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
        margin: 0 0 3mm;
        border-top: 1px solid var(--rpt-line);
        border-bottom: 1px solid var(--rpt-line);
        break-after: avoid;
    }

    .rpt-tile,
    .rpt-tile-accent {
        min-width: 0;
        padding: 2mm 3mm;
        background: transparent;
        border: 0;
        border-right: 1px solid var(--rpt-line);
        border-radius: 0;
    }

        .rpt-tile:last-child {
            border-right: 0;
        }

    .rpt-tile-label {
        font-size: 6.5pt;
        letter-spacing: 0.08em;
    }

    .rpt-tile-figure {
        margin-top: 1mm !important;
        overflow: visible;
        font-size: 12pt;
        line-height: 1;
        text-overflow: clip;
        white-space: nowrap;
    }

    .rpt-tile-sub {
        margin-top: 0.75mm !important;
        overflow: visible;
        font-size: 7pt;
        line-height: 1.15;
        text-overflow: clip;
        white-space: nowrap;
    }

    /* General report sections. */
    .rpt-card {
        margin-bottom: 3mm;
        padding: 3mm;
        border-radius: 0;
    }

    .rpt-card-head {
        margin-bottom: 2mm;
    }

    .rpt-card-title {
        font-size: 10pt;
    }

    .rpt-card-note {
        margin-top: 0.5mm !important;
        font-size: 7.5pt;
    }

    .rpt-legend {
        margin-bottom: 1.5mm;
        font-size: 7.5pt;
    }

    .rpt-chart-svg {
        max-height: 95mm;
    }

    .rpt-axis-x,
    .rpt-axis-y {
        font-size: 11px;
    }

    /* A selected screen filter should not dim the printed chart. */
    .rpt-chart:has(.rpt-col-on) .rpt-col:not(.rpt-col-on) .rpt-bar {
        opacity: 1 !important;
    }

    .rpt-col-hit {
        display: none;
    }

    .rpt-breakdowns {
        grid-template-columns: 1fr 1fr;
        gap: 3mm;
        margin-bottom: 3mm;
    }

    .rpt-panel {
        padding: 3mm;
        border-radius: 0;
    }

    .rpt-panel-head {
        margin-bottom: 2mm;
        padding-bottom: 1.5mm;
    }

    .rpt-panel-title {
        font-size: 9pt;
    }

    .rpt-panel-note,
    .rpt-panel-empty {
        font-size: 7.5pt;
    }

    .rpt-bars {
        gap: 2mm;
    }

    .rpt-bar-meta {
        margin-bottom: 0.75mm;
    }

    .rpt-bar-label,
    .rpt-bar-value {
        font-size: 8pt;
    }

    .rpt-bar-sub {
        margin-top: 0.75mm;
        font-size: 7pt;
    }

    .rpt-bar-track {
        height: 1.5mm;
    }

    /* Preserve meaningful fills and chart colours. */
    .rpt-panel,
    .rpt-card,
    .rpt-bar-track,
    .rpt-bar-fill,
    .rpt-bar,
    .rpt-pill,
    .rpt-notice,
    .rpt-currency-count,
    .rpt-table tfoot td {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rpt-card,
    .rpt-panel,
    .rpt-tile {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
    }

    /* Let long tables paginate normally. */
    .rpt-tablewrap {
        overflow: visible;
        border-radius: 0;
    }

    .rpt-table {
        min-width: 0;
        font-size: 7.5pt;
    }

        .rpt-table thead {
            display: table-header-group;
        }

        .rpt-table tfoot {
            display: table-footer-group;
        }

        .rpt-table thead th {
            position: static;
        }

    .rpt-th-btn,
    .rpt-th-plain {
        padding: 1.5mm 2mm;
    }

    .rpt-table tbody td,
    .rpt-table tfoot td {
        padding: 1.5mm 2mm;
    }

    .rpt-table tbody tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .rpt-pill,
    .rpt-flag {
        font-size: 7pt;
    }

    .rpt-notice {
        margin-bottom: 3mm;
        padding: 2mm 3mm;
        font-size: 8pt;
    }

    .rpt-empty {
        padding: 8mm 3mm;
    }
}
