/* The weather and sky block on the Today tab. Owned tonight by the sky agent;
   see docs/sky.md. Loaded after styles.css, so its variables are in scope.
   Gold is golden hour's own colour, kept apart from the brand orange so the
   one thing this card is proud of reads as light, not as a button. */
.wx{--gold:#f1b45c;--gold-deep:#d9713c;--blue-hour:#3d5fd0;margin-bottom:14px}

/* where, and how fresh */
.wx-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 2px 8px}
.wx-where{font-size:13.5px;font-weight:600}
.wx-zip{margin-left:8px;font-family:var(--mono);font-size:12px;font-weight:500;color:var(--dim)}
.wx-updated{font-size:11.5px;color:var(--dim);white-space:nowrap}

/* the hour, big */
.wx-now{display:flex;align-items:center;gap:14px;margin:0 2px 14px}
.wx-now-temp{font-family:var(--mono);font-size:58px;font-weight:500;line-height:.95;letter-spacing:-3px;color:var(--readout);text-shadow:0 0 18px rgba(255,160,110,.3)}
.wx-now-side{min-width:0}
.wx-now-what{font-size:17px;font-weight:600;line-height:1.25}
.wx-now-meta{font-size:12.5px;color:var(--muted);margin-top:3px}

/* a live warning. Red whatever the level; the worst two are solid. */
.wx-alert{display:flex;gap:12px;align-items:center;background:rgba(224,87,58,.13);border:1px solid rgba(224,87,58,.55);border-radius:12px;padding:11px 14px;margin-bottom:10px}
.wx-alert-icon{flex:0 0 22px;height:22px;border-radius:50%;background:var(--red);color:#1a0d08;font-weight:800;font-size:14px;line-height:22px;text-align:center}
.wx-alert-text{min-width:0}
.wx-alert-event{font-weight:700;font-size:14.5px;color:#ffb39f}
.wx-alert-until{font-size:12px;color:var(--muted);margin-top:1px}
.wx-alert.sev-extreme,.wx-alert.sev-severe{background:var(--red);border-color:var(--red)}
.wx-alert.sev-extreme .wx-alert-event,.wx-alert.sev-severe .wx-alert-event{color:#fff}
.wx-alert.sev-extreme .wx-alert-until,.wx-alert.sev-severe .wx-alert-until{color:rgba(255,255,255,.85)}
.wx-alert.sev-extreme .wx-alert-icon,.wx-alert.sev-severe .wx-alert-icon{background:#fff;color:var(--red)}

/* the next four periods. Scrolls sideways rather than wrapping, so all four
   still fit on a phone without pushing the schedule below the fold. */
.wx-row{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.wx-row::-webkit-scrollbar{display:none}
.wx-cell{flex:1 0 104px;background:var(--well);border:1px solid #000;border-radius:9px;padding:10px 12px;box-shadow:var(--well-in)}
.wx-cell.night{background:#040506}
.wx-when{font-size:11.5px;color:var(--dim);white-space:nowrap}
.wx-temp{font-family:var(--mono);font-size:21px;font-weight:600;margin:1px 0;color:var(--readout);text-shadow:var(--readout-glow)}
.wx-what{font-size:12px;color:var(--muted);line-height:1.3}
.wx-rain{font-size:11px;color:var(--accent);font-family:var(--mono);margin-top:3px}

/* the sky card. The glow in the corner is the sun low on the horizon. */
.sky{position:relative;margin-top:12px;padding:16px 16px 14px;border:1px solid #050607;border-radius:12px;box-shadow:var(--bevel);
  background:radial-gradient(110% 80% at 100% 112%,rgba(241,180,92,.17),transparent 62%),linear-gradient(180deg,#181b22,#131519)}
.sky-golden-label{font-size:13px;font-weight:500;color:var(--muted)}
.sky-golden-when{font-size:29px;font-weight:700;letter-spacing:-.6px;line-height:1.15;color:var(--gold);font-variant-numeric:tabular-nums;margin-top:2px}
.sky-golden-note{font-size:12.5px;color:var(--dim);margin-top:3px}

/* the day as an edit timeline, midnight to midnight, with a playhead at now */
.sky-bar{position:relative;height:10px;margin:18px 0 9px;border-radius:5px;background:#0a0c10;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.sky-seg-day,.sky-seg-golden,.sky-seg-blue{position:absolute;top:0;bottom:0}
.sky-seg-day{background:linear-gradient(90deg,rgba(232,225,219,.08),rgba(232,225,219,.24) 50%,rgba(232,225,219,.08))}
.sky-seg-golden{top:-2px;bottom:-2px;border-radius:3px;background:linear-gradient(90deg,var(--gold),var(--gold-deep));box-shadow:0 0 12px rgba(241,180,92,.5)}
.sky-seg-blue{background:var(--blue-hour);border-radius:0 3px 3px 0}
.sky-playhead{position:absolute;top:-6px;bottom:-4px;width:2px;margin-left:-1px;background:var(--text);border-radius:1px}
.sky-playhead::before{content:'';position:absolute;top:-5px;left:-4px;border:5px solid transparent;border-top-color:var(--text)}

.sky-sun{display:flex;justify-content:space-between;gap:8px}
.sky-fact{display:flex;flex-direction:column;gap:1px}
.sky-fact:nth-child(2){text-align:center}
.sky-fact:last-child{text-align:right}
.sky-fact-k{font-size:11.5px;color:var(--dim)}
.sky-fact-v{font-family:var(--mono);font-size:14px;font-weight:500}

.sky-moon{display:flex;align-items:center;gap:12px;margin-top:14px;padding-top:13px;border-top:1px solid var(--line)}
.sky-moon-emoji{font-size:30px;line-height:1;filter:drop-shadow(0 0 7px rgba(232,225,219,.28))}
.sky-moon-phase{font-size:14px;font-weight:600}
.sky-moon-meta{font-size:12.5px;color:var(--muted);margin-top:1px}

/* While golden hour is actually on, the card says so. The one moving thing
   on the tab, and only for people whose device allows motion. */
.sky.golden-live{border-color:rgba(241,180,92,.55)}
@media (prefers-reduced-motion:no-preference){
  .sky.golden-live .sky-seg-golden{animation:sky-glow 2.4s ease-in-out infinite alternate}
}
@keyframes sky-glow{from{box-shadow:0 0 6px rgba(241,180,92,.35)}to{box-shadow:0 0 18px rgba(241,180,92,.9)}}
