@font-face {
  font-family: Nunito;
  src: url('/assets/nunito.ttf') format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #ebe9eb;
  --paper: #fff;
  --text: #3e3842;
  --muted: #625a67;
  --choice: #e2dfe3;
  --line: #d7d2da;
  --accent: #1830af;
  --selected: #e0e4f7;
  --error: #a62132;
  font-family: Nunito, sans-serif;
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); text-underline-offset: 4px; }
::selection { background: #fdb913; color: #1830af; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 12px; background: #fff; }
.skip-link:focus { top: 10px; }
.topbar { height: 56px; display: flex; align-items: center; padding: 0 16px; background: var(--paper); gap: 20px; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; width: 78px; height: 28px; object-fit: contain; }
.stages { position: absolute; left: 50%; transform: translateX(-50%); }
.stages ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; }
.stage { display: flex; align-items: center; gap: 9px; font-size: 13px; white-space: nowrap; color: var(--muted); }
.stage + .stage::before { content: ''; width: 64px; border-top: 1px dotted #aaa3ad; margin: 0 9px 0 17px; }
.stage.is-complete + .stage::before { border-top-style: solid; }
.stage-marker { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #efedef; color: #625a67; font-size: 12px; font-weight: 700; }
.stage.is-active .stage-marker, .stage.is-complete .stage-marker { background: var(--accent); color: #fff; }
.stage.is-active { color: var(--text); }
.stage-marker svg { width: 13px; height: 13px; }
.privacy-link { margin-left: auto; border: 0; padding: 10px 0 10px 10px; background: none; font-size: 12px; color: var(--muted); }
.privacy-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.main { min-height: calc(100svh - 56px); display: flex; align-items: center; padding: 70px 32px 100px; }
.question { width: min(720px, 100%); margin: 0 auto; position: relative; }
.question h1 { margin: 0 0 37px; color: var(--text); font-size: 25px; line-height: 1.4; font-weight: 500; letter-spacing: 0; outline: 0; }
.question-number { position: absolute; top: 7px; right: calc(100% + 10px); display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: 3px; min-width: 17px; height: 20px; padding: 0 3px; font-size: 12px; font-weight: 800; }
.required { margin-left: 3px; }
.heading-last-word { white-space: nowrap; }
.question-description { margin: -22px 0 28px; max-width: 62ch; font-size: 15px; line-height: 1.6; color: var(--muted); }
.answers { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: min(355px, 100%); border: 0; padding: 0; margin: 0; min-width: 0; }
.choice { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 9px 11px; gap: 9px; background: var(--choice); border: 1px solid var(--line); border-radius: 0; text-align: left; color: var(--text); font-size: 17px; line-height: 1.4; letter-spacing: .1px; transition: background 140ms, border-color 140ms; }
.choice:hover { background: #d8d4dd; border-color: #b3aab9; }
.choice[aria-checked='true'] { background: var(--selected); border-color: var(--accent); color: var(--accent); }
.keycap { flex: 0 0 24px; width: 24px; height: 25px; display: grid; place-items: center; border: 1px solid #bdb5c3; font-size: 12px; line-height: 1; color: var(--text); }
.choice[aria-checked='true'] .keycap { background: var(--accent); color: #fff; border-color: var(--accent); }
.choice-label { flex: 1; overflow-wrap: anywhere; }
.choice-check { width: 16px; height: 16px; flex: 0 0 16px; }
.choice:not([aria-checked='true']) .choice-check { visibility: hidden; }
.question-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.continue { min-height: 41px; padding: 8px 17px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .2px; }
.continue:hover { background: #112580; }
.continue:disabled { cursor: wait; background: #33459c; }
.choice:disabled { cursor: default; }
.continue:active { transform: translateY(1px); }
.keyboard-hint { font-size: 12px; color: var(--muted); }
.keyboard-hint strong { font-weight: 800; }
.error { width: min(500px, 100%); font-size: 14px; line-height: 1.5; color: var(--error); margin: 12px 0 0; }
.text-field { display: block; width: min(500px, 100%); border: 0; border-bottom: 1px solid #847a8c; background: transparent; padding: 12px 0; font-size: 23px; line-height: 1.5; color: var(--text); caret-color: var(--accent); border-radius: 0; resize: vertical; }
.text-field::placeholder { color: var(--muted); opacity: 1; }
.text-field:focus { border-bottom-color: var(--accent); }
.other-wrap { margin-top: 20px; }
.other-label { display: block; font-size: 14px; margin-bottom: 2px; }
.other-wrap .text-field { font-size: 18px; width: min(355px, 100%); }
.question-navigation { position: fixed; z-index: 3; bottom: max(30px, env(safe-area-inset-bottom)); right: 27px; display: flex; align-items: center; gap: 15px; }
.arrow-group { display: flex; border-radius: 4px; overflow: hidden; background: var(--accent); }
.arrow-group button { width: 34px; height: 34px; border: 0; background: var(--accent); color: #fff; padding: 7px; }
.arrow-group button + button { border-left: 1px solid #ffffff4d; }
.arrow-group button:hover:not(:disabled) { background: #112580; }
.arrow-group button:disabled { color: #b3bce8; background: #273a9c; }
.arrow-group button:focus-visible { outline-offset: -4px; outline-color: #fff; }
.question-counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.welcome h1, .complete h1 { font-size: 32px; line-height: 1.35; margin-bottom: 22px; max-width: 560px; }
.welcome p, .complete p { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 570px; }
.welcome .region-label { font-size: 13px; margin: 28px 0 10px; }
.region-options { display: flex; flex-wrap: wrap; gap: 7px; }
.region-option { padding: 8px 12px; background: var(--choice); color: var(--text); border: 1px solid var(--line); font-size: 14px; }
.region-option[aria-pressed='true'] { color: var(--accent); background: var(--selected); border-color: var(--accent); }
.welcome .research-note, .complete .research-note { font-size: 12px; line-height: 1.6; margin-top: 20px; }
.preview-note { font-size: 12px !important; line-height: 1.5 !important; margin-top: 14px; }
.captcha-notice { font-size: 11px !important; line-height: 1.6 !important; color: var(--muted); margin-top: 14px; max-width: 355px; }
.receipt { font-size: 13px !important; overflow-wrap: anywhere; }
.grecaptcha-badge { visibility: hidden !important; }
.draft-controls { max-width: 500px; margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.draft-controls summary { cursor: pointer; color: var(--accent); padding: 10px 0; min-height: 44px; text-underline-offset: 4px; }
.draft-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; min-height: 44px; cursor: pointer; color: var(--text); font-size: 15px; }
.draft-toggle input { accent-color: var(--accent); flex: 0 0 18px; width: 18px; height: 18px; margin: 4px 0 0; }
.question .draft-help, .question .draft-status, .question .draft-resume { font-size: 13px; line-height: 1.6; margin: 6px 0; max-width: 65ch; color: var(--muted); }
.question .draft-resume { margin-top: 24px; font-size: 15px; color: var(--text); }
.draft-status.draft-error { color: var(--error); }
#restart-saved, .draft-controls .text-button { min-height: 44px; }
.text-button { background: none; color: var(--accent); border: 0; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 48px); padding: 28px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--paper); }
dialog::backdrop { background: #20182d66; }
.privacy-heading { display: flex; gap: 12px; align-items: start; }
.privacy-heading h2 { font-size: 22px; font-weight: 700; margin: 0 0 14px; flex: 1; }
.privacy-heading button { border: 0; background: transparent; padding: 0 4px; min-width: 32px; min-height: 32px; color: var(--text); }
dialog p { font-size: 15px; line-height: 1.7; }
dialog a { font-size: 14px; overflow-wrap: anywhere; }
.noscript { padding: 30px; }

@media (min-width: 1000px) {
  .main { padding-top: 35px; padding-bottom: 100px; }
}
@media (max-width: 900px) {
  .stage + .stage::before { width: 25px; margin-left: 12px; margin-right: 5px; }
  .main { padding-left: 55px; padding-right: 35px; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 16px; height: 64px; }
  .brand img { width: 64px; height: 24px; }
  .stages { position: static; transform: none; margin-left: auto; }
  .stages ol { gap: 7px; }
  .stage { gap: 0; }
  .stage-label, .stage + .stage::before { display: none; }
  .stage-marker { width: 20px; height: 20px; }
  .privacy-link { margin-left: 0; padding-left: 0; }
  .main { min-height: calc(100svh - 134px); align-items: flex-start; padding: 72px 24px 32px 39px; }
  .question h1 { font-size: 22px; margin-bottom: 28px; }
  .question-number { top: 5px; right: calc(100% + 7px); min-width: 16px; font-size: 11px; height: 19px; }
  .question-description { font-size: 14px; margin-top: -14px; margin-bottom: 24px; }
  .choice { min-height: 48px; font-size: 16px; padding: 10px; gap: 9px; }
  .answers { width: 100%; }
  .question-actions { margin-top: 25px; gap: 13px; }
  .keyboard-hint { display: none; }
  .continue { min-height: 44px; }
  .question-navigation { position: relative; right: auto; bottom: auto; justify-content: flex-end; min-height: 70px; background: var(--canvas); padding: 12px 18px max(18px, env(safe-area-inset-bottom)); }
  .arrow-group button { width: 40px; height: 40px; padding: 10px; }
  .welcome h1, .complete h1 { font-size: 27px; }
  .welcome p, .complete p { font-size: 16px; }
  .region-options { flex-direction: column; align-items: flex-start; }
  .region-option { min-height: 44px; min-width: 180px; text-align: left; }
}
@media (max-height: 600px) and (min-width: 601px) {
  .main { align-items: flex-start; padding-top: 60px; }
}
@media (prefers-reduced-motion: no-preference) {
  .question.is-entering { animation: question-in 190ms ease-out; }
  @keyframes question-in { from { opacity: .6; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
