@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

/* Design tokens — change the look of the whole site here. */
:root {
  --bg: #F5F8FC;          /* page */
  --surface: #FFFFFF;     /* sheets */
  --navy: #0D2A5C;        /* headings */
  --ink: #22324A;         /* body text */
  --muted: #64748B;       /* secondary text */
  --line: #E3E9F1;        /* hairlines, borders */
  --blue: #0B7BC9;        /* primary action / selection */
  --blue-ink: #075E9C;
  --blue-wash: #EAF4FB;   /* selected background */
  --cyan: #13B5D1;        /* progress accent */
  --err-bg: #FDF0F0;
  --err-ink: #9B1C1C;
  --warn-bg: #FFF7E6;
  --warn-ink: #7A5200;
  --r-sheet: 20px;
  --r-ctl: 12px;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { color: var(--navy); margin: 0 0 .5em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 7.5vw, 3.3rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
main:focus, main:focus-visible { outline: none; }

/* ───────────── Top bar ───────────── */
.topbar { max-width: 720px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 650; font-size: .98rem; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }

main { max-width: 720px; margin: 0 auto; padding: 0 20px 140px; }

/* ───────────── Sheets & buttons ───────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sheet);
  padding: 28px 22px;
  margin-bottom: 14px;
}
@media (min-width: 640px) { .card { padding: 40px 44px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 24px;
  border-radius: var(--r-ctl); border: 1px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 1rem; text-decoration: none; letter-spacing: -0.005em;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #163A75; }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { border-color: #C9D4E2; }
.btn-ghost { background: transparent; color: var(--muted); padding: 0 12px; }
.btn-ghost:hover { color: var(--navy); }
.btn-block { width: 100%; }
.btn-lg { min-height: 58px; font-size: 1.05rem; }

/* ───────────── Landing ───────────── */
.hero { padding: 7vh 0 8px; }
.hero h1 { max-width: 12ch; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 32em; }
.hero .lede { margin-top: 18px; }
.hero-actions { margin: 32px 0 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .hero-actions { max-width: 340px; } }
.meta { color: var(--muted); font-size: .92rem; text-align: center; }
@media (min-width: 640px) { .hero .meta { text-align: left; } }
.info {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--ink); font-size: .98rem;
}
.info svg { flex: none; margin-top: 3px; }
.about { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.about h2 { font-size: 1.05rem; margin-bottom: 6px; }
.about p { color: var(--muted); margin: 0; max-width: 36em; }

/* ───────────── Progress ───────────── */
.progress { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0 16px; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.progress-section { font-weight: 600; color: var(--navy); font-size: .95rem; }
.progress-pct { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.progress-track { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }

/* ───────────── Questions ───────────── */
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q + .divider + .q, .divider { }
.divider { height: 1px; background: var(--line); margin: 34px -22px; }
@media (min-width: 640px) { .divider { margin: 40px -44px; } }
.q legend, .q .q-title { display: block; padding: 0; font-size: 1.28rem; font-weight: 650; color: var(--navy); line-height: 1.3; letter-spacing: -0.015em; margin-bottom: 6px; }
.q-help, .q-sub { color: var(--muted); font-size: .95rem; margin: 4px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; border-radius: 8px; padding: 4px 10px; }
.chip-focus { background: var(--blue-wash); color: var(--blue-ink); }
.chip-star { background: #E7F8F3; color: #0B6E57; }

.options { display: grid; gap: 8px; margin-top: 18px; }
@media (min-width: 640px) { .options.cols-2 { grid-template-columns: 1fr 1fr; } }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: flex; align-items: center; gap: 14px;
  min-height: 54px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); cursor: pointer; line-height: 1.35;
  transition: border-color .12s, background-color .12s;
}
.opt span::before {
  content: ''; flex: none; width: 20px; height: 20px;
  border: 1.5px solid #B8C3D2; background: #fff; border-radius: 50%;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.opt input[type=checkbox] + span::before { border-radius: 6px; }
.opt:hover span { border-color: #C3CEDD; }
.opt input:checked + span { border-color: var(--blue); background: var(--blue-wash); color: var(--navy); }
.opt input[type=radio]:checked + span::before { border-color: var(--blue); box-shadow: inset 0 0 0 5px var(--blue); }
.opt input[type=checkbox]:checked + span::before {
  border-color: var(--blue); background: var(--blue) center/13px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.opt input:disabled + span { opacity: .4; cursor: not-allowed; }

.limit-note { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.limit-note.full { color: var(--blue-ink); font-weight: 600; }

textarea, .field input, .other-input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 14px 16px; background: #FBFCFE; transition: border-color .12s, background-color .12s;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; margin-top: 18px; }
textarea:focus, .field input:focus, .other-input:focus { outline: none; border-color: var(--blue); background: #fff; }
.other-input { margin-top: 8px; }
.char-count { text-align: right; font-size: .8rem; color: var(--muted); margin-top: 4px; min-height: 1em; }

/* ───────────── Navigation bar ───────────── */
.navbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgba(245, 248, 252, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}
.navbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.navbar .btn-primary { flex: 1; }
@media (min-width: 640px) { .navbar .btn-primary { flex: 0 0 auto; min-width: 190px; } .navbar .spacer { flex: 1; } }
.navbar .btn-back { padding: 0 18px; }
.saved-note { font-size: .82rem; color: var(--muted); display: none; }
@media (min-width: 640px) { .saved-note { display: inline; margin-left: 6px; } }

/* ───────────── Finished / thank you ───────────── */
.center { text-align: center; }
.big-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  margin: 4px auto 22px; background: var(--blue-wash); color: var(--blue);
}
.big-icon svg { width: 30px; height: 30px; }
.big-icon.pop { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.center h1 { font-size: 2rem; }
.center .lede { margin: 0 auto; }
.stack { display: grid; gap: 10px; max-width: 360px; margin: 28px auto 0; }
.stack.left { margin-left: 0; }

/* ───────────── Review ───────────── */
.review-head { padding: 8px 0 10px; }
.review-head h1 { font-size: 2rem; }
.review-head p { color: var(--muted); }
.review-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 6px 22px; margin-bottom: 14px; }
@media (min-width: 640px) { .review-sheet { padding: 8px 32px; } }
.review-section-title { font-size: .9rem; font-weight: 650; color: var(--muted); margin: 26px 2px 10px; }
.review-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.review-item:first-child { border-top: 0; }
.review-item.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 40% { background: var(--blue-wash); } 100% { background: transparent; } }
.review-body { flex: 1; min-width: 0; }
.review-q { font-weight: 600; color: var(--navy); font-size: .98rem; margin-bottom: 4px; }
.review-a { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-a ul { margin: 0; padding-left: 1.1em; }
.skipped { color: var(--muted); }
.edit-btn { flex: none; min-height: 40px; padding: 0 12px; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: .95rem; cursor: pointer; border-radius: 8px; }
.edit-btn:hover { background: var(--blue-wash); }

.alert { border-radius: var(--r-ctl); padding: 14px 16px; margin: 18px 0; font-size: .96rem; text-align: left; }
.alert-error { background: var(--err-bg); color: var(--err-ink); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); }

/* ───────────── Contact ───────────── */
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: .95rem; }
.field-hint { font-weight: 400; color: var(--muted); }
.mail { font-weight: 600; font-size: 1.05rem; word-break: break-all; }
.footnote { text-align: center; padding: 22px 0; color: var(--muted); font-size: .95rem; }
.footnote p { margin: 0 0 4px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.turnstile-box { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 20; }

/* One quiet transition between screens. */
.enter { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ───────────── Logo ───────────── */
.brand img { border-radius: 0; width: auto; height: 32px; }
body.landing .topbar { display: none; }
.hero-logo { display: block; width: min(220px, 60vw); height: auto; margin: 0 0 36px; }
.hero { padding-top: 32px; }
@media (min-width: 640px) { .hero { padding-top: 56px; } .hero-logo { width: 240px; } }
