.forecast-chart {
  margin-top: 28px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #eef8fe 0%, #f8fcff 100%);
  border: 1px solid #c7e2f1;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(5,64,114,.08);
}
.forecast-chart__toggle {
  display: none;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  color: #075f9f;
  background: #fff;
  border: 1px solid #a9d4eb;
  border-radius: 14px;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(5,64,114,.08);
}
.forecast-chart__toggle-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: transform .18s ease;
}
.forecast-chart.is-open .forecast-chart__toggle-icon { transform: rotate(180deg); }
.forecast-chart__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.forecast-chart__heading h2 {
  margin: 3px 0 0;
  color: var(--blue-950);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: -.025em;
}
.forecast-chart__availability {
  max-width: 360px;
  margin: 0;
  color: #617987;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}
.forecast-chart__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
  padding: 4px;
  background: #dceef8;
  border: 1px solid #c6dfed;
  border-radius: 14px;
}
.forecast-chart__tab {
  min-height: 38px;
  padding: 0 15px;
  color: #355f76;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}
.forecast-chart__tab:hover { background: rgba(255,255,255,.65); }
.forecast-chart__tab.is-active {
  color: #075f9f;
  background: #fff;
  box-shadow: 0 3px 10px rgba(5,64,114,.10);
}
.forecast-chart__tab:focus-visible,
.forecast-chart__toggle:focus-visible,
.forecast-chart__collapse:focus-visible {
  outline: 3px solid rgba(8,121,217,.28);
  outline-offset: 2px;
}
.forecast-chart__panel {
  margin-top: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d3e6f0;
  border-radius: 18px;
}
.forecast-chart__scroller {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #9fc7dc #eef7fb;
}
.forecast-chart__canvas {
  position: relative;
  min-width: 100%;
}
.forecast-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
  overflow: visible;
  font-family: inherit;
}
.forecast-chart__grid-line {
  stroke: #dbeaf2;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.forecast-chart__axis-line {
  stroke: #aac8d9;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.forecast-chart__day-line {
  stroke: #9ec8dd;
  stroke-width: 1;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}
.forecast-chart__axis-label {
  fill: #6b8290;
  font-size: 11px;
  font-weight: 700;
}
.forecast-chart__day-label {
  fill: #345d73;
  font-size: 11px;
  font-weight: 900;
}
.forecast-chart__line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.forecast-chart__line--temperature { stroke: #e15c45; }
.forecast-chart__line--apparent { stroke: #7b6fc2; }
.forecast-chart__line--probability { stroke: #0879d9; }
.forecast-chart__line--wind { stroke: #23877d; }
.forecast-chart__line--gust { stroke: #174f6a; }
.forecast-chart__point {
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.forecast-chart__point--temperature { fill: #e15c45; }
.forecast-chart__point--apparent { fill: #7b6fc2; }
.forecast-chart__point--probability { fill: #0879d9; }
.forecast-chart__point--wind { fill: #23877d; }
.forecast-chart__point--gust { fill: #174f6a; }
.forecast-chart__bar { fill: rgba(8,121,217,.28); }
.forecast-chart__bar--trace { fill: rgba(8,121,217,.14); }
.forecast-chart__hit {
  fill: transparent;
  cursor: crosshair;
  outline: none;
}
.forecast-chart__hit:focus {
  fill: rgba(8,121,217,.06);
  stroke: rgba(8,121,217,.36);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.forecast-chart__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 11px 14px 0;
  color: #48697c;
  font-size: .76rem;
  font-weight: 800;
}
.forecast-chart__legend-item { display: inline-flex; align-items: center; gap: 7px; }
.forecast-chart__legend-swatch {
  width: 22px;
  height: 3px;
  border-radius: 999px;
}
.forecast-chart__legend-swatch--temperature { background: #e15c45; }
.forecast-chart__legend-swatch--apparent { background: #7b6fc2; }
.forecast-chart__legend-swatch--precipitation { height: 9px; background: rgba(8,121,217,.28); border: 1px solid rgba(8,121,217,.35); }
.forecast-chart__legend-swatch--probability { background: #0879d9; }
.forecast-chart__legend-swatch--wind { background: #23877d; }
.forecast-chart__legend-swatch--gust { background: #174f6a; }
.forecast-chart__tooltip {
  position: absolute;
  z-index: 5;
  top: 18px;
  min-width: 170px;
  max-width: 230px;
  padding: 10px 12px;
  color: #173f57;
  background: rgba(255,255,255,.98);
  border: 1px solid #bfdceb;
  border-radius: 12px;
  box-shadow: 0 9px 24px rgba(5,64,114,.16);
  pointer-events: none;
  transform: translateX(-50%);
}
.forecast-chart__tooltip strong { display: block; margin-bottom: 5px; color: #0b557d; font-size: .8rem; }
.forecast-chart__tooltip span { display: block; margin-top: 2px; font-size: .76rem; line-height: 1.4; }
.forecast-chart__loading,
.forecast-chart__empty {
  display: flex;
  min-height: 270px;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #617987;
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
}
.forecast-chart__note {
  margin: 12px 2px 0;
  color: #657f8d;
  font-size: .76rem;
  line-height: 1.55;
}
.forecast-chart__collapse {
  display: none;
  margin: 16px auto 0;
  min-height: 42px;
  padding: 0 16px;
  color: #075f9f;
  background: #fff;
  border: 1px solid #b8d9ea;
  border-radius: 12px;
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 620px) {
  .forecast-chart {
    margin-top: 24px;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .forecast-chart__toggle { display: flex; }
  .forecast-chart__content {
    display: none;
    margin-top: 12px;
    padding: 16px 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #eef8fe 0%, #f8fcff 100%);
    border: 1px solid #c7e2f1;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(5,64,114,.07);
  }
  .forecast-chart.is-open .forecast-chart__content { display: block; }
  .forecast-chart.is-open .forecast-chart__collapse { display: inline-flex; align-items: center; justify-content: center; }
  .forecast-chart__heading { display: block; }
  .forecast-chart__heading h2 { font-size: 1.15rem; }
  .forecast-chart__availability { max-width: none; margin-top: 6px; font-size: .73rem; text-align: left; }
  .forecast-chart__tabs { display: flex; width: 100%; margin-top: 14px; }
  .forecast-chart__tab { flex: 1 1 0; min-width: 0; padding: 0 8px; font-size: .75rem; }
  .forecast-chart__panel { border-radius: 15px; }
  .forecast-chart__svg { min-height: 280px; }
  .forecast-chart__legend { gap: 8px 12px; padding: 10px 10px 0; font-size: .72rem; }
  .forecast-chart__note { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .forecast-chart__toggle-icon { transition: none; }
}
