:root {
  --bg: #ffffff;
  --soft: #f6f8fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #526075;
  --line: #e4e9f0;
  --brand: #059669;
  --brand-ink: #ffffff;
  --grad: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
  --grad-hover: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  --focus: #0ea5e9;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 40px -12px rgba(15, 23, 42, .18);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* icon tints: background / foreground */
  --emerald-bg: #d1fae5; --emerald: #047857;
  --sky-bg: #e0f2fe;     --sky: #0369a1;
  --cyan-bg: #cffafe;    --cyan: #0e7490;
  --amber-bg: #fef3c7;   --amber: #b45309;
  --rose-bg: #ffe4e6;    --rose: #be123c;
  --indigo-bg: #e0e7ff;  --indigo: #4338ca;
  --teal-bg: #ccfbf1;    --teal: #0f766e;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Disclosure: required at top and bottom of the page, wording fixed by CardRatings. */
.disclosure { font-size: 12px; line-height: 1.45; color: var(--muted); }

.site-header { padding: 14px 0 12px; background: var(--surface); position: relative; z-index: 2; }
/* Top disclosure sits under the logo (required at the top and bottom of the page; wording fixed by CardRatings). */
.disclosure--top { margin: 6px 0 0; font-size: 11px; }
/* One line on laptops and up (measured: the full text needs ~1010px at 11.5px; the header row is 1048px). */
@media (min-width: 1100px) { .disclosure--top { font-size: 11.5px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__mark { display: block; width: 36px; height: 36px; flex: none; }
.brand__name { font-size: 21px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.brand__name span { margin-left: .18em; color: var(--brand); font-weight: 700; }

/* Hero: full-bleed photo with a dark shade so white text stays readable.
   Phones: the photo is a band at the top and the quiz card overlaps its lower edge.
   Desktop: the photo fills the hero; copy and quiz sit in the left column, the person stays visible on the right. */
.hero { position: relative; isolation: isolate; padding: 0 0 26px; }
.hero__photo, .hero__shade { position: absolute; left: 0; right: 0; top: 0; height: 300px; z-index: -1; }
.hero__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; }
/* Light at the top so the face stays visible, dark at the bottom where the headline sits. */
.hero__shade { background: linear-gradient(180deg, rgba(6, 22, 33, .05) 0%, rgba(6, 22, 33, .2) 30%, rgba(6, 22, 33, .78) 68%, rgba(6, 22, 33, .9) 100%); }
.hero__grid { display: grid; gap: 18px; align-items: start; }
.hero__copy { min-height: 284px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.hero__copy .pill { display: none; }
.hero .quiz { margin-top: -6px; }

.pill {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 600; color: #fff;
}
.pill svg { color: #6ee7b7; }
h1 { font-size: clamp(28px, 7.4vw, 50px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; margin: 0 0 8px; }
.grad { background: linear-gradient(135deg, #6ee7b7 0%, #7dd3fc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin: 0; color: rgba(255, 255, 255, .88); font-size: 17px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }

/* Quiz card */
.quiz {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px;
}
.quiz[data-state="loading"] .step { visibility: hidden; }
.quiz__bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.quiz__back {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; flex: none;
}
.quiz__back:hover { color: var(--ink); border-color: #cbd5e1; }
.progress { flex: 1; height: 8px; background: #edf1f6; border-radius: 99px; overflow: hidden; }
.progress__fill { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .35s ease; }
.quiz__count { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { animation: slide-in .28s ease both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.step__q { font-size: 21px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; margin: 0 0 4px; padding: 0; }
.step__q:focus { outline: none; }
.step__hint { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.step__hint:empty { display: none; margin: 0 0 12px; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; min-height: 92px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.25; text-align: left; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.option--plain { min-height: 60px; justify-content: center; }
.option--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 64px; }
.option:hover { border-color: #b6c2d2; box-shadow: 0 6px 18px -10px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.option:active { transform: scale(.98); }
.option[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.option small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--muted); }
.option__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none; }
.option__icon svg { width: 21px; height: 21px; }

.t-emerald { background: var(--emerald-bg); color: var(--emerald); }
.t-sky { background: var(--sky-bg); color: var(--sky); }
.t-cyan { background: var(--cyan-bg); color: var(--cyan); }
.t-amber { background: var(--amber-bg); color: var(--amber); }
.t-rose { background: var(--rose-bg); color: var(--rose); }
.t-indigo { background: var(--indigo-bg); color: var(--indigo); }
.t-teal { background: var(--teal-bg); color: var(--teal); }

/* Result */
.result { animation: pop .35s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.result__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.result__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; flex: none; }
.result__icon svg { width: 28px; height: 28px; }
.result__label { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.result__title { font-size: 23px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; margin: 2px 0 0; }
.result__title:focus { outline: none; }
.result__status {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 14px;
  background: var(--soft); border-radius: 14px; font-size: 15px; font-weight: 600; color: var(--muted);
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2.5px solid rgba(5, 150, 105, .2); border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result.is-idle .spinner { display: none; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 14px 20px;
  border-radius: 14px; background: var(--grad); color: var(--brand-ink); font-weight: 800; font-size: 18px; text-decoration: none;
  box-shadow: 0 12px 26px -10px rgba(14, 165, 233, .6);
  transition: transform .12s ease, box-shadow .15s ease;
}
.cta:hover { background: var(--grad-hover); transform: translateY(-1px); }
.cta svg { transition: transform .15s ease; }
.cta:hover svg { transform: translateX(3px); }
.result__note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.result__more { margin: 10px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }

/* How it works: one compact row */
.cats { padding-top: 32px; padding-bottom: 32px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.cats h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 14px; }
.cats__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat {
  display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
/* height:auto lets aspect-ratio win over the height attribute that prevents layout shift. */
.cat img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.cat:hover img { transform: scale(1.04); }
.cat__body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.cat__body strong { font-size: 15px; }
.cat__body > span:not(.cat__go) { font-size: 13px; color: var(--muted); line-height: 1.4; }
.cat__go { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--brand); }

/* FAQ */
.faq { padding-bottom: 36px; }
.faq h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin-bottom: 8px; background: var(--surface); }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 500; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 14px; font-size: 15px; color: var(--muted); }

.site-footer { background: var(--soft); border-top: 1px solid var(--line); padding: 22px 0 36px; font-size: 13px; color: var(--muted); }
.site-footer p { margin: 0 0 10px; }
.footer-links { display: flex; gap: 18px; margin: 12px 0 8px; }
.copyright { font-size: 12px; }

/* Legal pages */
.legal { max-width: 760px; padding-top: 24px; padding-bottom: 40px; }
.legal h1 { font-size: 32px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }

@media (min-width: 560px) {
  .hero__copy .pill { display: inline-flex; }
  .quiz { padding: 24px; }
  .option { min-height: 104px; padding: 14px; font-size: 16px; }
  .option--plain { min-height: 64px; }
  .option--wide { min-height: 64px; }
  .cats__grid { grid-template-columns: repeat(4, 1fr); }
  .cats h2 { font-size: 28px; }
}

@media (min-width: 900px) {
  .hero { padding: 0 0 56px; }
  .hero__photo, .hero__shade { height: 100%; }
  .hero__photo img { object-position: 70% 35%; }
  .hero__shade { background: linear-gradient(90deg, rgba(6, 22, 33, .86) 0%, rgba(6, 22, 33, .66) 34%, rgba(6, 22, 33, .12) 62%, rgba(6, 22, 33, 0) 80%); }
  /* Top-aligned so the quiz card does not jump when a shorter question replaces a longer one. */
  /* One left column: copy above the quiz, leaving the right side of the photo open. */
  .hero__grid { grid-template-columns: minmax(0, 540px); gap: 20px; padding-top: 30px; }
  .hero__copy { min-height: 0; display: block; }
  .hero .quiz { margin-top: 0; }
  /* Icon beside the label keeps the quiz card short enough to fit the first screen. */
  .option { flex-direction: row; align-items: center; min-height: 66px; gap: 12px; }
  .hero .lede { font-size: 19px; }
  .quiz { padding: 28px; }
  .step__q { font-size: 24px; }
}

@media (max-width: 340px) {
  .options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
