:root {
  --navy: #0B1F33;
  --ocean: #1A4B73;
  --sea: #2A6F9E;
  --sand: #F4F7FA;
  --white: #FFFFFF;
  --ink: #12202C;
  --muted: #5B6B78;
  --alert: #E8A317;
  --alert-soft: #F8E7C0;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(11, 31, 51, 0.12);
  --font: "Source Sans 3", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #e8eef4 0%, var(--sand) 40%, #fff 100%);
  padding-bottom: 4.5rem;
}
a { color: var(--ocean); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1080px, calc(100% - 1.5rem)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky; top: 0; z-index: 30;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 0;
}
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand-mark {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7eb7e0, var(--ocean) 55%, var(--navy));
  border: 2px solid var(--alert);
  flex: 0 0 auto;
}
.brand strong { display: block; font-size: 1.15rem; letter-spacing: .04em; }
.brand small { display: block; font-size: .72rem; color: #c5d4e0; font-weight: 400; max-width: 16rem; }
.site-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-nav a { color: #dce7f0; font-weight: 600; font-size: .92rem; }
.banner-edu {
  margin: 0; padding: .45rem 1rem; text-align: center;
  background: var(--alert-soft); color: var(--navy); font-size: .85rem; font-weight: 600;
}

.hero { padding: 1.6rem 0 1rem; }
.hero h1 {
  font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: .25rem 0 1rem; color: var(--navy);
}
.kicker { color: var(--ocean); font-weight: 600; margin: 0 0 .35rem; }
.search-form { display: flex; gap: .5rem; }
.search-form input {
  flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid #c5d0da;
  padding: .7rem 1rem; font: inherit;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1rem; border-radius: 12px;
  border: 1px solid var(--ocean); background: #fff; color: var(--ocean);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.hint, .map-legend, .source { color: var(--muted); font-size: .9rem; }
.edu-label {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ocean); margin: 0 0 .5rem;
}
.quick-places { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.chip {
  border: 1px solid #c5d0da; background: #fff; border-radius: 999px;
  padding: .4rem .8rem; font: inherit; cursor: pointer;
}
.chip:hover { border-color: var(--ocean); color: var(--ocean); }

.map-section { margin: 1.5rem 0 2rem; }
.map {
  height: min(136vh, 1120px); min-height: 640px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid #d5dee6;
}
.map-page { height: 760px; margin: 1rem 0; }
.layer-legend { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .8rem; }
.layer-legend span {
  font-size: .78rem; padding: .25rem .55rem; border-radius: 999px;
  background: #e6edf3; color: var(--muted);
}
.layer-legend .on { background: var(--ocean); color: #fff; }

.cards-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.card {
  background: #fff; border-radius: var(--radius); padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow); border: 1px solid #e3eaef;
}
.conditions { border-left: 4px solid var(--alert); margin: 1.2rem 0; }
.alerts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem; margin: 1.2rem 0 2rem;
}
.alert-chip {
  background: var(--navy); color: #fff; border-radius: 10px;
  padding: .7rem .8rem; font-size: .82rem; font-weight: 700; text-align: center;
}
.page { padding: 1.4rem 0 2rem; }
.page h1 { font-family: var(--display); color: var(--navy); }
.callout {
  background: var(--alert-soft); border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0;
}
.table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1rem 0; }
.table th, .table td { border-bottom: 1px solid #e3eaef; padding: .55rem .4rem; text-align: left; }
.lead { font-size: 1.15rem; }

.site-footer {
  background: var(--navy); color: #d5e0ea; padding: 1.4rem 0 5.5rem; margin-top: 2rem;
}
.disclaimer { font-size: .88rem; line-height: 1.5; }
.footer-norm { font-size: .82rem; color: var(--alert); }

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: var(--navy); border-top: 1px solid #1e3a52;
}
.mobile-bar a {
  flex: 1; text-align: center; color: #fff; padding: .7rem .2rem;
  font-size: .78rem; font-weight: 600; text-decoration: none;
}

.leaflet-container { cursor: crosshair; }
.leaflet-interactive { cursor: pointer; }
.leaflet-popup-content { font-family: var(--font); overflow: auto; }
.popup-title { font-weight: 700; color: var(--navy); margin: 0 0 .2rem; }
.measure-popup { margin-top: .75rem; padding-top: .7rem; border-top: 1px solid #e3eaef; }
.measure-dist { font-size: 1.05rem; line-height: 1.45; margin: .45rem 0; }
.measure-warn { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.map-actions { margin: .65rem 0 0; }

@media (min-width: 800px) {
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
  .site-footer { padding-bottom: 1.6rem; }
}
@media (max-width: 799px) {
  .cards-areas { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .search-form { flex-direction: column; }
  .brand small { max-width: none; }
}
