@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap");

:root {
  --ink: #013f43;
  --ink-deep: #002f33;
  --ink-soft: #41696c;
  --aqua: #1cd4de;
  --aqua-dark: #08aab5;
  --aqua-pale: #d2f6f8;
  --paper: #f4f7f6;
  --white: #fff;
  --lime: #c9ef70;
  --amber: #ffca62;
  --coral: #ff7a67;
  --red: #d7473f;
  --shadow: 0 28px 70px rgba(0, 47, 51, .16);
  --shadow-small: 0 12px 32px rgba(0, 47, 51, .12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 20%, rgba(28, 212, 222, .12), transparent 31rem),
    radial-gradient(circle at 95% 70%, rgba(201, 239, 112, .14), transparent 27rem),
    var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--amber);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px clamp(20px, 5vw, 76px);
  color: var(--white);
  background: var(--ink);
}

.brand {
  display: inline-flex;
}

.brand img {
  display: block;
  width: 177px;
  height: auto;
}

.header-actions,
.sound-button,
.live-chip {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 20px;
}

.header-games {
  color: var(--aqua);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.header-games:hover,
.header-games:focus-visible {
  color: var(--white);
  text-decoration: underline;
}

.header-phone {
  text-align: right;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
}

.header-phone span {
  display: block;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.live-chip {
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 7px rgba(201, 239, 112, .12);
  animation: pulse 2s infinite;
}

.sound-button {
  gap: 8px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
}

.sound-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.sound-button .sound-wave,
.sound-button .sound-off {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.sound-button .sound-wave {
  display: none;
}

.sound-button[aria-pressed="true"] .sound-off {
  display: none;
}

.sound-button[aria-pressed="true"] .sound-wave {
  display: block;
}

main {
  min-height: calc(100vh - 76px);
}

.screen {
  display: none;
  width: min(1440px, 100%);
  min-height: 720px;
  margin: 0 auto;
  padding: clamp(42px, 6vw, 88px) clamp(20px, 5vw, 76px);
}

.screen.is-active {
  display: flex;
  animation: screen-in .6s cubic-bezier(.2, .8, .2, 1) both;
}

.intro-screen {
  position: relative;
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  overflow: hidden;
}

.intro-copy {
  position: relative;
  z-index: 3;
  flex: 1 1 52%;
  max-width: 680px;
}

.eyebrow,
.question-kicker,
.dave-says {
  margin: 0;
  color: var(--aqua-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 7px;
  color: var(--coral);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Manrope", "DM Sans", sans-serif;
  letter-spacing: -.045em;
}

h1 {
  margin-top: 13px;
  font-size: clamp(3rem, 6.8vw, 6.6rem);
  line-height: .94;
}

h1 span {
  position: relative;
  display: inline-block;
  color: var(--aqua-dark);
  transform: rotate(-2deg);
}

h1 span::after {
  content: "";
  position: absolute;
  right: -4%;
  bottom: -7px;
  left: -3%;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  transform: rotate(-1deg);
}

.intro-lede {
  max-width: 590px;
  margin: 28px 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.game-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.game-features li {
  display: flex;
  align-items: center;
  min-width: 175px;
  padding: 11px 14px;
  border: 1px solid rgba(1, 63, 67, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 7px 18px rgba(0, 47, 51, .06);
  backdrop-filter: blur(8px);
}

.feature-number {
  min-width: 37px;
  color: var(--aqua-dark);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.game-features strong,
.game-features small {
  display: block;
}

.game-features strong {
  font-size: .88rem;
}

.game-features small {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: .67rem;
}

.primary-button,
.secondary-button,
.call-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  gap: 13px;
  min-height: 58px;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ink), #075c61);
  box-shadow: 0 14px 30px rgba(1, 63, 67, .22), inset 0 1px rgba(255,255,255,.16);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(1, 63, 67, .26), inset 0 1px rgba(255,255,255,.16);
}

.primary-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--aqua);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.microcopy {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: .76rem;
}

.intro-visual {
  position: relative;
  flex: 1 1 48%;
  align-self: stretch;
  min-height: 570px;
  perspective: 1200px;
}

.halo {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(28, 212, 222, .28);
}

.halo-one {
  inset: 6% -9% 0 -2%;
  background: radial-gradient(circle at 50% 45%, rgba(28, 212, 222, .25), rgba(210, 246, 248, .08) 45%, transparent 70%);
  animation: halo-float 7s ease-in-out infinite;
}

.halo-two {
  top: 20%;
  right: 2%;
  width: 70%;
  aspect-ratio: 1;
  border-style: dashed;
  animation: spin 36s linear infinite;
}

.dave-scene {
  position: absolute;
  inset: 3% 0 0;
  transform: rotateY(-5deg) rotateX(1deg);
  transform-style: preserve-3d;
}

.dave-hero {
  position: absolute;
  right: 1%;
  bottom: -4%;
  z-index: 2;
  width: min(92%, 490px);
  animation: dave-breathe 4s ease-in-out infinite;
}

.speech-bubble {
  position: absolute;
  top: 9%;
  left: 0;
  z-index: 4;
  padding: 18px 22px;
  border: 2px solid var(--ink);
  border-radius: 20px 20px 4px 20px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-small);
  font-size: 1.08rem;
  line-height: 1.25;
  transform: translateZ(70px) rotate(-3deg);
  animation: bubble-in .7s .4s both;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -2px;
  width: 25px;
  height: 24px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--white);
  clip-path: polygon(0 0, 100% 100%, 0 78%);
}

.floating-tool {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  color: var(--ink);
  background: var(--aqua);
  box-shadow: var(--shadow-small);
  transform: translateZ(100px);
}

.floating-tool svg {
  width: 28px;
  fill: currentColor;
}

.tool-one {
  top: 31%;
  right: 1%;
  animation: tool-float 4.6s ease-in-out infinite;
}

.tool-two {
  bottom: 19%;
  left: 3%;
  color: var(--white);
  background: var(--ink);
  animation: tool-float 5.2s .7s ease-in-out infinite reverse;
}

.quiz-screen {
  flex-direction: column;
  gap: 30px;
}

.quiz-topbar {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(220px, 2fr) auto;
  align-items: center;
  gap: 28px;
}

.progress-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.progress-copy span {
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.progress-copy strong {
  font-size: 1rem;
}

.progress-track {
  height: 10px;
  padding: 2px;
  border: 1px solid rgba(1, 63, 67, .12);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua-dark), var(--aqua), var(--lime));
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

.streak-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(1, 63, 67, .1);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 7px 18px rgba(0,47,51,.06);
  font-size: .82rem;
}

.streak-chip svg {
  width: 20px;
  fill: var(--coral);
}

.streak-chip.is-hot {
  animation: streak-pop .45s;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(340px, .92fr) minmax(420px, 1.08fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  flex: 1;
}

.scenario-stage {
  position: relative;
  min-height: 550px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(210,246,248,.62)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(1,63,67,.02) 8px 9px);
  box-shadow: var(--shadow);
  overflow: hidden;
  perspective: 1000px;
}

.stage-glow {
  position: absolute;
  top: -20%;
  right: -20%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--aqua);
  filter: blur(80px);
  opacity: .15;
}

.emergency-label {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 3;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.house-scene {
  position: absolute;
  inset: 40px 2% 35px;
  width: 96%;
  height: calc(100% - 75px);
  transform: rotateY(-4deg) rotateX(1deg) translateZ(10px);
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
}

.house-roof {
  fill: var(--ink);
}

.house-shell {
  fill: url("#wallGradient");
  stroke: rgba(1,63,67,.3);
  stroke-width: 4;
}

.floor-line,
.wall-line,
.window-line {
  fill: none;
  stroke: rgba(1,63,67,.17);
  stroke-width: 5;
}

.window {
  fill: #8be4e9;
  stroke: var(--white);
  stroke-width: 5;
}

.cupboard,
.boiler {
  fill: var(--white);
  stroke: var(--ink);
  stroke-width: 5;
}

.sink {
  fill: #cbd9da;
}

.tap,
.pipe {
  fill: none;
  stroke: #70888a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 9;
}

.boiler-dial {
  fill: var(--aqua-pale);
  stroke: var(--ink);
  stroke-width: 4;
}

.boiler-detail {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 5;
}

.effect {
  display: none;
}

.effect-water .water-wave {
  fill: url("#waterGradient");
}

.effect-water .wave-back {
  animation: wave 4.4s ease-in-out infinite alternate;
}

.effect-water .wave-front {
  opacity: .72;
  animation: wave 3.7s ease-in-out infinite alternate-reverse;
}

.effect-water .drops {
  fill: var(--aqua-dark);
  animation: drops 1.5s linear infinite;
}

.effect-gas path {
  fill: none;
  stroke: #72898a;
  stroke-linecap: round;
  stroke-width: 16;
  opacity: .48;
  animation: gas-rise 2.8s ease-in-out infinite;
}

.effect-gas path:nth-child(2) { animation-delay: -.8s; }
.effect-gas path:nth-child(3) { animation-delay: -1.6s; }

.effect-heat path {
  fill: none;
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-width: 10;
  animation: heat-rise 1.8s ease-in-out infinite;
}

.effect-heat circle {
  fill: none;
  stroke: var(--coral);
  stroke-width: 6;
  opacity: .7;
  animation: heat-pulse 1.7s ease-out infinite;
}

.effect-electric path {
  fill: var(--amber);
  stroke: var(--ink);
  stroke-width: 5;
}

.effect-electric circle {
  fill: none;
  stroke: var(--amber);
  stroke-width: 8;
  animation: electric-pulse 1.1s ease-out infinite;
}

.effect-drain path {
  fill: #547579;
  opacity: .88;
  animation: drain-wave 3s ease-in-out infinite alternate;
}

.effect-drain circle {
  fill: var(--amber);
  opacity: .65;
  animation: bubble 2s ease-in infinite;
}

.scenario-stage[data-effect="water"] .effect-water,
.scenario-stage[data-effect="gas"] .effect-gas,
.scenario-stage[data-effect="heat"] .effect-heat,
.scenario-stage[data-effect="electric"] .effect-electric,
.scenario-stage[data-effect="drain"] .effect-drain {
  display: block;
}

.alarm-beacon circle {
  fill: var(--coral);
  animation: alarm-pulse 1.6s ease-out infinite;
}

.alarm-beacon path {
  fill: none;
  stroke: var(--white);
  stroke-linecap: round;
  stroke-width: 8;
}

.stage-caption {
  position: absolute;
  right: 20px;
  bottom: 17px;
  left: 20px;
  color: var(--ink-soft);
  font-size: .76rem;
  text-align: center;
}

.question-panel {
  max-width: 680px;
}

.question-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.category-icon {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--aqua-pale);
  box-shadow: inset 0 0 0 1px rgba(1,63,67,.08);
  font-size: 1.55rem;
}

.question-panel h2 {
  max-width: 650px;
  margin-top: 4px;
  font-size: clamp(1.75rem, 3.5vw, 3.3rem);
  line-height: 1.05;
}

.scenario-copy {
  margin: 22px 0 25px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.55;
}

.answer-list {
  display: grid;
  gap: 12px;
}

.answer-button {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 23px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px 18px 12px 13px;
  border: 1px solid rgba(1,63,67,.12);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 22px rgba(0,47,51,.07);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s, background .2s;
}

.answer-button:hover {
  z-index: 2;
  border-color: var(--aqua-dark);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(0,47,51,.12);
  transform: translateX(5px);
}

.answer-letter {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
  background: var(--aqua-pale);
  font-weight: 800;
}

.answer-copy {
  font-weight: 650;
  line-height: 1.35;
}

.answer-arrow {
  color: var(--aqua-dark);
  font-size: 1.4rem;
}

.answer-button.is-picked {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
  transform: translateX(5px);
}

.answer-button.is-picked .answer-letter {
  background: var(--aqua);
}

.answer-button.is-picked .answer-arrow {
  color: var(--white);
}

.answer-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: .76rem;
}

.answer-hint svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.guide-screen {
  align-items: center;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(270px, .65fr) minmax(580px, 1.35fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  width: 100%;
}

.guide-verdict {
  text-align: center;
}

.verdict-orbit {
  position: relative;
  display: grid;
  width: 118px;
  height: 118px;
  margin: 0 auto 23px;
  place-items: center;
  border: 2px dashed rgba(1,63,67,.22);
  border-radius: 50%;
  animation: spin 16s linear infinite;
}

.verdict-orbit::before,
.verdict-orbit::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--aqua);
}

.verdict-orbit::before {
  top: 5px;
  left: 20px;
}

.verdict-orbit::after {
  right: 8px;
  bottom: 19px;
  background: var(--amber);
}

.verdict-icon {
  position: absolute;
  width: 78px;
  height: 78px;
  padding: 19px;
  border-radius: 50%;
  fill: none;
  stroke: var(--white);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
  transform: rotate(0);
  animation: verdict-pop .5s cubic-bezier(.2,1.4,.4,1) both;
}

.verdict-correct {
  background: var(--aqua-dark);
}

.verdict-wrong {
  display: none;
  background: var(--coral);
}

.guide-verdict.is-wrong .verdict-correct {
  display: none;
}

.guide-verdict.is-wrong .verdict-wrong {
  display: block;
}

.verdict-label {
  margin: 0 0 8px;
  color: var(--aqua-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.guide-verdict.is-wrong .verdict-label {
  color: var(--red);
}

.guide-verdict h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.guide-verdict > p:not(.verdict-label) {
  max-width: 380px;
  margin: 18px auto;
  color: var(--ink-soft);
  line-height: 1.55;
}

.points-awarded {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font-size: .78rem;
  font-weight: 800;
}

.guide-verdict.is-wrong .points-awarded {
  background: var(--aqua-pale);
}

.dave-guide {
  position: relative;
  border: 1px solid rgba(1,63,67,.12);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guide-ribbon {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px clamp(20px, 4vw, 36px);
  color: var(--white);
  background:
    linear-gradient(110deg, var(--ink) 0 69%, #075c61 69% 100%);
}

.guide-ribbon span {
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--aqua);
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-ribbon strong {
  font-size: .94rem;
}

.guide-body {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 28px;
  padding: clamp(24px, 4vw, 40px);
}

.guide-avatar {
  align-self: end;
}

.guide-avatar svg {
  display: block;
  width: 100%;
}

.avatar-bg { fill: var(--aqua-pale); }
.avatar-shirt { fill: var(--ink); }
.avatar-neck,
.avatar-face { fill: #e7ad83; }
.avatar-hair { fill: #644937; }
.avatar-eye { fill: var(--ink); }
.avatar-smile { fill: none; stroke: #644937; stroke-linecap: round; stroke-width: 5; }
.avatar-mark { fill: var(--aqua); }

.guide-summary {
  margin: 6px 0 16px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.46;
}

.action-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  counter-reset: steps;
  list-style: none;
}

.action-steps li {
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.4;
  counter-increment: steps;
}

.action-steps li::before {
  content: counter(steps);
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--aqua-pale);
  font-size: .72rem;
  font-weight: 900;
}

.escalation-note {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--coral);
  color: var(--ink);
  background: #fff4f1;
  font-size: .8rem;
  line-height: 1.45;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 17px;
}

.guide-links a,
.text-link {
  color: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  text-decoration-color: var(--aqua);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 4vw, 36px);
  border-top: 1px solid rgba(1,63,67,.1);
  background: #f7fbfb;
}

.guide-footer span,
.guide-footer a {
  display: block;
}

.guide-footer div > span {
  color: var(--ink-soft);
  font-size: .7rem;
}

.guide-footer div > a {
  margin-top: 1px;
  font-size: 1.18rem;
  font-weight: 900;
  text-decoration: none;
}

.next-button {
  min-height: 48px;
  padding: 11px 18px;
}

.results-screen {
  flex-direction: column;
  gap: 35px;
}

.results-hero {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(30px, 6vw, 75px);
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.score-dial {
  --score-angle: 0deg;
  position: relative;
  display: grid;
  width: 220px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -135deg, var(--aqua) 0 var(--score-angle), rgba(1,63,67,.1) var(--score-angle) 270deg, transparent 270deg 360deg);
  box-shadow: var(--shadow-small);
}

.score-dial::before {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: var(--paper);
}

.dial-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.dial-inner span,
.dial-inner small {
  display: block;
}

.dial-inner span {
  font-family: "Manrope", sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -.08em;
  line-height: .9;
}

.dial-inner small {
  color: var(--ink-soft);
  font-size: .78rem;
}

.dial-needle {
  position: absolute;
  bottom: 50%;
  left: calc(50% - 3px);
  z-index: 1;
  width: 6px;
  height: 83px;
  border-radius: 6px;
  background: var(--coral);
  transform: rotate(calc(-135deg + var(--score-angle)));
  transform-origin: 50% 100%;
  transition: transform 1.2s cubic-bezier(.2,.9,.2,1);
}

.dial-needle::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
}

.result-copy h2 {
  margin: 6px 0 14px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: .98;
}

.result-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

.result-stats {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.result-stats span,
.review-heading > span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 5px 15px rgba(0,47,51,.07);
  font-size: .77rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 24px;
}

.review-card,
.next-step-card {
  border: 1px solid rgba(1,63,67,.1);
  border-radius: 22px;
  box-shadow: var(--shadow-small);
}

.review-card {
  padding: clamp(23px, 4vw, 34px);
  background: var(--white);
}

.review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.review-heading h3,
.next-step-card h3 {
  margin-top: 4px;
  font-size: 1.45rem;
}

.review-heading > span {
  background: var(--lime);
  font-weight: 800;
}

.topic-review {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.topic-review li {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(1,63,67,.08);
  font-size: .82rem;
}

.review-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--aqua-dark);
  font-weight: 900;
}

.topic-review li.is-missed .review-mark {
  background: var(--coral);
}

.topic-review small {
  color: var(--ink-soft);
}

.next-step-card {
  position: relative;
  padding: clamp(24px, 4vw, 34px);
  color: var(--white);
  background:
    radial-gradient(circle at 90% 10%, rgba(28,212,222,.35), transparent 13rem),
    var(--ink);
  overflow: hidden;
}

.next-step-card .question-kicker {
  color: var(--aqua);
}

.next-step-card h3 {
  max-width: 360px;
  font-size: 1.65rem;
}

.next-step-card > p:not(.question-kicker) {
  max-width: 400px;
  color: rgba(255,255,255,.74);
  font-size: .9rem;
  line-height: 1.5;
}

.next-step-icon {
  position: absolute;
  top: -30px;
  right: 10px;
  color: rgba(255,255,255,.06);
  font-family: "Manrope", sans-serif;
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
}

.secondary-button {
  gap: 16px;
  width: 100%;
  min-height: 48px;
  margin: 7px 0 14px;
  padding: 10px 15px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--aqua);
  font-weight: 800;
}

.next-step-card .text-link {
  color: var(--white);
}

.result-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}

.leaderboard-form {
  display: grid;
  gap: 10px;
  width: min(100%, 440px);
  margin: 0 auto 22px;
  padding: 16px;
  border: 1px solid rgba(1, 63, 67, .12);
  border-radius: 16px;
  background: rgba(28, 212, 222, .12);
  text-align: left;
}

.leaderboard-form[hidden] {
  display: none;
}

.leaderboard-kicker {
  margin: 0;
  color: var(--ink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leaderboard-form label {
  display: grid;
  gap: 4px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
}

.leaderboard-form input[type="text"],
.leaderboard-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(1, 63, 67, .16);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.leaderboard-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600 !important;
}

.leaderboard-check input {
  margin-top: 3px;
  accent-color: var(--aqua);
}

.leaderboard-form .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.leaderboard-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 700;
}

.replay-icon {
  stroke: var(--aqua) !important;
}

.call-button {
  flex-direction: column;
  align-items: flex-start;
  min-width: 238px;
  padding: 9px 18px;
  border: 1px solid rgba(1,63,67,.14);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(0,47,51,.07);
}

.call-button span {
  color: var(--ink-soft);
  font-size: .68rem;
}

.call-button strong {
  font-size: 1.05rem;
}

.games-room-back {
  display: flex;
  justify-content: center;
  margin: 8px 0 0;
}

.games-room-back-footer {
  margin: 0;
  padding: 22px clamp(20px, 5vw, 76px) 8px;
  background: var(--paper, #f4efe6);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 23px clamp(20px, 5vw, 76px);
  color: rgba(255,255,255,.67);
  background: var(--ink-deep);
  font-size: .72rem;
  line-height: 1.45;
}

.site-footer p {
  max-width: 700px;
  margin: 0;
}

.site-footer strong {
  color: var(--white);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 17px;
}

.site-footer a {
  color: var(--white);
  text-underline-offset: 3px;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -30px;
  width: 10px;
  height: 18px;
  border-radius: 2px;
  animation: confetti-fall var(--duration) cubic-bezier(.2,.7,.4,1) forwards;
}

.sr-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 4px rgba(201,239,112,.07); opacity: .75; }
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes halo-float {
  50% { transform: scale(1.03) translateY(-8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dave-breathe {
  50% { transform: translateY(-8px) rotate(.4deg); }
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateZ(70px) scale(.6) rotate(-10deg); }
  to { opacity: 1; transform: translateZ(70px) scale(1) rotate(-3deg); }
}

@keyframes tool-float {
  50% { transform: translateZ(100px) translateY(-15px) rotate(6deg); }
}

@keyframes wave {
  from { transform: translateX(-8px) translateY(5px); }
  to { transform: translateX(9px) translateY(-6px); }
}

@keyframes drops {
  from { transform: translateY(-20px); opacity: 0; }
  25% { opacity: 1; }
  to { transform: translateY(55px); opacity: 0; }
}

@keyframes gas-rise {
  50% { transform: translateY(-18px) scaleX(1.1); opacity: .2; }
}

@keyframes heat-rise {
  50% { transform: translateY(-12px); opacity: .35; }
}

@keyframes heat-pulse {
  to { r: 62px; opacity: 0; }
}

@keyframes electric-pulse {
  to { r: 100px; opacity: 0; }
}

@keyframes drain-wave {
  to { transform: translateY(-13px); }
}

@keyframes bubble {
  to { transform: translateY(-45px); opacity: 0; }
}

@keyframes alarm-pulse {
  50% { transform: scale(1.12); transform-origin: 470px 95px; }
}

@keyframes streak-pop {
  50% { transform: scale(1.1) rotate(-2deg); background: var(--amber); }
}

@keyframes verdict-pop {
  from { transform: scale(.2) rotate(-20deg); }
  to { transform: scale(1) rotate(0); }
}

@keyframes confetti-fall {
  to { transform: translate3d(var(--drift), 110vh, 0) rotate(var(--turn)); opacity: .2; }
}

@media (max-width: 980px) {
  .screen {
    min-height: auto;
  }

  .intro-screen {
    align-items: flex-start;
  }

  .intro-visual {
    min-height: 520px;
  }

  .quiz-layout {
    grid-template-columns: .85fr 1.15fr;
    gap: 25px;
  }

  .scenario-stage {
    min-height: 470px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-verdict {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 22px;
    align-items: center;
    max-width: 740px;
    margin: 0 auto;
    text-align: left;
  }

  .verdict-orbit {
    grid-row: 1 / 5;
    margin: 0;
  }

  .guide-verdict > p:not(.verdict-label) {
    max-width: none;
    margin: 10px 0;
  }

  .guide-verdict h2 {
    font-size: 2.35rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
  }

  .brand img {
    width: 142px;
  }

  .header-games {
    display: none;
  }

  .header-phone span {
    display: none;
  }

  .header-phone {
    font-size: 15px;
  }

  .sound-button span {
    display: none;
  }

  .sound-button {
    width: 40px;
    justify-content: center;
    padding: 6px;
  }

  .screen {
    padding-top: 38px;
    padding-bottom: 50px;
  }

  .intro-screen {
    flex-direction: column;
  }

  .intro-copy {
    flex: none;
    width: 100%;
  }

  h1 {
    font-size: clamp(3.2rem, 15vw, 5.2rem);
  }

  .intro-lede {
    margin: 21px 0;
  }

  .game-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .game-features li {
    display: block;
    min-width: 0;
    padding: 10px;
  }

  .feature-number {
    display: block;
    margin-bottom: 5px;
  }

  .game-features small {
    display: none;
  }

  .intro-visual {
    width: 100%;
    min-height: 455px;
  }

  .dave-hero {
    right: 5%;
    width: min(90%, 390px);
  }

  .speech-bubble {
    top: 5%;
    left: 2%;
  }

  .quiz-topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .progress-track {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .quiz-layout {
    display: flex;
    flex-direction: column;
  }

  .scenario-stage {
    width: 100%;
    min-height: 355px;
  }

  .emergency-label {
    top: 14px;
    left: 14px;
  }

  .house-scene {
    inset: 25px 7% 28px;
    width: 86%;
    height: calc(100% - 53px);
  }

  .question-panel {
    width: 100%;
  }

  .question-panel h2 {
    font-size: 2rem;
  }

  .guide-verdict {
    display: block;
    text-align: center;
  }

  .verdict-orbit {
    width: 94px;
    height: 94px;
    margin: 0 auto 17px;
  }

  .verdict-icon {
    width: 65px;
    height: 65px;
    padding: 16px;
  }

  .guide-verdict > p:not(.verdict-label) {
    margin: 10px auto;
  }

  .guide-body {
    grid-template-columns: 1fr;
  }

  .guide-avatar {
    display: none;
  }

  .guide-footer {
    align-items: stretch;
  }

  .guide-footer div {
    align-self: center;
  }

  .results-hero {
    grid-template-columns: 150px 1fr;
    gap: 24px;
  }

  .score-dial {
    width: 150px;
  }

  .dial-inner span {
    font-size: 3rem;
  }

  .dial-needle {
    height: 56px;
  }

  .result-copy h2 {
    font-size: 2.7rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .topic-review {
    grid-template-columns: 1fr;
  }

  .result-actions {
    align-items: stretch;
  }

  .result-actions > * {
    flex: 1;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .game-features strong {
    font-size: .72rem;
  }

  .primary-button {
    width: 100%;
  }

  .tool-one {
    right: 0;
  }

  .tool-two {
    left: 0;
  }

  .quiz-screen {
    gap: 22px;
  }

  .scenario-stage {
    min-height: 300px;
    border-radius: 22px;
  }

  .stage-caption {
    display: none;
  }

  .question-heading {
    gap: 12px;
  }

  .category-icon {
    width: 45px;
    height: 45px;
    border-radius: 13px;
    font-size: 1.25rem;
  }

  .scenario-copy {
    margin: 16px 0 18px;
  }

  .answer-button {
    grid-template-columns: 34px 1fr;
    min-height: 64px;
    padding: 10px 13px;
  }

  .answer-arrow {
    display: none;
  }

  .guide-screen {
    padding-top: 30px;
  }

  .guide-layout {
    gap: 23px;
  }

  .guide-verdict h2 {
    font-size: 2rem;
  }

  .guide-ribbon {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .guide-body {
    padding: 24px 19px;
  }

  .guide-footer {
    flex-direction: column;
  }

  .guide-footer div {
    text-align: center;
  }

  .results-hero {
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .result-stats {
    justify-content: center;
  }

  .review-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-actions {
    flex-direction: column;
  }

  .call-button {
    min-width: 0;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .sound-button,
  .result-actions {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .screen {
    display: none !important;
  }

  .results-screen.is-active {
    display: flex !important;
  }
}
