/*
 * D3PAGE (21 Oct 2026): the Desk Card Lab's job card on the real job (js\job.js labRender), its own page in D3 and the
 * middle column in D1 (js\v149_views.js), and the Lab's rows, groups and D1 cards. Every rule hangs off .lab-*,
 * body.lab-d1-job, #job-layer.lab-inline, .b149-* or #board-main.b149-d1, which only those files add: with the flag
 * b149JobPage off nothing here applies. Motion: transform and opacity only; none under reduced motion.
 * The Lab's tokens: admin #1D4F91, CM #8A5200, leader #6D28D9, one-off/leads #0F766E, welfare #9B1C14; mail Arial.
 */
:root { --lab-admin: #1D4F91; --lab-cm: #8A5200; --lab-leader: #C2410C; --lab-oneoff: #0F766E; --lab-welfare: #9B1C14; --lab-hold: #6D28D9;
  --lab-line: rgba(27,27,27,.10); --lab-mail: Arial, Helvetica, sans-serif; }

/* ---------------------------------------------------------------- the page (D3) */
.job-panel.lab-panel { max-width: 1280px; }
.lab-top { gap: 10px; flex-wrap: wrap; }
.lab-top .lab-who { flex: 1; min-width: 0; }
.lab-top .lab-who h1 { font-size: 1.125rem; }
.lab-top .lab-filebtn { flex: none; }
.lab-scroll { padding: 18px 16px 0; }
.lab-page { max-width: 960px; margin: 0 auto; display: grid; gap: 14px; padding-bottom: 28px; }
.lab-grid { display: block; max-width: none; margin: 0; }
.lab-card { border-radius: var(--r-card, 20px); min-width: 0; overflow: clip; display: grid; }
.lab-card.is-welfare { box-shadow: 0 0 0 3px var(--lab-welfare), var(--shadow-1); }

/* who, what, when */
.lab-head { padding: 16px 20px 12px; display: grid; gap: 5px; }
.lab-r1 { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.lab-stk, .b149-stk { display: inline-flex; align-items: center; flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 8px; white-space: nowrap; border: 1px solid; line-height: 1.1;
  color: var(--lab-admin); background: color-mix(in srgb, var(--lab-admin) 10%, var(--solid, #fff)); border-color: color-mix(in srgb, var(--lab-admin) 30%, transparent); }
.lab-stk.is-cm, .b149-stk.is-cm { color: var(--lab-cm); background: color-mix(in srgb, var(--lab-cm) 10%, var(--solid, #fff)); border-color: color-mix(in srgb, var(--lab-cm) 30%, transparent); }
.lab-stk.is-leader, .b149-stk.is-ld { color: var(--lab-leader); background: color-mix(in srgb, var(--lab-leader) 10%, var(--solid, #fff)); border-color: color-mix(in srgb, var(--lab-leader) 30%, transparent); }
.lab-stk.is-leads, .b149-stk.is-le { color: var(--lab-oneoff); background: color-mix(in srgb, var(--lab-oneoff) 10%, var(--solid, #fff)); border-color: color-mix(in srgb, var(--lab-oneoff) 30%, transparent); }
.lab-stk.is-welfare, .b149-stk.is-wf { color: #fff; background: var(--lab-welfare); border-color: var(--lab-welfare); }
.lab-kind { font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.lab-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: var(--glass-1); border: 1px solid var(--glass-edge);
  box-shadow: 0 0 0 1px var(--glass-rim); color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.lab-chip.is-held { color: var(--lab-hold); }
.lab-chip.is-mine { color: var(--brand-text); }
.lab-chip.is-busy { color: var(--warn); }
.lab-client { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.lab-what { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.lab-long { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--ink-2); }
.lab-when { margin: 0; font-size: .8125rem; color: var(--ink-3); }
.lab-from { margin: 0; font-size: .8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.lab-what:focus, .lab-long:focus { outline: none; }

/* the bands: who has it */
.lab-band { padding: 10px 20px; font-size: .86rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--lab-line); }
.lab-band .lab-band-t { flex: 1 1 260px; min-width: 0; }
.lab-band .btn { min-height: 32px; padding: 0 12px; font-size: .8125rem; border-radius: 10px; }
.lab-band.is-mine { background: color-mix(in srgb, var(--brand) 8%, var(--solid, #fff)); color: var(--brand-text); }
.lab-band.is-held { background: color-mix(in srgb, var(--lab-hold) 9%, var(--solid, #fff)); color: var(--lab-hold); }

/* the body: sections and folds, each a line apart */
.lab-stack { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.lab-stack > * { border-top: 1px solid var(--lab-line); }
.lab-stack > .workband { border-top: 0; }
.lab-stack > .workband[hidden] { display: none; }
.lab-stack > .pa-top, .lab-stack > .cardnews, .lab-stack > .changed, .lab-stack > .pick, .lab-stack > .ask, .lab-stack > .pa-ask { margin: 0; border-radius: 0; box-shadow: none; }
.lab-stack > :not(details):not(.lab-drafts):not(.workband) { padding: 12px 20px; }
details.lab-fold { border-top: 1px solid var(--lab-line); background: transparent; }
details.lab-fold > summary { cursor: pointer; list-style: none; padding: 12px 20px; display: flex; gap: 10px; align-items: center; min-height: 48px; }
details.lab-fold > summary::-webkit-details-marker { display: none; }
details.lab-fold > summary::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s ease; }
details.lab-fold[open] > summary::before { transform: rotate(45deg); }
details.lab-fold > summary:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
details.lab-fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.lab-fold-l { color: var(--ink-2) !important; white-space: nowrap; flex: none; }
.lab-fold-s { font-size: .8125rem; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.lab-fold > :not(summary) { margin: 0 20px 14px; }
details.lab-fold > .came { display: grid; gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; position: static; max-height: none; overflow: visible; }
.micro { font-size: .72rem; line-height: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
details.lab-fold.came-col { position: static; max-height: none; overflow: visible; border-radius: 0; }

/* what came in: each thing as an email */
.lab-inmail { border: 1px solid var(--lab-line); border-radius: 14px; background: var(--solid, #fff); overflow: hidden; }
.lab-mxh { padding: 10px 16px 8px; display: grid; gap: 3px; font-family: var(--lab-mail); font-size: .84rem; color: #222; }
.lab-mxh .micro { color: #666; font-family: var(--font); }
.lab-subj { margin: 2px 0 2px; font-size: 1.02rem; font-weight: 700; color: #111; overflow-wrap: anywhere; }
.lab-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.lab-row > .k { color: #777; }
.lab-row .ad { color: #555; }
.lab-row > span { min-width: 0; overflow-wrap: anywhere; }
.lab-atts { padding: 0 16px 10px; }
.lab-inmail .mail-body, .lab-mxb { padding: 14px 16px 16px; border-top: 1px solid #ECEEF1; font-family: var(--lab-mail); font-size: 13.3px; line-height: 1.5; color: #000; overflow-wrap: anywhere; }
.lab-inmail .mail-body .mail-p { margin: 0 0 10px; white-space: pre-wrap; }
.lab-inmail .mail-body .mail-p:last-child { margin-bottom: 0; }
.lab-full { padding: 0 16px 12px; margin: 0; }
details.lab-older { border: 1px solid var(--lab-line); border-radius: 12px; background: var(--solid, #fff); }
details.lab-older > summary { cursor: pointer; padding: 8px 12px; font-size: .8125rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.lab-older > .lab-inmail { border: 0; border-top: 1px solid var(--lab-line); border-radius: 0; }
.lab-came .thread { margin: 0; }

/* the questions (One question) and the You need to box, in the card */
.pa-ask { display: grid; gap: 10px; background: transparent; }
.pa-ask .pa-q { background: var(--solid, #fff); border: 1px solid var(--lab-line); border-radius: 14px; padding: 12px 14px; }

/* the drafts: each closed to one line; open, the familiar email */
.lab-drafts { display: grid; gap: 8px; padding: 12px 20px 14px; }
.lab-sec-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
.lab-sec-h h2 { margin: 0; }
details.lab-draft { border: 1px solid var(--lab-line); border-radius: 14px; background: var(--solid, #fff); overflow: clip; }
details.lab-draft > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; min-height: 52px; }
details.lab-draft > summary::-webkit-details-marker { display: none; }
details.lab-draft > summary:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
details.lab-draft > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
details.lab-draft[open] > summary { border-bottom: 1px solid var(--lab-line); background: var(--solid-2, #F4F6F2); }
details.lab-draft.is-off > summary, details.lab-draft.is-sent > summary { opacity: .62; }
.lab-dnum { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text); background: var(--brand-soft); border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.lab-dnum.is-sent { color: var(--ok); }
.lab-dnum.is-off { color: var(--ink-3); background: var(--solid-2, #eee); }
.lab-dmain { min-width: 0; display: grid; }
.lab-l1 { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-l2 { font-size: .8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-dside { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--ink-3); }
.lab-edited { color: var(--warn); font-weight: 700; font-size: .74rem; }
.lab-flag { color: var(--danger); display: inline-grid; }
.lab-clip { display: inline-flex; align-items: center; gap: 2px; }

/* the email inside an open draft: From / To / Cc / Subject rows, the words in Arial, the files as attachments */
details.lab-draft .email { padding: 0; border-radius: 0; background: #fff; box-shadow: none; border: 0; gap: 0; color: #222; }
details.lab-draft .email-h { padding: 8px 16px; gap: 8px 12px; border-bottom: 1px solid #ECEEF1; background: #FBFCFB; }
details.lab-draft .email-h .micro { font-size: .66rem; }
details.lab-draft .email-h .role { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
details.lab-draft .email .offnote { padding: 8px 16px 0; }
details.lab-draft .email-body-wrap { gap: 0; }
details.lab-draft .rcpts { padding: 10px 16px 8px; gap: 4px; font-family: var(--lab-mail); font-size: .84rem; color: #222; }
details.lab-draft .rcpt, details.lab-draft .v3-line { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 8px; align-items: center; min-height: 30px; }
details.lab-draft .rcpt .k, details.lab-draft .v3-line > .k, details.lab-draft .subj .k { width: auto; min-width: 0; font-family: var(--lab-mail); font-weight: 400; font-size: .84rem; color: #777; text-transform: none; letter-spacing: 0; }
details.lab-draft .rcpt > .ico { display: none; }
details.lab-draft .rcpt { grid-template-columns: 52px auto auto minmax(0, 1fr) auto; }
details.lab-draft .rcpt .nm { max-width: none; font-weight: 600; }
details.lab-draft .rcpt-from .nm, details.lab-draft .rcpt .nm { display: inline-flex; align-items: center; background: #EEF1F5; color: #1F2D3D; border-radius: 999px; padding: 1px 9px; font-size: .8rem; }
details.lab-draft .rcpt .nm:empty { display: none; }
details.lab-draft .rcpt .ad { font-size: .8rem; color: #555; overflow: hidden; text-overflow: ellipsis; }
details.lab-draft .rcpt-note { padding-left: 60px; font-family: var(--font); }
details.lab-draft .v3-lines { gap: 4px; }
details.lab-draft .v3-line { grid-template-columns: 52px minmax(0, 1fr); }
details.lab-draft .v3-line > .v3-chips, details.lab-draft .v3-line > .v3-add-row { grid-column: 2; }
details.lab-draft .v3-chip { display: inline-flex; align-items: center; gap: 6px; background: #EEF1F5; color: #1F2D3D; border: 0; border-radius: 999px; padding: 1px 2px 1px 10px; font-size: .8rem; min-height: 26px; box-shadow: none; }
details.lab-draft .v3-chip .ad { color: #4A5563; }
details.lab-draft .v3-chip .v3-x { min-height: 22px; min-width: 22px; width: 22px; height: 22px; border-radius: 50%; padding: 0; background: transparent; box-shadow: none; border: 0; }
details.lab-draft .v3-chip .v3-x:hover { background: rgba(0,0,0,.08); }
details.lab-draft .v3-add-row { gap: 6px; flex: 1 1 auto; }
details.lab-draft .v3-add-in { flex: 1; min-width: 0; min-height: 30px; border: 0; border-bottom: 1px dashed #D5D9DF; border-radius: 0; background: transparent; padding: 2px 4px; font-family: var(--lab-mail); font-size: .84rem; box-shadow: none; }
details.lab-draft .v3-add-in:focus-visible { outline: none; border-bottom: 2px solid var(--focus); }
details.lab-draft .v3-add { min-height: 28px; padding: 0 10px; font-size: .78rem; border-radius: 8px; }
details.lab-draft .subj { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: center; padding: 2px 16px 10px; }
details.lab-draft .subj textarea { width: 100%; min-height: 32px; resize: none; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 4px 6px; margin-left: -6px;
  font-family: var(--lab-mail); font-size: 1.02rem; font-weight: 700; color: #111; field-sizing: content; overflow: hidden; }
details.lab-draft .subj textarea:hover { border-color: #E3E6EA; }
details.lab-draft .subj textarea:focus-visible { outline: none; border-color: var(--focus); background: #fff; }
details.lab-draft .paper { border-radius: 0; box-shadow: none; border-top: 1px solid #ECEEF1; padding: 14px 16px 16px; font: 13.3px/1.5 var(--lab-mail); }
details.lab-draft .paper .sig { max-width: 360px; }
details.lab-draft .att-row { padding: 10px 16px; border-top: 1px solid #ECEEF1; gap: 6px; }
details.lab-draft .att-row .file, .lab-inmail .file { min-height: 32px; border: 1px solid #DADDE2; background: #F7F8FA; border-radius: 8px; box-shadow: none; font-family: var(--lab-mail); font-size: .8rem; font-weight: 400; color: #222; }
details.lab-draft .feedback, details.lab-draft .carry-row, details.lab-draft .carry, details.lab-draft details.why.small, details.lab-draft .v21-slot { margin-left: 16px; margin-right: 16px; }
details.lab-draft .email-body-wrap > :last-child { margin-bottom: 12px; }
details.lab-draft .email-body-wrap > .feedback { margin-top: 8px; }

/* why, and what was checked */
details.lab-why > .why { background: none; border: 0; box-shadow: none; padding: 0; }
details.lab-why .why-body { padding: 0; }

/* what this job does when you press, at the bottom */
details.lab-does .pa-panel { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
details.lab-does .sec-h { margin: 6px 0 4px; }
details.lab-does .sec-h h2 { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* the press: the bottom of the card, always in reach while the card scrolls */
.job-bar.lab-press { position: sticky; bottom: 0; z-index: 4; border-radius: 0; border-width: 1px 0 0; padding: 12px 20px 14px; min-height: 68px; gap: 10px 14px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--solid, #fff) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 -8px 24px rgba(16,24,16,.06); }
.job-bar.lab-press .sum { flex: 1 1 260px; min-width: 0; font-size: .8125rem; }
.lab-also-k { margin: 0; }

/* the file drawer (D3) */
.lab-drawer-wrap { position: fixed; inset: 0; z-index: 48; }
.lab-scrim { position: absolute; inset: 0; background: rgba(12,16,13,.32); }
.lab-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(390px, 100%); padding: 16px; overflow: auto; display: grid; gap: 12px; align-content: start; background: var(--solid, #fff); box-shadow: var(--shadow-2); }
.lab-drawer:focus { outline: none; }
.lab-dr-h { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.lab-dr-h h2 { margin: 0; font-size: 1.1rem; }
.lab-dr-sec { display: grid; gap: 4px; }
.lab-dr-l { margin: 0; padding-left: 1.1rem; display: grid; gap: 3px; font-size: .84rem; }

/* ---------------------------------------------------------------- D1: the job in the middle column */
#job-layer.lab-inline { position: relative; inset: auto; top: auto; z-index: 2; padding: 0; display: block; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#job-layer.lab-inline[hidden] { display: none; }
#job-layer.lab-inline .job-panel { height: auto; max-width: none; border-radius: var(--r-card, 20px); overflow: visible; }
#job-layer.lab-inline .job-bg { display: none; }
#job-layer.lab-inline .lab-top { border-radius: var(--r-card, 20px) var(--r-card, 20px) 0 0; position: static; min-height: 52px; padding: 6px 12px; }
#job-layer.lab-inline .lab-top .lab-who h1 { font-size: 1rem; }
#job-layer.lab-inline .job-scroll { overflow: visible; padding: 0; flex: none; }
#job-layer.lab-inline .lab-page { max-width: none; padding-bottom: 0; gap: 10px; }
#job-layer.lab-inline .lab-card { border-top-left-radius: 0; border-top-right-radius: 0; }
#job-layer.lab-inline .lab-press { bottom: 0; }
body.lab-d1-job.job-open { overflow: auto; }
body.lab-d1-job.job-open .board-wrap { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .lab-scroll { padding: 12px 10px 0; }
  .lab-head { padding: 14px 14px 10px; }
  .lab-band { padding: 10px 14px; }
  details.lab-fold > summary { padding: 12px 14px; }
  details.lab-fold > :not(summary) { margin: 0 12px 12px; }
  .lab-stack > :not(details):not(.lab-drafts):not(.workband) { padding: 12px 14px; }
  .lab-drafts { padding: 12px 12px 14px; }
  details.lab-draft > summary { grid-template-columns: auto minmax(0, 1fr); }
  details.lab-draft > summary .lab-dside { grid-column: 2; }
  details.lab-draft .rcpts, details.lab-draft .subj { padding-left: 12px; padding-right: 12px; }
  details.lab-draft .rcpt { grid-template-columns: 44px minmax(0, 1fr); }
  details.lab-draft .rcpt .ad { grid-column: 2; }
  details.lab-draft .rcpt, details.lab-draft .v3-line, details.lab-draft .subj { grid-template-columns: 44px minmax(0, 1fr); }
  details.lab-draft .paper { padding: 12px; }
  .job-bar.lab-press { padding: 10px 12px 12px; }
  .lab-top .lab-filebtn .ico + span { display: none; }
  .lab-row { grid-template-columns: 44px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  details.lab-fold > summary::before { transition: none; }
}
:root[data-motion="reduced"] details.lab-fold > summary::before { transition: none; }

/* round 2 (01:50): the press as the Lab's press row; one slim line over each open email; To and Cc inline */
.job-bar.lab-press { display: flex; align-items: center; }
.job-bar.lab-press #send-btn, .job-bar.lab-press #takeover-btn { order: -1; min-height: 46px; padding: 0 20px; font-size: .95rem; border-radius: 14px; }
.job-bar.lab-press .sum { order: 0; flex: 1 1 160px; }
.job-bar.lab-press > .btn:not(#send-btn):not(#takeover-btn) { order: 1; min-height: 40px; padding: 0 14px; font-size: .84rem; }
details.lab-draft .email-h .micro { display: none; }
details.lab-draft .email-h { padding: 6px 16px; min-height: 44px; }
details.lab-draft .email-h .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
details.lab-draft .v3-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
details.lab-draft .v3-line > .k { flex: 0 0 52px; }
details.lab-draft .v3-line > .v3-chips { flex: 0 1 auto; }
details.lab-draft .v3-line > .v3-add-row { flex: 1 1 160px; }
details.lab-draft .v3-add-in:placeholder-shown + .v3-add { display: none; }
.lab-page > .ask { width: 100%; max-width: none; margin: 0; }
@media (max-width: 760px) {
  details.lab-draft .v3-line > .k { flex-basis: 44px; }
  .job-bar.lab-press #send-btn { flex: 1 1 100%; }
}

/* round 3 (02:00): D1's middle column is narrower: the press keeps one row, its words under it */
#job-layer.lab-inline .job-bar.lab-press > .btn:not(#send-btn):not(#takeover-btn) { min-height: 36px; padding: 0 10px; font-size: .78rem; }
#job-layer.lab-inline .job-bar.lab-press .sum { order: 2; flex: 1 1 100%; }
#job-layer.lab-inline .job-bar.lab-press #send-btn { min-height: 44px; }
#job-layer.lab-inline .lab-page > .ask { border-radius: 0; box-shadow: none; }

/* round 4 (02:05): the phone: the bar's own buttons wrap small under the name; the press sits at the card's foot */
.lab-band .lab-band-t { flex: 1 1 200px; }
.lab-band > .ico { flex: none; }
@media (max-width: 760px) {
  .lab-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; }
  .lab-top > .lab-back { flex: none; min-height: 40px; padding: 0 10px; }
  .lab-top > .lab-back .bt { display: none; }
  .lab-top .lab-who { flex: 1 1 calc(100% - 64px); order: 0; }
  .lab-top .lab-who h1 { font-size: 1rem; }
  .lab-top > :not(.lab-back):not(.lab-who) { flex: 0 1 auto; order: 1; max-width: 100%; min-height: 34px; padding: 0 10px; font-size: .78rem; margin: 0; position: static; transform: none; }
  .lab-top > .also { flex-basis: 100%; }
  .job-bar.lab-press { position: static; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: transparent; }
  .job-bar.lab-press .sum { order: 3; flex: 1 1 100%; }
  .job-bar.lab-press > .btn:not(#send-btn):not(#takeover-btn) { flex: 1 1 40%; }
}
/* the orb's and the practice panel's room beside the job page is not needed in D1's middle column */
#job-layer.lab-inline { padding: 0 !important; }
/* D1's middle column: the bar as on the phone (the name first, its buttons small under it) */
#job-layer.lab-inline .lab-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 12px; }
#job-layer.lab-inline .lab-top > .lab-back { flex: none; min-height: 40px; padding: 0 12px; }
#job-layer.lab-inline .lab-top .lab-who { flex: 1 1 calc(100% - 120px); order: 0; }
#job-layer.lab-inline .lab-top > :not(.lab-back):not(.lab-who) { flex: 0 1 auto; order: 1; max-width: 100%; min-height: 32px; padding: 0 10px; font-size: .78rem; margin: 0; position: static; transform: none; }
/* D1's file pane: the Lab's tight heading */
.b149-d1-file > .b149-fk, .b149-d1-file > .b149-f-name, .b149-d1-file > .meta { margin: 0; }
.b149-d1-file > .b149-f-name { font-size: 1.1rem; margin-top: -6px; }
/* round 5 (03:30): the what and the longer line read as plain words, not a heading */
.lab-head .happened { font-weight: inherit; font-size: inherit; margin: 0; }
.lab-head .lab-long.happened { font-weight: 400; font-size: .875rem; color: var(--ink-2); }
.lab-head .lab-what.happened { font-size: 1.02rem; }
/* round 6 (03:35): a long line inside a fold never widens D1's middle column (the phone) */
.b149-d1-jobslot, #b149-d1-mid > .b149-mini, #job-layer.lab-inline, #job-layer.lab-inline .job-panel, #job-layer.lab-inline .job-scroll, .lab-page, .lab-grid, .lab-card, .lab-stack, details.lab-fold { min-width: 0; max-width: 100%; }
details.lab-fold > :not(summary), .lab-card { overflow-wrap: anywhere; }
/* round 7 (03:40): the bar's own buttons in a row of their own; leaver and Moncur lines in the card's head */
.lab-tools { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; min-width: 0; }
.lab-tools > * { flex: none; margin: 0; }
.lab-note { margin: 0; font-size: .8125rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .lab-top > .lab-tools { flex: 1 1 100%; order: 1; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 0; }
  .lab-top > .lab-tools::-webkit-scrollbar { display: none; }
  .lab-top > .lab-tools > * { white-space: nowrap; }
}
#job-layer.lab-inline .lab-top > .lab-tools { flex: 1 1 100%; order: 1; justify-content: flex-start; margin-left: 0; }
/* round 8 (03:35): the phone's 44 px square buttons (desk.css) are for the old bar: the Lab bar's tools show their
   words, wrap onto a second line, and never run past the screen */
@media (max-width: 760px) {
  .lab-top > .lab-tools { flex-wrap: wrap; overflow: visible; }
  .lab-top .lab-tools .btn { width: auto; min-width: 0; padding: 0 10px; min-height: 34px; font-size: .78rem; }
  .lab-top .lab-tools > * { white-space: normal; max-width: 100%; }
}
#job-layer.lab-inline .lab-top .lab-tools { flex-wrap: wrap; overflow: visible; }
#job-layer.lab-inline .lab-top .lab-tools > * { max-width: 100%; }
/* round 9 (03:37): the D3 page keeps the Lab's 960 px column (round 6's max-width 100% is for D1's middle only) */
.job-panel.lab-panel:not(.is-inline) .lab-page { max-width: 960px; }
/* round 10 (03:36): a long word in the file summary never widens D1's file column */
#board-main.b149-d1 > #b149-d1-file, #board-main.b149-d1 > #b149-d1-nav { min-width: 0; overflow-wrap: anywhere; }
#b149-d1-file .b149-fl li > span { min-width: 0; }
/* round 11 (03:46): nothing in D1's middle column ever widens the phone page (clip keeps the press sticky) */
#board-main.b149-d1 > #b149-d1-mid { overflow-x: clip; }
/* round 12 (03:48): the help button mounts itself into the bar after it is drawn: it wraps and shows its words too */
#job-layer.lab-inline .lab-top { flex-wrap: wrap !important; }
#job-layer.lab-inline .lab-top > .v3-help-mount, #job-layer.lab-inline .lab-top > .lab-tools ~ * { order: 2; }
#job-layer.lab-inline .lab-top .v3h-ask { width: auto; padding: 0 10px; }
@media (max-width: 760px) {
  .lab-top { flex-wrap: wrap !important; }
  .lab-top > .v3-help-mount, .lab-top > .lab-tools ~ * { order: 2; }
  .lab-top .v3h-ask, .lab-top > * .btn { width: auto; min-width: 44px; padding: 0 10px; }
  .lab-top > .lab-back { width: 44px; padding: 0; }
}

/* ---------------------------------------------------------------- polish (03:58, Fred's review): calmer, as the Lab */
/* the press: the button, its plain line, "I need help with this" as a link, and a small More menu */
.job-bar.lab-press .lab-press-r { order: 5; margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.lab-help-slot:empty { display: none; }
.lab-help-slot .btn, .lab-help-slot button { background: none !important; border: 0 !important; box-shadow: none !important; min-height: 32px; width: auto; padding: 0 2px;
  font-size: .8125rem; font-weight: 400; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.lab-help-slot .btn .ico, .lab-help-slot button .ico { display: none; }
.lab-help-slot .bt { display: inline !important; }
details.lab-more { position: relative; }
details.lab-more[hidden] { display: none; }
details.lab-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--glass-edge); background: var(--glass-1); box-shadow: 0 0 0 1px var(--glass-rim); font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
details.lab-more > summary::-webkit-details-marker { display: none; }
details.lab-more > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
details.lab-more[open] > summary .ico { transform: rotate(180deg); }
.lab-more-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 30; min-width: 250px; max-width: min(320px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 8px;
  border-radius: 14px; background: var(--solid, #fff); box-shadow: 0 0 0 1px var(--glass-rim), var(--shadow-2); }
.lab-more-menu > *, .lab-more-menu .btn { width: 100%; justify-content: flex-start; min-height: 40px; font-size: .84rem; margin: 0; }
.lab-more-menu .bt { display: inline !important; }
.lab-more-menu > :not(.btn):not(button) { display: flex; flex-wrap: wrap; gap: 6px; }
/* chips the desk adds (For the admin team, Your CM Task, Claims manager only, who else is looking) sit in the head */
.lab-hchips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-hchips:empty { display: none; }
.lab-hchips > * { margin: 0 !important; }
/* the page bar: All clients, the client, N jobs on this file, the file */
.lab-top .lab-who .meta { gap: 6px; }
/* Change it: the small fold under the drafts */
details.lab-change .ask { margin: 0; box-shadow: none; }
@media (max-width: 760px) {
  .job-bar.lab-press .lab-press-r { margin-left: 0; flex: 1 1 100%; justify-content: space-between; }
  .lab-more-menu { right: 0; }
}
/* the Why fold is a section of the card like the others, not a box of its own */
details.lab-fold.sec { padding: 0; margin: 0; border-radius: 0; background: transparent; box-shadow: none; border-left: 0; border-right: 0; border-bottom: 0; display: block; }
/* a new email that joined the card: its one line reads as a line (the old page's box styles are for its own column) */
.lab-stack > .card-news { display: grid; gap: 8px; background: color-mix(in srgb, var(--warn) 6%, transparent); border-radius: 0; box-shadow: none; }
.lab-stack > .card-news details.newmail > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lab-stack > .card-news details.newmail > summary::-webkit-details-marker { display: none; }
.lab-stack > .card-news .row { display: flex; gap: 8px; }
/* D1's middle: the press, the help link and More on one line, the plain line under them */
#job-layer.lab-inline .job-bar.lab-press .sum { order: 6; }

/* ---------------------------------------------------------------- P7 (c): To and Cc on the client card's Edit here */
.cx-edit-lrow { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; }
.cx-edit-line { width: 100%; box-sizing: border-box; padding: 6px 10px; min-height: 36px; border-radius: 10px; border: 1px solid var(--edge-strong);
  background: var(--solid); color: var(--ink); font: inherit; font-size: .875rem; }
.cx-edit-line:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

/* ---------------------------------------------------------------- 149d (1): the files of an email that came in */
.lab-files { list-style: none; margin: 0; padding: 0 16px 10px; display: grid; gap: 6px; font-family: var(--lab-mail); }
.lab-file { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: .82rem; color: #222; }
.lab-ft { flex: none; font-family: var(--font); font-size: .62rem; font-weight: 800; color: #fff; border-radius: 4px; padding: 2px 5px; background: var(--danger, #B3261E); }
.lab-ft.is-img { background: var(--lab-oneoff); }
.lab-ft.is-doc { background: var(--lab-admin); }
.lab-file-n { font-weight: 600; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.lab-file-sz { color: #777; }
.lab-file-dl, .lab-file-wd { font-size: .78rem; color: var(--ink-2); }
/* 149d (3): a staff task's own controls under its row (D3) or in its card (D1) */
.b149-askbox { margin: -2px 0 4px; padding: 8px 10px; border-radius: 12px; background: var(--solid-2, #F4F6F2); border: 1px solid rgba(27,27,27,.10); }
.b149-askbox > * { margin: 0; }
.b149-mini.is-ask .b149-mini-ask { display: block; }
/* 149d (2): Send a new contract on the open lead job */
.lux-rs { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 7%, var(--solid, #fff)); box-shadow: inset 3px 0 0 var(--warn); }
.lux-rs-line { margin: 0; font-size: .875rem; }
.lux-rs-btn { justify-self: start; }
.lux-rs-err { margin: 0; font-size: .8125rem; color: var(--danger); }
.lux-rs-ask { display: grid; gap: 8px; padding: 4px; }
.lux-rs-q { margin: 0; font-weight: 600; }
.lux-rs-ask .row { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------------------------------------------------------------- PAGEWRAP (23 Oct, Jonty on Brandon Cherry's reminder:
   "i cant see the whole question as it goes off screen and doesnt allow me to scroll over"; the Director's screen on
   Scott Raine's: the headline, the ONE QUESTION line and the second choice cut off at the right). The card's one column
   was an auto track, so the press button's long words (a .btn never wraps) made it as wide as that line, and the
   card's overflow: clip cut everything off at the right with no way to scroll. Now the column is the card's width and
   every long line wraps (long words such as an email address break); buttons grow down, never sideways. The question,
   choice and You need to rules for both layouts: styles21_plainacts.css (PAGEWRAP). */
.lab-card { grid-template-columns: minmax(0, 1fr); }
.lab-card > *, .lab-head > *, .lab-stack > * { min-width: 0; max-width: 100%; }
.lab-head .lab-what, .lab-head .lab-client, .lab-head .lab-long, .lab-head .lab-note, .lab-band-t { overflow-wrap: anywhere; }
.job-bar.lab-press #send-btn, .job-bar.lab-press #takeover-btn { white-space: normal; min-width: 0; max-width: 100%; height: auto;
  line-height: 1.3; padding-top: 10px; padding-bottom: 10px; text-align: left; }
.job-bar.lab-press #send-btn > span, .job-bar.lab-press #takeover-btn > span { min-width: 0; overflow-wrap: anywhere; }
.job-bar.lab-press > *, .job-bar.lab-press .sum, .job-bar.lab-press .sum * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.lab-inmail, .lab-mxb, .lab-mxb .came-timer, .lab-mxb .came-follow, .lab-mxb .came-text { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
/* a fold's one line preview (the words are in full inside the fold) takes up to two lines and drops under the fold's
   name when the card is narrow, instead of shrinking to a few letters */
details.lab-fold > summary { flex-wrap: wrap; row-gap: 2px; }
.lab-fold-s { flex: 1 1 220px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
