.weather-week {
  --wx-line: #d2e0dc;
  --wx-text: #425954;
  background: #f0f6f4;
  border-color: var(--wx-line);
  padding: clamp(1rem, 2vw, 2rem);
}
.weather-week .weather-heading { align-items: center; flex-wrap: wrap; gap: 1rem; }
.weather-week .weather-heading .eyebrow { color: var(--primary); font-size: .875rem; letter-spacing: .12em; }
.weather-week .weather-heading h3 { max-width: none; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.15; }
.wx-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.wx-controls button {
  min-height: 44px; padding: .5rem .9rem; background: white; border: 1px solid #a9c7be;
  border-radius: 6px; color: var(--primary); font-size: .875rem; font-weight: 600;
}
.wx-controls button:hover { background: #e1eeea; }
.wx-controls button:disabled { opacity: .65; cursor: wait; }

.wx-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: .65rem;
  padding: 0; margin: 1.5rem 0; list-style: none;
}
.wx-day {
  min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--wx-line); border-radius: .7rem; background: white;
}
.wx-date { display: flex; flex-direction: column; gap: .1rem; padding: .75rem .85rem; }
.wx-date strong { font: 700 1rem/1.3 var(--heading); color: #214b48; }
.wx-date strong::first-letter { text-transform: uppercase; }
.wx-date time { color: var(--wx-text); font-size: .875rem; }
.wx-today { border-color: #498e89; }
.wx-today .wx-date { background: #116b6c; }
.wx-today .wx-date strong, .wx-today .wx-date time { color: white; }
.wx-scene { position: relative; background: #dfe9e7; aspect-ratio: 1.6; overflow: hidden; }
.wx-scene img { width: 100%; height: 100%; object-fit: cover; }
.wx-symbol {
  position: absolute; right: .45rem; bottom: .45rem; display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fffffff2;
}
.wx-symbol svg { display: block; width: 1.8rem; height: 1.8rem; fill: none; stroke: #648580; stroke-width: 2.3; }
.wx-icon .wx-sun { stroke: #b7750d; fill: #ffe5a1; transform-origin: 32px 27px; animation: wx-turn 30s linear infinite; }
.wx-icon .wx-cloud { fill: #e8eff2; stroke: #607b84; animation: wx-drift 6s ease-in-out infinite; }
.wx-icon .wx-rain { stroke: #267b9a; animation: wx-fall 2s ease-in-out infinite; }
.wx-icon .wx-lightning { fill: #efc14b; stroke: #a07812; animation: wx-glow 5s ease-in-out infinite; }
.wx-icon .wx-fog { animation: wx-drift 7s ease-in-out infinite; }
.wx-icon .wx-snow { stroke: #557f98; animation: wx-fall 4s ease-in-out infinite; }

.wx-reading { display: flex; flex: 1; flex-direction: column; padding: .8rem; }
.wx-condition { min-height: 2.6em; font: 650 1rem/1.3 var(--heading); color: #24443f; }
.wx-temperatures { display: flex; justify-content: space-between; gap: .45rem; margin: .5rem 0 1rem; }
.wx-temperatures span { display: flex; flex-direction: column; }
.wx-temperatures small { font-size: .875rem; color: var(--wx-text); }
.wx-temperatures b { color: #174c49; font: 700 clamp(1.45rem, 2.2vw, 2rem)/1.2 var(--heading); }
.wx-temperatures span + span b { color: #526b68; font-weight: 500; }
.wx-details { margin-top: auto; padding-top: .55rem; border-top: 1px solid var(--wx-line); }
.wx-details p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .3rem; align-items: baseline; color: var(--wx-text); font-size: .875rem; line-height: 1.45; }
.wx-details p + p { margin-top: .25rem; }
.wx-details strong { white-space: nowrap; color: #2a5757; }
.wx-message { grid-column: 1/-1; padding: 1.2rem 0; font-size: 1rem; color: var(--wx-text); }
.weather-week .weather-foot, .wx-foot-links { gap: .35rem 1rem; color: var(--wx-text); font-size: .875rem; line-height: 1.55; }
.wx-foot-links { display: flex; flex-wrap: wrap; margin-top: .35rem; }
.wx-foot-links a, .weather-week .weather-foot a { color: #185b61; text-decoration: underline; text-underline-offset: 3px; }
.wx-stale #weather-status { color: #884f1e; }
.wx-paused .wx-icon *, .wx-hidden .wx-icon * { animation-play-state: paused; }
@keyframes wx-turn { to { transform: rotate(360deg); } }
@keyframes wx-drift { 0%,100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
@keyframes wx-fall { 0%,100% { transform: translateY(-1px); opacity: .65; } 50% { transform: translateY(3px); opacity: 1; } }
@keyframes wx-glow { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .weather-week .wx-icon * { animation: none !important; } #weather-motion { display: none; } }

@media (max-width: 1170px) {
  .wx-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .wx-today { grid-column: 1/-1; display: grid; grid-template-columns: 1.2fr 2fr; grid-template-rows: auto 1fr; }
  .wx-today .wx-scene { grid-column: 1; grid-row: 1/3; aspect-ratio: auto; min-height: 9rem; }
  .wx-today .wx-scene img { position: absolute; inset: 0; }
  .wx-today .wx-date, .wx-today .wx-reading { grid-column: 2; }
  .wx-today .wx-date { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
  .wx-today .wx-condition { min-height: auto; }
  .wx-today .wx-temperatures { justify-content: flex-start; gap: 2rem; }
  .wx-day:not(.wx-today) .wx-scene { max-height: 8.5rem; }
}
@media (max-width: 680px) {
  .wx-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
  .wx-today { grid-template-columns: .8fr 1fr; }
  .wx-controls button { padding-inline: .7rem; }
  .wx-reading, .wx-date { padding: .65rem; }
}
@media (max-width: 355px) {
  .weather-week { padding: .7rem; }
  .wx-details p { display: block; }
  .wx-details strong { display: block; }
}
