/* QuizGenies public styles. Brand tokens first: change these to re-skin the template. */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #e9ecfb;
  --surface: #ffffff;
  --midnight: #13173a;
  --ink-soft: #3b4170;
  --muted: #5a6085;
  --cobalt: #2d4be0;
  --cobalt-deep: #1f37b8;
  --cobalt-tint: #e2e7ff;
  --grass: #3dbe6a;
  --grass-deep: #1a8443;
  --grass-tint: #dcf5e5;
  --peach: #ffb088;
  --butter: #ffe27a;
  --pink: #ff8fb8;
  --good: #1a8443;
  --bad: #d63a4f;
  --line: rgba(19, 23, 58, 0.12);
  --shadow: 0 14px 34px rgba(19, 23, 58, 0.12);
  --shadow-sm: 0 6px 16px rgba(19, 23, 58, 0.08);
  --radius: 28px;
  --radius-sm: 16px;
  --display: "Fredoka", "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --max: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--midnight);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%232d4be0' fill-opacity='.07'%3E%3Cpath d='M40 20c.5 4.5 2.4 7.7 8.5 9.5-6.1 1.8-8 5-8.5 9.5-.5-4.5-2.4-7.7-8.5-9.5 6.1-1.8 8-5 8.5-9.5Z'/%3E%3Cpath d='M170 120c.4 3.4 1.8 5.8 6.4 7.1-4.6 1.3-6 3.7-6.4 7.1-.4-3.4-1.8-5.8-6.4-7.1 4.6-1.3 6-3.7 6.4-7.1Z'/%3E%3Ccircle cx='110' cy='70' r='2.2'/%3E%3Ccircle cx='60' cy='170' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--midnight); color: #fff; padding: 0.6rem 0.9rem; border-radius: 999px; z-index: 90; }
.skip:focus { top: 1rem; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.emoji, .path-icon { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; line-height: 1; display: inline-block; }
.emoji { font-size: 1.15em; }
.emoji-lg { font-size: 3.4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn .arrow { width: 20px; height: 20px; flex: none; }
.btn .sparkle { width: 16px; height: 16px; fill: var(--butter); flex: none; }
.btn.primary { background: var(--cobalt); color: #fff; box-shadow: 0 4px 0 var(--cobalt-deep); }
.btn.primary:hover { background: #3a58ee; }
.btn.light { background: #fff; color: var(--cobalt); box-shadow: 0 4px 0 rgba(19, 23, 58, 0.25); }
.btn.dark { background: var(--midnight); color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.btn.ghost { background: #fff; color: var(--midnight); box-shadow: inset 0 0 0 2px var(--midnight); }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem max(16px, calc((100% - var(--max)) / 2));
  background: rgba(233, 236, 251, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; flex: none; }
.brand-mark { width: auto; height: 46px; filter: drop-shadow(0 2px 3px rgba(19, 23, 58, 0.18)); }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--cobalt);
  -webkit-text-stroke: 0;
  text-shadow: 0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 4px 10px rgba(19, 23, 58, 0.18);
}
.desk-nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; font-weight: 700; }
.desk-nav a { text-decoration: none; padding: 0.3rem 0; border-bottom: 3px solid transparent; }
.desk-nav a:hover, .desk-nav a[aria-current="page"] { border-bottom-color: var(--grass); }
.cat-menu { position: relative; }
.cat-toggle { display: inline-flex; align-items: center; gap: 0.35rem; border: 0; background: none; padding: 0.3rem 0; font-weight: 700; cursor: pointer; }
.cat-toggle svg { width: 12px; height: 12px; }
.cat-drop {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  min-width: 220px;
  max-height: 70vh;
  overflow: auto;
  padding: 0.4rem;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 60;
}
.cat-drop[hidden], .nav-panel[hidden] { display: none; }
.cat-drop a, .menu-cats a { display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.7rem; border-radius: 10px; text-decoration: none; font-weight: 700; }
.cat-drop a:hover, .cat-drop a[aria-current="page"] { background: var(--cobalt-tint); }
.cat-empty { display: block; padding: 0.55rem 0.7rem; color: var(--muted); }
.top-end { display: flex; align-items: center; gap: 0.6rem; }
.burger { display: none; width: 46px; height: 46px; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--midnight); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.nav-panel {
  position: fixed;
  inset: 70px 12px auto;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 1.1rem;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.menu-links { display: grid; gap: 0.2rem; }
.menu-links a { padding: 0.65rem 0.7rem; border-radius: 12px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.menu-links a[aria-current="page"] { background: var(--cobalt-tint); }
.menu-label { margin: 0.4rem 0 0.2rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.menu-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem; }

/* ---------- home hero ---------- */
.hero { width: min(var(--max), 100% - 32px); margin: 0 auto; padding: clamp(1.8rem, 5vw, 3.4rem) 0 1rem; position: relative; }
.hero-head { text-align: center; max-width: 760px; margin: 0 auto clamp(1.6rem, 4vw, 2.6rem); }
.hero-kicker {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cobalt);
}
.hero-title {
  position: relative;
  display: inline-block;
  margin: 0 0 0.3em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.swoosh { position: relative; white-space: nowrap; }
.swoosh::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 8%;
  bottom: -0.04em;
  height: 0.14em;
  border-radius: 999px;
  background: var(--grass);
  transform: rotate(-1.5deg);
}
.hero-title .sparkle { position: absolute; width: 0.42em; height: 0.42em; right: -0.42em; top: -0.18em; fill: var(--butter); stroke: #fff; stroke-width: 1.5; }
.hero-sub { margin: 0.4em 0 0; font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 700; color: var(--muted); }

.paths { display: grid; grid-template-columns: 1fr minmax(170px, 210px) 1fr; align-items: center; gap: 0; }
.path {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 7px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
}
.path-trivia { background: var(--cobalt); }
.path-personality { background: var(--grass-deep); }
.path h2 { margin: 0; font-size: clamp(2.4rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
.path h2 a { text-decoration: none; }
.path h2 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.path-sub { margin: 0.1rem 0 1rem; font-size: 1.25rem; font-weight: 800; opacity: 0.95; }
.path-icons { display: flex; justify-content: center; gap: clamp(0.6rem, 2vw, 1.4rem); margin-bottom: 1.1rem; }
.path-icon { font-size: clamp(2.8rem, 5vw, 3.8rem); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2)); }
.path-chips { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 1.3rem; }
.path-chip { padding: 0.35rem 0.9rem; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 800; font-size: 0.95rem; }
.path-trivia .path-chip { color: var(--cobalt); }
.path-personality .path-chip { color: var(--grass-deep); }
.path-chip:hover { transform: translateY(-1px); }
.path-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; width: 100%; margin-top: auto; }
.path-count { font-weight: 800; font-size: 1.1rem; }
.hero-genie { position: relative; z-index: 2; width: calc(100% + 50px); max-width: none; margin: 0 -25px; filter: drop-shadow(0 12px 18px rgba(19, 23, 58, 0.2)); justify-self: center; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2rem; list-style: none; margin: clamp(1.4rem, 3vw, 2.2rem) 0 0; padding: 0; font-weight: 800; }
.perks li { display: inline-flex; align-items: center; gap: 0.5rem; }
.perks svg { width: 26px; height: 26px; flex: none; }

/* ---------- quiz shelf ---------- */
.discover { width: min(var(--max), 100% - 32px); margin: clamp(2.4rem, 6vw, 4.2rem) auto 3rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1.5rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); font-weight: 700; }
.shelf-tools { display: flex; gap: 0.7rem; align-items: stretch; margin-bottom: 0.9rem; }
.finder { position: relative; flex: 1; display: flex; align-items: center; min-height: 56px; padding: 0 0.4rem 0 1rem; background: #fff; border-radius: 999px; box-shadow: var(--shadow-sm); }
.finder:focus-within { box-shadow: 0 0 0 3px var(--cobalt), var(--shadow-sm); }
.finder-icon { width: 22px; height: 22px; flex: none; color: var(--muted); }
.finder-field { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.finder input { flex: 1; width: 100%; min-width: 0; padding: 0.8rem 0.7rem; border: 0; background: transparent; font-weight: 700; outline: none; }
.finder input::-webkit-search-cancel-button { cursor: pointer; }
.finder-hint { position: absolute; left: 0.7rem; right: 0.7rem; pointer-events: none; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; }
.finder-field.has-value .finder-hint { visibility: hidden; }
.finder-slot { position: relative; display: inline-grid; overflow: hidden; vertical-align: bottom; }
.finder-word { grid-area: 1 / 1; display: inline-block; transition: transform 0.42s ease, opacity 0.42s ease; }
.finder-word.enter { transform: translateY(100%); opacity: 0; }
.finder-word.leave { transform: translateY(-100%); opacity: 0; }
.finder button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; display: grid; place-items: center; background: var(--cobalt); color: #fff; cursor: pointer; }
.finder button svg { width: 22px; height: 22px; }
.sort { display: flex; }
.sort select { min-height: 56px; padding: 0 2.4rem 0 1.1rem; border: 0; border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.2 6 8l4-3.8' fill='none' stroke='%2313173a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 1rem center / 12px; box-shadow: var(--shadow-sm); font-weight: 800; appearance: none; cursor: pointer; }
.pills { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.2rem 0.1rem 0.6rem; margin-bottom: 0.6rem; scrollbar-width: thin; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem 0.45rem 0.6rem; border: 0; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); font-weight: 800; cursor: pointer; }
.pill.on { background: var(--midnight); color: #fff; }
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.quiz-tile { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.quiz-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.quiz-tile[hidden] { display: none; }
.quiz-tile a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.quiz-art { position: relative; aspect-ratio: 16 / 10; background: var(--cobalt-tint); overflow: hidden; }
.quiz-art > img { width: 100%; height: 100%; object-fit: cover; }
.quiz-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--tile, var(--cobalt)) 22%, #fff); }
.card-kind { position: absolute; left: 0.7rem; top: 0.7rem; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.8rem; font-weight: 800; color: #fff; box-shadow: 0 0 0 3px #fff; }
.card-kind.trivia { background: var(--cobalt); }
.card-kind.personality { background: var(--grass-deep); }
.quiz-tile-body { padding: 0.85rem 1rem 1.1rem; }
.tile-cat { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.tile-cat .emoji { font-size: 1em; }
.quiz-tile h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.quiz-tile.shake { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(0.97); } 60% { transform: scale(1.015); } 100% { transform: scale(1); } }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); font-weight: 700; }

/* ---------- trivia / personality / category pages ---------- */
.kind-intro { width: min(820px, 100% - 32px); margin: clamp(1.6rem, 5vw, 3rem) auto 0; text-align: center; }
.kind-intro h1 { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; font-size: clamp(2.4rem, 7vw, 4rem); }
.kind-trivia .kind-intro h1 { color: var(--cobalt); }
.kind-personality .kind-intro h1 { color: var(--grass-deep); }
.h1-emoji .emoji-lg { font-size: 0.9em; }
.kind-lede { margin: 0 auto; max-width: 620px; font-size: 1.2rem; font-weight: 700; color: var(--muted); }
.kind-shelf { margin-top: 2rem; }
.kind-copy { width: min(760px, 100% - 32px); margin: 0 auto 4rem; color: var(--ink-soft); }
.kind-copy a { color: var(--cobalt); font-weight: 800; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: inherit; gap: 0.45rem; margin-bottom: 1rem; font-size: 0.92rem; font-weight: 700; color: var(--muted); }
.kind-intro .crumbs { justify-content: center; }
.crumbs a { color: var(--cobalt); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- article ---------- */
.article { width: min(760px, 100% - 32px); margin: clamp(1.4rem, 4vw, 2.6rem) auto 0; }
.article h1 { font-size: clamp(2.1rem, 5.5vw, 3.2rem); margin-bottom: 0.4em; }
.crumbs span[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-bottom: 1.4rem; color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.jump { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--butter); color: var(--midnight); text-decoration: none; font-weight: 800; }
.jump .arrow { width: 16px; height: 16px; transform: rotate(90deg); }
.article-hero { width: 100%; border-radius: var(--radius); border: 6px solid #fff; box-shadow: var(--shadow); margin-bottom: 1.6rem; }
.prose { font-size: 1.12rem; line-height: 1.75; color: var(--ink-soft); }
.prose h2 { margin-top: 1.8em; color: var(--midnight); }
.prose h3, .prose h4 { margin-top: 1.5em; color: var(--midnight); }
.prose a { color: var(--cobalt); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose img { width: 100%; border-radius: 22px; border: 5px solid #fff; box-shadow: var(--shadow-sm); margin: 1.6rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.3rem; border-radius: var(--radius-sm); background: #fff; border-left: 6px solid var(--grass); }
.prose .img-slot { margin: 1.6rem 0; }
.prose .img-slot figcaption { font-size: 0.9rem; color: var(--muted); text-align: center; }
.prose .article-note { padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--cobalt-tint); }
.missing-quiz { padding: 1rem; border-radius: var(--radius-sm); background: #fff; text-align: center; font-weight: 700; }

/* ---------- the quiz ---------- */
.embed-quiz { margin: 2rem 0; scroll-margin-top: 90px; }
.trivia { display: grid; gap: 1rem; }
.trivia-q { margin: 0; padding: 1.2rem 1.2rem 1rem; border: 0; border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); min-width: 0; }
.trivia-q legend { float: left; width: 100%; margin-bottom: 0.8rem; padding: 0; font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.3; color: var(--midnight); }
.trivia-q legend + * { clear: left; }
.trivia-opt { position: relative; display: flex; align-items: center; gap: 0.8rem; margin-top: 0.5rem; padding: 0.8rem 1rem; border-radius: 16px; background: var(--bg); font-weight: 700; color: var(--midnight); cursor: pointer; transition: background-color 0.12s ease, box-shadow 0.12s ease; }
.trivia-opt:hover { background: var(--cobalt-tint); }
.trivia-opt input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 50%; border: 2.5px solid var(--midnight); background: #fff; display: grid; place-items: center; cursor: pointer; }
.trivia-opt input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cobalt); transform: scale(0); transition: transform 0.12s ease; }
.trivia-opt input:checked { border-color: var(--cobalt); }
.trivia-opt input:checked::after { transform: scale(1); }
.trivia-opt:not(.good):not(.bad):has(input:checked) { background: var(--cobalt-tint); box-shadow: inset 0 0 0 2px var(--cobalt); }
.trivia-opt input:disabled { cursor: default; }
.trivia-opt.good { background: var(--grass-tint); box-shadow: inset 0 0 0 2px var(--grass-deep); }
.trivia-opt.good input { border-color: var(--grass-deep); }
.trivia-opt.good input::after { background: var(--grass-deep); }
.trivia-opt.good span::after { content: " ✓"; color: var(--grass-deep); }
.trivia-opt.bad { background: #ffe4e8; box-shadow: inset 0 0 0 2px var(--bad); }
.trivia-opt.bad input { border-color: var(--bad); }
.trivia-opt.bad input::after { background: var(--bad); }
.trivia-opt.bad span::after { content: " ✗"; color: var(--bad); }
.trivia-opt.picked { box-shadow: inset 0 0 0 2px var(--cobalt); background: var(--cobalt-tint); }
.trivia-gate { display: grid; gap: 0.6rem; margin-top: 0.4rem; }
.trivia-submit { width: 100%; min-height: 58px; font-size: 1.25rem; }
.error { margin: 0; padding: 0.7rem 1rem; border-radius: 12px; background: #ffe4e8; color: #9b1c2e; font-weight: 700; }
.error[hidden] { display: none; }
.trivia-q.missing { box-shadow: 0 0 0 2px var(--bad), var(--shadow-sm); }
.trivia-q.missing legend { color: var(--bad); }
.trivia-q.missing legend::after { content: "Not answered"; display: block; margin-top: 0.15rem; font-family: var(--body); font-size: 0.8em; font-weight: 800; }
.trivia-missing { margin: 0; padding: 0.85rem 1rem; border-radius: 12px; background: #ffe4e8; border: 1px solid rgba(214, 58, 79, 0.25); color: var(--midnight); font-weight: 700; line-height: 1.45; }
.trivia-missing[hidden] { display: none; }
.trivia-missing strong { color: #9b1c2e; }
.trivia-jump { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: #9b1c2e; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; box-shadow: none; }
.trivia-jump:hover { color: var(--midnight); }
.score-banner { display: grid; gap: 0.3rem; justify-items: center; padding: 1.6rem 1.2rem; border: 7px solid #fff; border-radius: var(--radius); background: var(--cobalt); color: #fff; text-align: center; box-shadow: var(--shadow); }
.score-banner strong { font-family: var(--display); font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1; }
.score-banner span { font-weight: 700; font-size: 1.1rem; }
.persona-result { background: var(--grass-deep); }
.persona-result img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; border: 6px solid #fff; margin-bottom: 0.5rem; }
.persona-result span { max-width: 52ch; }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 1rem 0 0; }
.share-row a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
.share-row svg { width: 22px; height: 22px; fill: currentColor; }
.share-row a.share-fb { color: #1877f2; }
.share-row a.share-x { color: #000; }
.share-row a.share-wa { color: #1fa855; }
.share-row a.share-rd { color: #ff4500; }
.share-row a.share-tg { color: #229ed9; }

/* ---------- more quizzes ---------- */
.more-quizzes { width: min(var(--max), 100% - 32px); margin: 3.5rem auto 4rem; }
.more-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.more-head h2 { margin: 0; }

/* ---------- simple pages ---------- */
.page-narrow { width: min(720px, 100% - 32px); padding: clamp(2rem, 6vw, 3.6rem) 0 4rem; }
.eyebrow { margin: 0 0 0.6rem; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cobalt); }
.lede { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.lede a { color: var(--cobalt); font-weight: 800; }
.about-genie { float: right; width: min(200px, 40%); margin: 0 0 1rem 1.4rem; }
.stack-form { display: grid; gap: 1rem; margin-top: 1.4rem; padding: 1.4rem; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.stack-form label { display: grid; gap: 0.35rem; font-weight: 800; }
.stack-form input, .stack-form textarea { width: 100%; padding: 0.8rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); font-weight: 600; }
.stack-form input:focus, .stack-form textarea:focus { outline: none; border-color: var(--cobalt); background: #fff; }
.stack-form textarea { resize: vertical; }
.stack-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { padding: 0.9rem 1.1rem; border-radius: 14px; background: var(--grass-tint); color: var(--grass-deep); font-weight: 800; }
.missing { text-align: center; }
.missing img { width: 160px; margin: 0 auto 1rem; }
.actions-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }

/* ---------- footer ---------- */
.foot { margin-top: 2rem; padding: 2.6rem 0 2rem; background: var(--midnight); color: #e9ecfb; }
.foot-inner { width: min(var(--max), 100% - 32px); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.6rem; }
.foot-brand p { margin: 0.6rem 0 0; color: #b9bfe6; font-weight: 600; }
.foot .wordmark { color: #fff; text-shadow: none; }
.foot .brand-mark { filter: none; }
.foot-copy { font-size: 0.9rem; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 0.5rem 2.2rem; align-content: start; font-weight: 700; }
.foot-links a { text-decoration: none; color: #e9ecfb; }
.foot-links a:hover { color: var(--butter); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .desk-nav { display: none; }
  .burger { display: inline-flex; }
  .top { justify-content: space-between; }
  .top-cta { display: none; }
  .paths { grid-template-columns: 1fr; gap: 1.1rem; }
  .hero { padding-top: 1.4rem; }
  .hero-head { text-align: left; margin-left: 0; padding-right: 120px; min-height: 150px; }
  .hero-title .sparkle { right: -0.5em; }
  .hero-genie { position: absolute; top: 0.4rem; right: 0; width: 112px; margin: 0; }
  .perks { justify-content: flex-start; gap: 0.6rem 1.2rem; }
  .hero-kicker { padding: 0; background: none; box-shadow: none; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wordmark { font-size: 1.35rem; }
  .brand-mark { height: 38px; }
  .shelf-tools { flex-direction: column; }
  .sort select { width: 100%; min-height: 48px; }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .quiz-tile-body { padding: 0.65rem 0.75rem 0.85rem; }
  .quiz-tile h3 { font-size: 0.98rem; }
  .tile-cat { font-size: 0.75rem; }
  .card-kind { font-size: 0.7rem; left: 0.45rem; top: 0.45rem; }
  .path-foot { justify-content: center; }
  .trivia-q { padding: 1rem 0.85rem 0.85rem; }
  .about-genie { float: none; margin: 0 auto 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- personality quiz: one question at a time ---------- */
/* Before the script takes over, show only the first question of a personality quiz. */
.quiz-mount[data-kind="personality"] .trivia-q ~ .trivia-q,
.quiz-mount[data-kind="personality"] .trivia-gate { display: none; }
.pwiz { padding: clamp(1rem, 3.5vw, 1.6rem); border: 5px solid #fff; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.pwiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 800; font-size: 0.95rem; color: var(--muted); }
.pwiz-count { color: var(--midnight); }
.pwiz-bar { height: 10px; margin: 0.55rem 0 1.2rem; background: var(--bg); border-radius: 999px; overflow: hidden; }
.pwiz-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cobalt), #6b84ff); border-radius: inherit; transition: width 0.35s ease; }
.pwiz-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.pwiz-q.in-right { animation: pwiz-in-right 0.28s ease both; }
.pwiz-q.in-left { animation: pwiz-in-left 0.28s ease both; }
@keyframes pwiz-in-right { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes pwiz-in-left { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.pwiz-prompt { display: block; width: 100%; padding: 0; margin: 0 0 1rem; font-family: var(--display); font-size: clamp(1.3rem, 3.2vw, 1.65rem); font-weight: 700; line-height: 1.25; color: var(--midnight); outline: none; }
.pwiz-options { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 640px) { .pwiz-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pwiz-q.long .pwiz-options { grid-template-columns: 1fr; } }
.pwiz-opt { position: relative; display: flex; align-items: center; gap: 0.75rem; min-height: 3.6rem; padding: 0.8rem 1rem; border-radius: 16px; background: var(--bg); font-weight: 700; line-height: 1.3; color: var(--midnight); cursor: pointer; transition: box-shadow 0.15s ease, background-color 0.15s ease, transform 0.15s ease; -webkit-tap-highlight-color: transparent; }
.pwiz-opt:hover { background: var(--cobalt-tint); }
.pwiz-opt:active { transform: scale(0.99); }
.pwiz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pwiz-key { flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-family: var(--display); font-size: 0.95rem; font-weight: 700; }
.pwiz-opt:has(input:checked) { background: var(--cobalt-tint); box-shadow: inset 0 0 0 2px var(--cobalt); }
.pwiz-opt:has(input:checked) .pwiz-key { background: var(--cobalt); color: #fff; box-shadow: none; }
.pwiz-opt:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.pwiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 1.4rem; }
.pwiz-nav .btn { min-height: 52px; padding: 0.75rem 1.5rem; }
.pwiz-nav .btn.primary { margin-left: auto; }
/* Back and Take it again get the same 4px base as the blue button, so they line up at the same height. */
.pwiz-nav .btn.ghost, .btn.ghost.pwiz-again { box-shadow: inset 0 0 0 2px var(--midnight), 0 4px 0 var(--midnight); }
.pwiz-nav .btn:active, .btn.pwiz-again:active { transform: translateY(3px); }
.pwiz-nav .btn.primary:active { box-shadow: 0 1px 0 var(--cobalt-deep); }
.pwiz-nav .btn.ghost:active, .btn.ghost.pwiz-again:active { box-shadow: inset 0 0 0 2px var(--midnight), 0 1px 0 var(--midnight); }
.pwiz-nav .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.pwiz-nav .btn[hidden] { display: none; }
.pwiz-error { margin: 0.8rem 0 0; }
.pwiz-result { display: block; }
.pwiz-got { color: var(--muted); }
.pwiz-result h3 { margin: 0 0 0.85rem; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.05; color: var(--midnight); }
.prose .pwiz-result-img, .pwiz-result-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 627; object-fit: cover; object-position: center 30%; border: 0; border-radius: 18px; box-shadow: none; margin: 0.2rem 0 1rem; background: var(--bg); }
.pwiz-result p { margin: 0 0 0.9rem; line-height: 1.55; color: var(--ink-soft); }
.pwiz-share-label { display: block; font-weight: 800; font-size: 0.9rem; color: var(--muted); }
.pwiz-result .share-row { justify-content: flex-start; margin: 0.45rem 0 1.1rem; }
.btn.pwiz-again { min-height: 52px; padding: 0.75rem 1.5rem; margin-bottom: 4px; }
.pwiz-next-up { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.pwiz-next-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.pwiz-next-head h4 { margin: 0; font-size: 1.2rem; color: var(--midnight); }
.prose .pwiz-all, .pwiz-all { color: var(--cobalt); font-weight: 800; font-size: 0.95rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pwiz-next-list { display: grid; gap: 0.6rem; }
.prose .pwiz-next-card, .pwiz-next-card { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 0.5rem 0.75rem 0.5rem 0.5rem; border-radius: 16px; background: var(--bg); color: var(--midnight); font-weight: 700; text-decoration: none; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.pwiz-next-card:hover { box-shadow: inset 0 0 0 2px var(--cobalt); transform: translateY(-2px); }
.pwiz-next-media { display: block; aspect-ratio: 1200 / 627; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--cobalt-tint), var(--cobalt)); }
.prose .pwiz-next-media img, .pwiz-next-media img { width: 100%; height: 100%; object-fit: cover; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.pwiz-next-title { font-family: var(--display); font-weight: 600; line-height: 1.25; font-size: 1rem; }
.pwiz-next-go { padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--cobalt); color: #fff; font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
@media (min-width: 720px) {
  .pwiz-next-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prose .pwiz-next-card, .pwiz-next-card { grid-template-columns: 1fr; align-content: start; gap: 0.55rem; padding: 0.5rem 0.5rem 0.75rem; }
  .pwiz-next-title { padding: 0 0.3rem; }
  .pwiz-next-go { justify-self: start; margin-left: 0.3rem; }
}
@media (max-width: 519px) {
  .prose .pwiz-next-card, .pwiz-next-card { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 0.7rem; }
  .pwiz-next-card::after { content: "\203A"; font-size: 1.6rem; font-weight: 900; line-height: 1; color: var(--muted); padding-right: 0.15rem; }
  .pwiz-next-go { display: none; }
  .pwiz-next-title { font-size: 0.95rem; }
}
.pwiz-answers { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.pwiz-answers summary { cursor: pointer; font-weight: 800; color: var(--midnight); }
.pwiz-answers ol { margin: 0.8rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.55rem; font-size: 1rem; }
.pwiz-answers li strong { display: block; color: var(--midnight); }
.pwiz-answers li span { color: var(--muted); }
@media (max-width: 640px) {
  .pwiz { border-width: 3px; border-radius: 22px; }
  .pwiz-opt { min-height: 3.3rem; padding: 0.75rem 0.85rem; }
  .pwiz-nav .btn { flex: 1; }
  .pwiz-nav .btn.primary { flex: 2; }
}
