/* Figtree (SIL Open Font License 1.1) is self-hosted so the page makes zero
   third-party requests — see assets/fonts/README.md. */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("assets/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --yellow: #fee42f;
  --blue: #2563eb;
  --blue-hover: #1d4fd7;
  --blue-active: #1a45bd;
  --ink: #101828;
  --body-text: #1f2430;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  /* Notion (and other embeds) can be dark; the card is always light. */
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font-family: "Figtree", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Keep scrolling inside the iframe instead of scrolling the Notion page. */
  overscroll-behavior: contain;
}

.stage {
  min-height: 100%;
  display: flex;
  /* flex-start + auto margins centres the card without clipping its top
     when it is taller than a short embed. */
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}

.card {
  width: 100%;
  max-width: 800px;
  margin: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  padding: 72px 64px;
  text-align: center;
}

/* ---------- Question screen ---------- */

.question {
  max-width: 600px;
  margin: 0 auto 26px;
  font-size: 28px;
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 600px;
  margin: 0 auto;
}

.option {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--blue);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  border-radius: 12px;
  padding: 18px 22px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.18);
  transition: background-color 0.15s ease, transform 0.12s ease,
    box-shadow 0.15s ease;
}

.option:hover {
  background: var(--blue-hover);
}

.option:active {
  background: var(--blue-active);
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.2);
}

.option:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

/* ---------- Outcome screen ---------- */

.outcome-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 34px;
}

.outcome-title {
  margin: 0 0 18px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.outcome-description {
  margin: 0 auto 58px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--body-text);
}

.outcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  padding: 12px 42px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.18);
  transition: background-color 0.15s ease, transform 0.12s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--blue-hover);
}

.btn:active {
  background: var(--blue-active);
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.2);
}

.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .card {
    padding: 44px 24px;
    border-radius: 14px;
  }

  .question {
    font-size: 22px;
  }

  .options {
    grid-template-columns: minmax(0, 1fr);
  }

  .option {
    min-height: 72px;
  }

  .outcome-title {
    font-size: 28px;
  }

  .outcome-description {
    margin-bottom: 32px;
  }
}

/* ---------- Embedded mode (Notion iframe & friends) ----------
   `.is-embedded` is set by quiz.js when the page is inside an iframe, or when
   the URL carries ?embed=1. Notion cannot resize an embed to fit its content,
   so embedded + short viewports get progressively tighter spacing to stay
   inside whatever height the block was dragged to. */

.is-embedded body {
  background: var(--yellow);
}

.is-embedded .stage {
  padding: 14px 12px;
}

.is-embedded .card {
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  padding: 40px 40px;
}

.is-embedded .question {
  font-size: 24px;
  margin-bottom: 22px;
}

.is-embedded .option {
  min-height: 84px;
  padding: 14px 18px;
}

.is-embedded .outcome-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
}

.is-embedded .outcome-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.is-embedded .outcome-description {
  margin-bottom: 34px;
}

.is-embedded .outcome-actions {
  gap: 18px;
}

/* Short viewports — applies to embeds and small browser windows alike.
   Each rule is duplicated with an `.is-embedded` prefix: media queries add no
   specificity, so a plain `.option` rule would lose to `.is-embedded .option`
   above. */

@media (max-height: 640px) {
  .stage,
  .is-embedded .stage {
    padding: 14px 12px;
  }

  .card,
  .is-embedded .card {
    padding: 34px 34px;
    border-radius: 14px;
  }

  .question,
  .is-embedded .question {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .option,
  .is-embedded .option {
    min-height: 76px;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
  }

  .options,
  .is-embedded .options {
    gap: 12px;
  }

  .outcome-logo,
  .is-embedded .outcome-logo {
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
  }

  .outcome-title,
  .is-embedded .outcome-title {
    font-size: 26px;
    margin-bottom: 10px;
  }

  .outcome-description,
  .is-embedded .outcome-description {
    font-size: 15px;
    margin-bottom: 26px;
  }

  .outcome-actions,
  .is-embedded .outcome-actions {
    gap: 14px;
  }

  .btn,
  .is-embedded .btn {
    padding: 11px 34px;
    font-size: 14px;
  }
}

@media (max-height: 480px) {
  .card,
  .is-embedded .card {
    padding: 22px 20px;
    border-radius: 12px;
  }

  .question,
  .is-embedded .question {
    font-size: 19px;
    margin-bottom: 14px;
  }

  .option,
  .is-embedded .option {
    min-height: 58px;
    font-size: 13.5px;
    padding: 10px 14px;
  }

  .options,
  .is-embedded .options {
    gap: 10px;
  }

  .outcome-logo,
  .is-embedded .outcome-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }

  .outcome-title,
  .is-embedded .outcome-title {
    font-size: 22px;
  }

  .outcome-description,
  .is-embedded .outcome-description {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 18px;
  }

  .outcome-actions,
  .is-embedded .outcome-actions {
    gap: 10px;
  }

  .btn,
  .is-embedded .btn {
    padding: 10px 28px;
    font-size: 13.5px;
  }
}

/* Narrow embeds: single column of answers. */

@media (max-width: 560px) {
  .is-embedded .card {
    padding: 26px 18px;
  }

  .options,
  .is-embedded .options {
    grid-template-columns: minmax(0, 1fr);
  }

  .option,
  .is-embedded .option {
    min-height: 56px;
  }
}
