:root {
  --text: #2D2D2D;
  --muted: #5b6066;
  --bg: #F5F7F9;
  --card: #ffffff;
  --border: #D9DEE4;
  --ink: #F5A300;          /* primary button — vivid gold, pops on the near-white page */
  --ink-text: #23262B;     /* near-black text — high contrast on the gold */
  --phase-positive: #3FA66A; /* green  */
  --phase-neutral: #E0A23B;  /* amber  */
  --phase-negative: #C8553D; /* red    */
  --select: #eef3f7;
  --radius: 14px;
  --maxw: 640px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#quiz-root {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 20px 64px;
  display: flex;
  flex-direction: column;
}

/* progress bar */
#progress {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  margin: 24px 0 8px;
  overflow: hidden;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--phase-positive);
  border-radius: 99px;
  transition: width .35s ease, background .5s ease;
}
#progress.hidden { visibility: hidden; }

#screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0 24px;
}

/* ---------- landing ---------- */
.landing { text-align: left; padding: 24px 0; }
.landing h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 22px;
  font-weight: 700;
}
.landing p {
  font-size: 19px;
  margin: 0 0 18px;
  color: var(--text);
}
.landing .meta { color: var(--muted); font-size: 16px; }

/* ---------- questions ---------- */
.question { padding: 8px 0; }
.q-eyebrow {
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.question h2 {
  font-size: 23px;
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 22px;
}
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}
@media (hover: hover) {
  .option:hover { border-color: var(--ink); background: var(--select); }
}
.option:active { transform: scale(.995); }

/* phase accent on the eyebrow + progress already handles colour */
.phase-positive .q-eyebrow { color: var(--phase-positive); }
.phase-neutral  .q-eyebrow { color: var(--phase-neutral); }
.phase-negative .q-eyebrow { color: var(--phase-negative); }

/* ---------- comfort interstitial ---------- */
.comfort { padding: 24px 0; }
.comfort p { font-size: 20px; line-height: 1.6; margin: 0 0 24px; }

/* ---------- loading ---------- */
.loading { text-align: center; padding: 60px 0; }
.loading h2 { font-size: 22px; margin: 0 0 10px; }
.loading p { color: var(--muted); margin: 0 0 28px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- lead gate ---------- */
.leadgate { padding: 24px 0; }
.leadgate h2 { font-size: 26px; line-height: 1.3; margin: 0 0 14px; }
.leadgate p { font-size: 18px; margin: 0 0 18px; }
.leadgate form { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.leadgate input {
  font-size: 17px;
  padding: 15px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  width: 100%;
}
.leadgate input:focus { outline: none; border-color: var(--ink); }
.lead-err { color: var(--phase-negative); font-size: 15px; min-height: 18px; }
.micro { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

/* measure badge (imposition of measure) */
.measure {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--phase-positive);
  border: 1.5px solid var(--phase-positive);
  border-radius: 99px;
  padding: 6px 14px;
  margin: 0 0 26px;
  font-weight: 600;
}

/* ---------- results ---------- */
.results { padding: 28px 0 16px; }
.cta-reason { font-size: 16px; color: var(--muted); margin: 16px 0 0; }
.cta-block p.cta-after { font-size: 17px; margin: 20px 0 0; }
.cta-block p.cta-after + p.cta-after { margin-top: 12px; }
#reveal-wrap { margin-top: 26px; }
.results .type-label {
  display: inline-block;
  font-size: 17px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--phase-positive);
  border: 2px solid var(--phase-positive);
  border-radius: 99px;
  padding: 8px 18px;
  font-weight: 700;
  margin: 0 0 14px;
}
.measure-quiet {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 22px;
}
.results h1 { font-size: 27px; line-height: 1.3; margin: 0 0 22px; }
.results h3 {
  font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin: 30px 0 10px;
}
.results p { font-size: 18px; margin: 0 0 16px; }
.cta-block {
  margin-top: 32px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.cta-block p { margin: 0 0 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #c9b283 0%, #b19b71 55%, #a08a60 100%);
  color: #1a1610;
  text-decoration: none;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 16px 26px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 14px 32px -12px rgba(177, 155, 113, .65), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .25s;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  animation: ctaShine 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ctaShine {
  0% { left: -80%; }
  55% { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn::after { animation: none; }
}

@media (min-width: 560px) {
  .landing h1 { font-size: 36px; }
  .question h2 { font-size: 26px; }
  .btn { width: auto; min-width: 260px; }
}
