:root { font-family: Inter, "Segoe UI", system-ui, sans-serif; color: #25333d; font-synthesis: none; --blue: #0874b9; --blue-dark: #075e99; --shadow: 0 3px 16px rgb(19 43 61 / 20%); }
* { box-sizing: border-box; }
html, body, #map { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: #dce8ee; }
#map { position: absolute; inset: 0; background: #dce8ee; }
.maplibregl-ctrl-attrib { font: 10px/1.4 system-ui, sans-serif; opacity: .82; }
.icon-button, .tool-button, .brand-mark, .overview-button { border: 0; cursor: pointer; }
.menu-toggle { display: none; }
.data-panel, .legend-card, .details-card { position: absolute; z-index: 4; border-radius: 5px; background: rgb(255 255 255 / 97%); box-shadow: var(--shadow); }
.data-panel { left: 18px; top: 18px; width: 318px; max-height: calc(100vh - 105px); overflow-y: auto; padding: 21px 20px 17px; transition: transform .24s ease, opacity .2s ease; }
.data-panel.collapsed { transform: translateX(calc(-100% - 25px)); opacity: 0; pointer-events: none; }
.panel-heading { position: relative; display: flex; align-items: flex-start; justify-content: center; margin-bottom: 7px; }
.project-lockup { display: flex; flex: 1; flex-direction: column; align-items: center; text-align: center; }
.project-logo { display: block; width: min(100%, 260px); height: auto; object-fit: contain; margin: 0 0 10px; padding: 8px; border-radius: 8px; background: #fff; box-shadow: 0 2px 6px rgb(7 45 68 / 24%); }
.eyebrow { display: block; color: #71818b; font-size: 9px; font-weight: 750; letter-spacing: 1.35px; }
.panel-heading h1 { margin: 3px 0 0; color: #125c83; font-size: 20px; line-height: 1.2; letter-spacing: -.35px; text-align: center; }
.close-panel { display: none; }
.status { min-height: 32px; margin: 8px 0 16px; color: #71818b; font-size: 11px; line-height: 1.45; }
.status.error { color: #b33939; }
.control-group { margin: 0 0 13px; }
.control-group label { display: block; margin-bottom: 5px; color: #4d5c65; font-size: 11px; font-weight: 650; }
.control-group select { width: 100%; height: 39px; padding: 0 30px 0 10px; border: 1px solid #d6dfe4; border-radius: 3px; color: #273941; background: #fff; font: inherit; font-size: 12px; outline-color: #0874b9; }
.control-group select:disabled { color: #9ba6aa; background: #f8fafb; }
.panel-divider { height: 1px; margin: 18px 0 15px; background: #e9edef; }
.section-title { margin: 0 0 8px; color: #4a5b63; font-size: 11px; font-weight: 700; }
.switch-row { display: flex; justify-content: space-between; align-items: center; min-height: 37px; color: #41515b; font-size: 12px; cursor: pointer; }
.switch-row > span { display: flex; gap: 8px; align-items: center; }
.swatch { display: inline-block; width: 15px; height: 15px; border-radius: 3px; }
.boundary-swatch { border: 1px solid #293d4a; background: #eef4f3; }
.data-swatch { border: 1px solid #527f80; background: linear-gradient(135deg, #440154, #21918c, #fde725); }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { position: relative; width: 31px; height: 17px; border-radius: 10px; background: #c7d0d5; transition: background .16s ease; }
.switch-row i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .16s ease; }
.switch-row input:checked + i { background: #0874b9; }
.switch-row input:checked + i::after { transform: translateX(14px); }
.switch-row input:focus-visible + i { outline: 2px solid #153c5a; outline-offset: 2px; }
.panel-note { margin: 12px 0 0; color: #829099; font-size: 10px; line-height: 1.45; }
.map-tools { position: absolute; z-index: 5; top: 50%; right: 15px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px; transform: translateY(-50%); border-radius: 5px; background: var(--blue); box-shadow: var(--shadow); }
.tool-button { display: flex; align-items: center; justify-content: center; width: 40px; height: 39px; border-radius: 3px; color: #fff; background: transparent; transition: background .14s ease; }
.tool-button:hover, .tool-button.active, .tool-button[aria-pressed="true"] { background: var(--blue-dark); }
.tool-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-divider { width: 24px; height: 1px; margin: 1px 0; background: rgb(255 255 255 / 30%); }
.tool-button.zoom { font-size: 29px; font-weight: 300; line-height: 1; }
.legend-card { right: 78px; bottom: 83px; width: 230px; padding: 13px 15px; }
.legend-unit { margin-bottom: 8px; color: #315565; font-size: 11px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.variable-info-card { position: absolute; z-index: 4; top: 18px; right: 78px; width: min(320px, calc(100vw - 420px)); max-height: 35vh; overflow-y: auto; padding: 15px 17px; border-radius: 5px; background: rgb(255 255 255 / 97%); box-shadow: var(--shadow); }
.variable-info-card h2 { margin: 5px 0 8px; color: #263943; font-size: 15px; line-height: 1.3; }
.variable-info-card p { margin: 7px 0; color: #586970; font-size: 11px; line-height: 1.5; }
.variable-info-card .info-unit { display: inline-block; padding: 4px 7px; border-radius: 3px; color: #315565; background: #e9f2f5; font-size: 10px; font-weight: 650; }
.variable-info-card .info-reference { overflow-wrap: anywhere; }
.variable-info-card .info-more { display: inline-block; margin: 2px 0 5px; color: #25627a; font-size: 11px; font-weight: 650; }
.variable-info-card .info-summary { padding-top: 8px; border-top: 1px solid #e9edef; font-variant-numeric: tabular-nums; }
.legend-gradient { height: 11px; border: 1px solid #aab3b8; border-radius: 2px; }
.legend-values { position: relative; height: 15px; margin-top: 5px; color: #5e6b72; font-size: 10px; font-variant-numeric: tabular-nums; }
.legend-values span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.legend-values .legend-tick-0 { transform: none; }
.legend-values .legend-tick-2 { transform: translateX(-100%); }
.details-card { left: 18px; bottom: 78px; width: min(340px, calc(100vw - 36px)); max-height: 42vh; overflow-y: auto; padding: 18px; }
.chart-view { position: absolute; z-index: 3; inset: 82px 78px 76px 355px; overflow: auto; padding: 22px 26px; border-radius: 5px; background: rgb(255 255 255 / 96%); box-shadow: var(--shadow); }
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.chart-view h2 { margin: 0 0 4px; font-size: 19px; color: #263943; }
.chart-download { flex: none; padding: 7px 10px; border: 1px solid #0874b9; border-radius: 3px; color: #fff; background: #0874b9; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.chart-download:hover, .chart-download:focus-visible { background: #075e99; }
.chart-download:disabled { border-color: #c5d0d6; color: #819099; background: #edf2f4; cursor: not-allowed; }
.chart-view > .chart-unit { display: inline-block; margin: 5px 0 10px; padding: 5px 8px; border-radius: 3px; color: #315565; background: #e9f2f5; font-size: 11px; font-weight: 700; }
.chart-filters { display: flex; align-items: center; gap: 8px; margin: 13px 0 9px; color: #4d5c65; font-size: 11px; }
.chart-filters select { height: 32px; max-width: 220px; padding: 0 9px; border: 1px solid #d6dfe4; border-radius: 3px; color: #273941; background: #fff; font: inherit; }
.chart-view > p { margin: 7px 0 15px; color: #71818b; font-size: 12px; }
.chart-legend { width: min(100%, 360px); margin: 9px 0 17px; }
.chart-legend-gradient { height: 11px; border: 1px solid #aab3b8; border-radius: 2px; }
.chart-legend-values { position: relative; height: 15px; margin-top: 5px; color: #5e6b72; font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-legend-values span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.chart-legend-values .chart-legend-tick-0 { transform: none; }
.chart-legend-values .chart-legend-tick-2 { transform: translateX(-100%); }
.histogram { display: flex; align-items: stretch; gap: 3px; width: 100%; min-width: 100%; height: 365px; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 0; }
.chart-bin { display: flex; flex: 0 0 66px; flex-direction: column; height: 100%; font-variant-numeric: tabular-nums; }
.chart-bin-value { height: 24px; overflow: hidden; color: #51636c; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.chart-bin-plot { position: relative; flex: 1; min-height: 0; margin: 0 7px; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #e7edef calc(25% - 1px), #e7edef 25%); }
.chart-zero { position: absolute; z-index: 1; right: -7px; left: -7px; height: 1px; background: #677982; }
.chart-bar { position: absolute; right: 1px; left: 1px; min-height: 1px; border-radius: 3px 3px 0 0; background: linear-gradient(0deg, #8ac8dc, #0874b9); }
.chart-bin-label { display: -webkit-box; height: 49px; overflow: hidden; padding: 5px 2px 0; color: #465861; text-align: center; font-size: 9px; line-height: 1.2; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.details-card h2 { margin: 3px 0 12px; font-size: 17px; }
.close-details { position: absolute; right: 10px; top: 8px; background: transparent; color: #6b7a83; font-size: 25px; }
.detail-row { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; border-top: 1px solid #edf0f2; color: #3d4d56; font-size: 11px; }
.detail-row > :last-child { text-align: right; overflow-wrap: anywhere; }
.detail-key { color: #71808a; font-weight: 650; }
.bottom-bar { position: absolute; z-index: 6; right: 0; bottom: 0; left: 0; display: flex; align-items: center; height: 57px; padding: 0 15px; color: #fff; background: var(--blue); box-shadow: 0 -2px 9px rgb(0 0 0 / 12%); }
.brand-mark, .overview-button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 4px; color: white; background: transparent; }
.brand-mark:hover, .overview-button:hover, .overview-button.active { background: var(--blue-dark); }
.brand-glyph { display: grid; grid-template-columns: repeat(2, 11px); grid-template-rows: repeat(2, 11px); gap: 4px; }
.brand-glyph i { display: block; border: 2px solid white; border-radius: 2px; }
.overview-button { margin-left: 76px; width: 54px; height: 49px; border-radius: 0; border-left: 1px solid rgb(255 255 255 / 24%); border-right: 1px solid rgb(255 255 255 / 24%); }
.view-switch { display: flex; gap: 3px; margin-left: 14px; padding: 4px; border: 1px solid rgb(255 255 255 / 30%); border-radius: 4px; }
.view-button { padding: 7px 13px; border: 0; border-radius: 3px; color: #fff; background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.view-button:hover, .view-button.active { background: var(--blue-dark); }
.mini-map { position: relative; width: 38px; height: 31px; border: 1px solid rgb(255 255 255 / 75%); background: linear-gradient(135deg,#aed3df,#e5e0c9 54%,#bfd8dc); }
.mini-map i { position: absolute; display: block; height: 1px; background: rgb(76 125 143 / 70%); transform: rotate(-26deg); }
.mini-map i:nth-child(1) { top: 9px; left: 2px; width: 30px; }.mini-map i:nth-child(2) { top: 18px; left: 6px; width: 29px; transform: rotate(23deg); }.mini-map i:nth-child(3) { top: 13px; left: 16px; width: 17px; transform: rotate(76deg); }
.footer-spacer { flex: 1; }
.footer-label { display: flex; align-items: center; gap: 6px; padding: 0 13px; font-size: 10px; }
.language-picker { display: flex; align-items: center; gap: 5px; padding: 0 10px; font-size: 10px; }
.language-picker select { max-width: 88px; padding: 6px 20px 6px 7px; border: 1px solid rgb(255 255 255 / 50%); border-radius: 3px; color: #fff; background: var(--blue-dark); font: inherit; cursor: pointer; }
.language-picker option { color: #25333d; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.globe-mark { font-size: 19px; }
.footer-brand { display: flex; flex-direction: column; justify-content: center; min-width: 91px; height: 31px; padding-left: 10px; border-left: 1px solid rgb(255 255 255 / 40%); line-height: 1.1; }
.footer-brand b { font-size: 10px; letter-spacing: .8px; }.footer-brand small { margin-top: 3px; font-size: 7px; opacity: .8; letter-spacing: .6px; }
.footer-contact { position: relative; display: flex; align-items: center; min-height: 33px; margin-left: 10px; padding-left: 10px; border-left: 1px solid rgb(255 255 255 / 40%); }
.footer-contact-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid rgb(255 255 255 / 54%); border-radius: 3px; color: #fff; background: transparent; font: inherit; font-size: 10px; letter-spacing: .55px; cursor: pointer; }
.footer-contact-toggle::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.footer-contact-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(225deg); }
.footer-contact-toggle:hover, .footer-contact-toggle[aria-expanded="true"] { background: var(--blue-dark); }
.footer-contact-menu { position: absolute; z-index: 10; right: 0; bottom: calc(100% + 8px); display: grid; gap: 5px; width: max-content; min-width: 160px; padding: 7px; border: 1px solid rgb(255 255 255 / 30%); border-radius: 4px; background: var(--blue); box-shadow: var(--shadow); }
.footer-contact-menu a { display: block; padding: 9px 11px; border: 1px solid rgb(255 255 255 / 38%); border-radius: 3px; color: #fff; background: var(--blue-dark); font: inherit; font-size: 10px; letter-spacing: .4px; text-decoration: none; white-space: nowrap; }
.footer-contact-menu a:hover, .footer-contact-menu a:focus-visible { color: #fff; background: #064c7a; text-decoration: none; }
.footer-cite-button { flex: none; padding: 7px 10px; border: 1px solid rgb(255 255 255 / 54%); border-radius: 3px; color: #fff; background: transparent; font: inherit; font-size: 10px; letter-spacing: .55px; cursor: pointer; }
.footer-cite-button:hover, .footer-cite-button:focus-visible { background: var(--blue-dark); }
.citation-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(80vh, 680px); overflow-y: auto; padding: 24px; border: 0; border-radius: 8px; color: #25333d; background: #fff; box-shadow: 0 18px 60px rgb(0 0 0 / 28%); }
.citation-dialog::backdrop { background: rgb(12 35 45 / 65%); }
.citation-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.citation-dialog-heading h2 { margin: 0; color: #125c83; font-size: 21px; line-height: 1.3; }
.citation-close { border: 0; color: #51636c; background: transparent; font-size: 27px; line-height: 1; cursor: pointer; }
.citation-dialog > p { margin: 13px 0 20px; color: #51636c; font-size: 14px; line-height: 1.6; }
.citation-dialog-list { display: grid; gap: 14px; margin: 0; padding-left: 22px; }
.citation-dialog-list li { padding: 14px 16px; border: 1px solid #d6dfe4; border-radius: 5px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.citation-dialog-list li::marker { color: #125c83; font-weight: 700; }
.citation-dialog-list a { color: #075e99; text-decoration: underline; text-underline-offset: 2px; }
.citation-dialog-list a:hover { color: #064c7a; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .menu-toggle { position: absolute; z-index: 5; top: 12px; left: 12px; display: grid; place-items: center; width: 46px; height: 48px; border-radius: 4px; color: #fff; background: var(--blue); box-shadow: var(--shadow); font-size: 20px; }
  .data-panel { z-index: 8; top: 0; left: 0; width: min(340px, calc(100vw - 42px)); max-height: 100dvh; height: 100dvh; padding: 21px 18px 75px; border-radius: 0 7px 7px 0; }
  .data-panel.collapsed { transform: translateX(-105%); }
  .close-panel { position: absolute; z-index: 1; top: -8px; right: -7px; display: block; border: 0; background: transparent; color: #667780; font-size: 26px; cursor: pointer; }
  .map-tools { top: auto; right: 9px; bottom: 70px; gap: 2px; padding: 5px; }
  .tool-button { width: 36px; height: 35px; }
  .legend-card { right: 60px; bottom: 68px; width: min(210px, calc(100vw - 85px)); padding: 10px; }
  .variable-info-card { top: 68px; right: 60px; width: min(250px, calc(100vw - 82px)); max-height: 29vh; padding: 11px; }
  .details-card { left: 10px; bottom: 68px; width: min(330px, calc(100vw - 65px)); }
  .chart-view { inset: 66px 55px 66px 10px; padding: 14px; }
  .chart-view { padding: 13px; }
  .chart-filters { flex-wrap: wrap; gap: 6px; }
  .chart-filters select { max-width: 145px; }
  .histogram { height: 340px; }
  .chart-bin { flex-basis: 58px; }
  .bottom-bar { height: 53px; padding: 0 8px; }
  .brand-mark { width: 38px; height: 42px; }
  .overview-button { margin-left: 12px; width: 47px; height: 45px; }
  .view-switch { margin-left: 7px; }
  .view-button { padding: 7px 8px; font-size: 10px; }
  .project-logo { width: min(100%, 240px); height: auto; margin: 0 0 9px; }
  .footer-label { padding: 0 7px; }
  .footer-contact { margin-left: 6px; padding-left: 6px; }
  .footer-contact-toggle { gap: 5px; padding: 6px 7px; font-size: 9px; }
}
@media (max-width: 520px) {
  .footer-brand { display: none; }
  .language-picker { gap: 3px; padding: 0 5px; }
  .language-picker select { max-width: 73px; padding-right: 17px; }
}
@media (max-width: 420px) {
  .bottom-bar { padding: 0 5px; }
  .brand-mark { display: none; }
  .overview-button { width: 38px; margin-left: 0; }
  .view-switch { gap: 1px; margin-left: 2px; padding: 2px; }
  .view-button { padding: 6px 4px; font-size: 8px; }
  .footer-cite-button { padding: 6px 5px; font-size: 9px; }
  .language-picker .globe-mark { display: none; }
  .language-picker { padding: 0 2px; }
  .language-picker select { max-width: 58px; padding-left: 4px; }
  .footer-contact { margin-left: 4px; padding-left: 4px; }
  .footer-contact-toggle { padding: 6px 5px; }
  .citation-dialog { padding: 18px; }
  .citation-dialog-list li { padding: 12px; }
}
