/* Microplastics Quiz: one stylesheet, no build step. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Typed custom properties, so they can be animated */
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --ink: #eaf7ff;
  --ink-2: #b9d6e6;
  --ink-3: #86abc0;
  --line: rgb(255 255 255 / 0.13);
  --aqua: #4de3d4;
  --coral: #ff6f91;
  --sun: #ffd166;
  --lilac: #b49cff;
  --tang: #ff9f4a;
  --foam: #e9fbff;
  --ok: #3ee69f;
  --bad: #ff5c7a;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pad-x: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #031320;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.5;
  color: var(--ink);
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
}

kbd {
  font: inherit;
  font-size: 0.82em;
  font-weight: 650;
  padding: 0.12em 0.5em;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 -2px 0 rgb(0 0 0 / 0.25);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ */
/* Ocean backdrop                                                      */
/* ------------------------------------------------------------------ */

.ocean {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% -12%, #1e86a3 0%, rgb(30 134 163 / 0) 62%),
    linear-gradient(180deg, #0b4f6b 0%, #07324d 32%, #041c2f 68%, #020c16 100%);
}

/* Vignette */
.ocean::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140% 100% at 50% 30%, transparent 55%, rgb(1 8 15 / 0.65) 100%);
}

/* Sunlight shafts from the surface */
.rays {
  position: absolute;
  inset: -25% -40% 25%;
  background: repeating-conic-gradient(
    from 180deg at 50% 0%,
    rgb(190 245 255 / 0.11) 0deg 2.5deg,
    transparent 2.5deg 7deg,
    rgb(190 245 255 / 0.06) 7deg 8.5deg,
    transparent 8.5deg 15deg
  );
  -webkit-mask-image: radial-gradient(75% 85% at 50% 0%, #000 15%, transparent 72%);
  mask-image: radial-gradient(75% 85% at 50% 0%, #000 15%, transparent 72%);
  filter: blur(5px);
  transform-origin: 50% 0;
  mix-blend-mode: screen;
  animation: sway 16s ease-in-out infinite alternate;
}

@keyframes sway {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

/* Soft drifting light near the surface */
.glow {
  position: absolute;
  inset: -10% -10% 40%;
  background:
    radial-gradient(28% 34% at 22% 26%, rgb(110 230 255 / 0.16), transparent 70%),
    radial-gradient(24% 30% at 74% 18%, rgb(180 156 255 / 0.12), transparent 70%),
    radial-gradient(30% 36% at 50% 58%, rgb(77 227 212 / 0.08), transparent 70%);
  filter: blur(18px);
  animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

/* Film grain */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Microplastic particles (made by app.js) */
.particles {
  position: absolute;
  inset: 0;
}

.mp {
  position: absolute;
  left: var(--x);
  top: 100%;
  width: var(--s);
  height: var(--s);
  background: var(--c);
  opacity: 0;
  animation:
    rise var(--dur) linear var(--delay) infinite,
    tumble calc(var(--dur) / 3) linear var(--delay) infinite;
}

.mp.shard { clip-path: polygon(12% 0, 100% 28%, 72% 100%, 0 66%); }
.mp.tri { clip-path: polygon(50% 0, 100% 88%, 0 100%); }
.mp.chip { clip-path: polygon(0 22%, 58% 0, 100% 46%, 82% 100%, 8% 88%); }
.mp.bead { border-radius: 50%; box-shadow: inset -1px -1px 0 rgb(0 0 0 / 0.25); }
.mp.fibre {
  width: 1.5px;
  height: calc(var(--s) * 3.2);
  border-radius: 2px;
}

@keyframes rise {
  0% { translate: 0 0; opacity: 0; }
  8% { opacity: var(--o); }
  25% { translate: var(--drift) -30vh; }
  50% { translate: 0 -60vh; }
  75% { translate: calc(var(--drift) * -1) -90vh; }
  92% { opacity: var(--o); }
  100% { translate: 0 -122vh; opacity: 0; }
}

@keyframes tumble {
  to { rotate: var(--turn); }
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.topbar {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 28px) var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: 10px;
}

.brand-dim {
  color: var(--ink-3);
  font-weight: 550;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: conic-gradient(from var(--spin), var(--aqua), var(--lilac), var(--coral), var(--sun), var(--aqua));
  box-shadow: 0 0 22px rgb(77 227 212 / 0.45), inset 0 0 0 1px rgb(255 255 255 / 0.35);
  -webkit-mask: radial-gradient(circle at 70% 30%, transparent 3px, #000 3.5px);
  mask: radial-gradient(circle at 70% 30%, transparent 3px, #000 3.5px);
  animation: spin 8s linear infinite;
}

@keyframes spin {
  to { --spin: 360deg; }
}

.progress {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress[hidden] {
  display: none;
}

.progress li {
  position: relative;
  width: clamp(20px, 5vw, 44px);
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.14);
  transition: background-color 0.4s, box-shadow 0.4s, transform 0.45s var(--spring);
}

.progress li.current {
  background: rgb(255 255 255 / 0.32);
  transform: scaleY(1.25);
}

.progress li.current::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.85), transparent);
  translate: -100% 0;
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  to { translate: 100% 0; }
}

.progress li.ok {
  background: var(--ok);
  box-shadow: 0 0 14px rgb(62 230 159 / 0.55);
}

.progress li.bad {
  background: var(--bad);
  box-shadow: 0 0 14px rgb(255 92 122 / 0.5);
}

main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(28px, 6vw, 64px);
  display: grid;
  align-content: center;
}

.screen[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Shared pieces                                                       */
/* ------------------------------------------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aqua);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.eyebrow-center {
  display: flex;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.eyebrow-center::before {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.actions-center {
  justify-content: center;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.95em 1.55em;
  border: 0;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--spring), box-shadow 0.3s, background-color 0.3s;
}

.btn .arrow {
  display: inline-block;
  transition: translate 0.3s var(--spring);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover .arrow {
  translate: 4px 0;
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn:focus-visible,
.option:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.btn-primary {
  color: #022430;
  background: linear-gradient(135deg, #a5fbf1 0%, var(--aqua) 42%, #27b4d6 100%);
  box-shadow: 0 12px 32px -10px rgb(77 227 212 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.65);
}

/* Light sweep on hover */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.65) 50%, transparent 70%);
  translate: -120% 0;
  transition: translate 0.7s var(--ease-out);
}

.btn-primary:hover::after {
  translate: 120% 0;
}

.btn-primary:hover {
  box-shadow: 0 16px 40px -10px rgb(77 227 212 / 0.85), inset 0 1px 0 rgb(255 255 255 / 0.65);
}

.btn-ghost {
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.11);
}

/* Glass card with a gradient hairline border */
.card {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(22px, 4.5vw, 46px);
  border-radius: 30px;
  background: linear-gradient(160deg, rgb(255 255 255 / 0.11), rgb(255 255 255 / 0.035));
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.08);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.06) 38%, rgb(255 255 255 / 0.04) 62%, rgb(77 227 212 / 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ------------------------------------------------------------------ */
/* Start screen                                                        */
/* ------------------------------------------------------------------ */

.screen-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
}

.intro-copy {
  container-type: inline-size;
  animation: rise-in 0.8s var(--ease-out) both;
}

.hero-title {
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.hero-word {
  display: block;
  font-size: clamp(2.5rem, 12.4cqi, 6.8rem);
  padding-bottom: 0.06em;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #c4f7ff 28%, var(--aqua) 46%, var(--lilac) 66%, var(--coral) 84%, var(--sun) 100%) 0 0 / 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: sheen 9s ease-in-out infinite alternate;
}

@keyframes sheen {
  to { background-position: 100% 0; }
}

.hero-sub {
  display: block;
  margin-top: 0.55em;
  font-size: clamp(1.35rem, 4.4cqi, 2.3rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--foam);
}

.lede {
  max-width: 34em;
  margin: 1.4rem 0 0;
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  color: var(--ink-2);
  text-wrap: pretty;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.45em 0.95em;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px var(--line);
}

.chips li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  rotate: 45deg;
  background: var(--chip, var(--aqua));
  box-shadow: 0 0 10px var(--chip, var(--aqua));
}

.chips li:nth-child(2) { --chip: var(--sun); }
.chips li:nth-child(3) { --chip: var(--coral); }

.hint {
  margin: 1.3rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  animation: rise-in 1s var(--ease-out) 0.15s both;
}

.halo {
  position: absolute;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgb(77 227 212 / 0.28), rgb(180 156 255 / 0.12) 55%, transparent 100%);
  filter: blur(10px);
  animation: breathe 6s ease-in-out infinite alternate;
}

@keyframes breathe {
  from { transform: scale(0.92); opacity: 0.75; }
  to { transform: scale(1.06); opacity: 1; }
}

.bottle {
  position: relative;
  width: min(100%, 250px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.35));
  animation: bob 7s ease-in-out infinite alternate;
}

@keyframes bob {
  from { transform: translateY(-8px) rotate(-4deg); }
  to { transform: translateY(10px) rotate(3deg); }
}

.frag {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: crumble var(--d) linear var(--delay) infinite;
}

@keyframes crumble {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  14% { opacity: var(--o); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}

/* ------------------------------------------------------------------ */
/* Question card                                                       */
/* ------------------------------------------------------------------ */

.quiz-card {
  overflow: hidden;
}

.q-num {
  position: absolute;
  top: -0.12em;
  right: 0.12em;
  font-size: clamp(6rem, 18vw, 10rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(255 255 255 / 0.1);
  pointer-events: none;
  user-select: none;
}

.card-body {
  position: relative;
  transition: opacity 0.22s, translate 0.22s var(--ease-out), filter 0.22s;
}

.quiz-card.leaving .card-body,
.quiz-card.leaving .feedback {
  opacity: 0;
  translate: -28px 0;
  filter: blur(4px);
}

.q-count {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua);
}

.q-title {
  margin: 0.5rem 0 1.6rem;
  max-width: 22em;
  font-size: clamp(1.45rem, 3.4vw, 2.2rem);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  outline: none;
}

.quiz-card.enter .q-title,
.quiz-card.enter .q-count {
  animation: rise-in 0.55s var(--ease-out) both;
}

.quiz-card.enter .q-num {
  animation: num-in 0.8s var(--ease-out) both;
}

@keyframes num-in {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 64px;
  padding: 12px 18px 12px 12px;
  border: 0;
  border-radius: 18px;
  text-align: left;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  line-height: 1.35;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  transition: background-color 0.25s, box-shadow 0.25s, transform 0.35s var(--spring), opacity 0.4s;
  animation: rise-in 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}

.option:hover:not(:disabled) {
  transform: translateX(5px);
  background: rgb(255 255 255 / 0.09);
  box-shadow: inset 0 0 0 1px rgb(77 227 212 / 0.6), 0 10px 30px -14px rgb(77 227 212 / 0.6);
}

.option:disabled {
  cursor: default;
}

.letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-weight: 760;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.15);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s, transform 0.4s var(--spring);
}

.option:hover:not(:disabled) .letter {
  color: #022430;
  background: var(--aqua);
  box-shadow: 0 0 18px rgb(77 227 212 / 0.6);
}

.option-text {
  flex: 1;
}

/* Click ripple */
.option::after {
  content: "";
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  z-index: -1;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: var(--ripple, rgb(255 255 255 / 0.35));
  opacity: 0;
  pointer-events: none;
}

.option.ripple::after {
  animation: ripple 0.8s var(--ease-out);
}

@keyframes ripple {
  from { transform: scale(0); opacity: 0.9; }
  to { transform: scale(40); opacity: 0; }
}

.option.is-correct {
  --ripple: rgb(62 230 159 / 0.45);
  background: rgb(62 230 159 / 0.13);
  box-shadow: inset 0 0 0 1.5px var(--ok), 0 0 44px -12px rgb(62 230 159 / 0.75);
}

.option.is-correct .letter {
  color: #032018;
  background: var(--ok);
  box-shadow: 0 0 20px rgb(62 230 159 / 0.7);
  animation: pop 0.6s var(--spring);
}

.option.is-wrong {
  --ripple: rgb(255 92 122 / 0.45);
  background: rgb(255 92 122 / 0.12);
  box-shadow: inset 0 0 0 1.5px var(--bad);
  animation: shake 0.5s var(--ease-out);
}

.option.is-wrong .letter {
  color: #2a0610;
  background: var(--bad);
}

.option.is-dim {
  opacity: 0.5;
}

@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.28) rotate(-6deg); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.state {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ok);
  background: rgb(62 230 159 / 0.14);
}

.is-wrong .state {
  color: var(--bad);
  background: rgb(255 92 122 / 0.14);
}

.icon {
  width: 18px;
  height: 18px;
  overflow: visible;
}

.icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.45s var(--ease-out) 0.15s forwards;
}

.icon path + path {
  animation-delay: 0.3s;
}

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

/* Feedback panel: grows open with a grid-rows transition */
.feedback {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.55s var(--ease-out), opacity 0.4s, translate 0.22s var(--ease-out), filter 0.22s;
}

.feedback.show {
  grid-template-rows: 1fr;
  opacity: 1;
}

.fb-inner {
  min-height: 0;
  overflow: hidden;
  /* Clip while it grows open, but leave room for the button's glow */
  overflow: clip;
  overflow-clip-margin: 34px;
}

.verdict {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.verdict .icon {
  width: 22px;
  height: 22px;
}

.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }

.why {
  margin: 0;
  padding: 14px 18px;
  border-radius: 16px;
  color: var(--ink-2);
  background: linear-gradient(90deg, rgb(77 227 212 / 0.1), rgb(0 0 0 / 0.14) 40%);
  box-shadow: inset 3px 0 0 var(--aqua);
  text-wrap: pretty;
}

.why b {
  color: var(--ink);
  font-weight: 700;
}

.card-foot {
  display: flex;
  justify-content: flex-end;
  padding: 1.4rem 4px 4px;
}

/* ------------------------------------------------------------------ */
/* Results                                                             */
/* ------------------------------------------------------------------ */

.results-card {
  text-align: center;
  overflow: hidden;
  animation: rise-in 0.7s var(--ease-out) both;
}

.ring {
  --p: 0;
  position: relative;
  width: clamp(170px, 34vw, 220px);
  aspect-ratio: 1;
  margin: 0 auto 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: --p 1.6s var(--ease-out);
}

.ring::before,
.ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
}

.ring::before {
  background: rgb(255 255 255 / 0.09);
}

.ring::after {
  background: conic-gradient(var(--aqua) 0%, var(--lilac) calc(var(--p) * 0.6%), var(--coral) calc(var(--p) * 1%), transparent 0);
  filter: drop-shadow(0 0 10px rgb(77 227 212 / 0.6));
}

.ring-inner {
  display: grid;
  justify-items: center;
}

.ring-score {
  font-size: clamp(3.6rem, 9vw, 4.6rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.ring-total {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
}

.result-title {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 820;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  outline: none;
  color: transparent;
  background: linear-gradient(100deg, #fff, var(--aqua) 50%, var(--lilac));
  -webkit-background-clip: text;
  background-clip: text;
}

.result-text {
  max-width: 32em;
  margin: 0.9rem auto 0;
  color: var(--ink-2);
  font-size: 1.06rem;
  text-wrap: pretty;
}

.results-card .actions {
  margin-top: 1.8rem;
}

/* Bubbles that rise out of the score on a good result */
.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  left: var(--x);
  bottom: -30px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgb(255 255 255 / 0.9) 0 12%, rgb(190 245 255 / 0.25) 13% 55%, rgb(190 245 255 / 0.5) 100%);
  box-shadow: inset 0 0 0 1px rgb(220 250 255 / 0.55);
  opacity: 0;
  animation: bubble var(--dur) var(--ease-out) var(--delay) forwards;
}

@keyframes bubble {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--rise, -420px)) scale(1.1); }
}

.review-title {
  max-width: 780px;
  width: 100%;
  margin: clamp(28px, 5vw, 44px) auto 14px;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.review {
  display: grid;
  gap: 12px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.rv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: rise-in 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 80ms + 300ms);
}

.rv .state {
  margin-top: 2px;
}

.rv-q {
  margin: 0 0 0.35rem;
  font-weight: 700;
  line-height: 1.35;
}

.rv-a,
.rv-c {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.rv-a b,
.rv-c b {
  font-weight: 650;
  color: var(--ink);
}

.rv.bad .rv-a b {
  color: #ffb3c1;
  text-decoration: line-through;
  text-decoration-color: rgb(255 92 122 / 0.7);
  text-decoration-thickness: 2px;
}

.rv-c b {
  color: #aaf5d4;
}

.rv-why {
  margin: 0.6rem 0 0;
  font-size: 0.93rem;
  color: var(--ink-3);
  text-wrap: pretty;
}

.noscript {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  text-align: center;
  background: rgb(255 92 122 / 0.15);
}

.print-sheet {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Shared entrance                                                     */
/* ------------------------------------------------------------------ */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(4px);
  }
}

/* ------------------------------------------------------------------ */
/* Small screens                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 860px) {
  .screen-intro {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero-art {
    order: -1;
    min-height: 0;
    height: 210px;
  }

  .halo {
    width: 230px;
  }

  .bottle {
    width: 118px;
  }
}

@media (max-width: 520px) {
  .brand-dim {
    display: none;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .option {
    gap: 0.8rem;
    padding-right: 14px;
  }

  .letter {
    width: 38px;
    height: 38px;
  }

  .card-foot .btn {
    width: 100%;
  }

  .hint {
    display: none;
  }

  .q-num {
    font-size: 4.6rem;
  }
}

/* ------------------------------------------------------------------ */
/* Reduced motion: keep the look, drop the movement                    */
/* ------------------------------------------------------------------ */

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

  .mp {
    top: var(--y);
    animation: none !important;
    opacity: var(--o);
    rotate: var(--turn);
  }

  .rays,
  .glow,
  .halo,
  .bottle,
  .brand-mark,
  .hero-word,
  .progress li.current::after {
    animation: none !important;
  }

  .frag,
  .bubble {
    display: none;
  }

  .ring {
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* Print: only the worksheet                                           */
/* ------------------------------------------------------------------ */

@media print {
  @page {
    margin: 16mm 16mm 14mm;
  }

  :root {
    color-scheme: light;
  }

  html,
  body {
    background: #fff !important;
    color: #000;
  }

  body {
    display: block;
    min-height: 0;
    font-size: 11.5pt;
    line-height: 1.4;
  }

  .ocean,
  .topbar,
  main,
  noscript {
    display: none !important;
  }

  .print-sheet {
    display: block;
    color: #000;
  }

  .ps-head {
    padding-bottom: 3mm;
    border-bottom: 1.5pt solid #000;
  }

  .ps-title {
    margin: 0;
    font-size: 22pt;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .ps-fields {
    display: flex;
    align-items: flex-end;
    gap: 2mm;
    margin: 5mm 0 0;
    font-size: 10.5pt;
  }

  .ps-fields span {
    flex: 2;
    height: 5mm;
    border-bottom: 0.75pt solid #000;
  }

  .ps-fields span + span {
    flex: 1;
  }

  .ps-fields b {
    font-weight: 600;
  }

  .ps-fields span + b {
    margin-left: 6mm;
  }

  .ps-intro {
    margin: 4mm 0 5mm;
    font-style: italic;
  }

  .ps-questions {
    margin: 0;
    padding-left: 6mm;
  }

  .ps-questions > li {
    margin-bottom: 5mm;
    break-inside: avoid;
    font-weight: 700;
  }

  .ps-options {
    margin: 1.8mm 0 0;
    padding: 0;
    list-style: none;
    font-weight: 400;
  }

  .ps-options li {
    margin: 1.2mm 0;
    padding-left: 8.1mm;
    text-indent: -8.1mm;
  }

  .ps-options .ps-letter {
    display: inline-grid;
    place-items: center;
    width: 5.6mm;
    height: 5.6mm;
    margin-right: 2.5mm;
    border: 0.75pt solid #000;
    border-radius: 50%;
    font-size: 9pt;
    font-weight: 700;
    text-indent: 0;
  }

  /* The answer key gets its own page: hand out page 1, keep page 2 */
  .ps-key {
    break-before: page;
    break-inside: avoid;
  }

  .ps-key h2 {
    margin: 0 0 1mm;
    font-size: 14pt;
  }

  .ps-key p {
    margin: 0 0 3mm;
    font-size: 10pt;
  }

  .ps-key table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
  }

  .ps-key th,
  .ps-key td {
    padding: 1.6mm 2mm;
    border: 0.75pt solid #000;
    text-align: left;
    vertical-align: top;
  }

  .ps-key th {
    background: #eee;
  }

  .ps-key td:nth-child(-n + 2) {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    font-weight: 700;
  }

  .ps-score {
    margin-top: 3mm !important;
  }
}
