:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --text: #1f2430;
  --muted: #5f6675;
  --border: #e3ded3;
  --accent: #d9480f;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e8;
  --ok: #2b8a3e;
  --bad: #c92a2a;
  --ad-bg: #efebe2;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171c;
    --panel: #1e2128;
    --text: #eceef2;
    --muted: #a3a9b6;
    --border: #2e323b;
    --accent: #ff7a3d;
    --accent-ink: #15171c;
    --accent-soft: #2a1f19;
    --ok: #51cf66;
    --bad: #ff6b6b;
    --ad-bg: #23262d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  padding-bottom: 110px; /* room for the bottom anchor ad */
}
a { color: inherit; }
h1, h2 { line-height: 1.15; letter-spacing: -0.02em; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--panel); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 800; text-decoration: none; font-size: 19px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-top: 20px; padding-bottom: 20px; }
.site-footer p { margin: 6px 0; }

/* ads: reserved space prevents layout shift */
.ad-wrap { margin: 14px auto 0; text-align: center; }
.ad-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad { margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.ad-intro_top, .ad-ready_top, .ad-result_top { min-height: 250px; }
.ad-question_top { min-height: 100px; }
.ad-result_middle { min-height: 250px; margin-top: 8px; }
@media (min-width: 768px) {
  .ad-intro_top, .ad-ready_top, .ad-result_top, .ad-question_top { min-height: 90px; }
  .ad-result_middle { min-height: 280px; }
}
.ad-placeholder {
  width: 100%; max-width: 728px; min-height: inherit;
  border: 2px dashed var(--border); background: var(--ad-bg); border-radius: 10px;
  color: var(--muted); font: 12px/1.4 ui-monospace, Menlo, monospace; padding: 8px;
}
.anchor-placeholder {
  position: fixed; left: 0; right: 0; bottom: 0; height: 60px; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--ad-bg); border-top: 2px dashed var(--border);
  color: var(--muted); font: 12px ui-monospace, Menlo, monospace;
}

/* hero / intro */
.hero { text-align: center; padding: 28px 0 8px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(30px, 7vw, 46px); margin: 10px 0 10px; }
.lede { color: var(--muted); font-size: 18px; margin: 0 auto 22px; max-width: 560px; }
.prose { margin-top: 20px; }
.prose p { margin: 0 0 14px; }
.section-title { font-size: 22px; margin: 40px 0 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 0; padding: 12px 22px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn-xl { font-size: 20px; padding: 18px 34px; min-width: min(100%, 320px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(217, 72, 15, .25); }
.btn-secondary { background: var(--text); color: var(--bg); }
.btn-ghost { background: transparent; border: 2px solid var(--border); color: var(--text); }

/* question */
.quiz-step { padding-top: 22px; }
.topline { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.topline span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.progress { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 8px 0 22px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.question { font-size: clamp(24px, 5.5vw, 34px); margin: 0 0 22px; }
/* answers: big tap targets, generous gaps, far from any ad slot */
.answers { display: grid; gap: 12px; }
.answer {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 16px;
  background: var(--panel); border: 2px solid var(--border); border-radius: var(--radius);
  text-decoration: none; font-size: 19px; font-weight: 600;
  transition: border-color .12s, transform .12s;
}
.answer:hover { border-color: var(--accent); }
.answer.is-picked { border-color: var(--accent); background: var(--accent-soft); transform: scale(.99); }
.answer-key {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 800;
}

/* ready */
.ready { text-align: center; padding: 36px 0 10px; }
.ready-icon { font-size: 54px; }
.ready h1 { font-size: clamp(28px, 6vw, 40px); margin: 8px 0; }
.reward-note { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.skip { color: var(--muted); font-size: 14px; }

/* result */
.result { text-align: center; padding-top: 26px; }
.result h1 { font-size: clamp(30px, 7vw, 44px); margin: 8px 0 6px; }
.result .prose { text-align: left; }
.score { font-size: 56px; font-weight: 900; color: var(--accent); margin: 10px 0 0; line-height: 1; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 6px; }
.traits { padding-left: 20px; }
.traits li { margin-bottom: 6px; }
.review { padding-left: 0; list-style: none; }
.review-item { background: var(--panel); border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.review-item.is-right { border-left-color: var(--ok); }
.review-item.is-wrong { border-left-color: var(--bad); }
.review-q { font-weight: 700; margin: 0 0 4px; }
.review-a, .review-x { margin: 0; font-size: 15px; }
.review-x { color: var(--muted); margin-top: 4px; }
.your-answer { display: block; }
.is-right .your-answer { color: var(--ok); }
.is-wrong .your-answer { color: var(--bad); }

/* cards */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.card:hover { border-color: var(--accent); }
.card-emoji { font-size: 28px; }
.card-title { font-weight: 800; line-height: 1.25; }
.card-sub { color: var(--muted); font-size: 14px; }

/* legal */
.legal h1 { font-size: 32px; }
.legal h2 { font-size: 20px; margin-top: 26px; }

/* demo rewarded (placeholder mode only) */
.demo-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .78); display: grid; place-items: center; padding: 16px; }
.demo-modal-box { background: var(--panel); border-radius: 18px; padding: 28px 22px; max-width: 380px; width: 100%; text-align: center; }
.demo-modal-box small { color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.demo-modal-box .count { font-size: 44px; font-weight: 900; color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 999px; font-size: 14px; z-index: 120; }

/* ---- articles & categories ---- */
.site-header nav { display: flex; gap: 14px; }
.article h1 { font-size: clamp(28px, 6.5vw, 42px); line-height: 1.15; margin: 10px 0 10px; }
.article .lede { margin: 0 0 10px; text-align: left; max-width: none; }
.byline { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.prose h2 { font-size: 24px; margin: 30px 0 10px; line-height: 1.25; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 0 0 6px; }
.prose blockquote { margin: 0 0 14px; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.prose a:not(.btn) { color: var(--accent); }
.prose .ad-wrap { margin: 22px 0; }
.quiz-box { margin: 26px 0; padding: 18px; border: 2px solid var(--accent); border-radius: 16px; background: var(--panel); }
.quiz-box-title { font-size: 20px; font-weight: 800; line-height: 1.25; margin: 6px 0 6px; }
.quiz-box .btn { margin-top: 12px; }
.more { margin: 14px 0 0; }
.more a { color: var(--accent); font-weight: 700; }
.brand { white-space: nowrap; }
@media (max-width: 420px) {
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 14px; }
  .brand { font-size: 17px; }
}
