:root {
  --ink: #f7f9ff;
  --muted: #aab8d3;
  --line: rgba(255, 255, 255, .14);
  --card: rgba(17, 29, 61, .58);
  --accent: #8ed8ff;
  --accent-strong: #5da9ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #101b3c;
  font-family: "DM Sans", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.weather-scene { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: linear-gradient(145deg, #182e67, #17234b 52%, #322150); z-index: -2; }
.weather-scene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 68% 5%, rgba(255, 220, 150, .22), transparent 26%), linear-gradient(180deg, transparent, rgba(7, 13, 34, .55)); }
.sun { position: absolute; width: 300px; height: 300px; top: -170px; right: 13%; border-radius: 50%; background: #ffe1a2; box-shadow: 0 0 80px 24px rgba(255, 201, 108, .2); animation: breathe 7s ease-in-out infinite; }
.cloud { position: absolute; width: 280px; height: 64px; border-radius: 80px; background: rgba(207, 229, 255, .12); filter: blur(1px); animation: drift 32s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 120px; height: 120px; left: 42px; bottom: 0; }
.cloud::after { width: 90px; height: 90px; right: 44px; bottom: 0; }
.cloud-one { top: 19%; left: -290px; }
.cloud-two { top: 40%; left: 65%; transform: scale(.7); animation-duration: 42s; opacity: .5; }
.stars { position: absolute; inset: 0; opacity: 0; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 88px 88px; }
.app-shell { width: min(1120px, calc(100% - 40px)); margin: auto; padding: 30px 0 24px; }
.topbar, .search-row, .hero-heading, .temperature-row, .hero-footer, .section-heading, footer { display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); font: 700 24px "Space Grotesk", sans-serif; text-decoration: none; letter-spacing: -.06em; }
.brand small { color: var(--accent); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; vertical-align: top; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 7px; border-radius: 10px; color: #17244e; background: var(--accent); font-size: 17px; }
.top-actions { display: flex; gap: 10px; }
.overview-link { align-self: center; color: var(--muted); font-size: 13px; text-decoration: none; }
.overview-link:hover { color: var(--ink); }
.icon-button, .mode-toggle, .location-button, .install-button { border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.09); border-radius: 12px; padding: 10px 14px; transition: .2s; }
.icon-button:hover, .mode-toggle:hover, .location-button:hover { background: rgba(255,255,255,.17); transform: translateY(-1px); }
.install-button { color: #122550; border-color: transparent; background: var(--accent); font-weight: 700; }
.install-button:hover { background: #b4e8ff; transform: translateY(-1px); }
.mode-toggle { display: flex; align-items: center; gap: 7px; }
.mode-icon { color: #ffd98a; }
.search-row { gap: 14px; margin: 62px 0 10px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 12px; padding: 6px 7px 6px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.1); backdrop-filter: blur(14px); }
.search-icon { color: var(--accent); font-size: 27px; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.search-box input::placeholder { color: #aab8d3; }
.search-box button { border: 0; border-radius: 11px; padding: 11px 20px; color: #132550; background: var(--accent); font-weight: 700; }
.search-box button:disabled, .location-button:disabled { cursor: wait; opacity: .6; }
.button-spinner { display: none; width: 13px; height: 13px; margin-left: 6px; border: 2px solid rgba(19,37,80,.3); border-top-color: #132550; border-radius: 50%; vertical-align: -2px; }
.is-loading .search-box button span:first-child { opacity: .65; }
.is-loading .button-spinner { display: inline-block; animation: spin .7s linear infinite; }
.location-button { white-space: nowrap; }
.location-suggestions { position: relative; z-index: 3; display: grid; width: min(100%, 680px); margin: -2px 0 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(12, 24, 55, .96); box-shadow: var(--shadow); }
.location-suggestion { display: grid; gap: 3px; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); padding: 11px 15px; color: var(--ink); text-align: left; background: transparent; }
.location-suggestion:last-child { border-bottom: 0; }
.location-suggestion:hover, .location-suggestion:focus-visible { background: rgba(142,216,255,.12); outline: 0; }
.location-suggestion span { color: var(--muted); font-size: 12px; }
.quick-searches { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.quick-searches button { border: 0; border-radius: 20px; padding: 5px 10px; color: var(--muted); background: rgba(255,255,255,.07); transition: .2s; }
.quick-searches button:hover, .quick-searches button:focus-visible { color: var(--ink); background: rgba(142,216,255,.18); outline: 0; transform: translateY(-2px); }
.saved-locations { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 5px; color: var(--muted); font-size: 12px; }
.saved-locations button { border: 1px solid rgba(142,216,255,.2); border-radius: 20px; padding: 5px 10px; color: var(--accent); background: rgba(142,216,255,.08); }
.saved-locations button:hover, .saved-locations button:focus-visible { background: rgba(142,216,255,.18); }
.status { min-height: 22px; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.dashboard { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.glass-card { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.hero-card { grid-row: span 2; padding: 32px; border-radius: 24px; overflow: hidden; position: relative; }
.hero-card::before { content: ""; position: absolute; width: 240px; height: 240px; top: -130px; right: -70px; border-radius: 50%; background: rgba(142, 216, 255, .16); filter: blur(6px); }
.eyebrow, .condition, .muted, .metric-card span, .feels-like { color: var(--muted); }
.eyebrow { margin: 0 0 8px; font-size: 14px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font: 700 clamp(32px, 5vw, 52px) "Space Grotesk", sans-serif; letter-spacing: -.07em; }
.city-title { display: flex; align-items: center; gap: 12px; }
.city-title h1 { margin-bottom: 0; }
.location-detail { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.save-location-button { border: 0; padding: 2px 5px; color: #ffd36e; background: transparent; font-size: 28px; line-height: 1; }
.save-location-button:hover, .save-location-button:focus-visible { color: #fff0a8; transform: scale(1.1); }
.condition { margin-bottom: 0; font-size: 16px; }
.weather-icon { color: #ffd98a; text-shadow: 0 0 25px rgba(255, 217, 138, .5); }
.hero-icon { font-size: 86px; line-height: 1; margin-right: 13px; animation: float 5s ease-in-out infinite; }
.temperature-row { justify-content: flex-start; gap: 19px; margin: 48px 0 46px; }
.temperature { font: 600 clamp(75px, 11vw, 125px)/.85 "Space Grotesk", sans-serif; letter-spacing: -.1em; }
.feels-like { font-size: 14px; line-height: 1.7; }
.feels-like strong { color: var(--ink); }
.hero-footer { padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.mini-icon { color: var(--accent); }
.simple-summary { display: none; grid-column: 1 / -1; padding: 22px 25px; border-radius: 22px; }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.summary-kicker { display: block; margin-bottom: 5px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.summary-heading h2 { font-size: 18px; }
.summary-badge { padding: 7px 11px; border: 1px solid rgba(142,216,255,.22); border-radius: 20px; color: var(--accent); background: rgba(142,216,255,.09); font-size: 12px; white-space: nowrap; }
.simple-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.simple-stats > div { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); }
.summary-icon { font-size: 18px; }
.simple-stats span:last-child { display: grid; gap: 3px; }
.simple-stats small { color: var(--muted); font-size: 11px; }
.simple-stats strong { font-size: 15px; }
.simple-timeline { display: flex; align-items: center; gap: 12px; margin-top: 19px; color: var(--muted); font-size: 12px; }
.simple-timeline strong { color: var(--ink); }
.simple-timeline i { height: 1px; flex: 1; background: linear-gradient(90deg, #ffd98a, var(--accent)); }
.warning-card { display: flex; grid-column: 1 / -1; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 19px; }
.warning-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(142,216,255,.3); border-radius: 50%; color: var(--accent); background: rgba(142,216,255,.12); font: 700 21px "Space Grotesk", sans-serif; }
.warning-card--notice .warning-icon { border-color: rgba(255,211,110,.4); color: #ffd36e; background: rgba(255,211,110,.13); animation: warning-pulse 2s ease-in-out infinite; }
.warning-content { flex: 1; }
.warning-content .summary-kicker { margin-bottom: 3px; }
.warning-content h2 { font-size: 16px; }
.warning-content p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.warning-link { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; border: 1px solid rgba(142,216,255,.25); border-radius: 10px; padding: 9px 12px; color: var(--accent); font-size: 12px; text-decoration: none; transition: .2s; }
.warning-link:hover { border-color: var(--accent); background: rgba(142,216,255,.1); transform: translateY(-1px); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.metric-card { display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 20px; border-radius: 18px; }
.metric-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: rgba(142,216,255,.12); border-radius: 12px; font-size: 20px; }
.metric-card div { display: grid; gap: 4px; }
.metric-card strong { font-size: 18px; }
.forecast-card, .hourly-card, .insight-card { grid-column: 1 / -1; padding: 25px; border-radius: 22px; }
.insight-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; }
.comfort-score { display: flex; align-items: center; gap: 18px; }
.score-ring { display: grid; place-items: center; width: 94px; height: 94px; flex: 0 0 94px; border: 8px solid rgba(142,216,255,.25); border-top-color: var(--accent); border-right-color: var(--accent-strong); border-radius: 50%; transform: rotate(-25deg); }
.score-ring strong, .score-ring span { transform: rotate(25deg); }
.score-ring strong { font: 700 25px "Space Grotesk", sans-serif; }
.score-ring span { margin-top: -5px; color: var(--muted); font-size: 11px; }
.comfort-score > div:last-child { display: grid; gap: 6px; }
.comfort-score p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.progress-group { display: grid; gap: 16px; }
.progress-row { display: grid; grid-template-columns: 90px 1fr 50px; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.progress-row strong { color: var(--ink); text-align: right; font-size: 12px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.1); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); transition: width .8s ease; }
.progress-row:nth-child(2) .progress-track i { background: linear-gradient(90deg, #89bfff, #b5a5ff); }
.progress-row:nth-child(3) .progress-track i { background: linear-gradient(90deg, #ffd36e, #ff9e72); }
.section-heading { margin-bottom: 22px; }
h2 { margin-bottom: 0; font: 600 20px "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.forecast-list { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.forecast-day { display: grid; justify-items: center; gap: 12px; padding: 15px 8px; border-radius: 15px; color: var(--muted); transition: .2s; }
.forecast-day:first-child, .forecast-day:hover { color: var(--ink); background: rgba(255,255,255,.1); }
.forecast-day strong { color: var(--ink); }
.forecast-day .weather-icon { font-size: 25px; }
.range { font-size: 13px; }
.forecast-rain { color: var(--accent); font-size: 11px; }
.range span { color: var(--muted); margin-left: 5px; }
.hourly-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 3px; }
.hour { min-width: 86px; display: grid; justify-items: center; gap: 12px; padding: 15px 8px; border-radius: 15px; color: var(--muted); }
.hour:first-child { color: var(--ink); background: rgba(142,216,255,.14); }
.hour strong { color: var(--ink); font-size: 17px; }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: min(360px, calc(100% - 44px)); padding: 13px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; color: var(--ink); background: rgba(13, 22, 53, .9); box-shadow: 0 15px 40px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .3s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.dashboard > * { animation: rise-in .55s both; }
.dashboard > *:nth-child(2) { animation-delay: .08s; }
.dashboard > *:nth-child(3) { animation-delay: .16s; }
.dashboard > *:nth-child(4) { animation-delay: .24s; }
.dashboard > *:nth-child(5) { animation-delay: .32s; }
.weather-scene.wet::before { content: ""; position: absolute; inset: -20%; opacity: .2; background: repeating-linear-gradient(105deg, transparent 0 18px, rgba(181,224,255,.6) 19px 20px, transparent 21px 38px); transform: rotate(5deg); animation: rain-fall .55s linear infinite; }
.weather-scene.wet .sun { opacity: .35; }
body[data-weather*="snow"] .weather-scene::before { background: radial-gradient(circle, rgba(255,255,255,.8) 0 2px, transparent 3px); background-size: 65px 65px; animation: snow-fall 7s linear infinite; }
body[data-weather*="thunder"] .weather-scene { animation: storm-flash 8s infinite; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 25px; padding: 20px 0 5px; color: rgba(220,230,255,.68); font-size: 12px; }
.app-footer > div { display: grid; gap: 5px; }
.app-footer strong { color: var(--ink); font: 600 15px "Space Grotesk", sans-serif; }
.app-footer nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.app-footer a, .app-footer button { border: 1px solid rgba(142,216,255,.2); border-radius: 9px; padding: 8px 10px; color: var(--muted); background: transparent; font-size: 12px; text-decoration: none; }
.app-footer a:hover, .app-footer a:focus-visible, .app-footer button:hover, .app-footer button:focus-visible { border-color: var(--accent); color: var(--ink); background: rgba(142,216,255,.1); }
/* Ignore stale injected footer markup if an older cached page still contains it. */
.wf-main-footer { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(142,216,255,.75); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body.simple-mode .details-grid, body.simple-mode .hourly-card, body.simple-mode .forecast-card, body.simple-mode .insight-card { display: none; }
body.simple-mode .simple-summary { display: block; }
body.simple-mode .insight-card { display: none; }
body.simple-mode .hero-card { grid-column: 1 / -1; max-width: 760px; margin: auto; width: 100%; }
body.simple-mode .dashboard { display: block; }
body.night .weather-scene { background: linear-gradient(145deg, #0e1738, #161735 58%, #271c46); }
body.night .sun { opacity: 0; }
body.night .stars { opacity: .65; animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 390px)); } }
@keyframes twinkle { from { opacity: .35; } to { opacity: .8; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rain-fall { from { transform: translate3d(-30px, -30px, 0) rotate(5deg); } to { transform: translate3d(30px, 30px, 0) rotate(5deg); } }
@keyframes snow-fall { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
@keyframes storm-flash { 0%, 92%, 100% { filter: none; } 94% { filter: brightness(1.45); } 96% { filter: none; } }
@keyframes warning-pulse { 50% { box-shadow: 0 0 0 6px rgba(255,211,110,.04), 0 0 22px rgba(255,211,110,.2); } }
@media (max-width: 760px) {
  .app-shell { width: min(100% - 24px, 580px); padding-top: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 16px; }
  .top-actions { width: 100%; align-items: center; flex-wrap: wrap; }
  .top-actions .overview-link { padding: 6px 0; }
  .top-actions .mode-toggle { margin-left: auto; }
  .search-row { align-items: stretch; flex-direction: column; margin-top: 38px; }
  .search-box { min-height: 54px; }
  .search-box button { padding: 11px 15px; }
  .location-button { width: 100%; }
  .install-button { padding: 9px 10px; }
  .quick-searches { flex-wrap: wrap; }
  .dashboard { display: block; }
  .hero-card { margin-bottom: 18px; padding: 22px 18px; }
  .hero-heading { align-items: flex-start; }
  .hero-icon { margin-right: 0; font-size: 66px; }
  .temperature-row { gap: 14px; margin: 38px 0 34px; }
  .temperature { font-size: clamp(68px, 22vw, 100px); }
  .feels-like { font-size: 13px; }
  .details-grid { margin-bottom: 18px; }
  .forecast-card, .hourly-card { margin-bottom: 18px; padding: 18px 14px; }
  .insight-card { margin-bottom: 18px; padding: 18px 14px; }
  .insight-layout { grid-template-columns: 1fr; gap: 22px; }
  .simple-summary { margin-bottom: 18px; padding: 18px 14px; }
  .simple-stats { grid-template-columns: 1fr 1fr; }
  .warning-card { align-items: flex-start; flex-wrap: wrap; padding: 17px 14px; }
  .warning-content { min-width: calc(100% - 60px); }
  .warning-link { margin-left: 58px; }
  .forecast-list { gap: 2px; }
  .forecast-day { padding: 11px 2px; font-size: 12px; }
  .forecast-day .weather-icon { font-size: 21px; }
  .forecast-rain { font-size: 10px; }
  .app-footer { padding-top: 18px; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 14px; }
  .atmos-newsletter { grid-template-columns: 1fr; gap: 20px; padding: 19px; }
  .app-footer nav { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .app-shell { width: min(100% - 20px, 420px); }
  .top-actions { gap: 5px; }
  .top-actions .overview-link { font-size: 12px; }
  .top-actions .mode-toggle { margin-left: 0; }
  .icon-button, .mode-toggle, .location-button, .install-button { padding: 9px 10px; }
  .search-row { margin-top: 28px; }
  .search-box { gap: 7px; padding-left: 12px; }
  .search-box input { min-width: 0; font-size: 15px; }
  .search-box button { padding: 10px 12px; }
  .hero-heading { gap: 8px; }
  .hero-icon { font-size: 54px; }
  .temperature-row { align-items: flex-end; }
  .temperature { font-size: 72px; }
  .feels-like { line-height: 1.5; }
  .hero-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .simple-stats { gap: 7px; }
  .simple-stats > div { padding: 10px 8px; }
  .simple-stats strong { font-size: 14px; }
  .details-grid { gap: 10px; }
  .metric-card { min-height: 94px; padding: 14px 12px; }
  .metric-icon { width: 34px; height: 34px; flex: 0 0 34px; font-size: 17px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .forecast-list { grid-template-columns: repeat(7, minmax(45px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .forecast-day { min-width: 45px; }
  .warning-link { margin-left: 0; }
}
