@font-face {
  font-family: "Source Sans 3";
  src: url("../schriften/source-sans-3/variable.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #eef2ea;
  --panel: #f8faf4;
  --ink: #22352d;
  --muted: #466056;
  --pine: #123e33;
  --mint: #d2e9e0;
  --berry: #9f2451;
  --line: #b8c7bc;
  --map: #e9eee1;
  --focus: #2458a4;
  --ease: cubic-bezier(.2,.8,.2,1);
  --aerial-scrim: linear-gradient(100deg, var(--bg) 0 17%, #eef2eafc 27%, #eef2eaf0 37%, #eef2ea80 48%, #eef2ea1a 62%, #123e3310 82%);
}
@media (min-width: 640px) and (max-width: 980px) {
  :root { --aerial-scrim: linear-gradient(100deg, var(--bg), #eef2eafc 25%, #eef2eaec 43%, #eef2ea48 70%, #123e3310 92%); }
}
@media (max-width: 639px) {
  :root {
    --aerial-scrim:
      linear-gradient(180deg, #eef2ead9, #eef2ea00 22%),
      linear-gradient(0deg, var(--bg) 0 32%, #eef2eaf5 46%, #eef2ea74 61%, #eef2ea00 79%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.45 "Source Sans 3", system-ui, sans-serif; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
button, input, select, a { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { font-weight: 650; }
a { text-underline-offset: .2em; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--panel);
}
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; inset: 8px auto auto 8px; z-index: 900; padding: 8px 12px; background: var(--panel); }
.shell { width: min(100% - 48px, 1336px); margin-inline: auto; }
.masthead { min-height: 78px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; }
.masthead h1 { line-height: 1; }
.brand { min-height: 52px; display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--pine); }
.brand b { display: block; font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 760; letter-spacing: -.055em; }
.brand small { display: block; margin-top: 3px; font-size: .88rem; font-weight: 650; letter-spacing: .025em; color: var(--muted); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--berry); border-radius: 100px; background: var(--berry); color: var(--panel); font-weight: 700; text-decoration: none; }
.primary:hover { background: #7e2043; }
.masthead-action span { font-size: 1.18em; line-height: 1; }
#preview { container: preview / inline-size; }
.intro { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-block: 8px; }
.intro p { color: var(--muted); }
.utility, .text-button { min-height: 44px; padding: 4px 0; border: 0; background: none; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.utility { display: inline-flex; align-items: center; color: var(--pine); }
.text-button { color: var(--berry); }
.atlas { --mode-index: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.mode-picker { margin: 0; padding: 8px; min-width: 0; border: 0; border-radius: 19px 19px 0 0; background: #e1ebe2; }
.mode-track { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); isolation: isolate; }
.mode-track input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.mode-highlight {
  position: absolute; z-index: -1; inset: 0 auto 0 0; width: calc(100% / 3);
  border-radius: 13px; background: var(--pine); border: 1px solid #23483c;
  transform: translateX(calc(var(--mode-index) * 100%)); transition: transform 300ms var(--ease);
}
.mode-track label { display: flex; justify-content: center; align-items: center; gap: 10px; min-width: 0; min-height: 62px; padding: 8px 9px; border-radius: 12px; color: var(--pine); font-weight: 720; line-height: 1.15; cursor: pointer; }
.mode-track label:hover { background: #2c675314; }
.mode-track input:checked + label { color: var(--panel); }
.mode-track input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--panel); }
.mode-track small { display: block; font-size: .875rem; font-weight: 450; margin-top: 3px; }
.mode-icon { position: relative; display: inline-grid; flex: 0 0 32px; width: 32px; height: 32px; place-content: center; border: 1px solid #819e8e; border-radius: 8px; background: #edf4e9; }
.mode-icon i { display: block; }
.icon-atlas { grid-template-columns: 9px 8px; gap: 2px; }
.icon-atlas i { height: 7px; background: #458074; transform: skewY(-13deg); }
.icon-atlas i:first-child { height: 16px; grid-row: span 2; background: #ab6c56; }
.icon-atlas i:last-child { background: #9cbcb0; }
.icon-years { grid-template-columns: 7px 7px; gap: 2px; }
.icon-years i { height: 14px; background: #7c9a86; }
.icon-years i:last-child { background: var(--pine); }
.icon-report i { width: 12px; height: 12px; background: var(--berry); border: 1px solid var(--panel); transform: rotate(45deg); box-shadow: 0 0 0 1px var(--berry); }
.map-stage { position: relative; height: clamp(370px, 41cqw, 550px); isolation: isolate; }
#map { position: absolute; inset: 0; background: var(--map); font-family: inherit; }

.aerial-flight {
  position: fixed;
  z-index: 850;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.aerial-flight-scene, .aerial-flight-scrim { position: absolute; inset: 0; }
.aerial-flight-scrim { background: var(--aerial-scrim); }
.aerial-flight-scene img {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: none;
  transform-origin: 0 0;
}
.aerial-flight-credit {
  position: absolute;
  inset: auto max(clamp(16px, 5vw, 72px), env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  padding: 4px 8px;
  background: #eef2eaed;
  color: var(--pine);
  font-size: .75rem;
  line-height: 1.35;
}
@media (max-width: 639px) {
  .aerial-flight-credit { inset-inline: clamp(20px, 6vw, 36px) auto; padding-inline: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  [data-aerial-flight] :is(.masthead, .intro) {
    animation: map-entry-appear 720ms 320ms ease-in-out both;
  }
  [data-aerial-flight] :is(.mode-picker, .map-caption, .leaflet-control) {
    animation: map-entry-appear 720ms 620ms ease-in-out both;
  }
  [data-aerial-flight] :is(.map-footer, .map-options, .information) {
    animation: map-entry-appear 720ms 870ms ease-in-out both;
  }
}
@keyframes map-entry-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
#map.leaflet-container { cursor: crosshair; }
#map.leaflet-container.leaflet-grab { cursor: grab; }
.leaflet-dragging #map.leaflet-container { cursor: grabbing; }
.map-caption { position: absolute; z-index: 700; top: 10px; left: 10px; max-width: calc(100% - 20px); padding: 5px 9px; border: 1px solid #8daa9c; border-radius: 6px; background: #f8faf4f2; color: var(--pine); font-weight: 650; pointer-events: none; }
.place-name { color: var(--berry); }
.map-note { position: absolute; z-index: 500; inset: 0; pointer-events: none; overflow: hidden; }
.map-note-line { position: absolute; height: 1px; background: var(--berry); }
.map-note-copy { position: absolute; display: grid; gap: 1px; padding: 6px 8px; min-width: 0; border: 1px solid #b8cbbd; border-radius: 6px; background: #f8faf4f5; line-height: 1.18; overflow-wrap: anywhere; color: var(--ink); }
.map-note-copy strong { font-size: 1rem; color: var(--pine); }
.map-note-copy span { color: var(--berry); font-size: .875rem; font-weight: 650; }
#map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 42px; background: var(--panel); color: var(--pine); border-color: var(--line); }
#map .leaflet-control-zoom a:hover { background: var(--mint); }
#map .leaflet-control-attribution, #map .leaflet-control-scale-line { background: #f8faf4ec; color: var(--ink); font-size: .75rem; }
.leaflet-tooltip.river-label, .leaflet-tooltip.road-label { background: none; border: 0; box-shadow: none; color: #30493f; text-shadow: 0 0 4px var(--panel), 0 0 2px var(--panel); }
.leaflet-tooltip.river-label { font-style: italic; font-size: 1rem; }
.leaflet-tooltip.road-label { font-size: .875rem; font-weight: 650; }
.river-label::before, .road-label::before { display: none; }
.pin-shape, .community-pin-shape { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 4px; transform: rotate(45deg); background: var(--berry); border: 2px solid var(--panel); box-shadow: 0 0 0 1px #862344; color: var(--panel); }
.pin-shape b, .community-pin-shape b { transform: rotate(-45deg); font-size: 1.05rem; line-height: 1; }
.community-pin { display: grid; place-items: center; }
.community-pin-shape { width: 24px; height: 24px; background: #22352d; box-shadow: 0 0 0 1px #22352d; }
#map .leaflet-popup-content-wrapper, #map .leaflet-popup-tip { background: var(--panel); color: var(--ink); }
#map .leaflet-popup-content { font-size: 1rem; line-height: 1.38; margin-right: 46px; }
#map .leaflet-popup-close-button { width: 44px; height: 44px; line-height: 42px; color: var(--pine); }
.split { position: absolute; z-index: 650; inset: 0; pointer-events: none; }
.split-year { position: absolute; top: 45px; padding: 3px 9px; border-radius: 5px; color: var(--panel); background: var(--pine); font-weight: 700; }
.split-year-left { left: 10px; }.split-year-right { right: 10px; }
.split-handle { position: absolute; inset: 0 auto 0 var(--divider, 50%); width: 44px; transform: translateX(-50%); display: grid; place-items: center; pointer-events: auto; cursor: ew-resize; touch-action: none; }
.split-handle::before { content: ""; position: absolute; inset: 0 auto; width: 2px; background: var(--pine); }
.split-handle span { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--pine); border-radius: 7px; background: var(--panel); color: var(--pine); font-weight: 700; }
.map-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 16px; padding: 8px 12px; border-block: 1px solid var(--line); }
.map-key { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .875rem; }
.map-key span { display: inline-flex; align-items: center; gap: 4px; }
.map-key i { width: 11px; height: 11px; border: 1px solid #344b3d85; border-radius: 2px; }
.map-key .scale { width: 70px; height: 7px; background: linear-gradient(90deg,#efebcf,#cadac1,#8eb5a0,#4f8677,#24594d); }
.map-footer button, .year-buttons button, #clear-point, #community-list button { min-height: 44px; padding: 6px 10px; border: 1px solid #819d8d; border-radius: 8px; background: var(--panel); color: var(--pine); }
.year-buttons button[aria-pressed=true] { background: var(--mint); border-color: var(--pine); }
.map-options { padding: clamp(12px, 2.5cqw, 24px); }
.options-head { margin-bottom: 12px; }
.options-head h2 { font-size: clamp(1.35rem, 2.8cqw, 1.9rem); font-weight: 750; line-height: 1.08; letter-spacing: -.034em; color: var(--pine); }
.options-head p { margin-top: 5px; color: var(--muted); }
.options-grid, .report-form { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-items: start; gap: 12px 24px; }
.district-option label, .report-form > div > label { display: block; margin-bottom: 4px; font-weight: 650; }
select, #manual-location, #report-description { width: 100%; min-height: 44px; background: #fbfcf7; padding: 6px 9px; border: 1px solid #81978a; border-radius: 8px; font: inherit; }
.district-note { padding: 8px 12px; border-left: 2px solid #78a592; background: #e8f0e6; border-radius: 0 8px 8px 0; }
.district-note h3 { color: var(--pine); font-size: 1.19rem; }
.district-note p { margin-top: 3px; }
details summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 650; }
#year-readings { display: flex; flex-wrap: wrap; gap: 4px 14px; font-variant-numeric: tabular-nums; }
#year-readings div { display: flex; gap: 4px; }
#year-readings dd { font-weight: 700; }
.year-options { margin-top: 8px; }
.year-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
#year-divider { width: 100%; min-height: 44px; margin: 0; accent-color: var(--pine); cursor: ew-resize; }
.report-form { scroll-margin-top: 12px; }
.location-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 36px; margin: 5px 0 8px; }
.location-row p, .hint { font-size: .875rem; color: var(--muted); }
.hint { margin-top: 4px; }
.category { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; margin: 0 0 10px; padding: 0; border: 0; }
.category legend { font-weight: 700; }
.category legend:focus { scroll-margin-top: 12px; }
.category label { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.category input { accent-color: var(--berry); }
#report-description { display: block; resize: vertical; }
.field-note { color: var(--muted); font-size: .875rem; font-weight: 400; }
.report-photos { margin: 14px 0 16px; min-width: 0; padding: 0; border: 0; }
.report-photos legend { margin-bottom: 4px; padding: 0; font-weight: 650; }
.photo-picker, .photo-remove {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #819d8d;
  border-radius: 8px;
  background: var(--panel);
  color: var(--pine);
  font-weight: 650;
  cursor: pointer;
}
.photo-picker span { font-size: 1.3em; line-height: 1; }
.photo-picker:hover, .photo-remove:hover { background: var(--mint); }
#report-photos:focus-visible + .photo-picker { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--panel); }
.photo-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 160px),1fr)); gap: 8px; margin-top: 8px; padding: 0; list-style: none; }
.photo-list:empty { display: none; }
#photo-status:empty { margin: 0; }
.photo-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-width: 0; padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
.photo-list img { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; }
.photo-name { flex: 1 1 64px; min-width: 0; overflow-wrap: anywhere; font-size: .875rem; }
.photo-remove { justify-content: center; min-width: 44px; margin-inline-start: auto; font-size: .875rem; }
#report-submit:disabled { border-color: var(--line); background: var(--panel); color: var(--muted); cursor: wait; }
.report-form [aria-invalid="true"]:is(input, textarea) { border-color: var(--berry); }
.report-error { margin: 5px 0; color: #852246; font-weight: 650; }
#report-result { display: grid; gap: 4px; max-width: 48ch; margin-top: 8px; padding: 8px 10px; background: #e1f0e5; border: 1px solid #91ae9c; border-radius: 8px; overflow-wrap: anywhere; }
#report-result-description { white-space: pre-wrap; }
#report-result small { color: var(--muted); font-size: .875rem; }
.information { padding: 8px 1px 28px; color: var(--muted); }
.information details { border-bottom: 1px solid var(--line); }
.information details[open] { padding-bottom: 8px; }
.information p { max-width: 67ch; }
.information a { display: inline-flex; align-items: center; min-height: 44px; }
#community-list { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; padding: 6px 0 2px; }
#community-list small { display: block; font-size: .875rem; }
@media (max-width: 639px) {
  .shell { width: calc(100% - 24px); }
  .masthead { min-height: 69px; }.masthead-action { padding-inline: 10px; }
  .brand img { width: 33px; height: 33px; }
}
@container preview (max-width: 639px) {
  .mode-picker { padding: 6px; }
  .mode-track label { flex-direction: column; justify-content: flex-start; text-align: center; gap: 5px; padding: 6px 3px; min-height: 64px; font-size: .875rem; }
  .mode-track small { display: none; }
  .mode-icon { flex-basis: 25px; width: 25px; height: 25px; border-radius: 6px; }
  .map-stage { height: 365px; }
  .map-note { display: none; }
  .options-grid, .report-form { grid-template-columns: minmax(0,1fr); }
  .report-form { --reveal-after-point: 1; }
  .atlas[data-location=marked] .report-form { min-height: calc(100svh - 75px); align-content: start; }
}
@media (prefers-reduced-motion: reduce) { .mode-highlight { transition: none; } }
