/* =====================================================================
   Top-nav state dropdown + universal footer.
   Pure-CSS dropdown via <details>/<summary> — keyboard + mobile work
   without JS. Sits on top of the legacy reset.css / style.min.css.
   ===================================================================== */

/* ── Top nav ───────────────────────────────────────────────────────── */
.site-nav { font-size: 16px; }
.site-nav a { padding: 0 14px; }

.site-nav-dropdown {
    position: relative;
    display: inline-block;
}
.site-nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    padding: 0 14px;
    display: inline-block;
    user-select: none;
}
/* Suppress the default disclosure triangle */
.site-nav-dropdown > summary::-webkit-details-marker,
.site-nav-dropdown > summary::marker { display: none; }

.site-nav-dropdown[open] > summary { font-weight: 600; }

.site-nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    columns: 1;
}
.site-nav-dropdown-menu li { display: block; margin: 0; }
.site-nav-dropdown-menu li a {
    display: block;
    padding: 6px 16px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav-dropdown-menu li a:hover,
.site-nav-dropdown-menu li a:focus {
    background: #f3f4f4;
    text-decoration: none;
}
.site-nav-dropdown-menu small { color: #888; font-size: 0.85em; }

/* When the state list grows past ~12 items, widen and put it in columns
   so it doesn't become a scroll-only blob. */
@media (min-width: 768px) {
    .site-nav-dropdown-menu { columns: 2; min-width: 360px; }
    .site-nav-dropdown-menu li { break-inside: avoid; }
}

/* ── Universal footer ─────────────────────────────────────────────── */
.site-footer {
    background: #f3f4f4;
    padding: 32px 0 24px;
    margin-top: 48px;
    border-top: 1px solid #e0e0e0;
}
.site-footer .grid-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-footer-section { margin-bottom: 28px; }
.site-footer-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    margin: 0 0 12px;
    font-weight: 600;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer-grid li { margin: 0; }
.site-footer-grid li a {
    display: block;
    padding: 4px 0;
    color: #444;
    text-decoration: none;
    font-size: 14px;
}
.site-footer-grid li a:hover,
.site-footer-grid li a:focus { color: #1a1a1a; text-decoration: underline; }

.site-footer-note { font-size: 12px; color: #888; margin-top: 8px; }

.site-footer-meta {
    border-top: 1px solid #e0e0e0;
    padding-top: 18px;
    margin-top: 18px;
}
.site-footer-meta h3 { margin: 0 0 6px; font-size: 16px; color: #333; }
.site-footer .copyright { color: #666; font-size: 13px; }

/* ── Choropleth + charts ───────────────────────────────────────────── */
.choropleth-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 14px 18px 18px;
    margin-bottom: 24px;
}
.choropleth-wrap h3 {
    margin: 0 0 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}
.choropleth-wrap .choropleth-caption {
    color: #777;
    font-size: 12px;
    margin: 0 0 12px;
}
.choropleth-wrap svg {
    width: 100%;
    max-height: 480px;
    display: block;
}
.county-density-wrap svg { max-height: 560px; }
.county-density-map .density-historic circle { transition: r 0.1s; }
.county-density-map:hover .density-historic circle { r: 2.2; }

/* Per-county hover affordance for clickable maps. */
.choropleth-wrap svg path:hover { fill: #ffb347 !important; cursor: pointer; }
.choropleth-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1;
}
.choropleth-bin {
    padding: 6px 10px;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}
.choropleth-bin:first-child {
    color: #333;
    text-shadow: none;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}
.choropleth-bin-na {
    color: #555 !important;
    text-shadow: none;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    margin-left: 12px;
}

.dyn-bar-chart-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 14px 18px 18px;
    margin-bottom: 24px;
}
.dyn-bar-chart-wrap h3 {
    margin: 0 0 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}
.dyn-bar-chart { display: block; max-width: 100%; }

/* ── Stat tiles (state / county / operator / field page headers) ──── */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0 28px;
}
.stat-tile {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 14px 16px 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.stat-tile .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #777;
    margin: 0 0 6px;
    font-weight: 600;
}
.stat-tile .stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #1f4f7a;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-tile .stat-sub {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}
.stat-tile.stat-trend-up    { border-left: 3px solid #3c8745; }
.stat-tile.stat-trend-down  { border-left: 3px solid #c44a2b; }
.stat-tile.stat-trend-flat  { border-left: 3px solid #999; }
.stat-tile.stat-trend-up    .stat-value { color: #3c8745; }
.stat-tile.stat-trend-down  .stat-value { color: #c44a2b; }

/* ── Entity prose summary (the editorial paragraph below the tiles) ── */
.entity-summary {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-left: 3px solid #1f4f7a;
    border-radius: 0 4px 4px 0;
    padding: 16px 20px 14px;
    margin: 0 0 22px;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    max-width: 900px;
}
.entity-summary p { margin: 0 0 8px; }
.entity-summary p:last-child { margin-bottom: 0; }
.entity-summary .entity-meta {
    color: #777;
    font-size: 13px;
    margin-top: 6px;
}



