  *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: #f5f5f3;
            color: #1a1a18;
            min-height: 100vh;
        }

        /* ---------- Top bar ---------- */
        .topbar {
            background: #fff;
            border-bottom: 1px solid #e2e1da;
            padding: 0 2rem;
            display: flex;
            align-items: center;
            gap: 1.5rem;
            height: 60px;
        }

        .topbar-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 15px;
            font-weight: 600;
            color: #1a1a18;
            text-decoration: none;
        }

        .topbar-logo svg {
            flex-shrink: 0;
        }

        .topbar-divider {
            width: 1px;
            height: 22px;
            background: #e2e1da;
        }

        .topbar-title {
            font-size: 14px;
            color: #6b6b67;
        }

        .topbar-spacer {
            flex: 1;
        }

        /* ---------- State selector ---------- */
        .state-form {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .state-form label {
            font-size: 13px;
            color: #6b6b67;
        }

        .state-select {
            font-size: 13px;
            padding: 6px 32px 6px 10px;
            border: 1px solid #d4d3cc;
            border-radius: 8px;
            background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b67' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
            -webkit-appearance: none;
            cursor: pointer;
            color: #1a1a18;
        }

        .state-select:focus {
            outline: none;
            border-color: #2a78d6;
            box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.15);
        }

        /* ---------- Main layout ---------- */
        .page {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem 1.5rem 4rem;
        }

        .page-header {
            margin-bottom: 2rem;
        }

        .page-eyebrow {
            font-size: 12px;
            color: #898781;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            margin-bottom: 6px;
        }

        .page-heading {
            font-size: 26px;
            font-weight: 600;
            color: #1a1a18;
        }

        .page-sub {
            font-size: 14px;
            color: #6b6b67;
            margin-top: 4px;
        }

        /* ---------- KPI row ---------- */
        .kpi-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
            margin-bottom: 2rem;
        }

        .kpi-card {
            background: #fff;
            border: 1px solid #e2e1da;
            border-radius: 12px;
            padding: 1.2rem 1.25rem;
        }

        .kpi-label {
            font-size: 12px;
            color: #898781;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
        }

        .kpi-value {
            font-size: 26px;
            font-weight: 600;
            color: #1a1a18;
            line-height: 1;
        }

        .kpi-unit {
            font-size: 12px;
            color: #898781;
            margin-top: 4px;
        }

        .kpi-card.accent {
            border-color: #b5d4f4;
            background: #e6f1fb;
        }

        .kpi-card.accent .kpi-value {
            color: #185fa5;
        }

        .kpi-card.accent .kpi-label,
        .kpi-card.accent .kpi-unit {
            color: #378add;
        }

        /* ---------- Section ---------- */
        .section-title {
            font-size: 13px;
            font-weight: 600;
            color: #1a1a18;
            margin-bottom: 1rem;
            letter-spacing: 0.01em;
        }

        .section-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        .section-row.full {
            grid-template-columns: 1fr;
        }

        /* ---------- Chart card ---------- */
        .chart-card {
            background: #fff;
            border: 1px solid #e2e1da;
            border-radius: 12px;
            padding: 1.5rem;
        }

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

        .chart-title-wrap {
            display: flex;
            align-items: center;
        }

        .chart-title {
            font-size: 14px;
            font-weight: 600;
            color: #1a1a18;
        }

        .chart-desc {
            font-size: 12px;
            color: #898781;
            margin-top: 3px;
        }

        .chart-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            font-size: 12px;
            color: #6b6b67;
        }

        .legend-dot {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .legend-sq {
            width: 10px;
            height: 10px;
            border-radius: 2px;
            flex-shrink: 0;
        }

        /* ---------- Info tooltip icon ---------- */
        .info-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #e2e1da;
            color: #6b6b67;
            font-size: 11px;
            font-weight: 700;
            font-style: normal;
            cursor: help;
            position: relative;
            margin-left: 6px;
            flex-shrink: 0;
        }

        .info-icon:hover {
            background: #2a78d6;
            color: #fff;
        }

        .info-icon .tooltip-box {
            display: none;
            position: absolute;
            bottom: 22px;
            left: 50%;
            transform: translateX(-50%);
            width: 240px;
            background: #1a1a18;
            color: #fff;
            font-size: 12px;
            font-weight: 400;
            line-height: 1.5;
            padding: 10px 12px;
            border-radius: 8px;
            z-index: 50;
            text-align: left;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
        }

        .info-icon .tooltip-box::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #1a1a18;
        }

        .info-icon:hover .tooltip-box {
            display: block;
        }

        .kpi-label .info-icon .tooltip-box {
            bottom: auto;
            top: 22px;
        }

        .kpi-label .info-icon .tooltip-box::after {
            top: auto;
            bottom: 100%;
            border-top-color: transparent;
            border-bottom-color: #1a1a18;
        }

        @media (max-width: 480px) {
            .info-icon .tooltip-box {
                width: 190px;
                left: auto;
                right: -10px;
                transform: none;
            }

            .info-icon .tooltip-box::after {
                left: auto;
                right: 14px;
                transform: none;
            }
        }

        /* ---------- Year tab strip ---------- */
        .year-tabs {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-bottom: 1.5rem;
        }

        .year-tab {
            font-size: 12px;
            padding: 4px 12px;
            border-radius: 20px;
            border: 1px solid #d4d3cc;
            background: transparent;
            cursor: pointer;
            color: #6b6b67;
            transition: all 0.15s;
        }

        .year-tab.active {
            background: #1a1a18;
            color: #fff;
            border-color: #1a1a18;
        }

        .year-tab:hover:not(.active) {
            background: #f5f5f3;
        }

        /* ---------- Comparison table ---------- */
        .compare-card {
            background: #fff;
            border: 1px solid #e2e1da;
            border-radius: 12px;
            overflow: hidden;
        }

        .compare-card table {
            width: 100%;
            border-collapse: collapse;
        }

        .compare-card th {
            font-size: 11px;
            color: #898781;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 12px 1.25rem;
            text-align: left;
            background: #fafaf8;
            border-bottom: 1px solid #e2e1da;
        }

        .compare-card td {
            font-size: 13px;
            padding: 10px 1.25rem;
            border-bottom: 1px solid #f0efe8;
            color: #1a1a18;
        }

        .compare-card tr:last-child td {
            border-bottom: none;
        }

        .compare-card tr.highlighted td {
            background: #e6f1fb;
        }

        .bar-mini {
            height: 6px;
            border-radius: 3px;
            background: #2a78d6;
            display: inline-block;
            vertical-align: middle;
        }

        .chart-wrapper {
            position: relative;
            width: 100%;
            height: 320px;
        }

        @media (max-width: 700px) {
            .section-row {
                grid-template-columns: 1fr;
            }

            .kpi-row {
                grid-template-columns: repeat(2, 1fr);
            }

            .topbar {
                padding: 0 1rem;
            }

            .page {
                padding: 1.25rem 1rem 3rem;
            }
        }

        /* ===========================
           Mobile Responsive
        =========================== */
        @media (max-width: 768px) {

            body {
                overflow-x: hidden;
            }

            .topbar {
                height: auto;
                padding: 12px 15px;
                flex-wrap: wrap;
                gap: 12px;
                align-items: flex-start;
            }

            .topbar-divider {
                display: none;
            }

            .topbar-title {
                width: 100%;
                font-size: 13px;
            }

            .state-form {
                width: 100%;
                flex-direction: column;
                align-items: stretch;
            }

            .state-select {
                width: 100%;
            }

            .page {
                padding: 15px;
            }

            .page-heading {
                font-size: 24px;
            }

            .page-sub {
                font-size: 13px;
            }

            .kpi-row {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .kpi-card {
                padding: 16px;
            }

            .kpi-value {
                font-size: 24px;
            }

            .section-row {
                grid-template-columns: 1fr;
                gap: 18px;
            }

            .chart-card {
                padding: 16px;
            }

            .chart-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .chart-legend {
                margin-top: 8px;
            }

            #monthlyChart,
            #yearlyChart,
            #jm2Chart,
            #compareChart {
                width: 100% !important;
            }

            .year-tabs {
                overflow-x: auto;
                white-space: nowrap;
                flex-wrap: nowrap;
                padding-bottom: 8px;
                scrollbar-width: thin;
            }

            .year-tab {
                flex: 0 0 auto;
            }

            #compareChart {
                min-height: 500px;
            }

            .chart-wrapper {
                height: 260px;
            }
        }

        /* Small Phones */
        @media (max-width:480px) {

            .page {
                padding: 12px;
            }

            .page-heading {
                font-size: 20px;
            }

            .kpi-value {
                font-size: 20px;
            }

            .chart-title {
                font-size: 15px;
            }

            .chart-desc {
                font-size: 12px;
            }

            .state-select {
                font-size: 14px;
            }

            .year-tab {
                padding: 6px 12px;
                font-size: 11px;
            }

            .chart-wrapper {
                height: 220px;
            }
        }

        .page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.state-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.state-form label {
    font-size: 12px;
    color: #898781;
    font-weight: 600;
}

.state-select {
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid #d4d3cc;
    border-radius: 8px;
    background: #fff;
    color: #1a1a18;
    min-width: 160px;
}

.state-select:focus {
    outline: none;
    border-color: #2a78d6;
    box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.15);
}