:root {
  color-scheme: dark;
  --bg: #081120;
  --panel: rgba(12, 25, 48, 0.9);
  --panel-border: rgba(145, 166, 214, 0.18);
  --text: #eef4ff;
  --muted: #a6b5d1;
  --accent: #5b8cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91, 140, 255, 0.25), transparent 32%),
    linear-gradient(180deg, #050b16 0%, #091224 52%, #081120 100%);
  color: var(--text);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(16px);
  background: rgba(5, 11, 22, 0.8);
  border-bottom: 1px solid rgba(145, 166, 214, 0.14);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-nav .nav-link {
  color: var(--muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 999px;
}

.top-nav .nav-link:hover,
.top-nav .nav-link:focus {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.top-nav .nav-link.active {
  color: var(--text);
  background: rgba(91, 140, 255, 0.16);
}

.shell {
  min-height: 100vh;
}

.metric-card,
.panel-card,
.title-bar {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.title-bar {
  padding: 1.4rem 1.6rem;
}

.display-title {
  font-size: clamp(1.45rem, 2.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
}

.page-intro,
.content-copy {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.about-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-cta {
  font-weight: 700;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
}

.about-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.about-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(91, 140, 255, 0.28);
  background: rgba(91, 140, 255, 0.14);
  color: rgba(238, 244, 255, 0.95);
  font-size: 0.82rem;
  font-weight: 600;
}

.about-grid {
  padding: 1.6rem;
  background:
    linear-gradient(90deg, rgba(5, 11, 22, 0.92) 0%, rgba(5, 11, 22, 0.82) 52%, rgba(5, 11, 22, 0.36) 78%, rgba(5, 11, 22, 0.16) 100%),
    url("../images/01_storm_radar_and_risk_map.jpg");
  background-repeat: no-repeat;
  background-size: 100% 100%, auto 100%;
  background-position: left center, right center;
  min-height: 420px;
}

.about-form-wrap {
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(145, 166, 214, 0.18);
  overflow: hidden;
  background: rgba(5, 11, 22, 0.35);
}

.about-form-embed {
  display: block;
  border: 0;
}

.about-form-footer {
  display: flex;
  justify-content: center;
}

.about-form-link {
  color: #d6e5ff;
  text-decoration: none;
  font-weight: 600;
}

.about-form-link:hover,
.about-form-link:focus {
  color: #17d7d1;
  text-decoration: underline;
}

.how-grid {
  position: relative;
  padding: 1.65rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(23, 215, 209, 0.18), transparent 44%),
    linear-gradient(90deg, rgba(6, 19, 37, 0.95) 0%, rgba(9, 28, 53, 0.9) 55%, rgba(6, 19, 37, 0.92) 100%);
}

.how-left {
  position: relative;
}

.how-kicker {
  color: rgba(23, 215, 209, 0.95);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.how-title {
  margin-top: 0.35rem;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 800;
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.how-step-card {
  padding: 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(145, 166, 214, 0.18);
  background: rgba(255, 255, 255, 0.03);
  min-height: 150px;
}

.how-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.how-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: rgba(5, 11, 22, 0.95);
  background: rgba(23, 215, 209, 0.9);
}

.how-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(23, 215, 209, 0.3);
  color: rgba(23, 215, 209, 0.95);
  flex: 0 0 auto;
}

.how-step-icon svg {
  width: 24px;
  height: 24px;
}

.how-step-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.how-step-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.how-step-arrow {
  color: rgba(23, 215, 209, 0.9);
  font-size: 1.9rem;
  line-height: 1;
  margin-top: -0.2rem;
}

.how-right {
  position: relative;
  display: grid;
}

.how-divider {
  position: absolute;
  left: 0;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 1px;
  background: rgba(145, 166, 214, 0.18);
}

.how-right-inner {
  padding-left: 1.25rem;
}

.how-right-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.how-right-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 4.4rem;
}

.how-channels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.95rem;
  margin-top: 0;
}

.how-channel {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  text-align: center;
}

.how-channel-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 215, 209, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(23, 215, 209, 0.95);
}

.how-channel-icon svg {
  width: 28px;
  height: 28px;
}

.how-channel-icon.is-sms {
  border-color: rgba(23, 215, 209, 0.34);
  color: rgba(23, 215, 209, 0.95);
}

.how-channel-icon.is-viber {
  border-color: rgba(124, 93, 255, 0.4);
  color: rgba(161, 139, 255, 0.95);
}

.how-channel-icon.is-messenger {
  border-color: rgba(0, 178, 255, 0.38);
  color: rgba(121, 209, 255, 0.95);
}

.how-channel-icon.is-telegram {
  border-color: rgba(42, 171, 238, 0.4);
  color: rgba(121, 210, 255, 0.95);
}

.how-channel-label {
  font-size: 0.82rem;
  color: rgba(238, 244, 255, 0.92);
  font-weight: 700;
}


.status-label,
.metric-label {
  color: #8aa2d3;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  margin-top: 0.4rem;
  font-size: 1.8rem;
  font-weight: 700;
}

.metric-value span,
.metric-value-sm {
  font-size: 1rem;
  font-weight: 600;
}

.metric-card,
.panel-card {
  padding: 1.5rem;
}

.panel-head {
  margin-bottom: 1.2rem;
}

.panel-head h2 {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.panel-head-inline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.filter-inline {
  min-width: 180px;
}

.form-label {
  color: var(--text);
  font-weight: 600;
}

.panel-head p {
  color: var(--muted);
}

#map {
  min-height: 640px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(91, 140, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(15, 27, 50, 0.58), rgba(7, 18, 34, 0.58));
}

.location-search-control {
  width: min(340px, 76vw);
  padding: 0.65rem;
  border-radius: 18px;
  border: 1px solid rgba(145, 166, 214, 0.18);
  background: rgba(12, 25, 48, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
}

.location-search-control .form-control {
  background: rgba(5, 11, 22, 0.92);
  border-color: rgba(145, 166, 214, 0.22);
  color: var(--text);
}

.location-search-control .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(91, 140, 255, 0.22);
  border-color: rgba(91, 140, 255, 0.55);
}

.location-search-control .btn-primary {
  background: rgba(91, 140, 255, 0.9);
  border-color: rgba(91, 140, 255, 0.9);
  font-weight: 700;
}

.location-search-status {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: rgba(166, 181, 209, 0.95);
}

.location-search-status.is-error {
  color: rgba(255, 152, 152, 0.95);
}

.location-search-status.is-ok {
  color: rgba(117, 232, 176, 0.95);
}

.side-panel-card {
  align-self: flex-start;
}

.side-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.side-scroll::-webkit-scrollbar {
  width: 8px;
}

.side-scroll::-webkit-scrollbar-thumb {
  background: rgba(138, 162, 211, 0.35);
  border-radius: 999px;
}

.side-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.layer-panel {
  display: grid;
  gap: 0.65rem;
}

.layer-group {
  display: grid;
  gap: 0.65rem;
}

.layer-group-collapsible {
  padding: 0;
}

.layer-group-collapsible summary {
  list-style: none;
  cursor: pointer;
}

.layer-group-collapsible summary::-webkit-details-marker {
  display: none;
}

.layer-group + .layer-group {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(173, 194, 241, 0.12);
}

.layer-group-title {
  color: #8aa2d3;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.1rem;
  position: relative;
  padding-right: 1.15rem;
}

.layer-group-collapsible .layer-group-title::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: #8aa2d3;
  font-size: 1rem;
  line-height: 1;
}

.layer-group-collapsible[open] .layer-group-title::after {
  content: "-";
}

.layer-group-collapsible .layer-option {
  margin-top: 0.55rem;
}

.layer-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(173, 194, 241, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.layer-option:hover {
  border-color: rgba(91, 140, 255, 0.38);
  background: rgba(255, 255, 255, 0.05);
}

.layer-option input {
  accent-color: var(--accent);
}

.layer-option span {
  font-size: 0.9rem;
  font-weight: 600;
}

.legend-panel {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(173, 194, 241, 0.12);
}

.legend-title {
  margin-bottom: 0.7rem;
  color: #8aa2d3;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
}

.leaflet-control-layers,
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #0f1b32;
  color: var(--text);
}

.leaflet-control-layers {
  border: 1px solid rgba(173, 194, 241, 0.18);
  border-radius: 14px;
}

.hospital-marker-wrapper {
  background: transparent;
  border: 0;
}

.hospital-marker {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.hospital-marker span {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.hospital-popup h6 {
  margin-bottom: 0.45rem;
}

.school-marker-wrapper {
  background: transparent;
  border: 0;
}

.school-marker {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1e88e5;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.school-marker span {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.school-popup h6 {
  margin-bottom: 0.45rem;
}

.schools-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 0.6rem;
}

.schools-row {
  display: grid;
  gap: 0.25rem;
}

.schools-meta {
  display: grid;
  gap: 0.15rem;
  color: #8aa2d3;
  font-size: 0.82rem;
}

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(173, 194, 241, 0.1);
}

.feature-details {
  min-height: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.detail-grid div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(173, 194, 241, 0.08);
  border-radius: 14px;
  padding: 0.85rem;
}

.detail-grid span {
  display: block;
  color: #8aa2d3;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.detail-grid strong {
  color: var(--text);
  font-size: 0.95rem;
}

.detail-wide {
  grid-column: 1 / -1;
}

.site-footer {
  margin-top: 1rem;
  padding: 1.25rem 0 1.5rem;
  background: linear-gradient(90deg, rgba(10, 31, 54, 0.96), rgba(16, 45, 76, 0.96));
  border-top: 1px solid rgba(145, 166, 214, 0.12);
}

.org-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex: 0 0 auto;
}

.footer-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 90px;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  color: #17d7d1;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.footer-social-icon:hover,
.footer-social-icon:focus {
  color: rgba(23, 215, 209, 0.85);
  text-decoration: none;
}

.footer-text {
  color: rgba(238, 244, 255, 0.88);
  font-size: 0.88rem;
}

.footer-text-center {
  max-width: 760px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #bcd0ef;
  font-size: 0.88rem;
}

.footer-links a {
  color: #d6e5ff;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #17d7d1;
  text-decoration: underline;
}

.footer-credit {
  color: #8aa2d3;
  font-size: 0.85rem;
  font-weight: 600;
}

.org-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 991px) {
  .panel-head-inline {
    flex-direction: column;
  }

  .about-grid {
    padding: 1.35rem;
  }

  .how-grid {
    padding: 1.35rem;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-step-arrow {
    display: none;
  }

  .how-divider {
    display: none;
  }

  .how-right-inner {
    padding-left: 0;
  }

  .how-channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .layer-option span {
    font-size: 0.95rem;
  }

  #map {
    min-height: 420px;
  }

  .side-scroll {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .top-nav .nav-link {
    border-radius: 14px;
  }

  .org-block {
    align-items: flex-start;
  }

  .footer-simple {
    min-height: auto;
    padding: 0.25rem 0;
  }
}
