:root {
  --ink: #1e1b16;
  --muted: #6b6258;
  --paper: #f7f3ec;
  --card: #fffdf9;
  --line: #e4ddd0;
  --accent: #7a5cff;
  --accent-deep: #4f3bcc;
  --angel: #2f9e72;
  --devil: #c0392b;
  --gold: #b8893b;
  --shadow: 0 10px 40px rgba(40, 30, 10, 0.08);
  --maxw: 760px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 18px;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.12; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-top: 2.6em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
a { color: var(--accent-deep); }
strong { font-weight: 600; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Header / footer */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; margin: 0 auto; padding: 18px 22px;
}
.brand { font-family: "Fraunces", serif; font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.site-header nav a { margin-left: 20px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 34px 22px 60px; text-align: center; }
.site-footer .disclaimer { max-width: 620px; margin: 0 auto 14px; color: var(--muted); font-size: 0.86rem; }
.foot-nav a { margin: 0 10px; color: var(--muted); font-size: 0.86rem; }
.copy { color: var(--muted); font-size: 0.8rem; margin-top: 10px; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1.05rem; padding: 16px 30px; border-radius: 14px;
  border: none; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-lg { font-size: 1.15rem; padding: 19px 40px; }
.btn-block { display: block; width: 100%; }
.cta-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Hero */
.hero { text-align: center; padding: 40px 0 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; font-weight: 600; color: var(--accent-deep); margin-bottom: 14px; }
.hero p.lede { font-size: 1.22rem; color: var(--muted); max-width: 620px; margin: 0 auto 26px; }
.trust-row { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 30px 0 0; color: var(--muted); font-size: 0.85rem; }
.trust-row span::before { content: "✓ "; color: var(--angel); font-weight: 700; }

/* Content sections */
.prose { padding-top: 10px; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 20px 24px; margin: 1.6em 0; box-shadow: var(--shadow); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 1.8em 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; }
.stat .num { font-family: "Fraunces", serif; font-size: 2rem; color: var(--accent-deep); font-weight: 700; }
.stat .lbl { font-size: 0.86rem; color: var(--muted); }
.refs { font-size: 0.85rem; color: var(--muted); }
.refs li { margin-bottom: 0.7em; }
sup a { text-decoration: none; }

/* Quiz funnel */
.quiz { max-width: 640px; margin: 30px auto; padding: 0 18px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.progress-label { text-align: center; font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow); }
.q-facet { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 600; color: var(--accent-deep); margin-bottom: 12px; }
.q-text { font-family: "Fraunces", serif; font-size: 1.45rem; line-height: 1.25; margin-bottom: 22px; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 16px; font: inherit; font-size: 1rem; color: var(--ink); cursor: pointer; transition: border-color .1s, background .1s; }
.opt:hover { border-color: var(--accent); }
.opt.selected { border-color: var(--accent); background: #f1edff; }
.opt .dot { width: 18px; height: 18px; border-radius: 99px; border: 2px solid var(--line); flex: 0 0 auto; }
.opt.selected .dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); margin: 2px 2px 6px; }
.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.q-back { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.9rem; }
.q-back:disabled { opacity: 0.3; cursor: default; }

/* Email gate */
.gate { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow); text-align: center; }
.gate h2 { margin-top: 0; }
.gate .lock { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.gate input:not([type=checkbox]), .gate select { width: 100%; padding: 15px 16px; font-size: 1.05rem; border: 1.5px solid var(--line); border-radius: 12px; margin: 8px 0; font-family: inherit; background: #fff; color: var(--ink); box-sizing: border-box; }
.gate input:focus, .gate select:focus { outline: none; border-color: var(--accent); }
.gate .field-row { display: flex; gap: 10px; }
.gate .field-row select { flex: 2; }
.gate .field-row input[type=number] { flex: 1; }
.consent { font-size: 0.8rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; text-align: left; margin: 12px 0; }
.form-msg { font-size: 0.9rem; margin-top: 12px; min-height: 1.2em; }
.form-msg.err { color: var(--devil); }
.form-msg.ok { color: var(--angel); }
.hidden { display: none !important; }

/* Results / angel-devil scale */
.result-hero { text-align: center; padding-top: 20px; }
.confidential-tag { display: inline-block; background: #fbeee9; color: var(--devil); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
.spectrum { position: relative; height: 64px; margin: 40px 0 12px; border-radius: 99px;
  background: linear-gradient(90deg, var(--angel) 0%, #e9d9a6 50%, var(--devil) 100%); box-shadow: var(--shadow); }
.spectrum .marker { position: absolute; top: -14px; transform: translateX(-50%); transition: left .6s cubic-bezier(.2,.8,.2,1); }
.spectrum .marker .pin { width: 4px; height: 92px; background: var(--ink); margin: 0 auto; border-radius: 4px; }
.spectrum .marker .bubble { background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; white-space: nowrap; margin-bottom: 4px; }
.spectrum-ends { display: flex; justify-content: space-between; font-size: 1.6rem; }
.spectrum-ends .lbl { font-size: 0.8rem; color: var(--muted); font-family: "Inter"; }
.facet-bars { margin: 34px 0; }
.facet-bar { margin-bottom: 16px; }
.facet-bar .top { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; }
.facet-bar .track { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.facet-bar .fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s ease; }

/* FAQ accordion */
.faq { margin: 18px 0 8px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; font-family: "Fraunces", Georgia, serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Statistics page: animated per-question answer charts */
.stats-n { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 6px auto 30px; max-width: 560px; }
.stat-facet { margin: 40px 0 8px; }
.stat-facet-title { font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; margin: 0 0 2px; }
.stat-facet-blurb { color: var(--muted); margin: 0 0 18px; font-size: 0.95rem; }
.stat-q { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; background: var(--card); box-shadow: var(--shadow); }
.stat-qtext { font-family: "Fraunces", Georgia, serif; font-size: 1.04rem; line-height: 1.4; margin: 0 0 18px; }
.q-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 0.76rem; font-weight: 700; margin-right: 10px; vertical-align: middle; }
.stat-rows { display: flex; flex-direction: column; gap: 11px; }
.stat-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.stat-opt { font-size: 0.84rem; color: var(--muted); }
.stat-val { font-size: 0.84rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.stat-track { display: block; height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.stat-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .85s cubic-bezier(.2,.8,.2,1); }
.stat-fill[data-facet="behavior"] { background: linear-gradient(90deg, #9b8cff, #7a5cff); }
.stat-fill[data-facet="attitude"] { background: linear-gradient(90deg, #f0b46a, #e0892f); }
.stat-fill[data-facet="desire"] { background: linear-gradient(90deg, #e07a6c, #c0392b); }
.stat-row.is-mode .stat-opt, .stat-row.is-mode .stat-val { color: var(--ink); font-weight: 700; }
.stat-row.is-empty { display: none; }
.stat-mode { font-size: 0.82rem; color: var(--accent-deep); margin: -8px 0 14px; font-weight: 600; }
.source-note { color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .q-card, .gate { padding: 24px 20px; }
  .site-header nav a { margin-left: 14px; }
  .gate .field-row { flex-direction: column; gap: 0; }
}
