:root {
  color-scheme: light;
  --ink: #24322f;
  --muted: #65726e;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --soft: #eef3ed;
  --line: #dfe6dd;
  --accent: #557c70;
  --accent-dark: #365d52;
  --gold: #c49a55;
  --rose: #f4e8df;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(244, 232, 223, 0.9), transparent 30rem),
    linear-gradient(135deg, #fbfaf6 0%, #f0f5ef 100%);
  color: var(--ink);
}

button {
  font: inherit;
}

.welcome,
.appShell,
.reportShell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px;
}

.welcome {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.welcomePanel,
.questionCard,
.reportHero,
.reportCard,
.noteCard {
  border: 1px solid rgba(85, 124, 112, 0.16);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(36, 50, 47, 0.08);
}

.welcomePanel {
  width: min(100%, 760px);
  border-radius: 28px;
  padding: clamp(28px, 6vw, 64px);
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 880px;
  margin: 0;
  color: #1f302c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 8vw, 4.9rem);
  font-weight: 500;
  line-height: 0.98;
}

.questionCard h1 {
  font-size: clamp(1.8rem, 6vw, 3.25rem);
  line-height: 1.05;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.15;
}

h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.intro,
.reportHero p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  line-height: 1.65;
}

.welcomeCredit {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 18px 0 0;
}

.welcomeCredit a {
  color: var(--accent-dark);
  font-weight: 800;
}

.primaryButton,
.secondaryButton {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  padding: 13px 22px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primaryButton {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 30px rgba(85, 124, 112, 0.24);
}

.primaryButton:hover,
.secondaryButton:hover,
.optionButton:hover {
  transform: translateY(-1px);
}

.primaryButton:disabled,
.secondaryButton:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.primaryButton.large {
  width: 100%;
  max-width: 320px;
}

.secondaryButton {
  border: 1px solid var(--line);
  background: white;
  color: var(--accent-dark);
}

.appShell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.questionCard {
  width: min(100%, 840px);
  border-radius: 28px;
  padding: clamp(22px, 5vw, 48px);
}

.topLine,
.navRow,
.actionRow {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.topLine {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  margin-bottom: 12px;
}

.progressTrack {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee7;
  margin-bottom: 30px;
}

.progressFill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 220ms ease;
}

.optionsGrid {
  display: grid;
  gap: 12px;
  margin: 30px 0;
}

.optionButton {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.35;
  min-height: 58px;
  padding: 16px 18px;
  text-align: left;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.optionButton.selected {
  border-color: var(--accent);
  background: #edf5ef;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.optionButton span {
  display: block;
  font-weight: 720;
}

.profileOptions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profileCard {
  align-content: start;
  display: grid;
  gap: 12px;
  min-height: 132px;
  padding: 18px;
}

.profileIcon {
  align-items: center;
  background: #f7efe7;
  border: 1px solid rgba(196, 154, 85, 0.22);
  border-radius: 16px;
  color: var(--accent-dark);
  display: inline-flex !important;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.profileIcon svg {
  display: block;
  fill: none;
  height: 27px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 27px;
}

.profileCard.selected .profileIcon {
  background: white;
  border-color: rgba(85, 124, 112, 0.28);
}

.navRow {
  margin-top: 8px;
}

.reportShell {
  padding-bottom: 54px;
}

.reportHero {
  border-radius: 0 0 30px 30px;
  padding: clamp(28px, 6vw, 64px);
}

.reportHero h1 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.actionRow {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 28px;
}

.bottomActions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.reportGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.reportCard,
.noteCard {
  border-radius: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.wide {
  grid-column: 1 / -1;
}

.recommendationCard p {
  color: #52615d;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.75;
  margin: 0;
  max-width: 860px;
}

.matchList {
  display: grid;
  gap: 18px;
}

.matchItem {
  display: grid;
  gap: 10px;
}

.matchItem > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.matchItem span,
.muted {
  color: var(--muted);
}

.scoreBar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eee7;
}

.scoreBar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--gold));
}

.fitBlock + .fitBlock {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.mismatchCard {
  border: 1px solid rgba(196, 154, 85, 0.28);
  border-radius: 22px;
  background: #fff8ef;
  box-shadow: 0 18px 50px rgba(36, 50, 47, 0.06);
  padding: clamp(22px, 4vw, 34px);
}

.mismatchCard p {
  color: #62574d;
  line-height: 1.65;
  margin: 0;
}

.promptCard {
  background: rgba(255, 255, 255, 0.92);
}

.promptHeader {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.promptHeader p {
  line-height: 1.55;
  margin: 0 0 18px;
}

.promptBox {
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8faf7;
  color: #33413d;
  font: 0.92rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 18px;
  white-space: pre-wrap;
}

.creatorCard {
  border: 1px solid rgba(85, 124, 112, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px 24px;
}

.creatorCard p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.creatorCard span {
  display: block;
  margin-top: 6px;
}

.creatorCard a {
  color: var(--accent-dark);
  font-weight: 800;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

li {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 10px;
}

.noteCard {
  background: #f7efe7;
}

.noteCard p {
  color: #5f554e;
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .welcome,
  .appShell,
  .reportShell {
    padding: 14px;
  }

  .welcomePanel,
  .questionCard,
  .reportHero,
  .reportCard,
  .noteCard {
    border-radius: 20px;
  }

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

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

  .topLine,
  .navRow {
    align-items: stretch;
    flex-direction: column;
  }

  .navRow button,
  .actionRow button,
  .promptHeader button,
  .emailActions button {
    width: 100%;
  }

  .promptHeader {
    flex-direction: column;
  }

  .emailActions {
    align-items: stretch;
    flex-direction: column;
  }

  .matchItem > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media print {
  body {
    background: white;
  }

  .noPrint {
    display: none;
  }

  .reportShell {
    max-width: none;
    padding: 0;
  }

  .reportHero,
  .reportCard,
  .noteCard {
    break-inside: avoid;
    box-shadow: none;
  }
}
