/* v520: section headings and their counters stay apart on every survey form, including Try and desktop.
   The heading is the title; the count is a separate small muted badge. */
form[data-offline] .io-sec > h2,
form[data-practice-stop] .io-sec > h2,
form[data-offline] h2:has(.io-count),
form[data-offline] h2:has(#io-check-count),
form[data-practice-stop] h2:has(.io-count),
form[data-practice-stop] h2:has(#io-check-count) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}
.io-count,
#io-check-count {
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.75rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}
.io-count.io-full {
    color: #166534;
    background: #dcfce7;
}

/* v523: shared site locations (site-locations.js) and the Scan button on QR boxes (qr-field-scan.js) */
.io-locs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.io-loc { min-height: 40px; padding: .35rem .8rem; border-radius: 999px; border: 1px solid #d1d5db; background: #fff; color: #111827; font-size: .875rem; }
.io-loc-on { background: #dbeafe; border-color: #2563eb; color: #1e3a8a; font-weight: 600; }
.io-loc-add { border-style: dashed; color: #2563eb; }
.io-loc { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* v551 */
.io-loc-done { background: #f0fdf4; border-color: #86efac; color: #166534; }
.io-loc-change { display: inline-block; margin-top: .35rem; font-size: .875rem; color: #2563eb; text-decoration: underline; background: none; border: 0; padding: .25rem 0; min-height: 32px; }
.io-locs[hidden], .io-loc-note[hidden] { display: none; }
.io-loc-note { font-size: .75rem; color: #6b7280; margin-top: .25rem; }
.io-qr-row { display: flex; gap: .5rem; align-items: stretch; }
.io-qr-row input { flex: 1 1 auto; min-width: 0; }
.io-qr-scan { flex: 0 0 auto; min-height: 44px; min-width: 64px; padding: 0 .9rem; border-radius: .5rem; background: #2563eb; color: #fff; font-weight: 600; border: 0; }
