:root {
  color-scheme: light;
  --ink: #162b23;
  --muted: #4b6257;
  --paper: #f4f5ee;
  --line: #d7e0d7;
  --hero: #173b33;
  --accent: #c5dfa5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #177050; outline-offset: 3px; }
.wrap { width: min(calc(100% - 72px), 1320px); margin-inline: auto; }
.skip-link { position: absolute; top: .7rem; left: .7rem; z-index: 2000; padding: .7rem; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.hero { color: #f5f8ed; background: var(--hero); border-bottom: 4px solid #b6d497; }
.hero-inner { padding-block: 29px 32px; }
.hero :focus-visible { outline-color: var(--accent); }
.masthead { display: flex; align-items: center; gap: .65rem; font-size: .77rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.masthead > span:last-child { color: #c7d8c9; }
.brand-mark { width: 15px; height: 15px; border: 1px solid #cae0b1; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--hero); background: #cae0b1; }
.mast-divider { width: 1px; height: .8rem; background: #92a99e; }
h1 { margin: .36em 0 .15em; font-family: Georgia, serif; font-size: clamp(2.55rem, 5.55vw, 5.35rem); font-weight: 500; letter-spacing: -.062em; line-height: .99; }
h1 span { color: var(--accent); }
.hero p { max-width: 47rem; margin: .7rem 0 1.1rem; color: #e6eee4; font-size: clamp(1rem, 1.45vw, 1.19rem); line-height: 1.53; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.45rem; color: #d1e2d2; font-size: .87rem; }
.hero-meta a { color: #ebf5e5; font-weight: 650; }
.filters { padding-block: 21px 18px; }
.inputs { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; }
.field { display: grid; gap: .33rem; min-width: min(100%, 215px); }
.field label { font-size: .82rem; font-weight: 700; }
.search-field { width: min(100%, 340px); }
.field input, .field select { width: 100%; min-height: 43px; background: #fff; color: var(--ink); border: 1px solid #aabbb0; border-radius: 7px; padding: .45rem .7rem; }
.field input::placeholder { color: #5b6f63; }
.reset, #reset-map { min-height: 35px; padding: .25rem .65rem; background: transparent; color: var(--hero); border: 1px solid #aebeb2; border-radius: 6px; font-size: .79rem; font-weight: 700; }
.reset { min-height: 43px; }
.status-filters { display: flex; flex-wrap: wrap; gap: .43rem; margin-top: .88rem; }
.status-filter { display: inline-flex; gap: .39rem; align-items: center; min-height: 38px; padding: .32rem .54rem; border: 1px solid #c0cdc3; border-radius: 6px; background: #fff; color: var(--ink); font-size: .83rem; font-weight: 650; }
.status-filter:hover, .reset:hover, #reset-map:hover { background: #e1ebe1; }
.status-filter[aria-pressed='true'] { background: #e0eadb; border-color: #497158; box-shadow: inset 0 -2px #497158; }
.filter-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { flex: none; width: .61rem; height: .61rem; border-radius: 50%; background: var(--status); }
.overview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: clamp(1.1rem, 2.5vw, 2.25rem); }
.map-panel { position: sticky; top: .7rem; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.map-heading { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .62rem .8rem; }
.map-heading h2 { margin: 0; font-size: 1rem; }
#map { height: clamp(330px, 47vh, 560px); background: #e5ede6; }
.map-caption { margin: 0; padding: .64rem .8rem; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.leaflet-tooltip { font-family: system-ui, sans-serif; }
.leaflet-interactive:focus-visible { outline: none; stroke: #112d23; stroke-width: 5; }
.results { min-width: 0; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .72rem; padding: .1rem 0 .25rem; border-bottom: 1px solid #afbeb2; }
.results-heading h2 { margin: 0; font: 500 clamp(1.55rem, 3vw, 2.05rem)/1.1 Georgia, serif; letter-spacing: -.035em; }
.results-heading p { margin: 0; color: var(--muted); font-size: .79rem; }
#cards { display: grid; gap: .65rem; }
.card { min-width: 0; scroll-margin: 16px; padding: .88rem 1rem .94rem; background: white; border: 1px solid var(--line); border-left: 4px solid var(--status); border-radius: 7px; }
.card.selected { box-shadow: 0 0 0 2px #397052; }
.card-kicker { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .72rem; }
.badge { padding: .18rem .42rem; background: var(--tint); color: var(--status); border-radius: 3px; font-weight: 750; }
.card-place { color: var(--muted); }
.card h3 { margin: .4rem 0 .42rem; font-size: 1.18rem; line-height: 1.23; letter-spacing: -.022em; }
.card p { margin: 0; font-size: .88rem; line-height: 1.48; }
.card .next { margin-top: .35rem; color: #3e554a; }
.sources { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .7rem; margin-top: .66rem; padding-top: .55rem; border-top: 1px solid #e1e7e1; font-size: .78rem; }
.sources a, .show-map { overflow-wrap: anywhere; color: #235c45; font-weight: 650; }
.sources strong { color: #52675a; font-size: .7rem; }
.show-map { min-height: 30px; margin: .25rem 0 -.27rem; padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: .18em; font-size: .78rem; }
.empty { padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 7px; }
.empty p { margin: .4rem 0; }
.evidence { margin-top: 1.8rem; padding: 1rem 1.1rem; background: #e7eee3; border-radius: 7px; }
.evidence h2 { margin: 0 0 .3rem; font-size: 1rem; }
.evidence p { max-width: 76ch; margin: 0; color: #384e41; font-size: .86rem; line-height: 1.52; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-block: 1.35rem; padding-top: .8rem; border-top: 1px solid #becbbf; color: var(--muted); font-size: .75rem; font-weight: 650; }
@media (max-width: 880px) { .wrap { width: calc(100% - 36px); } .overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 690px) {
  .wrap { width: calc(100% - 28px); }
  .hero-inner { padding-block: 20px 24px; }
  .masthead { font-size: .65rem; letter-spacing: .075em; }
  .filters { padding-block: 15px 13px; }
  .inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.17fr); gap: .42rem; }
  .field, .search-field { min-width: 0; width: 100%; }
  .field input, .field select { font-size: 1rem; }
  .reset { width: fit-content; min-height: 34px; }
  .overview { grid-template-columns: minmax(0, 1fr); gap: .95rem; }
  .map-panel { position: static; }
  #map { height: 290px; }
  .map-heading { padding: .43rem .65rem; }
  .status-filter { padding-inline: .42rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
.result-pages-heading { scroll-margin-block: 1rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 1rem; }
.pagination button { min-height: 40px; padding: .3rem .8rem; border: 1px solid #aebeb2; border-radius: 6px; color: var(--hero); background: white; font-size: .85rem; font-weight: 700; }
.pagination button:hover:not(:disabled) { background: #e1ebe1; }
.pagination button:disabled { color: #67786c; background: #e8ece4; cursor: default; }
.pagination span { color: var(--muted); font-size: .85rem; }
.card .project-stage { margin-top: .4rem; color: var(--muted); font-size: .78rem; }
.project-details { margin-top: .7rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 5px; font-size: .84rem; }
.project-details summary { cursor: pointer; font-weight: 650; color: var(--hero); }
.project-details p, .project-details dl { margin-top: .5rem; }
.project-details dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: .18rem .45rem; margin-bottom: .25rem; }
.project-details dt { font-weight: 650; }
.project-details dd { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.cluster-marker { background: transparent; border: 0; }
.cluster-marker span { display: grid; place-items: center; width: 100%; height: 100%; border: 2px solid #fff; border-radius: 50%; background: var(--status); color: #fff; font-size: .72rem; font-weight: 800; box-shadow: 0 0 0 1px #173b3370; }
.cluster-projects { max-height: 180px; overflow-y: auto; margin-top: .25rem; }
.cluster-projects button { display: block; text-align: left; line-height: 1.2; padding-block: .2rem; }
.page-form { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .82rem; }
.page-form input { width: 3.45rem; min-height: 35px; padding: .21rem .25rem; color: var(--ink); background: white; border: 1px solid #aebeb2; border-radius: 5px; }
@media (max-width: 360px) { .pagination button { padding-inline: .47rem; } }
.card .funding-gap { margin-top: .55rem; padding: .45rem .55rem; border-radius: 4px; background: var(--tint); }
.risk-explainer { margin: .65rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }

.hero-inner {padding-block:1.35rem 1.5rem}
h1 {font-size:clamp(2.2rem,4.6vw,4.25rem)}
.hero p {margin:.55rem 0}
.filters h2,.evidence h2 {font:500 1.55rem/1.25 Georgia,serif;margin:0 0 .7rem}
.discovery,.search-tools,.browse-controls,.view-switch,#active {display:flex;align-items:end;flex-wrap:wrap;gap:.65rem}
.discovery {align-items:start}
#area-lookup {flex:1 1 23rem;min-width:0}
.discovery>.field {flex:1 1 14rem}
.field label,.hero-meta,.map-caption,.results-heading p,.coverage,.page-form,.pagination span,.evidence p,.footer {font-size:.875rem}
.search-tools,#scope-field,#filter-panel,#active,.status-filters {margin-top:.8rem}
#filter-panel {background:#e9eee5;padding:.8rem;border-radius:5px}
#filter-panel .field {flex:1 1 13rem;min-width:0}
#scope-field {max-width:24rem}
input,select,button {max-width:100%}
.filters button,.browse button,.browse select,.field select,.field input,summary {min-height:44px}
.filters button,.view-switch button,.browse-controls select,.empty button {border:1px solid #819389;background:white;color:var(--hero);padding:.4rem .7rem;border-radius:5px;font-size:.9rem;font-weight:620}
.filters button:disabled {opacity:.58}
.view-switch [aria-pressed=true],.filters [aria-pressed=true] {background:var(--hero);color:white}
.filters [aria-pressed=true] .filter-count {color:white}
.filters .chip {background:#e8efe4}
.coverage {color:var(--muted);margin:.4rem 0 .75rem;line-height:1.45}
.overview {grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
.map-heading h3 {margin:0;font-size:1rem}
.map-view .overview {display:block}
.map-view .results {display:none}
.map-view .map-panel {position:static}
.map-view #map {height:clamp(350px,65vh,800px)}
.browse-controls {align-items:center;font-size:.9rem}
.pagination {margin:.5rem 0}
.results-heading {align-items:center}
.evidence {line-height:1.55}
.evidence p {margin:.45rem 0;max-width:88ch;font-size:1rem}
summary {cursor:pointer;align-content:center}
.evidence details {border-top:1px solid #b4c4b4;margin-top:.5rem}
.evidence summary {font-weight:650}
:focus-visible {outline:3px solid #1464a0;outline-offset:2px}
@media(max-width:760px){
  .wrap {width:calc(100% - 28px)}
  .hero-inner {padding-block:1rem}
  .hero-meta {font-size:.875rem}
  .overview {display:block}
  body:not(.map-view) .map-panel {display:none}
  .search-tools .field {flex:1 1 10rem;min-width:min(10rem,100%)}
  .discovery {display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem}
  .status-filters {gap:.3rem}
  .filters .status-filter {font-size:.875rem}
  #filter-panel .inputs {display:flex}
  .results-heading {align-items:start}
  #active {position:sticky;top:0;background:var(--paper);z-index:2}
}
#active:not([hidden]) {position:sticky;top:0;z-index:401;background:var(--paper);padding:.25rem 0;margin:.1rem 0 .7rem;border-bottom:1px solid var(--line);max-height:8rem;overflow:auto;align-items:center}
#active .chip {min-height:44px;color:var(--hero);border:1px solid #8ca293;background:#e8efe4;border-radius:5px;font-size:.875rem;padding:.35rem .6rem}
#active~.browse :focus {scroll-margin-top:8rem}
@media(prefers-reduced-motion:reduce){.leaflet-zoom-anim .leaflet-zoom-animated,.leaflet-fade-anim .leaflet-popup,.leaflet-fade-anim .leaflet-tile{transition:none!important}}
.evidence, .results-heading, .hero {overflow-wrap:anywhere}
.pagination, .page-form {flex-wrap:wrap}
.field {grid-template-columns:minmax(0,1fr)}
.field select, .browse-controls select {min-width:0;overflow:hidden;text-overflow:ellipsis}
#map-first {margin-block:.65rem}
#map-first .results-heading {margin-bottom:.4rem;border:0}
#map-first .results-heading>div:first-child {display:flex;gap:.35rem .8rem;align-items:baseline;flex-wrap:wrap}
#map-first .map-panel {position:relative}
#map-first .map-heading {position:absolute;z-index:450;top:.5rem;right:.5rem;padding:0}
#map-first .map-heading h3 {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
#map-first #reset-map {background:white;min-height:44px}
#map-first #map {height:clamp(320px,65svh,780px)}
.find-on-map {display:none}
#map-first .find-on-map {display:inline-flex;align-items:center;min-height:44px;padding-inline:.5rem;font-weight:650}
#map-first .view-switch button {min-height:44px}
@media(max-width:760px){
  .map-view .hero-inner {padding-block:.6rem}
  .map-view h1 {font-size:clamp(1.65rem,7vw,2.3rem)}
  #map-first .results-heading h2 {font-size:1.25rem}
  #map-first .results-heading {gap:.1rem .5rem}
  #map-first #map {height:clamp(295px,56svh,540px)}
}
