@font-face { font-family: "Geist"; src: url("/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --raised: #fbfaf8;
  --ink: #0a0e1a;
  --muted: #646a78;
  --line: #e4e1da;
  --line-strong: #cfcbc2;
  --blue: #0453f5;
  --blue-ink: #0342c4;
  --blue-soft: #edf2ff;
  --blue-line: #b9ccfd;
  --teal: #00806a;
  --teal-soft: #e3f4ef;
  --amber: #a14d07;
  --amber-soft: #fdf1dc;
  --red: #b93a0a;
  --red-soft: #fdece4;
  --violet: #5b3fd1;
  --violet-soft: #efebfd;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 14, 26, 0.04), 0 12px 32px -12px rgba(10, 14, 26, 0.12);
  --shadow-pick: 0 0 0 4px rgba(4, 83, 245, 0.12);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --surface: #14171e;
    --raised: #191d26;
    --ink: #eef0f4;
    --muted: #9aa1ae;
    --line: #262b36;
    --line-strong: #363c4a;
    --blue: #4d84ff;
    --blue-ink: #79a2ff;
    --blue-soft: #15223f;
    --blue-line: #2f4c8f;
    --teal: #45cfae;
    --teal-soft: #0f2a25;
    --amber: #f2b45a;
    --amber-soft: #2e2210;
    --red: #ff8a5c;
    --red-soft: #33190f;
    --violet: #a996ff;
    --violet-soft: #221c3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-pick: 0 0 0 4px rgba(77, 132, 255, 0.2);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1:focus, h2:focus { outline: none; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Header: brand, earned badges, the one-liner, progress */
.top { max-width: 640px; width: 100%; margin: 0 auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.toprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 11px 5px 6px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.badge .i { width: 14px; height: 14px; color: #fff; }
.badge .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); }
.badge.pop { animation: pop .6s var(--ease); }
.tagline { margin: 0; font-size: 15px; font-weight: 400; color: var(--muted); }
.tagline:empty { display: none; }
.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--blue); border-radius: 6px; transition: width .5s var(--ease); }

/* The card and its entrance */
.card {
  max-width: 640px; width: calc(100% - 32px); margin: 8px auto 24px; padding: 32px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card.enter > * { animation: rise .45s var(--ease) both; }
.card.enter > *:nth-child(2) { animation-delay: .04s; }
.card.enter > *:nth-child(3) { animation-delay: .08s; }
.card.enter > *:nth-child(4) { animation-delay: .12s; }
.card.enter > *:nth-child(n+5) { animation-delay: .16s; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 14px; font-weight: 500; }
h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.12; font-weight: 600; letter-spacing: -0.025em; }
h2 { margin: 0 0 8px; font-size: 25px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--ink); }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); margin: 0 0 4px; font-size: 15px; }

.prize { display: flex; gap: 14px; align-items: flex-start; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0; }
.prize .tile { background: var(--blue); color: #fff; border-color: var(--blue); }
.prize p { margin: 0; }

/* Answers */
.options { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 8px; }
.options.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .options.grid2-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.option {
  display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--raised); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  cursor: pointer; min-height: 56px; position: relative;
  transition: border-color .15s, background .15s, transform .15s var(--ease), box-shadow .15s;
}
.option:hover:not(:disabled) { border-color: var(--line-strong); transform: translateY(-1px); }
.option:active:not(:disabled) { transform: scale(0.985); }
.option[aria-checked="true"] { border-color: var(--blue); background: var(--blue-soft); box-shadow: var(--shadow-pick); }
.option:disabled { opacity: .45; cursor: not-allowed; }
.option .label-text { flex: 1; }
.tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--muted); border: 1px solid var(--line); transition: color .15s, background .15s, border-color .15s; }
.option[aria-checked="true"] .tile { background: var(--blue); color: #fff; border-color: var(--blue); animation: tap .35s var(--ease); }
.mark { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; transition: all .15s; }
.option.check .mark { border-radius: 6px; }
.option[aria-checked="true"] .mark { background: var(--blue); border-color: var(--blue); color: #fff; }
.mark .i { width: 14px; height: 14px; stroke-width: 3; }

textarea, input[type="email"], .code, .linkbox {
  width: 100%; font: inherit; color: var(--ink); background: var(--raised);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 10px 0 12px;
}
textarea:focus, input:focus { border-color: var(--blue); outline: none; box-shadow: var(--shadow-pick); }
.code { font-size: 28px; letter-spacing: .35em; max-width: 240px; text-align: center; }
.label { display: block; font-weight: 500; margin-top: 4px; }
.tick { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-size: 15px; cursor: pointer; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--raised); }
.tick:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.tick input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  font: 500 16px var(--font); padding: 12px 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); transition: transform .15s var(--ease), background .15s;
}
.btn:hover:not(:disabled) { border-color: var(--line-strong); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
form .btn.primary { margin-top: 6px; }
.link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; font: inherit; color: var(--muted); cursor: pointer; }
.link:hover { color: var(--ink); }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.turnstile { margin: 8px 0 12px; min-height: 0; }
.error { color: var(--red); background: var(--red-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 14px 0 0; font-size: 15px; }

/* Rob's comment beside his face, then the question and its answers in one bubble */
.thread { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.echo { align-self: flex-end; display: flex; gap: 6px; align-items: baseline; max-width: 85%; margin: 0; padding: 6px 12px; border-radius: 16px 16px 4px 16px; background: var(--raised); border: 1px solid var(--line); font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.echo-who { font-weight: 600; color: var(--ink); }
.echo-text { overflow: hidden; text-overflow: ellipsis; }
.rob { display: flex; gap: 10px; align-items: flex-start; }
.rob .avatar { margin-top: 2px; }
.rob.intro { margin: 4px 0 0; }
.bubble.lead { font-size: 17px; padding: 12px 18px 14px; border-radius: 6px 20px 20px 20px; animation: say-in .4s var(--ease) both; }
.bubble.lead .who { display: block; margin: 0 0 6px; }
.bubble.lead p { margin: 0 0 12px; }
.bubble.lead p:last-child { margin: 0; }
.under { margin: 0; }
.under.first { margin-top: 12px; }
.dev-note { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.card-foot { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
/* Same gap above and below the small line: bubble → line → Start. */
.rob.intro .btn.primary { margin-top: 12px; }
.rob.intro .turnstile { margin: 0; }
.rob.intro .turnstile:empty { display: none; }
.rob.intro { margin-bottom: 20px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.msgs { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1; }
.who { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.bubble { background: var(--blue-soft); color: var(--ink); border-radius: 18px 18px 18px 6px; padding: 10px 16px; max-width: 100%; }
.bubble.say { border-radius: 6px 18px 18px 18px; display: flex; gap: 8px; align-items: flex-start; font-size: 15px; font-weight: 500; animation: say-in .4s var(--ease) both; }
.bubble.say .i { width: 18px; height: 18px; color: var(--blue); }
.msgs .bubble.say + .bubble.ask { border-top-left-radius: 22px; }
.bubble.ask { width: 100%; border-radius: 6px 22px 22px 22px; padding: 20px 20px 18px; animation: say-in .4s var(--ease) .1s both; }
.bubble.ask h2 { margin: 0; }
.bubble.ask .hint { margin: 6px 0 0; }
.bubble.ask .options { margin: 18px 0 0; }
.bubble.ask .option { background: var(--surface); border-color: transparent; box-shadow: 0 1px 2px rgba(10, 14, 26, 0.06); }
.bubble.ask .option:hover:not(:disabled) { border-color: var(--blue-line); }
.bubble.ask .option[aria-checked="true"] { background: var(--surface); border-color: var(--blue); box-shadow: var(--shadow-pick); }
.bubble.ask textarea, .bubble.ask input[type="email"], .bubble.ask .code, .bubble.ask .tick { background: var(--surface); }
.bubble.ask .tick:has(input:checked) { background: var(--surface); }
.bubble.ask form { margin-top: 14px; }
.emoji { font-size: 19px; line-height: 1.2; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@keyframes say-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }

/* The end screen */
.rob.thanks { margin-bottom: 16px; }
.card-label { margin: 0 0 8px; }
.pcard { display: block; width: 100%; max-width: 420px; height: auto; border-radius: var(--radius); border: 1px solid var(--line); margin: 0 auto 18px; box-shadow: var(--shadow); }
.card-label { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sharebox { max-width: 420px; margin: 0 auto 8px; }
.btn.wide { width: 100%; min-height: 54px; font-size: 17px; }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.mini {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 10px 4px;
  font: 500 13px var(--font); color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, transform .15s var(--ease);
}
.mini:hover { border-color: var(--line-strong); }
.mini:active { transform: scale(0.97); }
.mini .i { width: 20px; height: 20px; color: var(--muted); }
.nudge { margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.next { max-width: 420px; margin: 22px auto 0; border-top: 1px solid var(--line); padding-top: 18px; }
.next h3 { font-size: 15px; color: var(--muted); font-weight: 500; margin: 0 0 10px; }
.next ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.next li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.next .ico { width: 32px; height: 32px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.next .ico .i { width: 18px; height: 18px; }
.next b { font-weight: 600; }
.compare { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 22px; }
.compare ul { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; flex-direction: column; gap: 12px; }
.compare li { display: grid; grid-template-columns: 60px 1fr; gap: 4px 12px; align-items: baseline; }
.pct { font-size: 24px; font-weight: 600; color: var(--blue); letter-spacing: -0.02em; }
.you { grid-column: 2; font-size: 13px; color: var(--teal); font-weight: 500; }

.foot { margin: auto auto 0; padding: 12px 16px 28px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: 14px; color: var(--muted); }
.foot a, .foot .link { color: var(--muted); font-size: 14px; padding: 0; text-decoration: underline; }

/* Sized to the window in CSS: the canvas is drawn at screen resolution, so without this it shows at 2x on sharp screens and the burst lands in the corner. */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 30; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tap { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-6deg); } 100% { transform: scale(1); } }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .card { padding: 20px 12px; }
  h1 { font-size: 27px; }
  h2 { font-size: 22px; }
  .option { min-height: 52px; padding: 10px 12px; font-size: 15px; }
  .tile { width: 32px; height: 32px; }
  .avatar { width: 30px; height: 30px; }
  .rob { gap: 8px; }
  .bubble.ask { padding: 16px 12px 14px; }
  .mini span { font-size: 12px; }
  .badge span { display: none; }
  .badge { padding: 6px; }
}
@media (max-width: 380px) { .options.grid2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .card.enter > *, .badge.pop, .option[aria-checked="true"] .tile { animation: none; }
  .bar, .option, .btn { transition: none; }
  .bubble.say, .bubble.ask { animation: none; }
}
@media (forced-colors: active) {
  .option[aria-checked="true"], .tick:has(input:checked) { outline: 3px solid Highlight; }
}

/* Rules page */
.doc { max-width: 720px; }
.doc h2 { font-size: 20px; margin-top: 24px; }
.doc li { margin-bottom: 6px; }

/* Admin */
.admin .wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.admin h2 { font-size: 18px; margin-top: 28px; }
.admin table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 14px; }
.admin td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: middle; }
.admin td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin form { display: inline; }
.admin button { font: inherit; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.admin .btn.primary { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; }
.stat b { font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
