:root {
  --paper: #f6f0e8;
  --ink: #1d1a18;
  --muted: #766e68;
  --line: rgba(29, 26, 24, .14);
  --pink: #d95076;
  --shadow: 0 24px 70px rgba(72, 52, 43, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(223, 104, 98, .10), transparent 23rem),
    radial-gradient(circle at 90% 28%, rgba(103, 91, 164, .09), transparent 22rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  height: 4.75rem;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); font-size: 1rem; font-weight: 700; letter-spacing: .21em; text-decoration: none; }
.brand span { margin-left: .12rem; color: var(--pink); font-size: .48rem; vertical-align: top; letter-spacing: 0; }
.header-label { color: var(--muted); font-size: .6rem; font-weight: 700; letter-spacing: .16em; }

main { width: min(100%, 68rem); margin: 0 auto; }
.screen { display: none; }
.screen.is-active { display: block; animation: reveal .35s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }

.intro-screen { min-height: calc(100vh - 4.75rem); padding: 4.5rem 1.25rem 3rem; }
.eyebrow, .card-kicker { margin: 0 0 1rem; font-size: .65rem; font-weight: 700; letter-spacing: .2em; }
.intro-copy h1, .result-intro h2 {
  max-width: 12ch;
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(3.25rem, 14vw, 6.2rem);
  font-weight: 600;
  line-height: .93;
  letter-spacing: -.05em;
}
.intro-copy h1 em, .result-intro h2 em { color: var(--pink); font-weight: 600; }
.intro-text { max-width: 32rem; margin: 1.6rem 0; color: var(--muted); font-size: .94rem; line-height: 1.65; }
.quiz-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 2rem; }
.quiz-meta span { padding: .48rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .64rem; font-weight: 600; }
.name-label { display: block; margin-bottom: .45rem; font-size: .7rem; font-weight: 700; }
.name-label span { color: var(--muted); font-weight: 400; }
.name-input {
  width: 100%; max-width: 30rem; padding: .95rem 1rem; border: 1px solid var(--line); border-radius: .9rem;
  outline: none; color: var(--ink); background: rgba(255,255,255,.5);
}
.name-input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,26,24,.06); }
.primary-button, .secondary-button {
  width: 100%; max-width: 30rem; margin-top: .75rem; padding: 1rem 1.15rem;
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; font-weight: 700;
}
.primary-button { color: white; background: var(--ink); }
.secondary-button { color: var(--ink); background: transparent; }
.intro-art { display: none; }

.quiz-screen { min-height: calc(100vh - 4.75rem); padding: 1.5rem 1.25rem 4rem; }
.quiz-topbar { display: flex; gap: 1rem; align-items: center; }
.back-button {
  display: grid; place-items: center; flex: 0 0 auto; width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer;
}
.progress-wrap { flex: 1; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: .45rem; color: var(--muted); font-size: .6rem; font-weight: 700; }
.progress-track { height: .28rem; overflow: hidden; border-radius: 999px; background: rgba(29,26,24,.1); }
.progress-track span { display: block; width: 8%; height: 100%; border-radius: inherit; background: var(--pink); transition: width .3s ease; }
.question-wrap { padding-top: 3.5rem; }
.question-context { margin: 0 0 .8rem; color: var(--pink); font-size: .65rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.question-wrap h2 { max-width: 18ch; margin: 0; font-family: "Playfair Display", serif; font-size: clamp(2.2rem, 9vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; }
.question-hint { max-width: 33rem; margin: 1rem 0 1.6rem; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.answers { display: grid; gap: .65rem; }
.answer-button {
  width: 100%; min-height: 4.15rem; padding: .9rem 1rem; display: grid; grid-template-columns: 1.8rem 1fr; gap: .75rem; align-items: center;
  border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: rgba(255,255,255,.48); text-align: left; cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.answer-button:hover, .answer-button:focus-visible { transform: translateY(-2px); border-color: var(--ink); outline: none; background: rgba(255,255,255,.8); }
.answer-button.is-selected { border-color: var(--ink); color: white; background: var(--ink); }
.answer-letter { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 1px solid currentColor; border-radius: 50%; font-size: .62rem; font-weight: 700; }
.answer-text { font-size: .79rem; line-height: 1.4; }

.result-screen { padding: 4.5rem 1.25rem 6rem; }
.result-for { margin: -.45rem 0 .8rem; color: var(--muted); font-size: .78rem; }
.result-intro h2 { max-width: 13ch; font-size: clamp(3rem, 13vw, 6rem); }
.result-lead { max-width: 36rem; margin: 1.5rem 0 2.4rem; color: var(--muted); font-size: .93rem; line-height: 1.65; }
.result-cards { display: grid; gap: .85rem; }
.result-card { padding: 1.5rem; overflow: hidden; position: relative; border-radius: 1.6rem; }
.primary-result { min-height: 27rem; color: white; background: var(--result-color); box-shadow: var(--shadow); }
.primary-result::after {
  content: ""; position: absolute; right: -3rem; top: -3rem; width: 10rem; height: 10rem;
  border: 2.5rem solid rgba(255,255,255,.14); border-radius: 50%;
}
.secondary-result { border: 1px solid var(--line); background: rgba(255,255,255,.52); }
.result-rank { display: block; margin-bottom: 2.5rem; font-size: .59rem; font-weight: 700; letter-spacing: .16em; }
.result-card h3 { max-width: 10ch; margin: 0; font-family: "Playfair Display", serif; font-size: 2.5rem; line-height: .92; letter-spacing: -.04em; }
.result-card > p { max-width: 34rem; font-size: .82rem; line-height: 1.6; }
.primary-result > p { color: rgba(255,255,255,.82); }
.result-details { margin-top: 2rem; display: grid; gap: .8rem; }
.result-details div { padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.25); }
.result-details span { display: block; font-size: .55rem; font-weight: 700; letter-spacing: .15em; }
.result-details p { margin: .45rem 0 0; color: rgba(255,255,255,.78); font-size: .73rem; line-height: 1.5; }
.secondary-result .result-rank { margin-bottom: 1.7rem; color: var(--muted); }
.secondary-result h3 { color: var(--secondary-color); }
.secondary-role { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-weight: 600; }
.formula-card, .watch-card { margin-top: .85rem; padding: 1.5rem; border-radius: 1.6rem; }
.formula-card { color: white; background: var(--ink); }
.formula-card .card-kicker { color: #edb1c1; }
.formula-card h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 2rem; line-height: 1.05; }
.formula-card > p:not(.card-kicker), .watch-card > p:last-child { font-size: .82rem; line-height: 1.6; }
.formula-card > p:not(.card-kicker) { color: rgba(255,255,255,.72); }
.formula-example { margin-top: 1.2rem; padding: 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 1rem; font-size: .77rem; line-height: 1.5; }
.watch-card { border: 1px solid var(--line); background: rgba(255,255,255,.48); }
.watch-card .card-kicker { color: var(--muted); }
.result-actions { margin-top: 2rem; }
.text-link { display: block; width: fit-content; margin: 1.4rem auto 0; color: var(--ink); font-size: .71rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--ink); }

footer { margin: 0 1.25rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
footer p { max-width: 32rem; margin: .5rem 0 0; color: var(--muted); font-size: .67rem; line-height: 1.55; }
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; z-index: 30; transform: translate(-50%, 1rem); opacity: 0;
  padding: .72rem 1rem; border-radius: 999px; color: white; background: var(--ink); box-shadow: var(--shadow);
  font-size: .7rem; font-weight: 600; pointer-events: none; transition: .22s ease;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 48rem) {
  .site-header { padding-inline: 2.5rem; }
  .intro-screen.is-active { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; padding: 5rem 4rem; }
  .intro-art { min-height: 32rem; display: grid; place-items: center; position: relative; }
  .intro-art p { position: relative; z-index: 2; font-family: "Playfair Display", serif; font-size: 3rem; line-height: .9; }
  .intro-art em { color: white; }
  .shape { position: absolute; display: block; border-radius: 50%; box-shadow: inset -15px -15px 35px rgba(0,0,0,.08), 0 20px 40px rgba(0,0,0,.08); }
  .shape-one { width: 12rem; height: 12rem; left: 8%; top: 8%; background: #dd695d; }
  .shape-two { width: 9rem; height: 9rem; right: 5%; top: 18%; background: #e2b63e; }
  .shape-three { width: 11rem; height: 11rem; left: 25%; bottom: 7%; background: #3c887a; }
  .shape-four { width: 6rem; height: 6rem; right: 8%; bottom: 15%; background: #7b589c; }
  .quiz-screen { padding: 2rem 4rem 6rem; }
  .question-wrap { max-width: 48rem; margin: 0 auto; padding-top: 5rem; }
  .answers { grid-template-columns: 1fr 1fr; }
  .answer-button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .result-screen { padding: 6rem 4rem 8rem; }
  .result-cards { grid-template-columns: 1.25fr .75fr; }
  .secondary-result { display: flex; flex-direction: column; justify-content: flex-end; }
  .formula-card, .watch-card { padding: 2rem; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
  .result-actions .primary-button, .result-actions .secondary-button { max-width: none; }
  .result-actions .text-link { grid-column: 1 / -1; }
  footer { margin-inline: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
