/* Find Your Leak (/findyourleak) only. Builds on pages.css tokens and cards. */

.quiz-section { min-height: calc(100svh - var(--header-h) - 80px); }
.quiz-body {
  padding: clamp(32px, 7vh, 72px) clamp(16px, 6vw, 90px) clamp(56px, 10vh, 110px);
  width: 100%;
  min-width: 0;
}
/* Entry and questions: one centred column (option text stays left). */
.q-screen { min-width: 0; max-width: 820px; margin: 0 auto; text-align: center; }
[data-focus]:focus { outline: none; }

/* ---- Entry ---- */
.q-start { max-width: none; padding-top: clamp(8px, 4vh, 48px); }
.q-start h1 {
  font-size: clamp(32px, 3.75vw, 60px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
/* One line from 1024px up (spec); wraps on smaller screens. */
@media (min-width: 1024px) { .q-start h1 { white-space: nowrap; } }
.q-lead {
  margin: clamp(18px, 3vh, 26px) 0 0;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--body-text);
  text-wrap: balance;
}
.q-gets {
  list-style: none;
  margin: clamp(28px, 5vh, 44px) auto 0;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  display: grid;
  gap: 16px;
  text-align: left;
}
.q-gets li { display: flex; align-items: flex-start; gap: 14px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: var(--cream); }
.q-tick { flex: 0 0 auto; color: var(--gold); margin-top: 0.12em; width: 1.1em; height: 1.1em; }
.q-start .q-actions { margin-top: clamp(32px, 5vh, 48px); }
.q-start .btn { min-width: 160px; min-height: 56px; font-size: 18px; font-weight: 600; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font: 500 16px/1.2 'Space Grotesk', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
  text-align: center;
}
.btn.solid { background: var(--gold); color: var(--navy); }
.btn.solid:hover { background: var(--cream); color: var(--navy); }
.btn.line { background: transparent; color: var(--cream); border-color: rgba(224, 179, 60, 0.45); }
.btn.line:hover { border-color: var(--gold); }
.btn:focus-visible, .q-opt:focus-visible, .q-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn.solid:focus-visible { outline-color: var(--cream); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: var(--gold); }
.q-actions { margin-top: clamp(24px, 4vh, 36px); display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---- Progress ---- */
.q-progress { margin-bottom: clamp(24px, 4.5vh, 40px); text-align: left; }
.q-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-count { font-size: 14px; color: var(--muted); }
.q-back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--gold);
  font: 500 15px 'Space Grotesk', sans-serif; cursor: pointer;
}
.q-back:hover { color: var(--cream); }
.q-bar { height: 3px; background: var(--hairline); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.q-bar span { display: block; height: 100%; background: var(--gold); transition: width 300ms ease; }

/* ---- Question ---- */
.q-text {
  margin: 0;
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.q-text strong { color: var(--gold); font-weight: 600; }
.q-hint { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.q-opts { display: grid; gap: 10px; margin-top: clamp(20px, 3.5vh, 30px); }
.q-opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 56px; padding: 14px 18px;
  background: #1D2543;
  border: 1px solid rgba(242, 237, 227, 0.1);
  border-radius: 14px;
  color: var(--cream);
  font: 400 16px/1.4 'Space Grotesk', sans-serif;
  text-align: left; cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}
.q-opt:hover { border-color: rgba(224, 179, 60, 0.45); }
.q-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(224, 179, 60, 0.1); }
.q-mark {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(242, 237, 227, 0.35);
  display: grid; place-items: center;
}
.q-opt.multi .q-mark { border-radius: 5px; }
.q-opt[aria-pressed="true"] .q-mark { border-color: var(--gold); background: var(--gold); }
.q-opt[aria-pressed="true"] .q-mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }
.q-opt.multi[aria-pressed="true"] .q-mark::after { width: 9px; height: 5px; border-radius: 0; background: none; border: solid var(--navy); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }

/* Q1 numbers: two stacked fields in the centred column */
.q-name { margin: clamp(20px, 3.5vh, 30px) auto 0; max-width: 440px; text-align: left; }
.q-name + .q-fields { margin-top: 20px; }
.q-fields { display: grid; gap: 20px; margin: clamp(20px, 3.5vh, 30px) auto 0; max-width: 440px; text-align: left; }
.q-field label { display: block; font-size: 15px; color: var(--cream); margin-bottom: 8px; }
.q-field input {
  width: 100%; min-height: 52px; padding: 0 16px;
  background: #1D2543; color: var(--cream);
  border: 1px solid rgba(242, 237, 227, 0.18); border-radius: 12px;
  font: 400 18px 'Space Grotesk', sans-serif;
}
.q-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.q-field input[aria-invalid="true"] { border-color: #E98B6D; }
.q-err { margin: 8px 0 0; min-height: 0; font-size: 14px; line-height: 1.4; color: #F0A68E; }
.q-err:empty { display: none; }

/* Q13 tick box */
.q-check { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; min-height: 44px; cursor: pointer; font-size: 16px; }
.q-check[hidden] { display: none; }
.q-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-box { width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid rgba(242, 237, 227, 0.4); display: grid; place-items: center; flex: 0 0 auto; }
.q-check input:checked + .q-box { background: var(--gold); border-color: var(--gold); }
.q-check input:checked + .q-box::after { content: ''; width: 10px; height: 5px; border: solid var(--navy); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.q-check input:focus-visible + .q-box { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- Result: Option 3 (spec v4). Top row: headline left, cost panel right;
   three Gold Top Bar cards; then the send band. Left-aligned, full width. ---- */
.q-result { max-width: 1240px; text-align: left; }
.r-back { margin: -8px 0 clamp(12px, 2vh, 20px); }
.r-back .q-back { padding-left: 0; }
.r-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.r-kicker { margin: 0 0 10px; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.r-head { margin: 0; font-size: clamp(30px, 3.6vw, 52px); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.r-area { color: var(--gold); }
.r-waste { margin: 10px 0 0; font-size: clamp(15px, 1.2vw, 17px); color: var(--muted); }
.r-said { margin: 16px 0 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--body-text); text-wrap: pretty; }
.r-cost { border: 1px solid rgba(224, 179, 60, 0.45); border-radius: 18px; padding: clamp(24px, 2.4vw, 32px); }
.r-cost h2 { margin: 0 0 10px; font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: 0; color: var(--muted); }
.r-figure { margin: 0 0 8px; font-size: clamp(28px, 2.8vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; color: var(--cream); }
.r-line { margin: 0; font-size: 17px; line-height: 1.55; color: var(--body-text); }
.r-calc { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.r-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(36px, 6vh, 56px); }
.r-card h3 { font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; letter-spacing: -0.01em; }
.r-card p { margin-top: 14px; padding-top: 0; border-top: 0; font-size: 16px; line-height: 1.65; }
.r-send { margin-top: clamp(40px, 6vh, 64px); max-width: 760px; }
.r-consent { margin: 14px 0 0; font-size: 15px; line-height: 1.5; font-style: italic; color: var(--muted); }
.r-send h2 { margin: 0 0 16px; font-size: clamp(20px, 1.7vw, 24px); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.r-form label { display: block; margin-bottom: 8px; font-size: 15px; color: var(--muted); }
.r-form-row { display: flex; gap: 12px; }
.r-form-row input {
  flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0 18px;
  background: #1D2543; color: var(--cream);
  border: 1px solid rgba(242, 237, 227, 0.18); border-radius: 14px;
  font: 400 17px 'Space Grotesk', sans-serif;
}
.r-form-row input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.r-form-row input[aria-invalid="true"] { border-color: #E98B6D; }
.r-form-row .btn { min-height: 56px; white-space: nowrap; }
.r-sent { margin: 0; font-size: 17px; line-height: 1.55; color: var(--cream); }
.r-sent:empty, .r-form[hidden] { display: none; }
.r-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.r-form-row .btn:disabled { opacity: 0.7; cursor: wait; }
@media (max-width: 900px) { .r-cards { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 800px) {
  .r-top { grid-template-columns: 1fr; }
  .r-form-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .q-bar span, .q-opt, .btn { transition: none; }
}

@media (max-width: 640px) {
  .quiz-body { padding-top: 24px; }
  .q-start { padding-top: 16px; }
}
