:root {
    --font-sans: 'Source Sans 3', system-ui, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    --text-micro: 0.75rem;
    --text-caption: 0.8125rem;
    --text-secondary: 0.9375rem;
    --text-body: 1rem;
    --text-lead: 1.0625rem;
    --text-subheading: 1.125rem;
    --text-section: clamp(1.375rem, 1.1rem + 0.9vw, 1.625rem);
    --text-display: clamp(1.875rem, 1.4rem + 1.8vw, 2.5rem);
    --text-hero-stat: clamp(2.75rem, 2rem + 3.5vw, 4.25rem);
    --text-kpi-stat: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
    --text-stat-md: clamp(1.625rem, 1.4rem + 0.6vw, 2rem);
}

html {
    font-size: clamp(15px, 14px + 0.35vw, 17px);
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .section-header {
    font-family: var(--font-serif);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-display);
    line-height: 1.12;
}

h2, .section-header {
    font-size: var(--text-section);
    line-height: 1.2;
}

h3 {
    font-size: var(--text-subheading);
    line-height: 1.3;
}

.type-eyebrow {
    font-size: var(--text-caption);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.4;
}

.type-subtitle {
    font-size: var(--text-secondary);
    line-height: 1.5;
}

.type-caption {
    font-size: var(--text-caption);
    line-height: 1.45;
}

.type-micro {
    font-size: var(--text-micro);
    line-height: 1.4;
}

.type-hero-stat {
    font-size: var(--text-hero-stat);
    line-height: 0.95;
}

.type-hero-unit {
    font-size: var(--text-lead);
    line-height: 1.2;
}

.type-kpi-stat {
    font-size: var(--text-kpi-stat);
    line-height: 1;
}

.type-stat-md {
    font-size: var(--text-stat-md);
    line-height: 1;
}

.stat-value,
.font-mono {
    font-variant-numeric: tabular-nums;
}

.chart-container svg text {
    font-family: var(--font-sans);
}

.chart-container svg .tick text {
    font-size: var(--text-caption);
}

.site-header {
    position: relative;
    padding: 1.75rem 0 0;
}

.site-header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    min-width: 0;
}

.site-mark {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    background: linear-gradient(145deg, #18181b 0%, #09090b 100%);
    border: 1px solid #3f3f46;
    border-left: 3px solid #3b82f6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-mark-label {
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #60a5fa;
}

.site-brand-text {
    min-width: 0;
}

.site-title {
    font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.125rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fafafa;
}

.site-title-tld {
    color: #71717a;
    font-weight: 600;
}

.site-tagline {
    margin-top: 0.35rem;
    font-size: var(--text-secondary);
    line-height: 1.4;
    color: #a1a1aa;
    letter-spacing: 0.01em;
}

.site-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
}

@media (min-width: 640px) {
    .site-meta {
        align-items: flex-end;
        text-align: right;
    }
}

.site-badge {
    display: inline-flex;
    align-items: center;
    font-size: var(--text-micro);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #34d399;
    background: #064e3b33;
    border: 1px solid #065f46;
    padding: 0.3rem 0.65rem;
    line-height: 1.3;
}

.site-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-source-pill {
    font-size: var(--text-micro);
    letter-spacing: 0.04em;
    color: #a1a1aa;
    background: #18181b;
    border: 1px solid #3f3f46;
    padding: 0.3rem 0.6rem;
    line-height: 1.3;
}

.site-header-rule {
    margin-top: 1.5rem;
    height: 1px;
    background: linear-gradient(
        to right,
        #3b82f6 0%,
        #3b82f6 4rem,
        #3f3f46 4rem,
        #3f3f46 100%
    );
}

.tile { transition: all 0.2s linear; cursor: pointer; }
.tile:hover { transform: translateY(-4px); }
.tile.expanded { border-color: #3b82f6; }
.section-header {
    position: relative;
    display: inline-block;
}
.section-header:after {
    content: '';
    position: absolute;
    width: 48px;
    height: 3px;
    background: linear-gradient(to right, #1e40af, #3b82f6);
    bottom: -8px;
    left: 0;
}
table { border-collapse: collapse; }
th, td { padding: 14px 16px; }
.sharp-tile { border-radius: 0 !important; }
.chart-container { width: 100%; overflow-x: auto; }
.chart-container svg { display: block; margin: 0 auto; }
.confidence-badge {
    font-size: var(--text-micro);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 7px;
    border: 1px solid;
    line-height: 1.3;
}
.confidence-national { color: #34d399; border-color: #065f46; background: #064e3b33; }
.confidence-estimate { color: #fbbf24; border-color: #92400e; background: #78350f33; }
.confidence-jurisdiction { color: #f87171; border-color: #991b1b; background: #7f1d1d33; }
.source-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #27272a;
    color: #a1a1aa;
    font-size: var(--text-micro);
    border: 1px solid #3f3f46;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 6px;
}
.source-btn:hover { color: #fff; border-color: #71717a; }
.source-popover {
    display: none;
    position: fixed;
    z-index: 50;
    width: 300px;
    padding: 14px;
    background: #18181b;
    border: 1px solid #3f3f46;
    font-size: var(--text-secondary);
    line-height: 1.55;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.source-popover.open { display: block; }
.source-popover a { color: #60a5fa; text-decoration: underline; }
.tile-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.tile.expanded .tile-detail {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #3f3f46;
}
.tile .tile-hint-collapse { display: none; }
.tile.expanded .tile-hint-expand { display: none; }
.tile.expanded .tile-hint-collapse { display: block; }
.methodology-panel details {
    border-bottom: 1px solid #3f3f46;
}
.methodology-panel summary {
    cursor: pointer;
    padding: 14px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-secondary);
    line-height: 1.45;
}
.methodology-panel summary::-webkit-details-marker { display: none; }
.methodology-panel details[open] summary { color: #60a5fa; }
.uncertainty-band { opacity: 0.35; }
.state-map-tooltip {
    position: absolute;
    pointer-events: none;
    background: #18181b;
    border: 1px solid #3f3f46;
    padding: 8px 12px;
    font-size: var(--text-secondary);
    border-radius: 2px;
    display: none;
    z-index: 40;
}
@media (max-width: 1023px) {
    .sidebar-sticky { position: static !important; }
}