.rae-page {
  background: #f4f7f8;
}

.rae-page .header-cta,
.rae-page .mobile-cta,
.rae-page .footer-cta {
  display: none;
}

.rae-intro {
  padding: 72px 0 36px;
  background: #102a43;
  color: #fff;
}

.rae-intro-inner {
  max-width: 860px;
}

.rae-intro .eyebrow {
  color: #78d8cf;
}

.rae-intro h1 {
  max-width: 780px;
  margin: 16px 0 24px;
  color: #fff;
}

.rae-intro h1 em {
  color: #78d8cf;
  font-style: normal;
}

.rae-intro p {
  max-width: 720px;
  color: rgba(255,255,255,.78);
}

.rae-app-section {
  padding: 46px 0 90px;
}

.rae-shell {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
}

.rae-progress {
  margin-bottom: 22px;
}

.rae-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}

.rae-stage {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #1f6970;
}

.rae-stage.is-safety {
  color: #94452f;
}

.rae-count {
  font-size: 13px;
  color: #74818b;
}

.rae-progress-line {
  height: 2px;
  background: #dce4e7;
  overflow: hidden;
}

.rae-progress-line span {
  display: block;
  width: 36%;
  height: 100%;
  background: #2d8b91;
}

.rae-question-card,
.rae-result-card {
  padding: clamp(28px,5vw,64px);
  background: #fff;
  border: 1px solid #dce4e7;
  border-radius: 4px;
  box-shadow: 0 22px 70px rgba(16,42,67,.07);
}

.rae-question-head {
  max-width: 790px;
  margin-bottom: 34px;
}

.rae-kicker,
.rae-result-label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #2d8b91;
}

.rae-question-card h1,
.rae-result-card h1 {
  margin: 0;
  font-size: clamp(30px,4.4vw,52px);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: #102a43;
}

.rae-help,
.rae-result-intro {
  margin: 20px 0 0;
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
  color: #62717b;
}

.rae-multiple-help {
  margin-bottom: 14px;
  font-size: 13px;
  color: #74818b;
}

.rae-options {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.rae-option {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 16px 18px;
  border: 1px solid #d7e0e4;
  border-radius: 3px;
  background: #fff;
  color: #243746;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.rae-option:hover {
  border-color: #6daeb1;
  transform: translateY(-1px);
}

.rae-option.is-selected {
  border-color: #2d8b91;
  background: #edf7f6;
}

.rae-option-marker {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #96a7af;
  border-radius: 50%;
  position: relative;
}

.rae-option.is-selected .rae-option-marker {
  border-color: #2d8b91;
}

.rae-option.is-selected .rae-option-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #2d8b91;
}

[data-exclusive="true"] .rae-option-marker {
  border-radius: 3px;
}

[data-exclusive="true"].is-selected .rae-option-marker::after {
  border-radius: 1px;
}

.rae-actions,
.rae-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.rae-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 2px;
  background: #102a43;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.rae-primary:hover {
  background: #173a5a;
}

.rae-text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #5e707a;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.rae-validation {
  margin-top: 20px;
  padding: 12px 14px;
  background: #fff4ef;
  color: #8a3b27;
  border-left: 3px solid #b85c42;
}

.rae-local-note {
  margin: 24px 0 0;
  font-size: 12px;
  color: #87949b;
}

.rae-context-note,
.rae-result-meta {
  display: grid;
  grid-template-columns: .8fr 1.5fr;
  gap: 28px;
  margin: 20px 0 0;
  padding: 22px 26px;
  color: #62717b;
  font-size: 14px;
  line-height: 1.6;
}

.rae-context-note strong,
.rae-result-meta strong {
  color: #102a43;
}

.rae-scale {
  max-width: 760px;
  padding: 24px 0 8px;
}

.rae-scale-value {
  margin-bottom: 26px;
}

.rae-scale-value output {
  font-size: clamp(34px,5vw,54px);
  font-weight: 700;
  letter-spacing: -.04em;
  color: #102a43;
}

.rae-scale input[type="range"] {
  width: 100%;
  accent-color: #2d8b91;
}

.rae-scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  font-size: 12px;
  color: #75838c;
}

.rae-result-shell {
  max-width: 960px;
}

.rae-result-card {
  border-top: 4px solid #2d8b91;
}

.rae-result-card.tone-medical {
  border-top-color: #b28a45;
}

.rae-result-card.tone-urgent,
.rae-result-card.tone-emergency {
  border-top-color: #b85c42;
}

.rae-result-section,
.rae-next-step {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #e2e8eb;
}

.rae-exploration-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: #40545f;
}

.rae-next-step h2 {
  margin: 0 0 12px;
  color: #102a43;
  font-size: clamp(24px,3vw,34px);
}

.rae-next-step p {
  max-width: 720px;
  color: #62717b;
  line-height: 1.65;
}

.rae-medical-action {
  max-width: 620px;
  padding: 18px 20px;
  background: #f4f0e8;
  border-left: 3px solid #b28a45;
  color: #4b4333;
  font-weight: 700;
}

.tone-urgent .rae-medical-action,
.tone-emergency .rae-medical-action {
  background: #fff1ed;
  border-left-color: #b85c42;
  color: #843c29;
}

.rae-clarification {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #e2e8eb;
  font-size: 13px;
  line-height: 1.65;
  color: #75838c;
}

.rae-error {
  color: #963f2b;
}

@media (max-width: 720px) {
  .rae-intro {
    padding: 52px 0 28px;
  }

  .rae-app-section {
    padding: 28px 0 64px;
  }

  .rae-shell {
    width: min(100% - 20px,1040px);
  }

  .rae-question-card,
  .rae-result-card {
    padding: 26px 20px 30px;
  }

  .rae-options {
    grid-template-columns: 1fr;
  }

  .rae-option {
    min-height: 60px;
  }

  .rae-context-note,
  .rae-result-meta {
    grid-template-columns: 1fr;
    padding: 18px 8px;
  }

  .rae-scale-labels {
    font-size: 11px;
  }

  .rae-actions,
  .rae-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rae-primary {
    width: 100%;
  }
}

/* =========================================================
   RAE · RESULTADO RICO V1
   ========================================================= */

.rae-result-summary {
  margin-top: 34px;
  padding: 24px 26px;
  background: #f5f9f9;
  border-left: 3px solid #2d8b91;
}

.rae-result-summary .rae-result-label,
.rae-result-section .rae-result-label,
.rae-next-step .rae-result-label {
  display: block;
  margin-bottom: 14px;
}

.rae-result-summary p,
.rae-result-section p {
  max-width: 760px;
  margin: 0;
  color: #40545f;
  font-size: 16px;
  line-height: 1.75;
}

.rae-reported-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rae-reported-list li {
  position: relative;
  padding-left: 22px;
  color: #40545f;
  line-height: 1.7;
}

.rae-reported-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d8b91;
}

.rae-exploration-context {
  margin-bottom: 18px !important;
}

.rae-why-physical {
  max-width: 780px;
}

.rae-download-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid #b9c7cd;
  border-radius: 2px;
  background: #fff;
  color: #102a43;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rae-download-summary:hover {
  border-color: #2d8b91;
}

.rae-download-summary[disabled] {
  opacity: .55;
  cursor: default;
}

.rae-download-note {
  flex-basis: 100%;
  margin: -8px 0 0;
  color: #87949b;
  font-size: 12px;
}

@media (max-width: 720px) {
  .rae-result-summary {
    padding: 20px 18px;
  }

  .rae-download-summary {
    width: 100%;
  }
}


/* =========================================================
   RAE · KNOWLEDGE BASE · RESULTADO PACIENTE V1
   ========================================================= */

.rae-knowledge-section {
  position: relative;
}

.rae-knowledge-intro {
  max-width: 780px !important;
  margin-bottom: 22px !important;
}

.rae-knowledge-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.rae-knowledge-item {
  padding: 20px 22px;
  border: 1px solid #dce5e8;
  border-left: 3px solid #2d8b91;
  background: #fbfdfd;
}

.rae-knowledge-relevance {
  display: block;
  margin-bottom: 7px;
  color: #2d8b91;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.rae-knowledge-item h3 {
  margin: 0 0 9px;
  color: #102a43;
  font-size: 19px;
  line-height: 1.3;
}

.rae-knowledge-item p {
  max-width: 760px;
  margin: 0;
  color: #52656f;
  font-size: 15px;
  line-height: 1.7;
}

.rae-knowledge-disclaimer {
  margin-top: 18px !important;
  padding: 15px 17px;
  border-left: 2px solid #c8d5d9;
  background: #f7f9fa;
  color: #6e7c84 !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}

@media (max-width: 720px) {
  .rae-knowledge-item {
    padding: 18px 17px;
  }
}

/* =========================================================
   RAE · NAVEGACIÓN ENTRE PREGUNTAS
   ========================================================= */

.rae-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid #b8c8cf;
  border-radius: 2px;
  background: #fff;
  color: #173a5a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rae-secondary:hover {
  border-color: #2d8b91;
  background: #f5f9f9;
}

.rae-secondary:focus-visible,
.rae-primary:focus-visible,
.rae-text-button:focus-visible {
  outline: 3px solid rgba(45, 139, 145, .28);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .rae-secondary {
    width: 100%;
  }
}


/* RAE · explicación de escalamiento médico */

.rae-medical-reason {
  margin-top: 24px;
  padding: 20px 22px;
  border-left: 3px solid #b85c42;
  background: #fff7f3;
}

.rae-medical-reason strong {
  display: block;
  margin-bottom: 12px;
  color: #6f2f20;
}

.rae-medical-reason .rae-reported-list {
  margin-bottom: 14px;
}

.rae-medical-context {
  margin: 14px 0 0 !important;
  color: #667781;
  font-size: 14px;
  line-height: 1.65;
}
