/* Ajustes compartilhados pela entrada e pelas etapas do simulador. */
.consultant-button { display: inline-flex; width: auto; min-height: 44px; padding: 10px 16px; font-size: 14px; line-height: 1.35; text-align: center; }
.simulation-header .consultant-button { flex: 0 1 180px; }
.simulation-header .header-inner { padding-block: 8px; }
.footer-inner .consultant-button { display: inline-flex; margin-top: 12px; }
.spouse-toggle { min-height: 44px; }
.spouse-fields:has(input[name="incluir_conjuge"]:not(:checked)) [data-spouse-age] { display: none; }
.flow-footer { padding-block: 18px; }
.flow-footer .container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }
.flow-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.age-explanation { margin-top: 20px; font-size: 14px; }
.age-explanation summary { cursor: pointer; color: var(--cepe-green); min-height: 44px; padding-block: 10px; }
.age-explanation p { margin: 8px 0 0; }

@media (max-width: 600px) {
  .container { width: calc(100% - 36px); }
  .brand-strip { display: none; }
  .header-inner { min-height: 64px; gap: 16px; }
  .logo { width: 132px; }
  .simulation-header .header-inner { gap: 12px; }
  .simulation-header .consultant-button { flex-basis: 150px; padding-inline: 10px; font-size: 13px; }
  .flow-main { padding-block: 18px 32px; min-height: 0; }
  .simulation-intro { padding-block: 28px 32px; }
  .simulation-intro h1, .flow-main h1 { font-size: clamp(28px, 8vw, 32px); line-height: 1.15; }
  .simulation-intro h1 br, .flow-intro h1 br { display: none; }
  .simulation-lead { font-size: 16px; margin: 16px 0 22px; }
  .simulation-caption, .small-note, .field-help, .current-detail { font-size: 14px; line-height: 1.5; }
  .simulation-steps { margin-top: 24px; padding-top: 18px; gap: 12px; }
  .macro-progress { margin-bottom: 22px; }
  .macro-progress .flow-progress { gap: 8px; padding-bottom: 12px; }
  .macro-progress .flow-progress li { font-size: 12px; }
  .current-detail { margin-top: 8px; }
  .age-layout { gap: 18px; padding-block: 0; }
  .flow-intro .eyebrow { margin-bottom: 10px; }
  .flow-intro > p:not(.eyebrow) { margin: 12px 0 0; font-size: 16px; line-height: 1.5; }
  .age-card, .selection-card { padding: 18px; border-radius: 14px; min-width: 0; }
  .age-card label { font-size: 18px; }
  .age-card input[type=number] { min-height: 52px; font-size: 20px; padding: 12px; margin: 10px 0 0; max-width: none; }
  #idade-ajuda { margin: 8px 0 0; font-size: 14px; }
  .spouse-fields { margin: 16px 0; }
  .spouse-toggle { font-size: 16px !important; line-height: 1.4; padding-block: 8px; }
  .spouse-fields [data-spouse-age] { margin-top: 16px; }
  .spouse-fields input[type=number] { min-height: 52px; width: 100%; max-width: none; font-size: 16px; }
  .button, .combo-card .button { min-height: 54px; padding: 14px 16px; font-size: 16px; gap: 12px; white-space: normal; }
  .small-note { margin-top: 14px; }
  .age-explanation { margin-top: 12px; }
  .form-field input, .form-field select, .form-field textarea { min-height: 52px; font-size: 16px; }
  .form-grid { gap: 18px; }
  .form-section { margin-bottom: 20px; border-radius: 14px; }
  .question-section label { min-height: 48px; font-size: 16px; }
  .flow-heading { margin-bottom: 24px; gap: 16px; }
  .back-link { min-height: 44px; margin-bottom: 12px; padding-block: 10px; }
  .data-purpose { padding: 18px; margin-bottom: 20px; }
  .flow-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .flow-footer .container { gap: 4px 16px; font-size: 14px; }
}

/* Coverage cards: stacked mobile layout, expanded product rows on desktop. */
.coverage-layout { max-width: 920px; margin-inline: auto; display: grid; gap: 24px; }
.coverage-summary { min-width: 0; }
.coverage-summary > h2 { font-size: clamp(28px, 4vw, 40px); }
.coverage-ages { margin: 12px 0 20px; font-size: 16px; }
.participant-card { --participant-accent: #176333; --participant-tint: #e7f4e9; --participant-icon: #d7eedc; border: 2px solid var(--participant-accent); border-radius: 16px; overflow: hidden; background: var(--participant-tint); margin-bottom: 18px; }
.participant-spouse { --participant-accent: #b48800; --participant-tint: #fff6cf; --participant-icon: #fff0ad; border-color: #e8bf27; }
.participant-heading { display: flex; align-items: center; gap: 12px; padding: 16px; }
.participant-heading h3 { font-size: 20px; line-height: 1.3; }
.participant-heading h3 span { display: inline-block; font-size: 17px; }
.coverage-icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; background: var(--participant-icon); color: var(--participant-accent); border-radius: 50%; }
.coverage-icon svg { width: 26px; height: 26px; }
.participant-icon { background: var(--participant-accent); color: white; }
.participant-products { padding-inline: 16px; background: #ffffff9c; border-radius: 16px 16px 0 0; }
.coverage-product { padding-block: 18px; display: grid; gap: 14px; border-bottom: 1px solid #d5dfd5; min-width: 0; }
.coverage-product:last-child { border-bottom: 0; }
.coverage-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coverage-name h4 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--cepe-green); }
.coverage-amounts { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; margin: 0; }
.coverage-amounts > div { min-width: 0; border-left: 1px solid #cbdccc; padding-left: 10px; }
.coverage-amounts dt { font-size: 14px; }
.coverage-amounts dd { margin: 2px 0 0; color: var(--cepe-green); font-size: clamp(16px, 4.5vw, 20px); font-weight: 750; font-variant-numeric: tabular-nums; }
.coverage-description h5 { margin: 0 0 6px; font-size: 16px; color: var(--cepe-green); }
.coverage-description ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.coverage-description li { margin-bottom: 4px; }
.coverage-description li::marker { color: var(--participant-accent); }
.participant-subtotal, .coverage-total { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 16px; font-size: 18px; font-weight: 750; color: var(--cepe-green); }
.participant-subtotal strong { font-size: 22px; }
.coverage-total { border: 2px solid #fff0b0; background: #fff8db; border-radius: 16px; font-size: 22px; }
.coverage-total strong { font-size: clamp(26px, 6vw, 38px); }
.coverage-layout .selection-card { box-shadow: none; }
@media (min-width: 720px) {
 .participant-heading { padding: 18px 24px; }
 .participant-products { padding-inline: 24px; }
 .coverage-product { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px 24px; }
 .coverage-description { grid-column: 1 / -1; padding-left: 54px; }
 .coverage-amounts { align-self: center; }
 .participant-subtotal, .coverage-total { padding: 20px 24px; }
}

.participant-age-panel { background: #edf4ed; border: 1px solid #dce5db; border-radius: 14px; padding: 18px; margin-bottom: 22px; }
.participant-age-panel > p, .participant-age-panel > label { display: block; margin: 0 0 6px; font-size: 16px; color: var(--cepe-body); }
.participant-age-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.participant-age-row > strong, .editable-age { font-size: 28px; font-weight: 750; color: var(--cepe-green); }
.participant-age-row a, .edit-age-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--cepe-green); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.edit-age-link[hidden] { display: none; }
.editable-age { display: flex; align-items: center; gap: 4px; }
.spouse-options .editable-age input[type=number] { width: 3.4ch; min-width: 3.4ch; max-width: 3.4ch; min-height: 52px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: inherit; font: inherit; padding: 0; margin: 0; appearance: textfield; }
.spouse-options .editable-age input::-webkit-inner-spin-button, .spouse-options .editable-age input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.spouse-options .editable-age input:focus { border-bottom-color: var(--cepe-green); }
.spouse-options .participant-age-panel { margin: 16px 0 0; }
.spouse-options .spouse-fields { margin: 0; }
.spouse-options .small-note { font-size: 16px; line-height: 1.6; }
.spouse-options [data-status] { margin: 14px 0 0; }
.spouse-options [data-status]:empty { display: none; }
@media (min-width: 720px) { .participant-age-panel, .spouse-options { max-width: 760px; } }

.age-modal { box-sizing: border-box; width: calc(100% - 36px); max-width: 440px; max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; border: 1px solid var(--cepe-line); border-radius: 16px; color: var(--cepe-body); box-shadow: 0 20px 70px #002b0833; }
.age-modal::backdrop { background: #002b0870; }
.age-modal h2 { font-size: 26px; margin-bottom: 14px; }
.age-modal p { font-size: 16px; }
.age-modal label { display: block; font-size: 16px; font-weight: 700; color: var(--cepe-green); }
.age-modal input { box-sizing: border-box; width: 100%; min-height: 52px; padding: 12px; margin-top: 10px; border: 1px solid #889c89; border-radius: 10px; font: inherit; font-size: 20px; }
.age-modal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.age-modal-actions .button { border: 0; cursor: pointer; font: inherit; font-weight: 750; }
@media (max-width: 600px) { .age-modal-actions { flex-direction: column-reverse; } .age-modal-actions > button { width: 100%; justify-content: center; } }

.initial-sex-field { margin-top: 18px; }
.initial-sex-field select { min-height: 52px; font-size: 16px; }
.age-card .initial-sex-field label { font-size: 16px; }

.budget-card { margin: 28px auto 0; padding: 22px 18px; border: 1px solid #dce5db; border-radius: 16px; background: #edf5ef; max-width: 540px; }
.budget-card h2 { font-size: 24px; margin-bottom: 12px; }
.budget-card > p { font-size: 16px; }
.budget-card label { display: block; font-weight: 700; color: var(--cepe-green); margin-bottom: 8px; }
.budget-input { display: flex; align-items: center; border: 1px solid #889c89; border-radius: 10px; background: white; min-height: 54px; overflow: hidden; }
.budget-input span { flex-shrink: 0; padding-inline: 12px; color: var(--cepe-green); font-weight: 700; }
.budget-input input { width: 100%; min-width: 0; font: inherit; font-size: 16px; border: 0; border-inline: 1px solid #dce5db; padding: 10px; border-radius: 0; }
.budget-input:focus-within { outline: 2px solid var(--cepe-green); outline-offset: 2px; }
.budget-button { width: 100%; min-height: 54px; margin-top: 14px; background: white; color: var(--cepe-green); border: 1px solid #889c89; font: inherit; font-weight: 750; cursor: pointer; }
.budget-feedback { margin: 16px 0 0; color: var(--cepe-green); }
.budget-card .small-note { font-size: 14px; margin-bottom: 0; }

.simulation-header {
  background: var(--cepe-green-dark);
  border-bottom-color: var(--cepe-green-dark);
  padding-top: env(safe-area-inset-top, 0px);
}
.simulation-header :focus-visible { outline-color: var(--cepe-yellow); }

/* Identidade compartilhada com a landing page e hierarquia do fluxo. */
:root { --cepe-logo-green: #003300; }
.brand-strip, .simulation-header, .flow-footer {
  background: var(--cepe-logo-green);
  border-color: var(--cepe-logo-green);
}
button, input, select, textarea { font-family: inherit; }
.button { font-family: inherit; border: 0; cursor: pointer; }
.button-yellow:active { background: #dbaa00; }
.button:focus-visible, .edit-age-link:focus-visible, .back-link:focus-visible {
  outline: 3px solid var(--cepe-green);
  outline-offset: 4px;
}
.spouse-toggle input[type=checkbox] { accent-color: var(--cepe-green); }
.dps-form > h2, .age-card > h2 {
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.25;
  margin-bottom: 18px;
}
.dps-form > h2:not(:first-child) { margin-top: 28px; }
.combo-items span, .simulation-note, .adjustment { font-size: 14px; }
.budget-button { border: 1px solid #889c89; }
.budget-button:hover { background: var(--cepe-soft); }

.thank-you-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.thank-you-page > .brand-strip,
.thank-you-page > .header,
.thank-you-page > .flow-footer { flex-shrink: 0; }
.thank-you-page > .flow-main {
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  padding-block: clamp(24px, 5dvh, 64px);
}
.thank-you-page .age-layout { width: 100%; }
.thank-you-page > .flow-footer {
  padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
}

/* Composição dos planos: valores alinhados e participantes identificados por cor e texto. */
.combo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.combo-card { min-width: 0; }
.combo-description { min-height: 0; }
.combo-participants { margin: 0 0 18px; font-size: 14px; }
.combo-table-scroll { width: 100%; overflow-x: auto; margin-bottom: 14px; }
.combo-table { table-layout: fixed; min-width: 260px; font-size: 13px; }
.combo-table .product-column { width: 48%; }
.combo-table .capital-column { width: 28%; }
.combo-table .monthly-column { width: 24%; }
.combo-table th, .combo-table td { padding: 14px 6px; font-size: 13px; line-height: 1.5; vertical-align: middle; }
.combo-table thead th { font-weight: 500; color: var(--cepe-body); }
.combo-table tbody th { font-weight: 650; overflow-wrap: anywhere; }
.combo-table td { white-space: normal; font-variant-numeric: tabular-nums; }
.combo-table td:last-child { text-align: right; }
.combo-table .combo-row-holder { background: #e3f6d8; }
.combo-table .combo-row-spouse { background: #fff5b8; }
.combo-table tfoot th, .combo-table tfoot td { font-weight: 750; color: var(--cepe-green); }
.combo-table .combo-row-total { background: white; }
.combo-conditions { margin: 0 0 20px; font-size: 14px; line-height: 1.55; }
@media (max-width: 700px) {
  .combo-grid { grid-template-columns: minmax(0, 1fr); }
  .combo-card { padding: 20px 14px; }
  .combo-table th, .combo-table td { font-size: 12px; padding: 12px 5px; }
}

/* Titular e cônjuge: a identificação textual acompanha as cores dos campos. */
.participant-holder-form { --person-border: #176333; --person-tint: #edf4ed; --person-focus: #176333; }
.participant-spouse-form { --person-border: #e8bf27; --person-tint: #fff6cf; --person-focus: #967000; }
.participant-age-panel.participant-holder-form,
.participant-age-panel.participant-spouse-form {
  background: var(--person-tint);
  border: 2px solid var(--person-border);
}
.form-section.participant-holder-form,
.form-section.participant-spouse-form,
.participant-health .form-section,
.age-modal.participant-holder-form,
.age-modal.participant-spouse-form { border-color: var(--person-border); }
:is(.participant-holder-form, .participant-spouse-form) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea) {
  border: 2px solid var(--person-border);
}
:is(.participant-holder-form, .participant-spouse-form) :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--person-focus);
  outline-offset: 3px;
}
.participant-health .question-section label { border: 2px solid var(--person-border); }
.participant-health .question-section label:has(input:checked) { background: var(--person-tint); }
.participant-health input[type=radio] { accent-color: var(--person-focus); }
.participant-health > h2 {
  padding: 14px 16px;
  border-left: 4px solid var(--person-border);
  border-radius: 8px;
  background: var(--person-tint);
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.25;
  margin: 28px 0 20px;
}
:is(.participant-holder-form, .participant-spouse-form) :is(input, select, textarea)[aria-invalid=true] {
  border-color: #a12a1b;
}

.entry-fields { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.entry-fields:disabled { opacity: .55; }
.entry-fields > .button { margin-top: 24px; }
.product-selection label { display: flex; align-items: center; gap: 12px; padding-block: 12px; min-height: 44px; color: var(--cepe-green); }
.product-selection input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--cepe-green); flex-shrink: 0; }
.product-selection form > .button { margin-top: 18px; }
#cliente-atual-aviso[hidden] { display: none; }

/* Fundo das perguntas da DPS acompanha a identidade de cada participante. */
.participant-health .form-section {
  background: var(--person-tint);
}
.participant-health .form-section legend {
  background: var(--person-tint);
  border-radius: 6px;
}
.participant-health .question-section label {
  background: #fff;
}
.participant-health .question-section label:has(input:checked) {
  background: #fff;
  border-color: var(--person-focus);
  box-shadow: inset 0 0 0 1px var(--person-focus);
  font-weight: 700;
}

/* Cards de entrada, cadastro e modais seguem as mesmas cores da DPS. */
.form-section.participant-holder-form,
.form-section.participant-spouse-form,
.age-card.participant-holder-form,
.age-modal.participant-holder-form,
.age-modal.participant-spouse-form {
  background: var(--person-tint);
}
.form-section.participant-holder-form > legend,
.form-section.participant-spouse-form > legend {
  background: var(--person-tint);
  border-radius: 6px;
}
.age-card .spouse-fields > .participant-spouse-form {
  background: var(--person-tint);
  border: 1px solid var(--person-border);
  border-radius: 12px;
  padding: 18px;
}
.age-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.age-modal input { background: #fff; }

.legal-acceptance { margin: 24px 0; }
.legal-acceptance label { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; line-height: 1.6; }
.legal-acceptance input[type=checkbox] { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 3px; accent-color: var(--cepe-green); }
.legal-acceptance a, .legal-document a { text-decoration: underline; overflow-wrap: anywhere; }
.legal-document { max-width: 800px; margin: 0 auto 40px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-document h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.2; }
.legal-document h2 { margin-top: 28px; font-size: 1.3rem; }
