:root {
    --site-ink: #172b35;
    --site-muted: #52646b;
    --site-accent: #167e79;
    --site-surface: #f5f7f5;
}

body {
    color: var(--site-ink);
    background: var(--site-surface);
}

.skip-link:focus {
    position: absolute;
    z-index: 1000;
    padding: .75rem 1rem;
    background: white;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #dce5e2;
}

.site-nav,
.site-footer .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 4rem);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--site-ink);
    text-decoration: none;
    font-size: 1.05rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .6rem;
    background: var(--site-ink);
    color: white;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .08em;
}

.nav-workspace {
    color: var(--site-accent);
    font-weight: 650;
    text-decoration: none;
}

.home-hero {
    padding: clamp(4rem, 8vw, 8rem) 0;
    color: white;
    background: linear-gradient(120deg, #132a35, #194e54 72%, #167e79);
}

.eyebrow {
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.home-hero .eyebrow { color: #9ce0d1; }

.home-hero h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.04;
    letter-spacing: -.05em;
}

.hero-intro {
    max-width: 52ch;
    margin: 1.5rem 0 2rem;
    color: #e1f0ed;
    font-size: 1.2rem;
}

.hero-action {
    color: #14353c;
    font-weight: 700;
}

.hero-graphic {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    border: 1px solid #ffffff55;
    border-radius: 1.5rem;
    background:
        repeating-linear-gradient(0deg, transparent 0 39px, #ffffff18 40px 41px),
        linear-gradient(145deg, #ffffff16, #081f2b55);
}

.graphic-label,
.graphic-caption {
    position: absolute;
    left: 1.5rem;
    font-size: .75rem;
    letter-spacing: .12em;
}

.graphic-label { top: 1.5rem; }
.graphic-caption { bottom: 1.5rem; letter-spacing: normal; }

.graphic-ring {
    position: absolute;
    width: 210px;
    height: 210px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #a5ead8;
    border-radius: 50%;
    box-shadow: 0 0 0 45px #ffffff12, 0 0 0 90px #ffffff0b;
}

.graphic-point {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #b7f1da;
}

.home-overview { padding-top: 4rem; padding-bottom: 5rem; }
.home-overview .eyebrow { color: var(--site-accent); }
.home-overview p:last-child { max-width: 58ch; color: var(--site-muted); }

.site-footer {
    border-top: 1px solid #dce5e2;
    color: var(--site-muted);
    font-size: .85rem;
}

@media (max-width: 576px) {
    .site-nav, .site-footer .container-fluid { flex-wrap: wrap; }
}

.workspace-shell {
    max-width: 1760px;
    padding: clamp(1.25rem, 3vw, 3rem);
}

.workspace-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.workspace-heading .eyebrow,
.panel-step {
    color: var(--site-accent);
}

.workspace-heading-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    flex: 0 1 22rem;
    max-width: 100%;
}

.workspace-heading h1 {
    margin-bottom: .5rem;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    letter-spacing: -.04em;
}

.workspace-heading p:last-child {
    max-width: 65ch;
    margin-bottom: 0;
    color: var(--site-muted);
}

.workspace-stage,
.panel-status {
    flex: none;
    padding: .45rem .75rem;
    border: 1px solid #c9ded9;
    border-radius: 999px;
    background: #e9f4f0;
    color: #225c55;
    font-size: .78rem;
    font-weight: 700;
}

.workspace-sidebar,
.workspace-main {
    display: grid;
    align-content: start;
    gap: 1.5rem;
}

/* Only the map and its controls share columns; evidence and charts use the page width. */
.workspace-map-layout {
    --workspace-map-height: clamp(340px, 42vw, 520px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
    align-items: start;
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.workspace-map-layout > *, .workspace-main, .workspace-sidebar { min-width: 0; }
.workspace-map-layout > .screening-area-card { grid-column: 1; grid-row: 1; }
.workspace-map-layout > .compact-controls {
    grid-column: 2; grid-row: 1;
    min-height: 0; align-content: start;
}
/* The applied header and map/context column set the height, independently of expanded controls. */
.workspace-map-layout:has(.screening-map-content) > .compact-controls {
    contain: size; align-self: stretch; overflow: hidden;
}
.workspace-map-layout > .compact-controls:focus-visible { outline: 2px solid #176c73; outline-offset: 2px; }
.workspace-map-layout .screening-map { height: var(--workspace-map-height); }
.workspace-map-layout .screening-map-details { margin-top: .75rem; }
.workspace-map-layout .screening-map-details > summary { cursor: pointer; color: #176c73; font-size: .875rem; }
.workspace-map-layout .screening-map-content > .form-text:empty { display: none; }
.workspace-controls-link { display: none; }
.workspace-sidebar #review-section-controls { margin-bottom: 0 !important; }
.workspace-sidebar .workspace-panel { padding: 1.25rem; }
.workspace-reference-controls .screening-reference-control { position: static; max-width: none; }
.workspace-reference-controls .screening-reference-toggle { margin-left: 0; box-shadow: none; }
.workspace-reference-controls .screening-reference-toggle span { position: static; width: auto; height: auto; clip-path: none; overflow: visible; }
.workspace-reference-controls .screening-reference-panel {
    width: auto; max-height: none; overflow: visible; padding: 0;
    border: 0; box-shadow: none;
}
@media (max-width: 1199px) {
    .workspace-map-layout { grid-template-columns: minmax(0, 1fr); }
    .workspace-map-layout > .compact-controls,
    .workspace-map-layout:has(.screening-map-content) > .compact-controls {
        grid-column: 1; grid-row: auto; contain: none; align-self: start; overflow: visible; overflow-anchor: auto;
    }
    .workspace-controls-link { display: inline; }
}

.workspace-panel {
    padding: clamp(1.25rem, 2vw, 2rem);
    border: 1px solid #dce5e2;
    border-radius: 1.15rem;
    background: white;
    box-shadow: 0 10px 30px #122e3410;
}

/* Shared Bootstrap card shell for the four primary workspace containers. */
.workspace-card {
    --bs-card-border-color: #dce5e2;
    --bs-card-border-radius: 1.15rem;
    --bs-card-inner-border-radius: calc(1.15rem - 1px);
    --bs-card-cap-bg: #f7faf9;
    --bs-card-cap-padding-x: 1.25rem;
    --bs-card-cap-padding-y: 1rem;
    --bs-card-spacer-x: 1.25rem;
    --bs-card-spacer-y: 1.25rem;
    box-shadow: 0 10px 30px #122e3410;
    min-width: 0;
}
.workspace-card > .card-header h2 { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.5; }
.workspace-card p { color: var(--site-muted); }
.workspace-card.compact-controls { display: flex; flex-direction: column; padding: 0; gap: 0; }
.workspace-card.compact-controls > .card-header { flex: 0 0 auto; }
.workspace-card.compact-controls > .card-header .controls-heading-help { margin: 0; }
.controls-card-header { position: relative; }
.controls-card-header > h2 { padding-inline-end: 2.25rem; }
.controls-heading-help > summary {
    position: absolute; top: var(--bs-card-cap-padding-y); right: var(--bs-card-cap-padding-x);
    display: grid; place-items: center; width: 1.6875rem; height: 1.6875rem;
    border: 1px solid #176c73; border-radius: 50%; list-style: none;
    font-size: .875rem; font-weight: 600; line-height: 1;
}
.controls-heading-help > summary::-webkit-details-marker { display: none; }
.controls-heading-help > summary::marker { content: ''; }
.controls-heading-help > summary:focus-visible { outline: 2px solid #176c73; outline-offset: 2px; }
.controls-heading-help[open] > summary { background: #e0eeee; }
.controls-help-content { margin-top: .75rem; padding-top: .5rem; border-top: 1px solid #dce5e2; max-height: min(24rem, 45vh); overflow-y: auto; padding-inline-end: .5rem; }
.controls-help-content:focus-visible { outline: 2px solid #176c73; outline-offset: 2px; }
.workspace-card.compact-controls > .screening-controls-body {
    display: grid; align-content: start; gap: .65rem; flex: 1 1 auto; min-height: 0;
    overflow-y: auto; scrollbar-gutter: auto; scroll-padding-block: 1rem 4rem; overflow-anchor: none;
}
.screening-controls-body:focus-visible { outline: 2px solid #176c73; outline-offset: -3px; }
@media (max-width: 1199px) {
    .workspace-card.compact-controls > .screening-controls-body { flex: 0 0 auto; overflow: visible; overflow-anchor: auto; }
}

.workspace-panel h2 {
    margin: .5rem 0 .75rem;
    font-size: 1.25rem;
    letter-spacing: -.02em;
}

.workspace-panel p {
    color: var(--site-muted);
}

.panel-step {
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.panel-heading,
.report-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pending-state {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px dashed #c8d9d4;
    border-radius: .7rem;
    background: #f7faf9;
    color: var(--site-muted);
    font-size: .9rem;
}

.map-placeholder {
    display: grid;
    place-items: center;
    position: relative;
    min-height: 340px;
    overflow: hidden;
    margin-top: 1rem;
    border-radius: .85rem;
    background:
        linear-gradient(#d8e8e43d 1px, transparent 1px),
        linear-gradient(90deg, #d8e8e43d 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, #e7f2ec, #eaf0ef);
    background-size: 38px 38px, 38px 38px, auto;
    text-align: center;
}

.map-placeholder p {
    position: relative;
    z-index: 1;
    max-width: 28ch;
    margin: 5rem 1rem 0;
    font-weight: 600;
}

.map-focus {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid #52978d;
    border-radius: 50%;
    box-shadow: 0 0 0 35px #4a9b8b1a;
}

.map-focus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--site-accent);
}

.report-panel { margin-top: 0; }
.report-panel p { margin-bottom: 0; }

@media (max-width: 767px) {
    .workspace-heading-actions {
        align-items: flex-start;
        flex-basis: auto;
    }

    .workspace-heading,
    .panel-heading,
    .report-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

.permit-form {
    margin-top: 1.25rem;
}

.chart-context,
.chart-description,
.chart-exclusions {
    font-size: .9rem;
}

.core-chart-frame {
    position: relative;
    height: clamp(320px, 38vw, 460px);
    margin-top: 1rem;
}

.chart-data-details {
    margin-top: 1.25rem;
}

.chart-data-details summary {
    cursor: pointer;
    font-weight: 600;
}

.chart-data-details .table-responsive {
    margin-top: .75rem;
}

.chart-exclusions {
    margin-top: 1rem;
}
.chart-trend-summary {
    margin-top: 1rem;
    font-size: .9rem;
}
.screening-map {
    width: 100%;
    height: clamp(340px, 42vw, 520px);
    border: 1px solid #d8e3e5;
    border-radius: .5rem;
    overflow: hidden;
}
.screening-map-frame { position: relative; }
.screening-map-overview { position: absolute; top: .6rem; right: .6rem; width: 215px; z-index: 1; }
#screening-overview-toggle { position: absolute; top: 0; right: 0; }
.screening-map-overview:has(#screening-overview-thumbnail[hidden]) { width: 30px; height: 30px; }
.screening-overview-view { height: 135px; pointer-events: none; }
@media (min-width: 768px) {
    .screening-map-overview.screening-overview-yield { visibility: hidden; }
}
@media (max-width: 767px) {
    .screening-map-overview { position: relative; top: auto; right: auto; margin: .5rem 0 0 auto; width: min(100%, 260px); }
}
.screening-contributor-tooltip {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    max-width: min(260px, calc(100% - 16px));
    padding: .5rem .75rem;
    border: 1px solid #d8e3e5;
    border-radius: .4rem;
    background: rgb(255 255 255 / 95%);
    color: #223e46;
    font-size: .8rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
    box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
}
.screening-map-context { overflow-wrap: anywhere; }
.screening-map-aids:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
}
.screening-compass-control {
    text-align: center;
    color: #323232;
    background: transparent;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.25;
}
.screening-compass-control > span {
    text-shadow: 0 0 2px #fff, 0 0 4px #fff;
}
.screening-compass-control .esri-compass {
    background: transparent;
    box-shadow: none;
    --calcite-color-foreground-3: transparent;
}
.screening-compass-control calcite-button {
    --calcite-button-background-color: transparent;
    --calcite-button-border-color: transparent;
    --calcite-button-shadow: none;
}
.screening-map-metrics dd { margin: .25rem 0 0; }
.screening-map-metrics > div { max-width: 100%; }
.screening-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    padding: 0;
    margin: 1rem 0 .5rem;
    list-style: none;
    font-size: .8rem;
    color: var(--site-muted);
}
.screening-map-legend li {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.map-key {
    display: inline-block;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}
.map-key-center {
    width: .7rem;
    height: .7rem;
    margin: .15rem;
    border-radius: 0;
    background: #d17a36;
    transform: rotate(45deg);
}
.map-key-contributor {
    background: #007c91;
    border: 2px solid white;
    outline: 1px solid #dce5e2;
}
.map-key-background {
    width: .3rem;
    height: .3rem;
    margin: .35rem;
    background: rgb(110 119 127 / 55%);
}
.map-key-area { border: 2px solid #176c73; }
.map-key-county { border: 1px solid rgb(105 112 120 / 70%); border-radius: 0; }
.map-key-selection { border: 2px solid #263648; }
.map-key-pending {
    border: 1px dashed #75569b;
    color: #75569b;
    font-weight: 700;
    line-height: .8rem;
    text-align: center;
}
.screening-map-guide { margin-top: .75rem; }
.screening-map-guide .screening-map-legend { margin-top: 0; }
.screening-map-feedback { margin-top: .25rem; }
.screening-map-feedback .pending-state { margin-top: 0; }
.screening-map-feedback p { margin: .5rem 0 0; }
.screening-map-exploration { padding: 1rem 0; font-size: .85rem; }
#screening-map-status:empty,
#screening-county-status:empty { margin: 0; }
.screening-map-source {
    margin: 1rem 0 0;
    padding-top: .5rem;
    border-top: 1px solid #e3ebe8;
}
.distribution-chart-frame {
    position: relative;
    height: 320px;
    margin-top: 1rem;
}
.evidence-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0 1.25rem;
}
.workspace-main .evidence-overview .evidence-metrics > div {
    display: flex; flex-direction: column; justify-content: space-between;
}

.evidence-metric {
    padding: 1rem;
    border: 1px solid #dce5e2;
    border-radius: .8rem;
    background: #f7faf9;
}

.evidence-metric dt {
    color: var(--site-muted);
    font-size: .78rem;
    font-weight: 600;
}

.evidence-metric dd {
    margin: .25rem 0;
    color: #176c73;
    font-size: 1.9rem;
    font-weight: 750;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.evidence-metric span,
.evidence-note {
    color: var(--site-muted);
    font-size: .8rem;
}

.evidence-coverage,
.evidence-quality {
    padding: 1rem 0;
    border-top: 1px solid #e3ebe8;
}

.evidence-depth {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .75rem;
    margin-bottom: .5rem;
}

.evidence-depth strong {
    color: #223e46;
    font-size: 1.05rem;
}

.evidence-depth span {
    font-size: .8rem;
}

.evidence-coverage p:last-child,
.evidence-quality p:last-child {
    margin-bottom: 0;
}

.evidence-quality > p {
    margin-bottom: .5rem;
    font-size: .9rem;
}

.evidence-table-heading {
    margin-top: 1rem;
}

.evidence-table {
    font-size: .85rem;
}

.evidence-table thead th {
    background: #f7faf9;
    color: var(--site-muted);
    font-size: .75rem;
    font-weight: 600;
}

.evidence-table td,
.evidence-table th {
    padding: .8rem .6rem;
}

.evidence-table tbody th {
    font-weight: 400;
}

.evidence-permit {
    display: block;
    margin-bottom: .3rem;
    font-weight: 700;
    white-space: nowrap;
}

.evidence-provenance {
    font-size: .75rem;
}

.evidence-provenance code {
    overflow-wrap: anywhere;
}

.evidence-source-list {
    max-height: 12rem;
    overflow-y: auto;
    padding-left: 1.2rem;
}

.evidence-no-pairs {
    color: #795117;
    font-size: .75rem;
}

@media (max-width: 767px) {
    .evidence-metrics {
        grid-template-columns: 1fr;
    }
}

@media print {
    #screening-download-pdf,
    #screening-cancel-pdf,
    #screening-pdf-status {
        display: none;
    }
    .evidence-metric,
    .evidence-coverage {
        break-inside: avoid;
    }

    .evidence-source-list {
        max-height: none;
        overflow: visible;
    }
}

.evidence-metric dd.evidence-metric-note {
    margin: 0;
    color: var(--site-muted);
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.5;
}

.temperature-overview,
.chart-overview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    margin: 1rem 0;
}

.temperature-metric-value,
.chart-metric-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #176c73;
    font-variant-numeric: tabular-nums;
}

.temperature-metric-label,
.chart-metric-label {
    font-size: .875rem;
    color: #52616b;
}

.temperature-unit-badge,
.chart-unit-badge {
    padding: .4rem .75rem;
    border-radius: .5rem;
    background: #edf5f5;
    color: #24565b;
    font-size: .875rem;
    font-weight: 600;
}

.temperature-fit-summary {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #176c73;
    border-radius: .5rem;
    background: #f1f7f7;
}

.temperature-fit-heading {
    margin: 0 0 .35rem;
    font-size: .875rem;
    font-weight: 600;
    color: #24565b;
}

.temperature-fit-equation {
    margin: 0 0 .5rem;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: #263840;
    overflow-wrap: anywhere;
}

.temperature-fit-note {
    margin: 0;
    font-size: .85rem;
    color: #52616b;
    line-height: 1.6;
}

.distribution-exclusion-note {
    margin-bottom: 1rem;
    padding: .5rem .75rem;
    border-left: 3px solid #a85c17;
    border-radius: .25rem;
    background: #fff5e8;
    color: #784313;
    font-size: .875rem;
}

.chart-section {
    margin-top: 1.5rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid #dce5e2;
    border-radius: .85rem;
    background: #fff;
}

.chart-section-heading {
    margin: 0 0 .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #e3ebe8;
    color: var(--site-ink);
    font-size: 1.2rem;
    font-weight: 700;
}

.chart-series-controls { overflow-wrap: anywhere; }

/* Controls stay in normal flow: no overlay or nested scrolling at small heights/zoom. */
.permit-form .screening-control-group {
    margin-bottom: .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #e3ebe8;
    min-width: 0;
    overflow-wrap: anywhere;
}
.screening-control-heading { margin: 0 0 .5rem; font-size: .95rem; font-weight: 700; }
.permit-form .form-text { margin: .35rem 0 0; }
.screening-apply-actions { margin-bottom: 1rem; }
.screening-formation-chooser > summary { font-weight: 600; }
.screening-formation-options { margin-top: .75rem; }
.screening-formation-chooser .form-check { margin-top: .35rem; overflow-wrap: anywhere; }

.core-formation-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    padding: 0;
    margin: .75rem 0;
    list-style: none;
    font-size: .875rem;
}

.core-formation-legend li {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    overflow-wrap: anywhere;
    min-width: 0;
}

.core-formation-swatch {
    display: inline-block;
    flex: 0 0 .8rem;
    width: .8rem;
    height: .8rem;
    border: 1px solid #52616b;
}

/* Evidence overview reuses metric cards and wraps without squeezing their notes. */
.evidence-overview-metrics {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}

/* Keep evidence tables inside their scroll containers on narrow screens. */
.workspace-main {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}

/* Evidence follows a summary -> interpretation -> traceability hierarchy. */
.evidence-summary { padding-bottom: .25rem; }
.evidence-section { margin-top: 1.75rem; }
.evidence-section-heading { margin-bottom: .75rem; }
.evidence-section-heading h3 { color: #223e46; margin-bottom: .3rem; }
.evidence-section-heading p { margin-bottom: 0; }
.evidence-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.evidence-context-grid > .evidence-coverage,
.evidence-context-grid > .evidence-quality {
    padding: 1.1rem;
    border: 1px solid #dce5e2;
    border-radius: .8rem;
    background: #f7faf9;
}
.evidence-context-grid h4 { color: #223e46; margin-bottom: .65rem; }
.evidence-disclosure-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; min-width: 0; }
.evidence-disclosure {
    min-width: 0;
    border: 1px solid #dce5e2;
    border-radius: .7rem;
    background: #fff;
    margin: 0;
}
.evidence-disclosure > summary {
    padding: .85rem 1rem;
    color: #223e46;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}
.evidence-disclosure > summary::marker { color: #176c73; }
.evidence-disclosure > summary:focus-visible { outline: 2px solid #176c73; outline-offset: 3px; border-radius: .7rem; }
.evidence-disclosure[open] > summary { border-bottom: 1px solid #e3ebe8; background: #f7faf9; }
.evidence-disclosure > :not(summary) { margin: .85rem 1rem; }
.evidence-disclosure .table-responsive { margin: .85rem 1rem; }
.evidence-disclosure-count { color: var(--site-muted); font-size: .8rem; font-weight: 400; margin-left: .75rem; }
.evidence-data-notes { margin-top: .75rem; }
.evidence-statistics-details { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; min-width: 0; }
@media (max-width: 767px) {
    .evidence-context-grid { grid-template-columns: minmax(0, 1fr); }
    .evidence-disclosure-count { display: block; margin-left: 1rem; margin-top: .2rem; }
}
@media print {
    .evidence-context-grid { grid-template-columns: minmax(0, 1fr); }
    .evidence-disclosure > summary { color: #223e46; }
}

/* AOI availability: aligned summaries, with record populations on demand. */
.availability-categories { grid-template-columns: minmax(0, 1fr); }
.availability-heading-row {
    display: inline-flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    width: calc(100% - 1rem);
    vertical-align: top;
}
.availability-heading-row > :first-child { min-width: 0; }
.availability-heading-row .evidence-disclosure-count { margin: 0; text-align: right; }
.availability-populations > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 10rem);
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid #e3ebe8;
}
.availability-populations > div:last-child { border-bottom: 0; }
.availability-populations dt { font-size: .85rem; font-weight: 500; }
.availability-populations dd { margin: 0; text-align: right; font-size: .85rem; }
.availability-populations dd > span { display: block; }
.aoi-availability .table { table-layout: fixed; width: 100%; }
.aoi-availability th, .aoi-availability td, .availability-populations { overflow-wrap: anywhere; }

.map-key-unverified { border: 2px dashed #263648; border-radius: 50%; background: transparent; }
#screening-map-filters label { overflow-wrap: anywhere; white-space: pre-wrap; }
.screening-map-filter-groups { display: grid; gap: 1.25rem; }
.screening-map-filter-groups fieldset { min-width: 0; }
.screening-map-filter-groups legend { margin-bottom: .65rem; }
.screening-map-filter-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .5rem; }
.screening-map-filter-option {
    display: flex; align-items: flex-start; gap: .6rem; padding: .65rem .75rem;
    border: 1px solid #dce7e4; border-radius: .5rem; background: #fafcfb;
    color: #344e55; font-size: .875rem; line-height: 1.4; cursor: pointer;
}
.screening-map-filter-option .form-check-input { flex: 0 0 1rem; margin: .1rem 0 0; border-color: #8ba5a5; }
.screening-map-filter-option:hover { border-color: #91b5b3; background: #f0f6f4; }
.screening-map-filter-option:has(input:checked) { border-color: #176c73; background: #eaf4f2; color: #164e54; }
.screening-map-filter-option input:checked { background-color: #176c73; border-color: #176c73; }
.screening-map-filter-option:focus-within { outline: 2px solid #176c73; outline-offset: 2px; }
.screening-map-filter-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e3ebe8; }
/* Optional reference controls remain over the map, outside the ArcGIS canvas. */
.screening-reference-control { position:absolute; top:12px; right:12px; z-index:5; max-width:calc(100% - 68px); }
.screening-reference-toggle { display:flex; align-items:center; gap:.45rem; margin-left:auto; border:1px solid #c8d4d6; box-shadow:0 2px 8px #16333d24; color:#244c53; }
.screening-reference-panel { margin-top:.5rem; width:21rem; max-width:100%; max-height:min(440px,calc(100dvh - 8rem)); overflow:auto; padding:1rem; background:#fff; border:1px solid #c8d4d6; border-radius:.6rem; box-shadow:0 5px 20px #16333d24; }
.screening-reference-panel[hidden] { display:none; }
.screening-reference-panel fieldset { margin:.65rem 0; padding:.6rem .75rem; background:#f3f7f7; border-radius:.4rem; }
.screening-reference-panel legend { font-size:.9rem; font-weight:650; margin:0 0 .4rem; }
.screening-reference-panel label { display:flex; align-items:center; gap:.5rem; font-size:.86rem; padding:.2rem 0; }
.screening-reference-panel input { accent-color:#176c73; width:1rem; height:1rem; flex-shrink:0; }
.screening-reference-panel .form-text { font-size:.75rem; margin:.35rem 0; }
.screening-reference-details { font-size:.78rem; margin:.5rem 0; }
.screening-reference-table { width:100%; font-size:.85rem; border-collapse:collapse; }
.screening-reference-legend-row { display:flex; align-items:flex-start; gap:.5rem; margin:.25rem 0; font-size:.8rem; }
.screening-reference-legend-row svg { display:block; flex-shrink:0; }
.screening-reference-table th,.screening-reference-table td { padding:.45rem; border-bottom:1px solid #dce5e5; text-align:left; overflow-wrap:anywhere; vertical-align:top; }
@media(max-width:575px) { .screening-reference-panel { width:17rem; padding:.75rem; } .screening-reference-toggle span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); } }

/* Control typography: Bootstrap's body family, one label size, one secondary size. */
.compact-controls {
    --control-text: .875rem;
    --control-meta: .8125rem;
    --bs-accordion-btn-padding-x: .75rem;
    --bs-accordion-btn-padding-y: .65rem;
    --bs-accordion-btn-color: #193c48;
    --bs-accordion-btn-bg: #f2f7f7;
    --bs-accordion-active-color: #193c48;
    --bs-accordion-active-bg: #e0eeee;
    --bs-accordion-border-color: #c8d9d9;
    --bs-accordion-border-radius: .65rem;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem #176c7333;
    gap: .65rem; padding: 1rem;
    font-family: var(--bs-body-font-family); font-size: var(--control-text); font-weight: 400; line-height: 1.5;
}
.compact-controls h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.compact-controls .permit-form, .compact-controls .screening-apply-actions { margin: 0; }
.compact-controls .permit-form > .control-disclosure + .control-disclosure { margin-top: .65rem; }
.compact-controls .accordion-item { padding: 0; border: 1px solid var(--bs-accordion-border-color); border-radius: var(--bs-accordion-border-radius); overflow: clip; }
.compact-controls .accordion-button {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; column-gap: .5rem;
    align-items: start; min-height: calc(2 * var(--bs-accordion-btn-padding-y) + 3 * var(--control-text));
    padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);
    font-family: inherit; font-size: var(--control-text); font-weight: 600; line-height: 1.5;
    border-radius: 0; text-align: left; overflow-wrap: anywhere;
}
.compact-controls .accordion-button strong { font-weight: inherit; }
.compact-controls .accordion-button:not(.collapsed),
.compact-controls details[open] > .accordion-button { color: var(--bs-accordion-active-color); background: var(--bs-accordion-active-bg); border: 0; }
.compact-controls details[open] > .accordion-button::after { background-image: var(--bs-accordion-btn-active-icon); transform: var(--bs-accordion-btn-icon-transform); }
.compact-controls .accordion-button:focus-visible { outline: 2px solid #176c73; outline-offset: -3px; box-shadow: none; }
.compact-controls .accordion-button::after { grid-column: 3; grid-row: 1; align-self: start; margin-top: .05rem; }
.compact-controls summary.accordion-button { list-style: none; cursor: pointer; }
.compact-controls summary.accordion-button::-webkit-details-marker { display: none; }
.compact-controls summary.accordion-button::marker { content: ''; }
.compact-controls .control-selection {
    grid-column: 2; grid-row: 1; display: block; margin: 0; align-self: start;
    font-size: var(--control-meta); font-weight: 400; line-height: 1.5;
}
.compact-controls .control-group-body { padding: .65rem .75rem; }
.compact-controls .screening-control-group {
    display: grid; grid-template-columns: minmax(0, 1fr);
    align-items: center; gap: .4rem; padding: 0; border: 0; margin: 0 0 .65rem;
}
.compact-controls [hidden] { display: none !important; }
.compact-controls .screening-control-group legend,
.compact-controls #review-section-heading {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.compact-controls :is(.form-label, .form-control, .form-select, .form-check, .screening-map-filter-option, .screening-reference-panel label, .btn) {
    font-family: inherit; font-size: var(--control-text); font-weight: 400; line-height: 1.5;
}
.compact-controls .form-label { margin: 0; }
.compact-controls .form-control, .compact-controls .form-select { padding: .35rem .5rem; }
.compact-controls #screening-polygon-controls,
.compact-controls #screening-selection-description { grid-column: 1 / -1; }
.compact-controls :is(.screening-control-heading, legend.h6, .chart-metric-label, .screening-reference-panel legend, .screening-reference-panel h3) {
    font-size: var(--control-text); font-weight: 600; line-height: 1.5; margin: 0;
}
.compact-controls :is(.form-text, .control-help, .screening-reference-details, .screening-reference-legend-row) {
    font-size: var(--control-meta); font-weight: 400; line-height: 1.5;
}
.compact-controls .control-help p { margin: .5rem 0; }
.compact-controls .control-help > summary { color: #176c73; cursor: pointer; }
.compact-controls #review-section-controls { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.compact-controls #review-section-controls > fieldset { margin-top: .5rem; }
.compact-controls #review-section-status { margin-bottom: 0; }
.compact-controls .screening-apply-actions { position: sticky; bottom: 0; z-index: 1; padding: .65rem 0 .25rem; background: white; }
.compact-controls .btn-primary { background: #176c73; border-color: #176c73; font-weight: 600; }
.compact-controls .btn-primary:hover { background: #11565d; border-color: #11565d; }
.compact-controls .screening-control-status .form-text { margin: .4rem 0 0; }
.compact-controls #screening-map-filters { gap: .4rem; margin: 0 !important; }
.compact-controls .screening-map-filter-body { padding: .65rem .75rem; }
.compact-controls .evidence-disclosure > .screening-map-filter-body { margin: 0; }
.compact-controls .screening-map-filter-groups { gap: .75rem; margin-top: .6rem; }
.compact-controls .screening-map-filter-groups .screening-map-filter-actions { margin: 0 0 .5rem; padding: 0; border: 0; }
.compact-controls .screening-map-filter-options { grid-template-columns: minmax(0, 1fr); }
.compact-controls .control-option-list,
.compact-controls .screening-map-filter-options {
    max-height: none; overflow: visible;
    padding: 0; border: 0;
}
.compact-controls .control-option-list { display: grid; gap: .5rem; }
.compact-controls #review-section-controls > fieldset { display: grid; gap: .5rem; }
.compact-controls .screening-reference-panel .screening-map-filter-option { display: flex; margin-top: .5rem; }
.compact-controls .control-option-list:focus-visible,
.compact-controls .screening-map-filter-options:focus-visible,
.compact-controls .screening-reference-panel:focus-visible { outline: 2px solid #176c73; outline-offset: 2px; }
.compact-controls .screening-map-filter-option { padding: .4rem .5rem; }
.compact-controls .screening-reference-toggle { width: 100%; margin: 0; border: 0; box-shadow: none; }
.compact-controls .screening-reference-toggle > svg { display: none; }
.compact-controls .screening-reference-panel { max-height: none; overflow: visible; margin: 0; padding: .65rem .75rem; }
@media (max-width: 1199px) {
    .compact-controls .screening-apply-actions { position: static; }
}
/* Formation comparisons retain complete cohort labels and readable unit changes. */
.formation-core-summary { min-width: 52rem; }
.formation-core-summary th, .formation-core-summary td { vertical-align: top; white-space: pre-line; overflow-wrap: anywhere; }

/* Keep the two depth references distinct within the standard analysis table. */
.formation-top-summary { min-width: 52rem; font-variant-numeric: tabular-nums; }
.formation-top-summary > :is(thead, tbody) > tr > :is(th, td) { padding: .4rem .55rem; vertical-align: middle; }
.formation-top-summary thead [scope="colgroup"] { text-align: center; }
.formation-top-summary thead tr:nth-child(2) th,
.formation-top-summary tbody td { text-align: right; }
.formation-top-summary td[data-field="range"] { white-space: nowrap; }
.formation-top-summary thead [scope="colgroup"]:last-child,
.formation-top-summary thead tr:nth-child(2) th:nth-child(5),
.formation-top-summary tbody td:nth-child(6) { border-inline-start: 1px solid var(--bs-border-color, #ced4da); }

/* Bounded chart choices reuse shared checkbox/card styling and native disclosure. */
.temperature-formation-controls { max-height: 28rem; overflow-y: auto; overflow-wrap: anywhere; }
.temperature-formation-controls:focus-visible { outline: 2px solid #176c73; outline-offset: 2px; }

/* The checkbox label and arrow buttons share one selected-analysis card. */
.review-section-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.review-section-label { display: flex; align-items: center; gap: .5rem; min-width: 0; margin: 0; cursor: pointer; }
.review-section-moves { display: flex; gap: .25rem; }
.review-section-moves .btn { display: grid; place-items: center; width: 2rem; height: 2rem; padding: .25rem; }
.review-section-moves [aria-disabled="true"] { opacity: .4; cursor: default; }
.review-section-moves button:focus-visible { outline: 2px solid #176c73; outline-offset: 2px; }

/* Selection state is already visible in the rows; retain polite announcements for assistive technology. */
#review-section-controls :is(#review-order-status, #review-section-status) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
