/* Provider Quiz (/quiz) and Provider Profile (/profile). Builds on site.css tokens. */

:root {
  --tint-realist: #EAD9B8;
  --tint-builder: #BFD6D2;
  --tint-defender: #E8C7B0;
  --tint-nomap: #D8D3A0;
  --on-tint: #241F16;          /* tints stay light in dark mode, so text on them stays dark */
  --burnt-deep: #A34E1E;       /* call card: cream text on it passes AA */
  --focus: #7D8C47;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ── Quiz shell ─────────────────────────────────────────────── */
.quiz { padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 10vw, 112px); }
.quiz__col { max-width: 600px; margin-inline: auto; padding-inline: 20px; }
.quiz__screen[hidden] { display: none; }
.quiz__screen:focus { outline: none; }

.quiz__intro { text-align: center; padding-top: clamp(16px, 6vw, 56px); }
.quiz__label { color: var(--accent-text); margin-bottom: 18px; }
.quiz h1 { font-size: clamp(2.25rem, 9vw, 3rem); line-height: 1.1; margin-bottom: 20px; }
.quiz__intro .lede { color: var(--ink); margin-bottom: 32px; }
.quiz__intro .btn { width: 100%; }
.quiz__small { margin-top: 14px; font-size: .875rem; color: var(--ink-soft); }

/* Progress */
.progress { margin-bottom: 28px; }
.progress__text { display: block; color: var(--ink-soft); margin-bottom: 10px; }
.progress__track { height: 6px; background: var(--rule); border-radius: 999px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--olive); border-radius: 999px; transition: width .25s ease; }

.question h2 { font-size: clamp(1.5rem, 6vw, 1.875rem); line-height: 1.22; margin-bottom: 24px; }
.answers { display: grid; gap: 10px; }
.answer {
  width: 100%; min-height: 56px; padding: 14px 22px;
  text-align: left; font: 500 1rem/1.4 var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 999px;
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.answer:hover { border-color: var(--ink-soft); }
.answer[aria-pressed="true"] { border-color: var(--olive); background: var(--tint-olive); }
.answer.is-long { border-radius: 24px; }
.back { margin-top: 22px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-soft); }

/* Gate */
.gate h1 { font-size: clamp(2rem, 8vw, 2.75rem); text-align: center; }
.gate .lede { text-align: center; color: var(--ink); margin-bottom: 28px; }
.gate .field input { border-radius: 999px; padding-inline: 18px; min-height: 52px; }
.gate .btn { width: 100%; margin-top: 4px; }
.gate__switch { text-align: center; margin-top: 18px; }
.gate__switch .text-link { min-height: 44px; }
.form-error { color: var(--ink); background: var(--tint-defender); border-radius: 12px; padding: 10px 14px; font-size: .9375rem; margin-top: 12px; }
.form-error:empty { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { color: var(--on-tint); } }

.saving { text-align: center; padding-top: 40px; color: var(--ink-soft); }

/* ── Provider Profile ──────────────────────────────────────── */
.profile { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 10vw, 112px); }
.profile__col { max-width: 920px; margin-inline: auto; padding-inline: 20px; }
.profile__title { font-size: clamp(1.75rem, 5vw, 2.25rem); margin-bottom: 28px; }
.pp-section { margin-top: clamp(40px, 7vw, 56px); }
.pp-label { color: var(--ink-soft); margin-bottom: 14px; display: block; }

.pp-header { border-radius: 24px; padding: clamp(24px, 5vw, 36px); color: var(--on-tint); }
.pp-header .pp-label { color: var(--on-tint); opacity: .75; }
.pp-type { font-size: clamp(2.5rem, 10vw, 3.5rem); margin-bottom: 18px; }
.pp-headline { font-size: clamp(1.375rem, 4.5vw, 1.75rem); line-height: 1.25; margin-bottom: 10px; }
.pp-headline em { font-style: normal; color: #8F4327; }
.pp-header p { color: var(--on-tint); }

/* The map */
.map { position: relative; padding: 0 0 34px 34px; }
.map__grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; aspect-ratio: 1 / .82; }
.map__q { position: relative; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--on-tint); opacity: .35; }
.map__q.is-you { opacity: 1; box-shadow: 0 0 0 2px var(--on-tint) inset; }
.map__q strong { font-family: var(--font-head); font-weight: 400; font-size: clamp(1rem, 3.6vw, 1.25rem); line-height: 1.15; }
.map__you { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--on-tint); color: #FBF8F0; border-radius: 999px; padding: 5px 10px; font-size: .75rem; font-weight: 600; }
.map__you::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #F2C544; }
.map__goal { position: absolute; top: -12px; right: -6px; background: var(--ink); color: var(--cream); border-radius: 999px; padding: 6px 12px; font-size: .75rem; font-weight: 600; white-space: nowrap; z-index: 1; }
.map__axis { position: absolute; color: var(--ink-soft); font-size: .75rem; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.map__axis--x { left: 34px; right: 0; bottom: 4px; text-align: center; }
.map__axis--y { left: 0; top: 0; bottom: 34px; width: 24px; writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; }

/* Scores */
.bars { display: grid; gap: 14px; }
.bar__row { display: grid; gap: 6px; }
.bar__head { display: flex; justify-content: space-between; font-size: .9375rem; }
.bar__head strong { font-weight: 600; }
.bar__head span { color: var(--ink-soft); }
.bar__track { height: 12px; background: var(--rule); border-radius: 999px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 999px; background: var(--ink-soft); }
.bar__row.is-primary .bar__fill { background: var(--olive-deep); }
.runner { margin-top: 18px; color: var(--ink); }

/* You said */
.said { display: grid; gap: 18px; }
.said__q { font-size: .875rem; color: var(--ink-soft); margin-bottom: 4px; }
.said__a { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.35; font-style: italic; }

/* Common patterns */
.cards { display: grid; gap: 12px; }
.pcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 20px 22px; }
.pcard h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.0625rem; line-height: 1.4; margin-bottom: 10px; }
.pcard p { font-size: 1rem; color: var(--ink-soft); margin-bottom: 6px; }
.pcard p b { color: var(--ink); font-weight: 600; }

/* Moves */
.moves { margin: 0; padding: 0; list-style: none; counter-reset: move; display: grid; gap: 12px; }
.moves li { counter-increment: move; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 18px 20px; }
.moves li::before { content: counter(move); font-family: var(--font-head); font-size: 1.75rem; line-height: 1; color: var(--accent-text); }

/* Research */
.research { background: var(--paper); border: 1px solid var(--rule); border-radius: 20px; padding: 24px; display: grid; gap: 10px; }
.research__big { font-family: var(--font-head); font-size: clamp(2.5rem, 10vw, 3.5rem); line-height: 1; color: var(--accent-text); }

/* The call */
.call { background: var(--burnt-deep); color: #F5F1E6; border-radius: 24px; padding: clamp(24px, 5vw, 36px); }
.call .pp-label { color: #F5F1E6; opacity: .85; }
.call h2 { font-size: clamp(1.75rem, 6vw, 2.25rem); margin-bottom: 14px; color: #F5F1E6; }
.call p { color: #F5F1E6; margin-bottom: 24px; }
.btn--paper { background: #FBF8F0; color: #8F4327; border-color: #FBF8F0; width: 100%; }
.btn--paper:hover { background: #fff; border-color: #fff; color: #8F4327; }

.testimonial { border: 1.5px dashed var(--ink-soft); border-radius: 18px; padding: 18px; }

.pp-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 16px; }
.pp-foot summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; }
.pp-foot ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--ink-soft); font-size: .875rem; }
.pp-foot li { margin-bottom: 6px; }

.history { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: .9375rem; }
.history span { color: var(--ink-soft); }

.empty { text-align: center; padding: 40px 0; }

@media (prefers-reduced-motion: reduce) { .progress__fill { transition: none; } }

/* Quiz actions use ink; burnt orange stays reserved for the call. */
.btn--ink { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--ink:hover { opacity: .9; }
.btn--ink[disabled] { opacity: .55; cursor: progress; }
.moves li::before { font-family: var(--font-body); font-weight: 500; font-size: 1.5rem; }
.pp-foot summary { list-style: none; justify-content: space-between; }
.pp-foot summary::-webkit-details-marker { display: none; }
.pp-foot summary::after { content: "+"; font-size: 1.25rem; color: var(--ink-soft); }
.pp-foot details[open] summary::after { content: "–"; }
.map { max-width: 520px; }

@media (min-width: 900px) {
  .quiz h1 { font-size: 3.5rem; }
  .question h2 { font-size: 2.25rem; }
  .answer { font-size: 1.0625rem; min-height: 60px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .profile .map { max-width: 640px; }
}
