/* ================================================================
   Weather by Welded Anvil — Design System
   ================================================================ */

:root {
  /* Backgrounds */
  --bg-0: #0b0f14;
  --bg-1: #111822;
  --bg-2: #18212e;
  --bg-3: #1f2937;

  /* Text */
  --ink-0: #f1f5f9;
  --ink-1: #94a3b8;
  --ink-2: #64748b;

  /* Accent */
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.15);

  /* Semantic */
  --warm: #f97316;
  --cool: #38bdf8;
  --positive: #22c55e;
  --caution: #eab308;
  --danger: #ef4444;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Layout */
  --content-max: 960px;
  --sidebar-width: 200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Reset browser defaults for common elements */
a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Sora', system-ui, -apple-system, sans-serif;
  color: var(--ink-0);
  background: var(--bg-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ================================================================
   Page Layout
   ================================================================ */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================================================================
   Site Header — compact, contextual
   ================================================================ */

.site-header {
  background: var(--bg-1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--ink-0);
  flex-shrink: 0;
}

.site-kicker {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-subtitle {
  display: none;
}

/* Search bar in header */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-bar__input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-lg);
  padding: 0.35rem 0.5rem 0.35rem 0.9rem;
  gap: 0.3rem;
  transition: border-color 200ms, box-shadow 200ms;
}

.search-bar__input-wrap:focus-within {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

.search-bar__input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink-0);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.search-bar__input-wrap input::placeholder {
  color: var(--ink-2);
}

.search-bar__geo {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 50%;
  line-height: 1;
  transition: background 150ms;
}

.search-bar__geo:hover {
  background: var(--accent-dim);
}

.search-bar__geo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-md);
  padding: 0.3rem 0;
  z-index: 100;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.search-dropdown__label {
  padding: 0.35rem 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.search-dropdown__item {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink-0);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 150ms;
}

.search-dropdown__item--rich {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.search-dropdown__flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.9rem;
  line-height: 1;
}

.search-dropdown__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-dropdown__name {
  color: var(--ink-0);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown__meta {
  color: var(--ink-2);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown__item:hover,
.search-dropdown__item:focus-visible {
  background: var(--accent-dim);
  outline: none;
}

.search-dropdown__item--recent {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.search-dropdown__remove {
  margin-left: auto;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  transition: color 150ms, background 150ms;
}

.search-dropdown__remove:hover {
  color: var(--ink-0);
  background: rgba(239, 68, 68, 0.15);
}

/* ================================================================
   Main Content Area
   ================================================================ */

.site-main {
  flex: 1;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ================================================================
   Location Header
   ================================================================ */

.location-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.location-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

/* ================================================================
   Unit Toggle
   ================================================================ */

.unit-toggle {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.unit-toggle__btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink-1);
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 150ms, background 150ms, border-color 150ms;
  white-space: nowrap;
  line-height: 1.4;
}

.unit-toggle__btn:hover {
  color: var(--ink-0);
  background: var(--accent-dim);
  border-color: rgba(56, 189, 248, 0.2);
}

.unit-toggle__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.location-header__name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-0);
}

.location-header__region {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-1);
}

/* ================================================================
   Hero — Current Conditions
   ================================================================ */

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-lg);
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-lg);
}

.hero__primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 140px;
}

.hero__temp {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-0);
}

.hero__feels {
  font-size: 0.8rem;
  color: var(--ink-1);
}

.hero__condition {
  font-size: 0.85rem;
  color: var(--ink-1);
  margin-top: var(--space-xs);
}

.hero__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-sm) var(--space-lg);
  align-content: start;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.hero__stat-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink-0);
}

@media (max-width: 560px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__primary {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-lg);
  }
  .hero__details {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   Section Navigation (topic pills)
   ================================================================ */

.topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

.topic-nav__link {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-1);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 150ms, background 150ms;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
}

.topic-nav__link:hover,
.topic-nav__link--active {
  color: var(--ink-0);
  background: var(--accent-dim);
}

/* ================================================================
   Panels (generic card)
   ================================================================ */

.panel {
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  animation: rise-in 400ms ease both;
}

.panel--full-width {
  /* panels already full width in this layout */
}

.panel__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-md);
}

.panel__header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-0);
}

.panel__header p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.panel__body {
  display: grid;
  gap: var(--space-md);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================================
   Current Conditions Metrics Grid (legacy — used if hero not active)
   ================================================================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm) var(--space-lg);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.metric__value {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink-0);
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   Climate Panel
   ================================================================ */

.panel--climate {
  /* full width in grid layouts */
  grid-column: 1 / -1;
}

/* Climate breadcrumb */
.climate-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.2rem;
  font-size: 0.8rem;
}

.climate-breadcrumb li:not(:last-child)::after {
  content: '\203A';
  margin-left: 0.35rem;
  color: var(--ink-2);
}

.climate-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 150ms;
}

.climate-breadcrumb a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.climate-breadcrumb__current {
  color: var(--ink-0);
  font-weight: 600;
}

/* Climate loading */
.climate-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  color: var(--ink-2);
  font-size: 0.85rem;
}

/* Climate summary card */
.climate-summary {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.06);
}

.climate-summary__title {
  margin: 0 0 var(--space-xs);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-0);
}

.climate-summary__text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-1);
  line-height: 1.6;
}

.climate-summary__text + .climate-summary__text {
  margin-top: var(--space-sm);
}

.climate-summary__text strong {
  color: var(--ink-0);
  font-weight: 600;
}

.climate-summary__subtitle {
  margin: var(--space-md) 0 var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* Month at a Glance grid */
.climate-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: var(--space-sm);
}

.climate-glance__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) var(--space-xs);
  background: var(--bg-1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.06);
}

.climate-glance__value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-0);
}

.climate-glance__value--warm {
  color: var(--warm);
}

.climate-glance__value--cool {
  color: var(--cool);
}

.climate-glance__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

@media (max-width: 480px) {
  .climate-glance {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Climate topic sections */
.climate-topic {
  margin-top: var(--space-lg);
  scroll-margin-top: var(--space-lg);
}

.climate-topic__title {
  margin: 0 0 var(--space-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-0);
}

.climate-topic__chart {
  min-height: 200px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.04);
  padding: var(--space-sm);
  position: relative;
  transition: border-color 200ms;
}

.climate-topic__chart:hover {
  border-color: rgba(56, 189, 248, 0.15);
}

.climate-topic__desc {
  margin: var(--space-sm) 0 0;
  color: var(--ink-1);
  font-size: 0.8rem;
  line-height: 1.65;
}

.climate-topic__desc strong {
  color: var(--ink-0);
  font-weight: 600;
}

/* Climate overview link */
.climate-overview__more {
  margin-top: var(--space-lg);
  text-align: center;
}

.climate-overview__link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 200ms, transform 200ms;
}

.climate-overview__link:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

/* ================================================================
   Chart Surfaces
   ================================================================ */

.chart-surface {
  min-height: 160px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  font-size: 0.85rem;
}

.chart-surface--active {
  border: none;
  background: var(--bg-2);
}

/* Chart tooltip */
.chart-tooltip {
  position: absolute;
  display: none;
  padding: 5px 9px;
  background: var(--bg-1);
  color: var(--ink-0);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Skeleton loader */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.25; }
}

.skeleton {
  background: var(--bg-2);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
  min-height: 200px;
}

@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  .skeleton { animation: none; opacity: 0.15; }
}

/* ================================================================
   Forecast Chart Sections
   ================================================================ */

.forecast-chart {
  margin-top: var(--space-md);
}

.forecast-chart:first-child {
  margin-top: 0;
}

.forecast-chart__title {
  margin: 0 0 var(--space-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.forecast-chart__body {
  min-height: 180px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  padding: var(--space-sm);
  position: relative;
}

/* ================================================================
   Footer
   ================================================================ */

.site-footer {
  padding: var(--space-lg) var(--space-xl);
  color: var(--ink-2);
  font-size: 0.75rem;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.06);
}

.site-footer p {
  margin: 0;
}

/* ================================================================
   Section Divider
   ================================================================ */

.section-divider {
  border: none;
  height: 1px;
  background: rgba(148, 163, 184, 0.06);
  margin: var(--space-sm) 0;
}

/* ================================================================
   Empty / Landing State
   ================================================================ */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  gap: var(--space-md);
  min-height: 50vh;
}

.landing__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink-0);
}

.landing__subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-1);
  max-width: 440px;
}

.landing .search-bar {
  max-width: 440px;
  width: 100%;
  margin-top: var(--space-md);
}

/* ================================================================
   Utility
   ================================================================ */

/* ================================================================
   Hero Weather Icon
   ================================================================ */

.hero__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-1);
}

.hero__icon svg {
  width: 48px;
  height: 48px;
}

/* ================================================================
   New Chart Containers
   ================================================================ */

.summary-band {
  min-height: 160px;
}

.temp-heatmap {
  min-height: 300px;
}

.tourism-score {
  min-height: 240px;
}

/* Hover transitions for all chart SVGs */
.climate-topic__chart svg {
  transition: opacity 200ms;
}

.climate-topic__chart:hover svg {
  opacity: 0.95;
}

/* ================================================================
   Export Menu (per-chart download button + dropdown)
   ================================================================ */

.climate-topic__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.climate-topic__header .climate-topic__title {
  margin: 0;
}

.export-menu {
  position: relative;
  flex-shrink: 0;
}

.export-menu__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font-size: 1rem;
  cursor: pointer;
  transition: color 150ms, background 150ms, border-color 150ms, opacity 150ms;
  opacity: 0;
}

.climate-topic:hover .export-menu__btn,
.export-menu__btn:focus-visible {
  opacity: 1;
}

.export-menu__btn:hover {
  color: var(--ink-0);
  background: var(--accent-dim);
  border-color: rgba(56, 189, 248, 0.2);
  opacity: 1;
}

.export-menu__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.export-menu__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 140px;
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.export-menu__option {
  display: block;
  width: 100%;
  padding: 0.4rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--ink-0);
  font-family: inherit;
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: background 150ms;
}

.export-menu__option:hover {
  background: var(--accent-dim);
}

/* ================================================================
   Download All Data Button
   ================================================================ */

.climate-download-all {
  margin-top: var(--space-xl);
  text-align: center;
}

.climate-download-all__btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-sm);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms, background 150ms, border-color 150ms;
}

.climate-download-all__btn:hover {
  color: var(--ink-0);
  background: var(--accent-dim);
  border-color: rgba(56, 189, 248, 0.2);
}

.climate-download-all__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.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;
}

/* ================================================================
   Location Header Actions (Compare + Unit Toggle)
   ================================================================ */

.location-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ================================================================
   Compare Add Button (on location pages)
   ================================================================ */

.compare-add-btn {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 150ms, color 150ms;
  text-decoration: none;
}

.compare-add-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: var(--ink-0);
}

/* ================================================================
   Compare Page
   ================================================================ */

.compare-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.compare-header__title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-0);
}

.compare-header__subtitle {
  margin: var(--space-xs) 0 0;
  font-size: 0.85rem;
  color: var(--ink-1);
}

/* City Selector */
.compare-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.compare-selector__cities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.compare-selector__tag {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.35rem 0.6rem 0.35rem 0.5rem;
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink-0);
}

.compare-selector__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.compare-selector__name {
  font-weight: 500;
}

.compare-selector__remove {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
  margin-left: var(--space-xs);
  border-radius: 3px;
  transition: color 150ms, background 150ms;
}

.compare-selector__remove:hover {
  color: var(--ink-0);
  background: rgba(239, 68, 68, 0.15);
}

.compare-selector__search {
  position: relative;
  max-width: 400px;
}

.compare-selector__input {
  width: 100%;
  padding: 0.5rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-lg);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
}

.compare-selector__input::placeholder {
  color: var(--ink-2);
}

.compare-selector__input:focus {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

/* Compare Hint */
.compare-hint {
  text-align: center;
  color: var(--ink-2);
  font-size: 0.9rem;
  padding: var(--space-2xl) 0;
}

/* Compare Legend */
.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-sm);
}

.compare-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.compare-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.compare-legend__name {
  font-size: 0.8rem;
  color: var(--ink-0);
  font-weight: 500;
}

@media (max-width: 560px) {
  .compare-selector__cities {
    flex-direction: column;
  }
  .compare-selector__search {
    max-width: 100%;
  }
  .location-header__actions {
    flex-wrap: wrap;
  }
}

/* ================================================================
   Visual Overhaul Overrides
   ================================================================ */

:root {
  --canvas-0: #07111d;
  --canvas-1: #0b1727;
  --canvas-2: #132235;
  --surface-0: rgba(10, 21, 35, 0.78);
  --surface-1: rgba(16, 29, 47, 0.9);
  --surface-2: rgba(20, 37, 59, 0.94);
  --surface-border: rgba(152, 188, 220, 0.14);
  --surface-border-strong: rgba(152, 188, 220, 0.26);
  --text-0: #eff5fc;
  --text-1: #bfd0e2;
  --text-2: #89a1ba;
  --text-3: #5f7791;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-dim: rgba(125, 211, 252, 0.14);
  --accent-warm: #f7b267;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.24);
  --shell-max: 1240px;
  --reading-max: 780px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  /* Backwards-compatible aliases for existing chart/UI rules. */
  --bg-0: var(--canvas-0);
  --bg-1: rgba(10, 21, 35, 0.74);
  --bg-2: rgba(17, 31, 49, 0.9);
  --bg-3: rgba(24, 42, 66, 0.96);
  --ink-0: var(--text-0);
  --ink-1: var(--text-1);
  --ink-2: var(--text-3);
  --warm: var(--accent-warm);
  --cool: #7dd3fc;
  --content-max: var(--shell-max);
}

body {
  color: var(--text-0);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 35%),
    radial-gradient(circle at top right, rgba(247, 178, 103, 0.1), transparent 28%),
    linear-gradient(180deg, #07111d 0%, #091626 38%, #0d1b2b 100%);
}

.site-shell {
  position: relative;
  overflow: clip;
}

.site-shell__aurora {
  position: absolute;
  inset: 0 0 auto;
  height: 32rem;
  background:
    radial-gradient(circle at 14% 14%, rgba(125, 211, 252, 0.16), transparent 0 34%),
    radial-gradient(circle at 86% 10%, rgba(247, 178, 103, 0.12), transparent 0 24%);
  pointer-events: none;
  opacity: 0.95;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 1.25rem 0;
  background: transparent;
  border-bottom: none;
}

.site-header__inner,
.site-main__inner,
.site-footer__inner {
  width: min(100%, var(--shell-max));
  margin: 0 auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  background: rgba(8, 17, 29, 0.72);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.site-brand {
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-brand__lockup {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.site-title {
  font-size: clamp(1.4rem, 1rem + 1vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.site-brand__tagline {
  margin: 0;
  max-width: 36rem;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.site-header__tools {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.site-main {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.25rem 4rem;
  max-width: none;
}

.site-main__inner {
  display: grid;
  gap: 1.5rem;
}

.site-footer {
  padding: 0 1.25rem 2rem;
  border-top: none;
  color: var(--text-2);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  padding: 1.15rem 1.25rem 0;
  border-top: 1px solid rgba(152, 188, 220, 0.12);
}

.site-footer__note {
  max-width: 34rem;
}

.data-surface,
.panel,
.hero-surface,
.landing-hero__panel,
.highlight-card,
.compare-shell__surface,
.compare-shell__intro {
  position: relative;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(20, 37, 59, 0.88), rgba(11, 22, 37, 0.9));
  box-shadow: var(--shadow-md);
}

.search-bar {
  max-width: none;
  min-width: 0;
}

.search-bar__input-wrap {
  min-height: 3.4rem;
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  border-radius: 999px;
  border-color: rgba(152, 188, 220, 0.18);
  background: rgba(9, 20, 33, 0.74);
}

.search-bar__input-wrap input {
  font-size: 0.98rem;
}

.search-bar__geo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  background: rgba(125, 211, 252, 0.08);
}

.search-bar__geo:hover {
  background: rgba(125, 211, 252, 0.18);
}

.search-dropdown {
  margin-top: 0.4rem;
  background: rgba(7, 17, 29, 0.96);
  border-color: rgba(152, 188, 220, 0.16);
  border-radius: 1.1rem;
  overflow: hidden;
}

.search-dropdown__item {
  min-width: 0;
  gap: 0.7rem;
}

.search-dropdown__text,
.search-dropdown__item--recent,
.search-dropdown__name,
.search-dropdown__meta {
  min-width: 0;
}

.search-dropdown__name,
.search-dropdown__meta,
.compare-selector__name,
.section-copy,
.compare-header__subtitle,
.location-band__caption,
.site-brand__tagline {
  overflow-wrap: anywhere;
}

.search-dropdown__name,
.search-dropdown__meta {
  white-space: normal;
}

.section-kicker {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--text-0);
  font-size: clamp(1.25rem, 0.95rem + 1vw, 1.7rem);
  letter-spacing: -0.03em;
}

.section-copy {
  margin: 0;
  max-width: 40rem;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.65;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
  min-height: min(70vh, 48rem);
}

.landing-hero__copy,
.landing-hero__panel {
  padding: clamp(1.5rem, 1rem + 2vw, 2.35rem);
}

.landing-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing__title {
  max-width: 12ch;
  font-size: clamp(2.8rem, 2rem + 3.8vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.landing__subtitle {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-1);
}

.search-bar--landing {
  width: min(100%, 38rem);
  margin-top: 1.5rem;
}

.landing-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.landing-stat {
  min-width: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(8, 18, 31, 0.55);
  border: 1px solid rgba(152, 188, 220, 0.12);
}

.landing-stat__value {
  display: block;
  color: var(--text-0);
  font-size: 1.4rem;
  font-weight: 600;
}

.landing-stat__label {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-2);
  font-size: 0.82rem;
}

.landing-preview {
  display: grid;
  gap: 0.95rem;
}

.landing-preview__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--text-1);
  border-bottom: 1px solid rgba(152, 188, 220, 0.12);
}

.landing-preview__row strong {
  color: var(--text-0);
  font-weight: 600;
  text-align: right;
}

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

.highlight-card {
  min-width: 0;
  padding: 1.4rem 1.4rem 1.5rem;
}

.location-band {
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(19, 34, 53, 0.96), rgba(11, 20, 34, 0.9));
  box-shadow: var(--shadow-md);
}

.location-band__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.location-band__copy,
.location-band__actions {
  min-width: 0;
}

.location-header__name {
  font-size: clamp(2rem, 1.3rem + 2vw, 3rem);
  line-height: 0.98;
}

.location-header__region {
  margin-top: 0.45rem;
  color: var(--text-1);
  font-size: 1rem;
}

.location-band__caption {
  margin: 0.9rem 0 0;
  max-width: 44rem;
  color: var(--text-2);
}

.location-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.compare-add-btn,
.unit-toggle__btn {
  min-height: 2.65rem;
  padding-inline: 0.9rem;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  border-color: rgba(125, 211, 252, 0.2);
}

.compare-add-btn {
  display: inline-flex;
  align-items: center;
}

.unit-toggle {
  display: flex;
  flex-wrap: wrap;
}

.hero-surface {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 1.2rem 1.6rem;
  align-items: stretch;
  padding: clamp(1.25rem, 1rem + 1vw, 1.8rem);
}

.hero__primary,
.hero__content,
.metric-strip {
  min-width: 0;
}

.hero__primary {
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(8, 18, 31, 0.48);
  border: 1px solid rgba(152, 188, 220, 0.12);
}

.hero__icon svg {
  width: 4rem;
  height: 4rem;
}

.hero__temp {
  font-size: clamp(3.5rem, 2.4rem + 3vw, 5rem);
  font-weight: 600;
}

.hero__feels {
  font-size: 0.95rem;
  color: var(--text-1);
}

.hero__content {
  display: grid;
  gap: 1rem;
}

.hero__intro {
  display: grid;
  gap: 0.35rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
}

.hero__stat {
  min-width: 0;
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(8, 18, 31, 0.5);
  border: 1px solid rgba(152, 188, 220, 0.11);
}

.hero__stat-label {
  color: var(--text-3);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.hero__stat-value {
  font-size: 1.2rem;
}

.topic-nav {
  position: sticky;
  top: 6.6rem;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: rgba(8, 17, 29, 0.74);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.topic-nav__link {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  color: var(--text-2);
}

.topic-nav__link:hover,
.topic-nav__link--active {
  color: var(--text-0);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.18), rgba(56, 189, 248, 0.12));
}

.section-stack {
  display: grid;
  gap: 1.2rem;
}

.section-shell {
  padding: clamp(1.2rem, 1rem + 0.7vw, 1.6rem);
}

.panel__body,
.section-shell__body,
.compare-charts,
.forecast-chart__body,
.climate-topic__chart {
  min-width: 0;
}

.section-rail,
.panel__header.section-rail {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-bottom: 1.1rem;
}

.section-rail h2,
.section-rail p {
  margin: 0;
}

.section-rail h2 {
  color: var(--text-0);
  font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem);
  letter-spacing: -0.03em;
}

.section-rail > p,
.panel__header.section-rail > p {
  max-width: 34rem;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.6;
}

.compare-shell {
  display: grid;
  gap: 1.2rem;
}

.compare-shell__intro,
.compare-shell__surface {
  padding: 1.35rem 1.45rem;
}

.compare-charts {
  display: grid;
  gap: 1rem;
}

.compare-selector {
  gap: 1rem;
}

.compare-selector__cities {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.8rem;
}

.compare-selector__tag {
  max-width: 100%;
  min-width: 0;
  padding: 0.65rem 0.85rem 0.65rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 18, 31, 0.56);
}

.compare-selector__name {
  min-width: 0;
  font-size: 0.92rem;
}

.compare-selector__search {
  width: min(100%, 32rem);
  max-width: 100%;
}

.compare-selector__input {
  min-height: 3.1rem;
  border-radius: 999px;
  background: rgba(8, 18, 31, 0.74);
}

.compare-legend,
.climate-summary,
.climate-topic__chart,
.forecast-chart__body,
.chart-surface {
  border-radius: var(--radius-md);
  border: 1px solid rgba(152, 188, 220, 0.11);
  background: rgba(10, 21, 35, 0.72);
}

.climate-summary,
.compare-legend {
  padding: 1rem 1.1rem;
}

.climate-topic__desc,
.climate-summary__text,
.compare-hint {
  color: var(--text-1);
}

.climate-breadcrumb ol {
  gap: 0.35rem;
}

.climate-topic__chart,
.forecast-chart__body {
  overflow: hidden;
}

.chart-tooltip {
  background: rgba(7, 17, 29, 0.96);
  border-color: rgba(152, 188, 220, 0.22);
}

@media (max-width: 1024px) {
  .site-header__inner {
    grid-template-columns: 1fr;
  }

  .site-header__tools {
    justify-content: stretch;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing__title {
    max-width: 100%;
  }

  .section-rail,
  .panel__header.section-rail,
  .location-band__summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-surface {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-inline: 0.85rem;
  }

  .site-main,
  .site-footer {
    padding-inline: 0.85rem;
  }

  .site-header__inner,
  .landing-hero__copy,
  .landing-hero__panel,
  .compare-shell__intro,
  .compare-shell__surface,
  .section-shell,
  .location-band,
  .hero-surface {
    padding-inline: 1rem;
  }

  .landing-hero__stats,
  .landing-highlights,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .topic-nav {
    top: 0.85rem;
    border-radius: 1.25rem;
  }
}

@media (max-width: 560px) {
  .site-brand {
    align-items: flex-start;
  }

  .site-brand__tagline {
    font-size: 0.86rem;
  }

  .landing-preview__row {
    flex-direction: column;
  }

  .landing-preview__row strong {
    text-align: left;
  }

  .hero__primary {
    align-items: flex-start;
  }

  .compare-selector__cities {
    flex-direction: column;
  }

  .compare-selector__tag {
    width: 100%;
  }
}
