/* WCAG AA contrast against --color-page-bg (#101318): primary #f4f7fb = 17.32:1; secondary #aab4c3 = 8.89:1. */
:root {
  color-scheme: dark;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-page-bg: #101318;
  --color-surface-elevated: #171c23;
  --color-surface-strong: #202733;
  --color-text-primary: #f4f7fb;
  --color-text-secondary: #aab4c3;
  --color-border-subtle: #2d3644;
  --color-icon: var(--color-text-primary);
  --color-accent: #6ee7d8;
  --color-sun: #ffd166;
  --color-rain: #72d6bf;
  --color-wind: #d0d4dc;
  --color-humidity: #b8c7a6;
  --color-danger: #ff6b6b;
  --color-uv-low: #69db7c;
  --color-uv-moderate: #ffd43b;
  --color-uv-high: #ff922b;
  --color-uv-very-high: #ff6b6b;
  --color-uv-extreme: #d0a2ff;
  --color-threshold-very-low: #80ccff;
  --color-threshold-low: #8ce2d0;
  --color-threshold-medium: #ffd166;
  --color-threshold-high: #ff922b;
  --color-threshold-very-high: #ff8585;
  --shadow-sticky: 0 10px 28px rgba(0, 0, 0, 0.3);
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 24px;
  --attribution-footer-reserved-height: 48px;
  --app-shell-narrow-max-width: 720px;
  --app-shell-wide-max-width: 1180px;
  --font-size-headline-number: 2rem;
  --font-size-body: 1rem;
  --font-size-title: 1.18rem;
  --font-size-section-title: 1.05rem;
  --font-size-label: 0.9rem;
  --font-size-small-label: 0.78rem;
  --font-size-caption: 0.82rem;
  --font-size-micro-label: 0.76rem;
  --font-weight-body: 400;
  --font-weight-supporting-label: 500;
  --font-weight-headline-number: 700;
  --font-weight-strong: 700;
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-page-bg);
}

body {
  overflow-x: hidden;
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 209, 102, 0.08), transparent 240px),
    var(--color-page-bg);
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(100%, var(--app-shell-narrow-max-width));
  margin: 0 auto;
  padding: 0 var(--space-5) calc(var(--space-6) + var(--attribution-footer-reserved-height) + env(safe-area-inset-bottom));
}

.weather-header {
  position: relative;
  margin: 0 calc(0px - var(--space-5));
  padding: calc(var(--space-5) + var(--space-1)) var(--space-5) calc(var(--space-4) + var(--space-1));
  background: var(--color-page-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sticky);
  color: var(--color-text-primary);
  backdrop-filter: blur(18px);
}

.brand-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto var(--space-4);
}

.header-language-controls {
  position: absolute;
  z-index: 1;
  top: var(--space-3);
  right: var(--space-5);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.header-top,
.settings-header,
.location-search-overlay-header,
.toggle-row,
.hour-row,
.headline {
  display: flex;
  align-items: center;
}

.header-top {
  justify-content: space-between;
  gap: var(--space-5);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2);
}

.header-location {
  min-width: 0;
  flex: 1 1 auto;
}

.location-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.eyebrow,
.metric-label,
.updated-line,
.toggle-caption {
  color: var(--color-text-secondary);
}

.eyebrow {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-supporting-label);
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-strong);
}

#location-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.close-button {
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-strong);
  color: var(--color-icon);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon-button:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.icon-button:disabled {
  color: var(--color-text-secondary);
  opacity: 0.66;
}

.headline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
  min-height: 92px;
  margin-top: var(--space-4);
  align-items: stretch;
}

.headline-metric {
  display: grid;
  min-width: 0;
  align-self: stretch;
  align-content: center;
  padding: var(--space-3) var(--space-1);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.headline-metric[hidden] {
  display: none;
}

.headline-metric-secondary {
  padding: var(--space-3) var(--space-1);
}

.metric-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
}

.headline .metric-label {
  overflow-wrap: normal;
  font-size: 0.64rem;
}

.metric-label-unit {
  white-space: nowrap;
}

.headline-value {
  display: block;
  min-height: 2.25rem;
  font-size: var(--font-size-headline-number);
  font-weight: var(--font-weight-headline-number);
  line-height: 1.1;
  white-space: nowrap;
}

.headline-value::after {
  content: "";
  display: none;
}

.headline-value-secondary {
  min-height: 2.25rem;
  font-size: var(--font-size-headline-number);
}

.headline-value:where(.metric-value-rain, .metric-value-wind, .metric-value-humidity) {
  font-size: var(--font-size-headline-number);
  font-weight: var(--font-weight-headline-number);
}

.headline-context {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-height: 1rem;
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
  font-size: 0.6rem;
  font-weight: var(--font-weight-supporting-label);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}

.headline-context-label,
.headline-context-divider {
  color: var(--color-text-secondary);
}

.headline-context :where(
  .metric-value-temperature,
  .metric-value-uv,
  .metric-value-rain,
  .metric-value-wind,
  .metric-value-humidity
) {
  font-size: inherit;
  font-weight: inherit;
}

.headline-all-metrics {
  gap: var(--space-2);
}

.headline-all-metrics .headline-metric {
  padding: var(--space-3) var(--space-1);
}

.headline-all-metrics .headline-metric-secondary {
  min-width: 60px;
  padding: var(--space-3) var(--space-1);
}

.headline-all-metrics .headline-value {
  min-height: 2.25rem;
  font-size: var(--font-size-headline-number);
}

.headline-all-metrics .headline-value-secondary,
.headline-all-metrics .headline-value:where(.metric-value-rain, .metric-value-wind, .metric-value-humidity) {
  min-height: 2.25rem;
  font-size: var(--font-size-headline-number);
}

.headline-all-metrics .headline-context {
  gap: var(--space-1);
  font-size: 0.6rem;
}

.updated-line {
  margin-top: calc(var(--space-3) + var(--space-1));
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-body);
}

.updated-line time {
  font-variant-numeric: tabular-nums;
}

.attribution-footer {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  width: min(100%, 720px);
  transform: translateX(-50%);
  padding: var(--space-2) var(--space-5) calc(var(--space-2) + env(safe-area-inset-bottom));
  background: rgba(16, 19, 24, 0.92);
  border-top: 1px solid rgba(45, 54, 68, 0.82);
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(14px);
}

.attribution-footer a {
  color: #b6ded8;
  font-weight: var(--font-weight-supporting-label);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.attribution-footer a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--color-accent);
  outline-offset: var(--space-1);
}

.top-view-strip {
  margin: 0 calc(0px - var(--space-5));
  padding: var(--space-4) var(--space-5) 0;
  background: var(--color-page-bg);
  backdrop-filter: blur(14px);
}

.top-view-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
  width: 100%;
  margin: 0;
  padding: var(--space-1);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.top-view-option {
  position: relative;
  min-width: 0;
}

.top-view-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  appearance: none;
}

.top-view-label {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  border-radius: 6px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
  text-align: center;
}

.top-view-input:checked + .top-view-label {
  background: var(--color-accent);
  color: var(--color-page-bg);
}

.top-view-input:focus-visible + .top-view-label {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-1);
}

.top-view-input:not(:checked):focus-visible + .top-view-label {
  color: var(--color-text-primary);
}

.day-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  margin: 0 calc(0px - var(--space-5));
  padding: var(--space-4) var(--space-5);
  background: var(--color-page-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  backdrop-filter: blur(14px);
}

.day-strip[data-day-pills-overflow="true"] {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.day-pills-scroll-button {
  display: grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--color-border-subtle);
  border-radius: 50%;
  background: var(--color-surface-strong);
  color: var(--color-text-primary);
}

.day-pills-scroll-button[hidden] {
  display: none;
}

.day-pills-scroll-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.day-pills-scroll-button:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.day-pills-scroll-button:disabled {
  color: var(--color-text-secondary);
  cursor: default;
  opacity: 0.66;
}

.day-pills {
  display: flex;
  min-width: 0;
  gap: var(--space-3);
  overflow-x: auto;
  max-width: 100%;
  padding: 0;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.day-pills::-webkit-scrollbar {
  display: none;
}

.day-pill {
  min-width: 80px;
  min-height: 52px;
  flex: 0 0 auto;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
}

.day-pill[aria-current="date"] {
  border-color: var(--color-accent);
  background: var(--color-surface-strong);
  box-shadow:
    inset 0 0 0 1px var(--color-accent),
    0 0 0 3px rgba(110, 231, 216, 0.14);
}

.day-pill-label,
.day-pill-date {
  display: block;
}

.day-pill-label {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.day-pill-date {
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
}

.day-pill[aria-current="date"] .day-pill-date {
  color: var(--color-text-primary);
}

.daily-summary[hidden],
.daily-list[hidden],
.day-strip[hidden],
.hourly-list[hidden] {
  display: none;
}

.daily-summary {
  padding: var(--space-4) 0 0;
}

.daily-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.daily-row {
  display: grid;
  width: 100%;
  min-height: 108px;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  text-align: left;
}

.daily-row[aria-current="date"] {
  border-color: var(--color-accent);
  background: var(--color-surface-strong);
  box-shadow:
    inset 0 0 0 1px var(--color-accent),
    0 0 0 3px rgba(110, 231, 216, 0.14);
}

.daily-row:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.daily-day {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.daily-day-label {
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
}

.daily-day-date {
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.15;
}

.daily-metrics {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
}

.daily-metric {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}

.daily-metric .metric-label {
  margin-bottom: 0;
  font-size: var(--font-size-micro-label);
  line-height: 1.05;
}

.daily-metric-value {
  min-height: 1.15rem;
  font-size: var(--font-size-caption);
  line-height: 1.1;
  white-space: nowrap;
}

.daily-metric-detail {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 560px) {
  .daily-row {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
  }

  .daily-day {
    display: grid;
    gap: var(--space-1);
  }

  .daily-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.hourly-charts[hidden] {
  display: none;
}

.hourly-charts {
  overflow-x: clip;
  padding: var(--space-4) 0 var(--space-3);
}

.chart-mode-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  margin: 0 0 var(--space-3);
  padding: var(--space-1);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.chart-mode-option {
  position: relative;
  min-width: 0;
}

.chart-mode-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  appearance: none;
}

.chart-mode-label {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  border-radius: 6px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
  text-align: center;
}

.chart-mode-input:checked + .chart-mode-label {
  background: var(--color-accent);
  color: var(--color-page-bg);
}

.chart-mode-input:focus-visible + .chart-mode-label {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-1);
}

.chart-mode-input:not(:checked):focus-visible + .chart-mode-label {
  color: var(--color-text-primary);
}

.overlay-chart {
  --chart-left-color: var(--color-threshold-very-high);
  --chart-right-color: var(--color-uv-moderate);
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: var(--space-3) var(--space-2) var(--space-2);
  overflow-x: clip;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.overlay-chart[hidden] {
  display: none;
}

.secondary-overlay-chart {
  margin-top: var(--space-2);
}

.secondary-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-1) var(--space-2) 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.secondary-chart-legend[hidden] {
  display: none;
}

.secondary-chart-legend-entry {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
  color: var(--color-text-primary);
}

.secondary-chart-legend-swatch {
  flex: 0 0 auto;
  width: 12px;
  height: 8px;
  background: var(--legend-color, var(--color-border-subtle));
  border: 1px solid rgba(244, 247, 251, 0.28);
  border-radius: 999px;
}

.secondary-chart-legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peak-ranges-panel {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: var(--space-3);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.peak-ranges-panel[hidden] {
  display: none;
}

.peak-range-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.peak-range-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-3);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.peak-range-swatch {
  width: 10px;
  height: 100%;
  min-height: 34px;
  background: var(--peak-range-color, var(--color-border-subtle));
  border-radius: 999px;
}

.peak-range-copy,
.peak-range-peak {
  display: grid;
  min-width: 0;
}

.peak-range-copy {
  gap: var(--space-2);
}

.peak-range-trigger {
  display: block;
  width: 100%;
  min-width: 0;
  margin: calc(-1 * var(--space-2));
  padding: var(--space-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  font: inherit;
  text-align: left;
  outline: 0;
  cursor: pointer;
}

.peak-range-trigger:hover {
  border-color: var(--color-border-subtle);
  background: var(--color-surface-elevated);
}

.peak-range-trigger:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.peak-range-options {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.peak-range-options[hidden] {
  display: none;
}

.peak-range-option {
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  color: var(--color-text-primary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
  cursor: pointer;
}

.peak-range-option[data-active="true"],
.peak-range-option[aria-selected="true"] {
  background: var(--color-surface-elevated);
}

.peak-range-option[data-active="true"] {
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.peak-range-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.25;
}

.peak-range-band {
  color: var(--peak-range-color, var(--color-text-primary));
}

.peak-range-hours,
.peak-range-peak-label,
.peak-ranges-empty {
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.peak-range-title .peak-range-hours {
  color: var(--color-text-primary);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.peak-range-hours,
.peak-range-peak-value {
  font-variant-numeric: tabular-nums;
}

.peak-range-peak {
  justify-items: end;
  gap: var(--space-1);
}

.peak-range-peak-value {
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
}

.peak-ranges-empty {
  margin: 0;
  padding: var(--space-4);
  text-align: center;
}

.overlay-chart-svg {
  display: block;
  width: 100%;
  height: 196px;
  overflow: visible;
}

.threshold-chart .overlay-chart-svg {
  height: var(--threshold-chart-height, 150px);
}

.overlay-chart-grid-line,
.overlay-chart-vertical-tick {
  stroke: var(--color-text-secondary);
  stroke-opacity: 0.16;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-vertical-tick {
  stroke-opacity: 0.11;
}

.secondary-overlay-chart-lane-divider {
  stroke: var(--color-border-subtle);
  stroke-opacity: 0.75;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-now-marker {
  stroke: var(--color-text-primary);
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-opacity: 0.38;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-axis-line,
.overlay-chart-axis-tick {
  stroke: currentColor;
  stroke-opacity: 0.5;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-axis-temperature .overlay-chart-axis-line,
.overlay-chart-axis-temperature .overlay-chart-axis-tick {
  stroke-dasharray: none;
  stroke-linecap: round;
  stroke-opacity: 0.86;
}

.overlay-chart-axis-temperature .overlay-chart-axis-line {
  stroke-width: 1.5;
}

.overlay-chart-axis-temperature .overlay-chart-axis-tick {
  stroke-width: 1.25;
}

.overlay-chart-axis-uv .overlay-chart-axis-line,
.overlay-chart-axis-uv .overlay-chart-axis-tick {
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  stroke-width: 1.35;
}

.overlay-chart-axis-left {
  color: var(--chart-left-color);
}

.overlay-chart-axis-right {
  color: var(--chart-right-color);
}

.secondary-overlay-chart-axis {
  color: var(--chart-lane-color);
}

.overlay-chart-x-axis {
  color: var(--color-text-secondary);
}

.overlay-chart-axis-label,
.overlay-chart-tick-label,
.overlay-chart-x-label {
  fill: currentColor;
  font-variant-numeric: tabular-nums;
}

.overlay-chart-axis-label {
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-strong);
}

.overlay-chart-tick-label,
.overlay-chart-x-label {
  font-size: 0.68rem;
  font-weight: var(--font-weight-supporting-label);
}

.overlay-chart-x-label {
  fill: var(--color-text-secondary);
}

.uv-threshold-title,
.uv-threshold-tick-label,
.uv-threshold-legend-label {
  fill: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.uv-threshold-title {
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-strong);
}

.uv-threshold-tick-label {
  font-size: 0.68rem;
  font-weight: var(--font-weight-supporting-label);
}

.uv-threshold-legend-label {
  font-size: 0.7rem;
  font-weight: var(--font-weight-supporting-label);
}

.uv-threshold-tick-line {
  stroke: var(--color-text-secondary);
  stroke-opacity: 0.12;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.uv-threshold-segment {
  stroke: var(--color-page-bg);
  stroke-opacity: 0.78;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.uv-threshold-segment.uv-low {
  color: var(--color-uv-low);
  fill: var(--color-threshold-very-low);
}

.uv-threshold-segment.uv-moderate {
  color: var(--color-uv-moderate);
  fill: var(--color-threshold-low);
}

.uv-threshold-segment.uv-high {
  color: var(--color-uv-high);
  fill: var(--color-threshold-medium);
}

.uv-threshold-segment.uv-very-high {
  color: var(--color-uv-very-high);
  fill: var(--color-threshold-high);
}

.uv-threshold-segment.uv-extreme {
  color: var(--color-uv-extreme);
  fill: var(--color-threshold-very-high);
}

.temperature-threshold-segment {
  vector-effect: non-scaling-stroke;
}

.temperature-threshold-legend-swatch {
  vector-effect: non-scaling-stroke;
}

.uv-threshold-no-data-fill {
  fill: var(--color-border-subtle);
}

.uv-threshold-no-data-stripe {
  stroke: var(--color-text-secondary);
  stroke-opacity: 0.5;
  stroke-width: 1;
}

.uv-threshold-legend-swatch {
  stroke: var(--color-page-bg);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.uv-threshold-legend-swatch.uv-low {
  fill: var(--color-threshold-very-low);
}

.uv-threshold-legend-swatch.uv-moderate {
  fill: var(--color-threshold-low);
}

.uv-threshold-legend-swatch.uv-high {
  fill: var(--color-threshold-medium);
}

.uv-threshold-legend-swatch.uv-very-high {
  fill: var(--color-threshold-high);
}

.uv-threshold-legend-swatch.uv-extreme {
  fill: var(--color-threshold-very-high);
}

.uv-threshold-legend-swatch.uv-threshold-no-data {
  fill: var(--color-border-subtle);
}

.uv-threshold-now-marker {
  stroke: var(--color-text-primary);
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-opacity: 0.48;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-series {
  color: var(--chart-series-color, var(--color-accent));
}

.overlay-chart-series-area {
  fill-opacity: 0.16;
}

.overlay-chart-series-line {
  fill: none;
  filter: drop-shadow(0 1px 2px rgba(16, 19, 24, 0.72));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.overlay-chart-series-temperature .overlay-chart-series-area {
  fill-opacity: 0.1;
}

.overlay-chart-series-temperature .overlay-chart-series-line {
  stroke-width: 3.25;
}

.overlay-chart-series-uv .overlay-chart-series-area {
  fill-opacity: 0.04;
}

.overlay-chart-series-uv .overlay-chart-series-line {
  stroke-dasharray: 5 4;
  stroke-width: 3;
}

.overlay-chart-series-rain .overlay-chart-series-area {
  fill-opacity: 0.2;
}

.overlay-chart-series-rain .overlay-chart-series-line {
  stroke-width: 2.35;
}

.overlay-chart-series-wind .overlay-chart-series-area {
  fill-opacity: 0;
}

.overlay-chart-series-wind .overlay-chart-series-line {
  stroke-dasharray: 7 5;
  stroke-width: 2.2;
}

.secondary-overlay-chart .overlay-chart-series-humidity .overlay-chart-series-area {
  fill-opacity: 0;
}

.secondary-overlay-chart .overlay-chart-series-humidity .overlay-chart-series-line {
  stroke-dasharray: 2 5;
  stroke-linecap: round;
  stroke-width: 2.25;
}

.overlay-chart-empty-hint {
  fill: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
}

.hourly-list {
  --hourly-list-height: clamp(260px, calc(100dvh - 270px), 620px);
  display: grid;
  gap: var(--space-2);
  height: var(--hourly-list-height);
  max-height: calc(100dvh - var(--space-6));
  overflow-y: auto;
  margin: 0;
  padding-top: var(--space-3);
  padding-bottom: max(var(--space-3), calc(var(--hourly-list-height) - 64px));
  padding-left: 0;
  list-style: none;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.hour-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.hour-time {
  min-width: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hour-metrics {
  display: grid;
  min-width: 0;
  width: 100%;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: var(--space-2) var(--space-3);
}

.hour-metric {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 38px;
  gap: var(--space-1);
}

.hour-row .metric-label {
  margin-bottom: 0;
  font-size: var(--font-size-micro-label);
  line-height: 1.05;
}

.metric-value {
  display: block;
  min-height: 1.2rem;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.metric-value-temperature {
  color: var(--metric-color);
}

.metric-value-temperature,
.metric-value-uv {
  font-weight: var(--font-weight-headline-number);
}

.metric-value-rain {
  color: var(--color-rain);
}

.metric-value-wind {
  color: var(--color-wind);
}

.metric-value-humidity {
  color: var(--color-humidity);
}

.metric-value-rain,
.metric-value-wind,
.metric-value-humidity {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
}

.uv-low {
  color: var(--color-uv-low);
}

.uv-moderate {
  color: var(--color-uv-moderate);
}

.uv-high {
  color: var(--color-uv-high);
}

.uv-very-high {
  color: var(--color-uv-very-high);
}

.uv-extreme {
  color: var(--color-uv-extreme);
}

.settings-sheet[hidden] {
  display: none;
}

.settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  color: var(--color-text-primary);
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.48);
}

.settings-panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 720px);
  max-height: min(92dvh, 760px);
  overflow-y: auto;
  margin: 0 auto;
  padding: calc(var(--space-5) + var(--space-1)) var(--space-5) calc(var(--space-6) + var(--space-1));
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-sticky);
  color: var(--color-text-primary);
}

.settings-header {
  justify-content: space-between;
  margin-bottom: calc(var(--space-4) + var(--space-1));
}

.about-modal[hidden] {
  display: none;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  color: var(--color-text-primary);
}

.about-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.48);
}

.about-panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 720px);
  max-height: min(86dvh, 640px);
  overflow-y: auto;
  gap: var(--space-4);
  margin: 0 auto;
  padding: calc(var(--space-5) + var(--space-1)) var(--space-5) calc(var(--space-6) + var(--space-1));
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-sticky);
}

.about-panel:focus {
  outline: 0;
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.about-body {
  display: grid;
  gap: var(--space-4);
}

.about-summary {
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.35;
}

.about-source-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-source-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.about-source-title {
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.about-source-line {
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.about-source-label {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-supporting-label);
}

.about-source-line a {
  color: #b6ded8;
  font-weight: var(--font-weight-supporting-label);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.about-source-line a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--color-accent);
  outline-offset: var(--space-1);
}

h2 {
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-strong);
}

h3 {
  margin: 0;
}

.close-button {
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: 8px;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-supporting-label);
}

.close-button:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.settings-section {
  display: grid;
  gap: var(--space-3);
}

.settings-section + .settings-section {
  margin-top: var(--space-5);
}

.settings-section-title,
.location-search-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-supporting-label);
  text-transform: uppercase;
}

.location-search {
  display: grid;
  gap: var(--space-3);
}

.location-search-trigger {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-self: start;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.location-search-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.location-search-trigger:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.location-actions {
  display: grid;
  gap: var(--space-2);
}

.use-location-button {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-strong);
}

.use-location-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: currentColor;
}

.use-location-button:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.use-location-button:disabled {
  color: var(--color-text-secondary);
  opacity: 0.66;
}

.geolocation-status {
  min-height: 1.25rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.location-search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-4);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  outline: 0;
}

.location-search-input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.92;
}

.location-search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.location-search-status {
  min-height: 1.25rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.location-search-retry[hidden] {
  display: none;
}

.location-search-retry {
  justify-self: start;
  min-height: 40px;
  padding: 0 var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.location-search-retry:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.location-search-results {
  display: grid;
  min-height: 172px;
  max-height: min(34dvh, 260px);
  overflow-y: auto;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.location-search-overlay[hidden] {
  display: none;
}

.location-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  color: var(--color-text-primary);
}

.location-search-overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.36);
}

.location-search-overlay-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 720px);
  max-height: min(86dvh, 640px);
  overflow-y: auto;
  gap: var(--space-3);
  margin: 0 auto;
  padding: var(--space-5);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-sticky);
}

.location-search-overlay-header {
  justify-content: space-between;
  gap: var(--space-3);
}

.location-presets {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

.location-presets-title,
.location-preset-select-label {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
  text-transform: uppercase;
}

.location-presets-status {
  min-height: 1.25rem;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.location-presets-status[hidden],
.location-preset-selects[hidden] {
  display: none;
}

.location-preset-selects,
.location-preset-select-label {
  display: grid;
  gap: var(--space-2);
}

.location-preset-selects {
  gap: var(--space-3);
}

.location-preset-select {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  outline: 0;
}

.location-preset-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.location-preset-select:disabled {
  color: var(--color-text-secondary);
  opacity: 0.66;
}

.location-result {
  display: grid;
  width: 100%;
  min-height: 58px;
  gap: var(--space-1);
  justify-items: start;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  text-align: left;
}

.location-result:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.location-result:disabled {
  color: var(--color-text-secondary);
  opacity: 0.68;
}

.location-result-name,
.location-result-meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.location-result-name {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.location-result-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.storage-consent-form {
  display: grid;
  gap: var(--space-3);
}

.storage-choice-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
}

.storage-choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  appearance: none;
}

.storage-choice-indicator {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 50%;
}

.storage-choice-indicator::after {
  display: block;
  width: 10px;
  height: 10px;
  background: transparent;
  border-radius: 50%;
  content: "";
}

.storage-choice-input:checked + .storage-choice-indicator {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.14);
}

.storage-choice-input:checked + .storage-choice-indicator::after {
  background: var(--color-accent);
}

.storage-choice-input:focus-visible + .storage-choice-indicator {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-2);
}

.storage-choice-copy {
  min-width: 0;
}

.storage-consent-status {
  min-height: 1.25rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.language-button {
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.header-language-button {
  width: 40px;
  min-height: 32px;
  flex: 0 0 40px;
  padding: var(--space-2);
  background: rgba(32, 39, 51, 0.88);
  backdrop-filter: blur(8px);
}

.header-language-button[aria-pressed="false"] {
  opacity: 0.72;
}

.language-button[aria-pressed="true"] {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.14);
}

.language-button:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-2);
}

.language-flag {
  display: block;
  width: 24px;
  height: 16px;
  flex: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgba(244, 247, 251, 0.58);
  border-radius: 3px;
}

.header-language-button .language-flag {
  width: 28px;
  height: 18px;
  flex-basis: 28px;
}

.header-language-button .language-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.language-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.metric-form {
  display: grid;
  gap: calc(var(--space-3) + var(--space-1));
}

.plot-layout-settings-section[hidden] {
  display: none;
}

.plot-layout-form {
  display: grid;
  gap: var(--space-2);
}

.plot-layout-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 0.72fr) minmax(178px, 1.28fr);
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.plot-layout-copy {
  min-width: 0;
}

.plot-layout-controls {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.plot-layout-control {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}

.plot-layout-control-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
}

.plot-layout-select {
  width: 100%;
  min-height: 42px;
  padding: 0 var(--space-3);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-supporting-label);
  outline: 0;
}

.plot-layout-axis-select {
  width: 100%;
  min-height: 42px;
  padding: 0 var(--space-3);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-supporting-label);
  outline: 0;
}

.plot-layout-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.plot-layout-axis-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.plot-layout-summary {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.plot-layout-summary-item {
  display: flex;
  min-width: 0;
  min-height: 40px;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.plot-layout-summary-title {
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
}

.plot-layout-summary-metrics {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.plot-layout-summary-metric {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--space-2);
  overflow-wrap: anywhere;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  color: var(--color-text-primary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
}

.daily-aggregate-form {
  display: grid;
  gap: calc(var(--space-3) + var(--space-1));
}

.daily-aggregate-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.95fr);
  align-items: center;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.daily-aggregate-title {
  min-width: 0;
  padding: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.daily-aggregate-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-1);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.daily-aggregate-mode-option {
  position: relative;
  min-width: 0;
}

.daily-aggregate-mode-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  appearance: none;
}

.daily-aggregate-mode-label {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-2);
  border-radius: 6px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-small-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
  text-align: center;
}

.daily-aggregate-mode-input:checked + .daily-aggregate-mode-label {
  background: var(--color-accent);
  color: var(--color-page-bg);
}

.daily-aggregate-mode-input:focus-visible + .daily-aggregate-mode-label {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-1);
}

.toggle-row {
  position: relative;
  min-height: 64px;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
}

.toggle-copy {
  min-width: 0;
}

.toggle-title,
.toggle-caption {
  display: block;
}

.toggle-title {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.toggle-caption {
  margin-top: var(--space-1);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  appearance: none;
}

.toggle-switch {
  display: inline-flex;
  width: 52px;
  height: 32px;
  flex: 0 0 52px;
  align-items: center;
  padding: var(--space-2);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(244, 247, 251, 0.04);
}

.toggle-knob {
  display: block;
  width: 22px;
  height: 22px;
  background: var(--color-text-secondary);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.toggle-input:checked + .toggle-switch {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.toggle-input:checked + .toggle-switch .toggle-knob {
  transform: translateX(20px);
  background: var(--color-page-bg);
}

.toggle-input:focus-visible + .toggle-switch {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-2);
}

.toggle-input:disabled + .toggle-switch {
  opacity: 0.5;
}

.toggle-row input {
  flex: 0 0 auto;
}

.threshold-form {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.threshold-form + .threshold-form {
  margin-top: var(--space-4);
}

.threshold-form-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.threshold-picker-grid {
  display: grid;
  gap: var(--space-3);
}

.threshold-select-label,
.threshold-mode-legend {
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.threshold-select-label {
  display: grid;
  gap: var(--space-2);
}

.threshold-select {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  outline: 0;
}

.threshold-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.threshold-mode-fieldset {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.threshold-mode-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.threshold-mode-option {
  position: relative;
  min-width: 0;
}

.threshold-mode-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  appearance: none;
}

.threshold-mode-label {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-2);
  border-radius: 6px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-strong);
  line-height: 1.1;
  text-align: center;
}

.threshold-mode-input:checked + .threshold-mode-label {
  background: var(--color-accent);
  color: var(--color-page-bg);
}

.threshold-mode-input:focus-visible + .threshold-mode-label {
  outline: 2px solid var(--color-text-primary);
  outline-offset: var(--space-1);
}

.threshold-mode-grid {
  display: grid;
  gap: var(--space-3);
}

.threshold-summary {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.threshold-summary-label,
.threshold-input-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.2;
}

.threshold-input-label {
  display: grid;
  gap: var(--space-2);
}

.threshold-band-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.threshold-band-row {
  display: grid;
  grid-template-areas:
    "swatch name input"
    "swatch range input";
  grid-template-columns: 12px minmax(0, 1fr) minmax(98px, 116px);
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-height: 62px;
  padding: var(--space-3);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}

.threshold-band-swatch {
  grid-area: swatch;
  width: 12px;
  height: 100%;
  min-height: 36px;
  background: var(--threshold-band-color, var(--color-accent));
  border-radius: 999px;
}

.threshold-band-name {
  grid-area: name;
  min-width: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  line-height: 1.15;
}

.threshold-band-range {
  grid-area: range;
  min-height: 1rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.threshold-cutoff-label {
  display: grid;
  grid-area: input;
  gap: var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--font-size-micro-label);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.1;
}

.threshold-terminal-label {
  grid-area: input;
  align-self: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  text-align: right;
}

.threshold-cutoff-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.threshold-cutoff-item {
  min-width: 42px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.threshold-input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--color-page-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.threshold-cutoff-input {
  min-height: 38px;
  padding: 0 var(--space-3);
}

.threshold-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
}

.threshold-input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.threshold-help,
.threshold-feedback {
  min-height: 1.2rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-supporting-label);
  line-height: 1.25;
}

.threshold-feedback[data-tone="error"] {
  color: var(--color-danger);
}

.threshold-feedback[data-tone="notice"],
.threshold-feedback[data-tone="success"] {
  color: var(--color-accent);
}

.threshold-actions {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
  gap: var(--space-3);
}

.threshold-save,
.threshold-reset {
  min-width: 0;
  min-height: 46px;
  padding: 0 var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.threshold-save {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-page-bg);
}

.threshold-save:disabled {
  background: var(--color-surface-strong);
  border-color: var(--color-border-subtle);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

.threshold-save:focus,
.threshold-reset:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  padding: var(--space-4) var(--space-5) calc(var(--space-4) + var(--attribution-footer-reserved-height) + env(safe-area-inset-bottom));
  pointer-events: none;
}

.consent-panel {
  position: relative;
  display: grid;
  width: min(100%, 720px);
  gap: var(--space-4);
  margin: 0 auto;
  padding: var(--space-5);
  padding-right: calc(var(--space-5) + 36px);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-sticky);
  color: var(--color-text-primary);
  pointer-events: auto;
}

.consent-copy {
  display: grid;
  gap: var(--space-2);
}

.consent-title {
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-strong);
  line-height: 1.2;
}

.consent-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-body);
  line-height: 1.35;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.consent-choice {
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-strong);
}

.consent-choice:focus,
.consent-dismiss:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 216, 0.16);
  outline: 0;
}

.consent-dismiss {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-subtle);
  border-radius: 50%;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: var(--font-weight-supporting-label);
  line-height: 1;
}

/* Responsive breakpoints:
   - Phone portrait: base rules for ~390px widths; single-column flow is unchanged.
   - Phone landscape: (orientation: landscape) and (min-width: 640px); switch to a two-column scaffold.
   - Desktop: (min-width: 960px); use the same wide scaffold, fluid up to --app-shell-wide-max-width. */
@media (min-width: 960px), (orientation: landscape) and (min-width: 640px) {
  .app-shell {
    display: grid;
    width: min(100%, var(--app-shell-wide-max-width));
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0 var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
    grid-auto-rows: max-content;
    grid-template-areas:
      "header header"
      "top-view top-view"
      "charts days"
      "charts forecast";
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
    grid-template-rows:
      max-content
      max-content
      max-content
      minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(var(--space-5), 3vw, var(--space-6));
  }

  .app-shell:has(> .daily-summary:not([hidden])) {
    grid-template-areas:
      "header header"
      "top-view top-view"
      "daily daily";
    grid-template-rows:
      max-content
      max-content
      minmax(0, 1fr);
  }

  .weather-header,
  .top-view-strip,
  .daily-summary,
  .day-strip,
  .hourly-charts,
  .app-shell > main {
    min-width: 0;
  }

  .weather-header {
    grid-area: header;
  }

  .brand-banner {
    max-width: 520px;
  }

  .headline {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
  }

  .headline-metric {
    justify-items: center;
    text-align: center;
  }

  .headline-context {
    justify-content: center;
  }

  .top-view-strip {
    grid-area: top-view;
  }

  .daily-summary {
    grid-area: daily;
    grid-column: 1 / -1;
    z-index: 1;
  }

  .daily-summary {
    min-height: 0;
    max-height: 100%;
    align-self: stretch;
    overflow-y: auto;
    padding-bottom: var(--space-3);
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .day-strip {
    grid-area: days;
  }

  .day-pills {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .day-pill {
    flex: 1 1 80px;
  }

  .hourly-charts {
    grid-area: charts;
  }

  .hourly-charts {
    min-height: 0;
    max-height: 100%;
    align-self: stretch;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell > main {
    grid-area: forecast;
  }

  .app-shell > main {
    display: grid;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
  }

  .app-shell > main:has(> .hourly-list[hidden]) {
    display: none;
  }

  .app-shell > main > .hourly-list {
    --hourly-list-height: 100%;
    height: var(--hourly-list-height);
    min-height: 0;
    max-height: 100%;
    padding-top: 0;
    padding-bottom: var(--space-3);
  }

  .settings-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(calc(100% - var(--space-5) - var(--space-5)), 720px);
    max-height: min(86dvh, 760px);
    margin: 0;
    border-radius: 8px;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 700px) {
  .headline {
    gap: var(--space-3);
  }

  .headline-metric,
  .headline-metric-secondary,
  .headline-all-metrics .headline-metric,
  .headline-all-metrics .headline-metric-secondary {
    padding: var(--space-4);
  }

  .metric-label-unit {
    display: none;
  }

  .headline .metric-label {
    overflow-wrap: normal;
    font-size: var(--font-size-small-label);
  }

  .headline-value::after {
    content: attr(data-value-unit);
    display: inline;
  }

  .headline-context,
  .headline-all-metrics .headline-context {
    font-size: var(--font-size-micro-label);
  }
}

@media (min-width: 960px), (orientation: landscape) and (min-width: 640px) {
  .weather-header {
    display: grid;
    grid-template-areas:
      "brand header-top languages"
      "brand headline headline"
      "brand updated updated";
    grid-template-columns: minmax(132px, 0.22fr) minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: clamp(var(--space-4), 2vw, var(--space-6));
    padding: var(--space-2) var(--space-5);
  }

  .header-language-controls {
    position: static;
    grid-area: languages;
    justify-self: end;
  }

  .brand-banner {
    grid-area: brand;
    width: 100%;
    max-width: clamp(120px, 17vw, 220px);
    margin-bottom: 0;
  }

  .header-top {
    grid-area: header-top;
    padding-top: 0;
  }

  .weather-header .eyebrow {
    margin-bottom: 0;
    font-size: 0.66rem;
  }

  .weather-header h1 {
    font-size: 1rem;
  }

  .weather-header .icon-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .weather-header .icon-button svg {
    width: 18px;
    height: 18px;
  }

  .headline {
    grid-area: headline;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-2);
    min-height: 54px;
    margin-top: var(--space-2);
  }

  .headline-metric,
  .headline-metric-secondary,
  .headline-all-metrics .headline-metric,
  .headline-all-metrics .headline-metric-secondary {
    padding: var(--space-2) var(--space-1);
  }

  .headline .metric-label {
    overflow-wrap: normal;
    margin-bottom: var(--space-1);
    font-size: 0.6rem;
  }

  .headline-value,
  .headline-value-secondary,
  .headline-all-metrics .headline-value,
  .headline-all-metrics .headline-value-secondary,
  .headline-value:where(.metric-value-rain, .metric-value-wind, .metric-value-humidity),
  .headline-all-metrics .headline-value:where(.metric-value-rain, .metric-value-wind, .metric-value-humidity) {
    min-height: 1.45rem;
    font-size: 1.25rem;
  }

  .headline-context,
  .headline-all-metrics .headline-context {
    min-height: 0.82rem;
    margin-top: var(--space-1);
    font-size: 0.58rem;
  }

  .updated-line {
    grid-area: updated;
    margin-top: var(--space-1);
    font-size: 0.72rem;
  }

  .top-view-strip,
  .day-strip {
    margin: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .top-view-strip {
    padding: var(--space-2) 0 0;
  }

  .top-view-label {
    min-height: 36px;
    font-size: var(--font-size-small-label);
  }

  .day-strip {
    padding: var(--space-2) 0;
    border-bottom: 0;
  }

  .day-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0;
  }

  .day-pill {
    min-width: 72px;
    min-height: 44px;
    flex: 0 0 72px;
    padding: var(--space-2) var(--space-3);
  }

  .day-pill-label,
  .day-pill-date {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hourly-charts {
    padding-top: var(--space-2);
  }

  .overlay-chart-svg,
  .threshold-chart .overlay-chart-svg {
    height: clamp(96px, calc(100dvh - 268px), 360px);
  }

  .hourly-charts:has(> .secondary-overlay-chart:not([hidden])) .overlay-chart-svg {
    height: clamp(96px, calc((100dvh - 290px) / 2), 240px);
  }
}

@media (orientation: landscape) and (min-width: 640px) and (max-height: 500px) {
  .weather-header {
    grid-template-columns: minmax(104px, 0.18fr) minmax(0, 1fr) max-content;
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
  }

  .brand-banner {
    max-width: 120px;
  }

  .weather-header .eyebrow {
    display: none;
  }

  .weather-header h1 {
    font-size: 0.95rem;
  }

  .weather-header .icon-button {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .weather-header .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .header-top,
  .location-title-row,
  .header-actions {
    gap: var(--space-2);
  }

  .headline {
    min-height: 46px;
    margin-top: var(--space-1);
  }

  .headline-metric,
  .headline-metric-secondary,
  .headline-all-metrics .headline-metric,
  .headline-all-metrics .headline-metric-secondary {
    padding: var(--space-1);
  }

  .headline .metric-label {
    margin-bottom: 0;
    font-size: 0.55rem;
  }

  .headline-value,
  .headline-value-secondary,
  .headline-all-metrics .headline-value,
  .headline-all-metrics .headline-value-secondary,
  .headline-value:where(.metric-value-rain, .metric-value-wind, .metric-value-humidity),
  .headline-all-metrics .headline-value:where(.metric-value-rain, .metric-value-wind, .metric-value-humidity) {
    min-height: 1.2rem;
    font-size: 1.05rem;
  }

  .headline-context,
  .headline-all-metrics .headline-context {
    min-height: 0.7rem;
    margin-top: 0;
    font-size: 0.52rem;
  }

  .updated-line {
    margin-top: 0;
    font-size: 0.68rem;
  }

  .chart-mode-label {
    min-height: 34px;
    font-size: var(--font-size-small-label);
  }

  .overlay-chart-svg,
  .threshold-chart .overlay-chart-svg {
    height: clamp(112px, calc(100dvh - 242px), 280px);
  }

  .hourly-charts:has(> .secondary-overlay-chart:not([hidden])) .overlay-chart-svg {
    height: 64px;
  }

  .secondary-overlay-chart {
    margin-top: var(--space-1);
  }

  .secondary-chart-legend {
    gap: var(--space-1) var(--space-3);
    padding-top: 0;
    font-size: 0.58rem;
  }

  .peak-ranges-panel {
    padding: var(--space-1);
  }

  .peak-range-list {
    gap: var(--space-1);
  }

  .peak-range-row {
    min-height: 28px;
    grid-template-columns: 6px minmax(0, 1fr);
    gap: var(--space-2);
    padding: var(--space-1);
  }

  .peak-range-swatch {
    width: 6px;
    min-height: 20px;
  }

  .peak-range-copy {
    gap: 0;
  }

  .peak-range-trigger {
    margin: 0;
    padding: 0;
  }

  .peak-range-title,
  .peak-range-peak-value {
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .peak-range-hours,
  .peak-range-peak-label,
  .peak-ranges-empty {
    font-size: 0.58rem;
  }
}
