:root {
  --ink: #11211f;
  --muted: #5f6f6c;
  --paper: #f5f7f3;
  --panel: #ffffff;
  --teal: #0e665b;
  --teal-dark: #083f39;
  --mint: #b9ead8;
  --lime: #d8f06b;
  --coral: #ef6b52;
  --amber: #e9a53a;
  --line: #dfe6e0;
  --shadow: 0 24px 70px rgba(13, 45, 39, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.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; left: 16px; top: -60px; z-index: 9999; padding: 12px 16px; color: #fff; background: var(--teal-dark); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar { min-height: 78px; padding: 14px clamp(20px, 4vw, 70px); display: flex; align-items: center; justify-content: space-between; background: rgba(245,247,243,.94); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--teal); border: 1px solid #bfd2ca; border-radius: 50%; }
.brand-mark svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 19px; line-height: .95; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 4px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .21em; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: #33504a; background: #e9f2ed; border: 1px solid #d4e4dc; border-radius: 999px; font-size: 12px; font-weight: 700; }
.privacy-pill span { color: #2e9b70; font-size: 10px; }

.hero { padding: clamp(54px, 8vw, 116px) clamp(20px, 7vw, 110px) clamp(58px, 8vw, 106px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .65fr); align-items: end; gap: 72px; background: radial-gradient(circle at 92% 0%, #def3e7 0, transparent 32%), var(--paper); }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: 11px; font-weight: 850; letter-spacing: .19em; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.04em; }
h1 { max-width: 870px; margin: 0; font-size: clamp(48px, 7vw, 94px); line-height: .94; }
h1 em { color: var(--teal); font-weight: 500; }
.hero-copy { max-width: 660px; margin: 30px 0 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.65; }
.hero-metrics { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); box-shadow: 0 14px 35px rgba(20,55,48,.07); }
.hero-metrics div { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding: 20px 22px; background: rgba(255,255,255,.72); }
.hero-metrics strong { color: var(--teal); font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.hero-metrics span { max-width: 140px; color: var(--muted); font-size: 12px; line-height: 1.3; text-align: right; }

.explorer { padding: 70px clamp(18px, 4vw, 64px) 78px; background: #e8eee9; border-top: 1px solid #d4ded7; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: 1440px; margin: 0 auto 28px; }
h2 { margin: 0; font-size: clamp(37px, 4.2vw, 58px); line-height: 1; }
.result-count { margin: 0; color: var(--teal); font-size: 13px; font-weight: 800; }
.filters { max-width: 1440px; margin: 0 auto 16px; display: grid; grid-template-columns: 1.35fr repeat(3, minmax(155px, .7fr)) auto; gap: 8px; }
.filters label { min-width: 0; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; background: rgba(255,255,255,.88); border: 1px solid #d4dfd7; border-radius: 10px; }
.filters label > span { margin-bottom: 2px; color: #73817e; font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.filters select, .filters input { min-width: 0; width: 100%; padding: 4px 24px 4px 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 13px; font-weight: 650; }
.search-field { position: relative; padding-left: 41px !important; }
.search-field svg { position: absolute; left: 14px; width: 18px; fill: none; stroke: #6e7e7a; stroke-width: 1.8; }
.search-field input { padding-right: 4px; }
.reset-button { padding: 0 18px; color: var(--teal); background: transparent; border: 1px solid #b8cbc2; border-radius: 10px; font-size: 12px; font-weight: 800; }
.reset-button:hover, .reset-button:focus-visible { background: #fff; }

.map-shell { position: relative; max-width: 1440px; height: min(70vh, 720px); min-height: 590px; margin: 0 auto; overflow: hidden; background: #cddbd3; border: 1px solid #c4d0c8; border-radius: 16px; box-shadow: var(--shadow); }
#map { width: 100%; height: 100%; background: #dfe8e1; }
.leaflet-container { font-family: inherit; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 7px 25px rgba(0,0,0,.13) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; border-bottom-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,.84) !important; font-size: 9px !important; }
.custom-marker { background: transparent; border: 0; }
.marker-pin { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--teal); border: 3px solid rgba(255,255,255,.92); border-radius: 50% 50% 50% 8px; box-shadow: 0 5px 13px rgba(6,48,42,.28); transform: rotate(-45deg); font-size: 11px; font-weight: 900; }
.marker-pin span { transform: rotate(45deg); }
.marker-pin.critical { background: var(--coral); }
.marker-pin.high { background: var(--amber); }
.marker-pin.active { outline: 4px solid rgba(216,240,107,.65); transform: rotate(-45deg) scale(1.12); }
.detail-panel { position: absolute; top: 14px; right: 14px; bottom: 14px; z-index: 500; width: min(390px, calc(100% - 28px)); overflow: auto; background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 20px 55px rgba(9,43,37,.2); }
.panel-empty { min-height: 100%; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.empty-marker, .point-number { width: 48px; height: 48px; display: grid; place-items: center; color: var(--teal); background: #e6f4ed; border-radius: 50%; font-weight: 850; }
.panel-empty h3 { margin: 22px 0 8px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.panel-empty p { margin: 0; color: var(--muted); line-height: 1.6; }
.panel-body { padding: 26px; }
.panel-top { display: flex; align-items: center; justify-content: space-between; }
.close-panel { width: 38px; height: 38px; color: #65736f; background: #f2f5f2; border: 0; border-radius: 50%; font-size: 21px; }
.status-row { margin: 20px 0 10px; display: flex; gap: 7px; flex-wrap: wrap; }
.tag { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.tag.critical { color: #8d2f20; background: #fee3dd; }
.tag.high { color: #7c4e05; background: #fff0ce; }
.tag.area { color: #35524c; background: #e8efeb; }
.panel-body h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 31px; font-weight: 500; line-height: 1.07; letter-spacing: -.025em; }
.location { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-block { padding: 17px 0; border-top: 1px solid var(--line); }
.detail-block h4 { margin: 0 0 9px; color: #71807c; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.detail-block p { margin: 0; font-size: 14px; line-height: 1.55; }
.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-card { padding: 12px; background: #f2f6f3; border-radius: 8px; }
.time-card span { display: block; color: #71807c; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.time-card strong { display: block; margin-top: 4px; font-size: 13px; }
.measure-list { margin: 0; padding: 0; list-style: none; }
.measure-list li { position: relative; padding: 0 0 9px 18px; font-size: 13px; line-height: 1.45; }
.measure-list li::before { content: ""; position: absolute; left: 1px; top: 7px; width: 7px; height: 7px; background: var(--lime); border: 2px solid var(--teal); border-radius: 50%; }
.mobile-list { display: none; }

.priorities { padding: 86px clamp(20px, 7vw, 110px) 42px; color: #f1f7f3; background: var(--teal-dark); }
.section-heading.light { align-items: end; }
.section-heading.light .eyebrow { color: var(--mint); }
.section-heading.light > p { max-width: 440px; margin: 0; color: #a9c2bb; line-height: 1.55; }
.priority-grid { max-width: 1440px; margin: 50px auto 70px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid rgba(255,255,255,.17); border-bottom: 1px solid rgba(255,255,255,.17); }
.priority-grid article { min-height: 240px; padding: 34px 34px 38px; border-right: 1px solid rgba(255,255,255,.17); }
.priority-grid article:last-child { border-right: 0; }
.priority-grid span { color: var(--lime); font-size: 11px; font-weight: 900; }
.priority-grid h3 { margin: 55px 0 12px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.priority-grid p { margin: 0; color: #a9c2bb; line-height: 1.6; }
.source-note { max-width: 1440px; margin: 0 auto; color: #83a39b; font-size: 11px; line-height: 1.5; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 46px; }
  .hero-metrics { grid-template-columns: repeat(3,1fr); }
  .hero-metrics div { min-width: 0; flex-direction: column; align-items: flex-start; }
  .hero-metrics span { text-align: left; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .reset-button { min-height: 52px; }
  .priority-grid { grid-template-columns: 1fr; }
  .priority-grid article { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.17); }
  .priority-grid article:last-child { border-bottom: 0; }
  .priority-grid h3 { margin-top: 28px; }
}

@media (max-width: 700px) {
  .topbar { min-height: 66px; }
  .privacy-pill { padding: 8px 10px; font-size: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 16px; }
  .hero { padding-top: 58px; }
  h1 { font-size: clamp(46px, 14vw, 68px); }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics div { flex-direction: row; align-items: baseline; }
  .hero-metrics span { text-align: right; }
  .explorer { padding-top: 52px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters label:nth-child(4) { grid-column: 1 / -1; }
  .map-shell { height: 62vh; min-height: 480px; }
  .detail-panel { top: auto; height: min(68%, 460px); }
  .panel-empty { display: none; }
  .mobile-list { margin-top: 14px; display: grid; gap: 8px; }
  .point-card { width: 100%; padding: 14px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; color: var(--ink); text-align: left; background: rgba(255,255,255,.83); border: 1px solid #d4dfd7; border-radius: 10px; }
  .point-card .card-number { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-size: 10px; font-weight: 850; }
  .point-card .card-number.critical { background: var(--coral); }
  .point-card .card-number.high { background: var(--amber); }
  .point-card strong { font-size: 13px; }
  .point-card small { display: block; margin-top: 3px; color: var(--muted); }
  .point-card .arrow { color: var(--teal); font-size: 20px; }
  .priorities { padding-top: 68px; }
  .section-heading.light > p { font-size: 14px; }
}

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