:root {
  color-scheme: dark;
  --bg: #06101a;
  --bg-2: #102235;
  --card: rgba(12, 24, 42, 0.72);
  --card-strong: rgba(18, 33, 55, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7fbff;
  --muted: #9db0c9;
  --green: #35f092;
  --green-2: #0db86e;
  --yellow: #ffd166;
  --red: #ff4d5e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(188, 221, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 22%, rgba(82, 149, 255, 0.15), transparent 32rem),
    linear-gradient(180deg, #132b43 0%, var(--bg-2) 34%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.snowfall {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.snowfall span {
  position: absolute;
  top: -12vh;
  width: var(--size, 5px);
  height: var(--size, 5px);
  border-radius: 999px;
  background: rgba(255, 255, 255, var(--opacity, 0.58));
  filter: blur(var(--blur, 0));
  animation: snow-fall var(--duration, 16s) linear infinite;
  animation-delay: var(--delay, 0s);
  transform: translate3d(0, 0, 0);
}

.snowfall span:nth-child(1) { left: 4%; --size: 3px; --duration: 17s; --delay: -3s; --opacity: 0.5; }
.snowfall span:nth-child(2) { left: 10%; --size: 6px; --duration: 22s; --delay: -8s; --opacity: 0.42; --blur: 0.5px; }
.snowfall span:nth-child(3) { left: 16%; --size: 4px; --duration: 15s; --delay: -1s; --opacity: 0.65; }
.snowfall span:nth-child(4) { left: 23%; --size: 7px; --duration: 24s; --delay: -12s; --opacity: 0.35; --blur: 1px; }
.snowfall span:nth-child(5) { left: 29%; --size: 3px; --duration: 18s; --delay: -7s; --opacity: 0.58; }
.snowfall span:nth-child(6) { left: 34%; --size: 5px; --duration: 20s; --delay: -10s; --opacity: 0.48; }
.snowfall span:nth-child(7) { left: 41%; --size: 4px; --duration: 14s; --delay: -5s; --opacity: 0.62; }
.snowfall span:nth-child(8) { left: 48%; --size: 8px; --duration: 27s; --delay: -14s; --opacity: 0.3; --blur: 1px; }
.snowfall span:nth-child(9) { left: 54%; --size: 3px; --duration: 16s; --delay: -9s; --opacity: 0.58; }
.snowfall span:nth-child(10) { left: 61%; --size: 6px; --duration: 23s; --delay: -4s; --opacity: 0.4; --blur: 0.5px; }
.snowfall span:nth-child(11) { left: 68%; --size: 4px; --duration: 18s; --delay: -11s; --opacity: 0.6; }
.snowfall span:nth-child(12) { left: 74%; --size: 7px; --duration: 26s; --delay: -15s; --opacity: 0.34; --blur: 1px; }
.snowfall span:nth-child(13) { left: 79%; --size: 3px; --duration: 15s; --delay: -6s; --opacity: 0.64; }
.snowfall span:nth-child(14) { left: 84%; --size: 5px; --duration: 21s; --delay: -2s; --opacity: 0.44; }
.snowfall span:nth-child(15) { left: 89%; --size: 4px; --duration: 17s; --delay: -13s; --opacity: 0.56; }
.snowfall span:nth-child(16) { left: 94%; --size: 7px; --duration: 25s; --delay: -9s; --opacity: 0.36; --blur: 1px; }
.snowfall span:nth-child(17) { left: 37%; --size: 2px; --duration: 13s; --delay: -4s; --opacity: 0.7; }
.snowfall span:nth-child(18) { left: 57%; --size: 2px; --duration: 12s; --delay: -8s; --opacity: 0.72; }

@keyframes snow-fall {
  0% { transform: translate3d(0, -12vh, 0); }
  50% { transform: translate3d(28px, 50vh, 0); }
  100% { transform: translate3d(-18px, 112vh, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .snowfall span {
    animation: none;
    opacity: 0.28;
  }
}

.mountain-scene {
  position: fixed;
  inset: auto 0 0;
  z-index: -4;
  height: min(42vh, 380px);
  overflow: hidden;
  pointer-events: none;
}

.ridge {
  position: absolute;
  right: -8vw;
  bottom: 0;
  left: -8vw;
  clip-path: polygon(0 100%, 0 62%, 9% 47%, 16% 57%, 27% 28%, 39% 56%, 51% 18%, 63% 52%, 74% 34%, 87% 59%, 100% 42%, 100% 100%);
}

.ridge-back {
  height: 82%;
  background: linear-gradient(180deg, rgba(66, 99, 132, 0.55), rgba(21, 42, 62, 0.74));
  filter: blur(0.5px);
  opacity: 0.72;
}

.ridge-front {
  height: 58%;
  background: linear-gradient(180deg, rgba(210, 226, 239, 0.24), rgba(8, 20, 31, 0.96) 38%);
  clip-path: polygon(0 100%, 0 58%, 8% 44%, 16% 53%, 23% 35%, 32% 59%, 43% 30%, 53% 62%, 62% 39%, 73% 56%, 83% 31%, 94% 57%, 100% 46%, 100% 100%);
}

.snow-road {
  position: absolute;
  right: 7%;
  bottom: -18%;
  width: 30%;
  height: 72%;
  border-right: 2px solid rgba(255, 255, 255, 0.28);
  border-left: 2px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  opacity: 0.5;
}

.weather-glow {
  position: fixed;
  z-index: -3;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.7;
}

.weather-glow-one {
  width: 19rem;
  height: 19rem;
  right: -6rem;
  top: 18%;
  background: rgba(176, 213, 255, 0.14);
}

.weather-glow-two {
  width: 24rem;
  height: 24rem;
  left: -10rem;
  bottom: -7rem;
  background: rgba(85, 144, 255, 0.13);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 30px;
}

.nav,
footer,
.details-grid {
  display: grid;
  gap: 18px;
}

.nav {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 48px;
}

.brand,
.source-link {
  color: var(--text);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.source-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 56vh;
  text-align: center;
}

.eyebrow,
.mini-label,
.panel-header p {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-card,
.panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(22, 44, 68, 0.9), rgba(8, 16, 29, 0.76)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 36%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
}

.status-card {
  position: relative;
  width: min(820px, 100%);
  margin-top: 16px;
  padding: clamp(34px, 7vw, 74px);
  overflow: hidden;
  border-radius: 38px;
}

.status-card::after {
  position: absolute;
  inset: auto 8% -42% 8%;
  height: 220px;
  border-radius: 999px;
  background: var(--status-glow, rgba(53, 240, 146, 0.18));
  content: "";
  filter: blur(62px);
}

.status-orb {
  display: grid;
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), var(--status-color, var(--green)) 18%, rgba(53, 240, 146, 0.1) 62%);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.04), 0 0 80px var(--status-glow, rgba(53, 240, 146, 0.36));
}

.status-orb span {
  width: 34px;
  height: 18px;
  border-bottom: 7px solid #062014;
  border-left: 7px solid #062014;
  transform: rotate(-45deg) translate(2px, -2px);
}

.answer {
  margin: 0 0 4px;
  color: var(--status-color, var(--green));
  font-size: clamp(3.8rem, 16vw, 9.5rem);
  font-weight: 850;
  letter-spacing: -0.09em;
  line-height: 0.92;
  text-transform: uppercase;
}

.is-loading .answer {
  font-size: clamp(2.7rem, 10vw, 6.6rem);
  letter-spacing: -0.075em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 5rem);
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.summary {
  width: min(620px, 100%);
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.65;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--text);
  color: #07111f;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.timestamp {
  color: var(--muted);
  font-size: 0.93rem;
}

.preview-switcher {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  color: rgba(199, 212, 231, 0.68);
  font-size: 0.82rem;
}

.preview-switcher a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: #dfe9f8;
  text-decoration: none;
}

.details-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  margin-top: 42px;
}

.panel {
  border-radius: 28px;
  padding: 26px;
}

.panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.panel-header span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  letter-spacing: -0.045em;
}

.condition-text,
.joke-panel p:not(.mini-label) {
  margin: 0;
  color: #c7d4e7;
  font-size: 1.03rem;
  line-height: 1.72;
}

.joke-panel {
  background:
    linear-gradient(145deg, rgba(176, 213, 255, 0.13), rgba(18, 33, 55, 0.72)),
    var(--card-strong);
}

footer {
  grid-template-columns: 1fr auto;
  margin-top: 34px;
  color: rgba(199, 212, 231, 0.72);
  font-size: 0.88rem;
}

.is-closed {
  --status-color: var(--red);
  --status-glow: rgba(255, 77, 94, 0.34);
}

.is-advisory {
  --status-color: var(--yellow);
  --status-glow: rgba(255, 209, 102, 0.28);
}

.is-loading {
  --status-color: #8fb7ff;
  --status-glow: rgba(143, 183, 255, 0.26);
}

.is-closed .status-orb span,
.is-loading .status-orb span {
  width: 38px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: #20080d;
  transform: none;
}

.is-closed .answer {
  letter-spacing: -0.1em;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 16px;
  }

  .nav,
  .details-grid,
  footer {
    grid-template-columns: 1fr;
  }

  .source-link {
    justify-self: start;
  }

  .hero {
    min-height: auto;
  }

  .status-card {
    border-radius: 28px;
    padding: 30px 20px;
  }

  .status-orb {
    width: 86px;
    height: 86px;
  }

  .answer {
    letter-spacing: -0.075em;
  }

  .is-loading .answer {
    font-size: clamp(2.35rem, 13vw, 4.8rem);
  }

  .mountain-scene {
    height: 32vh;
  }
}
