@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f3ecd9;
  --card: #fffaf0;
  --ink: #16291d;
  --ink-soft: #4d5c51;
  --real: #1c7c54;
  --real-dark: #145c3e;
  --opinion: #e2522b;
  --opinion-dark: #b83d1c;
  --gold: #f0b429;
  --line: 2.5px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(22, 41, 29, .09) 1px, transparent 1.2px);
  background-size: 18px 18px;
}

a { color: inherit; }

.app {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px 8px;
  padding-top: max(18px, env(safe-area-inset-top));
}

.screen { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Logo ---------- */

.logo {
  margin: 4vh 0 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3.3rem, 17vw, 5.4rem);
  line-height: .86;
  letter-spacing: -.035em;
  text-align: center;
}
.logo span { display: block; }
.logo-real { color: var(--real); }
.logo-opinion { color: var(--opinion); }
.logo-or { font-style: italic; font-weight: 500; }
.logo .logo-or {
  font-size: .42em;
  line-height: 1.1;
  margin: .1em 0 .02em;
  transform: rotate(-6deg);
}
.logo .logo-opinion { transform: rotate(-2deg); }

.mini-logo {
  display: inline-block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}

.lede {
  margin: 22px auto 0;
  max-width: 24em;
  text-align: center;
  font-size: 1.08rem;
  text-wrap: balance;
}

/* ---------- Start: fanned teaser cards ---------- */

.fan {
  position: relative;
  height: clamp(172px, 45vw, 236px);
  margin: 28px 0 8px;
  --fw: clamp(108px, 29.5vw, 164px);
}
.fan-card {
  position: absolute;
  left: 50%;
  top: 6px;
  width: var(--fw);
  margin-left: calc(var(--fw) / -2);
  padding: 6px 6px 8px;
  background: var(--card);
  border: var(--line);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  text-align: center;
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.2);
}
.fan-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  background: #d9d2bd;
}
.fan-card b {
  display: block;
  margin-top: 7px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.8rem, 3.5vw, 1rem);
  line-height: 1.1;
  min-height: 2.2em;
  display: grid;
  place-items: center;
  text-wrap: balance;
}
.fan-card:nth-child(1) { transform: translateX(-103%) rotate(-7deg); }
.fan-card:nth-child(2) { transform: translateX(103%) translateY(6px) rotate(6deg); }
.fan-card:nth-child(3) { transform: translateY(20px) rotate(-1.5deg); z-index: 2; }
.fan-card .q {
  position: absolute;
  top: -13px;
  right: -9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: var(--line);
  border-radius: 50%;
  background: var(--gold);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.1rem;
}

.challenge {
  margin: 18px auto 0;
  padding: 10px 14px;
  max-width: 24em;
  border: var(--line);
  border-radius: 12px;
  background: var(--gold);
  font-weight: 600;
  text-align: center;
  text-wrap: balance;
}

.best { margin: 14px 0 0; text-align: center; color: var(--ink-soft); font-size: .95rem; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 58px;
  padding: 12px 20px;
  border: var(--line);
  border-radius: 14px;
  --sh: var(--ink);
  box-shadow: 5px 5px 0 var(--sh);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--card);
  background: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--sh); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--sh); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.btn-real { background: var(--real); }
.btn-real:hover { background: var(--real-dark); }
.btn-opinion { background: var(--opinion); }
.btn-opinion:hover { background: var(--opinion-dark); }
.btn-go { background: var(--ink); width: 100%; --sh: var(--gold); }
.btn-plain { background: var(--card); color: var(--ink); font-size: 1.05rem; min-height: 50px; }
.btn-sub { font-family: var(--body); font-weight: 600; font-size: .78rem; opacity: .8; letter-spacing: .02em; }
.btn kbd {
  display: none;
  font: 700 .7rem var(--body);
  padding: 2px 6px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  opacity: .75;
}
@media (hover: hover) and (pointer: fine) { .btn kbd { display: inline-block; } }

#start .btn-go { margin-top: 22px; font-size: 1.6rem; min-height: 68px; flex-direction: column; gap: 2px; }

/* ---------- Play ---------- */

.topbar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.counter { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.pips {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin: 10px 0 14px;
  padding: 0;
  list-style: none;
}
.pips li {
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
  transition: background-color .25s;
}
.pips li.now { background: var(--gold); }
.pips li.right { background: var(--real); }
.pips li.wrong { background: var(--opinion); }

.card {
  background: var(--card);
  border: var(--line);
  border-radius: 20px;
  box-shadow: 7px 7px 0 var(--ink);
  padding: 10px 10px 14px;
}
.card.enter { animation: deal .4s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes deal { from { opacity: 0; transform: translateY(18px) rotate(-2.5deg); } }

.photo {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #d9d2bd;
  aspect-ratio: 4 / 3;
}
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.stamp {
  position: absolute;
  /* low in the frame, so it doesn't sit on the animal's face */
  left: 50%;
  top: 80%;
  padding: .12em .45em .16em;
  border: .13em solid currentColor;
  border-radius: .25em;
  outline: .05em solid currentColor;
  outline-offset: .09em;
  background: rgba(255, 250, 240, .9);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.5rem, 8vw, 2.4rem);
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-8deg);
  animation: stamp .32s cubic-bezier(.3, 1.6, .5, 1) both;
}
.stamp.is-real { color: var(--real); }
.stamp.is-opinion { color: var(--opinion); }
@keyframes stamp {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-20deg) scale(2.6); }
}

.plate { text-align: center; padding: 12px 6px 0; }
.plate-label {
  margin: 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.plate-name {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 8.4vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.plate-name.struck { text-decoration: line-through; text-decoration-color: var(--opinion); text-decoration-thickness: .09em; }
.plate-actual { margin: 6px 0 0; font-size: 1.02rem; }
.plate-actual i { font-family: var(--display); }
.plate-actual b { font-family: var(--display); font-weight: 800; font-size: 1.15em; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.choices .btn { min-height: 72px; font-size: clamp(1.25rem, 5.6vw, 1.6rem); }

.reveal { margin-top: 18px; animation: rise .3s ease both; }
.verdict {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1.1;
}
.verdict.right { color: var(--real); }
.verdict.wrong { color: var(--opinion); }
.fact { margin: 6px 0 16px; font-size: 1.05rem; }
.fact a { font-weight: 600; white-space: nowrap; }
.photo-credit {
  margin: 14px 0 0;
  font-size: .74rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* ---------- Result ---------- */

#result { text-align: center; }
.scorecard {
  margin-top: 14px;
  padding: 18px 16px 20px;
  background: var(--card);
  border: var(--line);
  border-radius: 20px;
  box-shadow: 7px 7px 0 var(--ink);
}
.score {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(5rem, 28vw, 7.5rem);
  line-height: .9;
  letter-spacing: -.04em;
}
.score-of { font-size: .38em; letter-spacing: 0; color: var(--ink-soft); }
.rank-label {
  margin: 14px 0 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.rank {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  line-height: 1.05;
  color: var(--opinion);
  text-wrap: balance;
}
.rank-note { margin: 6px 0 0; color: var(--ink-soft); text-wrap: balance; }
.grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 340px; margin: 16px auto 0; }
.grid span { aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 6px; }
.grid .right { background: var(--real); }
.grid .wrong { background: var(--opinion); }
.versus {
  display: inline-block;
  margin: 14px 0 0;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--gold);
  font-weight: 700;
  font-size: .95rem;
}

.share { margin-top: 30px; }
.share-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.share-note { margin: 4px 0 14px; color: var(--ink-soft); font-size: .95rem; }
.share-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.share-main .btn-go { grid-column: 1 / -1; }
.share-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip {
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.chip:hover { background: var(--ink); color: var(--card); }
.toast { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; color: var(--real); }

.btn-again { width: 100%; margin-top: 12px; flex-direction: column; gap: 2px; }

.review-title {
  margin: 36px 0 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  text-align: left;
}
.review { margin: 0; padding: 0; list-style: none; text-align: left; }
.review li {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 2px dotted rgba(22, 41, 29, .35);
}
.review img {
  display: block;
  width: 76px;
  height: 57px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #d9d2bd;
}
.review .r-name { font-family: var(--display); font-weight: 700; font-size: 1.08rem; line-height: 1.15; }
.review .r-name.struck { text-decoration: line-through; text-decoration-color: var(--opinion); }
.review .r-sub { font-size: .86rem; color: var(--ink-soft); line-height: 1.3; }
.review .r-sub a { font-weight: 600; }
.tag {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--card);
  vertical-align: 1px;
}
.tag.is-real { background: var(--real); }
.tag.is-opinion { background: var(--opinion); }
.review .r-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
  color: var(--card);
}
.r-mark.right { background: var(--real); }
.r-mark.wrong { background: var(--opinion); }

/* ---------- Footer & credits ---------- */

.foot {
  padding: 26px 18px max(22px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
}
.foot p { margin: 2px 0; }

.credits h1 { font-family: var(--display); font-weight: 900; font-size: 2.2rem; line-height: 1; margin: 18px 0 8px; }
.credits p { margin: 0 0 12px; }
.credits ul { margin: 18px 0 0; padding: 0; list-style: none; }
.credits li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 2px dotted rgba(22, 41, 29, .35);
  font-size: .9rem;
  overflow-wrap: anywhere;
}
.credits li img { width: 76px; height: 57px; object-fit: cover; border: 2px solid var(--ink); border-radius: 8px; }
.credits li b { font-family: var(--display); font-size: 1.05rem; }

@media (min-width: 560px) {
  .app { padding-top: 30px; }
  .logo { margin-top: 0; font-size: 4.7rem; }
  .fan { --fw: 150px; height: 208px; margin-top: 22px; }
}

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