:root {
  --forest: #174b34;
  --forest-dark: #103525;
  --paper: #f4f1e8;
  --ink: #17211a;
  --muted: #5a665e;
  --line: #d9dfda;
  --white: #ffffff;
  --low: #2f8f4e;
  --moderate: #2d6fb7;
  --high: #e2b62f;
  --very-high: #df7b24;
  --extreme: #b6372f;
  --unknown: #767f79;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #edf0ec;
  color: var(--ink);
}

.site-header {
  background: linear-gradient(180deg, var(--forest), var(--forest-dark));
  color: white;
  border-bottom: 5px solid #d2a72b;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 5px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.site-header .eyebrow {
  color: #dce9df;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.header-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  padding-bottom: 4px;
  color: #eff7f0;
}

.page-shell {
  max-width: 1180px;
  margin: 28px auto 44px;
  padding: 0 20px;
}

.fire-date-banner,
.map-panel,
.lookup-panel,
.forecast-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 7px 24px rgba(18, 46, 30, .07);
}

.fire-date-banner {
  text-align: center;
  padding: 20px;
  margin-bottom: 22px;
  border-top: 5px solid var(--forest);
}

.fire-date-main {
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  font-weight: 800;
}

.banner-rating {
  font-weight: 900;
  margin-left: 6px;
}

.banner-date {
  color: #37443b;
  font-weight: 500;
  margin-left: 10px;
  white-space: nowrap;
}

.fire-date-sub {
  margin-top: 7px;
  color: var(--muted);
  font-size: 1.02rem;
}

.map-panel,
.lookup-panel,
.forecast-card {
  padding: clamp(20px, 4vw, 34px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: end;
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 8px;
}

.section-kicker {
  color: var(--forest);
}

.section-heading h2,
.forecast-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.section-note {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr);
  gap: 24px;
  align-items: stretch;
}

.map-frame {
  position: relative;
  min-height: 560px;
  background: linear-gradient(180deg, #f7faf7, #eef3ef);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px 16px 44px;
}

.fdra-map-object {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
}

.map-help {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: .86rem;
}

.fdra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}

.fdra-card {
  border: 0;
  min-height: 112px;
  padding: 16px;
  color: white;
  background: var(--unknown);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
  transition: transform .15s ease, box-shadow .15s ease;
}

.fdra-card:hover,
.fdra-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.16), inset 0 0 0 2px rgba(255,255,255,.38);
}

.fdra-card.selected {
  outline: 4px solid #151515;
  outline-offset: 2px;
}

.fdra-label {
  display: block;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .92;
}

.fdra-rating {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.05;
}

.danger-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.12);
}

.legend-item {
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  padding: 11px 6px;
  font-size: .82rem;
}

.low { background: var(--low) !important; color: white !important; }
.moderate { background: var(--moderate) !important; color: white !important; }
.high { background: var(--high) !important; color: #1e1e1e !important; }
.very-high { background: var(--very-high) !important; color: white !important; }
.extreme { background: var(--extreme) !important; color: white !important; }
.not-available,
.not-available-yet { background: var(--unknown) !important; color: white !important; }

.lookup-panel {
  margin-top: 22px;
}

.lookup-help {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.lookup-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lookup-form input {
  flex: 1;
  min-width: 230px;
  padding: 14px 15px;
  border: 1px solid #aeb9b1;
  border-radius: 4px;
  font-size: 1rem;
}

.lookup-form button {
  border: 0;
  border-radius: 4px;
  padding: 14px 22px;
  background: var(--forest);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.lookup-form button:hover,
.lookup-form button:focus-visible {
  background: var(--forest-dark);
}

.lookup-result {
  margin-top: 22px;
}

.lookup-result.loading,
.lookup-result.error {
  padding: 16px;
  background: #f5f6f5;
  border-left: 5px solid var(--forest);
}

.lookup-result.error {
  border-left-color: var(--extreme);
}

.result-card {
  padding: 22px;
  color: white;
  background: var(--unknown);
  border-radius: 4px;
}

.result-place {
  font-size: 1.55rem;
  font-weight: 900;
}

.result-meta {
  margin-top: 4px;
  opacity: .95;
}

.result-rating-label {
  margin-top: 20px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.result-rating {
  margin-top: 2px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
}

.forecast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.forecast-card h2 {
  margin-bottom: 16px;
}

.forecast-copy {
  white-space: pre-line;
  line-height: 1.6;
  color: #2d3831;
}

.source-note {
  margin: 22px 4px 0;
  color: #5c665f;
  font-size: .9rem;
  line-height: 1.5;
}


.data-status-notice {
  margin: -6px 0 22px;
  padding: 14px 16px;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.5;
}

.data-status-notice.stale {
  background: #fff3cd;
  border-left: 5px solid #b98500;
  color: #5d4600;
}

.data-status-notice.unavailable {
  background: #fbe7e5;
  border-left: 5px solid var(--extreme);
  color: #6f211d;
}

.source-disclaimer a,
.footer-about a {
  font-weight: 800;
}

.source-disclaimer a {
  color: var(--forest-dark);
}

.footer-about a {
  color: #ffffff;
}

.source-disclaimer {
  margin: 16px 0 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--forest);
  background: #f4f7f4;
  color: #36443a;
  font-size: .95rem;
  line-height: 1.55;
  border-radius: 6px;
}

.source-disclaimer strong {
  color: var(--forest-dark);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand {
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-about {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.55;
  color: #dce8df;
}

.site-footer {
  background: var(--forest-dark);
  color: #dce8df;
  text-align: center;
  padding: 24px 20px;
  font-size: .9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .header-inner,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-note {
    text-align: left;
  }

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

  .map-frame {
    min-height: 420px;
  }

  .fdra-map-object {
    height: 500px;
  }

  .fdra-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 0 12px;
    margin-top: 16px;
  }

  .header-inner {
    padding: 20px 16px;
  }

  .header-subtitle {
    padding: 0;
  }

  .banner-date {
    display: block;
    margin: 6px 0 0;
  }

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

  .danger-legend {
    grid-template-columns: 1fr;
  }

  .map-frame {
    min-height: 360px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .fdra-map-object {
    height: 410px;
  }

  .lookup-form button,
  .lookup-form input {
    width: 100%;
  }
}
