:root {
  --fall-red: #8c3032;
  --fall-red-dark: #3d1518;
  --fall-orange: #d45c17;
  --fall-gold: #f6c85f;
  --fall-green: #4f7f3f;
  --paper: #fffaf3;
  --cream: #f6efe4;
  --line: #e6dccf;
  --ink: #221a15;
  --muted: #6d625b;
}

main {
  color: var(--ink);
}

.forecast-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 1rem;
  min-height: 530px;
  width: 96vw;
  margin: 0 auto 2rem;
  padding: 4rem 4rem 1rem 4rem;
  box-sizing: border-box;
  background-image:
    linear-gradient(90deg, rgba(25, 14, 10, 0.82), rgba(25, 14, 10, 0.38)),
    url("../images/Public/DJI_0209-Edit.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  overflow: hidden;
}

.forecast-hero-copy {
  max-width: 760px;
  color: white;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--fall-gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.98;
}

.hero-summary {
  max-width: 670px;
  margin: 1.25rem 0 2rem;
  font-size: 1.2rem;
  line-height: 1.65;
}

.location-search {
  max-width: 520px;
}

.location-search label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 800;
}

.location-search-row {
  position: relative;
  display: flex;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.location-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 1rem;
  font-family: inherit;
  font-size: 1rem;
}

.location-search button {
  border: 0;
  padding: 0 1.3rem;
  background: var(--fall-red);
  color: white;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.autocomplete-container {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(25, 14, 10, 0.24);
  color: var(--ink);
  z-index: 20;
}

.location-search .autocomplete-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1rem;
  background: white;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.location-search .autocomplete-item:last-child {
  border-bottom: 0;
}

.location-search .autocomplete-item:hover,
.location-search .autocomplete-item:focus {
  background: var(--cream);
  outline: none;
}

#search-note {
  margin: 0.65rem 0 0;
  min-height: 1.2em;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.forecast-disclaimer {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  line-height: 1.45;
}

.forecast-hero-panel {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.forecast-hero-panel div {
  padding: 1.35rem;
  background: rgba(255, 250, 243, 0.92);
}

.metric-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-hero-panel strong {
  display: block;
  color: var(--fall-red-dark);
  font-size: 2rem;
  line-height: 1;
}

.forecast-grid,
.content-layout {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.insight-card,
.section-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(45, 28, 17, 0.08);
}

.insight-card {
  padding: 1.5rem;
}

.insight-card h2 {
  margin: 0 0 0.8rem;
  color: var(--fall-red-dark);
  font-size: 1.65rem;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.primary-stat {
  background: var(--fall-red-dark);
}

.primary-stat .metric-label,
.primary-stat p {
  color: rgba(255, 255, 255, 0.75);
}

.primary-stat h2 {
  color: white;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  margin-bottom: 2rem;
}

.main-column,
.side-column {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.section-panel {
  padding: 1.5rem;
}

.section-heading h2 {
  margin: 0 0 1rem;
  font-size: 1.65rem;
}

.trend-chart-wrap {
  min-height: 0;
  line-height: 0;
}

#progression-chart {
  display: block;
  width: 100%;
  height: 310px;
}

.axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-grid-line {
  stroke: rgba(109, 98, 91, 0.2);
  stroke-width: 1;
}

.progression-stage-bar {
  opacity: 0.88;
}

.peak-reference-line {
  stroke: var(--fall-red-dark);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  opacity: 0.65;
}

.axis-tick {
  stroke: var(--muted);
  stroke-width: 1;
}

#forecast-explanation {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.timing-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.timing-bars.area-summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.area-summary-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--fall-orange);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.area-summary-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--fall-red-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.area-summary-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.area-summary-card:nth-child(2) {
  border-top-color: var(--fall-red);
}

.area-summary-card:nth-child(3) {
  border-top-color: var(--fall-green);
}

.timing-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--fall-green);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.timing-bar-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timing-card.forecast {
  border-top-color: var(--fall-orange);
}

.timing-card.window {
  border-top-color: var(--fall-red);
}

.timing-date {
  color: var(--fall-red-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.timing-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.map-panel {
  overflow: hidden;
}

.map-caption {
  margin: -0.55rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

#forecast-map {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  background: var(--cream);
}

.inset-map-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 0.7rem;
  align-items: center;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.inset-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.inset-map-legend i {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  border: 1px solid rgba(45, 28, 17, 0.2);
}

.legend-september {
  background: #2a3a55;
}

.legend-early-oct {
  background: #306341;
}

.legend-mid-oct {
  background: #4b915c;
}

.legend-late-oct {
  background: #95b36c;
}

.legend-early-nov {
  background: #e2ce76;
}

.legend-mid-nov {
  background: #ba8c49;
}

.legend-late-nov {
  background: #825533;
}

.legend-december {
  background: #e6e6e6;
}
.nearby-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nearby-list li {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.nearby-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.nearby-list .nearby-verification {
  padding-top: 0.15rem;
}

.nearby-list .nearby-verification .nearby-note {
  font-size: 0.82rem;
  font-style: italic;
}

.nearby-place {
  display: block;
  color: var(--fall-red-dark);
  font-weight: 900;
}

.nearby-note {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  line-height: 1.45;
}

.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 screen and (max-width: 1024px) {
  .forecast-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2rem;
  }

  .forecast-hero h1 {
    font-size: 2.8rem;
  }

  .forecast-grid,
  .content-layout {
    width: 92vw;
    grid-template-columns: 1fr;
  }

  .content-layout {
    margin-bottom: 1rem;
  }

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

  .timing-bars {
    grid-template-columns: 1fr;
  }

  .timing-bars.area-summary-list {
    grid-template-columns: 1fr;
  }

  .map-panel {
    order: 2;
  }

  .side-column section:not(.map-panel) {
    order: 1;
  }
}

@media screen and (max-width: 640px) {
  .forecast-hero {
    width: 92vw;
    padding: 1.4rem;
  }

  .forecast-hero h1 {
    font-size: 2.15rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .location-search-row {
    display: grid;
  }

  .location-search button {
    padding: 0.9rem 1rem;
  }

  .trend-chart-wrap {
    min-height: 0;
  }

  #progression-chart {
    height: 240px;
  }

  .forecast-hero-panel strong {
    font-size: 1.6rem;
  }
}
