/* Public map pages: warm paper, clear cartography and quiet controls. */
.atlas-page {
  --paper: #faf8f3;
  --ink: #243a37;
  --muted: #586762;
  --gold: #87613a;
  --gold-light: #e9c798;
  --line: #d7dcd3;
  --blue: #eff1e9;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--gold);
  scrollbar-color: #a5ada0 var(--paper);
}
.atlas-page ::selection { background: #ead8b9; color: var(--ink); }
.atlas-page a { text-underline-offset: 5px; }
.atlas-page :focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.atlas-page .header {
  position: sticky;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  --logo-road: var(--paper);
  --logo-cross: var(--gold);
}
.atlas-page .header nav { gap: 14px; }
.atlas-page .header nav > a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 10px; }
.atlas-page .header nav a:hover { color: var(--gold); }
.atlas-page :is(.header .nav-social, .lang-select, .header-back) { border-color: var(--line); color: var(--ink); }
.atlas-page .header-back:hover { background: var(--blue); }
.atlas-page .lang-select select { color: var(--ink); }
.atlas-page :is(section[id], footer) { scroll-margin-top: 110px; }

.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr);
  gap: 34px 56px;
  align-items: center;
  width: min(1160px, calc(100% - 96px));
  margin: 0 auto;
  padding: 56px 0 32px;
  color: var(--ink);
}
.stage-inner.wrap { grid-column: 1; grid-row: 1; width: 100%; padding: 0; }
.stage-copy { max-width: 30rem; }
.stage h1 { font-size: clamp(2.75rem, 4.5vw, 4.4rem); line-height: 1.1; letter-spacing: -.035em; }
.stage h1 em { color: var(--gold); }
.stage-lead { max-width: 37ch; margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.stage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }
.stage .button { margin: 0; min-height: 48px; gap: 18px; font-size: 14px; border-radius: 7px; }
.atlas-page .button-gold { background: var(--gold-light); color: var(--ink); }
.atlas-page .button-gold:hover { background: #f0d4af; }
.stage-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 500; }
.stage-link:hover { color: var(--gold); }
.stage-map {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 470px;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #e5eadc;
  isolation: isolate;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
}
.stage-map:focus-visible { outline-offset: 4px; }
.map-tile-notice { position: absolute; z-index: 600; left: 12px; right: 12px; bottom: 28px; margin: 0; padding: 10px 12px; background: var(--paper); color: var(--ink); border-radius: 6px; font-size: 12px; line-height: 1.5; }
.map-tile-notice[hidden] { display: none; }
.stage-map .leaflet-control-attribution { margin: 0; padding: 3px 7px; background: #faf8f3ef; color: #48584a; }
.stage-map .leaflet-control-attribution a { color: #42532e; }
.stage-map .leaflet-tooltip {
  border: 0;
  border-radius: 5px;
  padding: 7px 10px;
  background: #faf8f3;
  color: var(--ink);
  box-shadow: 0 3px 12px #243a3724;
  font: 500 12px/1.4 'DM Sans', sans-serif;
}
.stage-map .leaflet-tooltip::before { display: none; }
.sk-map .sk-pin-label { cursor: pointer; font-weight: 600; }
.sk-map .sk-pin-label:hover { background: var(--gold-light); }
.sk-map .sk-marker { border: 3px solid #faf8f3; border-radius: 50%; background: #87613a; box-shadow: 0 2px 6px #243a3759; }
.sk-map .sk-active-district:focus { outline: 2px solid var(--gold); }
.sk-map-fallback { margin: 0; padding: 32px; color: var(--muted); }
.sk-map-fallback[hidden], .stage-tools[hidden], .stage-note[hidden] { display: none; }

.stage-bar.wrap {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.stage-picker { display: grid; gap: 8px; min-width: 0; }
.stage-picker label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stage-bar :is(select, button), .stage-tools button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #b6bfb2;
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.stage-bar select { width: 220px; max-width: 100%; }
.stage-bar :is(select, button):enabled:hover { background: var(--blue); border-color: #78896c; }
.stage-bar :is(select, button):disabled { opacity: .55; cursor: default; }
.stage-bar .button { min-height: 46px; padding: 0 18px; }
.stage-note { display: inline-flex; align-items: center; gap: 7px; align-self: center; color: var(--muted); margin: 0; font-size: 12px; }
.stage-status { flex: 1 1 180px; }
.stage-tools { display: flex; gap: 6px; margin-left: auto; }
.stage-tools button { display: grid; place-items: center; width: 46px; padding: 0; }
.stage-tools .icon { width: 18px; height: 18px; }
.stage-geo [data-sk-reset] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.stage-geo [data-sk-reset] .icon { width: 17px; height: 17px; }
.stage-geo .leaflet-control-zoom.leaflet-bar { display: flex; float: none; margin: 0 0 0 auto; border: 0; box-shadow: none; }
.stage-geo .leaflet-control-zoom.leaflet-bar a { width: 46px !important; height: 46px !important; line-height: 44px !important; border: 1px solid #b6bfb2; background: var(--paper); color: var(--ink) !important; }
.stage-geo .leaflet-control-zoom.leaflet-bar a:first-child { border-radius: 7px 0 0 7px; }
.stage-geo .leaflet-control-zoom.leaflet-bar a:last-child { border-radius: 0 7px 7px 0; border-left: 0; }
.stage-geo .leaflet-control-zoom.leaflet-bar a:hover { background: var(--blue); }
.stage-geo .leaflet-control-zoom.leaflet-bar a.leaflet-disabled { color: var(--muted) !important; }

.atlas-page .section { padding-block: 80px; }
.atlas-page .section-heading { align-items: end; gap: 24px 60px; }
.atlas-page h2 { font-size: clamp(2.2rem, 4vw, 3.35rem); line-height: 1.13; }
.atlas-page h2 em { color: var(--gold); }
.atlas-page .footer { margin-top: 24px; border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .stage { width: calc(100% - 56px); gap: 28px 36px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .stage h1 { font-size: 3.15rem; }
  .stage-status { flex-basis: 100%; order: 2; }
}
@media (max-width: 850px) {
  .stage { grid-template-columns: minmax(0, 1fr); padding-top: 36px; gap: 28px; }
  .stage-inner.wrap { grid-column: 1; grid-row: 1; }
  .stage-copy { max-width: 40rem; }
  .stage h1 { font-size: clamp(2.6rem, 6.5vw, 3.5rem); }
  .stage h1 br { display: none; }
  .stage h1 em::before { content: ' '; }
  .stage-lead { max-width: 58ch; margin-top: 18px; }
  .stage-actions { margin-top: 18px; }
  .stage-map { grid-column: 1; grid-row: 2; height: 380px; }
  .stage-bar.wrap { grid-row: 3; }
}
@media (max-width: 600px) {
  .atlas-page .header { display: grid; justify-items: start; gap: 6px; padding: 12px 20px; }
  .atlas-page .header nav { width: 100%; justify-content: space-between; gap: 4px; }
  .atlas-page .header nav > a { padding: 7px 4px; font-size: 12px; }
  .atlas-page .lang-select { padding: 5px 8px; }
  .atlas-page .lang-select > .icon { display: none; }
  .atlas-page :is(section[id], footer) { scroll-margin-top: 140px; }
  .stage { width: calc(100% - 40px); padding-top: 28px; gap: 24px; }
  .stage h1 { font-size: clamp(2.35rem, 9.5vw, 3rem); }
  .stage-lead { font-size: 16px; }
  .stage-map { height: 340px; border-radius: 12px; }
  .stage-bar.wrap { gap: 12px; padding-top: 20px; }
  .stage-picker { flex: 1 1 calc(100% - 110px); }
  .stage-picker select { width: 100%; }
  .stage-tools { margin-left: 0; }
  .stage-bar > .button { flex: 1 1 100%; justify-content: center; order: 1; }
  .stage-bar > button { flex: 1 1 auto; }
  .stage-bar .stage-status { margin-top: 4px; }
  .stage-geo [data-sk-reset] { flex: 0 0 46px; padding: 0; }
  .stage-geo .reset-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stage-bar .leaflet-control-zoom { margin-left: auto; }
  .stage[data-start-zoomed] [data-sk-reset] { flex: 1 1 auto; padding-inline: 12px; }
  .stage[data-start-zoomed] .stage-link { flex: 1 1 100%; }
  .atlas-page .section { padding-block: 52px; }
  .atlas-page .section-heading { gap: 18px; }
  .atlas-page .section-heading > p { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-page *, .atlas-page *::before, .atlas-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
