:root {
  --ink: #172033;
  --muted: #667085;
  --panel: #ffffff;
  --line: #c7ddff;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #facc15;
  --sky: #dff3ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(250, 204, 21, 0.3), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(22, 163, 74, 0.16), transparent 26%),
    linear-gradient(135deg, #f8fafc 0%, #dff3ff 52%, #ecfeff 100%);
}

button {
  font: inherit;
}

.app {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.game-shell {
  position: relative;
  width: min(940px, 100%);
  padding: 22px 22px 54px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.16);
}

.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.prompt-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  line-height: 0.95;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: 8px;
  min-width: min(390px, 100%);
}

.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  text-align: center;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.stat strong {
  display: block;
  font-size: clamp(1.35rem, 4.8vw, 1.9rem);
  line-height: 1.05;
}

.map-panel {
  margin: 20px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #edf8ff;
}

.sky {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 26%, rgba(250, 204, 21, 0.2), transparent 14%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(135deg, #dff3ff 0%, #eef8ff 58%, #d9f99d 100%);
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.sky::before {
  left: 12%;
  top: 38px;
}

.sky::after {
  right: 10%;
  top: 68px;
}

.route {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 130px;
  height: 12px;
  border-radius: 999px;
  background: #c7ddff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.32);
}

.route-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  transition: width 360ms ease;
}

.checkpoint {
  position: absolute;
  top: 104px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.checkpoint.start {
  left: 5%;
}

.checkpoint.finish {
  right: 5%;
  padding-right: 28px;
}

.checkpoint.finish::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 16px;
  border-radius: 8px 8px 8px 0;
  background: var(--red);
  transform: translateY(-50%) rotate(-45deg);
}

.drone {
  position: absolute;
  left: 9%;
  top: 78px;
  z-index: 3;
  width: 124px;
  height: 94px;
  transform: translateX(-50%);
  transition: left 420ms ease;
}

.rotor,
.arm,
.body,
.lens,
.shadow {
  position: absolute;
}

.rotor {
  width: 36px;
  height: 36px;
  border: 5px solid #2563eb;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 42%, rgba(37, 99, 235, 0.34) 42%, rgba(37, 99, 235, 0.34) 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(37, 99, 235, 0.34) 42%, rgba(37, 99, 235, 0.34) 58%, transparent 58%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
  animation: rotor-spin 1.2s linear infinite;
}

.rotor-nw {
  left: 0;
  top: 0;
}

.rotor-ne {
  right: 0;
  top: 0;
}

.rotor-sw {
  left: 0;
  bottom: 0;
}

.rotor-se {
  right: 0;
  bottom: 0;
}

.arm {
  left: 50%;
  top: 50%;
  width: 96px;
  height: 8px;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: inset 0 -2px 0 rgba(23, 32, 51, 0.08);
  transform-origin: center;
}

.arm-x {
  transform: translate(-50%, -50%) rotate(34deg);
}

.arm-y {
  transform: translate(-50%, -50%) rotate(-34deg);
}

.body {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 38px;
  border: 3px solid #1d4ed8;
  border-radius: 16px 16px 12px 12px;
  background:
    linear-gradient(180deg, #ffffff 0%, #dbeafe 52%, #93c5fd 100%);
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
}

.body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 22px;
  height: 10px;
  border-radius: 10px 10px 4px 4px;
  background: var(--yellow);
  transform: translateX(-50%);
}

.lens {
  left: 50%;
  bottom: 5px;
  width: 16px;
  height: 16px;
  border: 3px solid #172033;
  border-radius: 50%;
  background: #38bdf8;
  transform: translateX(-50%);
}

.lens::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

.shadow {
  left: 50%;
  bottom: -16px;
  width: 82px;
  height: 14px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.16);
  transform: translateX(-50%);
}

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

.quiz-card {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quiz-card h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 8vw, 3.8rem);
  line-height: 1;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.choice-button,
.primary-button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.choice-button {
  padding: 14px 16px;
  color: var(--ink);
  background: var(--sky);
  box-shadow: inset 0 -3px 0 rgba(37, 99, 235, 0.14);
  font-size: clamp(0.95rem, 3.6vw, 1.2rem);
}

.choice-button:hover,
.choice-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.choice-button.correct {
  color: #ffffff;
  background: var(--green);
}

.choice-button.wrong {
  color: #ffffff;
  background: var(--red);
}

.choice-button:disabled {
  cursor: not-allowed;
}

.feedback {
  min-height: 32px;
  margin: 20px 0 0;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.feedback.good {
  color: var(--green);
}

.feedback.bad {
  color: var(--red);
}

.overlay-card {
  position: absolute;
  inset: 22px 22px 62px;
  z-index: 10;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.94);
  overflow: auto;
  text-align: center;
}

.overlay-card h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}

.overlay-card p {
  max-width: 560px;
  margin: 12px 0 18px;
  color: var(--muted);
  font-weight: 750;
}

.brand-kicker {
  margin: 10px 0 4px;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
}

.brand-proof {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 8px;
  background: rgba(220, 252, 231, 0.85);
  color: #166534;
  font-weight: 900;
}

.result-summary {
  width: min(620px, 100%);
  padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 950;
}

.diagnosis-message {
  width: min(620px, 100%);
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 8px;
  background: rgba(220, 252, 231, 0.82);
  color: #166534;
  font-weight: 900;
}

.share-cta {
  display: grid;
  gap: 5px;
  width: min(620px, 100%);
  margin: 6px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 8px;
  background: rgba(254, 249, 195, 0.75);
  color: var(--ink);
}

.share-cta strong {
  font-size: 1.05rem;
  font-weight: 950;
}

.share-cta span {
  color: var(--muted);
  font-weight: 800;
}

.lead-box {
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  margin: 6px 0 16px;
  padding: 18px;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.lead-copy {
  display: grid;
  gap: 5px;
  color: var(--ink);
}

.lead-copy strong {
  font-size: clamp(1.05rem, 4vw, 1.28rem);
  font-weight: 950;
}

.lead-copy span {
  color: var(--muted);
  font-weight: 850;
}

.lead-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.lead-fields input,
.lead-fields button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
}

.lead-fields input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.lead-fields input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lead-fields button {
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: var(--green);
  cursor: pointer;
}

.lead-message {
  min-height: 22px;
  margin: 0;
  color: var(--green);
  font-weight: 850;
}

.pdf-report {
  position: fixed;
  left: 0;
  top: 0;
  width: 760px;
  padding: 42px;
  background: #ffffff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
  z-index: 9999;
}

.pdf-report h1 {
  margin: 8px 0 4px;
  font-size: 36px;
  line-height: 1.08;
}

.pdf-report h2 {
  margin: 26px 0 10px;
  font-size: 20px;
}

.pdf-brand {
  color: var(--blue);
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdf-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 800;
}

.pdf-score {
  display: inline-block;
  margin: 0 0 18px;
  padding: 12px 18px;
  border-radius: 8px;
  background: #eef8ff;
  color: var(--blue);
  font-size: 30px;
  font-weight: 950;
}

.pdf-diagnosis {
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(220, 252, 231, 0.82);
  color: #166534;
  font-weight: 900;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pdf-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pdf-grid strong,
.pdf-grid span {
  display: block;
}

.pdf-grid strong {
  color: var(--muted);
  font-size: 13px;
}

.pdf-grid span {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 900;
}

.pdf-word-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdf-word-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid #e5eefb;
  border-radius: 8px;
}

.pdf-word-list span {
  font-weight: 850;
}

.pdf-word-list strong {
  text-align: right;
}

.pdf-empty {
  color: var(--muted);
  font-weight: 800;
}

.pdf-footer {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hidden {
  display: none;
}

.primary-button {
  min-width: min(280px, 100%);
  padding: 14px 18px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.course-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.course-link:hover,
.course-link:focus-visible {
  outline: none;
  background: #eef8ff;
}

.brand-footer {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  z-index: 12;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.learned-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(620px, 100%);
  margin: 4px 0 20px;
}

.learned-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 720px) {
  .app {
    padding: 10px;
  }

  .game-shell {
    padding: 14px 14px 52px;
  }

  .top-bar {
    display: block;
  }

  .stats {
    margin-top: 14px;
    min-width: 0;
  }

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

  .overlay-card {
    inset: 14px 14px 58px;
  }

  .learned-list {
    grid-template-columns: 1fr;
  }

  .lead-fields {
    grid-template-columns: 1fr;
  }

  .brand-footer {
    left: 14px;
    right: 14px;
  }
}
