:root {
    --ink: #142a32;
    --muted: #65777e;
    --line: #dce6e4;
    --paper: #f5f8f7;
    --white: #fff;
    --teal: #0b756b;
    --deep: #074b49;
    --light: #e5f3ef;
    --orange: #df9c4b;
    --shadow: 0 12px 36px rgba(19, 53, 58, .09)
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent-ink, var(--teal));
    outline-offset: 2px
}

.topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 28px
}

.brand {
    width: 223px;
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0
}

.mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff
}

.brand strong {
    font: 800 15px var(--sans);
    letter-spacing: .055em
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-top: 2px
}

.toplinks {
    display: flex;
    gap: 12px;
    height: 100%;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap
}

.toplinks a {
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #65767d;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 3px solid transparent;
    padding: 0 2px;
    line-height: 1
}

.toplinks a svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8;
    flex-shrink: 0
}

.toplinks a.active {
    color: var(--deep);
    border-color: #0b756b
}

.topspacer {
    flex: 1
}

.searchbox {
    height: 37px;
    width: 500px;
    border: 1px solid var(--line);
    background: #f8faf9;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    color: var(--muted)
}

.searchbox input {
    background: transparent;
    border: 0;
    outline: 0;
    width: 100%;
    color: var(--ink);
    font-size: 12px
}

.topicon {
    width: 35px;
    height: 35px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #60747b;
    display: grid;
    place-items: center
}

.avatar {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    background: #d9eae5;
    color: #1b665e;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 11px
}

.shell {
    display: block;
    min-height: calc(100vh - 72px)
}

.sidebar {
    display: none
}

.workspace {
    margin: 0 7px 12px;
    background: #f5f8f7;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px
}

.workspace .wicon {
    height: 32px;
    width: 32px;
    display: grid;
    place-items: center;
    background: #d3e9e2;
    border-radius: 8px;
    color: var(--deep);
    font-weight: 800
}

.workspace strong {
    font-size: 12px
}

.workspace small {
    display: block;
    color: #8b999e;
    font-size: 10px;
    margin-top: 3px
}

main {
    min-width: 0;
    padding: 30px 34px 64px;
    max-width: 1800px;
    width: 100%;
    margin: auto
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .17em;
    color: var(--teal);
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 7px
}


.btn {
    border: 1px solid var(--line);
    background: #fff;
    color: #27464a;
    height: 36px;
    border-radius: 8px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap
}

.btn[hidden] {
    display: none !important
}

.btn.primary {
    background: var(--deep);
    border-color: var(--deep);
    color: #fff
}

.btn svg {
    width: 15px;
    height: 15px
}

#biofuel-toggle {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease
}

#biofuel-toggle.is-visible {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18)
}

#biofuel-toggle.is-hidden {
    background: #fff;
    border-color: var(--line);
    color: #27464a
}

.heading-status-filters {
    display: inline-flex;
    align-items: center;
    gap: 0;
    pointer-events: auto;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
    overflow: hidden
}

.status-toggle {
    padding: 6px 9px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    border-radius: 0;
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: none;
    transition: all .12s ease
}

.status-toggle:last-child {
    border-right: 0
}

.status-toggle:hover {
    background: var(--green-soft)
}

.status-toggle:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 0 rgba(16, 35, 40, .06)
}

.status-toggle.is-on {
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    color: #fff
}

.heading-bubble-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    pointer-events: auto;
    padding: 0
}

.heading-bubble-controls .bubble-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.heading-bubble-controls .bubble-filter-group>span {
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.heading-bubble-controls .bubble-mini-toggle {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: 0 1px 0 rgba(16, 35, 40, .03);
    overflow: hidden
}

.heading-bubble-controls .bubble-mini-button,
.heading-bubble-controls .status-toggle {
    letter-spacing: 0.4em;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    padding: 6 9px;
    cursor: pointer;
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 0;
    box-shadow: none;
    transition: all .12s ease
}

.heading-bubble-controls .bubble-reset {
    padding: 6px 9px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(16, 35, 40, .03)
}

.heading-bubble-controls .bubble-reset:hover {
    background: var(--green-soft)
}

.status-toggle[data-status-toggle="active"] {
    border-color: rgba(34, 124, 79, .42);
    color: #1c5b3d
}

.status-toggle[data-status-toggle="active"].is-on {
    background: rgb(102, 195, 148);
    color: #1c5b3d;
    border-color: #1c5b3d
}

.status-toggle[data-status-toggle="new"] {
    border-color: rgba(43, 104, 190, .38);
    color: #1f4d87
}

.status-toggle[data-status-toggle="new"].is-on {
    background: #dfeeff;
    border-color: #2b68be;
    color: #194a95
}

.status-toggle[data-status-toggle="expanding"] {
    border-color: rgba(193, 118, 28, .38);
    color: #8b5b12
}

.status-toggle[data-status-toggle="expanding"].is-on {
    background: #fff0df;
    border-color: #c47d1d;
    color: #8f5b16
}

.sample {
    margin-top: 19px;
    background: #eaf4ef;
    border: 1px solid #cbe4d9;
    border-radius: 9px;
    padding: 9px 13px;
    color: #3a695f;
    font-size: 11px;
    display: flex;
    gap: 9px;
    align-items: center
}

.sample strong {
    font-weight: 800
}

.stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 13px;
    margin: 18px 0
}

.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 18px 19px 16px;
    min-height: 102px
}

.stat .label {
    font-size: 11px;
    color: #6d8085;
    font-weight: 700
}

.stat .num {
    font: 800 23px var(--sans);
    letter-spacing: -.05em;
    margin-top: 9px
}

.stat .foot {
    font-size: 10px;
    color: #8b9a9c;
    margin-top: 5px
}

.stat .accent {
    color: var(--teal)
}

.explore {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    max-height: calc(100vh - 124px);
    gap: 16px;
    align-items: start
}

.explore.drawer-closed {
    grid-template-columns: minmax(0, 1fr)
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(18, 55, 53, .02)
}

.mapcard {
    overflow: hidden
}

.cardhead {
    min-height: 63px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap
}

.cardhead h2 {
    font: 800 15px var(--sans);
    margin: 0
}

.viewseg {
    display: flex;
    background: #f1f5f4;
    border-radius: 8px;
    padding: 3px;
    gap: 2px
}

.viewseg button {
    border: 0;
    background: transparent;
    color: #788b8e;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    height: 27px;
    padding: 0 11px
}

.viewseg button.active {
    background: #fff;
    color: var(--deep);
    box-shadow: 0 1px 4px #d4ddda
}

.headspacer {
    flex: 1
}

.mini-select {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 7px;
    padding: 6px 9px;
    color: #4b6268;
    font-size: 11px;
    font-weight: 700;
    height: 30px
}

.mapwrap {
    position: relative;
    height: 450px;
    background: #f9fcfb;
    overflow: hidden
}

.mapwrap svg {
    display: block;
    width: 100%;
    height: 100%
}

.map-grid {
    stroke: #d8e6e3;
    stroke-width: .65
}

.land {
    fill: #e2ece9;
    stroke: #f9fcfb;
    stroke-width: 1.2
}

.land.island {
    stroke-width: .4
}

.marker {
    cursor: pointer;
    transition: transform .15s, opacity .15s;
    transform-origin: center
}

.marker:hover {
    opacity: .78
}

.marker-ring {
    fill: #0a756d;
    opacity: .13
}

.marker-dot {
    fill: #0b756b;
    stroke: #fff;
    stroke-width: 1.6
}

.marker-text {
    fill: #fff;
    font-size: 10px;
    font-weight: 800;
    text-anchor: middle;
    dominant-baseline: central;
    font-family: Arial, sans-serif;
    pointer-events: none
}

.marker.muted {
    opacity: .18
}

.maplegend {
    position: absolute;
    bottom: 16px;
    left: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 13px;
    box-shadow: var(--shadow);
    color: #63777a;
    font-size: 10px;
    width: 190px
}

.maplegend b {
    display: block;
    color: #294a4c;
    font-size: 10px;
    margin-bottom: 8px
}

.legendrow {
    display: flex;
    align-items: center;
    gap: 8px
}

.legendrow i {
    display: block;
    border-radius: 50%;
    background: #0b756b;
    opacity: .7
}

.legend-gradient {
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(20, 42, 50, .18);
    background: linear-gradient(90deg, #edf7ee 0%, #d5e8cc 20%, #9ac28d 40%, #5c8c58 60%, #1e4a2d 100%)
}

.legend-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 9px;
    color: #5a7176
}

.legend-bins {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin-top: 7px
}

.legend-bin {
    height: 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a7176;
    font-size: 8px;
    font-weight: 700
}

.map-tools {
    position: absolute;
    right: 17px;
    display: grid;
    gap: 5px
}

.map-tools button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    background: #fff;
    color: #477078;
    border-radius: 7px;
    font-size: 19px;
    line-height: 1
}

.map-note {
    position: absolute;
    right: 15px;
    bottom: 14px;
    font-size: 10px;
    color: #98aaa9;
    background: #f9fcfbd9;
    padding: 4px 7px;
    border-radius: 4px
}

.mapfooter {
    height: 46px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 0 18px;
    color: #829396;
    font-size: 11px
}

.key {
    display: flex;
    align-items: center;
    gap: 7px
}

.key i {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background: #0b756b
}

.key i.amber {
    background: #dfaa65
}

.mapfooter .right {
    margin-left: auto;
    color: #657b7e;
    font-weight: 700
}

.network {
    height: 450px;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #edf7f2, #f9fcfb 60%)
}

.network svg {
    max-width: 100%;
    max-height: 100%
}

.network .edge {
    stroke: #afcfca;
    stroke-width: 2
}

.network circle {
    cursor: pointer
}

.network text {
    font-family: var(--sans);
    fill: #31585a;
    font-weight: 700;
    font-size: 13px
}

.network .hub {
    fill: #0b756b
}

.network .product {
    fill: #86c2a6
}

.network .company {
    fill: #d6ad71
}

.network .white {
    fill: white;
    font-size: 12px
}

.drawer {
    overflow: hidden
}

.drawer-top {
    padding: 18px 18px 15px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: start;
    gap: 10px
}

.drawer-top .tiny {
    font-size: 10px;
    letter-spacing: .13em;
    color: var(--teal);
    font-weight: 800;
    text-transform: uppercase
}

.drawer-top h2 {
    font: 800 18px/1.2 var(--sans);
    margin: 5px 0 0
}

.drawer-top p {
    color: #7d8d90;
    margin: 5px 0 0;
    font-size: 11px
}

.iconbtn {
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: #6e8286;
    width: 28px;
    height: 28px;
    font-size: 17px
}

.drawer-body {
    padding: 18px
}

.status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 5px;
    background: #e5f3ed;
    color: #0b7066;
    font-size: 10px;
    font-weight: 800
}

.drawer-image {
    height: 100px;
    margin: 16px 0;
    border-radius: 9px;
    background: linear-gradient(125deg, #103e45, #186d63 58%, #7cbda1);
    position: relative;
    overflow: hidden
}

.drawer-image:before,
.drawer-image:after {
    content: "";
    position: absolute;
    border: 1px solid #b6e4d249;
    border-radius: 50%;
    width: 180px;
    height: 180px;
    top: -47px;
    left: 105px
}

.drawer-image:after {
    width: 250px;
    height: 250px;
    top: -80px;
    left: 72px
}

.drawer-image span {
    position: absolute;
    bottom: 13px;
    left: 14px;
    color: #d3eee2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em
}

.drawer h3 {
    font: 800 11px var(--sans);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #638082;
    margin: 19px 0 10px
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 8px
}

.detail-grid small {
    display: block;
    color: #91a1a1;
    font-size: 10px;
    margin-bottom: 4px
}

.detail-grid strong {
    font-size: 12px;
    font-weight: 800
}

.detail-grid .full {
    grid-column: 1/-1
}

.rule {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0
}

.confidence {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #5f7779
}

.bar {
    height: 6px;
    background: #e9efeb;
    border-radius: 4px;
    margin: 9px 0 6px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    width: 72%;
    background: linear-gradient(90deg, #dcb66b, #4d9d8b);
    border-radius: 4px
}

.evidence {
    font-size: 11px;
    color: #708588;
    line-height: 1.5
}

.drawer-action {
    margin-top: 15px;
    display: flex;
    gap: 8px
}

.drawer-action .btn {
    flex: 1;
    justify-content: center;
    font-size: 10px;
    padding: 0 6px
}

.tablefilters {
    display: flex;
    gap: 8px;
    align-items: center
}

.chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 7px;
    padding: 7px 9px;
    color: #4b6668;
    font-weight: 700;
    font-size: 11px
}

.chip.active {
    border-color: #a8d7c9;
    color: #0b756b;
    background: #eff8f4
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px
}

th {
    text-align: left;
    background: #f6f9f8;
    color: #7b8f91;
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 800;
    padding: 12px 16px;
    border-block: 1px solid var(--line);
    white-space: nowrap
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf1f0;
    color: #455d61;
    font-size: 11px;
    white-space: nowrap
}

tbody tr {
    cursor: pointer
}

tbody tr:hover {
    background: #f5fbf8
}

tbody tr.selected {
    background: #edf8f3
}

td strong {
    color: #193f41;
    font-size: 11px
}

td .sub {
    display: block;
    color: #99a9aa;
    font-size: 10px;
    margin-top: 3px
}

.pill {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 5px;
    background: #e5f3ed;
    color: #0b756b;
    font-size: 10px;
    font-weight: 800
}

.pill.plan {
    background: #fcf0e0;
    color: #a77435
}

.note {
    margin-top: 18px;
    color: #91a2a5;
    font-size: 10px
}

@media(max-width:1200px) {
    .explore {
        grid-template-columns: minmax(0, 1fr) 310px
    }

    .toplinks {
        gap: 15px
    }

    .searchbox {
        width: 180px
    }

    main {
        padding: 26px 22px
    }
}

@media(max-width:980px) {

    .explore,
    .explore.drawer-closed {
        grid-template-columns: 1fr
    }

    .drawer {
        max-width: none
    }

    .drawer-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 24px
    }

    .drawer-image {
        grid-column: 1/-1
    }

    .toplinks {
        display: none
    }

    .searchbox {
        width: 500px
    }
}

@media(max-width:700px) {
    .shell {
        display: block
    }

    .topbar {
        padding: 0 15px;
        height: 60px
    }

    .brand {
        width: auto
    }

    .brand strong {
        font-size: 12px
    }

    .searchbox {
        display: none
    }

    main {
        padding: 22px 14px
    }

    .heading {
        align-items: start
    }

    .heading-actions .btn:first-child {
        display: none
    }

    .stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .stat {
        min-height: 90px
    }

    .mapwrap,
    .network {
        height: 340px
    }

    .drawer-body {
        display: block
    }

    .cardhead {
        gap: 7px
    }

    .mapfooter {
        font-size: 9px
    }

    .tablefilters {
        display: none
    }
}

/* Full viewport exploration layout */
html,
body {
    height: 100%;
    overflow: hidden
}

.shell {
    height: calc(100vh - 72px);
    min-height: 0
}

.sidebar {
    z-index: 24
}

main {
    position: relative;
    height: calc(100vh - 72px);
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f6faf8
}

.heading>* {
    pointer-events: auto
}

.heading h1 {
    font-size: 24px
}

.heading p {
    font-size: 12px
}

.eyebrow {
    display: none
}

.sample {
    position: absolute;
    z-index: 8;
    left: 28px;
    bottom: 68px;
    margin: 0;
    max-width: 690px;
    box-shadow: var(--shadow);
    background: #ffffffed
}

.stats {
    position: absolute;
    z-index: 8;
    top: 0px;
    left: 28px;
    right: 28px;
    margin: 0;
    grid-template-columns: repeat(6, minmax(130px, 210px));
    gap: 10px;
    pointer-events: none
}

.stat {
    min-height: 72px;
    padding: 10px 12px;
    box-shadow: var(--shadow);
    background: #fffffff2;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    border-radius: 10px
}

.stat .num {
    font-size: 18px;
    margin-top: 4px
}

.stat .foot {
    margin-top: 1px
}

.explore,
.explore.drawer-closed {
    display: block;
    position: absolute;
    inset: 0;
    max-height: none /* fill the whole of main; the base 100vh - 124px cap left a gap above the footer */
}

.mapcard {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #f9fcfb
}

.mapcard .cardhead {
    position: absolute;
    top: 199px;
    left: 28px;
    right: 28px;
    z-index: 6;
    min-height: 50px;
    width: max-content;
    max-width: calc(100% - 56px);
    padding: 8px 10px;
    background: #fffffff2;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px)
}

.mapcard .headspacer {
    width: 13px;
    flex: none
}

.mapwrap,
.network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0
}

.mapwrap svg {
    width: 100%;
    height: 100%;
    transition: transform .2s ease
}

.maplegend {
    bottom: 88px;
}

.map-tools {
    bottom: 30px;
    right: 10px
}

.map-note {
    bottom: 62px
}

.mapfooter {
    position: absolute;
    left: 28px;
    bottom: 12px;
    z-index: 5;
    width: max-content;
    max-width: calc(100% - 56px);
    height: 36px;
    padding: 0 12px;
    background: #fffffff2;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    gap: 11px
}

.mapfooter .right {
    display: none
}

.network {
    z-index: 1
}

.mapcard {
    z-index: 2
}

.drawer {
    position: fixed;
    z-index: 25;
    right: 0;
    top: 72px;
    bottom: 0;
    width: min(390px, calc(100vw - 232px));
    border-radius: 14px 0 0 14px;
    box-shadow: -15px 0 42px rgba(17, 49, 52, .18);
    overflow-y: auto
}

.drawer[hidden] {
    display: none
}

.drawer-top {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2
}

.drawer-body {
    display: block
}

.note {
    display: none
}

@media(max-width:1200px) {
    .drawer {
        width: min(360px, calc(100vw - 195px))
    }

    .stats {
        grid-template-columns: repeat(4, minmax(110px, 1fr))
    }

    .heading h1 {
        font-size: 21px
    }

    .stat .foot {
        display: none
    }
}

@media(max-width:980px) {
    .heading {
        left: 18px;
        right: auto;
        max-width: calc(100% - 36px)
    }

    .stats {
        left: 18px;
        right: 18px;
        top: 96px
    }

    .mapcard .cardhead {
        left: 18px;
        top: 190px
    }

    .sample {
        left: 18px;
        right: 18px;
        bottom: 65px
    }

    .mapfooter {
        left: 18px
    }

    .drawer {
        width: min(390px, calc(100vw - 195px))
    }
}

@media(max-width:700px) {

    .shell,
    main {
        height: calc(100dvh - 60px)
    }

    .heading {
        top: 17px;
        left: 14px;
        right: auto;
        max-width: calc(100% - 28px)
    }

    .heading h1 {
        font-size: 17px
    }

    .heading p {
        display: none
    }

    .heading-actions .btn.primary {
        height: 30px;
        padding: 0 8px;
        font-size: 10px
    }

    .stats {
        top: 74px;
        left: 14px;
        right: 14px;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px
    }

    .stat {
        min-height: 60px;
        padding: 8px 10px
    }

    .stat .label {
        font-size: 9px
    }

    .stat .num {
        font-size: 15px;
        margin-top: 3px
    }

    .mapcard .cardhead {
        top: 210px;
        left: 14px;
        right: 14px;
        max-width: calc(100% - 28px);
        width: auto
    }

    .mapcard .cardhead h2 {
        display: none
    }

    .mapcard .headspacer {
        display: none
    }

    .mini-select {
        max-width: 110px
    }

    .maplegend {
        display: none
    }

    .map-tools {
        top: 265px;
        right: 14px
    }

    .mapfooter {
        left: 14px;
        bottom: 57px
    }

    .sample {
        left: 14px;
        right: 14px;
        bottom: 105px;
        font-size: 9px
    }

    .drawer {
        top: 60px;
        width: min(390px, 100vw)
    }

    .map-note {
        display: none
    }
}

.bubble-view {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 53%, #ecf7f2 0, #f8fcfa 67%);
    overflow: hidden
}

.bubble-view svg {
    width: 100%;
    height: 100%
}

.bubble-caption {
    position: absolute;
    left: 31px;
    top: 273px;
    z-index: 2;
    max-width: 285px;
    color: #5f7a7d;
    font-size: 11px;
    line-height: 1.5
}

.bubble-caption strong {
    display: block;
    color: #214b4b;
    font: 800 15px var(--sans);
    margin-bottom: 5px
}

.bubble-hint {
    position: absolute;
    right: 27px;
    bottom: 67px;
    color: #64807e;
    font-size: 11px;
    background: #ffffffd9;
    padding: 7px 10px;
    border-radius: 6px
}

.country-bubble {
    cursor: pointer
}

.country-bubble circle {
    stroke: #fff;
    stroke-width: 3;
    filter: drop-shadow(0 8px 13px rgba(30, 83, 80, .16));
    transition: filter .2s, opacity .2s
}

.country-bubble text {
    text-anchor: middle;
    fill: white;
    font-family: var(--sans);
    pointer-events: none
}

.bubble-name {
    font-size: 14px;
    font-weight: 800
}

.bubble-value {
    font-size: 12px;
    font-weight: 600;
    opacity: .94
}

@media(max-width:700px) {
    .bubble-caption {
        top: 270px;
        left: 16px;
        max-width: 220px;
        font-size: 9px
    }

    .bubble-caption strong {
        font-size: 12px
    }

    .bubble-hint {
        right: 13px;
        bottom: 63px;
        font-size: 9px
    }
}

/* Visual system adapted from the supplied site stylesheet. */
:root {
    --paper: #f6f2e8;
    --paper-2: #fbf8f0;
    --ink: #102328;
    --muted: #6f7775;
    --line: rgba(36, 55, 51, .18);
    --green: #507c46;
    --green-2: #759b68;
    --green-soft: #d8e1d1;
    --amber: #be8130;
    --header-bg: rgba(246, 242, 232, .92);
    --accent-ink: #4e794b;
    --serif: "Fraunces", Georgia, serif;
    --sans: "IBM Plex Sans", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
    --teal: var(--green);
    --deep: var(--green);
    --light: var(--green-soft);
    --white: var(--paper-2);
    --orange: var(--amber);
    --shadow: 0 8px 22px rgba(16, 35, 40, .08);
}

html[data-theme="copper"] {
    --paper: #f7efe4;
    --paper-2: #fdf7ef;
    --ink: #2f2216;
    --muted: #7b6a5d;
    --line: rgba(82, 58, 37, .22);
    --green: #9a5c30;
    --green-2: #c18456;
    --green-soft: #e6d2be;
    --amber: #7c4f2c;
    --header-bg: rgba(247, 239, 228, .92);
    --accent-ink: #8a5530
}

html[data-theme="monochrome"] {
    --paper: #f3f3f3;
    --paper-2: #fafafa;
    --ink: #202020;
    --muted: #666;
    --line: rgba(28, 28, 28, .22);
    --green: #3c3c3c;
    --green-2: #666;
    --green-soft: #dedede;
    --amber: #4a4a4a;
    --header-bg: rgba(243, 243, 243, .94);
    --accent-ink: #404040
}

html[data-theme="oceanic"] {
    --paper: #eaf3f8;
    --paper-2: #f6fbff;
    --ink: #10243b;
    --muted: #425d76;
    --line: rgba(16, 36, 59, .22);
    --green: #0f5b8a;
    --green-2: #1d78b0;
    --green-soft: #c9e4f4;
    --amber: #b35d2b;
    --header-bg: rgba(234, 243, 248, .94);
    --accent-ink: #0f5b8a
}

html[data-theme="sunset"] {
    --paper: #fff1e8;
    --paper-2: #fff7f1;
    --ink: #372117;
    --muted: #7e5a48;
    --line: rgba(96, 53, 30, .24);
    --green: #b84d2e;
    --green-2: #d7724d;
    --green-soft: #ffd5bf;
    --amber: #8d4300;
    --header-bg: rgba(255, 241, 232, .94);
    --accent-ink: #9f462b
}

html[data-theme="high-contrast-light"] {
    --paper: #fff;
    --paper-2: #f7f7f7;
    --ink: #000;
    --muted: #222;
    --line: rgba(0, 0, 0, .66);
    --green: #0037c1;
    --green-2: #0057ff;
    --green-soft: #dfe9ff;
    --amber: #8a3000;
    --header-bg: rgba(255, 255, 255, .97);
    --accent-ink: #0037c1
}

html[data-theme="high-contrast-dark"] {
    --paper: #0b0b0b;
    --paper-2: #151515;
    --ink: #f5f5f5;
    --muted: #d3d3d3;
    --line: rgba(255, 255, 255, .45);
    --green: #66b3ff;
    --green-2: #8bc5ff;
    --green-soft: #1c2f42;
    --amber: #ffb366;
    --header-bg: rgba(11, 11, 11, .96);
    --accent-ink: #7ec2ff
}

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased
}

button,
input,
select {
    font-family: var(--sans);
    color: var(--ink)
}

.paper-grain {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
    opacity: .12;
    background-image: radial-gradient(circle at 20% 20%, rgba(28, 46, 39, .12) 0 .5px, transparent .7px), radial-gradient(circle at 80% 65%, rgba(124, 95, 45, .12) 0 .6px, transparent .8px);
    background-size: 8px 8px, 11px 11px;
    mix-blend-mode: multiply
}

.topbar {
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-color: var(--line)
}

.brand {
    width: 223px;
    gap: 10px
}

.mark {
    border-radius: 0;
    width: 50px;
    height: 50px
}

.mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain
}

.brand strong {
    font: 500 15px var(--mono);
    letter-spacing: .11em;
    color: var(--ink)
}

.brand small {
    font: 400 11px var(--serif);
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted)
}

.toplinks a {
    font: 500 12px var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom-width: 1px;
    gap: 6px;
    white-space: nowrap
}

.toplinks a svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8
}

.toplinks a.active {
    color: var(--green);
    border-color: var(--green)
}

.global-search {
    position: relative;
    display: inline-block;
    z-index: 30
}

.searchbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 37px;
    width: 500px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--muted);
    box-shadow: inset 0 0 0 1px rgba(16, 35, 40, .02)
}

.searchbox input {
    background: transparent;
    border: 0;
    outline: 0;
    width: 100%;
    color: var(--ink);
    font: 400 11px var(--mono)
}

.searchbox svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0
}

.global-search-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    width: min(420px, 42vw);
    min-width: 500px;
    max-width: 100%;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 42px rgba(16, 35, 40, .18);
    backdrop-filter: blur(12px);
    z-index: 90
}

.global-search-dropdown[hidden] {
    display: none
}

.global-search-results {
    display: grid;
    gap: 8px;
    max-height: min(52vh, 420px);
    overflow: auto
}

.global-search-item {
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18)
}

.global-search-item:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, .6)
}

.global-search-item-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0
}

.global-search-item-kind {
    font: 600 10px var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green)
}

.global-search-item strong {
    display: block;
    font: 500 14px/1.2 var(--sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.global-search-item small {
    display: block;
    color: var(--muted);
    font: 400 12px/1.4 var(--sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.global-search-item-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.global-search-action {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .48);
    border-radius: 999px;
    padding: 5px 8px;
    font: 600 10px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .15s ease
}

.global-search-action:hover {
    border-color: var(--green);
    background: rgba(80, 124, 70, .08)
}

.global-search-action[data-tone="focus"] {
    border-color: rgba(80, 124, 70, .48)
}

.global-search-action[data-tone="exclude"] {
    border-color: rgba(167, 64, 64, .34)
}

.global-search-action[data-tone="info"] {
    border-color: rgba(28, 92, 128, .36)
}

.global-search-empty {
    padding: 12px;
    color: var(--muted);
    font: 400 13px/1.5 var(--sans)
}

.searchbox,
.topicon,
.theme-select {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--muted)
}

.topicon {
    color: var(--green)
}


.theme-select {
    height: 35px;
    padding: 0 8px;
    font: 500 10px var(--mono);
    letter-spacing: .03em;
    max-width: 125px
}

.theme-toggle {
    height: 35px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: var(--muted);
    font: 500 10px var(--mono);
    letter-spacing: .03em;
    text-transform: uppercase
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    flex: none
}

.avatar {
    background: var(--green-soft);
    color: var(--accent-ink);
    border-radius: 0;
    font-family: var(--mono)
}

.sidebar {
    background: var(--paper-2);
    border-color: var(--line)
}

.side-label {
    font: 600 9px var(--mono);
    letter-spacing: .14em;
    color: var(--muted)
}

.side-link {
    border-radius: 0;
    color: var(--muted);
    font: 500 11px var(--mono);
    letter-spacing: .02em
}

.side-link.active {
    background: var(--green-soft);
    color: var(--accent-ink);
    font-weight: 600;
    border-left: 2px solid var(--green)
}

.side-link .count {
    background: var(--paper);
    border-radius: 0;
    color: var(--muted)
}

.side-filter {
    display: block;
    margin: 0 12px 6px;
    color: var(--muted);
    font: 600 9px var(--mono);
    letter-spacing: .09em;
    text-transform: uppercase
}

.side-filter-select {
    display: block;
    width: calc(100% - 24px);
    margin: 0 12px 10px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font: 500 9px var(--mono);
    letter-spacing: .03em
}

.workspace {
    background: var(--paper);
    border-color: var(--line);
    border-radius: 0
}

.workspace .wicon {
    background: var(--green-soft);
    color: var(--accent-ink);
    border-radius: 0
}

.workspace strong {
    font: 600 11px var(--mono)
}

.workspace small {
    color: var(--muted);
    font: 400 10px var(--sans)
}

main {
    background: var(--paper)
}

.heading h1 {
    font: 300 33px/1.05 var(--serif);
    letter-spacing: -.025em;
    color: var(--ink)
}

.heading p {
    font: 400 12px/1.45 var(--sans);
    color: var(--muted)
}

.heading-filters {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    pointer-events: auto
}

.heading-actions {
    position: relative
}

.heading-filter-chip {
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    height: 28px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase
}

.heading-filter-chip:hover {
    background: var(--green-soft);
    border-color: var(--green-2);
    color: var(--accent-ink)
}

.btn {
    border-radius: 0;
    background: var(--paper-2);
    border-color: var(--line);
    color: var(--ink);
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase
}

.btn.primary {
    background: var(--green);
    border-color: var(--green);
    color: var(--paper-2)
}

.sample {
    border-radius: 0;
    background: var(--paper-2);
    border-color: var(--line);
    color: var(--muted);
    box-shadow: var(--shadow);
    font: 400 10px/1.4 var(--sans)
}

.sample strong {
    font: 600 9px var(--mono);
    letter-spacing: .1em;
    color: var(--green);
    white-space: nowrap
}

.stat,
.card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 10px
}

.stat {
    box-shadow: var(--shadow);
    backdrop-filter: none;
    padding: 10px 12px;
    min-height: 74px
}

.stat .label {
    font: 600 9px var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted)
}

.stat .num {
    font: 400 21px var(--sans);
    letter-spacing: -.03em;
    color: var(--ink)
}

.stat .foot {
    color: var(--muted);
    font: 400 10px var(--sans)
}

.stat .accent {
    color: var(--green)
}

.mapcard {
    background: var(--paper);
    border: 0
}

.mapcard .cardhead {
    background: var(--paper-2);
    backdrop-filter: none;
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: var(--shadow)
}

.cardhead h2 {
    font: 600 10px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase
}

.viewseg {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0;
    gap: 0
}

.viewseg button {
    border-radius: 0;
    height: 29px;
    font: 600 9px var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted)
}

.viewseg button+button {
    border-left: 1px solid var(--line)
}

.viewseg button.active {
    background: var(--green);
    color: var(--paper-2);
    box-shadow: none
}

.mini-select {
    border-radius: 0;
    background: var(--paper-2);
    border-color: var(--line);
    font: 500 10px var(--mono);
    color: var(--ink)
}

.mapwrap {
    background: var(--paper)
}

.map-grid {
    stroke: var(--line);
    opacity: .8
}

.land {
    fill: var(--green-soft);
    stroke: var(--paper);
    opacity: .72
}

.marker-ring {
    fill: var(--green);
    opacity: .14
}

.marker-dot {
    fill: var(--green);
    stroke: var(--paper-2)
}

.marker-text {
    fill: var(--paper-2);
    font-family: var(--mono)
}

.maplegend,
.map-tools button,
.mapfooter {
    background: var(--paper-2);
    border-color: var(--line);
    border-radius: 0;
    box-shadow: var(--shadow);
    color: var(--muted)
}

.maplegend b {
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink)
}

.maplegend {
    width: max-content;
    min-width: 0
}

.legend-gradient,
.legend-scale {
    display: none
}

.legend-bins {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 6px
}

.legend-bin {
    display: flex;
    align-items: center;
    gap: 6px;
    height: auto;
    padding: 0;
    justify-content: flex-start;
    font-size: 10px;
    background: transparent !important
}

.legend-bin i {
    width: 20px;
    height: 10px;
    display: block;
    flex: none;
    border: 1px solid rgba(20, 42, 50, .18)
}

.legend-bin span {
    line-height: 1
}

.facility-legend .legend-bin i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 0;
    box-shadow: 0 0 0 1px rgba(20, 42, 50, .22)
}

.facility-legend .legend-bin i.legend-status-active {
    background: #2f8f4e
}

.facility-legend .legend-bin i.legend-status-new {
    background: #2d6cdf
}

.facility-legend .legend-bin i.legend-status-expanding {
    background: #d97b2f
}

.legendrow i,
.key i {
    background: var(--green)
}

.key i.amber {
    background: var(--amber)
}

.mapfooter {
    font: 500 9px var(--mono)
}

.map-note {
    background: var(--paper-2);
    color: var(--muted);
    border: 1px solid var(--line);
    font: 400 9px var(--mono)
}

.map-tools {
    display: flex;
    align-items: flex-end;
    gap: 6px
}

.map-tools .tool-text-button {
    width: auto;
    min-width: 102px;
    padding: 0 10px;
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase
}

.zoom-stack {
    display: grid;
    gap: 5px
}

.zoom-stack button {
    width: 30px
}

.drawer {
    background: var(--paper-2);
    border-radius: 0;
    box-shadow: -10px 0 30px rgba(16, 35, 40, .12)
}

.drawer-top {
    background: var(--paper-2);
    border-color: var(--line)
}

.drawer-top .tiny,
.drawer h3 {
    font: 600 9px var(--mono);
    letter-spacing: .12em;
    color: var(--green)
}

.drawer-top h2 {
    font: 400 28px/1.12 var(--serif);
    letter-spacing: -.02em
}

.drawer-top .location-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 7px
}

.drawer-top p,
.detail-grid small,
.evidence {
    color: var(--muted)
}

.drawer-top p {
    margin: 0
}

.detail-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(61, 122, 217, .22);
    background: rgba(61, 122, 217, .12);
    color: #1d4f9d;
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase
}

.detail-location-badge[hidden] {
    display: none !important
}

.detail-location-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3d7ad9;
    box-shadow: 0 0 0 2px rgba(61, 122, 217, .18)
}

.detail-location-badge.is-near {
    border-color: rgba(184, 70, 62, .22);
    background: rgba(184, 70, 62, .12);
    color: #8f342d
}

.detail-location-badge.is-near::before {
    background: #b74d45;
    box-shadow: 0 0 0 2px rgba(183, 77, 69, .18)
}

.iconbtn {
    background: var(--paper);
    color: var(--green);
    border-color: var(--line);
    border-radius: 0
}

.status,
.pill {
    background: var(--green-soft);
    color: var(--accent-ink);
    border-radius: 0;
    font: 600 9px var(--mono);
    text-transform: uppercase;
    letter-spacing: .06em
}

.pill.plan {
    background: color-mix(in srgb, var(--amber) 20%, var(--paper-2));
    color: var(--amber)
}

.drawer-image {
    border-radius: 0;
    background: linear-gradient(125deg, var(--green), var(--green-2));
    height: 88px
}

.drawer-image span {
    color: var(--paper-2);
    font: 500 9px var(--mono);
    letter-spacing: .1em
}

.detail-grid strong {
    font: 600 11px var(--mono);
    color: var(--ink)
}

.confidence {
    color: var(--muted)
}

.bar {
    background: var(--green-soft)
}

.bar i {
    background: var(--green)
}

.chip {
    border-radius: 0;
    background: var(--paper-2);
    border-color: var(--line);
    color: var(--ink);
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase
}

.chip.active {
    background: var(--green-soft);
    border-color: var(--green-2);
    color: var(--accent-ink)
}

th {
    background: var(--paper);
    color: var(--muted);
    border-color: var(--line);
    font: 600 9px var(--mono);
    letter-spacing: .09em
}

tr,
td {
    border-color: var(--line)
}

td {
    color: var(--ink);
    font: 400 11px var(--sans)
}

td strong {
    color: var(--ink);
    font: 600 11px var(--mono)
}

td .sub {
    color: var(--muted)
}

.bubble-view {
    background: var(--paper)
}

.bubble-caption {
    color: var(--muted);
    font: 400 11px/1.5 var(--sans)
}

.bubble-caption strong {
    color: var(--ink);
    font: 400 25px var(--serif);
    letter-spacing: -.02em
}

.bubble-hint {
    background: var(--paper-2);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 0;
    font: 500 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase
}

.country-bubble circle {
    fill: var(--green-soft);
    stroke: var(--green);
    stroke-width: 1.3;
    filter: none
}

.country-bubble text {
    fill: var(--ink);
    font-family: var(--mono)
}

.bubble-name {
    font-size: 12px;
    font-weight: 600
}

.bubble-value {
    font-size: 10px;
    font-weight: 500
}

@media(max-width:700px) {
    .heading h1 {
        font-size: 23px
    }

    .stat .num {
        font-size: 16px
    }

    .stat .label {
        font-size: 8px
    }

    .theme-toggle {
        padding: 0 8px
    }

    .theme-toggle-label {
        display: none
    }

    .bubble-caption strong {
        font-size: 16px
    }
}


/* Django bubble-dashboard controls within the map-first workspace. */
.bubble-view {
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 260px 28px 54px;
    gap: 0
}

.bubble-control-panel {
    flex: none;
    position: relative;
    z-index: 4;
    display: grid;
    gap: 7px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
    max-width: 1120px
}

.bubble-control-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 11px
}

.bubble-control-row.secondary {
    border-top: 1px solid var(--line);
    padding-top: 7px
}

.bubble-mini-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    background: var(--paper-2)
}

.bubble-mini-button {
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    padding: 6px 9px;
    cursor: pointer;
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase
}

.bubble-mini-button:last-child {
    border-right: 0
}

.bubble-mini-button.active {
    background: var(--green);
    color: var(--paper-2)
}

.control-divider {
    width: 1px;
    height: 20px;
    background: var(--line)
}

.control-label,
.chemical-level-label {
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.chemical-level-label {
    display: flex;
    align-items: center;
    gap: 7px
}

.chemical-level-label[hidden] {
    display: none
}

.chemical-level-label select {
    height: 29px;
    padding: 0 7px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    font: 500 9px var(--mono);
    text-transform: uppercase;
    color: var(--ink)
}

.bubble-reset {
    padding: 6px 9px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    font: 600 9px var(--mono);
    text-transform: uppercase;
    letter-spacing: .04em
}

.bubble-reset:hover,
.bubble-mini-button:not(.active):hover {
    background: var(--green-soft)
}

.bubble-active-filters {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 7px
}

.bubble-active-filters[hidden] {
    display: none
}

.bubble-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--green-2);
    background: var(--green-soft);
    color: var(--accent-ink);
    padding: 4px 7px;
    font: 500 9px var(--mono);
    text-transform: uppercase;
    cursor: pointer
}

.bubble-active-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(18, 46, 44, .08);
    font-weight: 700;
    line-height: 1;
    cursor: pointer
}

.bubble-caption {
    position: static;
    max-width: none;
    display: flex;
    align-items: baseline;
    gap: 12px 20px;
    flex-wrap: wrap;
    padding: 15px 2px 8px;
    z-index: 2
}

.bubble-caption strong {
    font-size: 23px
}

.bubble-caption span {
    font-size: 10px
}

.bubble-totals {
    font: 600 10px var(--mono) !important;
    color: var(--accent-ink)
}

.bubble-canvas {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%
}

.bubble-canvas svg {
    width: 100%;
    height: 100%;
    display: block
}

.bubble-canvas svg[hidden] {
    display: none
}

.bubble-summary-table {
    height: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    background: var(--paper-2)
}

.bubble-summary-table[hidden] {
    display: none
}

.bubble-summary-table table {
    width: 100%;
    min-width: 400px
}

.bubble-summary-table tbody tr {
    cursor: pointer
}

.bubble-summary-table td:last-child,
.bubble-summary-table th:last-child {
    text-align: right
}

.bubble-hint {
    bottom: 58px;
    right: 28px;
    z-index: 2
}

.bubble-hover-detail {
    position: fixed;
    z-index: 1400;
    min-width: 180px;
    max-width: 270px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
    pointer-events: none;
    display: grid;
    gap: 6px;
    color: var(--ink);
    font: 500 10px var(--mono)
}

.bubble-hover-detail[hidden] {
    display: none
}

.bubble-hover-detail strong {
    font: 600 12px var(--mono)
}

.bubble-hover-detail span {
    color: var(--muted);
    line-height: 1.4
}

.country-bubble {
    cursor: pointer
}

.country-bubble circle,
.country-bubble rect {
    fill: var(--green-soft);
    stroke: var(--green);
    stroke-width: 1.2;
    transition: fill .15s, stroke-width .15s
}

.country-bubble:hover circle,
.country-bubble:hover rect,
.country-bubble:focus circle,
.country-bubble:focus rect {
    fill: var(--green-2);
    opacity: .85;
    filter: none
}

.country-bubble.is-selected circle,
.country-bubble.is-selected rect {
    stroke: var(--amber);
    stroke-width: 4
}

.country-bubble text {
    text-anchor: middle;
    fill: var(--ink);
    font-family: var(--mono);
    pointer-events: none
}

.country-bubble .bubble-name {
    font-size: 12px;
    font-weight: 600
}

.country-bubble .bubble-value {
    font-size: 10px;
    font-weight: 500
}

@media(max-width:1100px) {
    .bubble-view {
        padding-top: 260px
    }

    .bubble-control-panel {
        max-height: 135px;
        overflow-y: auto
    }

    .bubble-caption {
        gap: 4px 10px;
        padding-top: 8px
    }

    .bubble-caption strong {
        font-size: 18px
    }
}

@media(max-width:700px) {
    .bubble-view {
        padding: 260px 14px 55px
    }

    .bubble-control-panel {
        max-height: 145px;
        overflow: auto;
        padding: 7px
    }

    .bubble-mini-button {
        font-size: 8px;
        padding: 5px 7px
    }

    .bubble-caption span:not(.bubble-totals) {
        display: none
    }

    .bubble-caption strong {
        font-size: 16px
    }

    .bubble-hint {
        right: 14px;
        bottom: 56px;
        max-width: 240px
    }

    .bubble-canvas {
        min-height: 0
    }
}

.bubble-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.bubble-filter-group[hidden] {
    display: none
}

/* Compact ticker for summary stats across the top workspace edge. */
.stats {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 7px 14px;
    min-height: 40px;
    background: color-mix(in srgb, var(--paper-2) 84%, transparent);
    backdrop-filter: blur(6px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    pointer-events: auto
}

.stats {
    left: 0;
    right: 0;
    transform: none;
    width: auto;
    justify-content: center
}

.stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    backdrop-filter: none;
    white-space: nowrap;
    flex: none
}

.stat+.stat::before {
    content: "\00B7";
    display: inline-block;
    margin: 0 11px 0 7px;
    color: var(--muted);
    font: 700 18px/1 var(--mono)
}

.stat .label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.stat .label svg {
    width: 11px;
    height: 11px;
    stroke-width: 1.7;
    flex: none;
    color: var(--ink)
}

.stat .num {
    margin: 0;
    font: 600 13px var(--mono);
    letter-spacing: 0;
    color: var(--ink)
}

.stat .foot {
    display: none
}

@media(max-width:980px) {
    .stats {
        left: 0;
        right: 0;
        top: 68px;
        transform: none;
        width: auto;
        padding: 6px 10px;
        min-height: 34px
    }

    .stat .label {
        font-size: 8px
    }

    .stat .num {
        font-size: 11px
    }

    .stat+.stat::before {
        margin-inline: 7px;
        font-size: 14px
    }
}

@media(max-width:700px) {
    .stats {
        left: 0;
        right: 0;
        top: 66px;
        transform: none;
        width: auto;
        padding: 6px 8px;
        min-height: 32px
    }

    .stat {
        gap: 6px
    }

    .stat .label {
        font-size: 7px
    }

    .stat .num {
        font-size: 10px
    }

    .stat+.stat::before {
        margin-inline: 6px;
        font-size: 12px
    }
}

.filter-dropdown {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, calc(100vw - 28px));
    min-width: 0;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
    z-index: 60;
    padding: 0;
    border-radius: 16px;
    overflow: visible
}

.filter-dropdown::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: var(--paper-2);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    rotate: 45deg;
    box-shadow: calc(var(--shadow-strength, 1) * 6px) 6px 18px rgba(13, 29, 26, .12)
}

.filter-dropdown[hidden] {
    display: none
}

.filter-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-2)
}

.filter-dropdown-header span {
    font: 700 10px var(--mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted)
}

.filter-dropdown-list,
.filter-flyout-list {
    list-style: none;
    margin: 0;
    padding: 0
}

.filter-dropdown-list {
    padding: 8px
}

.filter-dropdown-item {
    position: relative;
    border-radius: 10px
}

.filter-dropdown-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 500 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    border-radius: 8px
}

.filter-dropdown-item:hover>.filter-dropdown-button,
.filter-dropdown-item.is-open>.filter-dropdown-button {
    background: var(--green-soft);
    color: var(--accent-ink)
}

.filter-caret {
    font-size: 10px;
    color: var(--muted);
    transition: transform .15s ease
}

.filter-dropdown-item.is-open .filter-caret {
    transform: rotate(90deg)
}

.filter-flyout {
    position: absolute;
    left: calc(100% + 1px);
    top: -5px;
    min-width: 220px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
    padding: 4px;
    display: none;
    border-radius: 10px
}

.filter-dropdown-item:hover>.filter-flyout,
.filter-dropdown-item.is-open>.filter-flyout {
    display: block
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--ink);
    font: 500 10px var(--mono);
    letter-spacing: .03em;
    text-transform: none;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 6px
}

.filter-check:hover {
    background: var(--green-soft)
}

.filter-check input {
    width: 14px;
    height: 14px;
    accent-color: var(--green)
}

@media(max-width:700px) {
    .filter-dropdown {
        width: calc(100vw - 20px);
        border-radius: 12px
    }

    .filter-dropdown-header {
        padding: 8px 12px
    }

    .filter-dropdown-list {
        padding: 6px
    }

    .filter-dropdown-button {
        font-size: 9px;
        padding: 9px 10px
    }

    .filter-flyout {
        left: calc(100% + 1px);
        min-width: 180px
    }
}

#map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%
}

.mapboxgl-map,
.mapboxgl-canvas {
    width: 100%;
    height: 100%
}

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
    filter: saturate(.8);
    font-family: var(--mono)
}

.mapcard {
    z-index: auto
}

.mapboxgl-popup {
    z-index: 1300
}

.mapboxgl-popup-content {
    font: 500 10px var(--mono);
    color: var(--ink);
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: var(--shadow)
}

.mapboxgl-popup-tip {
    border-top-color: var(--paper-2) !important
}

/* No-nav bubble partial layout inside monitor shell */
#bubble-view {
    padding: 100px 10px 52px;
    align-items: stretch;
    justify-content: flex-start;
    overflow: auto;
    background: var(--paper)
}

#coverage-view {
    padding: 100px 10px 52px;
    align-items: stretch;
    justify-content: flex-start;
    overflow: auto;
    background: var(--paper)
}

#bubble-view .bubble-shell {
    width: 100%;
    min-height: 100%
}

#bubble-view .bubble-panel {
    display: grid;
    gap: 12px
}

#bubble-view .bubble-panel-controls {
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow)
}

#bubble-view .bubble-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px
}

#bubble-view .bubble-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 8px
}

#bubble-view .bubble-filter-group>span {
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

#bubble-view .bubble-panel-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#bubble-view .bubble-panel-view {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    min-height: 560px
}

#bubble-view .bubble-panel-view-head {
    display: grid;
    gap: 6px
}

#bubble-view .bubble-panel-view-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap
}

#bubble-view .bubble-panel-view-copy h3 {
    margin: 0;
    font: 600 13px var(--mono);
    letter-spacing: .04em;
    color: var(--ink)
}

#bubble-view .bubble-stats {
    display: flex;
    gap: 10px;
    font: 500 10px var(--mono);
    color: var(--muted)
}

#bubble-view .bubble-panel-view-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

#bubble-view .bubble-panel-view-buttons {
    display: flex;
    gap: 7px
}

#bubble-view .bubble-nav-help {
    margin: 0;
    color: var(--muted);
    font: 400 10px var(--sans)
}

#bubble-view .bubble-reset-zoom,
#bubble-view .bubble-clear-filter {
    padding: 6px 9px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink);
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase
}

#bubble-view .bubble-active-filters {
    display: grid;
    gap: 6px;
    padding-top: 4px
}

#bubble-view .bubble-active-filters[hidden] {
    display: none
}

#bubble-view .bubble-active-filters-label {
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

#bubble-view .bubble-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

#bubble-view .bubble-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: var(--green-soft);
    border: 1px solid var(--green-2);
    font: 500 9px var(--mono);
    color: var(--accent-ink)
}

#bubble-view .bubble-active-filter-remove {
    border: 0;
    background: transparent;
    color: inherit;
    font: 700 10px/1 var(--mono);
    cursor: pointer
}

#bubble-view .bubble-canvas-wrap,
#bubble-view .bubble-table-wrap {
    min-height: 390px;
    height: 100%;
    border: 1px solid var(--line);
    background: var(--paper)
}

#bubble-view .bubble-chart {
    display: block;
    width: 100%;
    height: 100%
}

#bubble-view .bubble-table-wrap[hidden],
#bubble-view .bubble-canvas-wrap[hidden] {
    display: none
}

#bubble-view .bubble-table-scroll {
    height: 100%;
    overflow: auto
}

#bubble-view .bubble-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px
}

#bubble-view .bubble-table th,
#bubble-view .bubble-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 10px
}

#bubble-view .bubble-table th {
    background: var(--paper-2);
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    font: 600 9px var(--mono)
}

#bubble-view .bubble-table .is-number {
    text-align: right
}

#coverage-view {
    --cov-under: #b3402f;
    --cov-over: #2f7d46;
    --cov-match: #98742f;
}

html[data-theme="high-contrast-light"] #coverage-view {
    --cov-under: #b00020;
    --cov-over: #006b2c;
    --cov-match: #7a4a00;
}

html[data-theme="high-contrast-dark"] #coverage-view {
    --cov-under: #ff7a70;
    --cov-over: #5fe08a;
    --cov-match: #ffc24d;
}

#coverage-view [hidden] {
    display: none !important;
}

#coverage-view .cov-shell {
    width: 100%;
    min-height: 100%;
}

#coverage-view .cov-panel {
    display: grid;
    gap: 14px;
    align-content: start;
    max-width: 1500px;
    margin: 0 auto;
}

#coverage-view .cov-head h3 {
    margin: 0;
    font: 600 24px var(--serif);
    color: var(--ink);
}

#coverage-view .cov-description {
    margin: 4px 0 0;
    max-width: 70ch;
    font: 400 12px/1.5 var(--sans);
    color: var(--muted);
}

#coverage-view .cov-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

#coverage-view .cov-kpi {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--green);
    background: var(--paper-2);
}

#coverage-view .cov-kpi-warn {
    border-left-color: var(--amber);
}

#coverage-view .cov-kpi-label {
    font: 500 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

#coverage-view .cov-kpi-value {
    overflow-wrap: anywhere;
    font: 600 26px/1.15 var(--serif);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

#coverage-view .cov-kpi-sub {
    font: 400 11px var(--sans);
    color: var(--muted);
}

#coverage-view .cov-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 20px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--paper-2);
}

#coverage-view .cov-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

#coverage-view .cov-toolbar-group > .cov-toolbar-label,
#coverage-view .cov-filters label {
    display: grid;
    gap: 4px;
}

#coverage-view .cov-toolbar-group > .cov-toolbar-label {
    align-self: center;
}

#coverage-view .cov-biofuels {
    display: grid;
    gap: 4px;
}

#coverage-view .cov-toolbar-label {
    font: 500 9px var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

#coverage-view .cov-filters select,
#coverage-view .cov-filters input {
    min-width: 150px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font: 500 11px var(--mono);
}

#coverage-view .cov-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    background: var(--paper);
}

#coverage-view .cov-toggle-button {
    padding: 6px 10px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font: 500 10px var(--mono);
    letter-spacing: .04em;
    cursor: pointer;
}

#coverage-view .cov-toggle-button:last-child {
    border-right: 0;
}

#coverage-view .cov-toggle-button:hover {
    background: var(--green-soft);
}

#coverage-view .cov-toggle-button.active {
    background: var(--green);
    color: var(--paper);
}

#coverage-view .cov-toggle-button:focus-visible,
#coverage-view .cov-sort:focus-visible,
#coverage-view .cov-source-link:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 1px;
}

#coverage-view .cov-count {
    margin: 0 0 0 auto;
    font: 500 10px var(--mono);
    color: var(--muted);
}

#coverage-view .cov-count b {
    color: var(--ink);
}

#coverage-view .cov-view {
    border: 1px solid var(--line);
    background: var(--paper);
}

#coverage-view .cov-scroll {
    max-height: 70vh;
    overflow: auto;
}

#coverage-view .cov-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font: 400 12px var(--sans);
    color: var(--ink);
}

#coverage-view .cov-table th,
#coverage-view .cov-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

#coverage-view .cov-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--paper-2);
    font: 600 9px var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

#coverage-view .cov-table .is-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#coverage-view .cov-table tbody tr:hover {
    background: color-mix(in srgb, var(--green-soft) 55%, var(--paper));
}

#coverage-view .cov-empty td {
    padding: 28px 10px;
    text-align: center;
    color: var(--muted);
}

#coverage-view .cov-muted {
    color: var(--muted);
}

#coverage-view .cov-sort {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#coverage-view .cov-sort::after {
    content: "\2195";
    opacity: .35;
}

#coverage-view .cov-sort.is-sorted::after {
    opacity: 1;
}

#coverage-view .cov-sort[data-dir="asc"]::after {
    content: "\2191";
}

#coverage-view .cov-sort[data-dir="desc"]::after {
    content: "\2193";
}

#coverage-view .cov-col-ratio,
#coverage-view .cov-ratio-cell {
    min-width: 150px;
}

#coverage-view .cov-ratio {
    display: grid;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

#coverage-view .cov-ratio-value {
    font: 500 12px var(--mono);
}

#coverage-view .cov-ratio-track {
    position: relative;
    height: 6px;
    background: linear-gradient(
        to right,
        transparent var(--cov-band-start),
        color-mix(in srgb, var(--cov-match) 22%, transparent) var(--cov-band-start),
        color-mix(in srgb, var(--cov-match) 22%, transparent) var(--cov-band-end),
        transparent var(--cov-band-end)
    ), color-mix(in srgb, var(--ink) 8%, var(--paper));
}

#coverage-view .cov-ratio-track::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -2px;
    bottom: -2px;
    width: 1px;
    background: var(--ink);
    opacity: .55;
}

#coverage-view .cov-ratio-bar {
    height: 100%;
    background: var(--cov-match);
}

#coverage-view .cov-ratio-bar-under {
    background: var(--cov-under);
}

#coverage-view .cov-ratio-bar-over {
    background: var(--cov-over);
}

#coverage-view .coverage-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid currentColor;
    padding: 2px 7px;
    border-radius: 999px;
    font: 600 9px var(--mono);
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

#coverage-view .coverage-status-under {
    color: var(--cov-under);
    background: color-mix(in srgb, var(--cov-under) 12%, var(--paper));
}

#coverage-view .coverage-status-over {
    color: var(--cov-over);
    background: color-mix(in srgb, var(--cov-over) 12%, var(--paper));
}

#coverage-view .coverage-status-match {
    color: var(--cov-match);
    background: color-mix(in srgb, var(--cov-match) 14%, var(--paper));
}

#coverage-view .coverage-status-undefined {
    color: var(--muted);
    background: var(--paper-2);
}

#coverage-view .cov-source-cell {
    min-width: 170px;
    max-width: 280px;
    font-size: 11px;
}

#coverage-view .cov-source-link {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#coverage-view .cov-source-details summary {
    cursor: pointer;
    color: var(--accent-ink);
}

#coverage-view .cov-source-list {
    margin: 6px 0 0;
    padding-left: 16px;
    display: grid;
    gap: 6px;
}

#coverage-view .cov-source-note {
    display: block;
    color: var(--muted);
}

#coverage-view .cov-col-bar,
#coverage-view .cov-bar-cell {
    min-width: 200px;
}

#coverage-view .cov-bar-cell {
    display: table-cell;
}

#coverage-view .cov-meter {
    height: 8px;
    background: color-mix(in srgb, var(--ink) 8%, var(--paper));
}

#coverage-view .cov-meter-fill {
    height: 100%;
    background: var(--green);
}

#coverage-view .cov-meter-fill-warn {
    background: var(--amber);
}

#coverage-view .cov-meter-text {
    display: block;
    margin-top: 3px;
    font: 500 10px var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

@media(max-width:1000px) {
    #coverage-view .cov-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #coverage-view .cov-count {
        margin-left: 0;
    }
}

@media(max-width:700px) {
    #coverage-view .cov-toolbar-group,
    #coverage-view .cov-filters label,
    #coverage-view .cov-filters select,
    #coverage-view .cov-filters input {
        width: 100%;
    }

    #coverage-view .cov-toggle {
        flex-wrap: wrap;
    }

    #coverage-view .cov-col-bar,
    #coverage-view .cov-bar-cell {
        min-width: 140px;
    }
}

#bubble-view .bubble-table tr.is-selected {
    background: var(--green-soft)
}

@media(max-width:1200px) {
    #bubble-view .bubble-panel-view-grid {
        grid-template-columns: 1fr
    }

    #bubble-view .bubble-panel-view {
        min-height: 500px
    }
}

@media(max-width:700px) {
    #bubble-view {
        padding: 12px 12px 60px
    }

    #coverage-view {
        padding: 12px 12px 60px
    }

    #bubble-view .bubble-panel-controls {
        padding: 8px
    }

    #bubble-view .bubble-panel-view {
        padding: 8px;
        min-height: 430px
    }
}

.help-status {
    position: fixed;
    left: 0;
    right: 0;
    top: 72px;
    z-index: 8;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 14px;
    min-height: 40px;
    background: color-mix(in srgb, var(--paper-2) 84%, transparent);
    backdrop-filter: blur(6px);
    font: 500 11px/1.35 var(--mono);
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none
}

.help-status strong {
    font-weight: 600;
    color: var(--accent-ink)
}

body.help-mode-on .help-status {
    display: flex
}

body.help-mode-on .stats {
    display: none !important
}

body:not(.help-mode-on) .help-status {
    display: none !important
}

body:not(.help-mode-on) .stats {
    display: flex
}

@media(max-width:980px) {
    .help-status {
        top: 68px;
        padding: 6px 10px;
        min-height: 34px;
        font-size: 10px
    }
}

@media(max-width:700px) {
    .help-status {
        top: 66px;
        padding: 6px 8px;
        min-height: 32px;
        font-size: 9px
    }
}

.bubble-treemap-cell > .bubble-treemap-label {
    pointer-events: auto;
}

.bubble-treemap-cell > .bubble-treemap-label:hover {
    text-decoration: underline;
    cursor: pointer;
}
/* Data export tab */
#data-view {
    /* Starts below the stats bar (an overlay on this area; --data-top is measured in data_export.js),
       so the pinned controls and headers sit flush with the top of the view. */
    top: var(--data-top, 44px);
    padding: 0 12px 16px;
    align-items: stretch;
    justify-content: flex-start;
    overflow: auto;
    background: var(--paper)
}

/* The page scrolls (not the table), so the full table renders in the page flow. */
#data-view .bubble-shell {
    flex: none;
    width: 100%;
    margin-inline: auto;
}

#data-view .bubble-panel-view-copy h3 {
    margin: 0 0 10px;
}

#data-view .bubble-panel-view-row-title {
    margin-bottom: 12px;
}

#data-view .export-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
    margin-top: 20px;
}

#data-view .export-card {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--line);
}

#data-view .export-card-head,
#data-view .export-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#data-view .export-card h4 {
    margin: 0;
    font: 600 12px var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
}

#data-view .export-card-head .export-count {
    margin-right: auto;
    color: var(--muted);
    font: 500 11px var(--mono);
}

#data-view .export-links {
    display: flex;
    gap: 8px;
}

#data-view .export-link {
    border: 1px solid var(--line);
    background: none;
    padding: 3px 8px;
    color: var(--ink);
    font: 500 11px var(--mono);
    cursor: pointer;
}

#data-view .export-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

#data-view .export-column-scroll {
    max-height: 420px;
    overflow: auto;
}

#data-view .export-column-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#data-view .export-column-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

#data-view .export-column-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    padding: 4px 0;
    font: 500 13px var(--mono);
    cursor: pointer;
}

#data-view .export-column-name {
    border: 0;
    background: none;
    padding: 4px;
    color: var(--muted);
    font: 500 11px var(--mono);
    text-decoration: underline;
    cursor: pointer;
}

#data-view .export-column-name.is-described {
    color: var(--ink);
}

#data-view .export-column-help {
    position: sticky;
    top: 0;
    padding: 8px 10px;
    border-left: 2px solid var(--line);
    font-size: 13px;
    line-height: 1.5;
}

#data-view .export-column-help p {
    margin: 4px 0 0;
}

#data-view .export-muted {
    margin: 0;
    color: var(--muted);
    font: 500 11px var(--mono);
}

#data-view .export-exclude-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#data-view .export-exclude-form select,
#data-view .export-exclude-form input {
    padding: 7px 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font: 500 12px var(--mono);
}

#data-view .export-exclude-form input {
    flex: 1;
    min-width: 120px;
}

#data-view .export-error,
#data-view .is-error {
    margin: 0;
    color: #b3261e;
    font: 500 12px var(--mono);
}

#data-view .export-error:empty {
    display: none;
}

#data-view .export-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#data-view .export-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 2px 8px;
    border: 1px solid var(--line);
    font: 500 12px var(--mono);
}

#data-view .export-chip button {
    min-width: 24px;
    min-height: 24px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

#data-view .export-statuses {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    font: 500 12px var(--mono);
}

#data-view .export-statuses legend {
    padding: 0 0 4px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

#data-view .export-check {
    font: 500 12px var(--mono);
}

#data-view .export-excluded {
    margin-top: 12px;
}

#data-view .export-excluded button {
    justify-self: start;
}

#data-view .export-excluded button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

#data-view .export-actions {
    margin-top: 12px;
    padding: 10px 0;
}

#data-view .export-actions .is-disabled {
    opacity: .45;
    pointer-events: none;
}

#data-view .export-actions .is-busy {
    opacity: .7;
    cursor: progress;
}

#data-view button:focus-visible,
#data-view input:focus-visible,
#data-view select:focus-visible,
#data-view a:focus-visible {
    outline: 2px solid var(--accent-ink, var(--ink));
    outline-offset: 2px;
}

@media (max-width: 900px) {
    #data-view .export-grid,
    #data-view .export-columns {
        grid-template-columns: 1fr;
    }

    #data-view .export-column-help {
        position: static;
    }
}

@media (max-width: 600px) {
    #data-view .bubble-panel-view-toggles,
    #data-view .bubble-filter-group {
        flex-wrap: wrap;
    }

    #data-view .export-exclude-form select,
    #data-view .export-exclude-form input,
    #data-view .export-actions .btn {
        flex: 1 1 100%;
    }

    #data-view .export-actions {
        flex-direction: column;
        align-items: stretch;
    }

}

.badge-company-source {
    display: inline-block;
    margin: 4px 0;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--accent-ink);
    font-size: 10px;
    font-weight: 600
}

.badge-company-source[hidden] {
    display: none
}

.map-note:empty {
    display: none
}

.library-error {
    margin: 8px 0;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2);
    color: var(--ink);
    font: 500 12px var(--mono)
}

.library-error[hidden] {
    display: none
}

/* The search inputs hide their own outline, so show the focus ring on the pill that wraps them. */
.searchbox:focus-within {
    outline: 3px solid var(--accent-ink, var(--teal));
    outline-offset: 2px
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important
    }
}

/* Profile figures refreshing after a filter change: dim the stale values and show a spinner. */
#detail-extras.is-loading { position: relative; opacity: 0.5; pointer-events: none; transition: opacity 0.15s; }
#detail-extras.is-loading::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% - 11px);
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: detail-spin 0.7s linear infinite;
}
@keyframes detail-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #detail-extras.is-loading::after { animation-duration: 2s; } }

/* Initial load of a profile's extra details. */
.detail-spinner {
  width: 22px;
  height: 22px;
  margin: 16px auto;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.6;
  animation: detail-spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .detail-spinner { animation-duration: 2s; } }

/* Stage colour dot beside a stage name in the profile "Capacity by stage" list. */
.detail-line .status-dot { margin-right: 6px; vertical-align: -1px; }

#detail-id:not(:empty)::before { content: " · "; }

#detail-location:empty, #detail-status:empty { display: none; }

/* ==========================================================================
   Responsive layer. Kept last so it overrides the legacy rules above.
   Breakpoints: 1200 (small laptop), 900 (tablet), 700 (phone), plus
   short-height (landscape phone) and touch refinements.
   ========================================================================== */
:root {
    --topbar-h: 72px;
    --footer-h: 26px
}

.topbar {
    height: var(--topbar-h)
}

.shell,
main {
    height: calc(100vh - var(--topbar-h) - var(--footer-h));
    height: calc(100dvh - var(--topbar-h) - var(--footer-h))
}

.drawer {
    top: var(--topbar-h);
    bottom: var(--footer-h)
}

/* Slim footer under the app: dataset version and citation. */
.site-footer {
    height: var(--footer-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-top: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--muted);
    font: 500 9px 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden
}

.site-footer a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px
}

.site-footer a[href] {
    cursor: pointer
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform .2s, opacity .2s
}

.nav-toggle-bars {
    position: relative
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0
}

.nav-toggle-bars::before {
    top: -6px
}

.nav-toggle-bars::after {
    top: 6px
}

.nav-open .nav-toggle-bars {
    background: transparent
}

.nav-open .nav-toggle-bars::before {
    top: 0;
    transform: rotate(45deg)
}

.nav-open .nav-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg)
}

@media (max-width: 1200px) {
    .topbar {
        gap: 14px;
        padding: 0 16px
    }

    .brand {
        width: auto
    }

    .searchbox {
        width: 280px
    }

    .global-search-dropdown {
        min-width: 0;
        width: min(420px, calc(100vw - 32px))
    }

    .drawer {
        width: min(390px, 100vw)
    }
}

@media (max-width: 1200px) {
    /* Navigation collapses into a hamburger dropdown. */
    .nav-toggle {
        display: inline-flex
    }

    .toplinks {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px 0;
        background: var(--paper-2);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 28px rgba(16, 35, 40, .16);
        max-height: calc(100dvh - var(--topbar-h));
        overflow-y: auto
    }

    .topbar.nav-open .toplinks {
        display: flex
    }

    .toplinks a {
        height: 48px;
        padding: 0 20px;
        gap: 12px;
        border-bottom: 0;
        border-left: 3px solid transparent;
        justify-content: flex-start
    }

    .toplinks a.active {
        border-left-color: var(--green)
    }

    .toplinks a svg {
        width: 18px;
        height: 18px
    }
}

/* Compact stats: icon + number, label shown in a tooltip (hover / tap). */
@media (max-width: 1200px) {
    /* Legacy <=980px/<=700px rules pushed the stats bar down to top:68px/66px, over the controls. */
    .stats {
        top: 0
    }

    .stat .label span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap
    }

    .stat {
        cursor: default;
        gap: 6px
    }

    .stat .label svg {
        width: 15px;
        height: 15px
    }

    .stat:focus-visible {
        outline-offset: 3px
    }
}

.stat-tip {
    position: fixed;
    z-index: 1400;
    padding: 6px 9px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
    color: var(--ink);
    font: 600 10px var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap
}

.stat-tip[hidden] {
    display: none
}

@media (max-width: 900px) {
    .searchbox {
        width: 100%
    }

    .global-search {
        flex: 1 1 140px;
        min-width: 0
    }

    .topspacer {
        display: none
    }

    .stats {
        justify-content: flex-start
    }

    #bubble-view,
    #coverage-view {
        padding-top: calc(var(--panel-bottom, 100px) + 8px)
    }

    #bubble-view .bubble-panel-view-grid {
        grid-template-columns: minmax(0, 1fr)
    }

    #bubble-view .bubble-panel-view {
        min-height: 420px
    }

}

@media (max-width: 700px) {
    :root {
        --topbar-h: 60px
    }

    .topbar {
        gap: 8px;
        padding: 0 8px
    }

    .brand div:last-child {
        display: none
    }

    .mark {
        width: 40px;
        height: 40px
    }

    .theme-toggle {
        padding: 0 6px
    }

    .global-search-dropdown {
        position: fixed;
        left: 8px;
        right: 8px;
        top: calc(var(--topbar-h) + 4px);
        width: auto;
        max-height: 60dvh;
        overflow-y: auto
    }

    .heading-panel {
        left: 6px;
        right: 6px;
        top: 43px;
        width: auto;
        max-width: none;
        padding: 8px;
        gap: 6px
    }

    .heading-bubble-controls {
        gap: 6px 8px
    }

    .product-select {
        min-width: 0
    }

    .product-select-menu {
        width: min(320px, calc(100vw - 28px))
    }

    .stat+.stat::before {
        margin: 0 8px 0 4px
    }

    .drawer {
        width: 100vw;
        border-radius: 0
    }

    .mapfooter {
        left: 6px;
        max-width: calc(100% - 12px)
    }

    .map-note {
        right: 6px
    }

    .maplegend {
        left: 6px
    }

    #bubble-view,
    #coverage-view {
        padding-left: 6px;
        padding-right: 6px
    }

    #bubble-view .bubble-panel-view {
        min-height: 340px
    }

}

/* Landscape phones / very short windows: reclaim vertical space. */
@media (max-height: 520px) {
    .maplegend,
    .map-note,
    .mapfooter {
        display: none
    }

}

/* Touch devices: larger tap targets. */
@media (pointer: coarse) {
    .bubble-mini-button,
    .status-toggle,
    .bubble-reset,
    .product-select-trigger,
    .ps-check,
    .ps-product {
        min-height: 36px
    }

    .map-tools button {
        width: 38px;
        height: 38px
    }

    .toplinks a {
        min-height: 48px
    }
}

/* Data tab: controls row, filterable records table, export box */
/* Pinned to the top of the view; the table headers stack directly beneath (--data-controls-h is
   measured in data_export.js). Padding, not margin, so rows never show through a gap. */
#data-view .data-controls {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 16px 0 12px;
    background: var(--paper);
}

#data-view .data-controls-end {
    margin-left: auto;
    display: grid;
    justify-items: end;
    gap: 4px;
}

#data-view .data-controls-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Compact, theme-matched: same mono/uppercase/square look and height as the toggles beside it. */
#data-view .data-controls-buttons .btn,
#data-view .data-controls-buttons .export-link,
#data-view .export-dialog .btn,
#data-view .export-dialog .export-link {
    height: 28px;
    box-sizing: border-box;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 600 9px var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

#data-view .data-controls-buttons .btn svg,
#data-view .export-dialog .btn svg {
    width: 12px;
    height: 12px;
}

#data-view .data-controls-buttons .btn.primary:hover,
#data-view .data-controls-buttons .btn.primary:focus-visible,
#data-view .export-dialog .btn.primary:hover,
#data-view .export-dialog .btn.primary:focus-visible {
    filter: brightness(1.1);
}

#data-view .export-dialog {
    width: min(640px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: inherit;
}

#data-view .export-dialog::backdrop {
    background: rgb(0 0 0 / .4);
}

#data-view .export-dialog .export-card {
    border: 0;
}

#data-view .export-dialog .btn {
    cursor: pointer;
}

#data-view .export-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

#data-view .export-option .export-actions {
    margin-top: 0;
    padding: 0;
}

#data-view .export-option p {
    margin: 2px 0 0;
}

#data-view .data-table-card {
    display: grid;
    gap: 12px;
}

/* All rows render in the page; the headers stay pinned to the top of the view while it scrolls. */
#data-view .data-table-scroll {
    /* No overflow here: a scrolling ancestor would stop the header sticking to the page. */
    overflow: visible;
}

#data-view .data-table thead th {
    position: sticky;
    top: calc(var(--data-controls-h, 0px) - 1px); /* 1px tucked under the controls: no seam */
    z-index: 2;
    background: var(--paper);
}

#data-view .data-table thead .data-filter-row td {
    position: sticky;
    top: calc(var(--data-controls-h, 0px) + var(--data-title-h, 34px) - 1px);
    z-index: 2;
    background: var(--paper);
}

#data-view .data-table {
    width: 100%;
    /* Separate, not collapsed: collapsed borders stay behind when a header cell sticks. */
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

#data-view .data-table th,
#data-view .data-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

#data-view .data-table th {
    font-weight: 600;
    white-space: nowrap;
}

/* Status colours match the monitor's Active / New / Expanding toggles. */
#data-view .data-table thead th.tone-active,
#data-view .stage-badge.tone-active {
    background: rgb(102, 195, 148);
    color: #1c5b3d;
    border-color: #1c5b3d
}

#data-view .data-table thead th.tone-new,
#data-view .stage-badge.tone-new {
    background: #dfeeff;
    color: #194a95;
    border-color: #2b68be
}

#data-view .data-table thead th.tone-expanding,
#data-view .stage-badge.tone-expanding {
    background: #fff0df;
    color: #8f5b16;
    border-color: #c47d1d
}

#data-view .stage-badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid;
    font: 600 9px var(--mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap
}

#data-view .data-table .is-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#data-view .data-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--line) 35%, transparent);
}

#data-view .data-table th .data-sort-button {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

#data-view .data-table th .data-sort-button:focus-visible {
    outline: 2px solid var(--accent-ink, var(--ink));
    outline-offset: 2px;
}

#data-view .data-table .data-sort-mark {
    font-size: 10px;
    min-width: 1.4em;
}

#data-view .data-table .data-filter-row td {
    padding: 4px 10px;
    border-bottom: 1px solid var(--line);
}

#data-view .data-filter {
    display: flex;
    gap: 4px;
}

#data-view .data-filter select,
#data-view .data-filter input {
    min-width: 0;
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: inherit;
    font: inherit;
    font-size: 12px;
}

#data-view .data-table tbody tr.is-clickable {
    cursor: pointer;
}

#data-view .data-table tbody tr.is-clickable:hover,
#data-view .data-table tbody tr.is-clickable:focus-visible {
    background: var(--paper-2);
    outline: 2px solid var(--accent-ink, var(--ink));
    outline-offset: -2px;
}

.detail-title-flag { margin-right: 0.4em; border-radius: 2px; vertical-align: baseline; }

.data-table-flag { margin-right: 0.4em; border-radius: 2px; vertical-align: baseline; }
