/* ==========================================================================
   Jokes Unlimited — "midway" theme
   Carnival midway in daylight: seafoam carousel paint, ticket-roll red,
   marquee-bulb gold. The light-bulb marquee is the one loud element;
   everything else is paper tickets on a calm ground.
   ========================================================================== */

:root {
  --sea: #cdefe3;
  --sea-2: #b7e6d5;
  --ink: #1d2340;
  --ink-2: #454f6d;
  --red: #d9342f;
  --red-dark: #a92420;
  --gold: #ffc83d;
  --gold-2: #ffe7a3;
  --pink: #ff9ec4;
  --pink-2: #ffd6e6;
  --paper: #fffdf6;
  --white: #ffffff;

  --display: "Bungee", "Arial Black", Impact, sans-serif;
  --marquee: "Bungee Inline", "Bungee", "Arial Black", Impact, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.889rem;
  --step-0: 1.125rem;
  --step-1: 1.333rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  --step-4: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem);

  --radius: 14px;
  --edge: 2px solid var(--ink);
  --lift: 0 4px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 66ch;
}

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

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

body {
  margin: 0;
  background: var(--sea);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

[hidden] { display: none !important; }

a { color: var(--red-dark); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }

p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; color: var(--white); }

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

.narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* --------------------------------------------------------------------------
   Header: the light-bulb marquee
   -------------------------------------------------------------------------- */

.site-head {
  padding: 22px var(--gutter) 10px;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.marquee {
  --bulb: radial-gradient(circle closest-side, #fffbe8 0 30%, #ffd75e 46% 66%, rgba(255, 200, 61, 0) 74%);
  position: relative;
  display: grid;
  justify-items: center;
  padding: 18px 34px 16px;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--ink);
  text-decoration: none;
  line-height: 0.95;
  isolation: isolate;
}

.marquee__bulbs,
.marquee__bulbs::after {
  position: absolute;
  inset: 4px;
  border-radius: 15px;
  pointer-events: none;
  background:
    var(--bulb) 0 0 / 24px 16px repeat-x,
    var(--bulb) 0 100% / 24px 16px repeat-x,
    var(--bulb) 0 0 / 16px 24px repeat-y,
    var(--bulb) 100% 0 / 16px 24px repeat-y;
}
.marquee__bulbs::after {
  content: "";
  inset: 0;
  background-position: 12px 0, 12px 100%, 0 12px, 100% 12px;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee__bulbs { animation: chase-a 1.1s steps(1) infinite; }
  .marquee__bulbs::after { animation: chase-b 1.1s steps(1) infinite; }
}
@keyframes chase-a { 0% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes chase-b { 0% { opacity: 0; } 50% { opacity: 1; } }

.marquee__word {
  display: block;
  font-family: var(--marquee);
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
  letter-spacing: 0.02em;
}
.marquee__word--top { font-size: clamp(1rem, 0.7rem + 1.2vw, 1.35rem); color: var(--paper); }
.marquee__word--bottom { font-size: clamp(1.7rem, 1rem + 3vw, 2.6rem); }

.site-head.is-home .marquee { padding: 26px 46px 24px; }
.site-head.is-home .marquee__word--top { font-size: clamp(1.2rem, 0.8rem + 1.8vw, 2rem); }
.site-head.is-home .marquee__word--bottom { font-size: clamp(2.2rem, 1rem + 5.5vw, 4.6rem); }

.marquee:hover .marquee__word--bottom { color: var(--gold-2); }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.site-nav a {
  display: block;
  padding: 7px 15px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
}
.site-nav a:hover { background: var(--gold-2); }
.site-nav a[aria-current="page"] { background: var(--gold); }

.site-main { padding: 18px 0 56px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font: 400 1rem/1.1 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--lift);
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s;
}
.btn:hover { background: var(--red-dark); color: var(--white); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--ghost:hover { background: var(--gold-2); color: var(--ink); }
.btn--go { background: var(--gold); color: var(--ink); }
.btn--go:hover { background: #ffb800; color: var(--ink); }
.btn--small { padding: 8px 14px; font-size: 0.82rem; box-shadow: 0 3px 0 var(--ink); }

/* --------------------------------------------------------------------------
   Section headings and ticket-stub cards
   -------------------------------------------------------------------------- */

.section { margin-top: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.section-title { font: 400 var(--step-2)/1.1 var(--display); margin: 0; }
.section-head a { font-weight: 700; }
.section-sub { color: var(--ink-2); margin: -10px 0 18px; }

.tickets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.ticket {
  --notch: var(--sea);
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr 46px;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 12px 0 12px 12px;
  background: var(--paper);
  border: var(--edge);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
}
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  right: 35px;
  width: 20px; height: 20px;
  background: var(--notch);
  border: var(--edge);
  border-radius: 50%;
}
.ticket::before { top: -12px; clip-path: inset(50% -3px -3px -3px); }
.ticket::after { bottom: -12px; clip-path: inset(-3px -3px 50% -3px); }

.ticket__img { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--white); border: 2px solid var(--ink); }
.ticket__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ticket__body { min-width: 0; }
.ticket__title { font: 700 1.08rem/1.25 var(--body); margin: 0 0 3px; }
.ticket__tag { display: block; font-size: var(--step--1); line-height: 1.4; color: var(--ink-2); }
.ticket__stub {
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  border-left: 2px dashed var(--ink);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-left: 0; border-right: 2px dashed var(--ink);
  margin: -12px 0;
  font: 400 0.72rem/1 var(--display);
  letter-spacing: 0.04em;
  color: var(--red);
  white-space: nowrap;
}
.ticket:hover .ticket__stub { background: var(--gold); color: var(--ink); border-radius: 0 0 0 0; }
.ticket:hover .ticket__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: 8px;
}
.hero__lede { font-size: var(--step-1); line-height: 1.5; max-width: 30ch; }
.hero__title { font: 400 var(--step-3)/1.1 var(--display); margin-bottom: 14px; }
.hero__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* The love tester machine (home hero + love calculator page) */
.tester {
  position: relative;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 140px 140px 22px 22px;
  padding: 44px clamp(18px, 4vw, 34px) 26px;
  box-shadow: 0 6px 0 var(--ink);
}
.tester__sign {
  font: 400 clamp(1.35rem, 1rem + 1.5vw, 1.9rem)/1 var(--marquee);
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--ink);
  text-align: center;
  margin: 0 0 6px;
}
.tester__hint { text-align: center; margin: 0 0 18px; font-weight: 700; }
.tester__names { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.tester__heart { font: 400 1.6rem/1 var(--display); color: var(--red); padding-bottom: 10px; }
.field { display: grid; gap: 5px; font-weight: 700; font-size: var(--step--1); }
.field input {
  width: 100%;
  font: 400 1.05rem/1.2 var(--body);
  padding: 11px 12px;
  border: var(--edge);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.field input:focus-visible { outline-offset: 1px; }
.tester__go { display: flex; justify-content: center; margin-top: 18px; }

.meter { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.meter li {
  display: grid; justify-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; text-align: center; line-height: 1.2;
}
.meter li::before {
  content: "";
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
}
.meter li.is-lit::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.45), 0 0 16px 4px rgba(255, 200, 61, 0.7); }

.vault {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.card {
  background: var(--paper);
  border: var(--edge);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 26px);
  box-shadow: 0 3px 0 var(--ink);
}
.card h3 { font: 700 var(--step-1)/1.25 var(--body); }
.card--riddle { background: var(--gold-2); }

.link-list { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 28px; }
.link-list li { break-inside: avoid; padding: 6px 0; border-bottom: 1px dashed rgba(29, 35, 64, 0.25); }
.link-list a { color: var(--ink); font-weight: 700; text-decoration: none; }
.link-list a:hover { color: var(--red-dark); text-decoration: underline; }
.link-list .meta { display: block; font-size: 0.8rem; color: var(--ink-2); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips a, .chip {
  display: inline-block;
  padding: 5px 13px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
}
.chips a:hover { background: var(--gold-2); }
.chips a[aria-current="page"] { background: var(--gold); }
.chips .count { font-weight: 400; color: var(--ink-2); }

/* Photo strip of thumbnails */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 160px), 1fr));
  gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
.strip a {
  display: block;
  background: var(--white);
  padding: 8px 8px 10px;
  border: var(--edge);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 3px 0 var(--ink);
}
.strip img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; margin-bottom: 7px; background: var(--sea-2); }
.strip a:hover { background: var(--gold-2); }

/* --------------------------------------------------------------------------
   Feature pages, quizzes and results
   -------------------------------------------------------------------------- */

.feature-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  max-width: 860px;
  margin: 10px auto 26px;
}
.feature-head__img { width: clamp(84px, 14vw, 120px); height: auto; border: 3px solid var(--ink); border-radius: 18px; background: var(--white); box-shadow: 0 4px 0 var(--ink); }
.feature-head__title { font: 400 var(--step-3)/1.1 var(--display); margin-bottom: 10px; }
.feature-head__intro { margin: 0; color: var(--ink-2); max-width: var(--measure); }

.quiz { max-width: 760px; margin: 0 auto; }
.quiz__progress { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-bottom: 10px; }
.quiz__progress:empty { display: none; }
.bulb {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  transition: background-color 0.25s, box-shadow 0.25s;
}
.bulb.is-on { background: var(--gold); box-shadow: 0 0 10px 2px rgba(255, 200, 61, 0.85); }
.bulb.is-now { background: var(--red); }
.quiz__count { text-align: center; font: 400 0.9rem/1 var(--display); color: var(--red-dark); margin: 0 0 14px; min-height: 1em; }

.q {
  margin: 0 0 18px;
  padding: clamp(18px, 3.5vw, 30px);
  background: var(--paper);
  border: var(--edge);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--ink);
  min-width: 0;
}
.q__text { float: left; width: 100%; padding: 0; margin: 0 0 16px; font: 700 var(--step-1)/1.35 var(--body); }
.q__text + * { clear: both; }
.q__num { font-family: var(--display); font-weight: 400; color: var(--red); margin-right: 4px; }
.q__img { display: block; margin: 0 auto 18px; max-height: 280px; width: auto; border: var(--edge); border-radius: 10px; background: var(--white); }
.q__opts { display: grid; gap: 10px; clear: both; }
.q__field input { width: 100%; font: 400 1.1rem/1.2 var(--body); padding: 12px 14px; border: var(--edge); border-radius: 12px; clear: both; }

.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: block;
  padding: 13px 16px 13px 48px;
  border: var(--edge);
  border-radius: 12px;
  background: var(--white);
  line-height: 1.4;
  position: relative;
}
.opt span::before {
  content: "";
  position: absolute; left: 16px; top: 50%;
  width: 20px; height: 20px; margin-top: -10px;
  border: 2px solid var(--ink); border-radius: 50%;
  background: var(--paper);
}
.opt:hover span { background: var(--gold-2); }
.opt input:checked + span { background: var(--gold); font-weight: 700; }
.opt input:checked + span::before { background: var(--red); box-shadow: inset 0 0 0 4px var(--paper); }
.opt input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 3px; }

.quiz__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.quiz.is-stepping .q { display: none; }
.quiz.is-stepping .q.is-current { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .quiz.is-stepping .q.is-current { animation: deal 0.28s ease-out; }
}
@keyframes deal { from { opacity: 0; transform: translateY(8px) rotate(-0.6deg); } to { opacity: 1; transform: none; } }

/* Prize ticket (results) */
.prize {
  position: relative;
  max-width: 760px;
  margin: 10px auto 0;
  padding: clamp(24px, 5vw, 44px);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink);
  text-align: center;
  outline: 2px dashed var(--red);
  outline-offset: -14px;
}
.prize::before,
.prize::after {
  content: "";
  position: absolute; top: 50%;
  width: 34px; height: 34px; margin-top: -17px;
  background: var(--sea);
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.prize::before { left: -18px; clip-path: inset(-4px -4px -4px 50%); }
.prize::after { right: -18px; clip-path: inset(-4px 50% -4px -4px); }
.prize__head { display: grid; justify-items: center; gap: 10px; margin-bottom: 8px; }
.prize__head img { width: 88px; height: 88px; object-fit: cover; border: var(--edge); border-radius: 14px; background: var(--white); }
.prize__quiz { margin: 0; font-weight: 700; color: var(--ink-2); }
.prize__lead { margin: 14px 0 4px; font-weight: 700; }
.prize__title { font: 400 var(--step-4)/1.05 var(--display); color: var(--red); margin: 0 0 14px; text-wrap: balance; }
.prize__score, .prize__cash { margin: 0 0 6px; }
.prize__cash strong, .prize__pct { font-family: var(--display); font-weight: 400; color: var(--red-dark); }
.prize__pic { display: block; margin: 16px auto 0; max-width: min(400px, 100%); border: var(--edge); border-radius: 12px; background: var(--white); }
.prize__text { max-width: 54ch; margin: 18px auto 0; text-align: left; }
.prize__again { margin: 22px 0 0; }
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

.more { margin-top: 56px; }
.more .section-title { margin-bottom: 18px; }

/* Fortune cookie / slips */
.cookies { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 4vw, 34px); margin: 18px 0 8px; }
.cookie {
  display: grid; justify-items: center; gap: 6px;
  padding: 14px 18px 12px;
  border: var(--edge);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
}
.cookie img { width: 120px; height: auto; }
.cookie:hover { background: var(--gold-2); color: var(--ink); }

.slip {
  max-width: 620px;
  margin: 10px auto 0;
  padding: 26px clamp(20px, 5vw, 46px);
  background: var(--white);
  border: var(--edge);
  border-radius: 4px;
  box-shadow: 0 4px 0 var(--ink);
  text-align: center;
  transform: rotate(-1deg);
}
.slip__label { margin: 0 0 8px; font-weight: 700; color: var(--ink-2); }
.slip__text { font: 400 var(--step-2)/1.3 var(--body); font-style: italic; margin: 0; text-wrap: balance; }
.slip--red .slip__text { color: var(--red-dark); }

.center { text-align: center; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

.namecard {
  max-width: 620px; margin: 0 auto;
}
.namecard .tester__names { grid-template-columns: 1fr 1fr; }

.big-result {
  font: 400 var(--step-4)/1.05 var(--display);
  color: var(--red);
  margin: 6px 0 10px;
  text-wrap: balance;
}

/* Drawn bead strand (for beads whose original picture wasn't archived) */
.strand {
  position: relative;
  width: min(320px, 100%);
  height: 170px;
  margin: 14px auto 0;
}
.strand span {
  /* 22 beads on a hanging loop, open at the top */
  --t: calc(-150deg + var(--i) * 14.2857deg);
  position: absolute;
  left: calc(50% - 13px + 120px * sin(var(--t)));
  top: calc(80px - 13px + 74px * cos(var(--t)));
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.85) 0 18%, var(--c) 34%);
}

.resolutions { text-align: left; max-width: 52ch; margin: 18px auto 0; padding-left: 1.2em; }
.resolutions li { margin-bottom: 10px; }
.resolutions li::marker { font-family: var(--display); color: var(--red); }

.elf-plate {
  display: inline-block;
  padding: 18px 30px;
  background: #1f6f4a;
  border: 3px solid var(--ink);
  border-radius: 12px;
  color: var(--paper);
  font: 400 clamp(1.6rem, 1rem + 3vw, 2.8rem)/1.1 var(--marquee);
  text-shadow: 3px 3px 0 var(--ink);
  box-shadow: inset 0 0 0 5px #e94848, 0 5px 0 var(--ink);
}

/* --------------------------------------------------------------------------
   Jokes, riddles, pictures
   -------------------------------------------------------------------------- */

.page-title { font: 400 var(--step-3)/1.1 var(--display); margin: 10px 0 10px; text-wrap: balance; }
.page-intro { color: var(--ink-2); max-width: var(--measure); margin-bottom: 24px; }

.joke {
  max-width: 760px;
  margin: 0 auto;
}
.joke__body {
  background: var(--paper);
  border: var(--edge);
  border-radius: 18px;
  padding: clamp(20px, 5vw, 40px);
  box-shadow: 0 4px 0 var(--ink);
  font-size: 1.15rem;
  line-height: 1.7;
}
.joke__body p:last-child { margin-bottom: 0; }
.joke__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; }

.riddle-answer {
  margin-top: 20px;
  border: var(--edge);
  border-radius: 14px;
  background: var(--gold-2);
}
.riddle-answer summary {
  cursor: pointer;
  padding: 14px 18px;
  font: 400 1rem/1.2 var(--display);
  list-style: none;
}
.riddle-answer summary::-webkit-details-marker { display: none; }
.riddle-answer summary::before { content: "+ "; color: var(--red); }
.riddle-answer[open] summary::before { content: "\2013  "; }
.riddle-answer > div { padding: 0 18px 16px; font-size: 1.1rem; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 30px; list-style: none; padding: 0; }
.pagination a, .pagination span {
  display: inline-grid; place-items: center;
  min-width: 42px; height: 42px; padding: 0 10px;
  border: var(--edge); border-radius: 10px;
  background: var(--paper); color: var(--ink);
  font-weight: 700; text-decoration: none;
}
.pagination a:hover { background: var(--gold-2); }
.pagination [aria-current="page"] { background: var(--gold); }

.photo {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: var(--edge);
  border-radius: 10px;
  padding: 12px 12px 18px;
  box-shadow: 0 4px 0 var(--ink);
  text-align: center;
}
.photo img { display: block; margin: 0 auto; border-radius: 4px; max-height: 80vh; width: auto; }
.photo figcaption { margin-top: 12px; font-weight: 700; }
/* Only a small thumbnail survived in the archive: show it at 2x in a snug frame. */
.photo--small { width: fit-content; }
.photo--small img { width: 260px; max-width: 100%; }
.photo figcaption p { font-weight: 400; color: var(--ink-2); margin: 6px 0 0; }

.pairs { display: grid; gap: 22px; }
.pair { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 18px; align-items: center; }

.prose { max-width: var(--measure); }
.prose h2 { font: 700 var(--step-1)/1.3 var(--body); margin-top: 1.6em; }

.notice {
  padding: 14px 18px;
  border: var(--edge);
  border-radius: 12px;
  background: var(--pink-2);
  margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   Restored 2004–2010 sections: naughty quizzes, videos, games, sudoku, comment graphics
   -------------------------------------------------------------------------- */

/* Quizzes with separate questions for women and men start with a choice */
.gender-start { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 8px 0 10px; }

/* Purity test pages: checkboxes instead of radio buttons */
.q__hint { clear: both; margin: -6px 0 14px; color: var(--ink-2); font-size: var(--step--1); }
.q--checklist .q__opts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.opt--check span::before { border-radius: 5px; }
.opt--check input:checked + span::before { background: var(--red); box-shadow: inset 0 0 0 3px var(--paper); }

/* Videos: a dark screen that loads YouTube only on Play */
.screen {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: var(--edge);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink);
  overflow: hidden;
}
.screen__play {
  position: absolute; inset: 0;
  display: grid; place-items: center; align-content: center; gap: 18px;
  color: var(--white); text-decoration: none;
  background: radial-gradient(circle at 50% 40%, #2c3560 0%, var(--ink) 70%);
}
.screen__play img { width: 160px; height: auto; border: 3px solid var(--gold); border-radius: 6px; }
.screen__btn {
  font: 400 var(--step-1)/1 var(--display);
  background: var(--red); color: var(--white);
  padding: 14px 26px 12px; border-radius: 999px;
  border: 2px solid var(--gold); box-shadow: 0 4px 0 #000;
}
.screen__play:hover .screen__btn, .screen__play:focus-visible .screen__btn { background: var(--red-dark); }
.screen__play:focus-visible { outline: 4px solid var(--gold); outline-offset: -8px; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen__note { text-align: center; color: var(--ink-2); font-size: var(--step--1); margin: 12px auto 0; max-width: 60ch; }

.strip--wide { grid-template-columns: repeat(auto-fill, minmax(min(46%, 190px), 1fr)); }
.strip--wide img { aspect-ratio: 4 / 3; }

/* Flash games: the original stage size, scaled down to fit */
.arcade {
  max-width: min(100%, calc(var(--w) * 1px + 28px));
  margin: 0 auto;
  padding: 14px;
  background: var(--red);
  border: var(--edge);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink);
}
.arcade__screen {
  aspect-ratio: var(--w) / var(--h);
  background: #000;
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  color: var(--white);
  display: grid; place-items: center;
}
.arcade__screen > ruffle-player, .arcade__screen > ruffle-object { display: block; width: 100%; height: 100%; }

/* Daily sudoku */
.sudoku { max-width: 480px; margin: 0 auto; text-align: center; }
.sudoku__date { margin: 0 0 12px; }
.sudoku__board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 3px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink);
  gap: 1px;
  box-shadow: 0 5px 0 var(--ink);
}
.sudoku__cell {
  width: 100%; aspect-ratio: 1; min-width: 0;
  border: 0; border-radius: 0; padding: 0;
  text-align: center;
  font: 700 clamp(1rem, 4.5vw, 1.5rem)/1 var(--body);
  color: var(--red-dark);
  background: var(--white);
  caret-color: var(--red);
}
/* thicker lines between the 3x3 boxes, drawn inside the cells so every square stays the same size */
.sudoku__cell { --r: 0px; --b: 0px; box-shadow: inset calc(-1 * var(--r)) calc(-1 * var(--b)) 0 var(--ink); }
.sudoku__cell:nth-child(9n + 3), .sudoku__cell:nth-child(9n + 6) { --r: 2px; }
.sudoku__cell:nth-child(n + 19):nth-child(-n + 27), .sudoku__cell:nth-child(n + 46):nth-child(-n + 54) { --b: 2px; }
.sudoku__cell.is-given { color: var(--ink); background: var(--paper); }
.sudoku__cell.is-wrong { background: var(--pink-2); color: var(--red); }
.sudoku__cell:focus { outline: 3px solid var(--gold); outline-offset: -3px; background: var(--gold-2); }
.sudoku__status { min-height: 1.6em; font-weight: 700; margin-top: 14px; }

/* MySpace comment graphics: the copy-and-paste code */
.codebox { margin: 22px auto 0; display: grid; gap: 8px; justify-items: start; }
.codebox label { font-weight: 700; }
.codebox textarea {
  width: 100%;
  font: 400 0.85rem/1.4 ui-monospace, Consolas, monospace;
  padding: 10px 12px;
  border: var(--edge); border-radius: 10px;
  background: var(--white); color: var(--ink);
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-foot {
  background: var(--ink);
  color: #dfe3f2;
  padding: 40px var(--gutter) 30px;
}
.site-foot a { color: var(--white); }
.site-foot a:hover { color: var(--gold); }
.site-foot__inner { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 24px 40px; }
.site-foot__name { font: 400 1.4rem/1 var(--marquee); color: var(--gold); margin-bottom: 8px; }
.site-foot__links { list-style: none; margin: 0; padding: 0; columns: 2 180px; }
.site-foot__links li { padding: 3px 0; }
.site-foot__copy { grid-column: 1 / -1; margin: 10px 0 0; font-size: var(--step--1); color: #aab1cc; }

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

@media (max-width: 820px) {
  .hero, .vault { grid-template-columns: 1fr; }
  .hero__lede { max-width: none; }
  .pair { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .site-head { padding-top: 16px; }
  .marquee, .site-head.is-home .marquee { padding: 16px 22px 14px; }
  .feature-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .tester__names, .namecard .tester__names { grid-template-columns: 1fr; }
  .tester__heart { justify-self: center; padding: 0; }
  .site-foot__inner { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 60px 1fr 40px; gap: 12px; }
  .ticket::before, .ticket::after { right: 29px; }
  .ticket__img { width: 60px; height: 60px; }
}
