/* Shared Hyper analytics components. Keep project-specific rules in local CSS. */

.stat-shell {
    max-width: 1500px;
    margin: 0 auto;
    color: var(--MFText);
}

.stat-page-layout {
    align-items: flex-start;
}

.stat-page-sidebar {
    align-self: flex-start;
}

.stat-side-nav {
    margin-bottom: 5rem;
}

.stat-page-sidebar--with-top {
    padding-bottom: 5rem;
}

.stat-page-sidebar--with-top .stat-side-nav {
    margin-bottom: 0;
}

.stat-scroll-top-btn {
    display: flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0 0 auto;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.stat-scroll-top-btn.btn-white:hover,
.stat-scroll-top-btn.btn-white:focus,
.stat-scroll-top-btn.btn-white:not(:disabled):not(.disabled):active {
    background-color: var(--white);
    border-color: var(--white);
}

.stat-scroll-top-btn:not(:disabled):not(.disabled):hover {
    opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
    .stat-scroll-top-btn {
        transition: opacity 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }
}

@media (min-width: 1367px) {
    .stat-page-layout--sticky > .col-xl-2 {
        align-self: stretch;
        padding-bottom: 5rem;
    }

    .stat-page-layout--sticky .stat-page-sidebar {
        position: sticky;
        top: 1rem;
        z-index: 10;
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 2rem);
        max-height: calc(100dvh - 2rem);
        padding-bottom: 0;
    }

    .stat-page-layout--sticky .stat-side-nav {
        flex: 0 1 auto;
        min-height: 0;
        margin-bottom: 0;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .stat-page-layout--sticky .stat-scroll-top-btn {
        flex-shrink: 0;
    }
}

.stat-side-nav-title {
    margin-bottom: 0.9rem;
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.stat-side-nav-section + .stat-side-nav-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(95, 112, 127, 0.1);
}

.stat-side-nav-heading {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--secondary);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.stat-side-nav-heading:hover,
.stat-side-nav-heading.is-current {
    color: var(--primary);
}

.stat-side-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-side-nav-link {
    display: block;
    padding: 0.25rem 0;
    color: var(--MFText);
    font-size: 0.8125rem;
    line-height: 1.3;
    text-decoration: none;
}

.stat-side-nav-link:hover,
.stat-side-nav-link.is-active {
    color: var(--primary);
}

.stat-side-nav-link.is-active {
    font-weight: 600;
}

.stat-mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.stat-mobile-nav-panel {
    margin-top: 0.5rem;
    padding: 1rem 1rem 0.5rem;
    background: #fff;
    border: 1px solid rgba(95, 112, 127, 0.12);
    border-radius: 0.9rem;
    box-shadow: 0 0 35px rgba(154, 161, 171, 0.15);
}

.stat-mobile-nav-panel .stat-side-nav-title {
    display: none;
}

.stat-summary-card {
    margin-bottom: 1.5rem;
}

.stat-card-gradient {
    border: 1px solid var(--MFBorder);
    background: linear-gradient(
        135deg,
        rgba(0, 97, 150, 0.055),
        rgba(61, 154, 197, 0.1) 22%,
        #f8f6f2 100%
    );
}

.stat-summary-strip {
    gap: 1rem;
}

.stat-section {
    scroll-margin-top: 1rem;
}

.stat-section + .stat-section {
    margin-top: 1rem;
}

.stat-section-heading {
    margin-bottom: 1rem;
}

.stat-grid-row {
    row-gap: 1rem;
}

.stat-overview-header {
    display: flex;
    min-height: 4.5rem;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-overview-header-copy {
    min-width: 0;
}

.stat-overview-description {
    max-width: 26rem;
}

.stat-overview-icon {
    display: inline-flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 38px 38px;
}

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

.stat-overview-stat {
    min-width: 0;
    padding: 0.8rem 0.9rem;
}

.stat-overview-value,
.stat-overview-caption {
    display: block;
}

.stat-overview-value {
    margin-bottom: 0.25rem;
    color: var(--MFText);
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
}

.stat-overview-caption {
    min-height: 1.95rem;
    color: var(--secondary);
    font-size: 0.75rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.stat-metric-panel {
    min-width: 0;
    padding: 0.875rem 1rem;
    border: 1px solid var(--MFBorder);
    border-radius: 0.75rem;
    background: var(--white, #fff);
}

.stat-metric-label,
.stat-metric-value,
.stat-metric-caption {
    display: block;
}

.stat-metric-label {
    color: var(--MFText);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.stat-metric-value {
    margin-top: 0.5rem;
    color: var(--MFText);
    font-size: 1.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-metric-caption {
    margin-top: 0.35rem;
    color: var(--secondary);
    font-size: 0.75rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.stat-overview-stack {
    display: flex;
    height: 12px;
    overflow: hidden;
    background: var(--MFBg);
}

.stat-overview-segment {
    display: block;
    height: 100%;
}

.stat-overview-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    margin-top: 0.75rem;
}

.stat-overview-legend-item {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    color: var(--secondary);
    font-size: 0.75rem;
    line-height: 1.2;
}

.stat-overview-legend-item strong {
    color: var(--MFText);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stat-overview-legend-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 2px;
}

@media (max-width: 420px) {
    .stat-overview-pair {
        grid-template-columns: 1fr;
    }
}

.stat-kpi-row--compact {
    row-gap: 0;
}

.stat-kpi-title {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.stat-kpi-title--compact {
    font-size: 0.8rem;
    letter-spacing: -0.01em;
}

.stat-kpi-title--fit {
    font-size: 0.75rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.stat-kpi-card-layout {
    display: flex;
    min-height: 7.5rem;
    flex-direction: column;
}

.stat-kpi-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 0.75rem;
    align-items: start;
}

.stat-kpi-art {
    display: block;
    width: 70px;
    height: 70px;
    min-height: 70px;
    flex: 0 0 auto;
    background-color: var(--MFBg);
    background-repeat: no-repeat;
    background-size: 60px;
    background-position: center;
    border-radius: 1rem;
}

.stat-kpi-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.stat-kpi-value {
    display: block;
    margin-top: 0.75rem;
    color: var(--MFText);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.05;
    white-space: nowrap;
}

.stat-kpi-change-row {
    margin-top: 0.5rem;
    line-height: 1;
}

.stat-kpi-change {
    flex: 0 0 auto;
    padding: 0.2rem 0.38rem;
    font-size: 0.6875rem;
    line-height: 1.1;
    white-space: nowrap;
}

.stat-kpi-description {
    width: 100%;
    margin-top: 0.65rem;
    line-height: 1.35;
}

.stat-chart-wrap {
    position: relative;
    height: 260px;
}

.stat-chart-wrap--sm {
    height: 200px;
}

.stat-chart-card-body {
    display: flex;
    flex-direction: column;
}

.stat-chart-wrap--fill {
    min-height: 200px;
    height: auto;
    flex: 1 1 200px;
}

.stat-chart-wrap--lg {
    height: 320px;
}

.stat-pie-side {
    display: grid;
    min-height: 16rem;
    grid-template-columns: minmax(9rem, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: center;
}

.stat-pie-side-chart {
    position: relative;
    width: 100%;
    max-width: 10.5rem;
    height: 10.5rem;
    justify-self: center;
}

.stat-pie-side--compact {
    min-height: 8rem;
    grid-template-columns: minmax(7.75rem, 0.8fr) minmax(0, 1.2fr);
}

.stat-pie-side--compact .stat-pie-side-chart {
    max-width: 7.75rem;
    height: 7.75rem;
}

.stat-pie-side-center {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--secondary);
    line-height: 1.1;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.stat-pie-side-center strong {
    color: var(--MFText);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.stat-pie-side-center span {
    margin-top: 0.2rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
}

.stat-pie-side-legend {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-pie-side-legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
}

.stat-pie-side-legend-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.2rem;
    border-radius: 0.2rem;
}

.stat-pie-side-legend-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.stat-pie-side-legend-name {
    display: block;
    min-width: 0;
    color: var(--secondary);
    font-size: 0.75rem;
    line-height: 1.3;
}

.stat-pie-side-legend-value {
    display: block;
    margin-top: 0.15rem;
    color: var(--MFText);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.stat-hlist {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stat-hlist--sm {
    gap: 0.5rem;
}

.stat-hlist-item {
    display: block;
}

.stat-hlist-bar {
    width: 100%;
    height: 6px;
    margin-bottom: 0.35rem;
    overflow: hidden;
    background: rgba(0, 97, 150, 0.08);
    border-radius: 999px;
}

.stat-hlist--sm .stat-hlist-bar {
    height: 6px;
    min-height: 6px;
    max-height: 6px;
    box-sizing: border-box;
    line-height: 0;
}

.stat-hlist--sm .stat-hlist-fill {
    height: 6px;
    min-height: 6px;
    max-height: 6px;
    box-sizing: border-box;
    line-height: 0;
}

.stat-hlist--md .stat-hlist-bar {
    height: 12px;
    min-height: 12px;
    max-height: 12px;
    box-sizing: border-box;
    line-height: 0;
}

.stat-hlist--md .stat-hlist-fill {
    height: 12px;
    min-height: 12px;
    max-height: 12px;
    box-sizing: border-box;
    line-height: 0;
}

/* MD rating bars use the same rounded-rectangle geometry as stacked ratings. */
.stat-hlist--md:not(.stat-hlist--thick) .stat-hlist-bar,
.stat-hlist--md:not(.stat-hlist--thick) .stat-hlist-fill {
    border-radius: 0.25rem;
}

.stat-hlist--xl .stat-hlist-bar {
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    box-sizing: border-box;
    border-radius: 0.25rem;
    line-height: 0;
}

.stat-hlist--xl .stat-hlist-fill {
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    box-sizing: border-box;
    border-radius: 0.25rem;
    line-height: 0;
}

.stat-hlist--xl .stat-hlist-stack {
    border-radius: 0.25rem;
}

.stat-hlist-fill {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}

.stat-hlist-fill--sand {
    background: var(--MFSand);
}

.stat-hlist-fill--secondary {
    background: var(--secondary);
}

.stat-hlist-fill--danger {
    background: var(--danger);
}

.stat-hlist--thick .stat-hlist-bar {
    height: 12px;
    border-radius: 0.25rem;
}

.stat-hlist--thick .stat-hlist-stack {
    border-radius: 0.25rem;
}

.stat-hlist-stack {
    display: flex;
    height: 100%;
    overflow: hidden;
    border-radius: 999px;
}

.stat-hlist-segment {
    display: block;
    height: 100%;
}

.stat-hlist-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.stat-hlist-label {
    color: var(--secondary);
    font-size: 0.875rem;
    line-height: 1.35;
}

.stat-hlist-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-bottom: 1rem;
}

.stat-hlist-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--secondary);
    font-size: 0.8125rem;
}

.stat-hlist-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 0.2rem;
}

.stat-segmented-bar {
    display: flex;
    width: 100%;
    height: 28px;
    overflow: hidden;
    background: var(--MFBg);
    border-radius: 0.25rem;
}

.stat-segmented-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.stat-segmented-section--primary {
    background: var(--primary);
}

.stat-segmented-section--sand {
    background: var(--MFSand);
}

.stat-segmented-section--secondary {
    background: var(--secondary);
}

.stat-segmented-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 0.85rem;
}

.stat-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--secondary);
    font-size: 0.8125rem;
}

.stat-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 0.2rem;
}

.stat-tone-primary {
    background: var(--primary);
}

.stat-tone-sand {
    background: var(--MFSand);
}

.stat-tone-secondary {
    background: var(--secondary);
}

.stat-tone-danger {
    background: var(--danger);
}

.stat-tone-success {
    background: var(--success);
}

.stat-tone-info {
    background: var(--info);
}

.stat-tone-warning {
    background: var(--warning);
}

.stat-tone-dark {
    background: var(--dark);
}

.stat-tone-primary-muted {
    background: var(--primary);
    opacity: 0.65;
}

.stat-tone-secondary-muted {
    background: var(--secondary);
    opacity: 0.65;
}

.stat-treemap {
    display: flex;
    min-height: 16rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stat-treemap-tile {
    display: flex;
    min-width: calc(33.333% - 0.5rem);
    min-height: 6.5rem;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem;
    overflow: hidden;
    color: #fff;
}

.stat-treemap--balanced {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(8rem, 1fr);
}

.stat-treemap--balanced .stat-treemap-tile {
    min-width: 0;
    min-height: 8rem;
}

.stat-treemap-label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.stat-treemap-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.stat-heatmap-scroll {
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.stat-heatmap-grid {
    display: grid;
    min-width: 760px;
    grid-template-columns: 32px repeat(12, minmax(42px, 1fr));
    gap: 0.3rem;
    align-items: center;
}

.stat-heatmap-hour,
.stat-heatmap-day {
    color: var(--secondary);
    font-size: 0.6875rem;
    text-align: center;
}

.stat-heatmap-day {
    text-align: left;
}

.stat-heatmap-cell {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
}

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

.stat-morph-value {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--primary);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-record {
    display: grid;
    min-height: 60px;
    grid-template-columns: 60px minmax(2rem, 1fr) auto minmax(2rem, 1fr) 60px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem 1.25rem;
}

.stat-record-end {
    display: flex;
    width: 60px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--primary);
    border-radius: 0.5rem;
    opacity: 0.86;
}

.stat-record-end-icon {
    display: block;
    width: 18px;
    height: 18px;
}

.stat-record-pointer {
    position: relative;
    display: block;
    height: 1px;
    background: var(--secondary);
}

.stat-record-pointer--left::before,
.stat-record-pointer--right::after {
    position: absolute;
    top: -3px;
    width: 0;
    height: 0;
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
    content: "";
}

.stat-record-pointer--left::before {
    left: 0;
    border-right: 6px solid var(--secondary);
}

.stat-record-pointer--right::after {
    right: 0;
    border-left: 6px solid var(--secondary);
}

.stat-record-value {
    color: var(--MFText);
    font-size: 1.25rem;
    white-space: nowrap;
}

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

.stat-timeline-item {
    padding: 0.85rem;
}

.stat-timeline-date {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--secondary);
    font-size: 0.75rem;
}

.stat-insight-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-insight {
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--MFBorder);
    border-radius: 0.85rem;
}

.stat-insight-title {
    margin-bottom: 0.35rem;
    color: var(--secondary);
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-insight-text {
    color: var(--MFText);
    font-size: 0.75rem;
    line-height: 1.45;
}

.stat-tooltip {
    position: fixed;
    z-index: 1080;
    max-width: 240px;
    padding: 0.45rem 0.6rem;
    pointer-events: none;
    color: #fff;
    background: var(--MFText);
    border-radius: 0.35rem;
    box-shadow: 0 0.35rem 1rem rgba(31, 45, 61, 0.18);
    font-size: 0.75rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 80ms ease, transform 80ms ease;
}

.stat-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tile map: geometry and figures come from data, surfaces from Hyper. */
.stat-map-content {
    align-items: stretch;
    row-gap: 1rem;
}

.stat-map-aside-stack {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    height: 100%;
}

.stat-map-aside-stack > .card {
    margin-bottom: 0;
}

.stat-map-aside-stack > .card.card-fluid {
    height: 100%;
}

.stat-map-grid {
    display: grid;
    grid-template-columns: repeat(35, minmax(0, 1fr));
    grid-template-rows: repeat(20, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    max-width: 732px;
    aspect-ratio: 732 / 417;
    margin: 0 auto;
}

.stat-map-pixel {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 2px solid var(--white, #fff);
    border-radius: 0.25rem;
    background: color-mix(in srgb, var(--primary) var(--stat-map-population-share, 50%), var(--white, #fff));
    cursor: crosshair;
    transition: background-color 120ms ease;
}

.stat-map-pixel::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--white, #fff);
    content: "";
    opacity: 0;
    transform: translate(-50%, -50%);
}

.stat-map-pixel.is-active {
    background: var(--primary);
}

.stat-map-pixel.is-active::after {
    opacity: 0.5;
}

.stat-map-pixel.is-city {
    border-color: transparent;
    background: var(--MFSand);
}

.stat-map-pixel.is-city.is-active {
    background: color-mix(in srgb, var(--MFSand) 88%, var(--white, #fff));
}

.stat-map-pixel:focus-visible {
    outline: 2px solid var(--MFText);
    outline-offset: 1px;
    z-index: 1;
}

.stat-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--secondary);
    font-size: 0.75rem;
}

.stat-map-gradient {
    display: flex;
    width: 7.5rem;
    height: 0.55rem;
    overflow: hidden;
}

.stat-map-gradient-step {
    flex: 1;
    background: color-mix(in srgb, var(--primary) var(--stat-map-population-share), var(--white, #fff));
}

.stat-map-city {
    width: 0.75rem;
    height: 0.75rem;
    margin-left: 0.5rem;
    background: var(--MFSand);
}

.stat-map-summary {
    display: flex;
    width: 100%;
    align-self: flex-start;
    flex-direction: column;
}

.stat-map-summary-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--MFBorder);
}

.stat-map-summary-item:first-child {
    padding-top: 0;
}

.stat-map-summary-item:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.stat-map-summary-item strong,
.stat-map-summary-item span {
    display: block;
}

.stat-map-summary-item strong {
    font-size: 0.85rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.stat-map-summary-item span {
    margin-top: 0.1rem;
    color: var(--secondary);
    font-size: 0.75rem;
    line-height: 1.15;
}

.stat-map-summary-market {
    margin-top: 0.5rem;
}

.stat-map-share-values {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-map-share {
    display: flex;
    height: 6px;
    margin-top: 0.5rem;
    overflow: hidden;
    background: var(--MFBg);
}

.stat-map-tooltip {
    position: fixed;
    z-index: 2000;
    display: none;
    width: 280px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    pointer-events: none;
    font-size: 0.75rem;
}

.stat-map-tooltip.is-visible {
    display: block;
}

.stat-map-tooltip-title {
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--MFBorder);
    color: var(--primary);
    font-weight: 700;
}

.stat-map-tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
}

.stat-map-tooltip-row span {
    color: var(--secondary);
}

.stat-map-tooltip-row strong {
    color: var(--MFText);
    font-variant-numeric: tabular-nums;
}

.stat-map-region-list {
    display: none;
}

.stat-map-region-card {
    border-bottom: 1px solid var(--MFBorder);
}

.stat-map-region-card:last-child {
    border-bottom: 0;
}

.stat-map-region-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border: 0;
    background: transparent;
    color: var(--MFText);
    font: inherit;
    font-weight: 600;
    text-align: left;
}

.stat-map-region-body {
    padding-bottom: 0.75rem;
    font-size: 0.75rem;
}

@media (max-width: 1024px) {
    .stat-map-grid,
    .stat-map-legend {
        display: none;
    }

    .stat-map-region-list {
        display: block;
    }
}

.stat-table th {
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-table td {
    font-variant-numeric: tabular-nums;
}

.stat-data-table th {
    border-top: 0;
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
}

.stat-data-table td {
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.stat-data-table th:first-child,
.stat-data-table td:first-child {
    min-width: 0;
    white-space: normal;
}

.stat-data-table .stat-table-number {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.stat-table-scroll {
    max-height: 560px;
    overflow: auto;
}

.stat-table-scroll .table {
    border-collapse: separate;
    border-spacing: 0;
}

.stat-table-scroll th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.stat-table-scroll th:hover {
    color: var(--primary);
}

.stat-table-scroll tbody tr:nth-child(even) {
    background: rgba(238, 244, 248, 0.45);
}

.stat-table-scroll tbody tr:hover {
    background: rgba(0, 97, 150, 0.05);
}

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

@media (max-width: 767.98px) {
    .stat-table-scroll {
        max-height: none;
    }
}

.stat-component-gap {
    gap: 0.65rem;
}


.stat-method-card.is-collapsed .stat-method-body {
    display: none;
}

.stat-method-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0 !important;
}

.stat-method-card .header-title {
    margin-bottom: 0 !important;
}

.stat-method-title {
    display: inline-flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    padding: 0;
    color: var(--MFText);
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.stat-method-title:focus-visible {
    outline: 2px solid rgba(0, 97, 150, 0.3);
    outline-offset: 0.25rem;
}

.stat-method-help {
    flex: 0 0 auto;
    color: var(--MFText);
    font-size: 1.5rem;
}

.stat-method-toggle {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    align-self: center;
    line-height: 1;
}

.stat-method-chevron {
    display: block;
    width: 1rem;
    height: 1rem;
    color: var(--MFText);
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    transition: transform 0.18s ease;
}

.stat-method-card:not(.is-collapsed) .stat-method-chevron {
    transform: rotate(180deg);
}

.stat-method-body {
    margin-top: 1rem;
    color: var(--secondary);
    font-size: 0.8125rem;
    line-height: 1.55;
    white-space: pre-line;
}

/* Dashboard filter card and controlled dropdowns */
.stat-filter-row {
    row-gap: 0.15rem;
}

.stat-filter-row > .form-group {
    min-width: 0;
}

.stat-filter-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.stat-filter-actions-row {
    display: flex;
    align-items: center;
    margin-top: 0.15rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(95, 112, 127, 0.08);
}

.stat-filter-actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.stat-year-picker,
.stat-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.stat-year-trigger,
.stat-select-trigger {
    position: relative;
    min-width: 0;
    max-width: 100%;
    padding-right: 2rem;
    overflow: hidden;
    color: var(--MFText);
    background: #fff;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-year-trigger::after,
.stat-select-trigger::after {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    color: var(--secondary);
    content: "▾";
    transform: translateY(-50%);
}

.stat-year-panel,
.stat-select-panel {
    position: absolute;
    z-index: 1250;
    top: calc(100% + 0.35rem);
    left: 0;
    display: none;
    width: 100%;
    min-width: 290px;
    max-height: 280px;
    padding: 0.65rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--MFBorder);
    box-shadow: 0 12px 30px rgba(49, 58, 70, 0.12);
}

.stat-year-picker.is-open .stat-year-panel,
.stat-select.is-open .stat-select-panel {
    display: block;
}

.stat-year-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.05rem 0.45rem;
}

.stat-year-option {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0.38rem 0.45rem;
    color: var(--MFText);
    font-size: 0.8rem;
    cursor: pointer;
}

.stat-year-option:hover,
.stat-select-option:hover,
.stat-select-option:focus,
.stat-select-option.is-active {
    color: var(--primary);
    background: var(--MFBg);
    outline: 0;
}

.stat-year-option input {
    accent-color: var(--primary);
}

.stat-year-option--all,
.stat-select-option:first-child {
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(95, 112, 127, 0.08);
    font-weight: 700;
}

.stat-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.stat-select-option {
    display: block;
    width: 100%;
    padding: 0.38rem 0.45rem;
    overflow-wrap: anywhere;
    color: var(--MFText);
    background: transparent;
    border: 0;
    font-size: 0.8rem;
    text-align: left;
}

.stat-filter-row > .form-group:last-child .stat-select-panel {
    right: 0;
    left: auto;
}

@media (min-width: 1200px) {
    .stat-filter-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(2, minmax(0, 1.5fr));
        gap: 0 0.5rem;
        margin-right: 0;
        margin-left: 0;
    }

    .stat-filter-row > .form-group {
        width: auto;
        max-width: none;
        padding-right: 0;
        padding-left: 0;
    }
}


@media (max-width: 1199.98px) {
    .stat-mobile-nav-panel {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 767.98px) {
    .stat-filter-actions .btn {
        flex: 1 1 auto;
    }

    .stat-year-panel,
    .stat-select-panel {
        right: auto;
        left: 0;
        min-width: 100%;
    }

    .stat-pie-side {
        grid-template-columns: 1fr;
    }

    .stat-pie-side-legend {
        width: 100%;
    }

    .stat-shell {
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
    }

    .stat-kpi-row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .stat-chart-wrap {
        height: 230px;
    }

    .stat-chart-wrap--lg {
        height: 280px;
    }

    .stat-segmented-bar {
        height: 24px;
    }

    .stat-segmented-section {
        font-size: 0.6875rem;
    }

    .stat-treemap-tile {
        min-width: 100%;
    }

    .stat-treemap--balanced {
        grid-template-columns: 1fr;
    }

    .stat-timeline {
        grid-template-columns: 1fr;
    }

    .stat-record {
        grid-template-columns: 42px 1fr auto 1fr 42px;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .stat-record-end {
        width: 42px;
        height: 24px;
    }

    .stat-record-end-icon {
        width: 15px;
        height: 15px;
    }
}
