/* ==========================================================================
   ScienceHutch: Making Waves page only (waves.html).
   Colors and fonts come from the tokens in main.css (:root).
   Right answers use orange + a check mark; wrong answers use red + a cross,
   so color is never the only signal.
   ========================================================================== */

.wv-wrap { width: min(100% - 2rem, 62rem); margin-inline: auto; }
.wv-page { padding-bottom: 3rem; }
.wv-page h2, .wv-page h3 { line-height: 1.2; }

/* ======= INTRO ======= */
.wv-hero {
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at 85% 45%, #3a1a10, var(--bg) 65%);
}
.wv-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: 2rem;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
.wv-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.02;
}
.wv-hero h1 span { color: var(--orange); }
.wv-lead { max-width: 36em; margin: 1rem 0 1.75rem; color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.25rem); }
.wv-hero-buttons { justify-content: flex-start; }
.wv-hero-art { width: 100%; height: auto; overflow: visible; }
.wv-art-rest { stroke: var(--border); stroke-width: 2; stroke-dasharray: 6 6; }
.wv-art-wave { fill: none; stroke: var(--orange); stroke-width: 6; stroke-linecap: round; }
.wv-art-dot { fill: var(--ink); }
.wv-art-dot--red { fill: var(--red); }
@media (max-width: 699px) {
  .wv-hero-inner { grid-template-columns: 1fr; }
  .wv-hero-art { max-width: 260px; grid-row: 1; }
}

/* ======= HOW IT WORKS ======= */
.wv-how, .wv-levels, .wv-teachers { padding-top: 2.75rem; }
.wv-section-intro { color: var(--muted); max-width: 48em; margin: 0 0 1.25rem; }
.wv-small { font-size: 0.95rem; margin-top: 1rem; }
.wv-star { color: var(--orange); }
.wv-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wv-how-card {
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.wv-how-card h3 { margin: 0.6rem 0 0.3rem; font-size: 1.15rem; }
.wv-how-card p { margin: 0; color: var(--muted); }
.wv-step-badge {
  display: inline-grid;
  place-items: center;
  width: 2rem; height: 2rem;
  flex: none;
  border-radius: 50%;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--orange);
}
.wv-step-badge--learn { background: var(--badge); }
.wv-step-badge--practice { background: var(--orange); }
.wv-step-badge--apply { background: #FF6B4A; }
@media (max-width: 699px) { .wv-how-grid { grid-template-columns: 1fr; } }

/* ======= LEVEL MAP ======= */
.wv-levels-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.wv-total { margin: 0 0 16px; color: var(--orange); font-weight: 700; }
.wv-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wv-level {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.wv-level:hover { border-color: var(--orange); transform: translateY(-2px); }
.wv-level:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wv-level.is-current { border-color: var(--orange); }
.wv-level-num { color: var(--orange); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.wv-level-name { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.15; }
.wv-level-tag { color: var(--muted); font-size: 0.92rem; }
.wv-level-status { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; padding-top: 0.5rem; }
.wv-level-steps { display: inline-flex; gap: 5px; }
.wv-level-steps span { width: 22px; height: 6px; border-radius: 3px; background: var(--border); }
.wv-level-steps span.is-done { background: var(--orange); }
.wv-level-stars { color: var(--orange); font-weight: 700; font-size: 0.9rem; }
.wv-noscript { padding: 1rem; border: 1px solid var(--red); border-radius: 12px; }
@media (max-width: 799px) { .wv-map { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .wv-map { grid-template-columns: 1fr; } }

/* ======= PLAYER ======= */
.wv-player {
  margin-top: 2.5rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  scroll-margin-top: 0.75rem;
}
.wv-player-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.wv-player-level { margin: 0; color: var(--orange); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.wv-player h2 { margin: 0.2rem 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.wv-player h2:focus { outline: none; }
.wv-link-btn {
  flex: none;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid #9A6A58;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.wv-link-btn:hover { border-color: var(--orange); }
.wv-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}
.wv-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.4rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.wv-step:hover { border-color: #9A6A58; color: var(--ink); }
.wv-step.is-now { border-color: var(--orange); color: var(--ink); }
.wv-step .wv-step-badge { width: 1.7rem; height: 1.7rem; font-size: 0.85rem; }
.wv-step:not(.is-now):not(.is-done) .wv-step-badge { background: var(--surface-2); color: var(--muted); }
/* Small phones: badge above the word so all three steps fit. */
@media (max-width: 419px) {
  .wv-step { flex-direction: column; gap: 0.2rem; padding: 0.45rem 0.25rem; border-radius: 14px; font-size: 0.9rem; }
}

/* The "Your goal" box at the top of every screen. */
.wv-goal {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 5px solid var(--orange);
  border-radius: 10px;
  background: var(--surface-2);
}
.wv-goal-label {
  flex: none;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wv-goal p { margin: 0; font-size: 1.05rem; }
@media (max-width: 479px) { .wv-goal { flex-direction: column; gap: 0.25rem; } }

.wv-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.wv-btn-small {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid #9A6A58;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.wv-btn-small:hover { border-color: var(--orange); }
.wv-btn-small[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 138, 43, 0.15); }
button.btn { cursor: pointer; font-family: inherit; }
button:disabled { cursor: default; }

/* ======= MODELS (SVG) ======= */
.wv-demo { margin: 0 0 1rem; }
.wv-svg { display: block; width: 100%; height: auto; border-radius: 12px; background: #0D0B0A; border: 1px solid var(--border); }
.wv-demo figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.92rem; }
.wv-wave { fill: none; stroke: var(--orange); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.wv-wave--b { stroke: var(--badge); }
.wv-wave--sum { stroke: var(--red); stroke-width: 5; }
.wv-wave--target { stroke-dasharray: 10 8; stroke-width: 5; opacity: 0.9; }
.wv-wave--mine { stroke: var(--ink); stroke-width: 3; }
.wv-rest { stroke: #5A4038; stroke-width: 2; stroke-dasharray: 6 6; }
.wv-guide { stroke: #7A5A50; stroke-width: 2; stroke-dasharray: 4 5; }
.wv-guide--faint { opacity: 0.6; }
.wv-arrow { stroke: var(--ink); stroke-width: 2.5; }
.wv-arrow--red { stroke: var(--red); }
.wv-ah { fill: var(--ink); }
.wv-ah-ray { fill: #FFD27A; }
.wv-art-text { fill: var(--muted); font: 600 15px var(--font); }
.wv-art-text--hot { fill: var(--orange); }
.wv-art-big { fill: var(--ink); font: 800 22px var(--font); }
.wv-rope { fill: none; stroke: #5A4038; stroke-width: 2; }
.wv-bead { fill: var(--badge); }
.wv-bead--hot { fill: var(--orange); stroke: var(--bg); stroke-width: 2; }
.wv-flag { fill: var(--red); }
.wv-coil { stroke: #CDBBB0; stroke-width: 3; stroke-linecap: round; }
.wv-coil--hot { stroke: var(--orange); stroke-width: 6; }
.wv-mark-box { fill: rgba(255, 138, 43, 0.08); stroke: var(--orange); stroke-width: 2; stroke-dasharray: 5 4; }
.wv-ruler { stroke: #7A5A50; stroke-width: 2; }
.wv-probe { fill: var(--badge); }
.wv-wall { fill: #3A2622; stroke: #7A5A50; stroke-width: 2; }
.wv-water { fill: #10202A; }
.wv-ray { stroke: #FFD27A; stroke-width: 4; stroke-linecap: round; }
.wv-svg--ecg { background: #160E0C; }
.wv-ecg-sm { stroke: #2C1B17; stroke-width: 1; }
.wv-ecg-lg { stroke: #4E2A22; stroke-width: 1.5; }
.wv-ecg-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.wv-svg--chirp { background: none; border: 0; border-radius: 0; }
/* Phones: the drawings shrink, so make their words bigger (sizes are in drawing units). */
@media (max-width: 599px) {
  .wv-art-text { font-size: 24px; }
  .wv-art-big { font-size: 30px; }
  .wv-part-label { font-size: 24px; }
  .wv-part.is-on .wv-part-label { font-size: 26px; }
}

/* Wave parts diagram: dim the rest when one part is chosen. */
.wv-part-dot { fill: var(--badge); }
.wv-part-label { fill: var(--muted); font: 700 16px var(--font); }
.wv-parts .wv-part { transition: opacity 0.2s; }
.wv-parts.has-focus .wv-part { opacity: 0.35; }
.wv-parts.has-focus .wv-part.is-on { opacity: 1; }
.wv-part.is-on .wv-part-label { fill: var(--orange); font-size: 19px; }
.wv-part.is-on .wv-part-dot { fill: var(--orange); r: 10; }
.wv-part.is-on .wv-arrow, .wv-part.is-on .wv-rest { stroke: var(--orange); }
.wv-part.is-on .wv-ah { fill: var(--orange); }

/* ======= CONTROLS ======= */
.wv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0 0 0.75rem; }
.wv-check { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 600; cursor: pointer; }
.wv-check input { width: 1.3rem; height: 1.3rem; accent-color: var(--orange); }
.wv-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.wv-chip {
  min-height: 44px;
  padding: 0.45rem 1rem;
  border: 2px solid #9A6A58;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.wv-chip:hover { border-color: var(--orange); }
.wv-chip[aria-pressed="true"] { border-color: var(--orange); background: var(--orange); color: var(--on-accent); }
.wv-slider { margin: 0 0 1rem; }
.wv-slider label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.wv-slider output { color: var(--orange); font-variant-numeric: tabular-nums; }
.wv-slider input[type="range"] { width: 100%; height: 2rem; accent-color: var(--orange); cursor: pointer; }
.wv-lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.5rem; }
@media (max-width: 649px) { .wv-lab-grid { grid-template-columns: 1fr; } }
.wv-readout { display: grid; gap: 0.5rem; margin: 0; }
.wv-readout div { padding: 0.5rem 0.75rem; border-radius: 10px; background: var(--surface-2); }
.wv-readout dt { color: var(--muted); font-size: 0.85rem; }
.wv-readout dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.wv-meter { display: inline-block; width: 90px; height: 10px; vertical-align: middle; border-radius: 5px; background: var(--border); overflow: hidden; }
.wv-meter span { display: block; height: 100%; background: var(--orange); }
.wv-observe {
  min-height: 3em;
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px dashed #9A6A58;
  color: var(--ink);
}
.wv-key { display: inline-block; width: 28px; height: 0; margin: 0 0.3rem 0.25rem 0.75rem; vertical-align: middle; border-top: 4px dashed var(--orange); }
.wv-key--mine { border-top: 3px solid var(--ink); }
.wv-key:first-child { margin-left: 0; }

/* ======= KEY IDEAS, REAL-WORLD CALLOUTS, GO DEEPER ======= */
.wv-ideas { margin: 1.25rem 0; padding-left: 1.2rem; }
.wv-ideas li { margin-bottom: 0.5rem; }
.wv-ideas li::marker { color: var(--orange); }
.wv-callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0.75rem; margin: 1rem 0; }
.wv-callout { padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.wv-callout p { margin: 0.4rem 0 0; color: var(--muted); }
.wv-tag {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.wv-tag--health { background: #C0341F; color: #fff; }  /* darker than --red so white text passes 4.5:1 */
.wv-tag--everyday { background: var(--badge); color: var(--on-accent); }
.wv-deeper { margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; }
.wv-deeper summary { min-height: 44px; display: flex; align-items: center; padding: 0.5rem 1rem; font-weight: 700; cursor: pointer; }
.wv-deeper > div { padding: 0 1rem 0.5rem; color: var(--muted); }
.wv-info { margin: 0 0 1rem; padding: 0.9rem 1rem; border-radius: 12px; background: var(--surface-2); }
.wv-info h3 { margin: 0.3rem 0; color: var(--orange); font-size: 1.25rem; }
.wv-info p { margin: 0.3rem 0; }
.wv-info-count { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.wv-safety { color: var(--muted); }

/* ======= QUIZ ======= */
.wv-quiz-intro { margin: 0 0 1rem; color: var(--muted); }
.wv-q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.wv-q-count { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.wv-q-head .wv-q-count { margin: 0; }
.wv-dots { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.wv-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.wv-dots span.is-done { background: var(--orange); }
.wv-dots span.is-now { background: var(--ink); }
.wv-q-title { margin: 0 0 0.5rem; }
.wv-q-art { margin: 0 0 0.75rem; }
.wv-q { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 600; }
.wv-q:focus { outline: none; }
.wv-choices { display: grid; gap: 0.6rem; }
.wv-choices--two { grid-template-columns: 1fr 1fr; }
@media (max-width: 479px) { .wv-choices--two { grid-template-columns: 1fr; } }
.wv-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.65rem 1rem;
  border: 2px solid #9A6A58;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  text-align: left;
  cursor: pointer;
}
.wv-choice:hover:not(:disabled) { border-color: var(--orange); }
.wv-choice-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.6rem; height: 1.6rem;
  border: 2px solid #9A6A58;
  border-radius: 50%;
  font-weight: 800;
}
.wv-choice:disabled { opacity: 0.55; }
.wv-choice.is-right { opacity: 1; border-color: var(--orange); background: rgba(255, 138, 43, 0.14); }
.wv-choice.is-right .wv-choice-mark { border-color: var(--orange); background: var(--orange); color: var(--on-accent); }
.wv-choice.is-wrong { opacity: 0.75; border-color: var(--red); text-decoration: line-through; text-decoration-color: var(--red); }
.wv-choice.is-wrong .wv-choice-mark { border-color: var(--red); background: var(--red); color: #fff; }
.wv-feedback:empty { display: none; }
.wv-feedback { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 12px; border-left: 5px solid var(--border); background: var(--surface-2); }
.wv-feedback.is-right { border-left-color: var(--orange); }
.wv-feedback.is-right strong { color: var(--orange); }
.wv-feedback.is-wrong { border-left-color: var(--red); }
.wv-feedback.is-wrong strong { color: #FF7A68; }
.wv-q-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.wv-q-actions:empty { display: none; }
.wv-result { padding: 1.25rem; border-radius: 14px; background: var(--surface-2); text-align: center; }
.wv-result:focus { outline: none; }
.wv-result p { margin: 0.4rem 0; }
.wv-result .wv-btn-small { margin-top: 0.5rem; }
.wv-stars { color: var(--orange); font-size: 2rem; letter-spacing: 0.15em; }

/* ======= GAME INSTRUCTIONS ("How to play" cards) ======= */
.wv-howto { padding: 1.1rem 1.25rem 1.3rem; border: 2px dashed #9A6A58; border-radius: 14px; }
.wv-howto h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.wv-howto ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.wv-howto li { margin-bottom: 0.4rem; }
.wv-best { color: var(--orange); font-weight: 700; }

/* ======= WAVE HUNT ======= */
.wv-hunt-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.wv-hunt-prompt { margin: 0; font-size: 1.2rem; }
.wv-hunt-prompt strong { color: var(--orange); font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.04em; }
.wv-hunt-meta { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.wv-hunt-stage { position: relative; }
.wv-spot {
  position: absolute;
  width: 36px; height: 36px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-accent);
  font: 800 1rem var(--font);
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--orange);
}
.wv-spot:hover { background: var(--focus); }
.wv-spot.is-right { background: var(--orange); }
.wv-spot.is-wrong { background: var(--red); color: #fff; animation: wv-shake 0.35s; }
@media (max-width: 479px) { .wv-spot { width: 29px; height: 29px; border-width: 2px; font-size: 0.85rem; } }
@keyframes wv-shake {
  25% { transform: translate(calc(-50% - 4px), -50%); }
  75% { transform: translate(calc(-50% + 4px), -50%); }
}

/* ======= SPECTRUM ======= */
.wv-spectrum-ends { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.25rem; }
.wv-bands { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; margin: 0.5rem 0 1rem; }
.wv-band {
  min-height: 52px;
  padding: 0.4rem 0.3rem;
  border: 2px solid transparent;
  border-radius: 10px;
  color: #140A06;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
}
.wv-band[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--orange); }
/* Same colors Spectrum Quest uses for each kind of light (so the two pages match). */
.wv-band--radio { background: #FF6B8B; }
.wv-band--micro { background: #FF9F43; }
.wv-band--ir { background: #FF6A5C; }
.wv-band--vis { background: linear-gradient(90deg, #FF5A5A, #FFB000, #FFE14D, #7CFF4F, #5FBFFF, #B88BFF); }
.wv-band--uv { background: #B98BFF; }
.wv-band--xray { background: #8AA4FF; }
.wv-band--gamma { background: #3FE0D0; }
@media (max-width: 649px) {
  .wv-bands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wv-spectrum-ends { font-size: 0.78rem; }
}
.wv-lineup { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: slot; }
.wv-slot {
  display: grid;
  min-height: 56px;
  place-items: center;
  border: 2px dashed #5A4038;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
}
.wv-slot.is-filled { border-style: solid; border-color: transparent; }
.wv-slot .wv-band { display: grid; place-items: center; width: 100%; height: 100%; cursor: default; }
.wv-pool { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wv-pool .wv-band { padding-inline: 0.9rem; }
.wv-band.is-wrong { animation: wv-shake-x 0.35s; box-shadow: 0 0 0 3px var(--red); }
@keyframes wv-shake-x { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 649px) {
  .wv-lineup { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wv-slot .wv-band { font-size: 0.72rem; padding: 0.3rem 0.15rem; }
}
.wv-band { hyphens: auto; text-align: center; }
@media (max-width: 479px) {
  .wv-bands, .wv-lineup { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wv-band { font-size: 0.8rem; }
  .wv-slot .wv-band { font-size: 0.75rem; }
}

/* ======= LEVEL COMPLETE ======= */
.wv-complete { text-align: center; padding: 1rem 0; }
.wv-complete h3 { margin: 0 0 0.75rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--orange); }
.wv-complete p { max-width: 34em; margin: 0.5rem auto; }
.wv-complete-row { display: flex; align-items: center; justify-content: center; gap: 1rem; font-weight: 700; }
.wv-complete .cta-row { margin-top: 1.25rem; }
.wv-badge-big { font-size: 4rem; margin: 0; }

/* ======= FOR TEACHERS ======= */
.wv-teachers details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.wv-teachers summary { min-height: 48px; display: flex; align-items: center; padding: 0.6rem 1.1rem; font-weight: 700; cursor: pointer; }
.wv-teachers-body { padding: 0 1.1rem 1rem; color: var(--muted); }
.wv-teachers-body strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .wv-level, .wv-parts .wv-part { transition: none; }
  .wv-level:hover { transform: none; }
  .wv-spot.is-wrong, .wv-band.is-wrong { animation: none; }
}


/* ==========================================================================
   CELEBRATION LAYER (added 2026-11): the same playful look as Spectrum Quest.
   Animated intro scene, sticky progress bar, level icons, streaks, star pops,
   badge pop-ups, trophy room and the Wave Master certificate.
   Everything that moves stops for people who ask for reduced motion (bottom).
   ========================================================================== */
.wv-page {
  --teal: #3FE0D0;
  --sea: #4FA8FF;
  --good: #7CFF9E;
  --glass-border: rgba(255, 255, 255, 0.09);
}

/* ======= INTRO: sunset sea + twinkling stars ======= */
.wv-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 55% at 80% 30%, rgba(255, 138, 43, 0.26), transparent 70%),
    radial-gradient(ellipse 60% 45% at 70% 95%, rgba(63, 224, 208, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 40% at 10% 80%, rgba(79, 168, 255, 0.12), transparent 70%),
    var(--bg);
}
.wv-hero-inner { position: relative; }
.wv-sky, .wv-sky::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 52%, #ffe9c7, transparent),
    radial-gradient(1.4px 1.4px at 46% 12%, #fff, transparent),
    radial-gradient(1px 1px at 64% 34%, #cfeaff, transparent),
    radial-gradient(1.3px 1.3px at 86% 14%, #fff, transparent),
    radial-gradient(1px 1px at 8% 64%, #fff, transparent);
  background-size: 380px 380px;
  opacity: 0.6;
}
.wv-sky::after { content: ""; background-size: 280px 280px; background-position: 90px 40px; animation: wv-twinkle 5s ease-in-out infinite alternate; }
@keyframes wv-twinkle { from { opacity: 0.1; } to { opacity: 0.8; } }
.wv-hero h1 span {
  background: linear-gradient(90deg, #FFB86B, #FF8A2B 30%, #FF6B8B 55%, #3FE0D0 85%, #4FA8FF);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wv-shimmer 8s ease-in-out infinite alternate;
}
@keyframes wv-shimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.wv-hero-art { max-width: 520px; justify-self: center; }
.wv-hero-sun { animation: wv-sun 5s ease-in-out infinite alternate; transform-origin: 380px 60px; }
@keyframes wv-sun { from { transform: scale(0.94); opacity: 0.8; } to { transform: scale(1.06); opacity: 1; } }
.wv-hb { fill: var(--badge); filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5)); }
.wv-hb.is-hot { fill: var(--orange); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 8px var(--orange)); }
.wv-hero-note { fill: var(--muted); font: 600 13px var(--font); }
@media (max-width: 699px) { .wv-hero-art { max-width: 420px; } }

/* ======= STICKY PROGRESS BAR ======= */
.wv-questbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 9, 8, 0.84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.wv-questbar-inner { display: flex; align-items: center; gap: 8px 12px; min-height: 52px; padding-block: 6px; }
.wv-pearls { display: flex; gap: 6px; margin-right: auto; }
.wv-pearl {
  --fill: 0%;
  position: relative;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--fill), rgba(255, 255, 255, 0.08) var(--fill));
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  transition: box-shadow 0.4s;
}
.wv-pearl > span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #120E10; }
.wv-pearl.is-started > span { color: var(--ink); }
.wv-pearl.is-done { background: linear-gradient(135deg, #FFB86B, #FF8A2B 45%, #3FE0D0); box-shadow: 0 0 12px rgba(255, 160, 80, 0.55); }
.wv-pearl.is-done > span { background: transparent; color: #120A06; }
.wv-bar-pill {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 6px 12px;
  border: 1px solid #9A6A58; border-radius: 999px;
  background: transparent;
  color: var(--ink); font: inherit; font-weight: 700; text-decoration: none;
  white-space: nowrap;
}
.wv-bar-pill > span:first-child { color: #FFD45A; }
a.wv-bar-pill:hover, .wv-sound:hover { border-color: var(--orange); }
.wv-sound { gap: 6px; cursor: pointer; font-weight: 600; }
.wv-sound > span:first-child { color: inherit; }
.wv-sound[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 138, 43, 0.12); }
@media (max-width: 559px) {
  .wv-sound-label { display: none; }
  .wv-questbar-inner { gap: 6px; }
  .wv-bar-pill { padding: 6px 9px; }
}
@media (max-width: 379px) {
  .wv-questbar-inner { gap: 5px; }
  .wv-pearls { gap: 3px; }
  .wv-pearl { width: 17px; height: 17px; font-size: 0; }
  .wv-pearl > span { width: 11px; height: 11px; }
  .wv-bar-pill { min-height: 38px; padding: 5px 8px; font-size: 0.85rem; }
}
/* The bar sits over the page top, so jump targets leave room for it. */
.wv-levels, .wv-trophies, #wv-how { scroll-margin-top: 64px; }
.wv-player { scroll-margin-top: 64px; }

/* ======= HOW IT WORKS ======= */
.wv-how-card { position: relative; background: linear-gradient(160deg, rgba(36, 26, 32, 0.8), rgba(18, 14, 16, 0.9)); }
.wv-how-card .wv-step-badge { box-shadow: 0 0 16px rgba(255, 138, 43, 0.45); }
.wv-how-tip { max-width: 48em; margin: 0.75rem 0 0; padding: 0.85rem 1rem; border-radius: 12px; background: rgba(63, 224, 208, 0.07); border-left: 4px solid var(--teal); }

/* ======= LEVEL MAP: icons, next-up glow, finished shine ======= */
.wv-level { position: relative; overflow: hidden; background: linear-gradient(160deg, rgba(36, 26, 32, 0.85), rgba(18, 14, 16, 0.95)); transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.wv-level:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 138, 43, 0.3); }
.wv-level-icon {
  position: absolute;
  top: 12px; right: 12px;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.45rem;
  transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.wv-level:hover .wv-level-icon { transform: rotate(-8deg) scale(1.08); }
.wv-level-num, .wv-level-name, .wv-level-tag { padding-right: 52px; }
.wv-level::after {   /* a little wave along the bottom of every card */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: radial-gradient(circle at 10px -4px, transparent 8px, rgba(255, 138, 43, 0.25) 9px 10px, transparent 11px) 0 0 / 20px 6px repeat-x;
  opacity: 0.6;
}
.wv-level.is-next { border-color: var(--teal); box-shadow: 0 0 0 1px rgba(63, 224, 208, 0.35), 0 0 26px rgba(63, 224, 208, 0.18); }
.wv-level.is-next .wv-level-num::after {
  content: "Next up";
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal);
  color: #062420;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  animation: wv-pulse 1.8s ease-in-out infinite;
}
@keyframes wv-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(63, 224, 208, 0.5); } 50% { box-shadow: 0 0 0 6px rgba(63, 224, 208, 0); } }
.wv-level.is-done { border-color: rgba(255, 212, 90, 0.55); background: radial-gradient(ellipse at 90% 0%, rgba(255, 212, 90, 0.16), transparent 60%), linear-gradient(160deg, rgba(36, 26, 32, 0.85), rgba(18, 14, 16, 0.95)); }
.wv-level.is-done .wv-level-icon { background: radial-gradient(circle, #FFE9A8, #FF9F43); box-shadow: 0 0 18px rgba(255, 180, 70, 0.55); }
.wv-level.is-done .wv-level-steps span.is-done { background: linear-gradient(90deg, #FF8A2B, #3FE0D0); }

/* ======= PLAYER: smooth step changes, glow, streak ======= */
.wv-player { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.wv-player-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.wv-streak { color: #FFB86B; font-weight: 800; white-space: nowrap; }
.wv-screen.wv-enter { animation: wv-enter 0.45s ease-out; }
@keyframes wv-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wv-goal { position: relative; overflow: hidden; }
.wv-goal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: wv-sheen 1.2s 0.3s ease-out 1 forwards;
  pointer-events: none;
}
@keyframes wv-sheen { to { transform: translateX(100%); } }
.wv-step.is-done .wv-step-badge { box-shadow: 0 0 10px rgba(255, 138, 43, 0.5); }
.btn.wv-glow { animation: wv-glow 1.6s ease-in-out 3; }
@keyframes wv-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 138, 43, 0.6); } 50% { box-shadow: 0 0 0 10px rgba(255, 138, 43, 0); } }
.wv-choice { transition: transform 0.15s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s; }
.wv-choice:hover:not(:disabled) { transform: translateX(3px); }
.wv-choice.is-right { box-shadow: 0 0 22px rgba(255, 138, 43, 0.3); animation: wv-pop 0.45s cubic-bezier(.2, 1.6, .4, 1); }
.wv-choice.is-wrong { animation: wv-shake-x 0.35s; }
.wv-feedback.is-right, .wv-feedback.is-wrong { animation: wv-enter 0.35s ease-out; }
.wv-pop { animation: wv-pop 0.45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes wv-pop { 0% { transform: scale(0.92); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* Result stars pop in one by one. */
.wv-star-pop { display: inline-block; animation: wv-star 0.5s cubic-bezier(.2, 1.6, .4, 1) both; }
.wv-star-pop.is-on { color: #FFD45A; text-shadow: 0 0 16px rgba(255, 212, 90, 0.7); }
@keyframes wv-star { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.wv-result .wv-stars { font-size: 2.2rem; letter-spacing: 6px; }

/* Level complete: the badge reveal */
.wv-badge-reveal { margin: 0 auto 1rem; }
.wv-badge-medal {
  display: inline-grid; place-items: center;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFE9A8, #FF9F43);
  box-shadow: 0 0 0 6px rgba(255, 212, 90, 0.18), 0 0 40px rgba(255, 180, 70, 0.55);
  font-size: 2.8rem;
  animation: wv-medal 0.9s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes wv-medal { from { transform: scale(0) rotate(-200deg); } to { transform: none; } }
.wv-badge-reveal p { margin: 0.6rem 0 0; font-size: 1.1rem; }
.wv-badge-hint { color: var(--muted); }

/* ======= TROPHY ROOM ======= */
.wv-trophies { padding-top: 2.75rem; }
.wv-badges { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.wv-badge a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 100%;
  padding: 16px 8px;
  border: 1px dashed #6B5A54;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.wv-badge a:hover { border-color: var(--orange); transform: translateY(-2px); }
.wv-badge-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); font-size: 1.7rem; font-weight: 800; }
.wv-badge-name { color: var(--ink); font-weight: 800; font-size: 0.95rem; }
.wv-badge-desc { font-size: 0.8rem; }
.wv-badge.is-earned a { border: 1px solid rgba(255, 212, 90, 0.55); background: radial-gradient(ellipse at 50% 0%, rgba(255, 212, 90, 0.14), transparent 70%); }
.wv-badge.is-earned .wv-badge-icon { background: radial-gradient(circle, #FFE9A8, #FF9F43); box-shadow: 0 0 22px rgba(255, 180, 70, 0.55); }
.wv-cert-wrap { margin-top: 24px; }
.wv-cert-locked { padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); text-align: center; }
.wv-cert-locked p { margin: 0; }
.wv-cert {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 22px;
  background: #FFFBF3;
  color: #2A1A12;
  text-align: center;
  box-shadow: 0 0 0 6px #120A06, 0 0 0 10px #FF8A2B, 0 30px 60px rgba(0, 0, 0, 0.5);
}
.wv-cert p { margin: 0 0 10px; }
.wv-cert-eyebrow { color: #8A3A10; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.wv-cert-title { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; background: linear-gradient(90deg, #D9480F, #E2412F, #0E8C82, #1F5FD6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wv-cert-name { display: inline-block; padding: 0 18px 4px; border-bottom: 2px solid #D9C7B5; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 5vw, 2.4rem); font-style: italic; }
.wv-cert-text, .wv-cert-date { color: #5A4436; }
.wv-cert-date { font-size: 0.9rem; }
.wv-cert-wave { height: 16px; max-width: 420px; margin: 18px auto 12px; background: radial-gradient(circle at 10px 0, transparent 7px, #FF8A2B 8px 10px, transparent 11px) 0 0 / 20px 8px repeat-x, radial-gradient(circle at 0 8px, transparent 7px, #3FE0D0 8px 10px, transparent 11px) 0 8px / 20px 8px repeat-x; }
.wv-cert-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.wv-cert-actions label { font-weight: 700; }
.wv-cert-actions input { min-height: 48px; padding: 8px 14px; border: 1px solid #9A6A58; border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; }
.wv-reset-row { margin: 24px 0 0; color: var(--muted); font-size: 0.92rem; text-align: center; }
.wv-reset-row .wv-link-btn { min-height: 40px; }
@media (max-width: 899px) { .wv-badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 559px) { .wv-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ======= POP-UP + CONFETTI LAYER ======= */
.wv-toast {
  position: fixed;
  left: 50%; top: 14px;
  z-index: 60;
  display: flex; align-items: center; gap: 12px;
  max-width: min(92vw, 460px);
  padding: 12px 18px 12px 12px;
  border: 1px solid rgba(255, 212, 90, 0.6);
  border-radius: 18px;
  background: rgba(24, 18, 22, 0.96);
  box-shadow: 0 0 30px rgba(255, 180, 70, 0.35), 0 18px 40px rgba(0, 0, 0, 0.5);
  color: var(--ink);
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(.2, 1.4, .4, 1), opacity 0.3s;
}
.wv-toast.show { transform: translate(-50%, 0); opacity: 1; }
.wv-toast:empty { display: none; }
.wv-toast-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, #FFE9A8, #FF9F43); font-size: 1.5rem; }
.wv-toast-body { display: flex; flex-direction: column; }
.wv-toast-body span { color: var(--muted); font-size: 0.9rem; }
.wv-fx { position: fixed; inset: 0; z-index: 55; width: 100vw; height: 100vh; pointer-events: none; }

/* Fade-up as sections scroll into view (only while JavaScript runs). */
.wv-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.wv-reveal.in { opacity: 1; transform: none; }

/* ======= REDUCED MOTION: everything holds still ======= */
@media (prefers-reduced-motion: reduce) {
  .wv-page *, .wv-page *::before, .wv-page *::after, .wv-toast { animation: none !important; transition: none !important; }
  .wv-goal::after { display: none; }
}

/* ======= PRINT: only the certificate when "Print certificate" is pressed ======= */
@media print {
  body.wv-print-cert * { visibility: hidden; }
  body.wv-print-cert .wv-cert, body.wv-print-cert .wv-cert * { visibility: visible; }
  body.wv-print-cert .wv-cert { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 6px double #FF8A2B; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
