/* ---------- Tokens ---------- */
:root {
  --bg: #fff7e6;
  --surface: #ffffff;
  --ink: #1b1a17;
  --muted: #5e5a50;
  --field: #fffdf7;

  --yellow: #f5b301;
  --yellow-soft: #ffe9a8;
  --red: #e03e2d;
  --green: #2d6a4f;
  --blue: #2f80ed;
  --blue-soft: #d6e6ff;
  --pink: #ff4f9a;
  --pink-soft: #ffd9ea;
  --orange: #f97316;
  --orange-soft: #ffdcc2;
  --purple: #8b5cf6;
  --purple-soft: #e6dcff;

  --skin: #f1c9a5;
  --beard: #6b4a2b;
  --pat-off: #d9d2c0;

  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 18px;
  --radius-sm: 12px;
  --border: 3px solid var(--ink);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #17150f;
    --surface: #23201a;
    --ink: #f6efdf;
    --muted: #b9af9b;
    --field: #1c1913;
    --yellow-soft: #3b2f0a;
    --blue-soft: #14233b;
    --pink-soft: #3b1526;
    --orange-soft: #3b2010;
    --purple-soft: #261a3d;
    --pat-off: #4a443a;
  }
}
:root[data-theme='dark'] {
  --bg: #17150f;
  --surface: #23201a;
  --ink: #f6efdf;
  --muted: #b9af9b;
  --field: #1c1913;
  --yellow-soft: #3b2f0a;
  --blue-soft: #14233b;
  --pink-soft: #3b1526;
  --orange-soft: #3b2010;
  --purple-soft: #261a3d;
  --pat-off: #4a443a;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  padding-bottom: 76px; /* room for the dock */
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 144;
}
h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin: 0.55rem 0 0.6rem;
}
p {
  margin: 0 0 0.75rem;
}
small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 400;
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
.nowrap {
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Ticker ---------- */
.ticker {
  background: var(--yellow);
  color: #1b1a17;
  border-bottom: var(--border);
  overflow: hidden;
  white-space: nowrap;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}
.ticker-track {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0.55rem 0;
  animation: ticker var(--ticker-duration, 70s) linear infinite;
  will-change: transform;
}
.ticker-track li {
  padding: 0 1.4rem;
}
.ticker-track li::after {
  content: '★';
  margin-left: 1.4rem;
  color: var(--red);
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* ---------- Buttons ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s;
  user-select: none;
  line-height: 1.1;
  text-align: center;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--ink);
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.btn-primary {
  background: var(--yellow);
  color: #1b1a17;
}
.btn-ghost {
  background: var(--surface);
}
.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.btn-huge {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 6vw, 3rem);
  padding: 0.45em 1.2em;
  min-width: 7ch;
  letter-spacing: -0.01em;
}
.btn-no {
  background: var(--red);
  color: #fff;
}
.btn-yes {
  background: var(--green);
  color: #fff;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 8vw, 7rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--surface);
  transform: rotate(-2deg);
  margin: 0 0 1rem;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  font-size: clamp(3.4rem, 14vw, 10rem);
  font-style: italic;
  line-height: 0.92;
  margin: 0.4rem auto 0;
  max-width: 14ch;
  transition: font-size 0.2s;
}
.hero-title.is-long {
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  max-width: 20ch;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--muted);
  margin: 1.25rem auto 2rem;
  max-width: 50ch;
  min-height: 1.6em;
}
.game-buttons {
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  flex-wrap: wrap;
}
.met-count {
  margin-top: 1.5rem;
  font-weight: 700;
}
.met-count .pill {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-left: 0.4rem;
}
#game-ctas {
  justify-content: center;
}

.reveal {
  display: grid;
  gap: 2rem;
  align-items: center;
  text-align: left;
  margin-top: 1rem;
  animation: rise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reveal-title {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.95;
}
.reveal-title em {
  font-style: italic;
  color: var(--red);
}
.reveal-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
}
.reveal-list li {
  padding: 0.45rem 0 0.45rem 1.6rem;
  position: relative;
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent);
}
.reveal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 900;
}
@media (min-width: 760px) {
  .reveal {
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: 3rem;
  }
}

/* ---------- Polaroids ---------- */
.polaroid {
  margin: 0;
  background: #fff;
  color: #1b1a17;
  padding: 0.75rem 0.75rem 1rem;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 6px;
  position: relative;
}
.polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 2px solid #1b1a17;
  background: #eee;
}
.polaroid figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  padding: 0.8rem 0.15rem 0;
}
.polaroid figcaption strong {
  font-style: normal;
  font-weight: 900;
}
.polaroid::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 28px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(245, 179, 1, 0.75);
  border: 2px solid rgba(27, 26, 23, 0.4);
}
.polaroid-hero {
  transform: rotate(-3deg);
  max-width: 340px;
  margin: 1rem auto 0;
}
.tilt-l {
  transform: rotate(-2deg);
}
.tilt-r {
  transform: rotate(2deg);
}
.evidence-grid {
  display: grid;
  gap: 2.25rem 1.75rem;
  margin-top: 2rem;
  align-items: start;
}
.polaroid.ratio-wide img {
  aspect-ratio: 4 / 3;
}
.polaroid.ratio-square img {
  aspect-ratio: 1;
}
.polaroid img.focus-low-right {
  object-position: 70% 70%;
}
@media (min-width: 640px) {
  .evidence-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Pizza toss: the GIF animates itself; the frame only bounces on celebration */
.toss img {
  transform-origin: 50% 90%;
}
.toss.celebrate img {
  animation: toss-big 0.7s ease-in-out 4;
}
@keyframes toss-big {
  0%,
  100% {
    transform: rotate(-8deg) translateY(0) scale(1);
  }
  50% {
    transform: rotate(8deg) translateY(-30px) scale(1.06);
  }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3rem, 7vw, 6rem) 0;
  border-top: var(--border);
}
.tint-yellow {
  background: var(--yellow-soft);
}
.tint-white {
  background: var(--surface);
}
.tint-pink {
  background: var(--pink-soft);
}
.tint-blue {
  background: var(--blue-soft);
}
.tint-orange {
  background: var(--orange-soft);
}
.tint-purple {
  background: var(--purple-soft);
}
.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 1.75rem;
}
.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.35rem 0 0;
}
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 2px solid var(--ink);
  vertical-align: middle;
  transform: rotate(-4deg);
  margin-left: 0.3rem;
}
.badge-red {
  background: var(--red);
  color: #fff;
}

/* Dossier */
.status-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--red);
}
.status-card .status-label {
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 0.2rem;
}
.status-card .status-text {
  margin: 0;
  font-size: 1.05rem;
}
.status-dot {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(61, 220, 132, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0);
  }
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.stat .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  margin: 0;
}
.stat-hot {
  background: var(--yellow);
  color: #1b1a17;
}
.stat-hot .label,
.stat-hot .note {
  color: #4a4130;
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 1.1rem;
  max-width: 760px;
}
.form label,
.form legend {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
}
.form legend {
  padding: 0;
  margin-bottom: 0.6rem;
}
.form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.form input[type='text'],
.form input[type='email'],
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--field);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  box-shadow: var(--shadow-sm);
}
.form textarea {
  resize: vertical;
  min-height: 5.5rem;
}
.form select {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
}
.form input::placeholder,
.form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}
.form .opt {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}
.form .req {
  color: var(--red);
}
.grid-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choices-stack {
  flex-direction: column;
  align-items: flex-start;
}
.choice {
  position: relative;
  cursor: pointer;
  font-weight: 600 !important;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice span {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--field);
  transition: background 0.12s, color 0.12s, transform 0.08s;
}
.choice input:checked + span {
  background: var(--ink);
  color: var(--bg);
}
.choice input:focus-visible + span {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.choice:hover span {
  transform: translateY(-1px);
}
.check {
  display: flex !important;
  gap: 0.7rem;
  align-items: flex-start;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  cursor: pointer;
}
.check input {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.form-msg {
  margin: 0;
  font-weight: 600;
  min-height: 1.5em;
}
.form-msg.ok {
  color: var(--green);
}
.form-msg.err {
  color: var(--red);
}
.form.is-done {
  border-color: var(--green);
  box-shadow: 6px 6px 0 var(--green);
}
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}
.counter {
  text-align: right;
}

/* Pats rating */
.pats-row {
  --pat-size: clamp(48px, 12vw, 64px);
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.pats-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pats-row label {
  --pi-head: var(--pat-off);
  --pi-beard: color-mix(in srgb, var(--pat-off) 70%, var(--ink));
  --pi-ink: var(--ink);
  cursor: pointer;
  width: var(--pat-size);
  height: var(--pat-size);
  display: block;
  position: relative;
  border-radius: 50%;
  transition: transform 0.1s;
}
.pats-row label:hover {
  transform: scale(1.08) rotate(-4deg);
}
.pats-row svg {
  display: block;
  width: var(--pat-size);
  height: var(--pat-size);
  overflow: visible;
}
.pats-row label.on {
  --pi-head: var(--skin);
  --pi-beard: var(--beard);
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.pats-row input:focus-visible + label {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.pats-label {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
}

/* Score strip */
.score-strip {
  display: inline-block;
  min-width: min(100%, 320px);
  margin-bottom: 1.5rem;
  background: var(--yellow);
  color: #1b1a17;
}
.score-strip .label,
.score-strip .note {
  color: #4a4130;
}
.score-strip .big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
  margin: 0;
}
.score-strip .dim {
  font-size: 1.4rem;
  opacity: 0.6;
}
.stat-line {
  font-size: 1.1rem;
  font-weight: 600;
}
.stat-line strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

/* Share */
.share-card {
  max-width: 760px;
}
.share-text {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  background: var(--field);
  border: 2px dashed var(--ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.btn-share {
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
}

/* Certificate */
.cert-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .cert-layout {
    grid-template-columns: minmax(300px, 420px) 1fr;
    align-items: start;
  }
}
#cert-canvas {
  width: 100%;
  height: auto;
  border: var(--border);
  box-shadow: var(--shadow);
  background: #fff7e6;
  border-radius: 6px;
}
.cert-output {
  animation: rise 0.5s ease both;
}

/* Petition */
.petition-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 860px) {
  .petition-layout {
    grid-template-columns: 1fr minmax(240px, 340px);
    gap: 3rem;
  }
}
.petition-photo {
  transform: rotate(3deg);
  max-width: 340px;
  margin: 0 auto;
}
.petition-photo img {
  aspect-ratio: 1;
}

/* Quiz */
.quiz {
  max-width: 760px;
  min-height: 260px;
}
.quiz-progress {
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--field);
  margin-bottom: 1.25rem;
}
.quiz-progress > div {
  height: 100%;
  background: var(--purple);
  transition: width 0.3s ease;
}
.quiz-q {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
}
.quiz-options {
  display: grid;
  gap: 0.6rem;
}
.quiz-option {
  text-align: left;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  padding: 0.85rem 1rem;
}
.quiz-option:hover {
  background: var(--purple-soft);
}
.quiz-step {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.5rem;
}
.quiz-result {
  text-align: center;
  animation: rise 0.5s ease both;
}
.quiz-pct {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(4.5rem, 18vw, 9rem);
  line-height: 0.9;
  color: var(--purple);
  margin: 0.5rem 0 0.25rem;
}
.quiz-tier {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.quiz-risk {
  display: inline-block;
  background: var(--field);
  border: 2px dashed var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: left;
}
.quiz-result .btn-row {
  justify-content: center;
}
.quiz-send {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}
.quiz-send input {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: var(--border);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  min-width: 0;
  flex: 1 1 180px;
}

/* FAQ */
.faq details {
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  padding: 0.95rem 1.1rem;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-weight: 900;
  flex: 0 0 auto;
}
.faq details[open] summary::after {
  content: '–';
}
.faq details p {
  padding: 0 1.1rem 1rem;
  margin: 0;
  color: var(--muted);
}

/* Footer */
.footer {
  border-top: var(--border);
  padding: 3rem 0 2rem;
  text-align: center;
  background: var(--ink);
  color: var(--bg);
}
.footer-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1;
  margin-bottom: 1rem;
}
.footer-title em {
  color: var(--yellow);
}
.footer .small {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Dock */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: var(--border);
}
.dock a {
  flex: 1 1 0;
  max-width: 200px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.95rem;
}
.dock .dock-primary {
  background: var(--yellow);
  color: #1b1a17;
}

/* Confetti + misc */
.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
}
.noscript {
  text-align: center;
  padding: 1rem;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}
.shake {
  animation: shake 0.4s;
}
@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ticker-track {
    animation: none;
    white-space: normal;
    flex-wrap: wrap;
  }
  .toss.celebrate img,
  .status-dot,
  .reveal,
  .cert-output,
  .quiz-result {
    animation: none;
  }
}
