/* =====================================================================
   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;
}

/* ── Company-family card (cross-state crosswalk on operator pages) ── */
.company-card {
    background: linear-gradient(180deg, #fdfcf8 0%, #f8f5ec 100%);
    border: 1px solid #d8d2bf;
    border-left: 3px solid #a05a2c;
    border-radius: 0 4px 4px 0;
    padding: 16px 20px 14px;
    margin: 0 0 24px;
    max-width: 920px;
}
.company-card-header h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #5a3a16;
    font-weight: 500;
}
.company-card-icon { opacity: 0.65; margin-right: 6px; }
.company-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.company-chip {
    display: inline-block;
    background: #fff;
    border: 1px solid #d8d2bf;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    color: #5a3a16;
    font-weight: 500;
}
.company-chip-warn { background: #fbe7d8; border-color: #c44a2b; color: #c44a2b; }
.company-card-loc {
    color: #777;
    font-size: 12px;
    margin-left: 4px;
}
.company-card-blurb {
    margin: 8px 0 10px;
    font-size: 14px;
    color: #4a3a20;
    line-height: 1.45;
}
.company-aliases {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.company-aliases li {
    margin: 0 0 4px;
}

/* ── Prose link lists ("Browse fields: A, B, C") ────────────────── */
.entity-prose-links {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: #fafaf6;
    border-left: 3px solid #c3a76e;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}
.entity-prose-links a {
    color: #1f4f7a;
    text-decoration: none;
    border-bottom: 1px dotted #a8b8c4;
}
.entity-prose-links a:hover { color: #b8731a; border-bottom-color: #b8731a; }

/* ── MapLibre county-density map canvas ──────────────────────────── */
.county-density-map-canvas {
    width: 100%;
    height: 480px;
    border-radius: 4px;
    border: 1px solid #d8c9a8;
    margin: 8px 0 6px;
    background: #f3eee0;
}
.map-attribution {
    font-size: 11px;
    color: #888;
    margin: 4px 0 0;
}

/* ── Well-history event log tags ─────────────────────────────────── */
.well-history-table td { vertical-align: top; padding-top: 10px; }
.event-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 3px;
    background: #e6efea;
    color: #2d5a3d;
    margin-right: 4px;
}
.event-tag-status {
    background: #f0e6d6;
    color: #6b4a1f;
}
.event-tag-initial {
    background: #1f4f7a;
    color: #fff;
}
.event-tag-admin {
    background: #f0f0f0;
    color: #888;
    font-style: italic;
    font-weight: 400;
    text-transform: none;
}

/* ── In-page jump nav (operator pages get long) ──────────────────── */
.page-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 10px 14px;
    margin: 12px 0 18px;
    background: #f5f0e6;
    border: 1px solid #e1d4b8;
    border-radius: 4px;
    font-size: 13px;
}
.page-jump-nav::before {
    content: "Jump to:";
    color: #5a3a16;
    font-weight: 600;
    margin-right: 4px;
}
.page-jump-nav a {
    color: #1f4f7a;
    text-decoration: none;
    border-bottom: 1px dotted #1f4f7a;
}
.page-jump-nav a:hover { color: #b8731a; border-bottom-color: #b8731a; }
.page-jump-nav:empty { display: none; }
html { scroll-behavior: smooth; }

/* ── Basins index grid ───────────────────────────────────────────── */
.basins-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 16px;
}
.basins-grid li { padding: 4px 0; font-size: 14px; }
.basins-grid li a { color: #1f4f7a; text-decoration: none; }
.basins-grid li a:hover { text-decoration: underline; }

/* Basin description (rendered from broker HTML — bound the image
   sizes so legacy assets don't break layout). */
.basin-description img { max-width: 100%; height: auto; display: none; }
.basin-description h3 {
    font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em;
    color: #5a3a16; margin: 16px 0 6px;
}
.basin-description ul { margin: 0 0 12px 22px; }

/* ── Homepage M&A feed ───────────────────────────────────────────── */
.home-deals-feed {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 14px 18px 16px;
    margin: 24px 0;
}
.home-deals-feed h3 {
    margin: 0 0 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}
.home-deals-list { list-style: none; padding: 0; margin: 12px 0 0; }
.home-deals-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
}
.home-deals-list li:last-child { border-bottom: none; }
.home-deals-date {
    color: #888;
    font-size: 12px;
    width: 64px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.home-deals-title { color: #222; flex: 1 1 50%; font-size: 14px; }
.home-deals-value {
    color: #3c8745;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    font-size: 14px;
}

/* ── Nav search field ────────────────────────────────────────────── */
.site-nav-search {
    display: inline-flex;
    align-items: center;
    margin-left: 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    overflow: hidden;
    vertical-align: middle;
}
.site-nav-search input {
    border: 0;
    background: transparent;
    padding: 4px 12px;
    font-size: 13px;
    width: 220px;
    outline: none;
}
.site-nav-search button {
    border: 0;
    background: #f3f4f4;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
}
.site-nav-search button:hover { background: #e6e6e6; }

/* ── Search results page ─────────────────────────────────────────── */
.search-page-form {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    max-width: 600px;
}
.search-page-form input {
    flex: 1;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.search-page-form button {
    padding: 0 18px;
    background: #1f4f7a;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}
.search-results li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}
.search-results li:last-child { border-bottom: none; }

/* ── Deals table + news list ─────────────────────────────────────── */
.deals-table td { vertical-align: top; }
.deals-table .company-chip { font-size: 11px; }

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}
.news-item:last-child { border-bottom: none; }
.news-title {
    font-size: 15px;
    color: #222;
    font-weight: 500;
    line-height: 1.35;
}
.news-date {
    font-size: 12px;
    color: #888;
    margin: 2px 0 6px;
    font-variant-numeric: tabular-nums;
}
.news-snippet {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}
.news-readmore {
    display: inline;
    margin-left: 4px;
    color: #1f4f7a;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}
.news-readmore:hover {
    color: #b8731a;
    border-bottom-color: currentColor;
}
.news-title a {
    color: inherit;
    text-decoration: none;
}
.news-title a:hover {
    color: #b8731a;
    text-decoration: underline;
}

/* ── Baker Hughes rigs snapshot ──────────────────────────────────── */
.rigs-snapshot {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-left: 3px solid #3c8745;
    border-radius: 0 4px 4px 0;
    padding: 16px 20px 14px;
    margin: 0 0 24px;
}
.rigs-snapshot h3 {
    margin: 0 0 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2c5d33;
    font-weight: 600;
}
.rigs-snapshot h3 small { text-transform: none; letter-spacing: 0; }
.rigs-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    margin-bottom: 14px;
}
.rigs-headline {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.rigs-headline-number {
    font-size: 32px;
    font-weight: 600;
    color: #3c8745;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.rigs-headline-county { color: #c44a2b; }
.rigs-headline-label { color: #555; font-size: 13px; }
.rigs-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px 24px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}
.rigs-bucket h4 {
    margin: 0 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #777;
    font-weight: 600;
}
.rigs-bucket ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #333;
}
.rigs-bucket li {
    line-height: 1.5;
}
.rigs-count {
    display: inline-block;
    min-width: 30px;
    color: #3c8745;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-right: 4px;
}

.company-state-badge {
    display: inline-block;
    background: #6c4c2a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 2px;
    padding: 2px 6px;
    margin-right: 8px;
    vertical-align: 1px;
    font-variant-numeric: tabular-nums;
}




