:root {
  --bg: #ffffff;
  --ink: #2c1a1c;
  --green: #a6232b;
  --green-deep: #861c23;
  --muted: #6d5858;
  --line: rgba(44, 26, 28, 0.12);
  --card: #ffffff;
  --well: #f7e8e9;
  --bad: #8e2430;
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Outfit", "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}
::selection { background: #f6d5d7; }
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 0;
  max-width: 1120px;
  margin: 0 auto;
}
.brand, .nav button {
  background: none;
  border: 0;
  cursor: pointer;
}
.brand {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.04em;
  padding: 0;
}
.brand span { color: var(--muted); font-family: var(--sans); font-size: 14px; letter-spacing: 0.14em; margin-left: 8px; }
.app-link {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.app-link:hover { color: var(--green-deep); }
body:not([data-phase="intro"]) .app-link { display: none; }
body:not([data-phase="intro"]) .top { max-width: 560px; padding: 18px 20px 0; }
body[data-phase="pay"] #screen {
  min-height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 36px;
}
body[data-phase="pay"] #screen > section { width: 100%; }
body[data-phase="pay"] h1 { font-size: clamp(44px, 9vw, 64px); margin: 6px 0 2px; }
body[data-phase="pay"] h1.plain { font-size: clamp(32px, 8vw, 44px); line-height: 1.15; }
body[data-phase="pay"] .pay-actions,
body[data-phase="pay"] .includes { max-width: none; }

body[data-phase="intro"] .top { display: none; }
body[data-phase="question"] { background: #fff5f5; }
.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-bottom: 130px;
}
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.9fr);
  gap: 36px;
  align-items: center;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 12px 32px 0;
}
.kicker {
  margin: 0;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1, .prompt, .price, .score, .lead {
  font-family: var(--serif);
  font-weight: 520;
  letter-spacing: -0.035em;
}
h1 {
  margin: 10px 0 14px;
  font-size: clamp(52px, 6vw, 76px);
  line-height: 0.92;
  color: #2a1618;
}
h1 em { font-style: italic; font-weight: 520; color: var(--green); white-space: nowrap; }
.lede { margin: 0 0 22px; max-width: 46ch; font-size: 18px; color: #4a3332; }
.stats {
  display: flex;
  gap: 18px;
  margin: 0 0 28px;
  max-width: 520px;
}
.stats div { display: flex; flex-direction: column; gap: 2px; padding-right: 18px; border-right: 1px solid var(--line); }
.stats div:last-child { border: 0; }
.stats strong { font-size: 15px; }
.stats span, .fine, .legal { color: var(--muted); font-size: 13px; }
.fine { margin: 12px 0 0; }

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 440px);
  min-height: 64px;
  padding: 16px 28px;
  border: 0;
  border-radius: 16px;
  background: var(--green);
  color: white;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(166, 35, 43, 0.24);
}
.btn:hover { background: var(--green-deep); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.paypal {
  background: white;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--green);
}
.btn.paypal:hover { background: #fdf6f5; }
.pay-actions { display: flex; flex-direction: column; gap: 10px; max-width: 440px; }
.share-block { max-width: 440px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-title { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.share-lead { margin: 0 0 14px; font-size: 16px; }
.share-count { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--green); }
.share-block .btn {
  background: white;
  color: var(--green);
  box-shadow: inset 0 0 0 1.5px var(--green);
}
.share-block .btn:hover { background: #fff5f5; }
.share-link {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff5f5;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-all;
}
.share-actions { display: flex; gap: 8px; }
.share-actions .btn { flex: 1; min-height: 52px; font-size: 16px; }

.hero-art {
  position: relative;
  height: 500px;
}
.scene {
  position: relative;
  width: 100%;
  height: 100%;
}
.score-card {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 52%);
  z-index: 1;
  filter: drop-shadow(0 16px 28px rgba(40, 28, 12, 0.22));
}
.mascot-img {
  position: absolute;
  left: 0;
  bottom: -28px;
  height: 390px;
  width: auto;
  z-index: 2;
  display: block;
}
.hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 180px;
  z-index: 0;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.info {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 28px 28px;
}
.info h2 { font-family: var(--serif); font-weight: 520; font-size: 32px; margin: 0 0 8px; }

body:not([data-phase="intro"]) #screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.progress { height: 3px; background: #f3e0e2; border-radius: 99px; margin: 0 0 22px; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.q-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.prompt { margin: 0 0 8px; font-family: var(--sans); font-weight: 500; letter-spacing: -0.03em; font-size: clamp(26px, 3.4vw, 32px); line-height: 1.2; }
h1.plain { font-family: var(--sans); font-weight: 500; letter-spacing: -0.03em; font-size: clamp(32px, 4vw, 42px); line-height: 1.15; }
.note { margin: 0 0 16px; color: var(--muted); }
.lead, .matrix { background: var(--well); border-radius: 20px; }
.lead { margin: 12px 0 18px; padding: 22px 12px; text-align: center; font-family: var(--sans); font-weight: 500; letter-spacing: -0.03em; font-size: 28px; }
.matrix { display: grid; gap: 8px; padding: 10px; margin: 14px 0 18px; }
.matrix.cols-2 { max-width: 280px; margin-left: auto; margin-right: auto; }
.puzzle {
  background: var(--well);
  border-radius: 22px;
  padding: 12px 12px 14px;
  margin: 14px 0 0;
}
.puzzle .matrix { background: transparent; margin: 0 auto 12px; padding: 0; }
.cell {
  background: var(--card);
  border-radius: 14px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.cell.miss {
  background: transparent;
  border: 1.5px dashed var(--green);
  color: var(--green);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 28px;
}
.fig { width: 74%; height: 74%; display: block; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice, .fig-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
}
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; font-size: 17px; }
.choice .k, .fig-btn .k {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: var(--well); color: var(--green-deep); font-size: 13px;
}
.choice:hover, .fig-btn:hover { border-color: var(--green); }
.choice.is-down { background: var(--ink); color: white; border-color: var(--ink); }
.choice.is-down .k { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.fig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 78%; max-width: 340px; margin-inline: auto; }
.fig-btn { position: relative; aspect-ratio: 1; padding: 16px 6px 6px; display: grid; place-items: center; border-radius: 12px; }
.fig-btn .k { position: absolute; top: 5px; left: 5px; width: 18px; height: 18px; font-size: 11px; border-radius: 6px; }
.fig-btn .fig { width: 56%; height: 56%; }
.fig-btn.is-down { box-shadow: inset 0 0 0 1.5px var(--ink); }

.digits { display: flex; gap: 8px; justify-content: center; margin: 28px 0 8px; }
.digits span {
  width: 52px; height: 68px; display: grid; place-items: center;
  background: var(--card); border-radius: 14px; font-family: var(--sans); font-weight: 500; font-size: 30px;
}
.digits.ghost span { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.meter { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 26px; }
.meter i {
  display: block; height: 100%; width: 100%; background: var(--green);
  transform-origin: left center; animation: drain linear forwards;
}
@keyframes drain { to { transform: scaleX(0); } }

label.field { display: block; margin: 8px 0 18px; }
input[type="email"] {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  border-radius: 0;
  font-size: 20px;
}
input[type="email"]:focus { outline: none; border-bottom-color: var(--green); }
.error { margin: 0 0 16px; color: var(--bad); font-size: 14px; }
.price { margin: 8px 0 0; font-size: 84px; line-height: 0.86; }
.price small { font-family: var(--sans); font-size: 16px; letter-spacing: 0; margin-left: 4px; color: var(--muted); }
.includes { margin: 18px 0 22px; padding: 0; list-style: none; max-width: 440px; }
.includes li { padding: 9px 0; border-top: 1px solid var(--line); }
.score { margin: 8px 0 0; font-size: 96px; line-height: 0.86; color: var(--green-deep); }
.raw, .reading { font-size: 18px; }
.bell { width: 100%; height: auto; margin: 8px 0 4px; }
.people { width: 100%; border-collapse: collapse; margin-top: 8px; background: white; border-radius: 16px; overflow: hidden; }
.people th, .people td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.people th:last-child, .people td:last-child { text-align: right; }
.people tr.yours td { background: #f7e8e9; font-weight: 600; }
.bars { margin-top: 22px; }
.bar { display: grid; grid-template-columns: 68px 1fr 40px; gap: 10px; align-items: center; margin: 11px 0; font-size: 14px; }
.track { height: 6px; background: var(--well); border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--green-deep); }
.linkish {
  appearance: none; margin-top: 22px; padding: 0; border: 0; background: none;
  color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.rise { animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .top { padding: 16px 18px 0; max-width: none; }
  .app-link { font-size: 14px; }
  .landing {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-bottom: 0;
    background: var(--bg);
  }
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: 0;
    flex: 0 0 auto;
    padding: 44px 20px 0;
    gap: 0;
    background: var(--bg);
  }
  .hero-art {
    flex: none;
    display: block;
    height: 248px;
    min-height: 0;
    margin-top: 8px;
  }
  .scene {
    width: 100%;
    height: 100%;
  }
  .mascot-img {
    left: 0;
    bottom: 0;
    width: 66%;
    height: auto;
    max-height: none;
  }
  .score-card {
    top: auto;
    right: 0;
    bottom: 12%;
    width: 44%;
  }
  h1 { font-size: 46px; margin: 0 0 10px; }
  .lede { font-size: 16px; margin-bottom: 14px; }
  .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: none;
    margin-bottom: 16px;
  }
  .stats div {
    min-width: 0;
    align-items: center;
    text-align: center;
    padding: 0 8px;
  }
  .stats strong, .stats span { width: 100%; text-align: center; }
  .stats strong { font-size: 13px; }
  .stats span { font-size: 12px; line-height: 1.25; }
  .btn.start { width: 100%; min-height: 56px; font-size: 17px; }
  .hills { display: none; }
  .score, .price { font-size: 76px; }
  .brand { font-size: 22px; }
  body:not([data-phase="intro"]) .top { padding: 14px 20px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rise, .meter i { animation: none; }
}
