:root {
  --brand: #007bc7;
  --brand-dark: #004f85;
  --brand-soft: #dff1fb;
  --brand-pale: #f0f8fc;
  --ink: #101820;
  --muted: #506070;
  --line: #d6e3ec;
  --panel: #e7f4fb;
  --white: #fff;
  --green: #59bd75;
  --green-dark: #14733d;
  --yellow: #ffe27a;
  --yellow-dark: #8a6400;
  --orange: #ffad5c;
  --orange-dark: #8c4500;
  --red: #ff7177;
  --red-dark: #9d1e28;
  --shadow: 0 16px 32px rgba(16, 24, 32, 0.12);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-size: 18px;
  line-height: 1.5;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1760px, calc(100% - 64px));
  margin: 0 auto;
}

.narrow {
  max-width: 980px;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 10px 14px;
  background: var(--white);
  border: 2px solid var(--brand-dark);
}

.skip-link:focus {
  transform: translateY(0);
}

.top-strip {
  height: 6px;
  background: var(--brand-soft);
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand-row {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 15px;
}

.brand-mark {
  width: 42px;
  height: 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 6px;
  background: var(--brand);
}

.brand-mark span {
  background: var(--white);
}

.brand-mark span:nth-child(2) {
  opacity: 0.75;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.site-nav {
  background: var(--brand);
  color: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
}

.nav-links a {
  display: block;
  padding: 15px 18px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active {
  background: var(--brand-dark);
}

.hero {
  background: linear-gradient(180deg, var(--brand-pale), var(--white));
}

.hero-map {
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 48px;
  padding: 60px 0;
}

.hero-copy p {
  max-width: 900px;
  font-size: 22px;
}

.sub-hero {
  padding: 58px 0 54px;
  background: var(--brand-pale);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1050px;
  margin-bottom: 18px;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  color: var(--brand-dark);
  font-size: 32px;
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 25px;
  line-height: 1.2;
}

.hero-card,
.panel,
.advice-panel,
.map-tools {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-card {
  padding: 30px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin-top: 18px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
  color: var(--white);
}

.button.primary:hover,
.button.primary:focus {
  background: var(--brand-dark);
}

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

.hero-actions,
.advice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.status-badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.status-green,
.pill-green {
  background: var(--green);
}

.status-yellow,
.pill-yellow {
  background: var(--yellow);
}

.status-orange,
.pill-orange {
  background: var(--orange);
}

.status-red,
.pill-red {
  background: var(--red);
}

.mini-metrics,
.metrics-grid {
  margin: 18px 0 0;
}

.mini-metrics div,
.metrics-grid div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
}

.map-section {
  padding: 48px 0;
}

.map-layout {
  display: grid;
  gap: 20px;
}

.map-tools {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(440px, 1fr);
  gap: 28px;
  align-items: end;
  padding: 24px;
}

.search-panel label,
.report-form label,
.region-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8d6e0;
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.icon-button {
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.quick-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-locations button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 8px 12px;
  color: var(--brand-dark);
  cursor: pointer;
}

.map-main {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) 430px;
  gap: 22px;
  align-items: stretch;
}

.map-wrap {
  min-width: 0;
}

.interactive-map {
  width: 100%;
  min-height: 660px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #d4e8f4;
}

.interactive-map.map-ready .fallback-map {
  display: none;
}

.leaflet-container {
  font: inherit;
}

.fallback-map {
  display: grid;
  place-items: stretch;
  min-height: 660px;
  background: #d4e8f4;
}

.fallback-map svg {
  width: 100%;
  height: 620px;
  display: block;
}

.fallback-map p {
  margin: 0;
  padding: 12px 16px;
  background: var(--white);
  color: var(--muted);
}

.sea {
  fill: #c7d1d8;
}

.land {
  fill: #f9faf6;
  stroke: #b5c0c7;
  stroke-width: 2;
}

.zone-red {
  fill: var(--red);
  opacity: 0.86;
  cursor: pointer;
}

.zone-orange {
  fill: var(--orange);
  opacity: 0.82;
  cursor: pointer;
}

.zone-yellow {
  fill: var(--yellow);
  opacity: 0.82;
  cursor: pointer;
}

.zone-green {
  fill: var(--green);
  opacity: 0.82;
  cursor: pointer;
}

.fallback-labels text {
  fill: rgba(16, 24, 32, 0.62);
  font-size: 16px;
}

.fallback-pin path {
  fill: var(--brand);
}

.fallback-pin circle {
  fill: var(--white);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-size: 15px;
}

.map-legend i {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-block;
}

.legend-green {
  background: var(--green);
}

.legend-yellow {
  background: var(--yellow);
}

.legend-orange {
  background: var(--orange);
}

.legend-red {
  background: var(--red);
}

.advice-panel {
  padding: 26px;
}

.advice-result {
  margin: 16px 0;
  padding: 22px;
  border-left: 8px solid var(--yellow);
  background: var(--white);
  border-radius: 6px;
}

.advice-detail,
.data-source {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.advice-result.green {
  border-left-color: var(--green);
}

.advice-result.yellow {
  border-left-color: var(--yellow);
}

.advice-result.orange {
  border-left-color: var(--orange);
}

.advice-result.red {
  border-left-color: var(--red);
}

.forecast-section,
.content-section {
  padding: 46px 0;
}

.pale,
.feature-band {
  background: var(--brand-pale);
}

.split-layout,
.two-column,
.form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.panel {
  padding: 28px;
}

.compact-panel {
  min-height: 100%;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
}

.check-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 30px;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.feature-band {
  padding: 48px 0;
}

.feature-grid,
.info-grid,
.process-grid,
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-grid article,
.process-grid article,
.region-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.feature-grid h2,
.process-grid h2,
.region-card h2 {
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
}

.site-footer {
  padding: 48px 0;
  background: #005ea8;
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 21px;
  font-weight: 700;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
  text-decoration-thickness: 1px;
}

.footer-note {
  margin: 0;
}

.footer-brand {
  display: grid;
  gap: 10px;
}

.footer-brand strong {
  font-size: 24px;
}

.footer-small {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.code-list {
  display: grid;
  gap: 16px;
}

.code-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.code-list p {
  margin: 0;
}

.explain-list {
  margin: 0;
}

.explain-list div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.warning-list {
  display: grid;
  gap: 10px;
}

.warning-list p {
  margin: 0;
  padding: 14px 16px;
  border-left: 5px solid var(--orange);
  background: var(--white);
}

.article-flow {
  max-width: 980px;
}

.callout {
  margin-top: 24px;
  padding: 20px;
  border-left: 6px solid var(--brand);
  background: var(--brand-pale);
  border-radius: 6px;
}

.faq-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.faq-index {
  position: sticky;
  top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brand-pale);
}

.faq-index h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.faq-index a {
  display: block;
  padding: 8px 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.faq-list h2 {
  margin-top: 28px;
  font-weight: 700;
  color: var(--ink);
}

.faq-list h2:first-child {
  margin-top: 0;
}

details {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

summary {
  padding: 18px 20px;
  color: var(--brand-dark);
  font-weight: 700;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 20px 20px;
}

.report-form {
  display: grid;
  gap: 18px;
}

.form-message {
  min-height: 28px;
  margin: 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
}

.region-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.region-toolbar label {
  max-width: 280px;
}

.region-status {
  min-width: 260px;
}

.region-status strong {
  display: block;
}

.loading-text {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brand-pale);
  color: var(--muted);
}

.region-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.region-card a {
  color: var(--brand-dark);
  font-weight: 700;
}

.region-card.is-hidden {
  display: none;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.leaflet-popup-content {
  min-width: 220px;
}

.popup-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .hero-grid,
  .map-main,
  .map-tools,
  .split-layout,
  .two-column,
  .form-layout,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .map-main {
    gap: 16px;
  }

  .faq-index {
    position: static;
  }
}

@media (max-width: 900px) {
  .feature-grid,
  .info-grid,
  .process-grid,
  .region-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .region-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .container {
    width: min(100% - 28px, 1760px);
  }

  .brand-row {
    min-height: 74px;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand small {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links a {
    padding: 14px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 27px;
  }

  .hero-grid,
  .sub-hero {
    padding-top: 36px;
    padding-bottom: 38px;
  }

  .hero-copy p {
    font-size: 18px;
  }

  .map-section,
  .forecast-section,
  .content-section,
  .feature-band {
    padding: 30px 0;
  }

  .map-tools,
  .panel,
  .advice-panel,
  .hero-card {
    padding: 20px;
  }

  .interactive-map,
  .fallback-map {
    min-height: 480px;
  }

  .fallback-map svg {
    height: 430px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    min-height: 44px;
  }

  .code-list div {
    grid-template-columns: 1fr;
  }
}
