:root {
  --comfort-curve-cool: #6ea8ff;
  --comfort-curve-good: #63c979;
  --comfort-curve-warm: #f7c873;
  --comfort-curve-night: rgba(9, 22, 54, 0.42);
  --comfort-curve-grid: rgba(20, 32, 51, 0.09);
  --ingredient-accent: var(--blue, #0f4cc4);
}

.visual-intelligence-cluster {
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid rgba(15, 76, 196, 0.2);
  border-radius: 22px;
  border-top: 4px solid #4c9ae8;
  box-shadow: 0 18px 42px rgba(9, 37, 95, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  grid-column: 1 / -1;
  margin: 22px 0 0;
  min-width: 0;
  padding: 1.05rem 1.1rem 1rem;
}

.visual-intelligence-cluster-header {
  align-items: flex-end;
  border-bottom: 1px solid rgba(20, 32, 51, 0.1);
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  margin-bottom: 0.95rem;
  padding: 0 0.15rem 0.9rem;
}

.visual-intelligence-cluster-kicker {
  color: var(--blue, #0f4cc4);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-intelligence-cluster-header h2 {
  color: var(--ink, #142033);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0.18rem 0 0;
}

.visual-intelligence-cluster-header p {
  color: var(--muted, #617085);
  font-size: 0.76rem;
  line-height: 1.4;
  margin: 0 0 0.08rem;
  max-width: 330px;
  text-align: right;
}

.weather-ingredients-host {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0;
}

.weather-ingredients-host[hidden] { display: none; }

.weather-ingredients {
  background:
    radial-gradient(circle at 4% 8%, rgba(110, 168, 255, 0.26), transparent 25%),
    radial-gradient(circle at 92% 90%, rgba(247, 200, 115, 0.3), transparent 24%),
    linear-gradient(118deg, #f2f7ff 0%, #eefaf5 52%, #fff9e9 100%);
  border: 0;
  border-top: 1px solid rgba(15, 76, 196, 0.12);
  border-radius: 0;
  margin: -0.1rem -1.1rem 0;
  overflow: hidden;
  padding: 1rem 1.25rem 1.15rem;
  position: relative;
}

.weather-ingredients-header {
  align-items: baseline;
  display: flex;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.weather-ingredients-header h2 {
  color: #09255f;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.weather-ingredients-header p {
  color: var(--muted, #617085);
  font-size: 0.72rem;
  margin: 0;
}

.weather-ingredients-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weather-ingredient {
  --ingredient-fill: var(--ingredient-accent);
  --ingredient-soft: rgba(110, 168, 255, 0.16);
  background:
    radial-gradient(circle at 100% 0%, var(--ingredient-soft), transparent 48%),
    rgba(255, 255, 255, 0.72);
  border: 1px solid color-mix(in srgb, var(--ingredient-fill) 22%, transparent);
  border-top: 3px solid var(--ingredient-fill);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(9, 37, 95, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  min-width: 0;
  overflow: hidden;
  padding: 0.68rem 0.7rem 0.62rem;
  position: relative;
}

.weather-ingredient.moisture { --ingredient-fill: #168aad; --ingredient-soft: rgba(22, 138, 173, 0.16); }
.weather-ingredient.wind { --ingredient-fill: #d69524; --ingredient-soft: rgba(247, 200, 115, 0.24); }
.weather-ingredient.sky { --ingredient-fill: #6e83d7; --ingredient-soft: rgba(110, 131, 215, 0.18); }

.weather-ingredient-top {
  align-items: center;
  color: var(--muted, #617085);
  display: flex;
  font-size: 0.63rem;
  font-weight: 800;
  gap: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weather-ingredient-icon {
  align-items: center;
  background: var(--ingredient-soft);
  border: 1px solid color-mix(in srgb, var(--ingredient-fill) 20%, transparent);
  border-radius: 50%;
  color: var(--ingredient-fill);
  display: inline-flex;
  flex: 0 0 auto;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.weather-ingredient-icon svg { height: 16px; width: 16px; }

.weather-ingredient-value {
  color: var(--ingredient-fill);
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1;
  margin-top: 0.45rem;
}

.weather-ingredient-read {
  color: var(--muted, #617085);
  font-size: 0.7rem;
  line-height: 1.25;
  margin-top: 0.25rem;
  min-height: 1.75em;
}

.weather-ingredient-meter {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 32, 51, 0.06);
  border-radius: 999px;
  height: 6px;
  margin-top: 0.55rem;
  overflow: hidden;
}

.weather-ingredient-meter span {
  background: linear-gradient(90deg, var(--ingredient-fill), color-mix(in srgb, var(--ingredient-fill) 62%, white));
  box-shadow: 0 0 10px color-mix(in srgb, var(--ingredient-fill) 35%, transparent);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: var(--ingredient-level, 0%);
}

#skyHomeModule .sky-home-grid {
  grid-template-areas: "photo copy";
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

#skyHomeModule .sky-home-photo {
  grid-area: photo;
  min-height: 360px;
}

#skyHomeModule .sky-home-photo iframe,
#skyHomeModule .sky-home-photo img {
  min-height: 360px;
}

#skyHomeModule .sky-home-copy { grid-area: copy; }

.sky-home-direction {
  align-items: center;
  backdrop-filter: blur(7px);
  background: rgba(8, 24, 56, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 900;
  gap: 0.42rem;
  left: 16px;
  letter-spacing: 0.08em;
  padding: 0.42rem 0.62rem;
  position: absolute;
  text-transform: uppercase;
  top: 16px;
  z-index: 3;
}

.sky-home-direction span,
.sky-home-pill.live::before {
  background: #76e39a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(118, 227, 154, 0.2);
  content: "";
  flex: 0 0 auto;
  height: 7px;
  width: 7px;
}

.sky-home-pill.live { gap: 0.42rem; }

.weather-scene-host {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0 1.35rem 0.8rem;
}

.weather-scene-host[hidden] { display: none; }

.blue-ridge-scene {
  --scene-sky-top: #274f91;
  --scene-sky-bottom: #9cc7e5;
  background: linear-gradient(180deg, var(--scene-sky-top), var(--scene-sky-bottom));
  border: 1px solid rgba(15, 76, 196, 0.18);
  border-radius: 20px;
  color: #fff;
  margin: 0;
  min-height: 168px;
  overflow: hidden;
  position: relative;
}

.blue-ridge-scene.clear,
.blue-ridge-scene.partly-cloudy { --scene-sky-top: #2761a8; --scene-sky-bottom: #b9d9ea; }
.blue-ridge-scene.mostly-cloudy,
.blue-ridge-scene.overcast { --scene-sky-top: #465b79; --scene-sky-bottom: #aebdcc; }
.blue-ridge-scene.rain,
.blue-ridge-scene.heavy-rain,
.blue-ridge-scene.thunderstorm { --scene-sky-top: #202b45; --scene-sky-bottom: #667891; }
.blue-ridge-scene.snow { --scene-sky-top: #627b9b; --scene-sky-bottom: #d7e6ef; }
.blue-ridge-scene.fog { --scene-sky-top: #718092; --scene-sky-bottom: #d8dedf; }
.blue-ridge-scene.night { --scene-sky-top: #071632; --scene-sky-bottom: #213b63; }
.blue-ridge-scene.twilight { --scene-sky-top: #293567; --scene-sky-bottom: #de8d6a; }

.blue-ridge-scene-svg {
  display: block;
  height: 168px;
  width: 100%;
}

.scene-sun { fill: #ffd878; filter: drop-shadow(0 0 11px rgba(255, 205, 105, 0.55)); }
.scene-moon { fill: #edf5ff; filter: drop-shadow(0 0 9px rgba(223, 238, 255, 0.45)); }
.scene-cloud { fill: rgba(239, 245, 251, 0.83); }
.mostly-cloudy .scene-cloud,
.overcast .scene-cloud,
.rain .scene-cloud,
.heavy-rain .scene-cloud,
.thunderstorm .scene-cloud { fill: rgba(182, 194, 207, 0.88); }
.scene-ridge-far { fill: #2d5575; }
.scene-ridge-mid { fill: #173f5d; }
.scene-ridge-near { fill: #0b2d46; }
.night .scene-ridge-far { fill: #172d4a; }
.night .scene-ridge-mid { fill: #10233d; }
.night .scene-ridge-near { fill: #09182d; }
.scene-fog { fill: rgba(240, 246, 247, 0.58); }
.scene-rain { stroke: rgba(153, 211, 255, 0.72); stroke-linecap: round; stroke-width: 2; }
.scene-snow { fill: rgba(255, 255, 255, 0.88); }
.scene-lightning { fill: #f7d96f; filter: drop-shadow(0 0 5px rgba(247, 217, 111, 0.75)); }

.blue-ridge-scene-copy {
  background: linear-gradient(90deg, rgba(7, 22, 50, 0.88), rgba(7, 22, 50, 0.25), transparent);
  inset: 0;
  padding: 1rem;
  pointer-events: none;
  position: absolute;
}

.blue-ridge-scene-kicker {
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blue-ridge-scene-copy strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  line-height: 1;
  margin-top: 0.22rem;
  max-width: 310px;
}

.blue-ridge-scene-copy span {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.35rem;
  max-width: 290px;
  opacity: 0.84;
}

.feelscore-ribbon-host {
  margin: 0.8rem 0 1rem;
  min-width: 0;
}

.feelscore-ribbon {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(var(--ribbon-count, 6), minmax(0, 1fr));
}

.feelscore-ribbon-segment {
  --ribbon-color: #6e83b7;
  background: color-mix(in srgb, var(--ribbon-color) 18%, white);
  border-top: 5px solid var(--ribbon-color);
  color: var(--ink, #142033);
  min-width: 0;
  padding: 0.38rem 0.2rem 0.34rem;
  text-align: center;
}

.feelscore-ribbon-segment:first-child { border-radius: 10px 0 0 10px; }
.feelscore-ribbon-segment:last-child { border-radius: 0 10px 10px 0; }
.feelscore-ribbon-segment.excellent { --ribbon-color: #3ea664; }
.feelscore-ribbon-segment.pleasant { --ribbon-color: #4f8fdc; }
.feelscore-ribbon-segment.noticeable { --ribbon-color: #d9a42f; }
.feelscore-ribbon-segment.challenging { --ribbon-color: #df7435; }
.feelscore-ribbon-segment.harsh { --ribbon-color: #c64e4e; }

.feelscore-ribbon-segment b {
  display: block;
  font-size: 0.84rem;
  line-height: 1;
}

.feelscore-ribbon-segment span {
  color: var(--muted, #617085);
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  margin-top: 0.18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hour-card .hour-context {
  color: var(--muted, #617085);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.hour-card .hour-context.rain { color: #1462c8; }
.hour-card .hour-context.moisture { color: #168aad; }
.hour-card .hour-context.wind { color: #536b92; }

.comfort-curve-host {
  background:
    radial-gradient(circle at 92% 12%, rgba(247, 200, 115, 0.48), transparent 24%),
    radial-gradient(circle at 8% 92%, rgba(110, 168, 255, 0.32), transparent 30%),
    linear-gradient(135deg, #edf5ff 0%, #e8f8ef 54%, #fff5d9 100%);
  border-radius: 0 0 18px 18px;
  border-top: 2px solid rgba(15, 76, 196, 0.24);
  grid-column: 1 / -1;
  margin: 0 -1.1rem -1rem;
  min-width: 0;
  overflow: hidden;
  padding: 1.2rem 1.25rem 1rem;
  position: relative;
}

.comfort-curve-host::before,
.comfort-curve-host::after {
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.comfort-curve-host::before {
  background: rgba(15, 76, 196, 0.08);
  height: 180px;
  right: -65px;
  top: -95px;
  width: 180px;
}

.comfort-curve-host::after {
  background: rgba(79, 166, 106, 0.1);
  bottom: -80px;
  height: 160px;
  left: -50px;
  width: 160px;
}

.comfort-curve-host[hidden] { display: none; }

.comfort-curve-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink, #142033);
  overflow: visible;
  padding: 0;
  position: relative;
  z-index: 1;
}

.comfort-curve-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0 0.1rem;
}

.comfort-curve-kicker {
  background: linear-gradient(90deg, #0f4cc4, #168aad);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.34rem 0.58rem;
  text-transform: uppercase;
}

.comfort-curve-header h2 {
  color: #09255f;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  letter-spacing: -0.03em;
  margin: 0.12rem 0 0;
}

.comfort-curve-header p {
  color: var(--muted, #617085);
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
}

.comfort-curve-best {
  align-items: flex-end;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(123, 211, 137, 0.36));
  border: 1px solid rgba(39, 122, 68, 0.28);
  border-radius: 14px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  padding: 0.55rem 0.7rem;
  box-shadow: 0 10px 24px rgba(39, 122, 68, 0.12);
}

.comfort-curve-best span,
.comfort-curve-best small {
  color: var(--muted, #617085);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comfort-curve-best strong {
  color: #277a44;
  font-size: 1rem;
  line-height: 1.15;
  white-space: nowrap;
}

.comfort-curve-chart {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15, 76, 196, 0.14);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(9, 37, 95, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  margin: 1rem auto 0;
  max-width: 1040px;
  min-width: 0;
  padding: 0.3rem;
}

.comfort-curve-svg {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.comfort-curve-zone { fill: var(--comfort-curve-grid); }
.comfort-curve-zone.excellent { fill: rgba(79, 166, 106, 0.17); }
.comfort-curve-zone.pleasant { fill: rgba(110, 168, 255, 0.13); }
.comfort-curve-zone.fair { fill: rgba(247, 200, 115, 0.16); }
.comfort-curve-zone.challenging { fill: rgba(245, 125, 35, 0.1); }
.comfort-curve-zone.harsh { fill: rgba(255, 107, 107, 0.12); }
.comfort-curve-night { fill: var(--comfort-curve-night); }
.comfort-curve-frame {
  fill: none;
  stroke: rgba(15, 76, 196, 0.28);
  stroke-width: 1;
}

.comfort-curve-zone-label {
  fill: rgba(20, 32, 51, 0.42);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.comfort-curve-area { fill: url("#comfortCurveFill"); }
.comfort-curve-line {
  fill: none;
  stroke: url("#comfortCurveStroke");
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(15, 76, 196, 0.2));
  stroke-width: 6;
}

.comfort-curve-now-line {
  stroke: rgba(15, 76, 196, 0.35);
  stroke-dasharray: 4 5;
  stroke-width: 1.5;
}

.comfort-curve-now-dot { fill: var(--blue, #0f4cc4); stroke: #fff; stroke-width: 3; }
.comfort-curve-now-label { fill: var(--blue-dark, #09255f); font-size: 12px; font-weight: 900; }
.comfort-curve-best-halo { fill: rgba(79, 166, 106, 0.18); }
.comfort-curve-best-dot { fill: #2e9952; stroke: #fff; stroke-width: 3; }
.comfort-curve-best-star { fill: #277a44; font-size: 16px; font-weight: 900; }
.comfort-curve-time { fill: var(--muted, #617085); font-size: 14px; font-weight: 700; }

.comfort-curve-legend {
  align-items: center;
  color: var(--muted, #617085);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  gap: 0.45rem 0.85rem;
  justify-content: flex-end;
  margin: 0.15rem auto 0;
  max-width: 1040px;
}

.comfort-curve-legend span { align-items: center; display: inline-flex; gap: 0.25rem; }
.comfort-curve-legend i { border-radius: 3px; display: inline-block; height: 8px; width: 12px; }
.comfort-curve-legend i.day { background: rgba(110, 168, 255, 0.12); }
.comfort-curve-legend i.night { background: var(--comfort-curve-night); }

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 900px) {
  #skyHomeModule .sky-home-grid {
    grid-template-areas: "photo" "copy";
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  #skyHomeModule .sky-home-photo,
  #skyHomeModule .sky-home-photo iframe,
  #skyHomeModule .sky-home-photo img { min-height: 230px; }
  .sky-home-direction { left: 12px; top: 12px; }
  .weather-scene-host { padding: 0 0.75rem 0.65rem; }
  .blue-ridge-scene { border-radius: 17px; min-height: 150px; }
  .blue-ridge-scene-svg { height: 150px; width: 130%; }
  .blue-ridge-scene-copy { padding: 0.82rem; }
  .visual-intelligence-cluster {
    border-radius: 19px;
    margin: 14px 0 0;
    padding: 0.85rem 0.78rem 0.78rem;
  }
  .visual-intelligence-cluster-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.75rem;
  }
  .visual-intelligence-cluster-header p { max-width: none; text-align: left; }
  .weather-ingredients-host { padding: 0; }
  .feelscore-ribbon-host { margin: 0.65rem 0 0.8rem; }
  .feelscore-ribbon-segment { padding-left: 0.1rem; padding-right: 0.1rem; }
  .feelscore-ribbon-segment b { font-size: 0.76rem; }
  .feelscore-ribbon-segment span { font-size: 0.52rem; }
  .weather-ingredients {
    border-radius: 0;
    margin: 0 -0.78rem;
    padding: 0.85rem 0.78rem 1rem;
  }
  .weather-ingredients-header { align-items: flex-start; flex-direction: column; margin-bottom: 0.6rem; }
  .weather-ingredients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comfort-curve-host {
    margin: 0 -0.78rem -0.78rem;
    padding: 1rem 0.78rem 0.8rem;
  }
  .comfort-curve-card { border-radius: 0; padding: 0; }
  .comfort-curve-header { gap: 0.65rem; }
  .comfort-curve-header p { font-size: 0.76rem; }
  .comfort-curve-best { padding: 0.45rem 0.55rem; }
  .comfort-curve-best strong { font-size: 0.88rem; }
  .comfort-curve-chart { border-radius: 14px; margin: 0.75rem 0 0; padding: 0.15rem; }
  .comfort-curve-legend { font-size: 0.62rem; justify-content: flex-start; }
}

@media (max-width: 390px) {
  .weather-ingredient { padding: 0.62rem; }
  .weather-ingredient-value { font-size: 1.08rem; }
  .comfort-curve-header { align-items: stretch; flex-direction: column; }
  .comfort-curve-best { align-items: flex-start; align-self: flex-start; flex-direction: row; gap: 0.4rem; }
  .comfort-curve-best small { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .comfort-curve-card *,
  .comfort-curve-card *::before,
  .comfort-curve-card *::after {
    animation: none !important;
    transition: none !important;
  }
}
