.chart-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: transparent;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        canvas {
            width: 100% !important;
            height: 400px !important; /* Fixed height for better control */
        }
        @media (max-width: 600px) {
            .chart-container {
                padding: 10px;
            }
            canvas {
                height: 300px !important; /* Adjusted for mobile */
            }
        }
        @media (max-width: 400px) {
            canvas {
                height: 250px !important; /* Further adjustment for small phones */
            }
        }

        .metrics-container {
            max-width: 900px;
            margin: 0 auto;
            /*background: linear-gradient(to bottom, #ffffff, #f8fafc); */
            background: transparent;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 16px;
        }
        .metrics-header {
            text-align: center;
            margin-bottom: 16px;
        }
        .metric-card {
            background-color: transparent;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 12px;
            margin-bottom: 12px;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .metric-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        .metric-title {
            font-weight: bold;
            color: var(--civerum-brass);
            margin-bottom: 8px;
        }
        .metric-value, .metric-rank, .metric-source {
            font-size: 14px;
            color: #fff;
            margin-bottom: 4px;
        }
        .metric-source {
            font-style: italic;
            color: #fff;
        }
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 16px;
            padding: 20px;
        }
        .metrics-container.error .fallback-message {
            display: block;
        }
        @media (min-width: 640px) {
            .metrics-container {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                padding: 24px;
            }
            .metric-card {
                margin-bottom: 0;
                padding: 16px;
            }
            .metric-title, .metric-value, .metric-rank, .metric-source {
                font-size: 16px;
            }
        }
        @media (max-width: 400px) {
            .metrics-container {
                padding: 12px;
            }
            .metric-card {
                padding: 8px;
            }
            .metric-title, .metric-value, .metric-rank, .metric-source {
                font-size: 12px;
            }
        }
        .tax-all-states-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
            background-color: transparent;
            border-radius: 8px;
            border: solid var(--civerum-brass) 1px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            min-height: 200px;
            overflow-y: visible;
                   /** max-height: 1600px;  Cap container height */
        }
        
        #allStatesTaxChart {
            width: 100% !important;
            height: 1500px !important; /* Tall for 50 states */
        }

/****** IN CASE I WANT TO SET A HEIGHT (THIS ONE IS FOR THE TABLET)

        @media (max-width: 768px) {
            .tax-all-states-container {
                padding: 10px;
                max-height: 1300px;
            }
            #allStatesTaxChart {
                height: 1200px !important; 
            }
        }
/****** IN CASE I WANT TO SET A HEIGHT (THIS ONE IS FOR THE PHONE)
        @media (max-width: 400px) {
            #allStatesTaxChart {
                height: 1000px !important;  
            }
            .tax-all-states-container {
                max-height: 1100px;
            }
        }

        ****/
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 16px;
            padding: 20px;
        }
        .tax-all-states-container.error .fallback-message {
            display: block;
        }

        .dollar-container {
            max-width: 700px;
            margin: 0 auto;
            background: transparent;
            /*background: linear-gradient(to bottom, #ffffff, #f8fafc); */
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 12px;
            overflow-y: auto;
            max-height: 500px;
        }
        #dollarChart {
            width: 100% !important;
            height: 250px !important;
        }
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 12px;
            padding: 12px;
        }
        .dollar-container.error .fallback-message {
            display: block;
        }
        @media (max-width: 768px) {
            .dollar-container {
                padding: 8px;
                max-height: 500px;
            }
            #dollarChart {
                height: 220px !important;
            }
        }
        @media (max-width: 400px) {
            .dollar-container {
                padding: 6px;
                max-height: 500px;
            }
            #dollarChart {
                height: 180px !important;
            }
        }

        /*** COST OF LIVING **/
        .cost-container {
            max-width: 700px;
            margin: 0 auto;
            background: transparent;
            /*background: linear-gradient(to bottom, #ffffff, #f8fafc); */
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 12px;
            overflow-y: visible;
            max-height: 600px;
        }
        #costChart {
            width: 100% !important;
            height: 300px !important;
        }
        .chart-toggle {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        .chart-toggle button {
            background-color: #e5e7eb;
            color: #1f2937;
            padding: 6px 12px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-size: 12px;
            transition: background-color 0.2s;
        }
        .chart-toggle button.active {
            background-color: #1e40af;
            color: white;
        }
        .chart-toggle button:hover {
            background-color: #d1d5db;
        }
        .chart-toggle button.active:hover {
            background-color: #1e3a8a;
        }
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 12px;
            padding: 12px;
        }
        .cost-container.error .fallback-message {
            display: block;
        }
        @media (max-width: 768px) {
            .cost-container {
                padding: 8px;
                max-height: 600px;
            }
            #costChart {
                height: 250px !important;
            }
            .chart-toggle button {
                font-size: 10px;
                padding: 5px 10px;
            }
        }
        @media (max-width: 400px) {
            .cost-container {
                padding: 6px;
                max-height: 600px;
            }
            #costChart {
                height: 200px !important;
            }
            .chart-toggle {
                flex-wrap: wrap;
                gap: 6px;
            }
            .chart-toggle button {
                font-size: 9px;
                padding: 4px 8px;
            }
        }

.crime-data-holds {
    --crime-border: rgba(195, 165, 111, 0.24);
    --crime-panel: rgba(7, 13, 18, 0.9);
    --crime-panel-alt: rgba(255, 255, 255, 0.045);
    --crime-text-muted: rgba(255, 255, 255, 0.72);
    width: min(90vw, 980px);
    margin: 28px auto 34px;
    margin-left: 50%;
    overflow: hidden;
    transform: translateX(-50%);
    border: 1px solid var(--crime-border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(195, 165, 111, 0.13), rgba(255, 255, 255, 0) 34%),
        var(--crime-panel);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    color: #fff;
    font-family: 'Source Serif 4', serif;
}

.crime-data-holds .data-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) minmax(135px, 1fr) minmax(135px, 1fr) minmax(185px, 1.25fr);
    min-width: 720px;
}

.crime-data-holds .data-row:nth-child(odd):not(.header-row) {
    background: var(--crime-panel-alt);
}

.crime-data-holds .data-cell {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 15px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 15px;
    line-height: 1.35;
}

.crime-data-holds .data-cell:first-child {
    border-left: 0;
    font-weight: 700;
    color: #fff;
}

.crime-data-holds .header-row .data-cell {
    min-height: 68px;
    border-top: 0;
    background: linear-gradient(180deg, rgba(195, 165, 111, 0.22), rgba(195, 165, 111, 0.08));
    color: var(--civerum-brass);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crime-data-holds .data-row:not(.header-row) .data-cell:nth-child(2),
.crime-data-holds .data-row:not(.header-row) .data-cell:nth-child(3) {
    color: var(--crime-text-muted);
}

.crime-data-holds .data-row:not(.header-row) .data-cell:nth-child(4) {
    color: var(--civerum-brass);
    font-weight: 800;
}

@media (max-width: 900px) {
    .crime-data-holds {
        width: calc(100vw - 36px);
        margin-left: 50%;
        transform: translateX(-50%);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 640px) {
    .crime-data-holds {
        display: grid;
        gap: 14px;
        width: 100%;
        margin: 24px 0 30px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .crime-data-holds .header-row {
        display: none;
    }

    .crime-data-holds .data-row {
        display: grid;
        min-width: 0;
        grid-template-columns: 1fr;
        overflow: hidden;
        border: 1px solid var(--crime-border);
        border-radius: 8px;
        background: var(--crime-panel);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
    }

    .crime-data-holds .data-row:nth-child(odd):not(.header-row) {
        background: var(--crime-panel);
    }

    .crime-data-holds .data-cell {
        display: grid;
        grid-template-columns: minmax(112px, 42%) 1fr;
        gap: 14px;
        min-height: 0;
        padding: 13px 15px;
        border-left: 0;
        font-size: 14px;
    }

    .crime-data-holds .data-cell:first-child {
        border-top: 0;
    }

    .crime-data-holds .data-cell::before {
        color: var(--civerum-brass);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .crime-data-holds .data-cell:nth-child(1)::before {
        content: "Metric";
    }

    .crime-data-holds .data-cell:nth-child(2)::before {
        content: "NYC";
    }

    .crime-data-holds .data-cell:nth-child(3)::before {
        content: "Florida";
    }

    .crime-data-holds .data-cell:nth-child(4)::before {
        content: "Difference";
    }
}
