/* Follows the Bhanzu brand guidelines (2022): Poppins, the six brand colours,
   the dotted grid and organic shapes. Tints are only used for answer feedback. */
:root {
  --white: #f7f7f7;
  --blue: #212638;
  --orange: #f15d22;
  --fun-blue: #5e91ff;
  --yellow: #fab82b;
  --grey: #45474a;
  --card: #ffffff;
  --line: rgba(33, 38, 56, 0.16);
  --fun-wash: #eaf1ff;
  --yellow-wash: #fff4da;
  --dots-light: radial-gradient(circle, rgba(33, 38, 56, 0.13) 1px, transparent 1.4px);
  --dots-dark: radial-gradient(circle, rgba(247, 247, 247, 0.13) 1px, transparent 1.4px);
  --font: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html[data-flow='challenge'] .only-class,
html:not([data-flow='challenge']) .only-challenge { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shape-sprite { position: absolute; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--blue);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; text-wrap: balance; }
h2 { font-size: clamp(24px, 6.4vw, 32px); }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--fun-blue); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100%, 1080px); margin-inline: auto; padding-inline: var(--gutter); }

/* Sub-heading style from the guidelines: Poppins Regular 21, orange, lowercase, short rule */
.sub { margin-top: 6px; font-size: 21px; line-height: 1.3; color: var(--orange); text-transform: lowercase; }
.sub::after { content: ''; display: block; width: 48px; height: 1px; margin-top: 12px; background: var(--grey); }

/* Organic shapes: solid brand colours only */
.blob { position: absolute; max-width: none; fill: currentColor; overflow: visible; pointer-events: none; }
.blob-yellow { color: var(--yellow); }
@keyframes pop { from { transform: scale(0.72); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes appear { to { opacity: 1; } }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 80ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-main { background: var(--orange); color: var(--white); }
.btn-main:disabled { background: #dcdcdc; color: var(--blue); }
.btn-inverse { background: var(--white); color: var(--blue); }
.btn-inverse:disabled { opacity: 0.7; }
.btn-quiet { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); min-height: 50px; font-size: 16px; }
.link-btn {
  display: inline-block;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}
.link-btn.on-dark { color: var(--white); padding: 6px 0; }
.field-error { margin-top: 10px; padding-left: 10px; border-left: 3px solid var(--orange); font-size: 14px; font-weight: 600; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 16px 0 26px;
  background-color: var(--white);
  background-image: var(--dots-light);
  background-size: 20px 20px;
}
.deco { display: none; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 32px; }
.logo { display: inline-block; }
.logo img { height: 30px; width: auto; }

.sum { margin: 18px 0 12px; display: grid; justify-items: start; }
.sum-q { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-a {
  position: relative;
  isolation: isolate;
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(30px, 9.2vw, 46px);
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.sum-a .blob {
  inset: -9px -16px -11px -14px;
  width: calc(100% + 30px);
  height: calc(100% + 20px);
  z-index: -1;
  color: var(--yellow);
  opacity: 0;
}
.is-solved .sum-a .blob { animation: pop 360ms cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
.sum-big { display: flex; align-items: center; gap: 10px; font-size: clamp(30px, 9.2vw, 46px); font-weight: 600; line-height: 1.15; }
.sum-mystery { margin-top: 0; padding: 0 16px; font-size: inherit; }
.sum-mystery .blob { inset: -6px -2px; width: calc(100% + 4px); height: calc(100% + 12px); }
.sum-note { margin-top: 14px; font-size: 21px; line-height: 1.2; color: var(--orange); opacity: 0; }
.is-solved .sum-note { animation: appear 240ms 300ms ease-out forwards; }

.hero h1 { font-size: clamp(25px, 7vw, 42px); }
.lede { margin-top: 10px; max-width: 34em; }

.grades { margin: 14px 0 0; padding: 0; border: 0; }
.grades legend { padding: 0; font-weight: 600; }
.keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; max-width: 420px; }
.key { position: relative; display: block; }
.key input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.key span {
  display: grid;
  place-items: center;
  height: 46px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  background: var(--card);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.key input:checked + span { background: var(--blue); color: var(--white); }
.key input:focus-visible + span { outline: 3px solid var(--fun-blue); outline-offset: 2px; }
.grade-note { margin-top: 10px; font-size: 14px; max-width: 30em; }
#startBtn { margin-top: 16px; max-width: 420px; }
.fine { margin-top: 12px; font-size: 14px; max-width: 34em; }
#laterBtn { margin-top: 2px; }

/* On a phone his face sits beside the sum, so the ad's promise is above the fold. */
.hero-photo { position: absolute; top: -4px; right: var(--gutter); width: clamp(88px, 28vw, 120px); margin: 0; }
.hero-photo picture img { width: 100%; height: auto; }
.stamp { border-radius: 50%; height: auto; }
.hero-stamp { display: none; }

.strip { padding: 14px 0; background: var(--blue); color: var(--white); }
.strip-main { font-weight: 600; }
.strip-proof { margin-top: 4px; font-size: 14px; }

/* Sections */
.how, .courses, .faq { padding: 52px 0; }
.steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; gap: 24px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -6px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
}
.steps li:nth-child(1)::before { color: var(--orange); }
.steps li:nth-child(2)::before { color: var(--fun-blue); }
.steps li:nth-child(3)::before { color: var(--grey); }
.steps p { margin-top: 4px; }

.bhanu {
  padding: 52px 0;
  background-color: var(--blue);
  background-image: var(--dots-dark);
  background-size: 20px 20px;
  color: var(--white);
}
.bhanu-grid { display: grid; gap: 28px; }
.bhanu-photo { position: relative; margin: 0; max-width: 300px; }
.bhanu-photo > img:first-child { width: 100%; height: auto; }
.bhanu-photo .stamp { position: absolute; right: -14px; bottom: -14px; width: 122px; }
.bhanu p:not(.sub) { margin-top: 14px; max-width: 36em; }
.bhanu .sub::after { background: var(--white); }

.section-lede { margin-top: 14px; max-width: 36em; }
.facts { list-style: none; margin: 20px 0 8px; padding: 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 30px; font-weight: 600; max-width: 36em; }
.facts li::before { content: '\2713'; position: absolute; left: 2px; top: 0; font-size: 18px; color: var(--fun-blue); }
.course { padding: 20px 0; border-bottom: 1px solid var(--line); }
.course:first-of-type { margin-top: 18px; border-top: 1px solid var(--line); }
.course-size { margin-top: 2px; font-weight: 600; }
.course p:last-child { margin-top: 6px; max-width: 36em; }
.tag { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--yellow); font-size: 12px; font-weight: 600; vertical-align: 2px; white-space: nowrap; }

blockquote { margin: 28px 0 0; padding-left: 16px; border-left: 4px solid var(--yellow); }
blockquote p { font-size: 18px; font-weight: 600; line-height: 1.4; max-width: 30em; }
blockquote footer { margin-top: 6px; font-size: 14px; }
.demo-alt { margin-top: 26px; }

.faq { padding-top: 0; }
.faq h2 { margin-bottom: 14px; }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; padding: 15px 28px 15px 0; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 2px; top: 10px; font-size: 24px; color: var(--orange); }
details[open] summary::after { content: '\2212'; }
details p { padding-bottom: 16px; max-width: 38em; }

.closing {
  padding: 52px 0;
  background-color: var(--orange);
  background-image: var(--dots-dark);
  background-size: 20px 20px;
  color: var(--white);
}
.closing .btn { margin-top: 22px; max-width: 420px; }

.site-foot { padding: 24px 0 96px; font-size: 14px; }
.site-foot .wrap { display: grid; gap: 16px; }
.foot-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot-brand img { height: 30px; width: auto; }
.foot-brand span { font-size: 16px; font-weight: 600; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

.sticky-cta {
  position: fixed;
  inset: auto 0 0;
  padding: 10px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
  z-index: 10;
}
.sticky-cta .btn { min-height: 50px; font-size: 17px; }

/* Classroom */
.classroom {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--blue);
  color: var(--white);
  z-index: 20;
}
.class-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px var(--gutter); flex: none; }
.class-bar img { height: 26px; width: auto; }
.class-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.stage { flex: none; display: flex; flex-direction: column; min-width: 0; }
.video-frame { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; }
.video-frame video { width: 100%; height: 100%; object-fit: contain; }
.video-frame.is-held video { opacity: 0.62; }
.big-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
}
.big-play svg { width: 40px; fill: var(--white); }
.paused-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}
.spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(247, 247, 247, 0.3);
  border-top-color: var(--white);
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.controls { display: flex; align-items: center; gap: 8px; padding: 6px 12px; }
.ctrl {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  display: grid;
  place-items: center;
}
.ctrl svg { width: 24px; height: 24px; fill: var(--white); }
.ctrl:disabled { opacity: 0.4; }
.ctrl-text { width: auto; padding: 0 4px; font-size: 13px; font-weight: 600; }
.ctrl .icon-play { display: none; }
.ctrl.is-paused .icon-play { display: block; }
.ctrl.is-paused .icon-pause { display: none; }
.time { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

.scrub { position: relative; flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; }
#scrub {
  --fill: 0%;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 40px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
#scrub:disabled { cursor: default; }
#scrub::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange) var(--fill), rgba(247, 247, 247, 0.28) var(--fill));
}
#scrub::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(247, 247, 247, 0.28); }
#scrub::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--orange); }
#scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--white);
}
#scrub::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--white); }
.ticks { position: absolute; inset: 0 8px; pointer-events: none; }
.tick {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--white);
}
.tick.is-done { background: var(--yellow); border-color: var(--yellow); }

/* Panel: below the video on a phone, beside it on wider screens */
.panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--blue);
  background-color: var(--white);
  background-image: var(--dots-light);
  background-size: 20px 20px;
  padding: 18px var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
.panel h2:focus { outline: none; }
.watching h1 { font-size: 22px; }
.watching p { margin-top: 12px; max-width: 34em; }
.watching .btn { margin-top: 16px; }
.watching .link-btn { margin-top: 8px; }
.dots { display: flex; gap: 10px; margin-top: 12px; }
.dot { width: 13px; height: 13px; border: 2px solid var(--blue); border-radius: 50%; background: var(--card); }
.dot.is-done { background: var(--orange); border-color: var(--orange); }

.question-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 600; }
.stopwatch { font-size: 20px; font-weight: 600; line-height: 1; color: var(--orange); font-variant-numeric: tabular-nums; }
.question h2 { margin-top: 6px; font-size: clamp(21px, 5.6vw, 28px); }
.options { display: grid; gap: 10px; margin-top: 16px; }
.options-grid { grid-template-columns: 1fr 1fr; }
.option {
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px solid var(--blue);
  border-radius: 14px;
  background: var(--card);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  transition: transform 70ms ease;
}
.option:active:not(:disabled) { transform: scale(0.98); }
.option:disabled { border-color: var(--line); color: var(--blue); opacity: 0.6; }
.option.is-right, .option.is-right:disabled { opacity: 1; background: var(--fun-wash); border: 2px solid var(--fun-blue); }
.option.is-right::before { content: '\2713\00a0'; }
.option.is-wrong, .option.is-wrong:disabled { opacity: 1; background: var(--yellow-wash); border: 2px solid var(--yellow); text-decoration: line-through; }
.feedback:empty { display: none; }
.feedback { margin-top: 16px; padding: 10px 14px; border-radius: 12px; }
.feedback strong { display: block; font-weight: 600; }
.feedback p { margin-top: 2px; }
.feedback.is-right { background: var(--fun-wash); }
.feedback.is-try { background: var(--yellow-wash); }
.question > .btn { margin-top: 16px; }

.gate h2 { font-size: 23px; }
.gate > p:first-of-type { margin-top: 8px; }
.phone { margin-top: 14px; }
.phone-row { display: flex; gap: 8px; }
.phone select, .phone input, .text-input {
  height: 54px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  background: var(--card);
  font-size: 16px;
  padding: 0 10px;
  min-width: 0;
}
.phone select { flex: 0 1 42%; }
.phone input { flex: 1; }
.text-input { width: 100%; margin-top: 14px; }
input::placeholder { color: var(--grey); }
.gate .btn { margin-top: 16px; }
.consent { margin-top: 14px; font-size: 13px; line-height: 1.5; }
.proto-note { margin-top: 10px; padding: 6px 10px; border-radius: 8px; background: var(--yellow-wash); font-size: 13px; font-weight: 600; }

/* Result */
.result {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  z-index: 20;
  background-color: var(--white);
  background-image: var(--dots-light);
  background-size: 20px 20px;
}
.result-page { width: min(100%, 520px); margin-inline: auto; padding: 34px var(--gutter) 48px; }
.mark { display: grid; justify-items: center; text-align: center; }
.mark-score {
  position: relative;
  isolation: isolate;
  padding: 22px 46px;
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mark-score .blob, .is-after .blob {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  animation: pop 420ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.mark-note { margin-top: 16px; font-size: 21px; line-height: 1.25; color: var(--orange); text-transform: lowercase; text-align: center; }
.mark-detail { margin-top: 6px; text-align: center; font-size: 15px; }

.next-class, .call { margin-top: 24px; padding: 20px; background: var(--card); border: 1.5px solid var(--line); border-radius: 20px; }
.next-class-top { display: flex; align-items: center; gap: 14px; }
.next-class-top img { flex: none; width: 72px; height: auto; }
.next-class h2, .call h2 { font-size: 21px; }
.next-class > p:not(.consent, .proto-note), .call > p { margin-top: 10px; }
.next-class .btn, .call .btn { margin-top: 16px; }

.pick-label { margin-top: 16px; font-weight: 600; }
.pick-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pick-chip {
  min-height: 48px;
  padding: 6px 8px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.pick-chip[aria-pressed='true'] { background: var(--blue); color: var(--white); }
.call-done { background: var(--fun-wash); border-color: var(--fun-blue); }
.result-next { display: grid; justify-items: center; gap: 6px; margin-top: 16px; }

.rematch { display: grid; grid-template-columns: 1fr 1fr; align-items: end; justify-items: center; row-gap: 12px; text-align: center; }
.rematch-col { display: grid; justify-items: center; gap: 8px; }
.rematch-label { font-size: 14px; font-weight: 600; }
.rematch-num { position: relative; isolation: isolate; font-size: 56px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.is-after .rematch-num { font-size: 72px; padding: 22px 44px; }
.rematch .mark-note { grid-column: 1 / -1; margin-top: 4px; }

/* The challenge: a dotted sheet above a calculator */
.arena {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background-color: var(--blue);
  background-image: var(--dots-dark);
  background-size: 20px 20px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.arena-sheet {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 6px var(--gutter) 14px;
  color: var(--blue);
  background-color: var(--white);
  background-image: var(--dots-light);
  background-size: 20px 20px;
}
.arena-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.arena-tally { font-weight: 600; font-variant-numeric: tabular-nums; }
.arena-clock { justify-self: end; font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--orange); font-variant-numeric: tabular-nums; }
.arena-bar { flex: none; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--line); overflow: hidden; }
.arena-bar span { display: block; height: 100%; background: var(--orange); transform-origin: left; }
.arena-stage { flex: 1; min-height: 0; display: grid; align-items: center; justify-items: center; padding-top: 10px; }
.arena-play { display: grid; justify-items: center; gap: 16px; }
.arena-sum { font-size: clamp(34px, 10.5vw, 56px); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.arena-cells { display: flex; gap: 8px; min-height: 66px; }
.arena-cell {
  display: grid;
  place-items: center;
  width: 54px;
  height: 66px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  background: var(--card);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}
.is-right .arena-cell { border: 2px solid var(--fun-blue); background: var(--fun-wash); }
.is-wrong .arena-cell { border: 2px solid var(--yellow); background: var(--yellow-wash); }
.arena-big { font-size: 110px; font-weight: 600; line-height: 1; color: var(--orange); text-align: center; }
.arena-big-text { font-size: clamp(32px, 9.5vw, 48px); line-height: 1.2; }
.arena-intro { width: min(100%, 460px); display: grid; gap: 10px; }
.arena-intro h1 { font-size: clamp(25px, 7vw, 32px); }
.arena-intro .btn { margin-top: 8px; }
.arena-intro .link-btn { justify-self: center; }
.arena-pad {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px var(--gutter) calc(18px + env(safe-area-inset-bottom));
}
.pad-key {
  height: clamp(48px, 8.4dvh, 68px);
  border: 0;
  border-radius: 14px;
  background: var(--white);
  color: var(--blue);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: transform 60ms ease;
}
.pad-key:active:not(:disabled) { transform: scale(0.95); }
.pad-key:disabled { opacity: 0.4; }
.pad-key.is-aux { background: transparent; color: var(--white); border: 1.5px solid var(--white); font-size: 16px; }

/* Save for later */
.sheet { width: min(calc(100vw - 32px), 440px); padding: 24px 20px; border: 0; border-radius: 20px; background: var(--white); color: var(--blue); }
.sheet::backdrop { background: rgba(33, 38, 56, 0.72); }
.sheet h2 { font-size: 23px; }
.sheet p { margin-top: 8px; }
.sheet .btn { margin-top: 16px; }
.sheet .link-btn { display: block; margin: 8px auto 0; }

/* Test panel */
.debug {
  position: fixed;
  right: 8px;
  bottom: 8px;
  width: min(300px, calc(100vw - 16px));
  max-height: 30vh;
  overflow: auto;
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid var(--fun-blue);
  border-radius: 10px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0.94;
  z-index: 50;
}
.debug h2 { font-size: 13px; margin: 6px 0 4px; }
.debug ol { margin: 0; padding-left: 20px; }

@media (max-width: 359px) {
  .hero-photo { display: none; }
}

/* Tablet portrait: a bigger photo, with the headline kept clear of it */
@media (min-width: 640px) and (max-width: 899px) {
  :root { --gutter: 28px; }
  .hero { padding-top: 20px; }
  .hero-photo { top: 0; width: 210px; }
  .hero h1 { max-width: 12.5em; font-size: 40px; }
  .sum-q { font-size: 20px; }
  .sum-a, .sum-big { font-size: 48px; }
  .bhanu-grid { grid-template-columns: 240px 1fr; align-items: center; gap: 36px; }
  .arena-pad { width: 100%; max-width: 520px; margin-inline: auto; }
  .result-page { padding-top: 48px; }
}

/* Wider screens */
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero { padding: 28px 0 44px; }
  .deco { display: block; color: var(--fun-blue); }
  .deco-blue { left: -80px; bottom: -90px; width: 200px; height: 134px; }
  .deco-grey { right: -60px; bottom: -40px; width: 300px; height: 330px; color: var(--grey); }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: 48px; }
  .hero-photo { position: relative; top: auto; right: auto; width: 100%; max-width: 400px; justify-self: end; }
  .hero-stamp { display: block; position: absolute; left: -48px; bottom: 28px; width: 128px; }
  .sum { margin-top: 24px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .bhanu-grid { grid-template-columns: 300px 1fr; align-items: center; gap: 56px; }
  .sticky-cta { display: none; }
  .site-foot { padding-bottom: 24px; }
  .site-foot .wrap { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .class-grid { flex-direction: row; }
  .stage { flex: 1 1 62%; justify-content: center; }
  .panel { flex: 1 1 38%; min-width: 300px; }
  .video-frame { max-height: calc(100dvh - 104px); }
  .arena { flex-direction: row; }
  .arena-pad { width: min(44vw, 440px); align-content: center; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .pad-key { height: 18dvh; font-size: 20px; }
  .arena-pad { gap: 8px; padding-block: 8px; }
  .arena-big { font-size: 76px; }
  .arena-intro { gap: 4px; font-size: 14px; }
  .arena-intro h1 { font-size: 21px; }
  .arena-intro .btn { min-height: 46px; margin-top: 4px; font-size: 17px; }
  .arena-intro .link-btn { padding: 4px 0; }
  .class-bar { position: absolute; top: 0; left: 0; z-index: 2; padding: 4px 10px; width: 62%; }
  .stage { justify-content: flex-end; }
  .video-frame { max-height: calc(100dvh - 92px); }
  .panel { padding-top: 12px; }
  .options { margin-top: 10px; gap: 8px; }
  .option { min-height: 44px; font-size: 16px; }
  .question h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition: none !important; }
}
