:root {
  --cream: #fdecd3;
  --paper: #fffaf2;
  --ink: #062f3b;
  --ink-soft: #34515b;
  --teal: #039692;
  --aqua: #4ccbc3;
  --orange: #ff982a;
  --gold: #fecc84;
  --plum: #6d0d8e;
  --line: rgba(6, 47, 59, 0.16);
  --shadow: 0 18px 50px rgba(6, 47, 59, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.quiz-app {
  background:
    linear-gradient(180deg, rgba(253, 236, 211, 0.72), rgba(255, 250, 242, 0.94) 34%),
    var(--paper);
  min-height: 100svh;
}

.quiz-header {
  align-items: center;
  background: rgba(255, 250, 242, 0.94);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: clamp(14px, 3vw, 28px);
  grid-template-columns: minmax(160px, 270px) minmax(0, 1fr);
  min-height: 86px;
  padding: 14px clamp(18px, 4vw, 54px);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.brand {
  align-items: center;
  display: flex;
  min-width: 0;
}

.brand img {
  display: block;
  max-height: 46px;
  max-width: min(260px, 58vw);
  object-fit: contain;
}

.progress-wrap {
  display: grid;
  gap: 9px;
}

.progress-meta {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  font-weight: 800;
  justify-content: space-between;
  letter-spacing: 0;
  text-transform: uppercase;
}

.progress-track {
  background: rgba(6, 47, 59, 0.13);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
  width: 100%;
}

.progress-fill {
  background: linear-gradient(90deg, var(--teal), var(--orange));
  border-radius: inherit;
  height: 100%;
  transition: width 260ms ease;
  width: var(--progress, 0%);
}

.quiz-shell {
  margin: 0 auto;
  max-width: 1120px;
  min-height: calc(100svh - 86px);
  padding: clamp(34px, 7vw, 84px) clamp(18px, 4vw, 44px);
}

.intro-grid {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 62px);
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
}

.intro-copy,
.intro-media {
  min-width: 0;
}

.eyebrow {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.intro-copy h1 {
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  letter-spacing: 0;
  line-height: 0.94;
  margin-bottom: 22px;
  max-width: 100%;
}

.intro-subtitle {
  color: var(--ink-soft);
  font-size: clamp(1.12rem, 2vw, 1.48rem);
  font-weight: 600;
  max-width: 690px;
}

.intro-proof {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  margin: 30px 0;
  max-width: 720px;
  padding: clamp(20px, 3vw, 30px);
}

.intro-proof p {
  margin-bottom: 12px;
}

.intro-proof p:last-child {
  margin-bottom: 0;
}

.intro-proof strong {
  color: var(--ink);
}

.intro-small {
  color: var(--teal);
  font-weight: 800;
}

.intro-media {
  aspect-ratio: 4 / 5;
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.intro-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: 24% 24%;
  width: 100%;
}

.primary-button,
.answer-option,
.text-button {
  cursor: pointer;
}

.primary-button {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: var(--cream);
  display: inline-flex;
  font-weight: 800;
  gap: 14px;
  justify-content: center;
  min-height: 64px;
  min-width: 190px;
  padding: 16px 30px;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--teal);
  outline: none;
  transform: translateY(-1px);
}

.button-arrow {
  flex: 0 0 auto;
  height: 16px;
  width: 24px;
}

.question-card,
.lead-card,
.loading-card,
.results-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 920px;
  padding: clamp(24px, 5vw, 48px);
}

.question-card {
  background:
    linear-gradient(130deg, rgba(76, 203, 195, 0.12), rgba(255, 152, 42, 0.08)),
    #ffffff;
}

.domain-line {
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: clamp(24px, 4vw, 42px);
}

.question-card h2,
.lead-card h2,
.loading-card h2 {
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin-bottom: 18px;
}

.question-note,
.lead-copy,
.loading-card p:last-child {
  color: var(--ink-soft);
  font-size: 1.04rem;
  font-weight: 600;
  margin-bottom: 26px;
}

.option-list {
  display: grid;
  gap: 14px;
}

.answer-option {
  align-items: center;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 16px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 76px;
  padding: 14px 20px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 100%;
}

.answer-option strong {
  align-items: center;
  background: rgba(3, 150, 146, 0.12);
  border-radius: 999px;
  display: flex;
  font-size: 1.2rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.answer-option span {
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  font-weight: 800;
}

.answer-option:hover,
.answer-option:focus-visible,
.answer-option.selected {
  background: #ffffff;
  border-color: var(--teal);
  outline: none;
  transform: translateY(-1px);
}

.answer-option.selected strong {
  background: var(--teal);
  color: #ffffff;
}

.quiz-nav,
.lead-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 24px;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-weight: 800;
  padding: 10px 0;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--teal);
  outline: none;
}

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

.field-grid label {
  color: var(--ink-soft);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 8px;
  text-transform: uppercase;
}

.full-field {
  grid-column: 1 / -1;
}

input,
textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 50px;
  padding: 12px 13px;
  text-transform: none;
  width: 100%;
}

textarea {
  min-height: 114px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(76, 203, 195, 0.22);
}

.form-status {
  color: var(--plum);
  font-weight: 800;
  margin: 14px 0 0;
  min-height: 24px;
}

.loading-card {
  display: grid;
  justify-items: center;
  text-align: center;
}

.spinner {
  border: 5px solid rgba(3, 150, 146, 0.16);
  border-radius: 50%;
  border-top-color: var(--orange);
  height: 58px;
  margin-bottom: 22px;
  width: 58px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.results-card {
  max-width: 1120px;
  overflow: hidden;
  padding: 0;
}

.results-heading {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(28px, 5vw, 48px);
}

.results-heading h2 {
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.94;
  margin-bottom: 16px;
}

.results-heading p:last-child {
  color: rgba(253, 236, 211, 0.86);
  font-size: 1.05rem;
  max-width: 880px;
}

.results-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding: clamp(24px, 4vw, 40px);
}

.result-score {
  align-items: center;
  aspect-ratio: 1;
  background: var(--cream);
  border: 1px solid rgba(255, 152, 42, 0.34);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  padding: 18px;
}

.result-score span {
  color: var(--plum);
  font-size: 4.8rem;
  font-weight: 800;
  line-height: 0.9;
}

.result-score small {
  color: var(--ink-soft);
  font-weight: 800;
  text-transform: uppercase;
}

.domain-results {
  display: grid;
  gap: 12px;
}

.domain-row {
  display: grid;
  gap: 8px;
}

.domain-row-header {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.domain-row strong {
  color: var(--ink);
}

.domain-row span {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: right;
}

.bar-track {
  background: rgba(6, 47, 59, 0.1);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, var(--teal), var(--orange));
  border-radius: inherit;
  height: 100%;
  min-width: 4px;
}

.growth-panel {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.growth-panel div {
  padding: clamp(22px, 4vw, 34px);
}

.growth-panel div + div {
  border-left: 1px solid var(--line);
}

.growth-panel h3,
.results-grid h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.growth-panel p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .quiz-header,
  .intro-grid,
  .results-grid,
  .growth-panel {
    grid-template-columns: 1fr;
  }

  .quiz-header {
    align-items: start;
  }

  .intro-media {
    aspect-ratio: 16 / 10;
    border-left: 0;
    border-top: 5px solid var(--orange);
  }

  .growth-panel div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .quiz-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .progress-meta,
  .domain-row-header,
  .lead-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .question-card,
  .lead-card,
  .loading-card {
    padding: 22px;
  }

  .question-card h2,
  .lead-card h2,
  .loading-card h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .answer-option {
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 68px;
    padding: 12px 14px;
  }

  .answer-option strong {
    height: 38px;
    width: 38px;
  }

  .primary-button {
    width: 100%;
  }

  .domain-row span {
    text-align: left;
  }
}
