:root {
  color-scheme: light;
  --bg: #f7f8f9;
  --text: #172026;
  --muted: #66727c;
  --line: #d8dee3;
  --brand: #16734a;
  --brand-dark: #0d5d3a;
  --danger: #c93636;
  --surface: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(16px, 5vw, 56px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 48px; }
.brand { color: var(--text); font-size: 22px; font-weight: 700; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
.whatsapp-cta {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  background: #25d366;
  color: #082115;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.24);
  font-weight: 750;
}
.whatsapp-cta:hover {
  text-decoration: none;
  background: #1fb85a;
}
.hero, .section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px clamp(16px, 5vw, 24px);
}
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.05; margin: 0 0 16px; }
.section h1 { font-size: 38px; margin: 0 0 10px; }
.section h2 { margin: 0 0 16px; }
.muted, .site-footer { color: var(--muted); }
.city-search {
  max-width: 680px;
  margin-top: 24px;
}
.city-search label {
  display: block;
  margin-bottom: 8px;
  font-weight: 750;
}
.city-search div {
  display: flex;
  gap: 10px;
}
.city-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  min-height: 48px;
  padding: 0 14px;
}
.city-search button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 750;
  padding: 0 16px;
  cursor: pointer;
}
.city-search button {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.button:hover, .city-search button:hover {
  text-decoration: none;
}
.button-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.city-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.city-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}
.city-summary strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}
.city-summary span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.ad-section {
  padding-top: 8px;
  padding-bottom: 8px;
}
.ad-slot {
  display: block;
  min-height: 90px;
  overflow: hidden;
}
.ad-slot-in-content {
  min-height: 120px;
}
.ad-slot-mobile {
  min-height: 60px;
}
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.link-grid a, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.priority-cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 4px 0; color: var(--muted); }
.card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 8px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.card-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.card-actions a:hover {
  text-decoration: none;
  border-color: var(--brand);
}
.directory-section {
  padding-top: 18px;
}
.directory-list {
  columns: 2 300px;
  column-gap: 28px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.directory-list li {
  break-inside: avoid;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.directory-list a {
  display: block;
  font-weight: 650;
}
.directory-list span {
  display: block;
  color: var(--muted);
}
.badge {
  display: inline-block;
  border-radius: 999px;
  background: #e5f4ec;
  color: var(--brand-dark);
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 650;
}
.badge-duty {
  background: #fde8e8;
  color: var(--danger);
}
.breadcrumb { color: var(--muted); margin-bottom: 12px; }
.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
}
.details dt { font-weight: 700; }
.details dd { margin: 0; }
.notice {
  margin-top: 24px;
  background: var(--surface);
  border-left: 4px solid var(--brand);
  padding: 14px 16px;
}
.city-map {
  width: 100%;
  height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8edf0;
}
.map-empty {
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.map-empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}
.map-empty p { margin: 0; }
.map-marker {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  padding: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  cursor: pointer;
}
.map-marker.is-duty {
  width: 22px;
  height: 22px;
  background: #d93636;
}
.map-marker.is-24h {
  box-shadow: 0 0 0 4px rgba(13, 93, 58, 0.2), 0 2px 8px rgba(15, 23, 42, 0.28);
}
.map-user-marker {
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #246bfe;
  box-shadow: 0 0 0 7px rgba(36, 107, 254, 0.18), 0 2px 10px rgba(15, 23, 42, 0.3);
}
.mapboxgl-popup-content p { margin: 4px 0; }
.popup-badge {
  display: inline-block;
  margin: 4px 4px 0 0;
  border-radius: 999px;
  background: #e5f4ec;
  color: #0d5d3a;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
}
@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .city-search div { flex-direction: column; }
  .city-summary { grid-template-columns: 1fr; }
  .quick-actions { flex-direction: column; }
  .quick-actions .button { width: 100%; }
  .ad-slot { min-height: 100px; }
  .details { grid-template-columns: 1fr; }
  .city-map { height: 360px; }
  .whatsapp-cta {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }
}
