
.weather-history-search-field,
.weather-history-search-stack {
  position: relative;
}

.weather-history-search-stack .weather-suggestions-pro {
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
}

.weather-history-form,
.weather-history-form .weather-search-grid,
.weather-history-search-field {
  overflow: visible;
}

.weather-history-hero .weather-history-shell,
.weather-history-hero .weather-history-aside {
  min-height: 100%;
}

.weather-history-form {
  margin-top: 1.35rem;
}

.weather-history-grid {
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(180px, 0.8fr)) minmax(0, 1.2fr);
  align-items: end;
}

.weather-history-submit-wrap {
  display: grid;
  gap: 0.85rem;
}

.weather-history-submit {
  width: 100%;
  justify-content: center;
}

.weather-history-presets {
  flex-wrap: wrap;
}

.weather-history-chip {
  background: rgba(14, 165, 233, 0.1);
  color: #0f4c81;
}

.weather-history-overview-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
}

.weather-history-headline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.weather-history-narratives-section {
  margin-top: 1.5rem;
}

.weather-history-narratives-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.weather-history-story-card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.84);
  padding: 1rem 1.1rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.weather-history-story-card p {
  margin: 0;
  color: rgba(30, 41, 59, 0.88);
}

.weather-history-highlights-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weather-history-hourly-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.weather-history-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.weather-history-chart-card {
  overflow: hidden;
}

.weather-history-chart-wrap {
  position: relative;
  min-height: 360px;
}

.weather-history-chart-inner {
  position: relative;
  min-height: 330px;
}

.weather-history-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.weather-history-grid-line {
  stroke: rgba(148, 163, 184, 0.26);
  stroke-width: 1;
}

.weather-history-axis-text {
  fill: rgba(71, 85, 105, 0.8);
  font-size: 11px;
  font-weight: 600;
}

.weather-history-axis-caption {
  fill: rgba(15, 23, 42, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.weather-history-area {
  fill: url(#weatherHistoryTempArea);
}

.weather-history-line {
  fill: none;
  stroke: #0ea5e9;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-history-band-line {
  fill: none;
  stroke: rgba(249, 115, 22, 0.35);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}

.weather-history-band-line-min {
  stroke: rgba(59, 130, 246, 0.35);
}

.weather-history-point {
  fill: #ffffff;
  stroke: #0ea5e9;
  stroke-width: 2;
}

.weather-history-bar {
  fill: rgba(14, 165, 233, 0.72);
}

.weather-history-snow-line {
  fill: none;
  stroke: #6366f1;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-history-snow-point {
  fill: #6366f1;
}

.weather-history-chart-hotspots {
  position: absolute;
  inset: 0;
}

.weather-history-chart-hotspot {
  position: absolute;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.weather-history-chart-hotspot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.weather-history-chart-hotspot:hover::after,
.weather-history-chart-hotspot.is-active::after,
.weather-history-chart-hotspot:focus-visible::after {
  transform: scale(1.12);
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.18);
}

.weather-history-chart-hotspot-bar {
  width: 28px;
  height: 26px;
  margin-left: -14px;
  margin-top: -13px;
}

.weather-history-chart-tooltip {
  position: absolute;
  min-width: 210px;
  max-width: 260px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  padding: 0.9rem 1rem;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.32);
  z-index: 5;
  pointer-events: none;
}

.weather-history-chart-tooltip p {
  margin: 0.2rem 0 0;
  font-size: 0.89rem;
  color: rgba(226, 232, 240, 0.92);
}

.weather-history-tooltip-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.weather-history-tooltip-value {
  margin-top: 0.25rem;
  font-size: 1.12rem;
  font-weight: 800;
}

.weather-history-tooltip-condition {
  margin-top: 0.2rem;
  color: rgba(125, 211, 252, 0.95);
  font-size: 0.9rem;
}

.weather-history-table-card {
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
  padding: clamp(1.05rem, 1rem + 0.6vw, 1.55rem);
}

.weather-history-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.weather-history-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.weather-history-table th,
.weather-history-table td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: top;
  text-align: left;
}

.weather-history-table th {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.86);
}

.weather-history-table td {
  color: rgba(15, 23, 42, 0.92);
  font-size: 0.95rem;
}

.weather-history-table td strong,
.weather-history-table td span {
  display: block;
}

.weather-history-condition-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.weather-history-condition-cell img {
  width: 28px;
  height: 28px;
}

.weather-history-chart-empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.9);
  color: rgba(71, 85, 105, 0.84);
  border: 1px dashed rgba(148, 163, 184, 0.24);
}

@media (max-width: 1200px) {
  .weather-history-grid,
  .weather-history-overview-grid,
  .weather-history-charts-grid {
    grid-template-columns: 1fr;
  }

  .weather-history-headline-grid,
  .weather-history-highlights-grid,
  .weather-history-hourly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .weather-history-narratives-grid,
  .weather-history-headline-grid,
  .weather-history-highlights-grid,
  .weather-history-hourly-grid {
    grid-template-columns: 1fr;
  }

  .weather-history-chart-wrap,
  .weather-history-chart-inner {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .weather-history-table {
    min-width: 860px;
  }

  .weather-history-chart-tooltip {
    min-width: 180px;
    max-width: 220px;
  }
}
