/* Accident Helper - mobile-first, self-contained (no Tailwind build). */
.ah-page { --navy:#0F2A4D; --navy-deep:#0A1F3C; --gold:#C9A22C; --gold-dark:#b08c1f; --cream:#FBF6E9; --cream-line:#eadfbe;
  --ink:#1c2b41; --muted:#5a6779; --line:#dfe3ea; --bg:#f2f0ea; --red:#d7261e; --red-bg:#fff4f3; --green:#2e9e5b; --green-bg:#e9f6ee; --blue:#1d6fe0;
  --dock:118px; margin:0; background:var(--bg); color:var(--ink); font:400 16px/1.5 'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  -webkit-font-smoothing:antialiased; -webkit-text-size-adjust:100%; }
.ah-page *, .ah-page *::before, .ah-page *::after { box-sizing:border-box; }
.ah-page h1, .ah-page h2, .ah-page h3 { margin:0; color:var(--navy); letter-spacing:-.01em; line-height:1.15; }
.ah-page p { margin:0; }
.ah-page a { color:var(--navy); }
.ah-page a:focus-visible, .ah-page button:focus-visible, .ah-page input:focus-visible, .ah-page textarea:focus-visible, .ah-page summary:focus-visible { outline:3px solid var(--blue); outline-offset:2px; }
.ah-icon { width:22px; height:22px; flex:0 0 auto; }
.ah-skip { position:absolute; left:-9999px; top:8px; z-index:1000; background:var(--navy); color:#fff; padding:12px 18px; border-radius:8px; font-weight:700; }
.ah-skip:focus { left:8px; }

/* Header: logo, phone, menu button only */
.ah-header { position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:6px; min-height:60px; padding:8px 12px 8px 16px; background:#fff; border-bottom:1px solid var(--line); }
.ah-brand { flex:1 1 auto; display:flex; align-items:center; min-width:0; }
.ah-brand img { height:40px; width:auto; max-width:100%; display:block; }
.ah-header-phone, .ah-menu-btn { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:0; border-radius:10px; background:#fff; color:var(--navy); cursor:pointer; }
.ah-header-phone .ah-icon { color:var(--navy); }
.ah-header-phone:hover, .ah-menu-btn:hover { background:var(--bg); }

/* Layout */
.ah-main { max-width:520px; margin:0 auto; padding:0 0 calc(var(--dock) + 16px); }
.ah-page [hidden] { display:none !important; }
.ah-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px 16px; margin:14px 16px 0; }
.ah-fine { text-align:center; color:var(--muted); font-size:13.5px; margin-top:12px; }

/* Hero */
.ah-hero { background:var(--navy); color:#fff; padding:28px 20px 20px; text-align:center; }
.ah-eyebrow { display:inline-flex; align-items:center; gap:8px; color:var(--gold); font-size:12px; font-weight:700; letter-spacing:.22em; text-transform:uppercase; margin-bottom:14px; }
.ah-eyebrow .ah-icon { width:18px; height:18px; }
.ah-hero h1 { color:#fff; font-size:clamp(34px,10vw,44px); font-weight:800; line-height:1.05; }
.ah-hero-sub { color:var(--gold); font-size:19px; font-weight:700; margin-top:10px; }
.ah-hero-text { color:#e8edf5; font-size:16px; line-height:1.45; margin:8px auto 0; max-width:300px; }
.ah-art { display:block; width:100%; max-width:380px; height:auto; margin:14px auto 0; }
.ah-emergency { display:flex; align-items:center; gap:14px; margin-top:14px; padding:14px 16px; background:var(--cream); border:1px solid var(--cream-line); border-radius:12px; color:var(--ink); text-decoration:none; text-align:left; }
.ah-emergency-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:50%; background:var(--red); color:#fff; flex:0 0 auto; }
.ah-emergency-icon .ah-icon { width:22px; height:22px; }
.ah-emergency strong { display:block; font-size:16.5px; color:var(--ink); }
.ah-emergency span span { display:block; color:var(--muted); font-size:14px; }
.ah-hero .ah-btn-gold { width:100%; margin-top:12px; }

/* Gather card */
.ah-gather { margin-top:-10px; position:relative; }
.ah-gather h2 { font-size:19px; font-weight:800; margin-bottom:6px; }
.ah-gather ul { list-style:none; margin:0; padding:0; }
.ah-gather li { display:flex; gap:14px; align-items:flex-start; padding:12px 0; border-top:1px solid var(--line); }
.ah-gather li:first-child { border-top:0; }
.ah-gather li .ah-icon { color:var(--navy); margin-top:2px; }
.ah-gather strong { display:block; font-size:16px; }
.ah-gather li span { color:var(--muted); font-size:14px; line-height:1.4; }
.ah-resume { margin:14px 16px 0; padding:12px 14px; background:var(--cream); border:1px solid var(--cream-line); border-radius:12px; font-size:14.5px; }
.ah-resume button { background:none; border:0; padding:0; color:var(--navy); font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }

/* Buttons */
.ah-btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:52px; padding:12px 20px; border:0; border-radius:12px; font-family:inherit; font-weight:800; font-size:17px; line-height:1.2; text-decoration:none; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.ah-btn .ah-icon { width:20px; height:20px; }
.ah-page .ah-btn-gold { background:var(--gold); color:var(--navy); box-shadow:0 4px 14px rgba(3,14,30,.22); }
.ah-page .ah-btn-gold:hover { background:#d9b440; }
.ah-page .ah-btn-gold:disabled { background:#e2d6ae; color:#6b6a62; box-shadow:none; cursor:not-allowed; }
.ah-page .ah-btn-navy { background:var(--navy); color:#fff; }
.ah-page .ah-btn-navy:hover { background:var(--navy-deep); }
.ah-page .ah-btn-red { background:var(--red); color:#fff; }
.ah-page .ah-btn-red-outline { background:#fff; color:var(--red); border:2px solid var(--red); }
.ah-page .ah-btn-outline { background:#fff; color:var(--navy); border:1.5px solid var(--line); }
.ah-page .ah-btn-outline:hover { border-color:var(--navy); }
.ah-btn-block { width:100%; }

/* Step bar */
.ah-stepbar { padding:12px 16px 0; }
.ah-back { display:inline-flex; align-items:center; gap:2px; min-height:44px; padding:0 8px 0 0; border:0; background:none; color:var(--navy); font:700 16px/1 'Plus Jakarta Sans',system-ui,sans-serif; cursor:pointer; }
.ah-back .ah-icon { transform:rotate(180deg); width:20px; height:20px; }
.ah-stepnum { color:var(--muted); font-size:14.5px; font-weight:600; margin-top:2px; }
.ah-progress { height:8px; margin-top:8px; background:#e2e4e9; border-radius:99px; overflow:hidden; }
.ah-progress span { display:block; height:100%; width:12.5%; background:var(--gold); border-radius:99px; transition:width .25s; }

/* Steps */
.ah-step { padding:16px 16px 0; }
.ah-step h2 { font-size:30px; font-weight:800; }
.ah-step h3 { font-size:18px; font-weight:800; margin-bottom:10px; }
.ah-lede { color:var(--muted); font-size:15.5px; line-height:1.45; margin-top:6px; }
.ah-hint { color:var(--muted); font-size:14px; margin-top:12px; }
.ah-label { font-weight:700; font-size:15.5px; margin-top:18px; }
.ah-list { margin:8px 0 0; padding-left:20px; font-size:15px; line-height:1.5; }
.ah-list li + li { margin-top:6px; }
.ah-saved { display:flex; align-items:center; gap:8px; margin-top:12px; padding:10px 12px; background:var(--green-bg); color:#1f6b3f; border-radius:10px; font-size:14.5px; font-weight:600; }
.ah-saved .ah-icon { color:var(--green); width:20px; height:20px; }
.ah-field { display:block; margin-top:14px; }
.ah-field > span { display:block; font-size:14.5px; font-weight:600; margin-bottom:6px; }
.ah-field input, .ah-field textarea { width:100%; min-height:48px; padding:11px 12px; border:1.5px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font:400 16px/1.4 inherit; font-family:inherit; }
.ah-field textarea { min-height:0; resize:vertical; }
.ah-field input:focus, .ah-field textarea:focus { border-color:var(--navy); }
.ah-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ah-choice { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.ah-chip { flex:1 1 auto; min-height:48px; padding:10px 14px; border:1.5px solid var(--line); border-radius:12px; background:#fff; color:var(--navy); font:700 15.5px/1.2 inherit; font-family:inherit; cursor:pointer; }
.ah-chip[aria-pressed="true"] { background:var(--navy); border-color:var(--navy); color:#fff; }
.ah-callout { margin-top:14px; padding:14px 16px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.ah-callout strong { display:block; font-size:16px; margin-bottom:4px; }
.ah-callout p { color:var(--muted); font-size:14.5px; }
.ah-callout .ah-btn { width:100%; margin-top:12px; }
.ah-callout-red { background:var(--red-bg); border-color:#f3c5c1; }
.ah-callout-red strong { color:var(--red); }
.ah-callout-cream { display:flex; gap:12px; align-items:flex-start; background:var(--cream); border-color:var(--cream-line); }
.ah-callout-icon { color:var(--gold-dark); width:30px; height:30px; margin-top:2px; }
.ah-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; margin-top:14px; }
.ah-tile { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:104px; padding:12px 8px; border:1.5px dashed #b9c2cf; border-radius:12px; background:#fff; color:var(--navy); font:700 14px/1.25 inherit; font-family:inherit; text-align:center; cursor:pointer; }
.ah-tile .ah-icon { width:28px; height:28px; }
.ah-tile[data-has="1"] { border-style:solid; border-color:var(--green); background:var(--green-bg); }
.ah-tile-count { position:absolute; top:6px; right:8px; font-style:normal; font-size:12.5px; font-weight:800; color:var(--green); }
.ah-tile-count:empty { display:none; }

/* Photo rows (step 4) */
.ah-photo-rows { display:grid; gap:10px; margin-top:14px; }
.ah-photo-row { display:grid; grid-template-columns:44px 1fr 36px; grid-template-areas:"icon text action" "thumbs thumbs thumbs"; align-items:center; gap:4px 12px; width:100%; padding:14px 14px; border:1px solid var(--line); border-radius:14px; background:#fff; text-align:left; font-family:inherit; color:var(--ink); cursor:pointer; }
.ah-photo-row .ah-row-icon { grid-area:icon; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--bg); color:var(--navy); }
.ah-photo-row[data-has="1"] .ah-row-icon { background:transparent; color:var(--green); }
.ah-photo-row .ah-row-icon .ah-icon { width:26px; height:26px; }
.ah-photo-row[data-has="1"] .ah-row-icon .ah-icon { width:34px; height:34px; }
.ah-photo-row .ah-row-text { grid-area:text; min-width:0; }
.ah-photo-row .ah-row-text strong { display:block; font-size:16.5px; }
.ah-photo-row .ah-row-text small { display:block; color:var(--muted); font-size:14px; }
.ah-photo-row .ah-row-action { grid-area:action; display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--bg); color:var(--navy); }
.ah-photo-row[data-has="1"] .ah-row-action { background:transparent; color:var(--muted); }
.ah-photo-row .ah-row-action .ah-icon { width:20px; height:20px; }
.ah-photo-row .ah-thumbs { grid-area:thumbs; display:flex; gap:8px; margin-top:8px; overflow-x:auto; scrollbar-width:none; }
.ah-photo-row .ah-thumbs:empty { display:none; }
.ah-thumb { width:64px; height:60px; border-radius:8px; object-fit:cover; background:#e5e7eb; flex:0 0 auto; }
.ah-thumb-more { display:grid; place-items:center; width:64px; height:60px; border-radius:8px; background:var(--bg); color:var(--muted); font-weight:700; flex:0 0 auto; }
.ah-photo-row-sm { padding:11px 14px; }
.ah-photo-row-sm .ah-row-text strong { font-size:15.5px; }
.ah-checklist { margin-top:14px; }
.ah-checklist summary { display:flex; align-items:center; gap:10px; list-style:none; min-height:44px; padding:6px 2px; color:var(--navy); font-weight:700; font-size:15.5px; cursor:pointer; }
.ah-checklist summary::-webkit-details-marker { display:none; }
.ah-checklist summary span { flex:1 1 auto; text-decoration:underline; }
.ah-checklist[open] summary .ah-chev { transform:rotate(90deg); }
.ah-checklist .ah-chev { width:20px; height:20px; transition:transform .2s; }

/* Witnesses */
.ah-witness { margin-top:14px; padding:14px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.ah-witness-head { display:flex; justify-content:space-between; align-items:center; font-weight:800; }
.ah-witness-head button { background:none; border:0; color:var(--muted); font:600 14px inherit; font-family:inherit; text-decoration:underline; cursor:pointer; min-height:44px; }
.ah-witness .ah-field { margin-top:10px; }
#btn-add-witness { width:100%; margin-top:14px; }

/* Review */
.ah-row-head { display:flex; align-items:flex-start; gap:14px; }
.ah-row-head .ah-icon { width:28px; height:28px; color:var(--navy); margin-top:4px; }
.ah-row-head strong { display:block; font-size:17px; }
.ah-row-head span { color:var(--muted); font-size:14.5px; }
.ah-contact-card .ah-field:first-of-type { margin-top:12px; }
.ah-review-list { list-style:none; margin:0; padding:0; }
.ah-review-list li { display:flex; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
.ah-review-list li:first-child { border-top:0; padding-top:4px; }
.ah-review-list li > .ah-icon:first-child { color:var(--navy); width:26px; height:26px; }
.ah-review-list li > span { flex:1 1 auto; font-size:16px; font-weight:600; }
.ah-review-list li > span small { display:block; color:var(--muted); font-size:13.5px; font-weight:500; }
.ah-status { color:var(--green); width:22px; height:22px; }
.ah-status[data-empty="1"] { color:#c3c9d3; }
.ah-edit { background:none; border:0; min-height:44px; padding:0 2px; color:var(--navy); font:700 15px inherit; font-family:inherit; text-decoration:underline; cursor:pointer; }
.ah-consent { display:flex; gap:12px; align-items:flex-start; margin:16px 16px 0; font-size:15px; line-height:1.45; cursor:pointer; }
.ah-consent input { width:22px; height:22px; margin:2px 0 0; accent-color:var(--navy); flex:0 0 auto; }
.ah-infobox { display:flex; gap:10px; align-items:flex-start; margin:14px 16px 0; padding:12px 14px; background:#eef3fb; border:1px solid #d6e2f5; border-radius:10px; color:var(--navy); font-size:14.5px; font-weight:600; }
.ah-infobox .ah-icon { color:var(--navy); width:20px; height:20px; margin-top:1px; }
.ah-step .ah-card { margin-left:0; margin-right:0; }
.ah-step .ah-consent, .ah-step .ah-infobox { margin-left:0; margin-right:0; }
#btn-send { margin-top:14px; }
.ah-send-status { color:var(--muted); font-size:14.5px; margin-top:10px; text-align:center; }
.ah-send-status:empty { display:none; }
.ah-fallback { margin-top:14px; padding:14px 16px; background:var(--cream); border:1px solid var(--cream-line); border-radius:12px; }
.ah-fallback strong { display:block; font-size:16px; }
.ah-fallback p { color:var(--muted); font-size:14.5px; margin-top:4px; }
.ah-fallback-actions { display:grid; gap:10px; margin-top:12px; }
.ah-privacy { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:14px; font-size:14px; }
.ah-privacy .ah-icon { width:16px; height:16px; color:var(--muted); }

/* Step nav */
.ah-nav { padding:18px 16px 0; text-align:center; }
.ah-skiplink { display:inline-block; margin-top:10px; min-height:44px; background:none; border:0; color:var(--navy); font:700 15px inherit; font-family:inherit; text-decoration:underline; cursor:pointer; }
.ah-nav[data-last="1"] { display:none; }

/* Done */
.ah-done { padding:28px 16px 0; text-align:center; }
.ah-done-icon { width:56px; height:56px; color:var(--green); }
.ah-done h2 { font-size:30px; font-weight:800; margin-top:10px; }
.ah-done > p { color:var(--muted); margin-top:8px; }
.ah-done .ah-card { text-align:left; margin-left:0; margin-right:0; }
.ah-done .ah-fallback-actions { margin-top:14px; }
.ah-done .ah-infobox { margin-left:0; margin-right:0; }

/* Fixed dock: Call 911 + Call agency */
.ah-dock { position:fixed; left:0; right:0; bottom:0; z-index:30; background:#fff; border-top:1px solid var(--line); padding:10px 16px calc(8px + env(safe-area-inset-bottom)); }
.ah-dock-btns { display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:488px; margin:0 auto; }
.ah-dock-btns .ah-btn { min-height:48px; font-size:16px; padding:10px 12px; }
.ah-dock p { text-align:center; color:var(--muted); font-size:12.5px; margin-top:6px; }

/* Photo dialog */
.ah-dialog { width:min(92vw,480px); border:0; border-radius:16px; padding:18px 16px; font-family:inherit; color:var(--ink); }
.ah-dialog::backdrop { background:rgba(10,31,60,.55); }
.ah-dialog h3 { font-size:20px; font-weight:800; }
.ah-thumb-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:12px; }
.ah-thumb-grid figure { position:relative; margin:0; }
.ah-thumb-grid img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; background:#e5e7eb; display:block; }
.ah-thumb-grid button { position:absolute; top:4px; right:4px; width:30px; height:30px; border:0; border-radius:50%; background:rgba(10,31,60,.8); color:#fff; font:700 16px/1 inherit; font-family:inherit; cursor:pointer; }
.ah-thumb-grid p { grid-column:1/-1; color:var(--muted); font-size:14.5px; }
.ah-noscript { margin:16px; padding:14px; background:var(--cream); border-radius:12px; }

/* Sending overlay: stays up until the agency confirms receipt */
.ah-send-overlay { text-align:center; padding:28px 22px 24px; }
.ah-send-overlay h3 { margin-top:14px; }
.ah-send-overlay p { color:var(--muted); font-size:15.5px; line-height:1.45; margin-top:8px; }
.ah-send-spinner { width:56px; height:56px; margin:0 auto; border-radius:50%; border:5px solid #e2e4e9; border-top-color:var(--gold); animation:ah-spin 1s linear infinite; }
.ah-send-check { display:block; width:56px; height:56px; margin:0 auto; color:var(--green); }
@keyframes ah-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .ah-send-spinner { animation-duration:3s; } }

@media (min-width:600px) {
  .ah-header { padding-inline:24px; }
  .ah-main { padding-top:16px; }
  .ah-hero { border-radius:18px; margin:0 16px; }
  .ah-gather { margin-top:14px; }
}
@media (prefers-reduced-motion:reduce) { .ah-progress span, .ah-checklist .ah-chev { transition:none; } }
