/* What Most People Say: static answer pages (majoritygame.com/answers).
   Same tokens, fonts and cartoon style as the game in src/index.css. */

:root {
  --yellow: #f9c51f;
  --hero-yellow: #ffce1d;
  --ink: #16191c;
  --bg: #efece3;
  --text: #16191c;
  --muted: rgba(22, 25, 28, 0.62);
  --muted-2: rgba(22, 25, 28, 0.45);
  --surface: #eae6da;
  --panel: #f7f4eb;
  --paper: #fffdf6;
  --line: rgba(22, 25, 28, 0.14);
  --dark: #15181b;
  --dark-text: #ece8dc;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='%231d262d' stroke-opacity='0.065' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M70 96c34-38 118-42 148-4s-6 84-62 82-120-40-86-78z'/%3E%3Cpath d='M410 60c60-24 150 10 138 66s-96 62-150 30-48-72 12-96z'/%3E%3Cpath d='M60 330c-30 50 18 108 84 100s96-70 60-112-114-38-144 12z'/%3E%3Cpath d='M360 300c22-44 118-52 158-14s16 96-46 104-134-46-112-90z'/%3E%3Cpath d='M170 520c40-34 130-26 148 16s-40 78-104 66-84-48-44-82z'/%3E%3Cpath d='M470 480c50-20 130 6 122 58s-90 60-136 26-36-64 14-84z'/%3E%3C/g%3E%3C/svg%3E");
}


* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--doodle);
  background-size: 640px 640px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Header ---- */

.site-head {
  padding: 18px 0 8px;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

a.logo,
a.brand__section {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

a.logo:hover { transform: rotate(-2deg) scale(1.03); }
a.brand__section { color: var(--ink); }
a.brand__section:hover { transform: rotate(0deg) translateY(-1px); background: #ffe066; }

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.logo__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.logo__badge {
  margin-top: -6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: rotate(-4deg);
  box-shadow: 0 4px 10px rgba(22, 25, 28, 0.14);
  white-space: nowrap;
}

.brand__section {
  padding: 5px 11px;
  border: 2px solid var(--ink);
  border-radius: 10px 12px 9px 11px;
  background: var(--hero-yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 0 var(--ink);
  transform: rotate(-2deg);
}

.head-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}


/* ---- Breadcrumbs ---- */

.crumbs {
  margin: 14px 0 6px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---- Cards ---- */

.card {
  position: relative;
  margin: 16px 0;
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 60px -28px rgba(22, 25, 28, 0.35);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 { font-size: clamp(28px, 6.4vw, 40px); margin: 0 0 14px; }
h2 { font-size: clamp(21px, 4.4vw, 26px); margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }

.lede {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.55;
}

.lede strong {
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(255, 206, 29, 0.55);
}

.meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

.results {
  margin: 18px 0 4px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 14px 8px 8px;
  border: 2px solid var(--line);
  border-radius: 14px 16px 13px 15px;
  background: var(--panel);
  overflow: hidden;
}

.bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: rgba(255, 206, 29, 0.32);
  pointer-events: none;
}

.bar > *:not(.bar__fill) { position: relative; }

.bar__rank {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 9px 10px 8px 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.bar__label {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.bar__pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bar__pct small {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
}

.bar--top {
  border: 2.5px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-0.6deg);
  min-height: 56px;
  color: var(--ink);
}

.bar--top .bar__fill { background: var(--hero-yellow); }
.bar--top .bar__rank { background: var(--ink); color: var(--hero-yellow); }
.bar--top .bar__label { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.bar--top .bar__pct small { color: rgba(22, 25, 28, 0.6); }

.bar--other { border-style: dashed; color: var(--muted); }
.bar--other .bar__fill { background: rgba(22, 25, 28, 0.06); }

/* ---- Media ---- */

.figure {
  margin: 4px auto 18px;
  max-width: 340px;
  padding: 8px 8px 20px;
  border: 2.5px solid var(--ink);
  border-radius: 14px 16px 13px 17px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
  transform: rotate(-2deg);
}

.figure img { border-radius: 8px; border: 2px solid var(--ink); width: 100%; height: auto; }
.figure figcaption { margin-top: 8px; font-size: 11px; text-align: center; color: rgba(22, 25, 28, 0.6); }

.song {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 18px;
  padding: 12px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 20px 24px 19px 23px;
  background: #1b1e22;
  color: var(--dark-text);
  box-shadow: 0 5px 0 var(--ink);
  transform: rotate(-1deg);
}

.song img { width: 64px; height: 64px; border-radius: 10px; }
.song strong { display: block; font-family: var(--font-display); font-size: 17px; }
.song span { font-size: 13px; color: rgba(236, 232, 220, 0.7); }
.song a { color: var(--hero-yellow); font-size: 12px; font-weight: 600; }

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

.play {
  margin: 22px 0;
  padding: 24px;
  border: 2.5px solid var(--ink);
  border-radius: 26px 30px 25px 29px;
  background: var(--dark);
  color: var(--dark-text);
  box-shadow: 0 6px 0 var(--ink);
}

.play h2 { color: #fff; margin-bottom: 6px; }
.play p { margin: 0 0 16px; color: rgba(236, 232, 220, 0.8); }

.play__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--hero-yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 0 #000;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translateY(-1px) rotate(-1deg); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }

.btn--ghost {
  background: transparent;
  color: var(--dark-text);
  border-color: rgba(236, 232, 220, 0.4);
  box-shadow: none;
}

/* ---- Prose & facts ---- */

.prose p { margin: 0 0 12px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 4px;
}

.fact {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.fact b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
}

.fact span { font-size: 12px; color: var(--muted); }

/* ---- Lists of questions ---- */

.qlist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.qlist a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 16px 18px 15px 17px;
  background: var(--panel);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.qlist a:hover { border-color: var(--ink); transform: translateY(-2px) rotate(-0.4deg); }
.qlist strong { font-family: var(--font-display); font-size: 16px; line-height: 1.25; }
.qlist span { font-size: 13px; color: var(--muted); }
.qlist em { font-style: normal; font-weight: 700; color: var(--text); }

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

.topics a {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
}

.topics a:hover { background: var(--hero-yellow); }
.topics a[aria-current="page"] { background: var(--hero-yellow); }

/* ---- Hero (index) ---- */

.hero {
  margin: 18px 0;
  padding: 30px 26px;
  border: 2.5px solid var(--ink);
  border-radius: 30px 34px 29px 33px;
  background: var(--hero-yellow);
  color: var(--ink);
  box-shadow: 0 6px 0 var(--ink);
}

.hero h1 { margin-bottom: 10px; }
.hero p { margin: 0 0 16px; font-size: 18px; }
.hero .btn { background: var(--ink); color: var(--hero-yellow); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 18px;
  font-size: 14px;
}

.stats b { font-family: var(--font-display); font-size: 22px; display: block; line-height: 1.1; }

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

.site-foot {
  margin: 30px 0 0;
  padding: 24px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.site-foot a { text-decoration: none; font-weight: 600; color: var(--text); }
.site-foot a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .card, .play { padding: 20px 18px; border-radius: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .qlist { grid-template-columns: 1fr; }
  .brand__section { display: none; }
  .lede { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .qlist a { transition: none; }
}
