/* Take 5 card (/tools/take-5-card): phone-first checklist, big tap targets, signature pad, history */
.tool .btn { padding: 11px 16px; min-height: 48px; font-size: .92rem; }
.tool .btn-line { border-color: var(--asphalt); color: var(--asphalt); background: var(--white); }
.tool .btn-line:hover { background: var(--asphalt); color: var(--yellow); }

.t5-form { gap: 18px; }
.t5-step { display: grid; gap: 12px; padding: 14px; border: 1.5px solid var(--concrete-2); border-radius: 16px; min-width: 0; }
.t5-step > * { min-width: 0; }
.t5-step h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 1.08rem; font-weight: 800; font-family: var(--body); text-transform: none; letter-spacing: -.01em; }
.t5-l { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--asphalt); color: var(--yellow); font-family: var(--display); font-size: 1.2rem; }
.t5-crit { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.t5-lab { font-weight: 700; font-size: .88rem; }

/* questions */
.t5-q { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--concrete-2); }
.t5-q:last-child { border-bottom: 0; }
.t5-q p { margin: 0; font-weight: 600; font-size: .92rem; line-height: 1.4; }
.t5-q em { color: var(--steel); font-weight: 500; }
.t5-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.t5-yn { position: relative; display: block !important; }
.t5-yn input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.t5-yn span { display: grid; place-items: center; min-height: 48px; border: 1.5px solid var(--concrete-2); border-radius: 12px; font-weight: 800; font-size: .95rem; background: var(--white); }
.t5-yn input:focus-visible + span { outline: 3px solid rgba(255,106,0,.4); }
.t5-yes input:checked + span { background: #16a34a; border-color: #16a34a; color: #fff; }
.t5-no input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.t5-na input:checked + span { background: #64748b; border-color: #64748b; color: #fff; }
.t5-yn input:disabled + span { opacity: .5; }
.t5-q.is-stop { background: #fef2f2; margin: 0 -8px; padding: 10px 8px; border-radius: 10px; }
.t5-q.is-no { background: #fff7ed; margin: 0 -8px; padding: 10px 8px; border-radius: 10px; }
.t5-fix { font-size: .84rem !important; }
.t5-q .tw-src { color: var(--steel); font-size: .74rem; }

/* hazards */
.t5-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t5-chips button { min-height: 40px; padding: 6px 12px; border: 1.5px solid var(--concrete-2); border-radius: 99px; background: var(--concrete); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.t5-chips button:hover { border-color: var(--asphalt); }
.t5-add { display: flex; gap: 8px; }
.t5-add input { flex: 1; min-width: 0; }
.t5-hzs { display: grid; gap: 10px; }
.t5-hz { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--concrete); }
.t5-hz-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.t5-hz-h button { flex: none; width: 40px; height: 40px; border: 1.5px solid var(--concrete-2); border-radius: 10px; background: var(--white); font-size: 1.2rem; cursor: pointer; }
.t5-rate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.t5-r { position: relative; display: block !important; }
.t5-r input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.t5-r span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--concrete-2); background: var(--white); font-weight: 800; font-size: .88rem; }
.t5-r-L input:checked + span { background: #bbf7d0; border-color: #16a34a; color: #14532d; }
.t5-r-M input:checked + span { background: #fde68a; border-color: #ca8a04; color: #713f12; }
.t5-r-H input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.t5-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-weight: 700; font-size: .86rem; }

/* evidence + signature */
.t5-ev { display: grid; gap: 14px; }
.t5-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.t5-row img { width: 110px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--concrete-2); }
.t5-file { position: relative; cursor: pointer; }
.t5-file input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.t5-file:focus-within { outline: 3px solid rgba(255,106,0,.35); }
.t5-sig { display: grid; gap: 6px; }
.t5-sig canvas { width: 100%; height: 160px; border: 2px dashed var(--steel); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
[data-reset] { justify-self: start; }

/* outcome panel */
.t5-out .big b { font-size: clamp(2.2rem, 7vw, 3.2rem); }
.tool-out .big.good b { color: #86efac; } .tool-out .big.alert b { color: #ff8f84; } .tool-out .big.warn b { color: #fdba74; }
.tool-out .tw-verdict.good { background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.4); color: #dcfce7; }
.tool-out .tw-verdict.alert { background: rgba(229,50,45,.16); border: 1px solid rgba(229,50,45,.45); color: #ffe4e0; }
.tool-out .tw-pill { background: rgba(255,255,255,.1); color: #fff; } .tool-out .tw-pill.good { background: rgba(34,197,94,.2); color: #bbf7d0; } .tool-out .tw-pill.warn { background: rgba(255,106,0,.25); color: #fed7aa; } .tool-out .tw-pill.alert { background: rgba(229,50,45,.3); color: #ffd0c8; }
.t5-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.t5-out .tw-actions button { min-height: 46px; flex: 1 1 auto; }

/* history */
.t5-history { margin-top: 22px; display: grid; gap: 10px; }
.t5-history h3 { margin: 0; font-size: 1.08rem; }
.t5-hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.t5-hlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--concrete-2); border-radius: 12px; }
.t5-hlist li > div:first-child { display: grid; gap: 2px; min-width: 0; }
.t5-hlist li span { font-size: .8rem; color: var(--steel); }
.t5-hlist .tw-pill.good { background: #dcfce7; color: #166534; } .t5-hlist .tw-pill.alert { background: #fee2e2; color: #991b1b; } .t5-hlist .tw-pill.warn { background: #ffedd5; color: #9a3412; }
.t5-h-b { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.t5-h-b button { min-height: 40px; padding: 4px 14px; border: 1.5px solid var(--concrete-2); border-radius: 9px; background: var(--white); font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; }
.t5-h-empty { display: block !important; color: var(--steel); border-style: dashed !important; }

/* print */
@media print {
  body.tw-printing #tw-print .t5-print table { margin-bottom: 8px; }
  body.tw-printing #tw-print .t5-print h3 { font-size: 11pt; margin: 10px 0 4px; }
  body.tw-printing #tw-print .t5-p-out { font-size: 18pt; padding: 6px 10px; border: 3px solid #000 !important; display: inline-block; margin: 0 0 10px; }
  body.tw-printing #tw-print .t5-p-stop { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fecaca !important; }
  body.tw-printing #tw-print .t5-p-go { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #bbf7d0 !important; }
  body.tw-printing #tw-print .t5-p-no td { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fee2e2 !important; }
  body.tw-printing #tw-print .t5-p-ev { display: flex; gap: 16px; align-items: flex-end; margin-top: 10px; }
  body.tw-printing #tw-print .t5-p-ev figure { margin: 0; }
  body.tw-printing #tw-print .t5-p-ev img { max-height: 70mm; max-width: 95mm; }
  body.tw-printing #tw-print .t5-p-sig { height: 25mm; width: auto; border-bottom: 1px solid #000 !important; }
  body.tw-printing #tw-print .t5-p-blank { width: 70mm; height: 20mm; border-bottom: 1px solid #000 !important; }
  body.tw-printing #tw-print figcaption { font-size: 8pt; }
}
.t5 input[type="datetime-local"] { width: 100%; min-width: 0; height: 44px; padding: 0 10px; border: 1.5px solid var(--concrete-2); border-radius: 10px; background: var(--white); font: inherit; font-weight: 600; color: var(--ink); }
