#clima .ow-icon {
  width: 1.18em;
  height: 1.18em;
  flex: none;
  vertical-align: -.18em;
}

#clima .ow-chart {
  min-width: 0;
  margin: 18px 0;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #e2c8fd67;
  border-radius: 22px;
  background:
    linear-gradient(90deg, #f6a167, #cba7f0 66%, #8fc99e) top / 100% 3px no-repeat,
    radial-gradient(ellipse at top right, #584277 0%, #39284b 46%, #292035 100%);
  box-shadow: 0 12px 34px #170f2360;
  color: #fff5e7;
}

#clima .ow-chart-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}

#clima .ow-chart-head h3 {
  margin: 0;
  font: 500 clamp(1.4rem, 2.9vw, 2rem)/1.2 Oswald, sans-serif;
}

#clima .ow-chart-head .ow-icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 11px;
  color: #f9d8ff;
  background: #e0c9fc27;
}

#clima .ow-chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

#clima .ow-chart-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px 13px;
  border: 1px solid #fff5e74d;
  border-radius: 999px;
  background: #fff5e709;
  color: #fff5e7;
  font: 600 .8rem/1.2 Poppins, sans-serif;
  cursor: pointer;
}

#clima .ow-chart-filter:hover {
  border-color: var(--ow-factor-color, #e0c9fc);
  background: #f1d8ff29;
}

#clima .ow-chart-filter[aria-pressed="true"] {
  border-color: var(--ow-factor-color, #e0c9fc);
  background: var(--ow-factor-color, #e0c9fc);
  color: #312640;
}

#clima .ow-chart-canvas {
  display: block;
  width: 100%;
  height: clamp(162px, 23vw, 226px);
  margin-top: 13px;
  cursor: crosshair;
  touch-action: pan-y;
}

#clima .ow-chart-hour {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(8.5ch, auto);
  align-items: center;
  gap: 11px;
  margin: 4px 0 0;
  color: #f8eced;
  font-size: .77rem;
}

#clima .ow-chart-hour input {
  width: 100%;
  min-height: 30px;
  margin: 0;
  accent-color: var(--ow-active-factor, #86e7ad);
  cursor: pointer;
}

#clima .ow-chart-hour input:focus-visible {
  outline: 3px solid #ffc196;
  outline-offset: 2px;
  border-radius: 8px;
}

#clima .ow-chart-hour strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#clima .ow-chart-readings {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

#clima .ow-chart-reading {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #fff5e731;
  border-radius: 9px;
  background: #fff5e70d;
  font-size: .77rem;
  line-height: 1.35;
}

#clima .ow-chart-reading strong {
  font-variant-numeric: tabular-nums;
}

#clima .ow-chart-key {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}

@media (max-width: 560px) {
  #clima .ow-chart-filters { gap: 5px; }
  #clima .ow-chart-filter { min-height: 40px; padding: 5px 9px; font-size: .75rem; }
  #clima .ow-chart-hour { grid-template-columns: 1fr auto; row-gap: 0; }
  #clima .ow-chart-hour input { grid-column: 1 / -1; grid-row: 2; }
}

#clima .ow-chart[hidden], #clima .ow-chart-filter[hidden] { display: none; }
#clima .ow-chart-caption { margin: .75em 0 0; color: #f8eced; font-size: .8rem; line-height: 1.55; }

/* Branded Material 3 segmented group, followed by optional weather factors. */
#clima .ow-chart-heading { min-width: 0; }
#clima .ow-chart-context {
  margin: 5px 0 0;
  font: 600 .8rem/1.45 Poppins, sans-serif;
  color: #e8d9f6;
}
#clima .ow-chart-filters {
  display: flex;
  flex-wrap: nowrap;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d8c5eebe;
  border-radius: 17px;
  gap: 0;
}
#clima .ow-chart-filters .ow-chart-filter {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 7px clamp(5px, 1.7vw, 17px);
  background: transparent;
  color: #fff5e7;
}
#clima .ow-chart-filters .ow-chart-filter:not([hidden]) ~ .ow-chart-filter:not([hidden]) {
  border-inline-start: 1px solid #d8c5ee65;
}
#clima .ow-chart-filters .ow-chart-filter:first-of-type,
#clima .ow-chart-filters .ow-chart-filter:not([hidden]):not(.ow-chart-filter:not([hidden]) ~ .ow-chart-filter) {
  border-start-start-radius: 16px;
  border-end-start-radius: 16px;
}
#clima .ow-chart-filters .ow-chart-filter:not(:has(~ .ow-chart-filter:not([hidden]))) {
  border-start-end-radius: 16px;
  border-end-end-radius: 16px;
}
#clima .ow-chart-filters .ow-chart-filter:hover { background: #e4cbf438; }
#clima .ow-chart-filters .ow-chart-filter[aria-pressed="true"] {
  background: #e8d6fb;
  color: #332549;
}
#clima .ow-chart-filters .ow-chart-filter:focus-visible { position: relative; z-index: 2; }
#clima .ow-chart-extras { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
#clima .ow-chart-extras .ow-chart-filter { min-height: 44px; }
#clima :is(.ow-chart-filter, .ow-chart-filters, .ow-chart-extras)[hidden] { display: none; }
@media (max-width: 560px) {
  #clima .ow-chart-filters { width: 100%; }
  #clima .ow-chart-filters .ow-chart-filter { gap: 4px; }
}
@media (max-width: 389px) {
  #clima .ow-chart-filters .ow-chart-filter { font-size: .71rem; }
}

/* Calm layout; optional factors remain available without crowding the plot. */
#clima .ow-chart { padding: clamp(16px, 4vw, 30px); }
#clima .ow-chart-head { align-items: flex-start; margin-bottom: 16px; }
#clima .ow-chart-filters { min-height: 48px; }
#clima .ow-chart-canvas { height: clamp(180px, 31vw, 270px); }
#clima .ow-chart-hour input { min-height: 44px; }
#clima .ow-chart-reading { font-size: .87rem; line-height: 1.5; padding: 8px 11px; }
#clima .ow-chart-more { margin-top: 14px; padding-top: 4px; border-top: 1px solid #e2c8fd45; }
#clima .ow-chart-more[hidden], #clima .ow-chart-caption[hidden] { display: none; }
#clima .ow-chart-more summary {
  display: flex; justify-content: space-between; align-items: center; list-style: none;
  min-height: 46px; padding: 7px 2px; font-size: .84rem; cursor: pointer;
}
#clima .ow-chart-more summary::-webkit-details-marker { display: none; }
#clima .ow-chart-more summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 6px;
  border: solid #e8d6fb; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
#clima .ow-chart-more[open] summary::after { transform: rotate(225deg); }
#clima .ow-chart-more summary:focus-visible { outline: 3px solid #ffc196; outline-offset: 2px; }
.weather-page #clima > :is(h1,p) { max-width: 28ch; }
.weather-page #clima > h1 { font-size: clamp(38px, 7vw, 74px); line-height: 1.05; }
.weather-page #clima > p { max-width: 53ch; font-size: clamp(15px, 2vw, 18px); }
@media (max-width: 700px) {
  .weather-page #clima.weather { padding-block: 34px 48px; }
}

/* Give all five measures the same visibility; let the controls wrap on phones. */
#clima .ow-chart .ow-chart-filters {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  width: 100%;
  min-height: 0;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
}
#clima .ow-chart .ow-chart-filters .ow-chart-filter {
  border: 1px solid #e7cdf756;
  border-radius: 11px;
  min-height: 46px;
  min-width: 0;
  white-space: normal;
  padding: 6px 5px;
}
#clima .ow-chart .ow-chart-filters .ow-chart-filter > .ow-icon {
  display: inline-block;
  flex-shrink: 0;
}
#clima .ow-chart .ow-chart-filters .ow-chart-factor-label { overflow-wrap: normal; }
@media (max-width: 620px) {
  #clima .ow-chart .ow-chart-filters { grid-template-columns: repeat(6,minmax(0,1fr)); }
  #clima .ow-chart .ow-chart-filters .ow-chart-filter { grid-column: span 2; }
  #clima .ow-chart .ow-chart-filters .ow-chart-filter:nth-child(n+4) { grid-column: span 3; }
}
#clima .ow-chart .ow-chart-filters[data-summit="true"] {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
#clima .ow-chart .ow-chart-filters[data-summit="true"] .ow-chart-filter { grid-column: auto; }
@media (max-width: 380px) {
  #clima .ow-chart .ow-chart-filters .ow-chart-filter { flex-direction: column; gap: 2px; }
  #clima .ow-chart .ow-chart-filters .ow-chart-factor-label { font-size: .69rem; }
}
