/* Round 5, bundle B: Today, the checklist, the Inbox and the conditions rules (screens.js).
   Loaded after app.css, app-records.css and app-admin.css. Section rows (D9) and the site state
   colours (D13, D14) are fixed in app.css by the lead, so they are not overridden here. */

/* ---------- coat tile (F13, D4): the verdict on top, rules underneath, actions full width ---------- */
.coat-tile.ct { display: block; }
.ct-head { display: flex; gap: 10px; align-items: flex-start; }
.ct-head > .ic { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.ct-head b { font-size: 15px; font-weight: 500; line-height: 1.35; }
.coat-tile .ct-sub { margin: 6px 0 0 30px; font-size: 13px; line-height: 1.45; color: var(--fg-2); }
.ct-rules { list-style: none; margin: 10px 0 0 30px; padding: 0; display: grid; gap: 6px; }
.ct-rules li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
.ct-rules li .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ct-rules li.bad { color: var(--fg); font-weight: 500; }
.ct-rules li.ok { color: var(--muted); }
.ct-dash { display: inline-block; flex: none; width: 9px; height: 2px; margin: 8px 3px 0 3px; background: currentColor; }
.rule-code { font-size: 10.5px; font-weight: 400; letter-spacing: .02em; color: var(--faint); white-space: nowrap; }
.ct-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0 30px; }
.ct-acts .btn { flex: 1 0 100%; justify-content: center; }
.ct-acts .chip { min-height: 44px; }

/* ---------- frost and rain protection (F15, B17): done, due and upcoming as one list ---------- */
.pr-block > p { margin: 4px 0 8px; }
.pr-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.pr-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; }
.pr-list li .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.pr-list li.done { font-weight: 500; }
.pr-box { flex: none; width: 12px; height: 12px; margin: 3px 2px 0 2px; box-shadow: inset 0 0 0 1.5px currentColor; }
.pr-block .rule-code { color: inherit; opacity: .6; }
.warnblock .chip.next-fill { min-height: 48px; }

/* ---------- shot list and evidence: one name per slot (D12) ---------- */
.sl-tile > span:not(.tick) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sl-tile .sl-wait { font-size: 10px; color: var(--faint); }
span.ev { cursor: default; }
span.ev > span { padding: 0 4px; }

/* ---------- checklist: read-only answers, a final No, and the bar (F1, F11, O2, F21) ---------- */
.ck-ro { margin: 2px 0 0 50px; font-size: 14px; font-weight: 500; color: var(--fg-2); }
.ck-final { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 0 50px; }
.ck-final .ck-ro { margin: 0; }
.ck-final .chip { min-height: 44px; }
.ck-bar .bb-note { flex: 1; margin: 6px 0; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
/* the sticky section header sits above the answers it scrolls over, so hidden chips cannot be hit (F1) */
.ck-sec-h { z-index: 3; }
.ck-item { position: relative; z-index: 0; }

/* ---------- Inbox (D24, F10) ---------- */
.in-row.v2 { display: block; }
.in-row.v2 .in-main { width: 100%; padding-right: var(--gutter); }
.in-meta .nw { white-space: nowrap; }
.in-row.v2 .in-tools { align-items: center; flex-wrap: wrap; gap: 4px 10px; padding-bottom: 10px; }
.in-row.v2 .in-tools .link-btn { white-space: nowrap; }
.in-row.v2 .in-tools .link-btn { min-height: 44px; }
.in-donechip { margin-left: auto; min-height: 44px; padding: 0 10px; white-space: nowrap; }
.in-donechip .ic { width: 16px; height: 16px; }
.in-dock { flex-direction: column; gap: 6px; padding: 6px 0 10px; }
.in-dock-h { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 6px 0 var(--gutter); font-size: 13px; color: var(--muted); }
.in-dock .composer { padding: 0 var(--gutter); border-top: 0; }
.in-dock .cm-pending { margin: 0 var(--gutter); }

/* ---------- readings (B18) ---------- */
.rd-pt { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--faint); }
.rd-meta span { white-space: nowrap; }

/* ---------- log a coat (B25) ---------- */
.lc-block { display: flex; gap: 12px; align-items: center; margin: 4px var(--gutter) 6px; padding: 14px; background: var(--surface); }
.lc-block p { margin: 3px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.lc-body .field { margin-top: 2px; }

/* ---------- the record preview says what the recipient gets (O5) ---------- */
.pv-note { margin: 12px var(--gutter) 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.pv-bar { margin: 0 var(--gutter); }
.pv-bar .pv-note { margin: 12px 0 8px; }
.pv-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pv-acts .btn { flex: 1 1 0; width: auto; min-width: 0; min-height: 44px; padding: 0 10px; }
.rd-again { justify-self: start; min-height: 44px; margin-top: 2px; }

/* ===================== Round 6, bundle B ===================== */

/* ---------- F2-5: a toast never covers the yellow bar, a sheet's foot or the photo actions ----------
   The toast host is core.js; here it is only lifted clear of whatever sits at the bottom. */
#app:has(#nav .bottom-bar) .toast:not(.over-cover) { bottom: calc(var(--tab-h) + 82px); }
#app.glove:has(#nav .bottom-bar) .toast:not(.over-cover) { bottom: calc(var(--tab-h) + 86px); }
#app:has(#nav .in-dock) .toast:not(.over-cover), #app.glove:has(#nav .in-dock) .toast:not(.over-cover) { bottom: calc(var(--tab-h) + 128px); }
#app:has(#nav .v-actions) .toast:not(.over-cover) { bottom: 110px; }
#app:has(#sheetLayer .sheet .sh-foot) .toast:not(.over-cover) { bottom: 110px; }
#app.glove:has(#sheetLayer .sheet .sh-foot) .toast:not(.over-cover) { bottom: 112px; }
#app:has(#sheetLayer .sheet .rd-keys) .toast:not(.over-cover) { bottom: auto; top: 58px; }
#app:has(.syncstrip) .toast.over-sync { bottom: calc(var(--tab-h) + 54px); }

/* ---------- F2-8, F2-9: glove targets. 44pt everywhere, 48pt in glove mode ---------- */
.link-btn { min-height: 44px; }
.glove .link-btn { min-height: 48px; }
.chip { min-width: 44px; justify-content: center; }
.seg.sm button { min-height: 44px; }
.glove .seg.sm button { min-height: 48px; width: 48px; }
.progress .pr-top .link-btn, .photo-bar .link-btn, .act-tools .link-btn, .sec-h-row .link-btn { padding: 0 4px; }
.sheet-signoff li > button { min-height: 44px; width: 100%; text-align: left; }
.glove .sheet-signoff li > button { min-height: 52px; }
.att { min-height: 44px; display: inline-flex; align-items: center; }
.an-colors button { min-width: 44px; min-height: 44px; }
.glove .an-colors button { min-width: 48px; min-height: 48px; }
.syncstrip { height: 44px; }
/* an inline document reference keeps its place in the sentence but gets a 44pt hit area */
.doc-ref { position: relative; }
.doc-ref::after { content: ''; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }
/* in a check, references are chips under the text (F2-8) */
.sc-refs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px 50px; }
.sc-ref { gap: 6px; }
.sc-ref .ic { width: 16px; height: 16px; }

/* ---------- D2-3: the coat log. Each blocker is a padded block with a full-width action ---------- */
.lc-block { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin: 6px var(--gutter); padding: 14px var(--gutter); background: var(--surface-2); }
.lc-block > .ic { width: 24px; height: 24px; margin: 0; }
.lc-block b { font-size: 15px; font-weight: 500; }
.lc-block .btn { width: 100%; margin-top: 12px; justify-content: center; }
.sheet .lc-block { background: var(--bg); }

/* ---------- B2-4: the manual reading sheet ---------- */
/* round 8, D3-10: three tappable value rows over the 7-1 keypad; the active row is ringed */
.sc-rd-rows { display: grid; gap: 6px; margin: 6px var(--gutter) 4px; }
.sc-rd-row { display: flex; align-items: baseline; gap: 10px; min-height: 52px; padding: 8px 14px; width: 100%; background: var(--surface); text-align: left; font-size: 15px; color: var(--fg-2); }
.sc-rd-row b { font-size: 26px; font-weight: 300; color: var(--fg); }
.sc-rd-row i { flex: none; min-width: 28px; font-style: normal; font-size: 14px; color: var(--muted); }
.sc-rd-row .sc-rd-empty { font-size: 13px; color: var(--faint); }
.sc-rd-row.on { box-shadow: inset 0 0 0 2px var(--fg); color: var(--fg); }
.chip.sc-meter { flex-direction: column; align-items: flex-start; gap: 0; min-height: 48px; padding-top: 4px; padding-bottom: 4px; line-height: 1.2; }
.chip.sc-meter small { font-size: 11px; opacity: .75; }
.keypad.sc-keys { grid-template-columns: repeat(4, 1fr); }
.keypad.sc-keys .sc-k0, .keypad.sc-keys .sc-knext { grid-column: span 2; }
.keypad.sc-keys .sc-knext { font-size: 17px; }
.keypad.sc-keys button:disabled { opacity: 1; color: var(--faint); }

/* ---------- hold points on every site (decision 8) and the lead's stage actions ---------- */
.sc-blockers { margin: 4px var(--gutter) 0; }
.sc-blockers .row.sc-blk { min-height: 44px; padding: 8px 12px; margin: 0; width: 100%; background: var(--surface); border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.35; color: var(--fg-2); text-align: left; }
.sc-blockers .row.sc-blk .ic { width: 16px; height: 16px; flex: none; }
.sc-stage-act { margin: 10px var(--gutter) 0; }
.sc-stage-act .btn { width: 100%; justify-content: center; }
.sc-stage-why { display: flex; gap: 10px; align-items: flex-start; margin: 10px var(--gutter) 0; padding: 10px 12px; background: var(--surface); font-size: 13.5px; line-height: 1.4; color: var(--fg-2); }
.sc-stage-why .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ---------- D2-7: rule codes are not UI text (they stay in the API log) ---------- */
.rule-code { display: none; }

/* ===================== Round 8, bundle B ===================== */
/* B3-7: thickness is typed, prefilled with the specified value; off spec asks why */
.lc-body .sc-mm .sc-mm-in { display: flex; align-items: center; gap: 10px; }
.lc-body .sc-mm .sc-mm-in input { flex: 1; min-height: 52px; font-size: 20px; font-variant-numeric: tabular-nums; }
.lc-body .sc-mm .sc-mm-in i { flex: none; min-width: 32px; font-style: normal; font-size: 14px; color: var(--muted); }
.sc-offspec { margin: 6px var(--gutter) 4px; padding: 12px 14px; background: var(--surface); box-shadow: inset 3px 0 0 var(--fg); }
.sc-offspec[hidden] { display: none; }
.sc-offspec > p { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; font-size: 13.5px; line-height: 1.4; color: var(--fg); }
.sc-offspec > p .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.sc-offspec .field, .sc-offspec .chips-wrap { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
/* B3-14: a missed or late rain photo is a breach, not a box to tick */
.pr-list li.bad { font-weight: 500; }
/* F3-3: an event on another site that is happening now */
.row.sc-now { align-items: center; gap: 12px; }
.row.sc-now .chip { flex: none; min-height: 44px; }
/* D3-2: the stage's own "Mark … done" closes the Checks tab */
.sc-done-act, .sc-done-why { margin-top: 18px; }

/* ===================== Round 10, bundle B ===================== */
/* D4-2: the conditions line is one quiet line. `#app p { text-wrap: pretty }` turned wrapping back on,
   so each span wrapped inside itself; the place name now gives way first, with an ellipsis */
#app .cond-line { flex-wrap: nowrap; white-space: nowrap; text-wrap: nowrap; overflow: hidden; }
#app .cond-line > span, #app .cond-line > i { flex: none; white-space: nowrap; }
#app .cond-line > span:first-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* D4-7: the people count sits inline with its icon, on the same centre line as the other header icons */
.icon-btn.ppl { grid-auto-flow: column; grid-template-columns: none; gap: 4px; width: auto; min-width: 48px; padding: 0 10px; align-items: center; }
.icon-btn.ppl .ppl-n { margin: 0; font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums; }
/* F3-11: an answered check reads in full; it wraps instead of ending in an ellipsis */
#app .ck-item.compact { align-items: flex-start; }
#app .ck-item.compact .ck-t1 { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; padding-top: 1px; }
#app .ck-item.compact .ck-tick, #app .ck-item.compact .ck-id, #app .ck-item.compact .ck-ans { margin-top: 1px; }
/* F3-9: the shot strip snaps to whole tiles beside the pinned Defect / extra tile, so no clipped label
   ("attern") peeks out from under it */
.slots-bar > .slots { scroll-snap-type: x mandatory; scroll-padding-left: 6px; padding-right: 214px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 16px), transparent 100%); }
.slots-bar > .slots > .slot { scroll-snap-align: start; }
/* D4-9: the spec beside the thickness, as one chip; its note says what choosing it records */
.lc-body .sc-mm-spec { align-items: center; }
.lc-body .sc-mm-spec .sc-mm-note { flex: 1 1 100%; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.sc-offspec .sec-h { margin-left: 0; padding-left: 0; }
.sc-offspec .sc-nc-who { margin: 6px 0 0; padding: 0; }
