:root {
  --ink: #10231f;
  --muted: #4e5f59;
  --cream: #f5f2e9;
  --paper: #fbfaf6;
  --line: #dcded6;
  --lime: #d7f23a;
  --teal: #0f7368;
  --navy: #122c36;
  --orange: #fb875e;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--cream); overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #076b61; outline-offset: 3px; }
.map-stage :focus-visible { outline-color: #e6ff6b; }
.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; }
.skip-link { position: fixed; z-index: 99; left: 12px; top: -80px; background: white; color: var(--ink); padding: 11px 14px; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.skip-map:focus { top: 62px; }

.app-shell { height: 100%; display: grid; grid-template-rows: 72px 1fr; }
.topbar { display: grid; grid-template-columns: 320px 1fr 320px; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(251,250,246,.96); z-index: 5; }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand span:last-child { display: grid; line-height: 1; }
.brand strong { font-family: Manrope; font-size: 18px; letter-spacing: -.03em; }
.brand small { color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); display: flex; gap: 3px; align-items: end; justify-content: center; padding: 9px; transform: rotate(-2deg); }
.brand-mark i { display: block; width: 5px; background: var(--lime); border-radius: 2px 2px 0 0; }
.brand-mark i:nth-child(1) { height: 10px; }.brand-mark i:nth-child(2) { height: 19px; }.brand-mark i:nth-child(3) { height: 14px; }
.topbar-center { justify-self: center; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.live-pill { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: white; font-weight: 600; }
.live-pill i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4dae75; margin-right: 6px; box-shadow: 0 0 0 4px #dcefe2; }
.about-button { justify-self: end; border: 1px solid var(--ink); border-radius: 999px; padding: 9px 15px; background: transparent; cursor: pointer; font-weight: 600; }

.workspace { display: grid; grid-template-columns: 420px 1fr; min-height: 0; }
.sidebar { background: var(--paper); padding: 32px 30px 0; overflow: auto; border-right: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; color: var(--teal); }
.intro h1 { margin: 0; font-family: Manrope; font-size: clamp(36px, 3vw, 52px); line-height: .98; letter-spacing: -.055em; }
.intro h1 em { color: var(--teal); font-style: normal; }
.intro > p:last-child { max-width: 330px; margin: 17px 0 24px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.metrics article { background: white; padding: 15px 12px; }
.metrics strong { font: 800 25px/1 Manrope; display: block; }
.metrics span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; line-height: 1.4; margin-top: 6px; }
.filters { padding: 24px 0; border-bottom: 1px solid var(--line); }
.search-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; width: 17px; left: 12px; top: 12px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search-wrap input, select { border: 1px solid #718078; background: white; border-radius: 9px; color: var(--ink); }
.search-wrap input { width: 100%; padding: 11px 12px 11px 38px; font-size: 14px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin-top: 13px; }
.filter-row label { font-size: 12px; font-weight: 700; }
.filter-row select { display: block; width: 100%; padding: 10px 8px; font-size: 13px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 0 12px; }
.results-head h2 { font: 700 16px Manrope; margin: 0; }.results-head span { font-size: 12px; color: var(--muted); }
.project-list { padding-bottom: 24px; }
.project-card { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; text-align: left; padding: 15px 4px; color: var(--ink); }
.project-card:hover, .project-card.active { background: #eef2e7; margin-inline: -8px; width: calc(100% + 16px); padding-inline: 12px; border-radius: 8px; }
.project-card .dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 2px; background: var(--teal); }
.project-card .dot.active { background: #8aaa12; }.project-card .dot.complete { background: #0f8a7e; }.project-card .dot.other { background: #e7683a; }
.project-card strong { display: block; font-size: 14px; line-height: 1.4; }.project-card small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 5px; }
.project-card .arrow { font-size: 16px; color: var(--muted); }
.empty { color: var(--muted); font-size: 13px; padding: 20px 0; }
.project-details { background: #edf4ee; border: 1px solid #94a89c; border-radius: 9px; margin: 0 0 12px; padding: 16px; font-size: 14px; line-height: 1.5; }
.project-details h3 { font: 700 16px Manrope; margin: 0 0 8px; }.project-details p { margin: 0 0 12px; }.project-details dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 12px; }.project-details dt { font-weight: 700; }.project-details dd { margin: 0; }
.project-details a, dialog a { color: #075d54; font-weight: 700; }
.show-more { width: 100%; border: 1px solid var(--ink); border-radius: 9px; background: white; color: var(--ink); padding: 12px; font-weight: 700; margin-bottom: 24px; }
.show-more[hidden] { display: none; }

.map-stage { position: relative; min-width: 0; overflow: hidden; background: var(--navy); }
#map { position: absolute; inset: 0; }
.map-heading { position: absolute; z-index: 2; top: 27px; left: 30px; color: white; pointer-events: none; background: rgba(16,35,31,.94); border-radius: 9px; padding: 10px 13px; }
.map-heading p { margin: 0 0 5px; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--lime); }
.map-heading h2 { margin: 0; font: 700 23px Manrope; }
.map-legend { position: absolute; z-index: 2; left: 28px; bottom: 52px; display: flex; gap: 15px; background: rgba(16,35,31,.92); color: white; padding: 10px 13px; border-radius: 9px; backdrop-filter: blur(10px); font-size: 12px; }
.map-legend span { display: flex; align-items: center; gap: 6px; }.map-legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend-active { background: var(--lime); }.legend-complete { background: #6ed7ce; }.legend-other { background: var(--orange); }
.reset-view { position: absolute; right: 16px; top: 128px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 7px; background: white; box-shadow: 0 2px 12px #0003; font-size: 18px; }
.loading-card { position: absolute; z-index: 3; inset: 50% auto auto 50%; transform: translate(-50%,-50%); background: white; border-radius: 12px; padding: 14px 18px; box-shadow: 0 14px 40px #0004; font-size: 12px; display: flex; align-items: center; gap: 10px; }
.loading-card span { width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-card.hidden { display: none; }.map-note { position: absolute; left: 28px; bottom: 9px; max-width: 275px; color: white; background: rgba(16,35,31,.92); padding: 5px 7px; border-radius: 4px; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
.maplibregl-popup-content { border-radius: 12px; padding: 16px; max-width: 270px; box-shadow: 0 12px 32px #0004; }
.popup-label { text-transform: uppercase; color: var(--teal); letter-spacing: .1em; font-size: 12px; font-weight: 800; }.popup-title { font: 700 16px/1.4 Manrope; margin: 5px 0 8px; }.popup-meta { color: var(--muted); font-size: 13px; }.popup-link { display: inline-block; color: #075d54; margin-top: 10px; font-size: 13px; font-weight: 700; }

dialog { border: 0; border-radius: 16px; padding: 30px; max-width: 480px; color: var(--ink); box-shadow: 0 30px 80px #0008; }
dialog::backdrop { background: rgba(8,24,22,.68); backdrop-filter: blur(5px); }
dialog h2 { font: 800 28px Manrope; margin: 0 0 13px; } dialog p { color: var(--muted); line-height: 1.6; } dialog a { color: var(--teal); font-weight: 700; }
.dialog-close { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 25px; cursor: pointer; }

@media (max-width: 850px) {
  body { overflow: auto; }.app-shell { height: auto; min-height: 100%; grid-template-rows: 64px auto; }
  .topbar { grid-template-columns: 1fr auto; padding: 0 14px; }.topbar-center { display: none; }.workspace { grid-template-columns: 1fr; }
  .sidebar { padding: 24px 20px 0; max-height: none; grid-row: 1; }.map-stage { height: 68vh; min-height: 520px; grid-row: 2; }
  .about-button { font-size: 12px; }.map-legend { flex-wrap: wrap; max-width: 260px; }.map-note { max-width: 50%; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; } }
