/* Task Helper — road blocks on screen (job-intake.md §32; BRIEF-958). Copyright Rapid Surveys Pty Ltd. App tokens only. */
.rb-mark { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; white-space: nowrap; }
.rb-blocked { background: #fdecec; color: #a32121; border: 1px solid #f2b8b8; }
.rb-needs { background: #fff4e0; color: #8a4b00; border: 1px solid #f4cf8f; }
.rb-cleared { min-width: 18px; padding: 0; text-align: center; background: #8a4b00; color: #fff; border: 1px solid #8a4b00; }
.rb-field .rb-body { display: flex; flex-direction: column; gap: 8px; }
.rb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rb-list[hidden] { display: none; }
.rb-item { padding: 10px; border: 1px solid var(--line); border-left: 4px solid #d23f3f; border-radius: 10px; background: var(--card); }
.rb-item.rb-resolved { border-left-color: var(--ok); }
.rb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rb-label { font-weight: 700; }
.rb-state { font-size: 12px; font-weight: 600; color: var(--ok); }
.rb-desc, .rb-res { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rb-who { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.rb-acts, .rb-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.rb-acts .chip, .rb-btns button, .rb-add, .rb-fadd { width: auto; }
.rb-resbox, .rb-addbox { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; }
.rb-resbox[hidden], .rb-addbox[hidden], .rb-acts[hidden], .rb-add[hidden] { display: none; }
.rb-sub { font-size: 13px; color: var(--muted); }
.rb-addbox { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.rb-hint { margin: 0; padding: 8px 10px; border-radius: 9px; font-size: 14px; }
.rb-hint-needs { background: #fff4e0; color: #6b3a00; border: 1px solid #f4cf8f; }
.rb-hint-cleared { background: #f6f1e7; color: #5c3a00; border: 1px solid #e3d3b3; }
.rb-none { margin: 0; font-size: 14px; }
.rb-toggle { align-self: flex-start; padding: 4px 0; background: none; border: 0; color: var(--accent); font-size: 14px; cursor: pointer; width: auto; }
/* Fields → Status: Blocking / Done ticks; Fields → Road block: its labels */
.rb-flagbox { margin-top: 10px; }
.rb-flaghelp { margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.rb-flags { display: flex; flex-direction: column; gap: 2px; }
.rb-frow { display: grid; grid-template-columns: 1fr 76px 56px; align-items: center; gap: 8px; font-size: 14px; }
.rb-frow > span:not(:first-child) { text-align: center; }
.rb-fhead { font-size: 12px; font-weight: 600; color: var(--muted); }
.rb-frow input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.rb-labs { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rb-labs li { display: flex; gap: 6px; align-items: center; }
.rb-labs input { flex: 1 1 auto; min-width: 0; margin: 0; }
@media (pointer: coarse) { .rb-acts .chip, .rb-btns button, .rb-add, .rb-fadd, .rb-labs .fl-mini { min-height: 44px; } .rb-frow { min-height: 44px; } .rb-toggle { min-height: 44px; } }
/* RB-2 (BRIEF-960): waiting on another task, what a task clears, action required */
.rb-action { background: #a32121; color: #fff; border: 1px solid #a32121; }
.rb-item.rb-flagged { border-left-color: #a32121; background: #fff7f7; }
.rb-flag { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: #a32121; }
.rb-wait { margin: 4px 0 0; font-size: 14px; }
.rb-wstatus { font-size: 12px; color: var(--muted); }
.rb-field .linkish { padding: 0; background: none; border: 0; color: var(--accent); font: inherit; text-align: left; cursor: pointer; width: auto; text-decoration: underline; }
.rb-how { margin: 2px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; }
.rb-how legend { padding: 0; margin: 0 0 2px; }
.rb-radio { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rb-radio input { width: 18px; height: 18px; margin: 0; }
.rb-taskpick { display: flex; flex-direction: column; gap: 6px; }
.rb-taskpick[hidden] { display: none; }
.rb-results { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; }
.rb-results:empty { display: none; }
.rb-results li + li { border-top: 1px solid var(--line); }
.rb-pick { display: block; width: 100%; padding: 8px 10px; background: transparent; border: 0; text-align: left; font-size: 14px; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.rb-pick:hover:not(:disabled) { background: var(--hover); }
.rb-pick:disabled { color: var(--muted); cursor: default; }
.rb-pk { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent); }
.rb-noresult { padding: 8px 10px; font-size: 14px; }
.rb-chosen { margin: 0; font-size: 14px; }
.rb-chosen:empty { display: none; }
.rb-newtask { align-self: flex-start; }
.rb-clears { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.rb-clears .rb-sub { margin: 0 0 4px; display: block; }
.rb-clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rb-clabel { color: var(--muted); }
.rb-lpath { color: var(--muted); }
.rb-labs li { flex-direction: column; align-items: stretch; }
.rb-labrow { display: flex; gap: 6px; align-items: center; }
.rb-listrow { padding-left: 2px; }
.rb-lpick { width: auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
@media (pointer: coarse) { .rb-pick, .rb-newtask, .rb-lpick, .rb-radio { min-height: 44px; } .rb-field .linkish { min-height: 44px; } }
/* NOTE-960a: a changed Blocking / Done tick isn't saved until the Status field's Save */
.rb-unsaved { margin: 6px 0 0; font-size: 13px; color: #8a4b00; }
/* BRIEF-992: "Resolve the road blocks too?" on completing — a modal anchored to the TOP */
.rb-dlg-back { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px 16px; background: rgba(20, 28, 40, .45); overflow-y: auto; }
.rb-dlg { width: 100%; max-width: 440px; padding: 16px; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(20, 28, 40, .25); display: flex; flex-direction: column; gap: 8px; }
.rb-dlg h3 { margin: 0; font-size: 18px; }
.rb-dlg p { margin: 0; font-size: 14px; }
.rb-dlg-list { margin: 0; padding-left: 18px; font-size: 14px; overflow-wrap: anywhere; }
.rb-dlg textarea { width: 100%; margin: 0; }
@media (pointer: coarse) { .rb-dlg .rb-btns button { min-height: 44px; } }
/* RB-3a (BRIEF-962): the Communications tab — read-only timeline */
.rb-comms { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.rb-cfilt { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-cf { width: auto; }
.rb-cf[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.rb-copenbox { padding: 8px 10px; border: 1px solid #f2b8b8; border-left: 4px solid #c62828; border-radius: 10px; background: #fff7f7; font-size: 14px; }
.rb-copenbox ul { margin: 4px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.rb-copenbox .rb-flag { display: inline; margin: 0; font-size: 13px; }
.rb-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rb-ti { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rb-tico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--hover); color: var(--ink); }
.rb-ti-email .rb-tico { background: #e8f0fe; color: #1d4ed8; }
.rb-ti-flag .rb-tico { background: #a32121; color: #fff; font-weight: 700; }
.rb-tbody { min-width: 0; flex: 1 1 auto; }
.rb-tsum { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.rb-tx { margin: 2px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rb-twho { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.rb-cmsg { margin: 0; font-size: 14px; }
.rb-cmsg:empty { display: none; }
.rb-more { align-self: flex-start; width: auto; }
.rb-more[hidden] { display: none; }
@media (pointer: coarse) { .rb-cf, .rb-more { min-height: 44px; } }
/* §35 AC-4 (BRIEF-1025): a task outside the person's part — named, never linked */
.rb-hidden { color: var(--muted); font-style: italic; }
/* RB-3b (BRIEF-1036): email from a task + the company's email settings */
.rb-dlg-wide { max-width: 520px; }
.rb-dlg input:not([type="checkbox"]):not([type="radio"]), .rb-dlg textarea { width: 100%; margin: 0; }
.rb-to { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.rb-people { display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow-y: auto; padding: 4px 8px; border: 1px solid var(--line); border-radius: 9px; }
.rb-cmail { align-self: flex-start; width: auto; }
.rb-tfail { color: #a32121; }
.rb-tmsg { margin: 4px 0 0; font-size: 13px; }
.rb-tmsg summary { cursor: pointer; color: var(--accent); }
@media (pointer: coarse) { .rb-cmail, .rb-tmsg summary { min-height: 44px; } }
/* EM-3 (EMAIL, BRIEF-1047): replies on the Communications tab, "Reply received" on a block, the compose Preview */
.rb-replied { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: #1d6b3a; }
.rb-copenbox .rb-replied { display: inline; margin: 0; }
.rb-reply { font-size: 14px; }
.rb-quoted { color: var(--muted); border-left: 3px solid #d5dbe1; padding-left: 8px; }
.rb-tdiff { color: #8a5a00; font-style: italic; }
.rb-mform { display: contents; }
.rb-prev { margin: 8px 0 0; padding: 8px; border: 1px solid #e2e7ec; border-radius: 8px; background: #f7f9fb; }
.rb-pv { margin: 4px 0 0; font-size: 13px; }
.rb-pv summary { cursor: pointer; color: var(--accent); }
.rb-pvtx { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.45 system-ui, sans-serif; max-height: 40vh; overflow: auto; }
@media (pointer: coarse) { .rb-pv summary, .rb-mprev { min-height: 44px; } }
/* RB-3c-2 (BRIEF-1055): a label's email texts */
.rb-tplset { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.rb-tplset legend { padding: 0 4px; }
.rb-ltpl { width: auto; font-size: 13px; }
@media (pointer: coarse) { .rb-ltpl { min-height: 44px; } }
/* RB-3c-1 (BRIEF-1058): Let them know */
.rb-ltk { margin-top: 4px; }
.rb-ltk-who { margin: 0; }
.rb-ltk-who[hidden] { display: none; }
.rb-letknow { width: auto; }
.rb-lpv { display: flex; flex-direction: column; gap: 4px; }
.rb-lpv[hidden] { display: none; }
.rb-pvtext { margin: 0; padding: 8px; max-height: 200px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--hover); border-radius: 8px; }
@media (pointer: coarse) { .rb-letknow, .rb-ltk { min-height: 44px; } }
/* CC-1 (EMAIL, BRIEF-1066): the compose "Copy to" section */
.rb-copy { margin: 6px 0 0; }
.rb-copy > summary { cursor: pointer; color: var(--accent); }
@media (pointer: coarse) { .rb-copy > summary { min-height: 44px; display: flex; align-items: center; } }
/* AT-1 (EMAIL, BRIEF-1067): keep a reply's attachment */
.rb-keeps { margin: 4px 0 0; font-size: 13px; }
.rb-klist { margin: 0; padding-left: 18px; }
.rb-klist li { margin: 2px 0; }
.rb-kept { color: #1d6b3a; font-weight: 700; }
@media (pointer: coarse) { .rb-keep, .rb-dokeep { min-height: 44px; } }
/* RB-5a (BRIEF-1073): the road-block labels each blocking status allows */
.rb-flabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 8px 12px; }
.rb-flab { width: auto; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; cursor: pointer; }
.rb-flab[aria-pressed="true"] { background: #fdecec; color: #a32121; border-color: #f2b8b8; font-weight: 600; }
@media (pointer: coarse) { .rb-flab { min-height: 44px; } }
/* RB-5d (BRIEF-1081): email texts where the work happens */
.rb-labrow { display: flex; gap: 6px; align-items: center; }
.rb-labrow .rb-lab { flex: 1 1 auto; min-width: 0; }
.rb-labtext { flex: none; width: auto; font-size: 13px; }
.rb-ltlist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rb-ltlist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.rb-ltpl2, .rb-nsave, .rb-lsave, .rb-msave { width: auto; font-size: 13px; }
@media (pointer: coarse) { .rb-labtext, .rb-ltpl2, .rb-nsave, .rb-lsave, .rb-msave { min-height: 44px; } }
/* BRIEF-1085 (Gary Q3): clearing "Needs a resolution" without a road block */
.rb-hint .linkish { display: inline; padding: 0; background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; width: auto; }
.rb-hint-fcleared { background: #eef7ee; color: #1f5f2a; border: 1px solid #cfe6cf; }
.rb-fclearbox { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.rb-fclearbox[hidden] { display: none; }
@media (pointer: coarse) { .rb-hint .linkish { min-height: 44px; display: inline-flex; align-items: center; } }
/* BRIEF-1092: parked road blocks (Details) + the save-time questions */
.rb-pstate { color: var(--muted, #6b7280); }
.rb-parked { margin-top: 6px; }
.rb-parked > summary { cursor: pointer; padding: 4px 0; }
.rb-item.rb-parked { border-left-color: #9aa3ad; }   /* asleep: not the open red */
.rb-pnote { margin: 2px 0 6px; font-size: 13px; }
.rb-dlg-hint { font-size: 13px; }
.rb-dlg-picks { display: flex; flex-direction: column; gap: 6px; font-size: 14px; overflow-wrap: anywhere; }
.rb-dlg-picks .rb-radio { display: flex; gap: 8px; align-items: flex-start; }
@media (pointer: coarse) { .rb-parked > summary, .rb-dlg-picks .rb-radio { min-height: 44px; display: flex; align-items: center; } }
/* BRIEF-1127: a road block raised by another feature (SAFETY's Take 5 "Safety stop") */
.rb-src { color: #8a1c1c; }
.rb-srcnote { font-style: italic; }
/* RB-6d-1 (BRIEF-1251): the ROAD BLOCK section in the task's Comms group */
.rb-sec { display: flex; flex-direction: column; gap: 10px; }
.rb-schips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-schip { min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; width: auto; }
.rb-schip[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rb-schip-resolved { opacity: .7; }
.rb-sref { font-weight: 700; letter-spacing: .02em; }
.rb-sflag { color: var(--accent); }
.rb-shead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.rb-shead h4 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.rb-stage { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: #34404d; }
.rb-stage-reply { background: #e7f4ea; color: #1f5f2a; }
.rb-stage-closed { background: #f1f1f1; color: #555; }
.rb-sthread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rb-sline { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow-wrap: anywhere; }
.rb-sline-reply { border-left: 4px solid #2e7d32; }
.rb-sline-sent { border-left: 4px solid #5b7ea6; }
.rb-shd { margin: 0 0 4px; font-size: 13px; color: var(--muted, #667085); }
.rb-stag { font-weight: 700; font-size: 11px; letter-spacing: .06em; color: var(--ink); }
.rb-sact > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.rb-smarkbox, .rb-sresbox { display: flex; flex-direction: column; gap: 6px; }
.rb-receipts { margin: 4px 0 0; font-size: 13px; color: var(--muted, #667085); overflow-wrap: anywhere; }
/* RB-6d-2 (BRIEF-1251): the road-block SETUP screen (Fields → Road blocks; public/road-blocks/rb-setup.js) */
.rbs { display: flex; flex-direction: column; gap: 16px; }
.rbs section { display: flex; flex-direction: column; gap: 8px; }
.rbs h4 { margin: 0; font-size: 16px; }
.rbs-ticks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rbs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rbs-issue { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.rbs-retired { opacity: .6; }
.rbs-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; }
.rbs-edit { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.rbs-edit input, .rbs-edit textarea, .rbs-edit select { max-width: 100%; }
.rbs-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rbs-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rbs-days { width: 64px; }
.rbs-stages { display: flex; flex-wrap: wrap; gap: 8px; }
.rbs-ph { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0; font-size: 13px; }
/* RB-6d-3 (BRIEF-1251): the REPLY BOARD (public/road-blocks/rb-board.js) */
.rbb { display: flex; flex-direction: column; gap: 10px; }
.rbb-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.rbb-sw { display: flex; flex-wrap: wrap; gap: 4px; }
.rbb-sw button { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; width: auto; }
.rbb-sw button[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rbb-n { font-size: 12px; color: var(--muted, #667085); }
.rbb-cols { display: flex; flex-direction: column; gap: 12px; }
.rbb-cols.rbb-wide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.rbb-col h4 { margin: 0 0 6px; font-size: 15px; }
.rbb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rbb-card { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow-wrap: anywhere; }
.rbb-card p { margin: 0 0 4px; }
.rbb-reply { border-left: 4px solid #2e7d32; }
.rbb-head { font-weight: 600; }
.rbb-meta { font-size: 13px; color: var(--muted, #667085); }
.rbb-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.rbb-card .linkish, .rb-sec .linkish { display: inline; padding: 0; background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; width: auto; min-height: 0; text-align: left; }
@media (pointer: coarse) { .rbb-card .linkish, .rb-sec .linkish { min-height: 44px; display: inline-flex; align-items: center; } }
