/* Questionário: usa os tokens de styles.css e os componentes de agendar.css */
.quiz { max-width: 50rem; }
.quiz-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; margin: 0 0 .6rem; }
.quiz-head p { color: var(--muted); font-size: 1.08rem; margin: 0 0 1.5rem; }

.progress { height: .55rem; border-radius: 999px; background: #e3efe9; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .4s ease; }
.progress-label { margin: .5rem 0 1.25rem; color: var(--muted); font-size: .88rem; font-weight: 600; }

.quiz-card h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.2; margin: 0 0 .5rem; }
.quiz-intro { color: var(--muted); margin: 0 0 1.25rem; }
.help { margin: 0 0 1.25rem; }
.help summary { cursor: pointer; color: var(--green); font-weight: 700; }
.help p { margin: .5rem 0 0; padding: .9rem 1rem; border-radius: 1rem; background: #f3faf6; color: var(--ink); }

.q { border: 0; margin: 0 0 1.6rem; padding: 0; }
.q legend, .q > label { display: block; font-weight: 700; margin-bottom: .6rem; }
.q .opt-req { color: var(--muted); font-weight: 500; font-size: .85rem; }

.opts { display: grid; gap: .5rem; }
.opts.cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.opt {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: 1rem;
  border: 1.5px solid #e1ece6; background: #fff; cursor: pointer; font-weight: 500; line-height: 1.35;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.opt input { width: 1.15rem; height: 1.15rem; accent-color: var(--green); flex: none; margin: 0; }
.opt:has(input:checked) { border-color: var(--green-2); background: #f3faf6; box-shadow: 0 0 0 3px rgba(28, 195, 122, .12); }
.opt:has(input:focus-visible) { outline: 3px solid var(--green-2); outline-offset: 2px; }

.q input[type="text"], .q input[type="number"], .q input[type="date"], .q textarea {
  width: 100%; min-height: 3.1rem; padding: .7rem 1rem; border-radius: .9rem; border: 1.5px solid #dbe7e1;
  background: #f7fbf9; font: 500 1rem var(--font); color: var(--ink);
}
.q input[type="number"] { max-width: 12rem; }
.q input[type="date"] { max-width: 16rem; }
.q textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.q input:focus, .q textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(28, 195, 122, .18); background: #fff; }
.q [aria-invalid="true"] { border-color: #e0654f; }

.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: .3rem; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; inset: 0; }
.scale span {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: .7rem; border: 1.5px solid #e1ece6; background: #fff;
  font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.scale input:checked + span { color: #fff; border-color: transparent; background: hsl(calc(140 - var(--n) * 13) 60% 42%); }
.scale input:focus-visible + span { outline: 3px solid var(--green-2); outline-offset: 2px; }
.scale-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; margin-top: .4rem; }
@media (max-width: 480px) { .scale { grid-template-columns: repeat(6, 1fr); } }

.alerta { margin: .8rem 0 0; padding: .9rem 1rem; border-radius: 1rem; background: #fdecea; color: #8a2a1a; font-weight: 600; }
.consent { margin-top: .5rem; }
#q-cep, #q-numero, #q-uf { max-width: 12rem; }

/* Itens obrigatórios que faltam */
.q.q-erro legend, .q.q-erro > label, .consent.q-erro span { color: #b3261e; }
.q.q-erro .opt, .q.q-erro .scale span { border-color: #d64534; background: #fff6f4; }
.q.q-erro input[type="text"], .q.q-erro input[type="number"], .q.q-erro input[type="date"], .q.q-erro textarea { border-color: #d64534; background: #fff6f4; }
.consent.q-erro input { outline: 2px solid #e0654f; outline-offset: 2px; }
.q-msg { margin: .45rem 0 0; color: #b3261e; font-size: .88rem; font-weight: 600; }
.consent.q-erro { flex-wrap: wrap; }
.consent .q-msg { flex-basis: 100%; }
