/* Weather — The Unruly. Brand purple/green, airy, mobile-first. */
.wx { --wx-sky: #e8f4fb; --wx-sky2: #f3eef8; }
.wx-wrap { width: min(calc(100% - 2.5rem), 1120px); margin-inline: auto; }
.wx-narrow { width: min(calc(100% - 2.5rem), 760px); margin-inline: auto; }

.wx-hero { padding: 1.6rem 0 1.2rem; }
.wx-kicker {
  margin: 0 0 .35rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-size: .78rem; color: var(--purple);
}
.wx-hero h1, .wx-page h1 {
  margin: 0 0 .4rem;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--brand-dark);
}
.wx-lead { margin: 0 0 1rem; color: var(--ink-soft); max-width: 44em; }

.wx-tools { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: 0 0 1rem; }
.wx-tools .search, .wx-tools .ask-scout { flex: 1 1 16rem; max-width: 28rem; }

.wx-stats { display: flex; flex-wrap: wrap; gap: .45rem; }
.wx-stat {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fff; border: 1px solid var(--rule); border-radius: 999px;
  padding: .3rem .7rem .3rem .35rem; font-weight: 700; font-size: .9rem;
  color: var(--brand-deep); box-shadow: var(--shadow-soft);
}
.wx-stat img { width: 30px; height: 30px; }
.wx-stat b { color: var(--purple-deep); font-variant-numeric: tabular-nums; }

.wx-scout {
  display: flex; gap: .8rem; align-items: center;
  background: linear-gradient(160deg, #fff, var(--purple-wash));
  border: 1px solid var(--rule); border-radius: 18px;
  padding: .75rem 1rem; margin: 0 0 1.1rem;
}
.wx-scout img { width: 76px; height: 76px; flex-shrink: 0; }
.wx-scout p { margin: 0; line-height: 1.5; }

.wx-listen {
  min-height: 44px; border-radius: 999px; border: 1.5px solid var(--purple-light);
  background: #fff; color: var(--purple-deep); font: 600 .95rem var(--sans);
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .95rem; cursor: pointer;
}
.wx-listen:hover, .wx-listen.playing { background: var(--purple-wash); }

.wx-toc, .wx-chips {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem;
}
.wx-chips a, .wx-toc a {
  text-decoration: none; color: var(--purple-deep); font-weight: 700; font-size: .9rem;
  background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: .4rem .75rem;
  min-height: 44px; display: inline-flex; align-items: center;
}
.wx-chips a:hover, .wx-toc a:hover, .wx-chips a[aria-current="page"] {
  background: var(--purple-wash); border-color: var(--purple-light); color: var(--purple-deep);
}

.wx-grid {
  display: grid; gap: .7rem;
  grid-template-columns: 1fr;
  margin: 0 0 1.5rem;
}
@media (min-width: 640px) { .wx-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .wx-grid.wx-grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.wx-card {
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--rule); border-radius: 16px;
  padding: .9rem 1rem; min-height: 44px; box-shadow: var(--shadow-soft);
}
.wx-card:hover { border-color: var(--purple-light); background: var(--purple-wash); color: inherit; }
.wx-card h3 { margin: 0 0 .3rem; font-family: var(--serif-display); font-size: 1.15rem; color: var(--brand-dark); }
.wx-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.45; }
.wx-card .go { margin-top: .6rem; font-weight: 700; color: var(--purple); }

.wx-lesson { margin: 0 0 1.4rem; }
.wx-lesson h2 {
  margin: 0 0 .5rem; font-family: var(--serif-display); font-size: 1.35rem; color: var(--brand-dark);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
}
.wx-lesson p, .wx-prose p { margin: 0 0 .8rem; line-height: 1.62; }
.wx-lesson ul, .wx-prose ul, .wx-prose ol { margin: 0 0 .9rem; padding-left: 1.2rem; line-height: 1.55; }
.wx-fig {
  background: linear-gradient(180deg, var(--wx-sky), #fff 70%);
  border: 1px solid var(--rule); border-radius: 16px; padding: .8rem;
  margin: 0 0 1rem;
}
.wx-fig svg, .wx-fig img { width: 100%; height: auto; display: block; }
.wx-fig figcaption { margin: .5rem 0 0; color: var(--ink-faint); font-size: .9rem; text-align: center; }

.wx-callout {
  background: var(--brand-wash); border-left: 4px solid var(--brand);
  border-radius: 0 14px 14px 0; padding: .8rem 1rem; margin: 0 0 1rem;
}
.wx-callout.purple { background: var(--purple-wash); border-left-color: var(--purple); }

.wx-verse {
  background: #fff; border: 1px solid var(--rule); border-left: 5px solid var(--purple);
  border-radius: 14px; padding: .9rem 1rem; margin: .7rem 0;
}
.wx-verse blockquote {
  margin: .2rem 0 .5rem; font: 500 1.08rem/1.55 var(--poem, Georgia, serif); color: var(--brand-dark);
}
.wx-verse cite { font-style: normal; font-weight: 700; color: var(--purple); }

.wx-qa { margin: 0 0 .8rem; background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: .9rem 1rem; }
.wx-qa h2 { margin: 0 0 .4rem; font-size: 1.15rem; color: var(--purple-deep); }
.wx-qa .wx-listen { float: right; margin: 0 0 .4rem .4rem; }

.wx-panel {
  background: #fff; border: 1px solid var(--rule); border-radius: 18px;
  padding: 1.05rem 1.1rem 1.2rem; margin: 0 0 1.1rem; box-shadow: var(--shadow-soft);
}
.wx-panel h2 { margin: 0 0 .4rem; font-family: var(--serif-display); font-size: 1.3rem; color: var(--brand-dark); }

.wx-q { margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--rule); }
.wx-q:last-of-type { border-bottom: 0; }
.wx-q p { margin: 0 0 .5rem; font-weight: 650; }
.wx-choices { display: grid; gap: .4rem; }
.wx-choices button {
  text-align: left; font: 600 .98rem/1.4 var(--sans); padding: .7rem .85rem; min-height: 44px;
  border-radius: 12px; border: 1.5px solid var(--rule-strong); background: #fff; color: var(--ink); cursor: pointer;
}
.wx-choices button:hover { background: var(--purple-wash); }
.wx-choices button.is-ok { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-deep); }
.wx-choices button.is-bad { background: #fdeeee; border-color: var(--danger); color: var(--danger); }
.wx-choices button:disabled { cursor: default; }

.wx-pager { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0 2rem; }

/* Cloud game */
.wx-game-stage {
  background: linear-gradient(180deg, #c9e7f7, #f7f7f7 68%);
  border: 1px solid var(--rule); border-radius: 18px; padding: 1rem; min-height: 220px;
  display: flex; align-items: center; justify-content: center; margin-bottom: .8rem;
}
.wx-game-stage svg { width: min(100%, 420px); height: auto; }

/* Water cycle / storm lab */
.wx-cycle { display: grid; gap: .6rem; }
@media (min-width: 700px) { .wx-cycle { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.wx-hotspots { position: relative; }
.wx-hotspots svg { width: 100%; height: auto; }
.wx-spot {
  position: absolute; transform: translate(-50%,-50%);
  min-width: 44px; min-height: 44px; border-radius: 999px;
  border: 2px solid var(--purple); background: #fff; color: var(--purple-deep);
  font-weight: 800; cursor: pointer; box-shadow: var(--shadow-soft);
}
.wx-spot.is-on, .wx-spot:hover { background: var(--purple); color: #fff; }
.wx-spot.is-done { background: var(--brand); border-color: var(--brand); color: #fff; }

.wx-ingredients { display: grid; gap: .45rem; margin: 0 0 .8rem; }
.wx-ingredients label {
  display: flex; gap: .6rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: .7rem .8rem;
  cursor: pointer; min-height: 44px;
}
.wx-ingredients label.is-on { border-color: var(--purple); background: var(--purple-wash); }
.wx-ingredients input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex-shrink: 0; }

.wx-badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.wx-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--gold-soft); border-radius: 999px; padding: .35rem .7rem;
  font-weight: 700; font-size: .88rem; color: var(--purple-deep);
}
.wx-badge.is-off { background: #fff; border: 1px dashed var(--rule-strong); color: var(--ink-faint); font-weight: 600; }

.wx-print-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 0; }

@page { size: Letter; margin: .5in; }
@media print {
  html, body { background: #fff !important; }
  body.has-dock { padding-bottom: 0 !important; }
  .site-header, .site-footer, .site-dock, .skip, .menu-toggle, .header-tools,
  .wx-tools, .wx-print-actions, .ask-scout, .nav-lock, .wx-listen, .wx-pager { display: none !important; }
  .wx-card, .wx-panel, .wx-qa, .wx-verse { box-shadow: none; break-inside: avoid; }
}
