/* Spin & Play (home page trivia) */
.spin-section {
  margin: 22px 0 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--surface-ink);
}
.spin-head { margin: 0 0 14px; }
.spin-kicker {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-orange);
}
.spin-title { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.15; }
.spin-sub { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

.spin-body { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 26px; align-items: center; }
.spin-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spin-wheel-wrap { position: relative; width: min(100%, 360px); aspect-ratio: 1; }
.spin-wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 22px rgba(8, 21, 81, 0.22)); }
.spin-disc { transform-origin: 0 0; }
.spin-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 26px solid var(--brand-navy);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}
.spin-go { font-size: 1.05rem; font-weight: 700; min-height: 48px; }
.spin-go:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.spin-hint { margin: 0; font-size: 0.86rem; color: var(--muted); text-align: center; }

.spin-panel { min-height: 240px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.spin-message { margin: 0; font-size: 1.1rem; color: var(--muted); }
.spin-message.is-error { color: #b3261e; }
.spin-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spin-chip { padding: 4px 10px; border-radius: 999px; background: var(--bg-strong); font-size: 0.82rem; font-weight: 700; }
.spin-chip.is-quiet { background: transparent; border: 1px solid var(--line-strong); font-weight: 600; }
.spin-count { margin-left: auto; font-size: 0.82rem; color: var(--muted); }
.spin-stem { margin: 0; font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.4rem); line-height: 1.3; }
.spin-options { display: grid; gap: 8px; }
.spin-option {
  text-align: left; padding: 12px 14px; min-height: 48px;
  border: 2px solid var(--line-strong); border-radius: var(--radius-md);
  background: #fff; color: var(--surface-ink); font: inherit; cursor: pointer;
}
.spin-option:hover:not(:disabled) { border-color: var(--brand-cyan); background: #f2fbff; }
.spin-option:focus-visible, .spin-go:focus-visible, .spin-next:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; }
.spin-option:disabled { cursor: default; opacity: 0.75; }
.spin-option.is-chosen { border-color: var(--brand-navy); opacity: 1; }
.spin-option.is-correct { border-color: #0a7d42; background: #e6f7ee; opacity: 1; }
.spin-option.is-correct::after { content: "  ✓"; font-weight: 700; color: #0a7d42; }
.spin-option.is-wrong { border-color: #b3261e; background: #fdecea; opacity: 1; }
.spin-option.is-wrong::after { content: "  ✗"; font-weight: 700; color: #b3261e; }
.spin-feedback { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.spin-verdict { margin: 0; font-weight: 700; }
.spin-verdict.is-correct { color: #0a7d42; }
.spin-verdict.is-wrong { color: #b3261e; }
.spin-explain { margin: 0; color: var(--muted); }
.spin-score { margin: 0; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--brand-orange); line-height: 1; }
.spin-perks { margin: 0; padding-left: 1.2rem; display: grid; gap: 4px; }
.spin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spin-link { display: inline-block; text-decoration: none; font-weight: 700; }
.spin-share-note, .spin-signin { margin: 0; font-size: 0.88rem; color: var(--muted); }

@media (max-width: 760px) {
  .spin-section { padding: 16px; }
  .spin-body { grid-template-columns: 1fr; gap: 16px; }
  .spin-panel { min-height: 0; }
  .spin-count { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .spin-option, .spin-go { transition: none; }
}

/* Parents page */
.parent-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.parent-steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 52px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.parent-steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-navy); color: #fff; font-weight: 700;
}
.parent-cta { display: inline-block; text-decoration: none; font-weight: 700; margin-top: 6px; }

/* Wheel button in the home page header (opens play.html). Meant to be the
   loudest thing in the header: it is how students find the game. */
.hero-nav a.nav-spin {
  margin-left: auto;
  gap: 10px;
  padding: 5px 18px 5px 5px;
  border: 3px solid var(--brand-yellow);
  background: linear-gradient(135deg, rgba(243, 77, 1, 0.95), rgba(196, 40, 201, 0.95));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  animation: navSpinPulse 2s ease-out infinite;
  transition: transform 0.15s ease;
}
.hero-nav a.nav-spin:hover { transform: scale(1.06) rotate(-1deg); }
.hero-nav a.nav-spin:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 4px; }
.nav-spin-wheel {
  position: relative; flex: none; width: 60px; height: 60px; border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.nav-spin-wheel::before { /* pointer */
  content: ""; position: absolute; z-index: 2; top: -6px; left: 50%; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 14px solid #fff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}
.nav-spin-wheel::after { /* hub */
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-navy);
}
.nav-spin-disc {
  position: absolute; inset: 0; border-radius: 50%; border: 3px solid #fff;
  background: conic-gradient(#00aff2 0 36deg, #081551 0 72deg, #efd600 0 108deg, #c428c9 0 144deg, #00aa55 0 180deg,
    #f34d01 0 216deg, #00aff2 0 252deg, #081551 0 288deg, #efd600 0 324deg, #00aa55 0 360deg);
  animation: navSpinTurn 5s linear infinite;
}
.hero-nav a.nav-spin:hover .nav-spin-disc { animation-duration: 1s; }
.nav-spin-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; text-align: left; }
.nav-spin-text strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: #fff; white-space: nowrap; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); }
.nav-spin-text small { font-size: 0.8rem; font-weight: 700; color: var(--brand-yellow); white-space: nowrap; }
@keyframes navSpinTurn { to { transform: rotate(360deg); } }
@keyframes navSpinPulse {
  0% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(239, 214, 0, 0.7); }
  70%, 100% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(239, 214, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-spin-disc, .hero-nav a.nav-spin { animation: none; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  /* Tablets and small laptops: tighten the header so the wheel stays on the logo's row */
  .hero-nav { gap: 6px; }
  .hero-nav a { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
  .hero-nav a.nav-spin { padding: 4px 14px 4px 4px; gap: 8px; }
  .nav-spin-wheel { width: 46px; height: 46px; }
  .nav-spin-wheel::after { width: 12px; height: 12px; border-width: 2px; }
  .nav-spin-text strong { font-size: 1.1rem; }
  .nav-spin-text small { font-size: 0.72rem; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  /* Narrow tablets: just the spinning wheel (the label is still read out by screen readers) */
  .hero-nav a.nav-spin { padding: 4px; }
  .nav-spin-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero-nav .brand-chip { padding: 6px 10px; }
  .hero-nav .brand-chip .brand-lockup { height: 50px; }
}
@media (min-width: 761px) and (max-width: 880px) {
  .hero-nav { gap: 4px; }
  .hero-nav a { padding: 0.45rem 0.55rem; font-size: 0.8rem; }
  .hero-nav .brand-chip .brand-lockup { height: 42px; }
}
@media (max-width: 760px) {
  /* Full-width banner under the links on phones */
  .hero-nav a.nav-spin { flex: 1 1 100%; justify-content: center; margin: 6px 0 0; padding: 8px 18px 8px 8px; }
  .nav-spin-wheel { width: 60px; height: 60px; }
  .nav-spin-text strong { font-size: 1.3rem; }
}

/* The game on its own page */
.play-frame { width: min(1040px, calc(100% - 32px)); }
.play-frame .spin-section { margin: 12px 0 0; border: 0; box-shadow: none; padding: 6px 0 0; background: transparent; }

/* Enrol button in the home page header: links families to the parents page. */
.hero-nav a.nav-enrol {
  background: var(--brand-yellow, #ffd23f);
  border-color: var(--brand-yellow, #ffd23f);
  color: #081551;
  font-weight: 800;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  box-shadow: 0 6px 14px rgba(8, 21, 81, 0.25);
}
.hero-nav a.nav-enrol:hover { filter: brightness(1.05); transform: translateY(-1px); }
.hero-nav a.nav-enrol:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 3px; }
