*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
/* Disable the browser's pull-to-refresh gesture. Without this, a downward
   touch while signing (or drifting off the signature canvas) reloads the page
   mid-attestation and the signature is lost before it can be submitted. */
html,body{overscroll-behavior-y:contain}
:root{
  --navy:#183866;--navy2:#0f2547;
  --pink:#eb4a99;--pink2:#d63a87;
  --font:'DM Sans',system-ui,sans-serif;
  --r:8px;--rl:14px;
  --bd:#E2E8F0;--bg:#F7F8FA;--wh:#fff;
  --tx:#0F1923;--mu:#64748B;--lt:#94A3B8;
  --ok:#059669;--ok-bg:#ECFDF5;
  --er:#DC2626;--er-bg:#FEF2F2;
}
body{font-family:var(--font);background:var(--bg);color:var(--tx);min-height:100vh;padding:2rem 1rem 5rem;-webkit-font-smoothing:antialiased}
.wrap{max-width:660px;margin:0 auto}

/* HEADER MARK */
.hdr-mark{display:flex;justify-content:center;align-items:center;margin:.5rem 0 1.25rem}
.hdr-mark img{height:56px;width:auto;display:block}

/* PROGRESS */
.prog{display:flex;align-items:center;background:var(--wh);border:1px solid var(--bd);border-radius:var(--rl);padding:1rem 1.5rem;margin-bottom:1.25rem}
.ps{display:flex;align-items:center;gap:8px;flex:1}
.ps:last-child{flex:0 0 auto}
.pdot{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;border:1.5px solid var(--bd);color:var(--lt);flex-shrink:0;transition:all .2s}
.pdot.on{background:var(--navy);border-color:var(--navy);color:#fff}
.pdot.dn{background:var(--ok-bg);border-color:var(--ok);color:var(--ok)}
.plbl{font-size:12px;color:var(--lt);transition:color .2s;white-space:nowrap}
.plbl.on{color:var(--tx);font-weight:500}
.pline{flex:1;height:1px;background:var(--bd);margin:0 10px}

/* CARD */
.card{background:var(--wh);border:1px solid var(--bd);border-radius:var(--rl);padding:1.75rem}
.step{display:none}
.step.on{display:block}

/* SECTION LABELS */
.slbl{font-size:10.5px;font-weight:500;text-transform:uppercase;letter-spacing:.09em;color:var(--mu);padding-bottom:10px;border-bottom:1px solid #F1F5F9;margin-bottom:1.1rem}

/* FIELDS */
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.row.full{grid-template-columns:1fr}
.f{display:flex;flex-direction:column;gap:5px}
.f label{font-size:13px;font-weight:500;color:#334155}
.opt{font-size:11px;font-weight:400;color:var(--lt);margin-left:4px}
.req{color:var(--pink);font-weight:500;margin-left:2px}
input[type=text],input[type=date],input[type=tel],input[type=email]{height:42px;padding:0 12px;border:1px solid var(--bd);border-radius:var(--r);font-family:var(--font);font-size:16px;color:var(--tx);background:#fff;outline:none;transition:border-color .15s,box-shadow .15s;width:100%}
input:focus{border-color:var(--navy);box-shadow:0 0 0 3px rgba(24,56,102,.07)}
input::placeholder{color:#CBD5E1}
input.err{border-color:var(--er)}

/* CRITERIA */
.cgrp{margin-bottom:1.25rem}
.cgrp:last-child{margin-bottom:0}
.chd{font-size:10.5px;font-weight:500;text-transform:uppercase;letter-spacing:.08em;color:var(--mu);padding-bottom:7px;border-bottom:1px solid #F1F5F9;margin-bottom:2px}
.ci{display:flex;gap:10px;padding:9px 8px;border-radius:var(--r);cursor:pointer;align-items:flex-start;transition:background .1s;user-select:none}
.ci:hover{background:#F8FAFC}
.ci input[type=checkbox]{width:18px;height:18px;min-width:18px;margin-top:1px;cursor:pointer;accent-color:var(--navy)}
.cin{font-size:13.5px;font-weight:500;color:var(--tx);line-height:1.4;margin-bottom:2px}
.cid{font-size:12px;color:var(--mu);line-height:1.5}

/* PROVIDER PICKER */
.pgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.pc{border:1.5px solid var(--bd);border-radius:var(--rl);padding:1.25rem 1rem;cursor:pointer;transition:all .15s;text-align:center;background:#fff;user-select:none;position:relative;-webkit-tap-highlight-color:transparent}
.pc:hover{border-color:#94A3B8;background:#F8FAFC}
.pc.sel{border-color:var(--navy);background:#F0F4F8;box-shadow:0 0 0 3px rgba(24,56,102,.07)}
.pav{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:500;margin:0 auto 10px}
.av-a{background:#EFF6FF;color:#1D4ED8}
.av-b{background:#F0FDF4;color:#166534}
.av-c{background:#FDF4FF;color:#7E22CE}
.av-d{background:#FFF7ED;color:#C2410C}
.av-e{background:#F0FDFA;color:#0F766E}
.pnm{font-size:13.5px;font-weight:500;color:var(--tx);line-height:1.3}
.pchk{width:20px;height:20px;border-radius:50%;background:var(--navy);color:#fff;display:none;align-items:center;justify-content:center;font-size:11px;margin:9px auto 0}
.pc.sel .pchk{display:flex}

/* ATTESTATION */
.attest{background:#F8FAFC;border:1px solid #E2E8F0;border-radius:var(--r);padding:1rem;font-size:12px;line-height:1.7;color:var(--mu);font-style:italic;margin-bottom:1.25rem}

/* SIGNATURE */
.siglbl{font-size:13px;font-weight:500;color:#334155;margin-bottom:6px;display:block}
.sigwrap{border:1px solid var(--bd);border-radius:var(--r);background:#fff;overflow:hidden;position:relative}
.sighint{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:12px;color:#CBD5E1;pointer-events:none;transition:opacity .2s;white-space:nowrap}
canvas{display:block;width:100%;height:180px;cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none}
.sigfoot{display:flex;align-items:center;justify-content:space-between;margin-top:6px;gap:8px;flex-wrap:wrap}
.bclr{font-family:var(--font);font-size:12px;color:var(--mu);background:none;border:1px solid var(--bd);border-radius:99px;padding:6px 14px;cursor:pointer;min-height:32px}
.bclr:hover{background:#F1F5F9}
.signote{font-size:11px;color:var(--lt)}

/* NAV */
.nav{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:1.5rem;margin-top:1rem;border-top:1px solid #F1F5F9}
.btn{font-family:var(--font);font-size:14px;font-weight:500;padding:12px 22px;border-radius:var(--r);border:1px solid var(--bd);background:#fff;color:var(--tx);cursor:pointer;transition:all .15s;min-height:44px;-webkit-tap-highlight-color:transparent}
.btn:hover{background:#F1F5F9}
.btn-p{background:var(--pink);color:#fff;border-color:var(--pink)}
.btn-p:hover{background:var(--pink2);border-color:var(--pink2)}
.btn-p:disabled{opacity:.45;cursor:not-allowed}

/* ERROR */
.errmsg{display:none;font-size:13px;color:var(--er);background:var(--er-bg);border-radius:var(--r);padding:10px 14px;margin-top:14px}

/* SUCCESS */
.okwrap{text-align:center;padding:3rem 1.5rem}
.okicon{width:56px;height:56px;border-radius:50%;background:var(--ok-bg);color:var(--ok);display:flex;align-items:center;justify-content:center;font-size:26px;margin:0 auto 1.25rem}
.okwrap h2{font-size:20px;font-weight:500;margin-bottom:8px}
.okwrap p{font-size:14px;color:var(--mu);max-width:360px;margin:0 auto 1.5rem;line-height:1.6}

/* ── DOES NOT QUALIFY ────────────────────────────────────────────
   The escape hatch under the criteria list, plus the shared prompt it opens
   (see /disqualify.js). Self-contained on purpose: the prompt depends only on
   this stylesheet, never on visit.css. */
.dq-cta{margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid #F1F5F9;text-align:center}
/* Deliberately quiet — findable, but never competing with "Next". */
.dq-link{font-family:var(--font);font-size:13px;font-weight:500;color:var(--mu);background:#fff;border:1px solid var(--bd);border-radius:var(--r);padding:11px 18px;cursor:pointer;transition:all .15s;min-height:42px;width:100%;-webkit-tap-highlight-color:transparent}
.dq-link:hover{background:var(--er-bg);border-color:#FCA5A5;color:var(--er)}
.dq-note{font-size:11.5px;color:var(--lt);margin-top:8px;line-height:1.5}

.dq-locked{overflow:hidden}
.dq-ov{position:fixed;inset:0;z-index:200;background:rgba(15,25,35,.5);display:flex;align-items:center;justify-content:center;padding:1.25rem;overflow-y:auto}
.dq-ov[hidden]{display:none}
.dq-modal{background:var(--wh);border-radius:var(--rl);width:100%;max-width:460px;padding:1.75rem;margin:auto;box-shadow:0 24px 60px rgba(15,23,35,.24)}
.dq-title{font-size:18px;font-weight:500;color:var(--tx);line-height:1.35;margin-bottom:8px}
.dq-sub{font-size:13px;color:var(--mu);line-height:1.6}
.dq-who{background:#F0F4F8;border:1px solid #DCE5F0;border-radius:var(--r);padding:10px 14px;margin-top:1.1rem;font-size:13.5px;color:var(--navy)}
.dq-who strong{font-weight:500}
.dq-who span{color:var(--mu);font-size:12.5px}
.dq-body{margin-top:1.25rem}
.dq-f{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.dq-f:last-child{margin-bottom:0}
.dq-f label{font-size:12.5px;font-weight:500;color:#334155}
.dq-f select,.dq-f textarea{font-family:var(--font);font-size:16px;color:var(--tx);background:#fff;border:1px solid var(--bd);border-radius:var(--r);outline:none;width:100%;transition:border-color .15s,box-shadow .15s}
.dq-f select{height:42px;padding:0 38px 0 12px;cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center}
.dq-f textarea{padding:10px 12px;line-height:1.5;resize:vertical;min-height:76px}
.dq-f select:focus,.dq-f textarea:focus{border-color:var(--navy);box-shadow:0 0 0 3px rgba(24,56,102,.07)}
.dq-f textarea::placeholder{color:#CBD5E1}
.dq-err{display:none;font-size:13px;color:var(--er);background:var(--er-bg);border-radius:var(--r);padding:10px 14px;margin-top:14px;line-height:1.5}
.dq-foot{display:flex;justify-content:flex-end;gap:10px;margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid #F1F5F9}
.dq-foot .btn:disabled{opacity:.45;cursor:not-allowed}

/* ── STOP-AND-ASK PROMPT ─────────────────────────────────────────
   /sheet.js, for "date of birth can't be today" (/dob-check.js) and "the
   notes name another language" (/lang-check.js): a card in the middle of
   the screen on a computer, a drawer up from the bottom on a phone. */
.sh-locked{overflow:hidden}
.sh-ov{position:fixed;inset:0;z-index:210;background:rgba(15,25,35,.45);display:flex;align-items:center;justify-content:center;padding:1.25rem;opacity:0;transition:opacity .2s ease}
.sh-ov[hidden]{display:none}
.sh-ov.in{opacity:1}
.sh-panel{background:var(--wh);border-radius:20px;width:100%;max-width:400px;padding:2rem 1.75rem 1.75rem;text-align:center;box-shadow:0 24px 60px rgba(15,23,35,.24);transform:translateY(10px) scale(.97);transition:transform .24s cubic-bezier(.2,.8,.2,1)}
.sh-ov.in .sh-panel{transform:none}
.sh-grab{display:none}
.sh-art{display:block;width:116px;height:116px;margin:-.25rem auto .9rem}
.sh-glass,.sh-bob{animation:sh-hover 3.6s ease-in-out infinite}
.sh-bob2{animation-delay:-1.8s}
@keyframes sh-hover{0%,100%{transform:translate(0,0)}50%{transform:translate(-1.5px,-2px)}}
.sh-title{font-size:21px;font-weight:500;color:var(--tx);line-height:1.3;margin-bottom:10px}
.sh-text{font-size:14.5px;color:var(--mu);line-height:1.6;max-width:320px;margin:0 auto}
.sh-text+.sh-text{margin-top:10px}
.sh-chip{display:inline-block;background:#FDECF4;color:var(--pink2);font-weight:500;border-radius:6px;padding:0 7px;white-space:nowrap}
.sh-actions{display:flex;flex-direction:column;gap:10px;margin-top:1.6rem}
.sh-btn{width:100%;font-size:15px;min-height:48px;border-radius:10px}
.sh-btn:not(.btn-p){background:#F1F5F9;border-color:#F1F5F9;color:var(--tx)}
.sh-btn:not(.btn-p):hover{background:#E2E8F0;border-color:#E2E8F0}
.sh-btn:focus{outline:none}
.sh-btn:focus-visible{box-shadow:0 0 0 3px #fff,0 0 0 5px rgba(235,74,153,.4)}
@media(max-width:520px){
  .sh-ov{align-items:flex-end;padding:0}
  .sh-panel{max-width:none;border-radius:22px 22px 0 0;padding:.65rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));transform:translateY(100%);transition-duration:.3s;box-shadow:0 -12px 40px rgba(15,23,35,.18)}
  .sh-grab{display:block;width:40px;height:5px;border-radius:3px;background:#E2E8F0;margin:0 auto 1.1rem}
  .sh-art{width:100px;height:100px;margin:0 auto .75rem}
}
@media(prefers-reduced-motion:reduce){.sh-ov,.sh-panel{transition:none}.sh-glass,.sh-bob{animation:none}}

/* Outcome banner shown on a visit already marked "not qualified". */
.dqwarn{font-size:13px;color:#9F1239;background:#FFF1F2;border:1px solid #FECDD3;border-radius:var(--r);padding:10px 14px;line-height:1.6;margin-bottom:1rem}
.dqwarn b{font-weight:500}

/* RESPONSIVE — TABLET */
@media(max-width:640px){
  body{padding:1rem .75rem 4rem}
  .hdr-mark{margin:.25rem 0 1rem}
  .hdr-mark img{height:46px}
  .card{padding:1.25rem}
  .prog{padding:.85rem 1rem}
  .pgrid{grid-template-columns:repeat(2,1fr)}
}

/* RESPONSIVE — PHONE */
@media(max-width:520px){
  .row{grid-template-columns:1fr}
  .pgrid{grid-template-columns:1fr;gap:8px}
  .pc{display:flex;align-items:center;text-align:left;padding:.85rem 1rem;gap:12px}
  .pav{margin:0;width:40px;height:40px;font-size:14px;flex-shrink:0}
  .pnm{flex:1}
  .pchk{margin:0}
  .plbl{display:none}
  .prog{padding:.75rem 1rem}
  .pline{margin:0 6px}
  canvas{height:160px}
  .nav{flex-direction:column-reverse;align-items:stretch}
  .nav .btn{width:100%;text-align:center}
  .nav>div:empty{display:none}
  .ci{padding:10px 6px}
  .sigfoot{justify-content:space-between}
  /* Same stacking as .nav — primary action on top, thumb-reachable. */
  .dq-ov{padding:.75rem;align-items:flex-start}
  .dq-modal{padding:1.25rem}
  .dq-foot{flex-direction:column-reverse;align-items:stretch}
  .dq-foot .btn{width:100%;text-align:center}
}

@media(max-width:380px){
  .hdr-mark img{height:40px}
  .card{padding:1rem}
  canvas{height:150px}
}
