/* BG: /pages/quiz (sections/bg-quiz.liquid + assets/bg-quiz.js). Full-screen quiz, one column.
   Light site look, as /pages/supercharge (2026-11-19, was the dark designer-pack palette): white field, cream
   bands, #212121 type, gold accents and italic headline word, green buttons, orange only on the offer line.
   Cards are square; only buttons (and the answer options, which are buttons) carry the site's 12px radius.
   Type: the theme's Outfit.
   Every screen fits the viewport without scrolling: type, gaps, option heights, the chart and the offer image
   scale with the screen height (dvh, clamped), and each screen's button sits in a footer that sticks to the
   bottom if a very short screen still overflows. */
.bgq {
  --bgq-bg: #fff;
  --bgq-ink: #212121;
  --bgq-quiet: #4a4a4a;
  --bgq-panel: #fff;
  --bgq-panel-line: #e2e2e2;
  --bgq-track: #ececec;
  --bgq-gold: #d8a81c;
  --bgq-gold-soft: rgba(216, 168, 28, 0.14);
  --bgq-cream: #fbf5e3;
  --bgq-muted: #6f6f6f;
  --bgq-green: #65b824;
  --bgq-orange: #f07c35;
  --bgq-radius: 0;
  --bgq-btn-radius: 12px;
  --bgq-width: 52rem;
  /* Vertical rhythm, scaled to the screen height. */
  --bgq-gap-s: clamp(0.6rem, 1.1dvh, 1rem);
  --bgq-gap-m: clamp(1rem, 1.8dvh, 1.6rem);
  --bgq-gap-l: clamp(1.2rem, 2.6dvh, 2.4rem);
  /* Headings take their colour from the scheme variable (bg-global.css), so the section sets the scheme. */
  --color-foreground: 33, 33, 33;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 1.6rem;
  background: var(--bgq-bg);
  color: var(--bgq-ink);
  font-family: var(--font-body-family);
  font-size: 1.5rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.bgq *,
.bgq *::before,
.bgq *::after {
  box-sizing: border-box;
}

:where(.bgq) p {
  margin: 0;
}

/* The quiz page has no offer bar (layout/theme.liquid), so drop the space bg-global.css reserves for it. */
body.bg-quiz-page {
  padding-top: 0;
  background: #fff;
}

/* ---------- Top bar ---------- */
.bgq__bar {
  position: relative;
  width: 100%;
  max-width: var(--bgq-width);
  margin: 0 auto;
  padding: clamp(0.8rem, 1.4dvh, 1.6rem) 0 0;
  text-align: center;
}

.bgq__logo {
  display: inline-block;
  color: var(--bgq-ink);
  font-weight: 700;
  text-decoration: none;
  vertical-align: top;
}

.bgq__logo img {
  display: block;
  width: clamp(3.6rem, 5.4dvh, 5.6rem);
  height: auto;
}

.bgq__back {
  position: absolute;
  top: clamp(0.8rem, 1.4dvh, 1.6rem);
  left: -0.8rem;
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: clamp(3.6rem, 5.4dvh, 5.6rem);
  padding: 0;
  border: 0;
  background: none;
  color: var(--bgq-ink);
  cursor: pointer;
}

.bgq__back[hidden] {
  display: none;
}

.bgq__back .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.bgq__back:hover {
  color: var(--bgq-gold);
}

.bgq__progress {
  height: 3px;
  margin-top: var(--bgq-gap-s);
  background: var(--bgq-track);
  overflow: hidden;
}

.bgq__progress-fill {
  display: block;
  height: 100%;
  width: 4%;
  background: var(--bgq-gold);
  transition: width 0.35s ease;
}

/* ---------- Screen ---------- */
.bgq__stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: var(--bgq-width);
  margin: 0 auto;
}

.bgq__screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--bgq-gap-m) 0 calc(var(--bgq-gap-m) + env(safe-area-inset-bottom));
  animation: bgq-in 0.35s ease both;
}

@keyframes bgq-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Headings take focus on each new screen for screen readers; no visible ring on them. */
.bgq [tabindex='-1']:focus,
.bgq [tabindex='-1']:focus-visible {
  outline: none;
  box-shadow: none;
}

.bgq__hero {
  margin: 0 0 var(--bgq-gap-m);
  font-size: clamp(2.4rem, 4.2dvh, 4.4rem);
  font-weight: 700;
  line-height: 1.1;
}

.bgq__hero em {
  color: var(--bgq-gold);
  font-size: inherit;
  font-style: italic;
  font-weight: inherit;
}

.bgq__prompt {
  margin: 0 0 var(--bgq-gap-m);
  font-size: clamp(2rem, 3.4dvh, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
}

.bgq__prompt--center,
.bgq__lead--center {
  text-align: center;
}

.bgq__lead {
  margin-bottom: var(--bgq-gap-l);
  color: var(--bgq-quiet);
  font-size: clamp(1.4rem, 2dvh, 1.6rem);
}

.bgq__lead strong {
  color: var(--bgq-ink);
}

.bgq__eyebrow {
  color: var(--bgq-muted);
  font-size: 1.2rem;
  font-weight: 600;
}

.bgq__micro {
  margin-top: var(--bgq-gap-l);
  color: var(--bgq-muted);
  font-size: 1.2rem;
  text-align: center;
}

.bgq__micro--tight {
  margin-top: var(--bgq-gap-s);
}

.bgq__fine {
  margin-top: var(--bgq-gap-s);
  color: var(--bgq-muted);
  font-size: 1.1rem;
  line-height: 1.4;
  text-align: center;
}

.bgq__gold {
  color: var(--bgq-ink);
}

/* ---------- Options ---------- */
.bgq__options {
  display: grid;
  gap: var(--bgq-gap-s);
}

.bgq__option {
  display: block;
  width: 100%;
  min-height: clamp(4.4rem, 6.4dvh, 5.6rem);
  padding: clamp(0.9rem, 1.5dvh, 1.4rem) 1.6rem;
  border: 1px solid var(--bgq-panel-line);
  border-radius: var(--bgq-btn-radius);
  background: #fff;
  color: var(--bgq-ink);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bgq__option:focus-visible,
.bgq__btn:focus-visible,
.bgq__back:focus-visible {
  outline: 2px solid var(--bgq-gold);
  outline-offset: 2px;
}

.bgq__option.is-selected {
  border-color: var(--bgq-gold);
  background: var(--bgq-cream);
  color: var(--bgq-ink);
}

@media (hover: hover) {
  .bgq__option:hover {
    border-color: var(--bgq-gold);
    background: var(--bgq-cream);
    color: var(--bgq-ink);
  }
}

.bgq__why {
  margin-top: var(--bgq-gap-l);
  padding: var(--bgq-gap-m) 1.6rem;
  background: var(--bgq-cream);
  color: var(--bgq-quiet);
  font-size: 1.3rem;
}

.bgq__why .bgq__eyebrow {
  margin-bottom: 0.4rem;
}

/* ---------- Buttons ---------- */
/* The screen's button and its small print. Sits straight under the content; if a short screen overflows it
   sticks to the bottom so the next step is always in view. */
.bgq__foot {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 -1.6rem calc(-1 * (var(--bgq-gap-m) + env(safe-area-inset-bottom)));
  padding: var(--bgq-gap-l) 1.6rem calc(var(--bgq-gap-m) + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255, 255, 255, 0), var(--bgq-bg) var(--bgq-gap-l));
}

.bgq__btn {
  display: block;
  width: 100%;
  min-height: 5.6rem;
  padding: clamp(1.3rem, 2dvh, 1.7rem) 2rem;
  border: 0;
  border-radius: var(--bgq-btn-radius);
  background: var(--bgq-green);
  color: #fff;
  font: inherit;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04rem;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.bgq__btn:hover {
  filter: brightness(1.05);
}

.bgq__btn--buy {
  background: var(--bgq-green);
  color: #fff;
}

/* ---------- Reviews ---------- */
.bgq__review {
  margin: 0;
  padding: var(--bgq-gap-m) 1.6rem;
  background: var(--bgq-cream);
}

.bgq__review blockquote {
  margin: 0.4rem 0 0.6rem;
  padding: 0;
  border: 0;
  color: var(--bgq-ink);
  font-size: 1.4rem;
  font-style: normal;
  line-height: 1.4;
}

.bgq__review figcaption {
  color: var(--bgq-muted);
  font-size: 1.1rem;
}

.bgq__stars {
  color: var(--bgq-gold);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
}

.bgq__reviews {
  display: grid;
  gap: var(--bgq-gap-s);
}

/* First screen: a strip of reviews straight under the answers (Ryan, 2026-11-19: not pinned to the bottom of the
   screen); dropped where there is no room. */
.bgq__marquee {
  margin: 0 -1.6rem;
  padding-top: var(--bgq-gap-l);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.bgq__marquee-track,
.bgq__marquee-copy {
  display: flex;
  gap: 1.2rem;
}

.bgq__marquee-track {
  width: max-content;
  animation: bgq-marquee 40s linear infinite;
}

.bgq__marquee .bgq__review {
  width: 26rem;
  flex: none;
  padding: 1.2rem 1.4rem;
}

.bgq__marquee blockquote {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.3rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@keyframes bgq-marquee {
  to {
    transform: translateX(calc(-50% - 0.6rem));
  }
}

@media (max-height: 640px) {
  .bgq__marquee {
    display: none;
  }
}

/* ---------- Analysing ring ---------- */
.bgq__ring {
  position: relative;
  width: clamp(9rem, 16dvh, 12rem);
  height: clamp(9rem, 16dvh, 12rem);
  margin: var(--bgq-gap-s) auto 0;
}

.bgq__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bgq__ring circle {
  fill: none;
  stroke: var(--bgq-track);
  stroke-width: 6;
}

.bgq__ring .bgq__ring-fill {
  stroke: var(--bgq-gold);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p));
}

.bgq__ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 700;
}

/* ---------- Loader steps ---------- */
.bgq__steps {
  display: grid;
  gap: var(--bgq-gap-s);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bgq__step {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: clamp(1.1rem, 1.8dvh, 1.6rem) 1.6rem;
  border: 1px solid var(--bgq-panel-line);
  background: #fff;
  color: var(--bgq-muted);
  transition: all 0.3s ease;
}

.bgq__step-dot {
  position: relative;
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--bgq-panel-line);
  border-radius: 50%;
}

.bgq__step.is-active {
  background: var(--bgq-cream);
  color: var(--bgq-ink);
}

.bgq__step.is-active .bgq__step-dot {
  border-color: var(--bgq-gold) transparent var(--bgq-gold) var(--bgq-gold);
  animation: bgq-spin 0.8s linear infinite;
}

.bgq__step.is-done {
  border-color: rgba(216, 168, 28, 0.6);
  background: var(--bgq-gold-soft);
  color: var(--bgq-ink);
}

.bgq__step.is-done .bgq__step-dot {
  border-color: var(--bgq-gold);
  background: var(--bgq-gold)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 1.4rem no-repeat;
}

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

/* ---------- Result ---------- */
.bgq__card {
  padding: var(--bgq-gap-m) 1.6rem;
  border-radius: var(--bgq-radius);
  background: var(--bgq-cream);
  color: var(--bgq-ink);
}

.bgq__card .bgq__eyebrow {
  color: var(--bgq-muted);
}

.bgq__card-title {
  margin: 0.4rem 0 var(--bgq-gap-s);
  color: var(--bgq-ink);
  font-size: clamp(1.9rem, 3dvh, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
}

.bgq__badge {
  background: linear-gradient(transparent 58%, rgba(216, 168, 28, 0.55) 58%);
  white-space: nowrap;
}

.bgq__card-text {
  font-size: 1.4rem;
}

.bgq__meter {
  margin-top: var(--bgq-gap-m);
}

.bgq__meter-heading {
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.bgq__meter-bar {
  position: relative;
  height: 1rem;
  background: linear-gradient(90deg, #65b824, #d8a81c 50%, #f07c35 80%, #c0392b);
}

.bgq__meter-knob {
  position: absolute;
  top: 50%;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--bgq-ink);
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.bgq__meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.bgq__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.bgq__tile {
  padding: clamp(1rem, 1.6dvh, 1.4rem) 1.2rem;
  border: 1px solid var(--bgq-panel-line);
  background: #fff;
}

.bgq__tile-value {
  margin-top: 0.2rem;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Projection chart ---------- */
.bgq__chart {
  padding: var(--bgq-gap-m) 1.4rem;
  border: 1px solid var(--bgq-panel-line);
  border-radius: var(--bgq-radius);
  background: var(--bgq-panel);
}

.bgq__chart-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  padding-bottom: var(--bgq-gap-s);
  border-bottom: 1px solid var(--bgq-panel-line);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}

.bgq__chart-head .bgq__eyebrow {
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.bgq__chart-plot {
  position: relative;
  margin-top: var(--bgq-gap-m);
}

.bgq__chart-plot svg {
  display: block;
  width: 100%;
  height: clamp(9rem, 20dvh, 16rem);
}

.bgq__chart-axis {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--bgq-ink);
  font-size: 1.1rem;
  font-weight: 600;
}

.bgq__grid {
  stroke: var(--bgq-panel-line);
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.bgq__line {
  fill: none;
  stroke: var(--bgq-gold);
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  vector-effect: non-scaling-stroke;
  animation: bgq-draw 1.6s 0.2s ease forwards;
}

@keyframes bgq-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Dots sit on the path's end points (viewBox 300 x 160: 6,140 and 294,22) as HTML so they stay round. */
.bgq__dot {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border: 3px solid var(--bgq-gold);
  border-radius: 50%;
  background: var(--bgq-panel);
  transform: translate(-50%, -50%);
}

.bgq__dot--start {
  top: 87.5%;
  left: 2%;
}

.bgq__dot--end {
  top: 13.75%;
  left: 98%;
  background: var(--bgq-gold);
}

.bgq__pill {
  position: absolute;
  bottom: calc(12.5% + 1.2rem);
  left: 0;
  padding: 0.3rem 0.8rem;
  background: var(--bgq-ink);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.bgq__chart-stops {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  color: var(--bgq-muted);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---------- Offer ---------- */
.bgq__offer {
  overflow: hidden;
  border: 1px solid var(--bgq-panel-line);
  border-radius: var(--bgq-radius);
  background: var(--bgq-panel);
}

.bgq__offer-media img {
  display: block;
  width: 100%;
  height: clamp(7rem, 13dvh, 22rem);
  object-fit: cover;
  object-position: center 55%;
}

@media (max-height: 600px) {
  .bgq__offer-media {
    display: none;
  }
}

.bgq__offer-body {
  padding: var(--bgq-gap-m) 1.6rem;
}

.bgq__offer-title {
  margin: 0.2rem 0 var(--bgq-gap-s);
  font-size: clamp(1.7rem, 2.6dvh, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.bgq__ticks,
.bgq__stack {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.3rem;
  line-height: 1.35;
}

.bgq__ticks li,
.bgq__stack li {
  position: relative;
  padding-left: 2.4rem;
}

.bgq__ticks li::before,
.bgq__stack li::before {
  content: '';
  position: absolute;
  top: 0.1rem;
  left: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--bgq-green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23ffffff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 1.2rem no-repeat;
}

.bgq__stack {
  margin-top: var(--bgq-gap-s);
  padding-top: var(--bgq-gap-s);
  border-top: 1px solid var(--bgq-panel-line);
  color: var(--bgq-ink);
  font-weight: 600;
}

/* Orange is the offer colour, and only the offer line gets it. */
.bgq__stack li.is-offer {
  color: var(--bgq-orange);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .bgq__screen,
  .bgq__marquee-track,
  .bgq__line,
  .bgq__step.is-active .bgq__step-dot {
    animation: none;
  }

  .bgq__line {
    stroke-dashoffset: 0;
  }
}
