: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);
}

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;
}

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

.font-mono, .stat-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

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

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

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

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

.sharp-tile {
    border-radius: 0 !important;
}

.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; }

.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;
    text-decoration: none;
    color: inherit;
}

.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;
}

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

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

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

.site-tagline {
    margin-top: 0.35rem;
    font-size: var(--text-secondary);
    color: #a1a1aa;
}

.site-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

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

.site-nav a {
    font-size: var(--text-caption);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a1a1aa;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border: 1px solid transparent;
}

.site-nav a:hover {
    color: #fafafa;
    border-color: #3f3f46;
    background: #18181b;
}

.site-nav a[aria-current="page"] {
    color: #60a5fa;
    border-color: #1e40af;
    background: #17255433;
}

.site-badge {
    display: inline-flex;
    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;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-caption);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fafafa;
    background: #1e40af;
    border: 1px solid #3b82f6;
    padding: 0.55rem 1rem;
    text-decoration: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--text-caption);
    font-weight: 500;
    color: #a1a1aa;
    border: 1px solid #3f3f46;
    padding: 0.45rem 0.75rem;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-ghost:hover {
    color: #fafafa;
    border-color: #52525b;
}

.card-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1.35rem;
    background: #18181b;
    border: 1px solid #3f3f46;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}

.card-tile:hover {
    border-color: #52525b;
    transform: translateY(-2px);
}

.card-tile-headline {
    font-family: var(--font-serif);
    font-size: var(--text-subheading);
    font-weight: 600;
    color: #f4f4f5;
    line-height: 1.25;
    margin: 0 0 0.75rem;
}

.card-tile-value {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 600;
    color: #f87171;
    line-height: 1;
    margin: 0;
}

.card-tile-sub {
    font-size: var(--text-caption);
    color: #a1a1aa;
    margin: 0.35rem 0 0.75rem;
}

.card-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
}

.state-panel {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #18181b;
    border: 1px solid #3f3f46;
    display: none;
}

.state-panel.open {
    display: block;
}

.state-panel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.state-panel-links a {
    font-size: var(--text-caption);
    color: #60a5fa;
    text-decoration: none;
    border: 1px solid #3f3f46;
    padding: 0.35rem 0.65rem;
}

.state-panel-links a:hover {
    border-color: #60a5fa;
}

.state-map-tooltip {
    position: absolute;
    pointer-events: none;
    background: #18181b;
    border: 1px solid #3f3f46;
    padding: 8px 12px;
    font-size: var(--text-secondary);
    display: none;
    z-index: 40;
}

.chart-egress {
    margin-top: 0.75rem;
    font-size: var(--text-caption);
}

.chart-egress a {
    color: #60a5fa;
    text-decoration: none;
    margin-right: 1rem;
}

.chart-egress a:hover {
    text-decoration: underline;
}