.roadmap-page main.container { width: min(1480px, calc(100% - 48px)); }
.roadmap-page .header-space { height: 100.5px; }
.roadmap-page .header { transition: none; }
.roadmap-page .brand { transform: scale(.5); transition: none; }
.assessment-intro { max-width: 960px; padding-block: 32px 24px; }
.assessment-intro h1 { font-size: clamp(34px, 4.5vw, 58px); margin-bottom: 20px; }
.assessment-intro .eyebrow { margin-top: 28px; }
.text-link { color: #004ab6; text-underline-offset: 4px; }
.assessment-intro p { max-width: 850px; }
.assessment-steps { padding-left: 22px; color: var(--muted); }
.assessment-steps li { margin-bottom: 6px; }
.assessment-steps li { animation: instruction-pulse 850ms ease-in-out 1 both; animation-delay: 200ms; border-radius: 4px; }
.assessment-steps li:nth-child(2) { animation-delay: 1050ms; }
.assessment-steps li:nth-child(3) { animation-delay: 1900ms; }
@keyframes instruction-pulse {
  0%, 100% { background-color: transparent; color: var(--muted); }
  45% { background-color: #bdeaff; color: #004ab6; box-shadow: 0 0 0 5px #bdeaff; }
}
.matrix-scroll { overflow-x: auto; border: 1px solid #c6d2dd; border-radius: 8px; background: #fff; }
.matrix-scroll:focus-visible { outline: 3px solid #005cdb; outline-offset: 3px; }
.maturity-matrix { width: 100%; min-width: 1120px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.5; }
.maturity-matrix caption { text-align: left; padding: 16px; font-weight: 650; background: #eaf3fc; }
.maturity-matrix th, .maturity-matrix td { border-right: 1px solid #dce4ed; border-bottom: 1px solid #dce4ed; vertical-align: top; }
.maturity-matrix tr > :last-child { border-right: 0; }
.maturity-matrix tbody tr:last-child > * { border-bottom: 0; }
.maturity-matrix thead th { padding: 18px 12px; text-align: left; background: #edf5fd; }
.maturity-matrix thead th:first-child { width: 165px; font-size: 17px; }
.maturity-matrix tbody th { position: sticky; left: 0; z-index: 1; background: #f0f4f7; padding: 20px 14px; box-shadow: 2px 0 0 #dce4ed; vertical-align: middle; }
.stage-number { display: block; color: #005cdb; font-size: 13px; border-top: 3px solid #005cdb; padding-top: 10px; }
.stage-name { display: block; font-size: 17px; margin-block: 6px; }
.stage-summary { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.maturity-matrix td { position: relative; padding: 0; }
.maturity-choice { display: block; padding: 16px 12px; min-height: 144px; cursor: pointer; height: 100%; }
.choice-card { display: grid; position: relative; min-height: 112px; transform-style: preserve-3d; transform: perspective(800px) rotateY(0deg); transition: transform 560ms ease var(--reveal-delay, 0ms); }
.choice-cover, .choice-description { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.choice-cover { display: flex; align-items: center; justify-content: center; text-align: center; color: #0050ad; font-weight: 600; background: #edf5fd; border-radius: 4px; padding: 8px; }
/* Oculta explicitamente cada face na metade da virada, inclusive no Firefox. */
.choice-cover, .choice-description { transition: visibility 0s linear calc(var(--reveal-delay, 0ms) + 280ms); }
.choice-cover { visibility: visible; }
.choice-description { transform: rotateY(180deg); visibility: hidden; }
.is-revealed .choice-card { transform: perspective(800px) rotateY(180deg); }
.is-revealed .choice-cover { visibility: hidden; }
.is-revealed .choice-description { visibility: visible; }
.is-revealed td:nth-of-type(2) { --reveal-delay: 45ms; }
.is-revealed td:nth-of-type(3) { --reveal-delay: 90ms; }
.is-revealed td:nth-of-type(4) { --reveal-delay: 135ms; }
.is-revealed td:nth-of-type(5) { --reveal-delay: 180ms; }
.is-revealed td:nth-of-type(6) { --reveal-delay: 225ms; }
/* Amplia o clique para toda a célula, inclusive sua área vazia. */
.maturity-choice::after { content: ""; position: absolute; inset: 0; }
/* Preserva seleção exclusiva, leitores de tela e setas do teclado sem exibir o controle. */
.maturity-choice input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.maturity-matrix td:hover { background: #f1f8ff; }
.maturity-matrix td:has(.is-selected) { background: #def0ff; box-shadow: inset 0 0 0 2px #005cdb; }
.maturity-matrix td:focus-within { outline: 3px solid #005cdb; outline-offset: -3px; }
.assessment-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.assessment-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
button.button { font: inherit; border: 0; margin: 0; cursor: pointer; }
button.button:disabled { background: #e1e7ed; color: #52616e; cursor: not-allowed; }
button:focus-visible { outline: 3px solid #005cdb; outline-offset: 4px; }
.button-secondary { background: transparent; box-shadow: inset 0 0 0 1px #b0becd; }
.assessment-status { margin-top: 0; color: var(--muted); }
#assessment { scroll-margin-top: 128px; }
.assessment-note, .methodology { color: var(--muted); font-size: 13px; }
.methodology { border-top: 1px solid #d7ded8; margin-top: 24px; padding-block: 24px; }
.roadmap-results { border-top: 2px solid #005cdb; padding-block: 32px 48px; scroll-margin-top: 128px; }
.roadmap-results[hidden] { display: none; }
.roadmap-results > p { max-width: 960px; }
.roadmap-results:focus { outline: none; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.foundation-notice { background: #fff3d9; border-left: 4px solid #9e6900; padding: 16px 20px; }
.roadmap-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-block: 28px; }
.roadmap-card { border: 1px solid #c6d2dd; border-radius: 8px; padding: 24px; background: #fff; }
.roadmap-card h3 { margin: 0 0 12px; font-size: 23px; line-height: 1.3; }
.roadmap-card .eyebrow { font-size: 11px; margin-bottom: 12px; color: #0050ad; }
.level-transition { font-weight: 650; color: #004ab6; }
.roadmap-card ol { padding-left: 20px; }
.roadmap-card li { padding-left: 3px; margin-bottom: 10px; }
.roadmap-card dt { font-weight: 650; font-size: 13px; margin-top: 16px; }
.roadmap-card dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dependency-note { border-left: 3px solid #c58c1c; padding-left: 12px; font-size: 14px; }
.ai-callout { background: #eaf3fc; border: 1px solid #c6dcee; border-radius: 8px; padding: 24px; margin-bottom: 32px; }
.ai-callout h2 { max-width: 800px; }
.ai-callout p { max-width: 800px; margin-block: 0 12px; }
.ai-callout .button { margin-top: 4px; }
.roadmap-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 32px; border: 1px solid #c6d2dd; border-radius: 12px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px #03142e40; }
.roadmap-dialog::backdrop { background: #03142e99; }
.roadmap-dialog h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.25; margin-bottom: 24px; }
.roadmap-dialog .eyebrow { font-size: 11px; margin-bottom: 12px; color: #0050ad; }
.roadmap-dialog label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.roadmap-dialog input { display: block; width: 100%; min-height: 46px; padding: 10px 12px; margin-bottom: 18px; border: 1px solid #9baec2; border-radius: 4px; font: inherit; color: var(--ink); background: #fff; }
.roadmap-dialog input:focus-visible { outline: 3px solid #005cdb; outline-offset: 2px; }
.request-note { font-size: 12px; color: var(--muted); margin: 0; }
.request-status { font-size: 14px; color: #174d3b; }
.request-status:empty { display: none; }
.request-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.request-actions .button { justify-content: center; width: 100%; }
@media (max-width: 600px) { .roadmap-dialog { padding: 24px; } .request-actions .button { flex: 1; justify-content: center; } }
@media (min-width: 901px) {
  .roadmap-page .header-space { height: 80px; }
  .roadmap-results, #assessment { scroll-margin-top: 104px; }
}
@media (max-width: 600px) { .roadmap-page .header-space { height: 107px; } }
@media (prefers-reduced-motion: reduce) {
  .assessment-steps li { animation: none; }
  .choice-card, .choice-cover, .choice-description { transition: none; }
}
@media (max-width: 700px) {
  .roadmap-page main.container { width: calc(100% - 32px); }
  .roadmap-cards { grid-template-columns: 1fr; }
  .roadmap-card { padding: 20px; }
  .assessment-controls { align-items: flex-start; flex-direction: column; }
  .assessment-buttons { width: 100%; }
  .assessment-buttons .button { justify-content: center; width: 100%; }
  .maturity-matrix { min-width: 1060px; }
  .maturity-matrix thead th:first-child { width: 100px; }
  .maturity-matrix tbody th { padding-inline: 10px; font-size: 12px; }
  .ai-callout { padding: 20px; }
}
