/* ── Privora — editorial clarity ─────────────────────────────────────── */

:root {
  --paper:      #FAF6F0;
  --paper-2:    #F2EBE1;
  --paper-3:    #E7DDCE;
  --ink:        #1B1714;
  --ink-2:      #4A413A;
  --ink-3:      #857a70;
  --clay:       #B24A2E;
  --clay-soft:  #D9764F;
  --teal:       #1F4B4A;
  --teal-soft:  #E2EDEA;
  --rule:       #DCD1C0;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;

  --shell: 640px;
  --ease:  cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  letter-spacing: -.018em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 22px; }

/* ── header ─────────────────────────────────────────────────────────── */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(250,246,240,.9);
  backdrop-filter: saturate(1.4) blur(10px);
  position: sticky; top: 0; z-index: 60;
}
.masthead__in {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.wordmark {
  font-family: var(--display);
  font-size: 21px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 9px;
}
.wordmark span.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--clay); display: inline-block;
}
.masthead__tag {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ── generic sections ───────────────────────────────────────────────── */
section { padding: 54px 0; }
.eyebrow {
  font-size: 11.5px; letter-spacing: .17em; text-transform: uppercase;
  color: var(--clay); font-weight: 600; margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.lede { font-size: 18.5px; color: var(--ink-2); }
.small { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

/* ── hero ───────────────────────────────────────────────────────────── */
.hero { padding: 46px 0 8px; }
.hero h1 { font-size: clamp(38px, 10.5vw, 60px); }
.hero h1 em {
  font-style: italic; color: var(--clay);
  font-variation-settings: "SOFT" 40, "WONK" 1;
}
.hero p.lede { margin: 22px 0 0; }

.hero__figure {
  margin: 34px 0 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 26px 24px;
  position: relative;
}
.hero__figure::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.hero__figure p {
  margin: 0; font-family: var(--display); font-size: 19px;
  font-style: italic; line-height: 1.45; color: var(--ink-2);
}
.hero__figure cite {
  display: block; margin-top: 14px; font-style: normal;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ── buttons ────────────────────────────────────────────────────────── */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 18px 24px;
  font-family: var(--body); font-size: 16.5px; font-weight: 600;
  letter-spacing: .005em;
  background: var(--ink); color: var(--paper);
  border-radius: 2px;
  transition: transform .18s var(--ease), background .18s var(--ease);
  text-decoration: none;
}
.btn:hover { background: #322922; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--clay { background: var(--clay); }
.btn--clay:hover { background: #9C3E24; }
.btn__arrow { transition: transform .22s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn-note {
  margin: 16px 0 0; text-align: center;
  font-size: 12.5px; color: var(--ink-3);
}

/* ── three-point strip ──────────────────────────────────────────────── */
.strip { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.strip ol { list-style: none; margin: 0; padding: 0; }
.strip li {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--rule);
}
.strip li:last-child { border-bottom: 0; }
.strip li b {
  font-family: var(--display); font-size: 15px; color: var(--clay);
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.strip li p { margin: 0; font-size: 15.5px; color: var(--ink-2); line-height: 1.5; }
.strip li p strong { color: var(--ink); font-weight: 600; }

/* ── quiz ───────────────────────────────────────────────────────────── */
.quiz { display: none; padding: 30px 0 60px; }
#stage { min-height: 64vh; }
.quiz.is-on { display: block; }
.home.is-off { display: none; }

.progress {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 30px;
}
.progress__bar {
  flex: 1; height: 3px; background: var(--paper-3);
  position: relative; overflow: hidden;
}
.progress__fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: var(--clay);
  transition: width .45s var(--ease);
}
.progress__count {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap;
}

.card { animation: rise .42s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.q-num {
  font-family: var(--display); font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--clay); margin: 0 0 12px;
}
.q-title { font-size: clamp(26px, 7vw, 34px); margin: 0 0 24px; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 17px 18px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--body); font-size: 16px; line-height: 1.4; color: var(--ink);
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease);
}
.opt:hover { border-color: var(--ink); background: var(--paper-2); }
.opt.is-picked { border-color: var(--clay); background: #F6E9E2; transform: translateX(3px); }
.opt__key {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  transition: inherit;
}
.opt.is-picked .opt__key { background: var(--clay); border-color: var(--clay); color: #fff; }

.q-back {
  appearance: none; background: none; border: 0; cursor: pointer;
  margin-top: 26px; padding: 0;
  font-family: var(--body); font-size: 13.5px; color: var(--ink-3);
  text-decoration: underline; text-underline-offset: 3px;
}

.field {
  width: 100%; padding: 17px 18px;
  border: 1px solid var(--rule); border-radius: 2px;
  background: var(--paper-2);
  font-family: var(--body); font-size: 17px; color: var(--ink);
}
.field:focus { outline: 2px solid var(--clay); outline-offset: -1px; }

/* ── analysing ──────────────────────────────────────────────────────── */
.analysing { text-align: center; padding: 40px 0 20px; }
.analysing h2 { font-size: clamp(28px, 7.5vw, 36px); margin-bottom: 30px; }
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 380px; text-align: left; }
.steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  font-size: 15.5px; color: var(--ink-3);
  opacity: .35; transition: opacity .4s var(--ease), color .4s var(--ease);
}
.steps li.is-on { opacity: 1; color: var(--ink-2); }
.steps li .tick {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--rule); flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; color: transparent;
}
.steps li.is-on .tick { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── result ─────────────────────────────────────────────────────────── */
.dial { display: grid; place-items: center; margin: 6px auto 26px; width: 168px; height: 168px; position: relative; }
.dial svg { transform: rotate(-90deg); }
.dial__ring { fill: none; stroke: var(--paper-3); stroke-width: 9; }
.dial__val  { fill: none; stroke: var(--clay); stroke-width: 9; stroke-linecap: round;
              stroke-dasharray: 440; stroke-dashoffset: 440;
              transition: stroke-dashoffset 1.5s var(--ease); }
.dial__num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 46px; font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.dial__num small { display:block; font-family: var(--body); font-size: 11px; letter-spacing: .15em;
                   text-transform: uppercase; color: var(--ink-3); margin-top: 2px; font-weight: 600; }

.verdict {
  border: 1px solid var(--rule); background: var(--paper-2);
  padding: 24px 22px; margin: 0 0 26px;
}
.verdict h2 { font-size: clamp(26px, 7vw, 33px); margin-bottom: 12px; }
.verdict p { margin: 0 0 14px; color: var(--ink-2); font-size: 16.5px; }
.verdict p:last-child { margin-bottom: 0; }

.readout { list-style: none; margin: 0 0 30px; padding: 0; }
.readout li {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--rule);
  font-size: 15.5px; color: var(--ink-2);
}
.readout li:first-child { border-top: 1px solid var(--rule); }
.readout__q { display: block; }
.readout__q em {
  display: block; font-style: italic; color: var(--ink-3);
  font-size: 14.5px; margin-top: 2px;
}
.readout li b {
  font-family: var(--display); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
}
.readout li b.hi  { color: var(--clay); }
.readout li b.mid { color: #A07B33; }
.readout li b.lo  { color: var(--teal); }

.next-box {
  border: 1px solid var(--ink); padding: 26px 22px; background: var(--paper);
  position: relative;
}
.next-box::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid var(--rule); pointer-events: none;
}
.next-box h3 { font-size: 24px; margin: 0 0 12px; }
.next-box p { margin: 0 0 20px; font-size: 16px; color: var(--ink-2); }

/* ── article ────────────────────────────────────────────────────────── */
.article { border-top: 1px solid var(--rule); }
.article h2 { font-size: clamp(28px, 7.5vw, 38px); margin-bottom: 20px; }
.article p { color: var(--ink-2); margin: 0 0 18px; }
.article p:first-of-type::first-letter {
  font-family: var(--display); font-size: 58px; line-height: .82;
  float: left; padding: 4px 10px 0 0; color: var(--clay);
}
.pull {
  margin: 26px 0; padding: 0 0 0 20px;
  border-left: 3px solid var(--clay);
  font-family: var(--display); font-size: 21px; font-style: italic;
  line-height: 1.38; color: var(--ink);
}

/* ── faq ────────────────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--rule); }
details {
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
}
details summary {
  cursor: pointer; list-style: none;
  font-family: var(--display); font-size: 18px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; font-family: var(--body); font-size: 22px; color: var(--clay);
  transition: transform .2s var(--ease); line-height: 1;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 2px; font-size: 15.5px; color: var(--ink-2); }

/* ── footer ─────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 34px 0 44px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 20px; }
.foot nav a { color: var(--ink-2); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.foot nav a:hover { color: var(--clay); border-color: var(--clay); }
.foot .small { max-width: 52ch; }
.foot .wordmark { font-size: 17px; margin-bottom: 16px; }

/* ── legal pages ────────────────────────────────────────────────────── */
.doc { padding: 44px 0 20px; }
.doc h1 { font-size: clamp(32px, 9vw, 46px); margin-bottom: 10px; }
.doc .updated { font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 32px; }
.doc h2 { font-size: 22px; margin: 34px 0 12px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }

@media (min-width: 720px) {
  body { font-size: 18px; }
  section { padding: 68px 0; }
  .hero { padding: 62px 0 8px; }
  .btn { width: auto; min-width: 300px; }
  .btn-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
