/* ─────────────────────────────────────────────────────────────────
   YesList /quiz (layout: quiz).

   Page-specific styles only, fully self-contained (own .nav/.btn/.foot
   base) so it does not depend on site.css being loaded alongside it -
   same pattern as assets/page/home.css. See build.mjs's
   layout === "quiz" branch.

   Same shipped brand palette as home.css.
   ───────────────────────────────────────────────────────────────── */

:root {
  --ground:  #FBF7F4;
  --panel:   #FFFFFF;
  --ink:     #1E1A1B;
  --dim:     #6E6367;
  --line:    #E8DED9;
  --brand:   #A71930;
  --blush:   #FDEEF0;
  --blush-line: #F5D8DD;
  --blush-ink:  #6B4A50;
  --navy:    #03202F;
  --radius:  16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.012em;
  text-wrap: balance;
}

a { color: var(--brand); }
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--brand); color: #fff;
  padding: 10px 16px; border-radius: 8px; text-decoration: none; z-index: 30;
}
.skip:focus { left: 16px; top: 16px; }

/* ── Nav ───────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 16px;
  padding: 20px 44px; max-width: 900px; margin: 0 auto;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 25px; color: var(--ink); text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
}
.logo .wordmark { display: inline-flex; }
.logo span { color: var(--brand); font-style: italic; }
.logo img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 26px; font-size: 14px; }
.nav-links a { color: var(--dim); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-p { background: var(--brand); color: #fff; }
.btn-p:hover { background: #8E1529; }
.btn-p:disabled { background: var(--line); color: var(--dim); cursor: not-allowed; }
.btn-s { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn-s:hover { border-color: #D6C9C3; }

/* ── Layout ────────────────────────────────────────────────────── */
main { max-width: 900px; margin: 0 auto; padding: 0 44px 80px; }

.quiz-intro { padding: 20px 0 32px; text-align: center; }
.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 14px;
}
.quiz-intro h1 {
  font-size: clamp(30px, 5vw, 44px); line-height: 1.08;
  margin: 0 0 18px;
}
.lede {
  font-size: 16.5px; line-height: 1.65; color: var(--dim);
  max-width: 62ch; margin: 0 auto 28px;
}

/* ── Progress ──────────────────────────────────────────────────── */
.progress { max-width: 420px; margin: 0 auto; }
.progress-track {
  height: 8px; border-radius: 4px; background: var(--line); overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%; background: var(--brand);
  border-radius: 4px; transition: width .25s ease;
}
.progress-label { font-size: 12.5px; color: var(--dim); margin: 8px 0 0; }

/* ── Q0 + question fieldsets ──────────────────────────────────── */
fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 20px 22px 22px; margin: 0 0 16px;
  min-width: 0; /* fieldset's UA default is min-width:min-content, which
                   fights width:100% children and is how question text
                   overflowed the box before this rewrite */
}
fieldset.q0 { background: var(--blush); border-color: var(--blush-line); }
legend {
  font-weight: 600; font-size: 13px; padding: 0 4px;
}

/* Category section dividers - rendered once per category group by
   lib/quiz.mjs, between fieldsets rather than inline per-question, so the
   category reads as a heading over several questions rather than a label
   that looks tied to one question's number. */
.qcat-divider {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin: 40px 0 14px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.qcat-divider:first-child { margin-top: 28px; padding-top: 0; border-top: none; }
.qcat-more {
  font-size: 12.5px; color: var(--dim); font-style: italic;
  margin: -6px 0 16px; padding: 0 4px 0 34px;
}

/* Question number sits next to the question's own text, not the category
   label - the category is now a divider above, not part of this row. */
.qhead { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.qnum {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; margin-top: 1px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
}
.qtext-wrap { min-width: 0; flex: 1 1 auto; }
fieldset.q .qtext {
  display: block; width: 100%; font-size: 17px; font-weight: 600;
  line-height: 1.4; color: var(--ink); overflow-wrap: break-word;
}
/* [hidden] is a UA style of specificity 0,1,0 - the .qtext rule above is
   0,2,1 and silently won it, which is what let the inactive man/woman
   variant render and visually overflow the box. This wins outright. */
fieldset.q .qtext[hidden] { display: none; }

.step { margin-top: 16px; }
.step-prompt {
  font-size: 13px; font-weight: 600; color: var(--dim); margin: 0 0 8px;
}
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts[hidden] { display: none; }
.opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--ground); font-size: 13.5px; cursor: pointer;
}
.opt:has(input:checked) {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.opt input { accent-color: var(--brand); }

/* ── Result ────────────────────────────────────────────────────── */
.result {
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line);
  text-align: center; transition: opacity .3s ease;
}
.result.teaser { opacity: .45; filter: blur(1.5px); pointer-events: none; }
.result-note {
  font-size: 15.5px; line-height: 1.6; color: var(--dim);
  max-width: 52ch; margin: 0 auto 28px;
}

.result-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 12px; }

/* ── Footer ────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding: 26px 44px; max-width: 900px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 10px 24px; font-size: 13px; color: var(--dim);
}
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .fl { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── 18+ gate scrim ────────────────────────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(30, 26, 27, .72);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate[hidden] { display: none; }
.gate-card {
  background: var(--panel); border-radius: var(--radius);
  padding: 32px 28px; max-width: 380px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.gate-card h2 { font-size: 20px; margin: 0 0 12px; }
.gate-card p { font-size: 14.5px; color: var(--dim); margin: 0 0 22px; line-height: 1.55; }
.gate-btns { display: flex; flex-direction: column; gap: 10px; }
body.gate-open { overflow: hidden; }

/* ── Narrow screens ────────────────────────────────────────────── */
@media (max-width: 620px) {
  .nav, main, .foot { padding-left: 22px; padding-right: 22px; }
  .nav-links { display: none; }
  .result-cta { flex-direction: column; align-items: stretch; }
}
