.result-stage {
  width: min(100% - 32px, 1080px);
  padding: 72px 0 110px;
}

.result-modal {
  overflow: hidden;
  border: 1px solid rgba(25, 25, 23, 0.1);
  border-radius: 34px;
  background: #fbfbf8;
  box-shadow: 0 34px 90px rgba(38, 32, 48, 0.14), 0 2px 8px rgba(38, 32, 48, 0.05);
}

.result-modal-art {
  height: 220px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 24px;
  background: #f5f5f2 url("result-header.png") center 47% / cover no-repeat;
}

.window-dot {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(103, 76, 150, 0.18);
}

.result-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: 32px;
  align-items: start;
  padding: 0 48px 48px;
}

.result-modal-title,
.score-overview,
.modal-actions {
  grid-column: 1 / -1;
}

.diagnosis-panel {
  grid-column: 1;
}

.result-modal .email-gate,
.result-modal .recommendations {
  grid-column: 2;
}

.result-modal-title {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -25px auto 54px;
  padding: 11px 18px 11px 11px;
  position: relative;
  border: 1px solid rgba(25, 25, 23, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.94);
  box-shadow: 0 12px 30px rgba(49, 39, 68, 0.1);
  backdrop-filter: blur(12px);
}

.result-modal-title div {
  display: grid;
  gap: 2px;
}

.result-modal-title strong {
  font-size: 14px;
  font-weight: 500;
}

.result-modal-title small {
  color: var(--muted);
  font-size: 11px;
}

.result-modal .result-heading {
  margin: 0;
  padding: 0 0 42px;
  text-align: center;
}

.result-modal .score-line {
  justify-content: center;
}

.result-modal .result-heading > p:last-child {
  margin-inline: auto;
}

.diagnosis-panel,
.modal-breakdown {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.diagnosis-panel h3 {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.diagnosis-panel > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.result-modal .email-gate {
  margin: 6px 0 30px;
  padding: 28px;
  border-radius: 18px;
  background: #f0f0eb;
}

.result-modal .recommendations {
  margin: 6px 0 30px;
  border-top: 0;
}

.result-modal .recommendation-block {
  border-bottom: 0;
}

.modal-breakdown .breakdown {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
}

.modal-actions {
  display: grid;
  gap: 18px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.modal-actions .restart-button {
  width: fit-content;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .result-stage { padding: 28px 0 70px; }
  .result-modal { border-radius: 24px; }
  .result-modal-art { height: 156px; }
  .result-modal-body { padding: 0 22px 32px; }
  .result-modal-title { margin-bottom: 40px; }
  .modal-breakdown .breakdown { grid-template-columns: 1fr; }
  .result-modal .email-gate { padding: 23px 18px; }
}

/* Unified rounded surfaces */
.start-panel,
.result-panel,
.email-gate,
.recommendation-block,
.closing-cta {
  border-radius: 18px;
}

/* Pair the opening message and action card in one balanced desktop row. */
.view.intro.active {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: clamp(44px, 6vw, 76px);
  align-items: center;
}

.intro-copy {
  margin-bottom: 0;
}

.intro h1 {
  font-size: clamp(48px, 5.2vw, 68px);
}

.start-panel {
  width: 100%;
  margin: 0;
}

@media (max-width: 820px) {
  .view.intro.active {
    display: block;
  }

  .intro-copy {
    margin-bottom: 42px;
  }

  .start-panel {
    width: min(100%, 680px);
  }
}

.start-note {
  border-radius: 12px;
}

.answers {
  border-top: 0;
}

.answer {
  margin-bottom: 10px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 247, 242, 0.45);
}

.answer:hover,
.answer.selected {
  padding-left: 20px;
  padding-right: 20px;
}

/* Combined score and breakdown insight card */
.score-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.05fr;
  align-items: center;
  gap: 40px;
  margin-bottom: 26px;
  padding: 36px;
  border: 1px solid rgba(25, 25, 23, 0.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(41, 36, 50, 0.06);
}

.overview-breakdown .breakdown {
  display: grid;
  gap: 19px;
  margin-top: 22px;
}

.breakdown-item {
  display: block;
}

.score-overview .breakdown-head {
  margin-bottom: 7px;
}

.score-overview .breakdown-bar {
  height: 3px;
  border-radius: 0;
}

.score-overview .breakdown-bar span {
  border-radius: 0;
  background: #9080e9;
}

.breakdown-item:nth-child(2) .breakdown-bar span { background: #62b8ee; }
.breakdown-item:nth-child(3) .breakdown-bar span { background: #53c59a; }
.breakdown-item:nth-child(4) .breakdown-bar span { background: #f0aa65; }
.breakdown-item:nth-child(5) .breakdown-bar span { background: #ee7898; }

.score-overview .result-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  text-align: center;
}

.score-gauge {
  --score: 0;
  width: 230px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(from 215deg, #92e5cf 0%, #83c8ef 25%, #b99aee 50%, #f0a8cf 75%, #f5bf8c 100%);
  box-shadow: 0 18px 40px rgba(91, 77, 128, 0.1);
}

.score-gauge::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
  z-index: 2;
}

.score-gauge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 215deg, transparent 0 calc(var(--score) * 1%), #ecece8 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  z-index: 1;
}

.score-gauge > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.score-gauge strong {
  font-size: 58px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.score-gauge span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 13px;
}

.score-gauge small {
  grid-column: 1 / -1;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.score-overview .result-heading h2 {
  margin: 25px 0 8px;
  font-size: 27px;
}

.score-overview .result-heading > p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.diagnosis-panel,
.result-modal .email-gate,
.result-modal .recommendation-block {
  border-radius: 18px;
}

/* Content dividers stay straight; only true cards retain rounded corners. */
.diagnosis-panel,
.result-modal .recommendation-block:not(.emphasis) {
  border-radius: 0;
}

@media (max-width: 900px) {
  .result-modal-body {
    display: block;
  }
}

.modal-actions .primary-button {
  transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms var(--ease);
}

.modal-actions .primary-button:hover {
  color: #fff;
  background: #343431;
  box-shadow: 0 8px 20px rgba(25, 25, 23, 0.12);
}

body,
p,
.answer,
.breakdown-head {
  letter-spacing: -0.018em;
}

h1 { letter-spacing: -0.052em; }

.question-stage h2,
.result-heading h2,
.diagnosis-panel h3,
.email-gate h4,
.closing-cta h3 {
  letter-spacing: -0.042em;
}

.score-gauge strong { letter-spacing: -0.07em; }

/* Shared CTA finish */
.primary-button,
.secondary-button {
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: none;
  transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms var(--ease);
}

.primary-button:hover,
.secondary-button:hover {
  color: #fff;
  background: #343431;
  box-shadow: 0 8px 20px rgba(25, 25, 23, 0.12);
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0) scale(0.995);
}

.start-note {
  border-radius: 0;
}

@media (max-width: 680px) {
  .score-overview {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 25px 20px 30px;
  }

  .score-overview .result-heading {
    grid-row: 1;
  }

  .score-gauge {
    width: 205px;
  }
}
