:root {
  --paper: #f6f0e1;
  --paper-2: #efe6cf;
  --card: #fffdf7;
  --ink: #1d1b17;
  --muted: #6b6457;
  --line: #2a261f;
  --soft-line: #e3d9bf;
  --yellow: #f6c834;
  --yellow-soft: #fdf0bf;
  --green: #2f9e5b;
  --green-soft: #dcf2e3;
  --red: #d64545;
  --blue: #4062f6;
  --radius: 18px;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17150f;
    --paper-2: #1f1c14;
    --card: #221f17;
    --ink: #f3ecd8;
    --muted: #b3a98f;
    --line: #f3ecd8;
    --soft-line: #3a3426;
    --yellow-soft: #3a3014;
    --green-soft: #173323;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--soft-line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--hand); font-size: 28px; }
.brand img { width: 38px; height: 38px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 22px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--yellow); color: #1d1b17;
  font-family: var(--hand); font-size: 22px; text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--line); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.small { padding: 6px 14px; font-size: 18px; box-shadow: 2px 2px 0 var(--line); }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--hand); font-weight: 400; font-size: clamp(48px, 7vw, 84px); line-height: 1; margin: 0 0 18px; }
.underline { background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 88%, transparent 88%); padding: 0 4px; }
.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.note { font-family: var(--hand); font-size: 20px; color: var(--muted); margin-top: 18px; }

/* Phone demo */
.phone {
  width: min(340px, 100%); margin-inline: auto;
  border: 3px solid var(--line); border-radius: 40px; padding: 14px;
  background: var(--card); box-shadow: 8px 8px 0 var(--line);
  transform: rotate(-1.5deg);
}
.screen { border-radius: 28px; background: var(--paper); padding: 22px 18px; min-height: 470px; display: flex; flex-direction: column; }
.waiting { display: flex; align-items: center; gap: 10px; font-family: var(--hand); font-size: 22px; }
.ig { width: 36px; height: 36px; border-radius: 10px; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); position: relative; }
.ig::after { content: ""; position: absolute; inset: 9px; border: 3px solid #fff; border-radius: 50%; }
.q { font-weight: 600; margin: 14px 0 12px; font-size: 16px; }
.opts { display: grid; gap: 9px; }
.opt {
  text-align: left; font: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 14px; border-radius: 12px; border: 2px solid var(--soft-line); background: var(--card); cursor: pointer;
  display: flex; gap: 10px; align-items: center; transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--line); }
.opt b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: 13px; flex: none; }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--card)); }
.opt:disabled { cursor: default; }
.feedback { margin-top: 14px; font-size: 14px; color: var(--muted); min-height: 44px; }
.earned { text-align: center; margin: auto 0; }
.earned .lock { width: 96px; height: auto; margin: 0 auto; }
.earned h3 { font-family: var(--hand); font-weight: 400; font-size: 36px; margin: 6px 0; }
.dots { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); }
.dot.on { background: var(--yellow); }
.dot.miss { background: var(--red); border-color: var(--red); }

/* Sections */
section { padding: 56px 0; }
.eyebrow { font-family: var(--hand); font-size: 22px; color: var(--muted); margin: 0; }
h2 { font-family: var(--hand); font-weight: 400; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; margin: 4px 0 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 4px 4px 0 var(--line);
}
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.emoji { width: 46px; height: 46px; border: 2px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--yellow-soft); }
.ico { width: 26px; height: 26px; }
.rule .ico { width: 34px; height: 34px; }
.steps { counter-reset: s; }
.steps .card h3::before { counter-increment: s; content: counter(s) ". "; }

.topics { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card);
  font-weight: 500; font-size: 15px;
}
.chip:nth-child(3n) { background: var(--yellow-soft); }
.chip:nth-child(4n) { background: var(--green-soft); }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule { display: flex; gap: 14px; align-items: flex-start; }
.rule .big { font-size: 34px; line-height: 1; }

.privacy-strip { background: var(--card); border-block: 2px solid var(--line); }
.privacy-strip .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li::before { content: "✓ "; color: var(--green); font-weight: 700; }

.support { text-align: center; }
.support p { color: var(--muted); max-width: 560px; margin: 0 auto 24px; }
.sticky-note {
  display: inline-block; background: var(--yellow); color: #1d1b17; padding: 18px 22px; transform: rotate(2deg);
  font-family: var(--hand); font-size: 24px; box-shadow: 3px 3px 0 rgba(0, 0, 0, .25); margin-bottom: 28px;
}

footer { padding: 32px 0 48px; border-top: 1.5px solid var(--soft-line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Privacy page */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-family: var(--hand); font-weight: 400; font-size: clamp(44px, 6vw, 64px); margin: 0; line-height: 1.05; }
.doc .meta { color: var(--muted); margin: 8px 0 28px; }
.doc h2 { font-size: 34px; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 16.5px; }
.doc ul { padding-left: 22px; }
.doc .summary { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: 4px 4px 0 var(--line); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; border-bottom: 1.5px solid var(--soft-line); padding: 10px 8px; vertical-align: top; }
.doc code { background: var(--paper-2); padding: 1px 6px; border-radius: 6px; font-size: 14px; }

@media (max-width: 860px) {
  .hero .wrap, .privacy-strip .wrap { grid-template-columns: 1fr; }
  .grid, .rules { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
  .phone { transform: none; }
  .doc table { display: block; overflow-x: auto; }
}

.disclaimer { padding: 24px 0; }
.disclaimer p { margin: 0; font-size: 14px; color: var(--muted); max-width: 820px; }
.disclaimer a { color: var(--ink); font-weight: 600; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plan h3 { font-family: var(--hand); font-weight: 400; font-size: 34px; margin: 0; display: flex; align-items: center; gap: 10px; }
.plan .price { font-family: var(--hand); font-size: 46px; margin: 6px 0 12px; }
.plan .price span { font-size: 22px; color: var(--muted); }
.plan.pro { background: var(--yellow-soft); }
.plan .small { color: var(--muted); font-size: 13px; margin-top: 12px; }
.badge { font-family: var(--body); font-size: 12px; font-weight: 800; background: var(--yellow); color: #1d1b17; border: 1.5px solid #1d1b17; border-radius: 6px; padding: 2px 7px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

/* Launch announcement (remove after launch day) */
.launch-bar { display: block; text-align: center; padding: 10px 16px; background: var(--ink); color: var(--yellow);
  font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1.4; }
.launch-bar span { color: var(--yellow-soft); font-weight: 500; }
@media (prefers-color-scheme: dark) { .launch-bar { background: var(--yellow); color: #1d1b17; } .launch-bar span { color: #1d1b17; } }
.launch-pill { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--yellow); color: #1d1b17; font-weight: 700; font-size: 14px; box-shadow: 3px 3px 0 var(--line); }

.open-hint { flex-basis: 100%; margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* The nav link colour was winning over the button's, leaving grey text on yellow. */
.nav a.btn, .nav a.btn:hover { color: #1d1b17; }

/* Always one tap from Play on phones: most visitors arrive from ads. */
.get-bar { display: none; }
@media (max-width: 640px) {
  .get-bar {
    display: flex; position: fixed; z-index: 50;
    left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)); /* clears the Netlify badge */
    font-size: 20px; padding: 14px 16px; text-align: center;
  }
  body { padding-bottom: 136px; }
}
