:root {
  --ink: #1c2c35;
  --muted: #6f7b81;
  --blue: #3f718d;
  --blue-dark: #2e5b72;
  --blue-pale: #dcecf2;
  --coral: #dd7c65;
  --paper: #f8f5ef;
  --white: rgba(255, 255, 255, 0.92);
  --line: rgba(30, 57, 69, 0.14);
  --shadow: 0 24px 70px rgba(45, 74, 84, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: #f7f9fb url("assets/scenic-travel-background.png") center top / max(1440px, 100vw) auto no-repeat;
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 0;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-family: "Onest", sans-serif;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.brand small { padding-left: 12px; border-left: 1px solid var(--line); color: #78878e; font-family: "Manrope", sans-serif; font-size: 10px; font-weight: 600; }

.brand-mark { position: relative; display: block; width: 34px; height: 30px; }
.brand-mark i { position: absolute; bottom: 2px; display: block; background: linear-gradient(145deg, #9fe7f5, #236fc1); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.brand-mark i:nth-child(1) { left: 0; width: 22px; height: 18px; }
.brand-mark i:nth-child(2) { right: 0; width: 24px; height: 25px; background: linear-gradient(145deg, #b5eef5, #174fa3); }
.brand-mark i:nth-child(3) { top: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(145deg, #ffb445, #ff762d); clip-path: none; }

.source-pill {
  padding: 8px 12px;
  border: 1px solid rgba(90, 139, 223, .08);
  border-radius: 999px;
  color: #607078;
  background: rgba(226, 239, 255, .8);
  font-size: 12px;
  font-weight: 600;
}

.hero {
  min-height: 760px;
  padding: 104px 0 150px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow span { width: 18px; height: 1px; background: var(--coral); }

h1, h2 {
  margin: 18px 0 0;
  font-family: "Onest", sans-serif;
  font-weight: 600;
  letter-spacing: -.045em;
}

h1 { font-size: clamp(44px, 6vw, 78px); line-height: .99; }

.hero-copy {
  max-width: 650px;
  margin: 25px auto 0;
  color: #5e6d74;
  font-size: 16px;
  line-height: 1.7;
}

.search-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  max-width: 1120px;
  margin: 45px auto 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 22px;
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow);
  text-align: left;
  backdrop-filter: blur(18px);
}

.search-variant {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  grid-column: 1 / -1;
  grid-template-columns: minmax(250px, 1fr) minmax(470px, 1.5fr);
  gap: 14px;
  border: 0;
}
.search-variant legend { display: none; margin: 0 0 10px; padding: 0; color: #356fd3; font-size: 12px; font-weight: 700; }
.search-variant legend i { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: #5b8ff5; }
.search-card.comparison-enabled .search-variant legend { display: block; grid-column: 1 / -1; }
.search-card.comparison-enabled .search-variant { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.search-card.comparison-enabled .variant-two { padding-top: 2px; }
.search-card.comparison-enabled .variant-two legend { color: #e85e43; }
.search-card.comparison-enabled .variant-two legend i { background: #ff684c; }
.form-actions { display: flex; min-width: 240px; align-items: center; justify-content: flex-end; gap: 10px; grid-column: 2; }
.compare-button,
.remove-comparison { min-height: 44px; padding: 0 15px; border: 1px solid var(--blue); border-radius: 11px; color: var(--blue-dark); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.remove-comparison { border-color: #ef806c; color: #c64f3b; }
.compare-button:hover,
.compare-button:focus-visible { background: #edf5f8; }
.remove-comparison:hover,
.remove-comparison:focus-visible { background: #fff0ec; }

.field { position: relative; min-width: 0; }
.city-search-option { position: relative; }

.field label {
  display: block;
  margin: 0 0 8px 2px;
  color: #56676f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.input-wrap { position: relative; }

.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #6c7d84;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 38px 0 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(249, 250, 249, .9);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input:hover { border-color: rgba(46, 91, 114, .35); }
input:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(63, 113, 141, .12); }
input::placeholder { color: #9aa3a7; }

.date-selects {
  display: grid;
  grid-template-columns: 62px minmax(118px, 1fr);
  gap: 6px;
  padding-left: 34px;
}
.date-selects select {
  min-width: 0;
  height: 52px;
  padding: 0 25px 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background-color: rgba(249, 250, 249, .9);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.date-selects select:hover { border-color: rgba(46, 91, 114, .35); }
.date-selects select:focus { border-color: var(--blue); background-color: white; box-shadow: 0 0 0 3px rgba(63, 113, 141, .12); }
.date-selects > svg { left: 13px; }

.date-pair { display: grid; grid-template-columns: 1fr 16px 1fr; gap: 6px; align-items: end; }
.date-dash { display: grid; height: 52px; place-items: center; color: #a2aaad; }

.submit-button {
  display: inline-flex;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s;
}

.submit-button:hover { transform: translateY(-1px); background: var(--blue-dark); box-shadow: 0 10px 24px rgba(38, 75, 93, .2); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; box-shadow: none; }
.submit-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.form-note { grid-column: 1; grid-row: 2; margin: 1px 2px -1px; color: #8a969b; font-size: 11px; }
.search-card.comparison-enabled .form-note { grid-row: 3; }
.search-card.comparison-enabled .form-actions { grid-row: 3; }
.form-message { display: none; grid-column: 1 / -1; padding: 11px 13px; border: 1px solid #efc5ba; border-radius: 9px; color: #8f4538; background: #fff0eb; box-shadow: 0 8px 22px rgba(143, 69, 56, .12); font-size: 12px; }
.form-message:not(:empty) { display: block; animation: message-in .2s ease-out; }
@keyframes message-in { from { opacity: 0; transform: translateY(-5px); } }

.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  overflow: hidden;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 18px 45px rgba(37, 58, 66, .18);
  list-style: none;
}

.suggestions button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.suggestions button:hover, .suggestions button.active { background: #edf4f6; }
.suggestions button > span:first-child { min-width: 0; }
.suggestions strong { display: block; font-size: 13px; font-weight: 650; }
.suggestions small { display: block; overflow: hidden; margin-top: 3px; color: #7f8a8f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.mini-spinner {
  position: absolute;
  top: 18px;
  right: 14px;
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #d9e2e5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.mini-spinner.visible { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.results {
  margin: 0 -20px 80px;
  padding: 70px 20px 0;
  scroll-margin-top: 30px;
}

.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.comparison-labels { position: absolute; z-index: 5; top: 3px; right: 0; left: 0; height: 36px; pointer-events: none; }
.comparison-label-layer { position: absolute; inset: 0; overflow: hidden; }
.comparison-label-layer:nth-child(2) { display: flex; justify-content: flex-end; }
.comparison-label { display: inline-flex; align-items: center; gap: 7px; margin-left: 18px; padding: 8px 12px; border-radius: 999px; color: #356fd3; background: #eaf1ff; font-size: 11px; font-weight: 700; }
.comparison-label::before { width: 9px; height: 9px; border-radius: 50%; background: #5b8ff5; content: ""; }
.comparison-label-layer:nth-child(2) .comparison-label { margin-right: 18px; margin-left: 0; color: #c84f38; background: #fff0ec; }
.comparison-label-layer:nth-child(2) .comparison-label::before { background: #ff684c; }
h2 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; }
#chart-subtitle { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.period-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  transition: border-color .25s, background .25s;
}
.period-toggle button {
  display: inline-flex;
  min-width: 128px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: #748086;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}
.period-toggle button:hover { color: var(--ink); }
.period-toggle button.active { color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(31,55,65,.1); }
.period-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.period-toggle span { display: flex; gap: 1px; flex-direction: column; font-size: 12px; font-weight: 700; }
.period-toggle small { color: #909ba0; font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.period-toggle button[data-temperature-mode="day"].active svg { color: var(--coral); }
.period-toggle button[data-temperature-mode="night"].active svg { color: #f28a32; }

.legend { display: flex; flex-wrap: wrap; gap: 17px; color: #6d7b81; font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 20px; flex: none; }
.legend-box { height: 12px; background: rgba(93,155,179,.28); }
.legend-line { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #5287a1, #dd7c65); }
.legend-whisker { height: 10px; border-top: 1px dashed #78909c; border-bottom: 1px dashed #78909c; }
.results[data-metric="temperature"] .legend-box {
  border-top: 2px solid var(--legend-upper-color, #e53935);
  border-bottom: 2px solid var(--legend-lower-color, #1971c2);
  background: var(--temperature-legend-gradient, linear-gradient(180deg, #e53935, #fbc02d, #20b8c5, #1971c2));
  opacity: .72;
}
.results[data-metric="temperature"] .legend-line { background: var(--temperature-line-legend-gradient, linear-gradient(90deg, #e53935, #fbc02d, #20b8c5, #1971c2)); }
.results[data-metric="temperature"] .legend-whisker { border-top-color: var(--legend-upper-color, #e53935); border-bottom-color: var(--legend-lower-color, #1971c2); }
.results[data-metric="wind"] .legend-box { border-top: 2px solid #21617b; border-bottom: 2px solid #21617b; background: rgba(93,155,179,.28); }
.results[data-metric="wind"] .legend-line { background: #21617b; }
.results[data-metric="wind"] .legend-whisker { border-color: rgba(33,97,123,.62); }
.metric-toolbar,
.chart-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.metric-toolbar { margin-bottom: 22px; }
.chart-meta-row { min-height: 30px; }
.metric-tabs {
  display: inline-flex;
  overflow-x: auto;
  padding: 3px;
  border-radius: 12px;
  background: #edf1f1;
  scrollbar-width: none;
}
.metric-tabs::-webkit-scrollbar { display: none; }
.metric-tabs button {
  border: 0;
  color: #758289;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}
.metric-tabs button { padding: 9px 14px; border-radius: 9px; }
.metric-tabs button:hover { color: var(--ink); }
.metric-tabs button.active { color: var(--ink); background: white; box-shadow: 0 2px 9px rgba(31,55,65,.09); }

.chart-card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 10px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}

.results[data-mode="night"] .chart-card {
  border-color: rgba(138, 158, 204, .55);
  color: #eef3ff;
  background: linear-gradient(145deg, rgba(80, 97, 138, .97), rgba(61, 78, 117, .98));
  box-shadow: 0 24px 64px rgba(31, 39, 72, .26);
}
.results[data-mode="night"] .metric-tabs {
  background: rgba(34, 46, 80, .34);
  box-shadow: inset 0 0 0 1px rgba(190, 202, 232, .18);
}
.results[data-mode="night"] .metric-tabs button { color: #c6d1e7; }
.results[data-mode="night"] .metric-tabs button:hover { color: white; }
.results[data-mode="night"] .metric-tabs button.active {
  color: #eaf3ff;
  background: rgba(54, 103, 167, .82);
  box-shadow: 0 5px 16px rgba(25, 32, 70, .24);
}
.results[data-mode="night"] .period-toggle {
  border-color: rgba(190, 202, 232, .22);
  background: rgba(34, 46, 80, .34);
}
.results[data-mode="night"] .period-toggle button { color: #c6d1e7; }
.results[data-mode="night"] .period-toggle button:hover { color: white; }
.results[data-mode="night"] .period-toggle button.active {
  color: white;
  background: linear-gradient(135deg, #5868dc, #3d55c9);
  box-shadow: 0 6px 18px rgba(20, 27, 92, .38);
}
.results[data-mode="night"] .period-toggle button.active small { color: #d5dcff; }
.results[data-mode="night"] .period-toggle button[data-temperature-mode="night"].active svg { color: #fff2a8; }
.results[data-mode="night"] .chart-summary,
.results[data-mode="night"] .legend,
.results[data-mode="night"] .compare-hint { color: #c3cee2; }
.results[data-mode="night"] .chart-summary strong { color: #f5f8ff; }
.results[data-mode="night"] .weather-key { color: #c3cee2; }
.results[data-mode="night"] .weather-key b { color: #f4f7ff; }
.results[data-mode="night"] .weather-date { color: #c5d0e5; }
.results[data-mode="night"] .comparison-label { color: #bcd7ff; background: rgba(42, 74, 133, .62); }
.results[data-mode="night"] .comparison-label-layer:nth-child(2) .comparison-label { color: #ffd0c5; background: rgba(116, 57, 68, .55); }
.results[data-mode="night"] #y-axis {
  background: linear-gradient(90deg, rgba(80,97,138,.99) 0%, rgba(80,97,138,.94) 76%, rgba(80,97,138,0) 100%);
}
.results[data-mode="night"] .comparison-slider { color: #e1eaff; }
.results[data-mode="night"] .comparison-slider span { background: #f6f9fc; }
.results[data-mode="night"] .legend i { opacity: 1; }
.results[data-mode="night"] .legend-box,
.results[data-mode="night"] .legend-line { box-shadow: 0 0 0 1px rgba(255, 255, 255, .9); }
.results[data-mode="night"] .legend-whisker {
  border-top-color: #ffd05b;
  border-bottom-color: #69b8ff;
  background: rgba(255, 255, 255, .72);
}
.results[data-mode="night"][data-metric="wind"] .legend-box {
  border-color: #dff6ff;
  background: rgba(102, 191, 224, .72);
}
.results[data-mode="night"][data-metric="wind"] .legend-line { background: #65d0f2; }

.chart-summary { min-height: 30px; color: #7a878c; font-size: 12px; }
.chart-summary strong { margin-right: 7px; color: var(--ink); font-size: 15px; }
.chart-scroll { position: relative; overflow: hidden; min-height: 480px; }
.chart-layer { position: absolute; inset: 0; overflow: hidden; }
.chart-layer-one { z-index: 1; }
.chart-layer-two { z-index: 2; }
.results:not(.comparison-active) .chart-layer-one { position: relative; }
.comparison-slider { position: absolute; z-index: 6; top: 0; bottom: 30px; left: 50%; width: 2px; color: #172d4f; background: currentColor; cursor: ew-resize; touch-action: none; transform: translateX(-1px); }
.comparison-slider span { position: absolute; top: 47%; left: 50%; display: block; overflow: hidden; width: 44px; height: 44px; border: 2px solid currentColor; border-radius: 50%; color: #172d4f; background: white; box-shadow: 0 5px 18px rgba(23,45,79,.22); transform: translate(-50%, -50%); }
.comparison-slider img { position: absolute; top: 50%; left: 50%; display: block; width: 44px; height: 44px; object-fit: contain; pointer-events: none; user-select: none; transform: translate(-50%, -50%) scale(1.45); -webkit-user-drag: none; }
.comparison-slider:focus-visible { outline: 3px solid #ff9b85; outline-offset: 4px; }
.compare-hint { margin: 4px 0 8px; color: #77868e; font-size: 11px; text-align: center; }
.axis-sticky {
  position: sticky;
  z-index: 3;
  top: 0;
  left: 0;
  width: 58px;
  height: 0;
  pointer-events: none;
}
#y-axis {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 58px;
  height: 480px;
  background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 76%, rgba(255,255,255,0) 100%);
}
#boxplot,
#boxplot-2 { display: block; width: 100%; height: 480px; }
.results[data-metric="weather"] #boxplot,
.results[data-metric="weather"] #boxplot-2 { display: none; }

.weather-key {
  display: flex;
  width: min(100%, 1040px);
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: #52636b;
  font-size: 10px;
}
.weather-key-primary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.weather-key-primary > span { display: inline-flex; align-items: center; flex: none; gap: 5px; white-space: nowrap; }
.weather-key b { color: var(--ink); font-weight: 700; }
.key-icon { position: relative; display: inline-flex; overflow: hidden; width: 29px; height: 29px; flex: none; border-radius: 6px; color: #77889c; }
.key-icon .weather-icon { position: relative; z-index: 1; width: 29px; height: 29px; }

.weather-ribbon {
  --weather-days: 7;
  display: grid;
  height: 440px;
  grid-template-columns: repeat(var(--weather-days), minmax(0, 1fr));
  gap: clamp(3px, 1vw, 14px);
  padding: 14px 2px 4px;
}
.comparison-active .weather-ribbon { padding-top: 52px; }
.weather-day {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) 31px;
  gap: 9px;
}
.weather-column {
  display: flex;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  flex-direction: column;
  border: 1px solid rgba(54, 82, 95, .22);
  border-radius: clamp(6px, 1vw, 16px);
  outline: none;
  background: #edf1f2;
  box-shadow: 0 8px 22px rgba(43, 68, 78, .08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.weather-column:hover,
.weather-column:focus-visible {
  z-index: 2;
  border-color: #47788f;
  box-shadow: 0 10px 26px rgba(43, 68, 78, .18), 0 0 0 3px rgba(63, 113, 141, .13);
  transform: translateY(-2px);
}
.weather-section {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 2px;
  align-items: center;
  justify-content: center;
  flex-basis: 0;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(255, 255, 255, .68);
  color: #192c3b;
}
.weather-section > :not(.weather-mixed-background) { position: relative; z-index: 1; }
.weather-section:first-child { border-top: 0; }
.weather-clear { background: linear-gradient(145deg, #fff1a0, #ffd34f); color: #db7a00; }
.weather-cloudy { background: #e0e2e3; color: #6f7884; }
.weather-rain { background: linear-gradient(145deg, #d9ecff, #9dccfb); color: #1671db; }
.weather-snow { background: linear-gradient(145deg, #edf0ff, #dce0ff); color: #527fe8; }
.weather-partly,
.weather-clear-rain,
.weather-cloudy-rain,
.weather-clear-snow,
.weather-cloudy-snow {
  --mixed-dry-color: #ffe477;
  position: relative;
  isolation: isolate;
}
.weather-partly { background: #e0e2e3; color: #7d8289; }
.weather-clear-rain,
.weather-cloudy-rain { background: #abd5ff; color: #1671db; }
.weather-clear-snow,
.weather-cloudy-snow { background: #dce2ff; color: #527fe8; }
.weather-cloudy-rain,
.weather-cloudy-snow { --mixed-dry-color: #e0e2e3; }
.weather-mixed-background {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.weather-mixed-dry-shape {
  fill: var(--mixed-dry-color);
  filter: blur(var(--mixed-blur-radius, 18px));
}
.key-icon,
.year-weather-icon { --mixed-blur-radius: 3px; }
.weather-section .weather-icon { width: clamp(20px, 3.3vw, 37px); height: clamp(20px, 3.3vw, 37px); flex: none; }
.weather-percent { flex: none; color: #152a38; font-size: clamp(9px, 1.35vw, 15px); font-weight: 700; line-height: 1; white-space: nowrap; }
.weather-date {
  overflow: hidden;
  color: #627178;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}
.weather-ribbon.dense { gap: 2px; }
.weather-ribbon.dense .weather-icon,
.weather-ribbon.dense .weather-percent { display: none; }
.weather-ribbon.dense .weather-date { font-size: 9px; transform: rotate(-42deg); transform-origin: top center; }
.weather-column-empty {
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-style: dashed;
  color: #77858a;
  background: repeating-linear-gradient(-45deg, #f2f4f4 0 7px, #e9eded 7px 14px);
  cursor: default;
}
.weather-empty-copy { font-size: 9px; line-height: 1.25; writing-mode: vertical-rl; transform: rotate(180deg); }

.weather-icon { display: block; overflow: visible; fill: none; }
.sun-core { fill: currentColor; }
.sun-rays { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.moon-shape { fill: currentColor; }
.cloud-shape { fill: currentColor; }
.sky-shape { color: #f2a11a; }
.neutral-cloud { fill: #7d8998; }
.weather-rain .precipitation-cloud,
.weather-clear-rain .precipitation-cloud,
.weather-cloudy-rain .precipitation-cloud { fill: #3188df; }
.weather-snow .precipitation-cloud,
.weather-clear-snow .precipitation-cloud,
.weather-cloudy-snow .precipitation-cloud { fill: #718bd0; }
.secondary-cloud { fill: #7d8998; }
.rain-mark { fill: #087df0; }
.snow-mark { fill: none; stroke: #5b9cff; stroke-width: 1.4; stroke-linecap: round; }

.chart-tooltip.weather-tooltip {
  width: min(330px, calc(100% - 16px));
  padding: 13px;
  border: 1px solid rgba(60, 89, 103, .2);
  border-radius: 14px;
  color: #263944;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 46px rgba(25, 43, 51, .24);
  line-height: 1.45;
}
.chart-tooltip.weather-tooltip > strong { color: #172d3b; font-size: 14px; }
.weather-tooltip-kicker { display: block; margin-top: -1px; color: #718087; font-size: 10px; }
.weather-year-grid {
  display: grid;
  margin-top: 9px;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.year-weather-icon {
  position: relative;
  display: grid;
  overflow: hidden;
  height: 35px;
  place-items: center;
  border-radius: 7px;
  color: #7b899b;
  background: #f1f4f6;
}
.year-weather-icon.weather-clear { background: linear-gradient(145deg, #fff1a0, #ffd34f); }
.year-weather-icon.weather-cloudy { background: #e0e2e3; }
.year-weather-icon.weather-rain { background: linear-gradient(145deg, #d9ecff, #9dccfb); }
.year-weather-icon.weather-snow { background: linear-gradient(145deg, #edf0ff, #dce0ff); }
.year-weather-icon.weather-partly { background: #e0e2e3; }
.year-weather-icon.weather-clear-rain,
.year-weather-icon.weather-cloudy-rain { background: #abd5ff; }
.year-weather-icon.weather-clear-snow,
.year-weather-icon.weather-cloudy-snow { background: #dce2ff; }
.year-weather-icon .weather-icon { position: relative; z-index: 1; width: 29px; height: 29px; }
.weather-tooltip-total { margin: 9px 0 0; color: #40545f; font-size: 10px; }
.weather-tooltip-conclusion {
  display: flex;
  margin-top: 8px;
  padding: 8px 10px;
  flex-direction: column;
  border-radius: 9px;
  color: #46606f;
  background: #f5f1e9;
}
.weather-tooltip-conclusion b { color: #1e3441; font-size: 12px; }
.weather-tooltip-note { margin: 8px 0 0; color: #697980; font-size: 10px; }

.results[data-mode="night"] .chart-tooltip.weather-tooltip {
  border-color: rgba(190, 202, 232, .32);
  color: #e6ecf8;
  background: rgba(48, 61, 94, .98);
  box-shadow: 0 20px 50px rgba(22, 27, 51, .38);
}
.results[data-mode="night"] .chart-tooltip.weather-tooltip > strong { color: white; }
.results[data-mode="night"] .weather-tooltip-kicker,
.results[data-mode="night"] .weather-tooltip-total,
.results[data-mode="night"] .weather-tooltip-note { color: #c4cee1; }
.results[data-mode="night"] .weather-tooltip .tooltip-place { color: #b9d8ef; }
.results[data-mode="night"] .weather-tooltip-conclusion {
  color: #ced8eb;
  background: rgba(27, 36, 66, .72);
}
.results[data-mode="night"] .weather-tooltip-conclusion b { color: white; }

.results[data-metric="weather"][data-mode="night"] .weather-column { border-color: #7189b1; box-shadow: 0 8px 26px rgba(25, 31, 61, .25); }
.results[data-metric="weather"][data-mode="night"] .weather-column:hover,
.results[data-metric="weather"][data-mode="night"] .weather-column:focus-visible { border-color: #a8c7ef; box-shadow: 0 0 0 3px rgba(168, 199, 239, .22); }
.results[data-metric="weather"][data-mode="night"] .weather-column-empty { color: #c0cbe0; background: repeating-linear-gradient(-45deg, #455781 0 7px, #394b73 7px 14px); }

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 10px;
  color: white;
  background: rgba(25, 43, 51, .94);
  box-shadow: 0 8px 24px rgba(28,44,53,.2);
  font-size: 11px;
  line-height: 1.6;
  pointer-events: none;
}
.chart-tooltip strong { display: block; margin-bottom: 2px; font-size: 12px; }
.tooltip-place { display: block; margin-bottom: 3px; color: #b9d5e2; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.weather-tooltip .tooltip-place { color: #477189; }

.ai-card {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(63, 113, 141, .18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(235, 244, 246, .9), rgba(255, 255, 255, .84));
}
.ai-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ai-card h3 { margin: 9px 0 5px; font-family: "Onest", sans-serif; font-size: 21px; letter-spacing: -.03em; }
.ai-card-heading p { margin: 0; color: #64757c; font-size: 12px; }
.ai-status { min-height: 18px; margin-top: 14px; color: #6c7d84; font-size: 11px; }
.ai-result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; font-size: 15px; line-height: 1.65; }
.ai-summary { grid-column: 1 / -1; margin: 0 0 8px; color: #294552; font-size: 18px; line-height: 1.55; }
.ai-analysis { grid-column: 1 / -1; margin: 0; color: #465b64; font-size: 15px; line-height: 1.65; }
.ai-result article { grid-column: 1 / -1; padding: 13px; border: 1px solid rgba(63, 113, 141, .14); border-radius: 11px; background: rgba(255, 255, 255, .72); }
.ai-result h4 { margin: 0 0 6px; color: #2e5b72; font-size: 12px; }
.ai-result article p { margin: 0; color: #465b64; font-size: 11px; line-height: 1.5; }
.ai-result article a { color: #2e6d8a; margin-left: 4px; }
.ai-disclaimer { grid-column: 1 / -1; color: #78888e; font-size: 12px; line-height: 1.5; }
.ai-result article small { display: block; margin-top: 7px; color: #78888e; font-size: 10px; line-height: 1.4; }

footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 35px;
  border-top: 1px solid var(--line);
  color: #7f8b90;
  font-size: 11px;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--blue-dark); }

@media (max-width: 1100px) {
  .search-card { grid-template-columns: 1fr; }
  .search-variant { grid-template-columns: 1fr; }
  .form-actions { width: 100%; grid-column: 1; }
  .form-note, .search-card.comparison-enabled .form-note { grid-row: auto; }
  .search-card.comparison-enabled .form-actions { grid-row: auto; }
  .city-field { grid-column: auto; }
  .submit-button { width: 100%; }
}

@media (max-width: 900px) {
  .hero { padding-top: 80px; }
  .metric-toolbar { align-items: stretch; flex-direction: column-reverse; }
  .metric-tabs { width: 100%; }
  .metric-tabs button { flex: 1; }
  .period-toggle { align-self: flex-end; }
  .chart-meta-row { align-items: flex-start; flex-direction: column; }
  .weather-key { width: 100%; align-items: flex-start; justify-content: flex-start; flex-direction: column; gap: 9px; }
  .results-heading { align-items: flex-start; flex-direction: column; }
  .comparison-labels { top: 3px; right: 0; left: 0; }
  .comparison-label { margin-left: 8px; }
  .comparison-label-layer:nth-child(2) .comparison-label { margin-right: 8px; }
  .comparison-label { max-width: 48%; padding: 6px 8px; font-size: 9px; line-height: 1.25; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 70px; }
  .source-pill { display: none; }
  .brand small { display: none; }
  .hero { min-height: 700px; padding: 68px 0 120px; }
  h1 { font-size: clamp(39px, 12vw, 57px); }
  .hero-copy { font-size: 14px; }
  .search-card { display: block; margin-top: 32px; padding: 14px; }
  .search-variant { display: block; }
  .search-card.comparison-enabled .variant-two { margin-top: 15px; }
  .search-variant legend { margin-bottom: 12px; }
  .date-pair { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .date-dash { display: none; }
  .date-selects { grid-template-columns: 70px minmax(130px, 1fr); }
  .submit-button { width: 100%; margin-top: 16px; }
  .form-actions { display: grid; min-width: 0; grid-template-columns: 1fr; }
  .compare-button, .remove-comparison { width: 100%; }
  .form-note { margin-top: 10px; }
  .form-message { margin-top: 10px; }
  .results { margin-right: 0; margin-bottom: 55px; margin-left: 0; padding: 50px 0 0; }
  .legend { gap: 10px 14px; }
  .period-toggle { width: 100%; }
  .period-toggle button { min-width: 0; flex: 1; }
  .metric-tabs { justify-content: flex-start; }
  .metric-tabs button { flex: none; }
  .chart-card { padding: 18px 12px 8px; border-radius: 18px; }
  .weather-key-primary { width: 100%; gap: 8px; justify-content: space-between; }
  .weather-key-primary > span { font-size: 9px; }
  .weather-ribbon { height: 390px; padding-top: 8px; }
  .weather-day { grid-template-rows: minmax(0, 1fr) 26px; gap: 6px; }
  .chart-tooltip.weather-tooltip { position: fixed; top: auto !important; right: 8px; bottom: 8px; left: 8px !important; width: auto; max-height: calc(100vh - 16px); overflow-y: auto; }
  footer { gap: 12px; flex-direction: column; }
  .ai-card-heading { flex-direction: column; }
  .ai-result { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
