/* Mobile first, light, large tap targets, no web fonts. */
:root {
  --brand: #262626; --accent: #f7ac46; --ink: #1d1d1f; --muted: #5d6168; --line: #dfe2e6;
  --soft: #f5f6f8; --bg: #fff; --danger: #b3261e; --danger-soft: #fdecea; --ok: #1e7b45; --ok-soft: #e8f5ec;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--soft); }
a { color: var(--brand); }
svg { flex: none; vertical-align: middle; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 9; }

/* Header and emergency strip */
.top { background: #fff; border-bottom: 4px solid var(--accent); }
.top .wrap { display: flex; align-items: center; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { height: 36px; width: auto; display: block; }
.brand .name { font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.sos { background: var(--danger-soft); color: #5b1410; font-size: .92rem; }
.sos .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; }
.sos a { color: #5b1410; }
.sos .more { font-weight: 600; }
main.wrap { padding-top: 18px; padding-bottom: 40px; }

/* Type */
h1 { font-size: 1.6rem; line-height: 1.2; margin: .3em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.2em 0 .5em; }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: -.2em; }
.note, .hint { color: var(--muted); font-size: .95rem; }
.hint { margin: -2px 0 8px; }
.hero p { color: var(--muted); max-width: 40em; }

/* Problem tiles */
.tiles li { display: flex; }
.tiles { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 880px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tiles a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  min-height: 150px; padding: 18px 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tiles a:hover, .tiles a:focus-visible { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); outline: none; }
.tiles .ico { flex: none; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, #fff); color: var(--brand); }
.tiles .t { font-weight: 700; line-height: 1.25; }
.tiles small { color: var(--muted); font-size: .82rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tiles .tile-sos { grid-column: 1 / -1; }
.tiles.two { grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tiles.two a { min-height: 190px; }
.tiles .show { -webkit-line-clamp: unset; font-size: .95rem; }
.summary a { align-self: start; grid-row: 1; }
.tiles .tile-sos a { flex-direction: row; text-align: left; min-height: 0; padding: 14px 16px; background: var(--danger-soft); border-color: #f3b8b2; }
.tiles .tile-sos .ico { background: var(--danger); color: #fff; width: 56px; height: 56px; }
.tiles .tile-sos .t { color: #5b1410; font-size: 1.1rem; }
.tiles .tile-sos small { -webkit-line-clamp: 3; color: #7a2a24; }

/* Rows (second level, search results, address choices) */
.group-title { display: flex; align-items: center; gap: 12px; }
.group-title .ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, #fff); }
.rows { list-style: none; padding: 0; margin: 12px 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a, .rows label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; min-height: 60px; text-decoration: none; color: var(--ink); font-weight: 600; cursor: pointer; }
.rows a:hover, .rows a:focus-visible, .rows label:hover { background: var(--soft); outline: none; }
.rows small { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.rows svg { color: var(--muted); }
.rows.radio label { justify-content: flex-start; font-weight: 500; }
.rows.radio input { width: 22px; height: 22px; flex: none; }

/* Search */
.search .row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #b9bec6; border-radius: 12px; padding: 4px 4px 4px 12px; }
.search .row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.search .row input { border: 0; padding: 10px 4px; outline: none; min-width: 0; box-shadow: none; }
.search .row .btn { border: 0; background: var(--soft); min-height: 44px; margin: 0; padding: 8px 14px; }
.search .row svg { color: var(--muted); }
.search label { display: block; font-weight: 600; margin: 4px 0 8px; }
.switch a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin: 18px 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.switch a span { flex: 1; }
.switch a svg:last-child { color: var(--muted); }

/* Progress */
.crumbs { font-size: .95rem; margin-bottom: 6px; }
.crumbs a { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.chosen { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: .92rem; margin: 6px 0 12px; }
.progress { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 4px; }
.progress li { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress li.done { background: var(--brand); }
.progress li.now { background: var(--accent); }
.progress span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stepno { font-size: .85rem; color: var(--muted); margin: 0 0 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Forms */
form label { display: block; font-weight: 650; margin: 18px 0 6px; }
form label.small { font-weight: 500; font-size: .95rem; }
.req { font-weight: 600; font-size: .72rem; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; vertical-align: 2px; }
.field-error { color: var(--danger); font-weight: 700; margin: 2px 0 6px; }
input.invalid { border: 2px solid var(--danger); }
.errors a { color: var(--danger); font-weight: 600; }
input, textarea { width: 100%; font: inherit; padding: 13px 14px; border: 1px solid #b9bec6; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
textarea { resize: vertical; }
input[type=file] { padding: 10px; background: var(--soft); }
.check { font-weight: 500 !important; display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; }
.big-check { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px 16px; margin: 12px 0; }
legend { font-size: 1.1rem; font-weight: 700; padding: 14px 0 0; display: flex; align-items: center; gap: 8px; }
fieldset.card legend { float: left; width: 100%; }
fieldset.card legend + * { clear: both; }
.drop { background: #fff; border: 2px dashed #c8ccd2; border-radius: 16px; padding: 18px; text-align: center; margin: 12px 0; }
.drop .pick { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--brand); cursor: pointer; }
.files { list-style: none; padding: 0; margin: 10px 0; }
.files li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.files li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { background: none; border: 0; color: var(--danger); font: inherit; text-decoration: underline; cursor: pointer; padding: 4px; }
.previews { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.previews img, .previews video { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.typed { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 14px; margin: 14px 0; }
.typed summary { cursor: pointer; font-weight: 650; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
.typed summary::-webkit-details-marker { display: none; }
.typed[open] summary svg { transform: rotate(90deg); }
.radio-line { display: flex !important; gap: 10px; align-items: center; font-weight: 500 !important; }
.radio-line input { width: 20px; height: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 12px; border: 2px solid var(--brand);
  background: #fff; color: var(--brand); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 50px; margin: 6px 6px 6px 0; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.big { min-height: 58px; padding: 14px 26px; font-size: 1.08rem; }
.btn.recording { background: var(--danger); border-color: var(--danger); color: #fff; }
.actions { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.actions .back { font-weight: 600; }
@media (max-width: 480px) { .actions .btn.big { flex: 1; } }

/* Panels */
.panel { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--brand); padding: 14px 16px; margin: 14px 0; border-radius: 12px; }
.panel.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.panel.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.panel h1, .panel h2 { margin-top: .2em; }
.guidance p { margin: 0 0 .6em; }
.numbers { list-style: none; padding: 0; }
.numbers li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.numbers .call { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; background: var(--danger); color: #fff; font-weight: 700; text-decoration: none; }
.call.tbc, .tbc { font-style: italic; color: var(--muted); }
.call.tbc { background: #fff; border: 1px dashed #c8ccd2; }
.tbc-note { display: flex; gap: 8px; align-items: center; font-style: italic; }
a[href^="tel"] { white-space: nowrap; }
.done { text-align: center; }
.big-ico { color: var(--ok); }
.ref { font-size: 1.3rem; letter-spacing: .05em; }

/* Check page */
.summary { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; padding: 0; }
.summary > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; }
.summary > div + div { border-top: 1px solid var(--line); }
.summary dt { font-weight: 700; grid-column: 1; }
.summary dd { margin: 0; grid-column: 1; color: var(--ink); white-space: pre-line; }
.summary a { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; }
.summary .miss { background: var(--danger-soft); }

/* Pages and footer */
.page { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 20px 16px; }
.page li { margin-bottom: .3em; }
.foot { font-size: .9rem; color: var(--muted); padding: 24px 0 40px; }
.dry { color: var(--danger); font-weight: 700; }
.voice[hidden] { display: none; }

/* Visually hidden but still the form's default button. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#upload-status:empty { display: none; }
#upload-status { margin: .75rem 0; }
.tiles .tile-sos small { -webkit-line-clamp: unset; display: block; }
