/* Segunda direção visual: composição compacta e ritmo do quiz de referência.
   O conteúdo vem dos mesmos scripts da versão base. */
:root {
  --paper: #fff;
  --white: #fff;
  --ink: #243029;
  --muted: #59675e;
  --line: #d7e4d9;
  --teal: #19864b;
  --teal-dark: #0f6838;
  --wash: #edf7ef;
  --sun: #19864b;
  --focus: #0f6838;
  font-family: Arial, Helvetica, sans-serif;
}

body { background: #fff; line-height: 1.48; }
h1, h2, h3 { font-family: Arial, Helvetica, sans-serif; letter-spacing: -.035em; }
.text-highlight { color: var(--teal-dark); }
a { color: var(--teal-dark); }
.site-shell { display: flex; flex-direction: column; }
.site-header, .site-footer, .app { width: min(100%, 760px); }
.site-header { min-height: 58px; padding: .45rem 1.2rem; gap: .5rem; border-color: var(--line); }
.preview-note { font-size: .68rem; border: 0; padding: 0; }
.app { flex: 1; padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.2rem) 4rem; }
.site-footer { padding: 1.2rem clamp(1rem, 4vw, 2.2rem) 2rem; color: var(--muted); font-size: .75rem; }

.opening-layout {
  min-height: min(770px, calc(100vh - 170px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  position: relative;
  padding: 2rem 0 1rem;
}
.opening-copy { max-width: 540px; margin-inline: auto; text-align: center; }
.opening-kicker {
  color: var(--teal-dark);
  border: 1px solid #b9dfc7;
  background: var(--wash);
  border-radius: 100px;
  display: inline-block;
  padding: .47rem 1rem;
  font-size: .69rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}
.opening-copy h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.03;
  font-weight: 900;
  text-transform: uppercase;
  max-width: 17ch;
  margin: 0 auto 1rem;
}
.opening-lead { color: var(--muted); font-size: clamp(.98rem, 2.1vw, 1.15rem); line-height: 1.4; font-weight: 700; max-width: 43ch; margin: 0 auto .5rem; }
.opening-layout .question-panel { width: min(100%, 520px); margin-inline: auto; }
.opening-layout .progress-area { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 450px); }
.opening-layout .progress-meta { display: none; }
.opening-layout .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.opening-layout .choice {
  min-height: 155px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  position: relative;
  background: #fff;
}
.opening-layout .choice::before {
  content: "";
  display: grid;
  place-items: center;
  width: 100%;
  height: 105px;
  color: var(--ink);
  background: var(--wash);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80px 80px;
}
.opening-layout .choice input { position: absolute; top: .7rem; right: .7rem; z-index: 1; width: 1.15rem; height: 1.15rem; }
.opening-layout .choice-text { min-height: 48px; display: grid; place-items: center; width: 100%; padding: .35rem .5rem; text-align: center; font-size: .87rem; color: #fff; background: var(--teal); font-weight: 800; }
.opening-layout .choice.is-selected { background: var(--wash); }
.opening-layout .choice:has(input[value="homem"])::before,
.opening-layout .choice:has(input[value="mulher"])::before { background-size: cover; background-position: center 32%; }
.opening-layout .choice:has(input[value="homem"])::before { background-image: url("../assets/opcao-homem-v2.jpg"); }
.opening-layout .choice:has(input[value="mulher"])::before { background-image: url("../assets/opcao-mulher-v2.jpg"); }
.opening-layout .choice:has(input[value="homem"]),
.opening-layout .choice:has(input[value="mulher"]) { min-height: 218px; }
.opening-layout .choice:has(input[value="homem"])::before,
.opening-layout .choice:has(input[value="mulher"])::before { height: 174px; }

.question-q2 .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.question-q2 .choice { min-height: 164px; padding: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; position: relative; }
.question-q2 .choice::before { content: ""; width: 100%; height: 122px; display: block; flex: none; background: var(--wash) center 30% / cover no-repeat; }
.question-q2 .choice:has(input[value="idade-18-24"])::before { background-image: url("../assets/idade-18-24.jpg"); }
.question-q2 .choice:has(input[value="idade-25-34"])::before { background-image: url("../assets/idade-25-34.jpg"); }
.question-q2 .choice:has(input[value="idade-35-44"])::before { background-image: url("../assets/idade-35-44.jpg"); }
.question-q2 .choice:has(input[value="idade-45-mais"])::before { background-image: url("../assets/idade-45-mais.jpg"); }
.question-q2 .choice input { position: absolute; top: .6rem; right: .6rem; z-index: 1; }
.question-q2 .choice-text { display: grid; place-items: center; min-height: 42px; width: 100%; text-align: center; padding: .25rem .5rem; color: #fff; background: var(--teal); font-weight: 800; }

.question-panel { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.progress-area { margin-bottom: 2rem; }
.progress-meta { color: var(--muted); font-size: .75rem; margin-bottom: .55rem; }
progress { height: 7px; border-radius: 10px; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--wash); }
progress::-webkit-progress-value { background: var(--teal); }
progress::-moz-progress-bar { background: var(--teal); }
.question-index { color: var(--teal-dark); text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; font-weight: 800; text-align: center; margin: 0 0 .65rem; }
.question-title { font-size: clamp(1.55rem, 3.7vw, 2rem); line-height: 1.13; max-width: none; text-align: center; margin: 0 0 1.2rem; }
.question-hint { text-align: center; font-size: .86rem; margin: -.4rem 0 1rem; }
.choices { display: grid; gap: .55rem; }
.choice {
  min-height: 64px;
  padding: .83rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 650;
  line-height: 1.35;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.choice:last-child { border-bottom: 1.5px solid var(--line); }
@media (hover: hover) and (pointer: fine) {
  .choice:hover { border-color: var(--teal); background: #f7fcf8; transform: translateY(-1px); }
}
.choice.is-selected { border-color: var(--teal); background: var(--wash); box-shadow: inset 0 0 0 1px var(--teal); }
.choice input { accent-color: var(--teal); width: 1.08rem; height: 1.08rem; }
.actions { margin-top: 1.25rem; }
.button { border-radius: 9px; min-height: 54px; font-weight: 800; padding: .77rem 1.25rem; }
.button-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.button-primary:disabled { background: #aaa; border-color: #aaa; }
.button-quiet { border: 0; color: var(--teal-dark); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.button-quiet:hover { background: var(--wash); }
.edit-note { border-color: var(--teal); background: var(--wash); }

.quiz-layout { width: min(100%, 530px); min-height: calc(100dvh - 190px); margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .8rem; position: relative; padding: 3rem 0; }
.quiz-layout .progress-area { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 450px); }
.quiz-layout .progress-meta { display: none; }
.phase-aside { max-width: none; padding: 0; text-align: center; font-size: .83rem; }
.phase-aside p { margin-bottom: 0; }
.phase-name { color: var(--ink); font-size: .9rem !important; margin: 0 0 .4rem; }
.aside-track { display: none; }

.interlude { width: min(100%, 590px); margin: clamp(1rem, 5vh, 3.5rem) auto 4rem; padding: clamp(1.7rem, 4vw, 3rem); border: 1px solid var(--line); border-top: 6px solid var(--teal); background: #fff; color: var(--ink); text-align: center; border-radius: 12px; }
.interlude h1 { font-size: clamp(2rem, 4.8vw, 2.9rem); max-width: none; margin-bottom: 1rem; }
.interlude p { margin-inline: auto; }
.interlude-label { color: var(--teal-dark); }
.interlude .progress-meta { color: var(--muted); }
.interlude progress::-webkit-progress-bar { background: var(--wash); }
.interlude progress::-webkit-progress-value { background: var(--teal); }
.interlude progress::-moz-progress-bar { background: var(--teal); }
.interlude .button-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.interlude .button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.interlude .button-quiet { color: var(--teal-dark); }
.interlude .button-quiet:hover { background: var(--wash); }
.interlude-footnote { color: var(--muted); }
.source-links { text-align: left; }

.result-page { width: min(100%, 700px); margin: clamp(1rem, 6vh, 4rem) auto; }
.result-heading { text-align: center; margin: 0 auto 2rem; }
.result-heading h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; }
.result-label { color: var(--teal-dark); text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; }
.result-grid { grid-template-columns: 1fr; gap: 1rem; }
.result-summary { border: 1px solid var(--line); border-radius: 12px; }
.first-step { background: var(--teal); color: #fff; border: 1px solid var(--teal); border-top: 6px solid var(--teal-dark); border-radius: 12px; }
.first-step > p { color: #e4f6e8; }
.personal-next > p { color: var(--teal-dark); }
.result-next-steps { color: #e4f6e8; }
.result-actions { justify-content: center; }

.final-page { width: min(100%, 760px); }
.final-opening { background: #f4faf5; color: var(--ink); border: 1px solid var(--line); border-top: 6px solid var(--teal); border-radius: 14px; text-align: center; padding: clamp(2rem, 5vw, 3.5rem); }
.final-opening h1 { max-width: none; font-size: clamp(2.4rem, 5vw, 3.9rem); margin-inline: auto; }
.final-opening > p { margin-inline: auto; }
.final-opening .result-label { color: var(--teal-dark); }
.final-opening .button-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.final-opening .button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.personal-recap { grid-template-columns: 1fr; gap: 1.2rem; text-align: left; border-radius: 10px; }
.personal-next { border-left-color: var(--teal); }
.page-jump { justify-content: center; }
.page-jump a { color: var(--teal-dark); text-decoration-color: #8ec9a4; }
.content-section { padding: clamp(3rem, 6vw, 4.4rem) .4rem; }
.section-split, .guide-section { grid-template-columns: 1fr; gap: 1.2rem; }
.section-lead h2, .guide-heading h2 { font-size: clamp(2rem, 4.6vw, 2.9rem); max-width: 22ch; }
.section-body { max-width: 63ch; }
.section-mark { color: var(--teal-dark); border-color: var(--teal); }
.mechanism-section { background: #f8fcf9; padding-inline: clamp(1rem, 4vw, 2rem); border-radius: 10px; }
.guide-section { background: #f4faf5; padding-inline: clamp(1rem, 4vw, 2rem); border-radius: 10px; }
.commercial-section { background: #eaf7ee; padding-inline: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); border-top: 6px solid var(--teal); border-radius: 10px; }
.modules-preview { border-radius: 10px; }
.commercial-grid { grid-template-columns: 1fr; }
.media-grid, .quick-answers { grid-template-columns: 1fr; }
.media-placeholder, .commercial-placeholder { background: #fff; border-color: #a9d3b4; border-radius: 10px; }
.closing-section { border: 1px solid var(--line); border-top: 6px solid var(--teal); border-radius: 14px; background: #f4faf5; color: var(--ink); text-align: center; }
.closing-section h2, .closing-section > p { margin-left: auto; margin-right: auto; }
.closing-section .button-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.closing-section .button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.closing-note { color: var(--muted); }

@media (max-width: 620px) {
  .site-header { min-height: 52px; padding: .45rem 1rem; }
  .site-logo { width: 120px; }
  .site-footer { flex-direction: column; }
  .app { padding: .75rem 1rem 1.5rem; }
  .opening-layout { min-height: calc(100dvh - 145px); justify-content: flex-start; padding: 1rem 0 0; gap: .6rem; }
  .opening-kicker { margin-bottom: .6rem; padding: .32rem .7rem; }
  .opening-copy h1 { font-size: clamp(1.78rem, 7.2vw, 2.5rem); margin-bottom: .55rem; }
  .opening-lead { font-size: .87rem; line-height: 1.32; margin-bottom: 0; }
  .opening-layout .progress-area { top: 0; }
  .opening-layout .question-index { margin-bottom: .4rem; }
  .opening-layout .question-title { font-size: 1.38rem; margin-bottom: .7rem; }
  .opening-layout .question-hint { margin: -.2rem 0 .6rem; font-size: .8rem; }
  .opening-layout .choices { gap: .35rem; }
  .opening-layout .choice { min-height: 90px; }
  .opening-layout .choice::before { height: 56px; background-size: 50px 50px; }
  .opening-layout .choice-text { min-height: 34px; font-size: .74rem; padding: .2rem .35rem; }
  .opening-layout .choice input { top: .45rem; right: .45rem; width: 1rem; height: 1rem; }
  .opening-layout .choice:has(input[value="homem"]),
  .opening-layout .choice:has(input[value="mulher"]) { min-height: 168px; }
  .opening-layout .choice:has(input[value="homem"])::before,
  .opening-layout .choice:has(input[value="mulher"])::before { height: 132px; background-size: cover; }
  .opening-layout .actions { margin-top: .65rem; }
  .opening-layout .actions .button { min-height: 48px; }
  .quiz-layout { min-height: max(0px, calc(100dvh - 188px)); padding: 2.2rem 0; gap: 0; }
  .phase-aside { display: none; }
  .question-panel { padding: 0; box-shadow: none; }
  .question-title { font-size: 1.55rem; }
  .choice { min-height: 62px; }
  .question-q2 .choice { min-height: 146px; }
  .question-q2 .choice::before { height: 107px; }
  .question-q2 .choice-text { min-height: 39px; font-size: .83rem; }
  .actions { align-items: stretch; }
  .actions .button { flex: 1; }
  .interlude { padding: 1.8rem 1.2rem; margin: 1rem auto 2.5rem; }
  .interlude h1 { font-size: 2rem; }
  .result-heading h1 { font-size: 2.5rem; }
  .final-opening { padding: 2rem 1.2rem; }
  .final-opening h1 { font-size: 2.3rem; }
  .content-section { padding-top: 2.7rem; padding-bottom: 2.7rem; }
  .sources-section, .commercial-section, .guide-section { padding-left: 1rem; padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .choice { transform: none !important; }
}
