.aps-wrap {
  max-width: 980px;
  margin: 24px auto;
  padding: 24px;
  background: linear-gradient(145deg, #f8fbff 0%, #eef3fb 100%);
  border: 1px solid #d0d8e8;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(29, 47, 90, 0.08);
}

.aps-wrap h2 {
  margin: 10px 0 14px;
  color: #1d2f5a;
}

.aps-page-head {
  display: grid;
  grid-template-columns: minmax(88px, 20%) 1fr minmax(180px, 40%);
  align-items: center;
  gap: 12px;
}

.aps-page-head__logo img,
.aps-step-head__logo img {
  width: min(120px, 100%);
  min-width: 72px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.aps-page-head__image img,
.aps-step-head__image img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  object-position: right center;
}

.aps-intro-text {
  margin: 14px 0;
  line-height: 1.65;
  color: #23396d;
}

.aps-wrap label {
  color: #1d2f5a;
  font-weight: 600;
}

.aps-wrap input[type="text"],
.aps-wrap input[type="email"],
.aps-wrap select {
  width: min(520px, 100%);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #b9c4de;
  background: #fff;
}

.aps-form-block {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border: 1px solid #d0d8e8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.aps-form-block legend {
  display: block;
  max-width: 100%;
  padding: 0 8px;
  color: #1d2f5a;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.aps-form-block--optional legend {
  min-height: 0;
}

.aps-optional-intro-banner {
  margin: 14px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #727ba2;
  color: #fff;
  line-height: 1.5;
}

.aps-form-block-intro {
  margin: 4px 0 10px;
  color: #43567f;
  line-height: 1.5;
}

.aps-optional-question {
  margin: 12px 0 14px;
}

.aps-optional-question__label {
  margin: 0 0 8px;
  color: #1d2f5a;
  font-weight: 600;
}

.aps-optional-options {
  display: grid;
  gap: 6px;
}

.aps-optional-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #23396d;
  font-weight: 400;
}

.aps-field-hint {
  display: block;
  margin-top: 8px;
  color: #43567f;
  font-size: 1.08rem;
  line-height: 1.45;
}

.aps-rgpd-short {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #43567f;
}

.aps-rgpd-full {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d7deee;
  font-size: 12px;
  line-height: 1.5;
  color: #4b5881;
}

.aps-btn {
  display: inline-block;
  background: #1d2f5a;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.aps-btn:hover,
.aps-btn:focus-visible {
  background: #2a3f78;
  transform: translateY(-1px);
}

.aps-screen {
  animation: aps-fade 0.25s ease;
}

.aps-start-image img,
.aps-end-image img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 12px;
}

.aps-end-text {
  margin: 18px 0;
  line-height: 1.85;
  color: #23396d;
  font-size: 1.2rem;
}

.aps-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #dfe6f5;
  overflow: hidden;
}

.aps-progress__bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #1d2f5a 0%, #48c9b0 100%);
  transition: width 15s linear;
}

.aps-progress-text {
  margin-top: 12px;
  color: #23396d;
  font-weight: 600;
}

.aps-step-wrap {
  display: flex;
  flex-direction: column;
  min-height: 68vh;
}

.aps-step-head {
  display: grid;
  grid-template-columns: minmax(88px, 20%) 1fr minmax(180px, 40%);
  align-items: center;
  gap: 12px;
}

.aps-step-head__center {
  margin-left: 8px;
  color: #727ba2;
  font-weight: 700;
  font-size: 2.4rem;
}

.aps-step-title {
  width: 80%;
  margin: 18px auto 0;
  text-align: center;
  color: #1d2f5a;
  font-size: 2.2rem;
  line-height: 1.2;
}

.aps-step-question {
  width: 80%;
  margin: 12px auto 0;
  text-align: center;
  color: #1f2f58;
  font-size: 1.55rem;
  line-height: 1.45;
}

.aps-answers-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.aps-answer-card {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #b9c4de;
  background: #fff;
  color: #1d2f5a;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.aps-answer-card:hover {
  border-color: #8395c2;
  box-shadow: 0 8px 18px rgba(29, 47, 90, 0.12);
  transform: translateY(-1px);
}

.aps-answer-card:focus-visible {
  outline: 3px solid #8aa4df;
  outline-offset: 2px;
}

.aps-answer-card.is-selected {
  border-color: #1d2f5a;
  background: #f0f4ff;
  box-shadow: 0 0 0 1px #1d2f5a inset;
}

.aps-answer-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.aps-step-actions {
  margin-top: 18px;
  text-align: center;
}

.aps-step-note {
  margin-top: auto;
  padding-top: 20px;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #43567f;
}

.aps-result {
  padding: 18px;
  border-radius: 12px;
  background: #edf9f4;
  border: 1px solid #b8e3cf;
  color: #1b4332;
}

.aps-profile-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.aps-profile-head {
  display: grid;
  grid-template-columns: 20% 70%;
  gap: 4%;
  align-items: center;
}

.aps-profile-head__logo img {
  width: min(130px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.aps-profile-head__title {
  font-size: 1.75rem;
  font-weight: 800;
}

.aps-profile-card {
  border: 1px solid #d0d8e8;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

.aps-profile-card p {
  font-size: 1.12rem;
  line-height: 1.75;
}

.aps-profile-card--title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
}

.aps-profile-main {
  display: grid;
  grid-template-columns: 45% 45%;
  gap: 10%;
  align-items: start;
}

.aps-profile-main__photo img {
  width: 100%;
  border-radius: 12px;
}

.aps-profile-main__radar svg {
  width: 100%;
  height: auto;
}

.aps-radar-wrap {
  position: relative;
  padding: 30px;
}

.aps-radar-axis-label {
  position: absolute;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.aps-radar-axis-label--perception {
  top: 10%;
  left: 17%;
  color: #727ba2;
  transform: rotate(-18deg);
}

.aps-radar-axis-label--confiance {
  top: 10%;
  right: 17%;
  color: #727ba2;
  transform: rotate(18deg);
}

.aps-radar-axis-label--temps {
  top: 44%;
  right: 1%;
  color: #48c9b0;
}

.aps-radar-axis-label--interaction {
  top: 72%;
  right: 11%;
  color: #48c9b0;
  transform: rotate(20deg);
}

.aps-radar-axis-label--cognition {
  top: 72%;
  left: 11%;
  color: #a569bd;
  transform: rotate(-20deg);
}

.aps-radar-axis-label--controle {
  top: 44%;
  left: 1%;
  color: #a569bd;
}

.aps-profile-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.aps-profile-duo .aps-profile-card p,
.aps-profile-duo .aps-profile-card h3 {
  font-size: 1.24rem;
  line-height: 1.65;
}

.aps-radar-text {
  font-size: 1.24rem;
  line-height: 1.8;
}

.aps-profile-card--small {
  font-size: 1.24rem;
  line-height: 1.65;
  color: #4b5881;
}

.aps-ai-intro {
  font-size: 1.24rem;
  line-height: 1.75;
  margin-bottom: 10px;
}

.aps-ai-content {
  font-size: 1.24rem;
  line-height: 1.75;
}

.aps-ai-content strong {
  font-weight: 700;
}

.aps-profile-note {
  margin-top: 12px;
  font-size: 1.24rem;
  line-height: 1.75;
}

.aps-profile-note--disclaimer {
  font-size: 1.24rem;
  line-height: 1.75;
  color: inherit;
}

.aps-profile-download {
  text-align: center;
}

.aps-profile-download--hint {
  color: #5f6f95;
}

@keyframes aps-fade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .aps-wrap {
    margin: 14px;
    padding: 16px;
  }

  .aps-page-head,
  .aps-step-head {
    grid-template-columns: 20% 1fr 40%;
    gap: 8px;
  }

  .aps-step-head__center {
    font-size: 1.8rem;
  }

  .aps-step-title {
    width: 100%;
    font-size: 1.7rem;
  }

  .aps-step-question {
    width: 100%;
    font-size: 1.25rem;
  }

  .aps-answers-grid {
    grid-template-columns: 1fr;
  }

  .aps-answer-card {
    min-height: 96px;
  }

  .aps-step-note {
    font-size: 1.05rem;
  }

  .aps-end-text {
    font-size: 1.32rem;
    line-height: 1.75;
  }

  .aps-profile-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .aps-profile-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .aps-profile-duo {
    grid-template-columns: 1fr;
  }

  .aps-radar-axis-label {
    font-size: 0.84rem;
  }
}
