:root {
  color-scheme: light;
  --ink: #182323;
  --muted: #5d6b6b;
  --line: #d9e2df;
  --paper: #ffffff;
  --soft: #eef5f1;
  --accent: #155e63;
  --accent-strong: #0d4449;
  --gold: #c58b2c;
  --danger: #9b1c1c;
  --shadow: 0 18px 40px rgba(11, 40, 43, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fbf9;
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: var(--accent-strong);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.85rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

nav,
.content,
.hero-inner,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.site-menu a {
  text-decoration: none;
  font-weight: 750;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.site-menu a {
  border-radius: 7px;
  color: #263737;
  padding: 0.55rem 0.7rem;
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  background: var(--soft);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  font-weight: 750;
}

.hero {
  background: linear-gradient(180deg, #edf6f2 0%, #ffffff 72%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 2rem;
  align-items: center;
  padding: 54px 0 26px;
}

.eyebrow {
  color: var(--gold);
  font-weight: 850;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.4rem, 10vw, 4.8rem);
  max-width: 9ch;
}

h2 {
  font-size: clamp(1.65rem, 5vw, 2.4rem);
}

h3 {
  font-size: 1.15rem;
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 68ch;
}

.actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 0.7rem 1rem;
  text-decoration: none;
  font-weight: 800;
}

.button.secondary {
  border-color: var(--line);
  background: white;
  color: var(--accent-strong);
}

.map-preview {
  display: block;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(197, 139, 44, 0.28), transparent 24%),
    linear-gradient(145deg, rgba(21, 94, 99, 0.2), rgba(255, 255, 255, 0.1)),
    #dfece7;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.map-preview svg {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
}

.preview-fallback {
  position: absolute;
  inset: 42px;
  border: 4px solid rgba(21, 94, 99, 0.85);
  background:
    linear-gradient(110deg, transparent 0 31%, rgba(21, 94, 99, 0.65) 31% 33%, transparent 33% 100%),
    linear-gradient(18deg, transparent 0 48%, rgba(21, 94, 99, 0.55) 48% 50%, transparent 50% 100%),
    linear-gradient(160deg, transparent 0 57%, rgba(21, 94, 99, 0.45) 57% 59%, transparent 59% 100%),
    #d9ebe4;
  clip-path: polygon(13% 5%, 44% 0, 64% 14%, 91% 8%, 98% 45%, 78% 92%, 55% 82%, 27% 98%, 5% 65%);
}

.preview-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.65rem 0.8rem;
  font-weight: 800;
}

.preview-zone {
  stroke: rgba(21, 94, 99, 0.92);
  stroke-width: 5;
  stroke-linejoin: round;
}

.preview-zone-a {
  fill: #d9ebe4;
}

.preview-zone-b,
.preview-zone-e {
  fill: #b9d9d1;
}

.preview-zone-c {
  fill: #ead7a9;
}

.preview-zone-d,
.preview-zone-f {
  fill: #cfe5df;
}

.preview-route {
  fill: none;
  stroke: rgba(24, 35, 35, 0.55);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 14 16;
}

.preview-pin {
  fill: var(--gold);
  stroke: white;
  stroke-width: 6;
}

.content {
  padding: 34px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card,
.info-panel,
.ad-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.card {
  padding: 1rem;
}

.map-layout {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
}

.map-toolbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.map-shell {
  min-height: 72vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #d7e8e4;
}

#ward-map {
  height: 72vh;
  min-height: 520px;
}

.info-panel {
  padding: 1rem;
  align-self: start;
  position: sticky;
  top: 84px;
}

.facts {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.fact {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 0.15rem;
}

.disclaimer {
  border-left: 4px solid var(--gold);
  background: #fff8eb;
  padding: 0.85rem 1rem;
}

.ad-slot {
  margin: 1.25rem 0;
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: repeating-linear-gradient(-45deg, #ffffff, #ffffff 10px, #f3f6f5 10px, #f3f6f5 20px);
  font-size: 0.88rem;
  text-align: center;
  padding: 1rem;
}

.ad-slot[data-enabled="true"] {
  background: white;
}

.source-list {
  display: grid;
  gap: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.25rem 0 2rem;
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0.15rem 0;
}

.leaflet-container {
  font: inherit;
}

@media (max-width: 880px) {
  .menu-button {
    display: inline-flex;
  }

  .site-menu {
    display: none;
    position: absolute;
    inset: 68px 16px auto;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
    padding: 0.5rem;
  }

  .site-menu.open {
    display: flex;
  }

  .hero-inner,
  .grid,
  .map-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
  }

  .map-toolbar {
    align-items: start;
    flex-direction: column;
  }

  #ward-map,
  .map-shell {
    min-height: 58vh;
    height: 58vh;
  }

  .info-panel {
    position: static;
  }
}
