/* Respondent survey: phone-first. */
.survey { background: var(--ground); }
.survey-bar { background: var(--bar); color: #fff; position: sticky; top: 0; z-index: 10; }
.survey-bar__inner { max-width: 760px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.survey-bar__inner img { height: 19px; width: auto; }
.survey-bar__org { font-size: 0.8125rem; color: var(--bar-ink); padding-left: 14px; border-left: 1px solid rgb(255 255 255 / .25); }
.survey-progress { background: var(--bar-2); }
.survey-progress__inner { max-width: 760px; margin: 0 auto; padding: 9px 20px; display: flex; justify-content: space-between; gap: 12px; font-size: 0.8125rem; font-weight: 600; color: var(--bar-ink); }
.survey-progress__bar { height: 4px; background: rgb(255 255 255 / .12); }
.survey-progress__bar i { display: block; height: 100%; background: #5aaef0; transition: width .5s var(--ease); }
.autosave { font-weight: 500; opacity: .9; }
.survey-main { max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; }
.survey-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 32px; box-shadow: var(--shadow); }
.survey-card h1 { font-size: 1.625rem; margin-bottom: 12px; }
.lede { font-size: 1.0313rem; color: var(--ink-2); margin-bottom: 20px; max-width: 62ch; }
.survey-note { background: var(--warn-50); color: var(--warn); padding: 10px 14px; border-radius: 6px; font-weight: 600; font-size: 0.875rem; margin-bottom: 14px; }
.survey-facts { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; font-size: 0.9375rem; }
.survey-facts li { display: flex; gap: 10px; align-items: flex-start; }
.survey-facts .icon { color: var(--blue); margin-top: 4px; }
.btn--lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.survey-head { margin-bottom: 20px; }
.survey-head h1 { font-size: 1.625rem; margin-bottom: 8px; }
.survey-head .lede { margin-bottom: 0; }

.hz-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px 18px; margin: 0 0 16px; box-shadow: var(--shadow); scroll-margin-top: 120px; transition: border-color .3s; }
.hz-card h2 { font-size: 1.1875rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.hz-done { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; opacity: 0; transform: scale(.6); transition: opacity .25s var(--ease), transform .35s var(--ease); }
.hz-card.is-complete { border-color: #a9d3b9; }
.hz-card.is-complete .hz-done { opacity: 1; transform: none; }
.rate { padding: 14px 0 4px; border-top: 1px solid var(--line-soft); margin-top: 12px; }
.hz-card > .rate:first-of-type { border-top: 0; margin-top: 6px; }
.rate legend { display: block; padding: 0; margin-bottom: 10px; }
.rate__q { display: block; font-weight: 700; font-size: 0.9375rem; }
.rate__help { display: block; color: var(--muted); font-size: 0.8438rem; }
.rate__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.rate__opt { position: relative; flex: 1 1 0; min-width: max-content; }
.rate__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rate__opt span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 14px; border: 1.5px solid #b8c6d8; border-radius: 6px; font-weight: 600; font-size: 0.875rem; text-align: center; background: #fff; transition: background .15s, border-color .15s, color .15s, transform .12s; user-select: none; }
.rate__opt:hover span { border-color: var(--blue); }
.rate__opt input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.rate__opt input:checked + span::before { content: ""; width: 7px; height: 12px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-2px, -2px); margin-right: 9px; }
.rate__opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.rate__opt input:active + span { transform: scale(.97); }
/* "Won't happen here" makes the rest of the card moot. */
.hz-card:has(input[data-skips-severity]:checked) .rate:not(.rate--probability) { display: none; }
.hz-card:has(input[data-skips-severity]:checked) .rate--probability::after { content: "Skipped the rest: this hazard won't count against risk."; display: block; margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }
.hz-comment { margin-top: 14px; }
.hz-comment summary { cursor: pointer; color: var(--blue-700); font-weight: 600; font-size: 0.875rem; display: inline-flex; gap: 6px; align-items: center; list-style: none; padding: 4px 0; }
.hz-comment summary::-webkit-details-marker { display: none; }
.hz-comment textarea { width: 100%; margin-top: 8px; font: inherit; min-height: 70px; }
.strategy-group { font-size: 1rem; margin: 22px 0 10px; color: var(--ink-2); }

.survey-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--ground) 30%); }
.missing-list { columns: 2; padding-left: 20px; margin: 0 0 8px; }
.missing-list li { margin-bottom: 4px; }
.survey-card--done { text-align: center; padding: 48px 32px; }
.done-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; margin-bottom: 18px; animation: pop .6s var(--ease); }
.done-mark .icon { width: 32px; height: 32px; }
.survey-card--done .lede { margin-inline: auto; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.survey-foot { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; font-size: 0.75rem; color: var(--muted); }

@media (max-width: 560px) {
  .survey-main { padding: 18px 12px 40px; }
  .survey-card, .hz-card { padding: 20px 16px; }
  .rate__opts { display: grid; grid-template-columns: 1fr 1fr; }
  .rate__opt { min-width: 0; }
  .survey-bar__org { display: none; }
  .missing-list { columns: 1; }
  .survey-nav .btn--lg { flex: 1; padding-inline: 12px; }
}
.survey-card .survey-nav { position: static; background: none; padding-bottom: 0; }
.survey-nav { flex-wrap: wrap; } .survey-nav .button_to { flex: 1 1 auto; } .survey-nav .button_to .btn { width: 100%; }
.survey-bar__inner { padding: 18px 20px; }
.survey-bar__inner img { height: 26px; }
@media (max-width: 560px) { .survey-bar__inner { padding: 14px 16px; } .survey-bar__inner img { height: 22px; } }

/* Which hazards apply */
.applies-count { font-weight: 700; margin: 0 0 12px; color: var(--ink-2); }
.applies-group legend { margin-bottom: 12px; }
.applies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.applies-opt { position: relative; display: block; }
.applies-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.applies-opt span { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border: 1.5px solid #b8c6d8; border-radius: 6px; font-weight: 600; font-size: 0.875rem; background: #fff; color: var(--muted); text-decoration: line-through; text-decoration-color: rgb(76 92 112 / .5); transition: background .15s, border-color .15s, color .15s; }
.applies-opt span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid #8ea3bd; background: #fff; }
.applies-opt input:checked + span { color: var(--ink); text-decoration: none; border-color: var(--blue); background: var(--blue-50); }
.applies-opt input:checked + span::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--blue); }
.applies-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.applies-opt:hover span { border-color: var(--blue); }
@media (max-width: 560px) { .applies-grid { grid-template-columns: 1fr; } }
