:root {
  --bg: #f3efe5;
  --bg-accent: #e4dcc8;
  --ink: #1f2a21;
  --muted: #5a665d;
  --panel: rgba(255, 250, 242, 0.92);
  --line: rgba(31, 42, 33, 0.12);
  --strong: #21543d;
  --warm: #a85f2a;
  --shadow: 0 22px 50px rgba(58, 49, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(168, 95, 42, 0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(33, 84, 61, 0.18), transparent 30%),
    linear-gradient(145deg, var(--bg), var(--bg-accent));
  min-height: 100vh;
}

.shell {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 32px;
  margin-bottom: 20px;
}

.showcase {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--warm);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 0.95;
}

.lede,
.notice,
.question-copy,
.dimension-copy,
.result-copy,
.score-label {
  color: var(--muted);
}

.lede {
  max-width: 46rem;
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.6;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--warm);
  background: rgba(168, 95, 42, 0.08);
  border-radius: 14px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.pill-primary {
  background: var(--strong);
  color: #fffdf8;
}

.pill-secondary {
  color: var(--ink);
  background: rgba(31, 42, 33, 0.08);
  border: 1px solid rgba(31, 42, 33, 0.1);
}

.card {
  padding: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
}

.section-head p {
  margin-top: 10px;
}

.question {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.question:first-child {
  border-top: 0;
  padding-top: 0;
}

.question-title {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

.field small {
  color: var(--muted);
  line-height: 1.5;
}

.info-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.info-card,
.doc-link {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.info-card h3,
.doc-link strong {
  display: block;
  margin: 0 0 8px;
  font-size: 18px;
}

.info-card p,
.doc-link span {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.doc-link {
  text-decoration: none;
  color: var(--ink);
  transition: transform 160ms ease, border-color 160ms ease;
}

.doc-link:hover {
  transform: translateY(-2px);
  border-color: rgba(33, 84, 61, 0.26);
}

.scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.scale label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.scale label:hover {
  transform: translateY(-2px);
  border-color: rgba(33, 84, 61, 0.35);
}

.scale input {
  accent-color: var(--strong);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  background: var(--strong);
  color: #fffdf8;
}

.secondary {
  background: rgba(31, 42, 33, 0.08);
  color: var(--ink);
}

.hidden {
  display: none;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(33, 84, 61, 0.08);
  color: var(--strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 22px;
  align-items: stretch;
}

.avatar-card,
.identity-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.avatar-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(31, 42, 33, 0.08);
}

.avatar-frame svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nickname {
  margin: 8px 0 4px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
}

.archetype {
  margin: 0;
  font-size: 16px;
  color: var(--warm);
  font-weight: 700;
}

.trait-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.trait-chips span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(33, 84, 61, 0.08);
  border: 1px solid rgba(33, 84, 61, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.identity-copy {
  margin: 14px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.share-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(31, 42, 33, 0.12);
  background:
    radial-gradient(circle at top right, rgba(242, 184, 75, 0.24), transparent 28%),
    radial-gradient(circle at bottom left, rgba(33, 84, 61, 0.14), transparent 32%),
    linear-gradient(150deg, rgba(255, 252, 246, 0.96), rgba(241, 234, 220, 0.92));
}

.share-card::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(31, 42, 33, 0.12);
  border-radius: 22px;
  pointer-events: none;
}

.share-header,
.share-body,
.share-footer {
  position: relative;
  z-index: 1;
}

.share-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.share-mark {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--warm);
  font-weight: 800;
}

.share-type {
  margin: 10px 0 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 0.95;
}

.share-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 30rem;
  line-height: 1.6;
}

.share-avatar {
  width: 132px;
  min-width: 132px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 33, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.share-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.share-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 22px;
}

.share-quote,
.share-metrics {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(31, 42, 33, 0.08);
}

.share-quote p {
  margin: 0;
  line-height: 1.75;
}

.share-metrics ul {
  margin: 0;
  padding-left: 18px;
}

.share-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.footer-note {
  padding: 10px 4px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

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

.result-panel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 42, 33, 0.08);
  margin-top: 10px;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--warm), var(--strong));
}

ul {
  padding-left: 18px;
  line-height: 1.7;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 960px);
    padding-top: 18px;
  }

  .hero,
  .card {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-card,
  .share-body,
  .info-grid,
  .link-grid,
  .scale,
  .result-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .share-header,
  .share-footer,
  .share-actions,
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-avatar {
    width: 100%;
    min-width: 0;
    max-width: 180px;
  }

  .actions {
    flex-direction: column;
  }

  button,
  .pill-link {
    width: 100%;
  }
}

/* Conversion-focused landing and one-question quiz flow. */
.hero-topline,
.quiz-header,
.about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.prototype-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(168, 95, 42, 0.25);
  border-radius: 999px;
  background: rgba(168, 95, 42, 0.08);
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.trust-strip span {
  padding: 8px 12px;
  border: 1px solid rgba(33, 84, 61, 0.12);
  border-radius: 999px;
  background: rgba(33, 84, 61, 0.06);
  color: var(--strong);
  font-size: 13px;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--strong);
  font-weight: 700;
  text-underline-offset: 4px;
}

.micro-disclaimer,
.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.identity-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.identity-preview article {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.76);
  box-shadow: 0 12px 30px rgba(58, 49, 34, 0.08);
}

.identity-preview article::after {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  right: -24px;
  bottom: -34px;
  border-radius: 50%;
  background: rgba(168, 95, 42, 0.13);
}

.identity-preview article:nth-child(2)::after {
  background: rgba(242, 184, 75, 0.2);
}

.identity-preview article:nth-child(3)::after {
  background: rgba(33, 84, 61, 0.14);
}

.identity-preview strong,
.identity-preview span {
  position: relative;
  z-index: 1;
  display: block;
}

.identity-preview strong {
  font-size: 20px;
}

.identity-preview span {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.quiz-shell {
  min-height: 520px;
  margin-bottom: 20px;
  scroll-margin-top: 18px;
}

.quiz-header h2,
.completion-panel h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.quiz-header > strong {
  color: var(--strong);
  font-size: 20px;
}

.progress-track {
  height: 8px;
  margin: 20px 0 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 42, 33, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--warm), #d39746);
  transition: width 220ms ease;
}

.question-step {
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid rgba(31, 42, 33, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.62)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(33, 84, 61, 0.045) 31px 32px);
}

.question-kicker {
  margin: 0 0 12px;
  color: var(--warm);
  font-size: 13px;
  font-weight: 800;
}

.question-step-title {
  max-width: 46rem;
  margin: 0;
  font-size: clamp(25px, 4.5vw, 38px);
  line-height: 1.25;
}

.answer-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.answer-option {
  display: flex;
  min-width: 0;
  min-height: 92px;
  padding: 14px 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.answer-option span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(33, 84, 61, 0.08);
  color: var(--strong);
  font-size: 13px;
}

.answer-option strong {
  font-size: 14px;
  line-height: 1.35;
}

.answer-option:hover {
  transform: translateY(-3px);
  border-color: rgba(33, 84, 61, 0.32);
}

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

.answer-option.selected span {
  background: rgba(255, 255, 255, 0.16);
  color: #fffdf8;
}

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.quiz-nav span {
  color: var(--muted);
  font-size: 13px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(168, 95, 42, 0.4);
  outline-offset: 3px;
}

.completion-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 28px) 0;
}

.biomarker-details {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
}

.biomarker-details summary {
  padding: 18px 20px;
  cursor: pointer;
  color: var(--strong);
  font-weight: 800;
}

.biomarker-details .field-grid {
  padding: 0 20px 20px;
  margin-top: 0;
}

.completion-actions {
  align-items: center;
}

.result-button {
  min-width: 250px;
}

.showcase {
  scroll-margin-top: 18px;
}

.about-head {
  align-items: flex-end;
}

.about-head h2 {
  max-width: 38rem;
}

.info-number {
  display: block;
  margin-bottom: 18px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

@media (max-width: 720px) {
  .hero-topline,
  .quiz-header,
  .about-head,
  .quiz-nav {
    align-items: flex-start;
  }

  .identity-preview,
  .answer-list {
    grid-template-columns: 1fr;
  }

  .identity-preview article {
    min-height: 0;
  }

  .quiz-shell {
    min-height: 600px;
  }

  .question-step {
    padding: 22px 16px;
  }

  .answer-list {
    gap: 8px;
    margin-top: 22px;
  }

  .answer-option {
    min-height: 58px;
    padding: 10px 14px;
    flex-direction: row;
    justify-content: flex-start;
  }

  .answer-option strong {
    text-align: left;
  }

  .quiz-nav,
  .about-head {
    flex-direction: column;
  }

  .quiz-nav .secondary {
    width: auto;
  }

  .result-button {
    min-width: 0;
  }
}

/* Keep the first meaningful paint fully legible and prevent narrow-screen clipping. */
html,
body {
  overflow-x: hidden;
}

h1,
.lede,
.question-step-title {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .hero-topline {
    flex-wrap: wrap;
  }

  h1 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .lede {
    font-size: 16px;
  }

  .trust-strip span {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 20px);
    max-width: 960px;
  }

  .hero,
  .card,
  .identity-preview {
    width: 100%;
    min-width: 0;
  }
}
