/* Champion HQ: on top of the Office stylesheet. Entity switcher, buckets, cards. */
.shell { grid-template-rows: auto auto 1fr; } /* top bar, entity bar, then the page takes the rest */
.ent-bar a { align-self: start; }
.ent-bar { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 22px 0; }
.ent-bar a { display: inline-flex; align-items: center; min-height: var(--ctl-sm); font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--hair-2); background: var(--sheet); }
.ent-bar a.on { color: #fff; border-color: transparent; }
.ent-bar .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.cards .stat.link { cursor: pointer; }
/* everything connects (1 Nov 2026): a figure is a real link or button that opens what it counts */
a.stat, button.stat { display: block; color: inherit; text-decoration: none; font: inherit; text-align: left; width: 100%; cursor: pointer; }
a.stat:focus-visible, button.stat:focus-visible, .ov-bar:focus-visible { outline: 2px solid var(--accent, #D97757); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { a.stat:hover, button.stat:hover { border-color: var(--line-2, #c9d2dc); } a.stat:hover b, button.stat:hover b { text-decoration: underline; text-underline-offset: 3px; } }
a.ov-bar { text-decoration: none; color: inherit; }
.ov-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 12px; font-size: 13px; }
.ov-foot h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.ov-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.ov-foot a { color: inherit; }
.ov-ask { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--hair, #d6dde5); border-radius: 8px; }
.ov-ask .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }
.ov-ask .row .who { flex: 1; min-width: 160px; }
@media (max-width: 700px) { .ov-foot { grid-template-columns: 1fr; } }
/* filtered lists: the trail back and the filter chip */
.trail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; margin: -6px 0 10px; }
.trail a { color: var(--text-2, #475569); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .trail a:hover { text-decoration: underline; } }
.trail .sep { color: var(--text-3, #94a3b8); }
.trail .here { font-weight: 600; }
.fbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: var(--pill-h, 24px); padding: 0 4px 0 10px; border-radius: 6px; background: var(--info-bg, #e7eefb); color: var(--info, #1f4a8a); font-size: 12px; font-weight: 700; }
.fchip a, .fchip button { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: inherit; text-decoration: none; border: 0; background: transparent; font: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .fchip a:hover { background: rgba(0,0,0,.08); } }
tr.won td:first-child { box-shadow: inset 3px 0 0 var(--ok, #2f7d4f); }
.drill-sum { color: var(--text-2, #475569); font-size: 13px; }
.drill-group h3 { display: flex; gap: 8px; align-items: baseline; margin: 16px 0 6px; }
.drill-group h3 a { font-size: 12px; font-weight: 600; }
.src { font-size: 11px; color: var(--muted, #5b6672); }
.verified { color: #1f5f3a; font-weight: 600; }
.unverified { color: #7a4e00; font-weight: 600; }
table.list.small td { padding: 6px 8px; }
.sec h3 { margin: 0 0 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; font-size: 13px; }
.kv b { color: var(--muted, #5b6672); font-weight: 600; }
.flags li { margin: 2px 0; }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, 1fr); } .kv { grid-template-columns: 1fr; } }

/* Ask */
.thread { display: flex; flex-direction: column; gap: 10px; min-height: 240px; max-height: 58vh; overflow: auto; padding: 14px; background: var(--sheet); border: 1px solid var(--hair); border-radius: 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 10px; white-space: pre-wrap; line-height: 1.45; font-size: 14px; }
.msg.me { align-self: flex-end; background: var(--navy, #143c5d); color: #fff; }
.msg.claude { align-self: flex-start; background: var(--sheet-2); color: var(--text); border: 1px solid var(--hair); }
.msg.tool { align-self: flex-start; background: transparent; color: var(--muted, #5b6672); font-size: 12px; padding: 2px 6px; }
.msg.draft { align-self: flex-start; background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); max-width: 92%; }
.approve { align-self: flex-start; background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 10px; padding: 10px 14px; max-width: 92%; font-size: 14px; }
.approve .bar { margin-top: 8px; }
.askbar { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }
.askbar textarea { flex: 1; resize: vertical; min-height: 44px; }
.askbar .col { display: flex; flex-direction: column; gap: 6px; }

/* Banking */
.bank-tiles .bank-tile { cursor: pointer; }
.bank-tiles .bank-tile.on { box-shadow: 0 0 0 2px var(--navy) inset; }
.bank-list .nowrap { white-space: nowrap; }
.bank-list td.r .btn + .btn { margin-left: 4px; }
.list td.ok { color: var(--ok); font-weight: 700; }

/* Page view (hq/ui/pageview.mjs): A4 pages on a grey desk, thumbnails left, toolbar in three groups */
.pv { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--pv-canvas); container-type: inline-size; }
.pv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 10px; background: var(--chrome); border-bottom: 1px solid var(--hair); }
.pv-g { display: flex; align-items: center; gap: 6px; }
.pv-centre { flex: 1; justify-content: center; }
.pv-title { font-family: var(--f-ui); font-size: 13px; color: var(--text); white-space: nowrap; }
.pv-status { font-size: 12px; color: var(--text-3); }
.pv-bar select { height: 28px; font-size: 12px; }
.pv-pagectl { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.pv-pagein { width: 38px; height: 26px; text-align: center; font-size: 12px; padding: 0 4px; }
.pv-body { flex: 1; display: flex; min-height: 0; }
.pv-side { position: relative; flex: none; overflow: auto; background: var(--sheet-2); border-right: 1px solid var(--hair); }
.pv-thumbs { display: grid; gap: 10px; padding: 10px; justify-items: center; }
.pv-thumb { display: grid; gap: 4px; justify-items: center; background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 6px; }
.pv-thumb.on { box-shadow: 0 0 0 2px var(--focus); }
.pv-thumb small { font-size: 11px; color: var(--text-3); }
.pv-tpage { display: block; background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow-1); overflow: hidden; }
.pv-tpage canvas { width: 100%; height: 100%; display: block; }
.pv-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }
.pv-canvas { flex: 1; overflow: auto; padding: 32px; min-width: 0; }
.pv-stack { display: grid; gap: 24px; justify-items: center; }
.pv-spread { display: flex; gap: 24px; justify-content: center; }
.pv-sheet { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.pv-sheet .pv-page { cursor: zoom-in; }
.pv-page { position: relative; background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--shadow-2); flex: none; }
.pv-page canvas { display: block; }
.pv-num { position: absolute; right: -28px; bottom: 0; font-size: 11px; color: var(--text-3); }
.pv-reader { max-width: 720px; margin: 0 auto; background: var(--paper); padding: 28px 32px; border: 1px solid var(--hair); box-shadow: var(--shadow-1); font-family: var(--f-read); line-height: 1.55; color: var(--paper-ink); }
.pv-reader h4 { margin: 18px 0 6px; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.pv-reader p { margin: 0 0 4px; }
@media (max-width: 899px) { .pv-side { display: none; } .pv-canvas { padding: 12px; } .pv-num { display: none; } }
@container (max-width: 760px) { .pv-bar .lbl { display: none; } .pv-bar { gap: 6px; } .pv-centre { justify-content: flex-start; } }

/* People and logins */
.people-ents { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.people-ents .cb { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.people-ents .cb input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; flex: none; margin: 0; }
.people-temp { white-space: pre-wrap; background: var(--sheet-2); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 13px; user-select: all; }
/* switches (Settings › People): navy when on, keyboard and touch friendly */
input[type="checkbox"].sw { appearance: none; -webkit-appearance: none; width: 34px; min-width: 34px; height: 20px; border-radius: 10px; background: var(--hair, #cfd8e1); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
input[type="checkbox"].sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
input[type="checkbox"].sw:checked { background: var(--poseidon, #143C5D); } input[type="checkbox"].sw:checked::after { left: 16px; }
.people-ents .cb input[type="checkbox"].sw { width: 34px; min-width: 34px; height: 20px; }
input[type="checkbox"].sw:focus-visible { outline: 2px solid var(--accent, #D97757); outline-offset: 2px; }
.acc-edit .acc-table td:nth-child(2), .acc-edit .acc-table td:nth-child(3) { width: 64px; } .acc-edit tr.mine td:first-child { font-weight: 600; }
.acc-words { background: var(--sheet-2, #f4f6f8); border: 1px solid var(--hair); border-radius: var(--r-ctl, 6px); padding: 8px 10px; font-size: 13px; }
.ck-list { display: flex; flex-wrap: wrap; gap: 4px; }
.inv-frame { width: 100%; height: 520px; border: 1px solid var(--hair); border-radius: var(--r-ctl, 6px); background: #fff; margin: 8px 0; }
.inv-set { margin-top: 12px; } .inv-set summary { cursor: pointer; }

/* Mail with a reading pane (benchmark: list min 320 px, pane min 520 px; right, bottom 45/55, or off) */
.mail-split { display: grid; gap: 0; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); min-height: 560px; height: calc(100vh - 230px); overflow: hidden; }
.mail-split[data-pane="right"] { grid-template-columns: minmax(320px, 400px) minmax(520px, 1fr); }
.mail-split[data-pane="bottom"] { grid-template-rows: 45% 55%; }
.mail-split[data-pane="off"] { grid-template-columns: 1fr; }
.mail-split[data-pane="off"] .mail-read { display: none; }
.mail-split[data-pane="off"][data-reading="1"] .mail-list { display: none; }
.mail-split[data-pane="off"][data-reading="1"] .mail-read { display: flex; }
.mail-list { overflow: auto; min-width: 0; border-right: 1px solid var(--hair); }
.mail-split[data-pane="bottom"] .mail-list { border-right: 0; border-bottom: 1px solid var(--hair); }
.mail-read { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.mail-read > .empty { margin: auto; }
.mail-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--hair); display: grid; gap: 6px; }
.mail-head h2 { margin: 0; font-size: 18px; }
.mail-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mail-acts { flex-wrap: wrap; gap: 6px; }
.mail-meet { font-size: 13px; border: 1px solid var(--hair); border-left: 3px solid var(--poseidon, #143C5D); background: var(--sheet-2); border-radius: var(--r-ctl); padding: 6px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mail-held { font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: var(--r-ctl); padding: 6px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mail-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-att { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hair); background: var(--sheet-2); border-radius: var(--r-ctl); padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--text); }
.mail-att small { color: var(--text-3); }
.mail-body { flex: 1; width: 100%; border: 0; background: var(--paper); min-height: 0; }
.att-pv { height: min(80vh, 900px); }
.att-img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; }
@media (max-width: 899px) { .mail-split[data-pane="right"] { grid-template-columns: 1fr; grid-template-rows: 40% 60%; } }

/* Group structure chart */
.gs-board { overflow-x: auto; }
.gs-chart { width: 100%; min-width: 760px; height: auto; display: block; font-family: var(--f-ui); }
.gs-node rect { fill: var(--sheet); stroke: var(--navy); stroke-width: 1.6; }
.gs-node.gs-entity rect { fill: var(--sheet-2); }
.gs-node.gs-person rect { stroke: var(--or); }
.gs-node.gs-pending rect { stroke-dasharray: 6 5; fill: var(--sheet); opacity: .9; }
.gs-node.gs-winding rect { stroke: var(--text-3); }
.gs-node.gs-entity { cursor: pointer; }
.gs-node:focus rect, .gs-node:hover rect { stroke-width: 2.6; }
.gs-t { font-size: 15px; font-weight: 700; fill: var(--text); }
.gs-s { font-size: 12px; fill: var(--text-2); }
.gs-st { font-size: 11px; fill: var(--text-3); }
.gs-link { fill: none; stroke: var(--navy); stroke-width: 1.8; }
.gs-link.gs-planned { stroke: var(--or); stroke-dasharray: 7 5; }
.gs-link.gs-partner-in { stroke: var(--text-2); }
.gs-arrowhead { fill: var(--navy); }
.gs-label rect { fill: var(--chrome); stroke: var(--hair); }
.gs-label text { font-size: 11.5px; font-weight: 600; fill: var(--text); }
.gs-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.gs-key { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--navy); margin-left: 8px; }
.gs-key.planned { border-top: 2px dashed var(--or); }
.gs-key.pending { height: 10px; border: 1.5px dashed var(--navy); border-radius: 3px; }
.gs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gs-card { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-sheet); padding: 12px 14px; }
.gs-card h3 { margin: 0 0 6px; font-size: 15px; }
.gs-card p { margin: 4px 0; font-size: 13px; }
.gs-card ul { margin: 0; padding-left: 18px; font-size: 13px; }
.gs-status { color: var(--text-2); font-size: 12px; }
.gs-list { padding-left: 18px; font-size: 13px; line-height: 1.5; }
.gs-list li { margin-bottom: 6px; }
.gs-page h2 { margin-top: 26px; }
.gs-node.gs-trust rect { stroke-width: 2.2; }
.gs-node.gs-seat .gs-st { fill: var(--or); }
.gs-link.gs-thin { stroke-width: 1.2; stroke: var(--text-3); }
.gs-today { margin-top: 10px; font-size: 13px; color: var(--text-2); }
/* Group › Structure: set up and still to do (item hq-037) */
.gs-steps, .gs-card .gs-steps { list-style: none; margin: 8px 0 0; padding: 0; }
.gs-step { padding: 7px 0; border-top: 1px solid var(--hair); font-size: 13px; }
.gs-step:first-child { border-top: 0; }
.gs-step-top { display: flex; align-items: flex-start; gap: 8px; }
.gs-step-top input[type=checkbox] { width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.gs-step-t { flex: 1; min-width: 0; font-weight: 600; line-height: 1.4; }
.gs-who { font-weight: 400; color: var(--text-2); white-space: nowrap; }
.gs-step.gs-done .gs-step-t { color: var(--text-2); }
.gs-step-n { margin: 3px 0 0; color: var(--text-2); }
.gs-src { margin-top: 3px; font-size: 11.5px; color: var(--text-3); overflow-wrap: anywhere; }
.gs-chip { flex: none; }
.gs-tally { font-size: 12px; color: var(--text-2); font-weight: 600; }
.gs-more { margin-top: 8px; font-size: 13px; }
.gs-more summary { cursor: pointer; color: var(--text-2); }
.gs-pb { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.gs-logins td, .gs-logins th { text-align: left; }
@media (max-width: 700px) { .gs-pb, .gs-grid { grid-template-columns: 1fr; } .gs-step-top input[type=checkbox] { width: 22px; height: 22px; } }
/* mail: file an attachment to the records */
.mail-att-wrap { display: inline-flex; align-items: stretch; }
.mail-att-wrap .mail-att { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.mail-att-file { border: 1px solid var(--hair); border-left: 0; background: var(--sheet-2); color: var(--text-2); padding: 0 8px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; cursor: pointer; }
.mail-att-file:focus-visible { color: var(--text); background: var(--sheet); } @media (hover: hover) and (pointer: fine) { .mail-att-file:hover { color: var(--text); background: var(--sheet); } }
/* Documents and the Needed list */
.docs-page .bar .tabs { margin: 0; border-bottom: 0; }
.docs-page .panel + .panel { margin-top: 12px; }
.dn-sec { margin: 0; padding: 10px 14px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.docs-page table.list td.r .btn + .btn { margin-left: 4px; }
.docs-page tr.drop td { background: color-mix(in srgb, var(--accent, #D97757) 12%, transparent); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink-600); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-align: left; font: inherit; }
@media (hover: hover) and (pointer: fine) { .linkbtn:hover { text-decoration: underline; } }
:root[data-theme="dark"] .linkbtn { color: var(--info); }
.dn-status { height: 28px; padding: 0 8px; font-size: 12px; font-weight: 700; border: 1px solid var(--hair); max-width: 150px; }
.dn-status.s-needed { background: var(--warn-bg); color: var(--warn); } .dn-status.s-redo { background: var(--danger-bg); color: var(--danger); }
.dn-status.s-received { background: var(--info-bg); color: var(--info); } .dn-status.s-done { background: var(--ok-bg); color: var(--ok); }
.dn-name { word-break: break-all; }
/* Routine on Today */
.rt-nums { margin-bottom: 12px; }
.rt .bar { gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.rt-col { border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--sheet); }
.rt-col.all { background: var(--ok-bg); }
.rt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rt-list li { display: flex; align-items: flex-start; gap: 6px; }
.rt-list label { display: flex; gap: 8px; align-items: flex-start; flex: 1; cursor: pointer; font-size: 14px; line-height: 1.35; padding: 3px 0; }
.rt-list input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 1px 0 0; padding: 0; flex: none; }
.rt-list li.done label span { color: var(--text-3); text-decoration: line-through; }
.rt-go { flex: none; min-width: 26px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); text-decoration: none; font: 700 12px/1 var(--f-ui); }
.rt-go.n { background: var(--warn-bg); color: var(--warn); padding: 0 7px; }
@media (hover: hover) and (pointer: fine) { .rt-go:hover { background: var(--info-bg); color: var(--info); } }
/* Claude sidebar (⌘J): a third column of the app, kept across pages */
.app[data-side="open"] { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--side-w, 420px); grid-template-areas: "gbar gbar gbar" "rail work side" "sbar sbar sbar"; }
.app[data-side="open"][data-rail="icons"] { grid-template-columns: var(--rail-fold) minmax(0, 1fr) var(--side-w, 420px); }
.cside { grid-area: side; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--sheet); border-left: 1px solid var(--hair); }
.cs-grip { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 3; }
@media (hover: hover) and (pointer: fine) { .cs-grip:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); } }
.cs-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--hair); font-size: 14px; }
.cs-head .ic { color: var(--accent); }
.cs-ctx { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12px; border-bottom: 1px solid var(--hair); white-space: nowrap; min-width: 0; cursor: pointer; }
.cs-ctx .t { overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.cs-ctx input { margin: 0; }
.cs-body { flex: 1; min-height: 0; display: flex; }
.cs-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 8px 10px 6px; gap: 8px; }
.cs-tools { display: flex; align-items: center; gap: 6px; }
.cs-chat .thread { flex: 1; min-height: 0; max-height: none; padding: 10px; }
.cs-chat .msg { max-width: 92%; font-size: 13.5px; padding: 8px 11px; }
.cs-chat .askbar { margin-top: 0; gap: 6px; }
.cs-chat .askbar textarea { min-height: 64px; font-size: 14px; }
.cs-chat .askbar .btn { padding: 0 9px; }
.cs-status { font-size: 11px; color: var(--text-3); padding: 0 2px; }
.cs-empty { color: var(--text-2); font-size: 13px; padding: 4px 2px; }
.cs-empty ul { margin: 8px 0 0; padding-left: 16px; display: grid; gap: 4px; }
.btn.mic { position: relative; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.btn.mic.on { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); animation: mic-pulse 1.4s ease-in-out infinite; }
.btn.mic.busy { opacity: .65; cursor: progress; }
.btn.mic .mic-level { position: absolute; left: 5px; right: 5px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--danger); transform: scaleX(var(--lvl, 0)); transform-origin: left; transition: transform 70ms linear; pointer-events: none; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); } }
.gbar .ib.side-btn.on { background: var(--info-bg); }
.chat-page .thread { min-height: 320px; }
@media (max-width: 899px) {
  .app[data-side="open"], .app[data-side="open"][data-rail="icons"] { grid-template-columns: 1fr; grid-template-areas: "gbar" "work" "sbar"; }
  .cside { position: fixed; left: 0; right: 0; bottom: 0; height: 78vh; z-index: 60; border-left: 0; border-top: 1px solid var(--hair); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
  .cs-grip { display: none; }
}
.rem-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
/* reminders (Sean, 8 Nov 2026: the yellow banners looked bad): plain rows with a hairline between them; a due one has an amber
   edge and an amber time, never a coloured block; yellow stays for money in */
.rem-list li { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 0; border-bottom: 1px solid var(--hair); }
.rem-list li:last-child { border-bottom: 0; }
.rem-list li.due { background: transparent; box-shadow: none; } /* no tint at all (Sean, 8 Nov 2026: "never brown!!!") */
.rem-list .when { flex: none; width: 140px; font: 600 12px/1.3 var(--f-ui); color: var(--text-2); }
.rem-list li.due .when { color: var(--paperbark); font-weight: 700; }
.rem-list .t { flex: 1; min-width: 0; }
.cs-head .ib { width: 28px; height: 28px; border: 0; background: transparent; border-radius: var(--r-ctl); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); cursor: pointer; padding: 0; }
.cs-head .ib:focus-visible { background: var(--sheet-2); color: var(--text); } @media (hover: hover) and (pointer: fine) { .cs-head .ib:hover { background: var(--sheet-2); color: var(--text); } }
.cs-tools .btn.small { padding: 0 8px; }
/* tablet portrait (iPad 768, small-screen check 31 Oct 2026): the top bar was 773 px wide, so every page scrolled sideways
   by 5 px and the search shrank to "F…". The account keeps its initials (the name is in its menu), the shortcut key goes,
   and the one column never grows past the window. */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .gbar { min-width: 0; }
  .gbar .acct .t, .gbar .acct > .ic, .gbar .ksearch kbd { display: none !important; }
}
/* phone: the top bar fits the screen (otherwise the phone zooms the whole page out) */
@media (max-width: 640px) {
  .gbar { min-width: 0; overflow: hidden; }
  .gbar .wide-only, .gbar .mark .t, .gbar .crumb, .gbar .acct .t, .gbar .ksearch .t, .gbar .ksearch kbd { display: none !important; }
  .gbar .ksearch { min-width: 0; width: auto; padding: 0 8px; }
}
/* Plotter cut window: preview left, inspector right (LightBurn / CM5 layout) */
.plot-page .page, .plot-page { max-width: none; }
.plot-app { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.pw { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pw-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pw-name { font-size: 14px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plot-wrap { height: min(66vh, 720px); min-height: 360px; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--ground); overflow: hidden; }
.plot-wrap.drop { outline: 2px dashed var(--accent); }
.pw-stats { display: flex; gap: 18px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--hair); border-radius: var(--r-ctl); background: var(--sheet); }
.pw-stats span { display: flex; flex-direction: column; } .pw-stats small { color: var(--text-3); font-size: 11px; }
.pi { position: sticky; top: 0; max-height: calc(100vh - 140px); overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.pi-sect { border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); padding: 10px 12px; display: grid; gap: 8px; }
.pi-sect h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.pi-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pi-row select { flex: 1; min-width: 0; }
.pi-l { font-size: 12px; color: var(--text-2); }
.pi-grid { display: grid; grid-template-columns: auto auto auto auto; gap: 6px 8px; align-items: center; }
.cl { display: grid; gap: 6px; }
.cl-row { display: grid; grid-template-columns: auto 16px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.cl-row.off { opacity: .55; }
.cl-row .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--hair); }
.cl-t { display: flex; flex-direction: column; min-width: 0; } .cl-t small { color: var(--text-3); font-size: 11px; }
.cl-row select { height: 28px; font-size: 12px; }
.cl-ord { display: flex; } .cl-ord .ib { width: 22px; height: 22px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); padding: 0; }
.cl-perf { grid-column: 3 / -1; display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
.cl-row > .btn { grid-column: 3 / -1; justify-self: start; }
@media (max-width: 1100px) { .plot-app { grid-template-columns: 1fr; } .pi { position: static; max-height: none; } }
/* a dialog beside the page (no backdrop) for tools with a live preview on the artboard */
.modal.side { background: transparent; pointer-events: none; place-items: start end; padding: 96px 340px 20px 20px; }
.modal.side .dlg { pointer-events: auto; width: min(440px, 92vw); box-shadow: 0 12px 40px rgba(0, 0, 0, .28); }
@media (max-width: 900px) { .modal.side { padding: 20px; place-items: end center; } }
.pb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-range { flex: 1; min-width: 160px; accent-color: var(--accent); }
/* Timesheets: the clock card, the week grid, the entries (office/ui/timesheets.mjs) */
.ts-clock { display: grid; gap: 12px; }
.ts-state { display: flex; align-items: center; gap: 8px; }
.ts-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.ts-dot.off { background: var(--text-3); box-shadow: none; }
.ts-clock.brk .ts-dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.ts-timer { font: 600 52px/1 var(--f-ui); letter-spacing: -.02em; color: var(--text); }
.ts-clock.brk .ts-timer { color: var(--text-3); }
.ts-what { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.ts-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.big { height: 44px; padding: 0 18px; font-size: 15px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.ts-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-kinds button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet); color: var(--text-2); font: 600 13px var(--f-ui); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ts-kinds button:hover { color: var(--text); border-color: var(--ink-300); } }
.ts-kinds button.on { background: var(--poseidon); border-color: var(--poseidon); color: #fff; }
.ts-target { display: grid; gap: 8px; }
.ts-kindhint { margin: 0; }
.ts-gridwrap { overflow-x: auto; }
.ts-grid { min-width: 640px; }
.ts-grid th.today, .ts-grid td.today { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ts-grid td.ts-cell { cursor: pointer; min-width: 52px; }
.ts-grid td.ts-cell:hover, .ts-grid td.ts-cell:focus { outline: 2px solid var(--focus); outline-offset: -2px; }
.ts-grid td.ts-cell.billed { color: var(--text-3); }
.ts-grid tfoot td { font-weight: 600; border-top: 1px solid var(--hair-2); }
.ts-day h3 { margin: 14px 0 6px; }
.ts-entries tr { cursor: pointer; } .ts-entries tr.billed { color: var(--text-2); }
.ts-prev .list td { vertical-align: top; }
/* the running clock in the global bar */
.gbar .clockpill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 15px; background: rgba(79, 192, 141, .16); border: 1px solid rgba(79, 192, 141, .45); color: #fff; font: 600 13px var(--f-ui); text-decoration: none; white-space: nowrap; }
.gbar .clockpill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4fc08d; animation: tspulse 2s ease-in-out infinite; }
.gbar .clockpill.brk { background: rgba(242, 196, 27, .14); border-color: rgba(242, 196, 27, .45); } .gbar .clockpill.brk .dot { background: #f2c41b; animation: none; }
.gbar .clockpill .t { max-width: 140px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-200); font-weight: 500; }
@keyframes tspulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .gbar .clockpill .dot { animation: none; } }
/* receipts: the camera button, the flattened copy, the lines read */
.drop .snap { justify-self: center; margin-top: 6px; }
.rc-pic img { max-width: 100%; }
.rc-items summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
@media (max-width: 640px) {
  .ts-timer { font-size: 44px; }
  .ts-acts .btn.big { flex: 1 1 100%; justify-content: center; }
  .gbar .clockpill .t { display: none; }
}
.rc-mail { margin: 10px 0 0; align-items: center; }
.rc-mail .hint.grow { flex: 1 1 260px; }
/* Company (hq/ui/company.mjs) */
.co-page .tabs { margin-bottom: 12px; }
.co-solv td:first-child { width: 100%; }
.co-laws td:first-child { max-width: 640px; }
tr.muted td { color: var(--text-3); }
/* Payroll (hq/ui/payroll.mjs) */
.pay-steps { margin: 0 0 8px 18px; padding: 0; display: grid; gap: 6px; }
.pay-line { padding: 12px 14px; margin-bottom: 10px; }
.pay-fig { height: 36px; display: flex; align-items: center; }
/* Who paid what (hq/ui/whopays.mjs): dense rows, one control height, the whole tick cell is the touch target */
.wp-scroll { overflow-x: auto; }
.wp-table td { vertical-align: middle; }
.wp-table td.wp-cb { width: var(--touch); padding: 0; }
.wp-table td.wp-cb label { display: flex; align-items: center; justify-content: center; min-width: var(--touch); min-height: var(--touch); cursor: pointer; }
.wp-table .wp-sel { min-width: 150px; height: var(--ctl); }
.wp-table td.wp-what { min-width: 220px; } .wp-table td.wp-eff { min-width: 180px; font-size: 12.5px; }
.wp-table tr.wp-done td { color: var(--text-2); }
.wp-month { min-width: 130px; text-align: center; }
.wp-table td.wp-nw { white-space: nowrap; }
.wp-table .wp-why { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-flip { transform: scaleX(-1); }
@media (max-width: 760px) { .wp-table .wp-sel { min-width: 120px; } }
tr.late td { color: var(--danger); }
/* Phones: a wide table scrolls sideways inside its panel instead of widening the page (polish pass, 27 Oct 2026) */
@media (max-width: 640px) {
  #main table.list, #main table.lines { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #main table.list th, #main table.list td { white-space: nowrap; }
  #main table.list td .hint { white-space: normal; min-width: 160px; }
}
#main select { max-width: 100%; }
.rc-dest { flex-wrap: wrap; }
.kv > * { min-width: 0; overflow-wrap: anywhere; }
.odo-row { display: flex; gap: 8px; flex-wrap: wrap; } .odo-row input { flex: 1 1 140px; min-width: 0; }
.trip-auto summary { cursor: pointer; } .trip-auto ol { margin: 6px 0 0 18px; padding: 0; display: grid; gap: 4px; }
/* Vehicles (Records › Vehicles) */
.veh-crumbs { font-size: 13px; color: var(--text-2); margin-bottom: 8px; } .veh-crumbs a { color: var(--text-2); text-decoration: none; } @media (hover: hover) and (pointer: fine) { .veh-crumbs a:hover { color: var(--text); } }
.plate { display: inline-block; margin-left: 8px; padding: 1px 7px; border: 1.5px solid var(--navy); border-radius: 4px; font: 700 12px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .06em; color: var(--navy); background: var(--sheet); vertical-align: 2px; }
:root[data-theme="dark"] .plate { border-color: var(--text-2); color: var(--text); }
.plate.big { font-size: 15px; padding: 2px 9px; vertical-align: 4px; }
.veh-chip { text-transform: none !important; font-weight: 600; }
.veh-list .veh-ic, .list .veh-ic { width: 34px; color: var(--navy); } .veh-list .ic { width: 20px; height: 20px; }
.veh-sold td { opacity: .55; } .veh-warn { margin-left: 6px; color: var(--accent); vertical-align: -2px; }
.veh-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.veh-photo { width: 132px; height: 92px; border-radius: 10px; object-fit: cover; border: 1px solid var(--hair); background: var(--sheet-2); }
.veh-noph { display: grid; place-items: center; color: var(--text-3); } .veh-noph .ic { width: 44px; height: 44px; }
.veh-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); align-items: center; }
.veh-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; max-width: 100%; }
.veh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin: 12px 0; } .veh-grid .panel { margin: 0; }
.veh-kv { grid-template-columns: minmax(120px, 44%) 1fr; margin: 8px 0 0; } .veh-kv dt { color: var(--text-2); } .veh-kv dd { margin: 0; }
.veh-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .veh-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.veh-checks li.warn .ic { color: var(--accent); } .veh-checks li.info .ic { color: var(--navy); } .veh-checks li .ic { flex: none; margin-top: 2px; }
.veh-form .veh-sec { border: 1px solid var(--hair); border-radius: 8px; padding: 6px 12px; margin: 8px 0; } .veh-form .veh-sec summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
@media (max-width: 700px) { .veh-photo { width: 96px; height: 68px; } .veh-grid { grid-template-columns: 1fr; } .veh-list td:nth-child(3), .veh-list th:nth-child(3), .veh-list td:nth-child(7), .veh-list th:nth-child(7) { display: none; } }
.veh-name { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--text); letter-spacing: -0.01em; } .veh-name .plate { margin-left: 10px; }
.veh-fuel { margin-top: 10px; } .veh-fuel summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
/* Year-end (Money › Year-end) */
.ye-fy { display: inline-flex; align-items: center; gap: 4px; } .ye-fy b { font-size: 15px; padding: 0 4px; }
.ye-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } .ye-card { cursor: pointer; margin: 0; } @media (hover: hover) and (pointer: fine) { .ye-card:hover { border-color: var(--hair-2); } }
.ye-prog { height: 6px; border-radius: 3px; background: var(--hair); overflow: hidden; margin-top: 8px; } .ye-prog > div { height: 100%; background: var(--navy); border-radius: 3px; }
.ye-chip { text-transform: none !important; font-weight: 600; }
.ye-step { border-top: 1px solid var(--hair); padding: 10px 0; } .ye-step:first-of-type { border-top: 0; }
.ye-step-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .ye-step p { margin: 4px 0 6px; color: var(--text-2); font-size: 13.5px; }
.ye-step.done b, .ye-step.na b { color: var(--text-2); } .ye-step.na b { text-decoration: line-through; }
.ye-step-f { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.ye-src { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-size: 12.5px; } @media (hover: hover) and (pointer: fine) { .ye-src:hover { color: var(--text); text-decoration: underline; } }
.ye-src-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ye-fix { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .ye-fix li { display: flex; gap: 8px; align-items: center; } .ye-fix li.warn > .ic { color: var(--accent); } .ye-fix li.info > .ic { color: var(--navy); }
/* Accounts (Money › Accounts) */
.acc-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); } .acc-date input { width: auto; }
.acc-table td { vertical-align: top; } .acc-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.acc-head td { font-weight: 700; color: var(--navy); background: var(--sheet-2); padding-top: 10px; cursor: default; }
.acc-total td { font-weight: 600; border-top: 1px solid var(--hair-2); cursor: default; } .acc-grand td { font-weight: 700; border-top: 2px solid var(--navy); cursor: default; }
.acc-lab { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.acc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .acc-checks li { display: flex; gap: 10px; align-items: flex-start; } .acc-checks li.ok > .ic { color: #2f7d55; } .acc-checks li.warn > .ic { color: var(--accent); } .acc-checks li > .ic { margin-top: 2px; flex: none; }
.acc-jline { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; } .acc-jline select { flex: 2 1 220px; } .acc-jline input { flex: 1 1 100px; min-width: 0; }
.warnbox.link { cursor: pointer; }
.bank-cat { margin-left: 0; margin-top: 3px; font-weight: 600; text-transform: none !important; font-size: 11px; background: var(--sheet-2); color: var(--text-2); }
.bank-bulk { position: sticky; top: 0; z-index: 2; background: var(--sheet); padding: 8px 12px; border-bottom: 1px solid var(--hair); gap: 6px; flex-wrap: wrap; }
.bank-list tr.sel td { background: color-mix(in srgb, var(--navy) 7%, transparent); }
/* 24-hour time boxes: type 1730 → 17:30 */
input.time-in { font-variant-numeric: tabular-nums; } input.time-in.bad { border-color: var(--danger, #b3261e) !important; box-shadow: 0 0 0 2px rgba(179, 38, 30, .15); }
.m365-accts { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; } .m365-accts li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

/* ---- Work › Inbox and the job timeline (job workspace step 1) */
.inbox-read { overflow: auto; }
.inbox-link { padding: 12px 16px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); display: flex; flex-direction: column; gap: 10px; }
.inbox-sugg { padding: 10px 12px; border: 1px solid var(--hair); border-left: 3px solid var(--warn, #c98a12); border-radius: var(--r-ctl); background: var(--sheet); display: flex; flex-direction: column; gap: 6px; }
.inbox-sugg.ok { border-left-color: var(--ok); }
.inbox-sugg .bar, .inbox-more { margin: 0; gap: 6px; flex-wrap: wrap; }
.inbox-form summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.inbox-form .f { margin-top: 8px; }
.inbox-hits { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.inbox-msg { display: flex; flex-direction: column; min-height: 420px; flex: 1; }
.inbox-msg .mail-body { flex: 1; min-height: 420px; }
.tl-row { display: grid; grid-template-columns: 22px 150px 1fr auto; gap: 10px; align-items: start; padding: 8px 4px; border-top: 1px solid var(--hair); font-size: 13px; }
.tl-row:first-child { border-top: 0; }
.tl-row.link { cursor: pointer; } @media (hover: hover) and (pointer: fine) { .tl-row.link:hover { background: var(--sheet-2); } }
.tl-when { color: var(--text-3); font-variant-numeric: tabular-nums; }
.tl-email .tl-ic, .tl-enquiry .tl-ic { color: var(--accent, #D97757); }
@media (max-width: 700px) { .tl-row { grid-template-columns: 22px 1fr; } .tl-when, .tl-type { grid-column: 2; } }
.mail-split.inbox-split[data-pane="right"] { grid-template-columns: minmax(460px, 1fr) minmax(480px, 1.15fr); }
.hint.warn { color: var(--warn); }
.notes-add input[type="text"] { flex: 1; min-width: 260px; }
/* ---- job photos (group/photos.mjs) */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.ph-tile { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid var(--hair); border-radius: var(--r-ctl); background: var(--sheet); overflow: hidden; cursor: zoom-in; text-align: left; }
.ph-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--sheet-2); }
.ph-tile small { padding: 0 6px 6px; color: var(--text-3); font-size: 11px; }
.ph-tile.sm { width: 96px; } .ph-tile.sm small { display: none; }
.ph-tile.pick { cursor: default; } .ph-tile.pick small { display: flex; align-items: center; gap: 4px; }
.panel.needs { border-left: 3px solid var(--accent); }
.need { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--hair); }
.need:first-of-type { border-top: 0; } .need .btn { flex: none; }
@media (max-width: 640px) { .need { flex-wrap: wrap; } .need .btn { white-space: normal; } }
/* ---- Jobs map (hq/ui/map.mjs) */
.jobmap-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; height: calc(100vh - 170px); min-height: 520px; }
.jobmap { border: 1px solid var(--hair); border-radius: var(--r-sheet); overflow: hidden; min-height: 420px; background: var(--sheet-2); }
.jobmap-side { overflow: auto; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); padding: 10px; }
.jm-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px 4px; border-top: 1px solid var(--hair); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .jm-row:hover { background: var(--sheet-2); } }
.jm-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.jm-txt { flex: 1; min-width: 0; font-size: 13px; } .jm-acts { display: flex; gap: 4px; flex: none; }
.jm-unpinned summary { cursor: pointer; padding: 8px 4px; font-weight: 600; font-size: 13px; }
.jm-pin { background: transparent; border: 0; }
.jm-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.jm-pin span { color: #fff; font: 700 12px/1 system-ui, sans-serif; } .jm-pin span::after { content: ''; }
.jm-pin.home span { background: #143C5D; }
.jm-pin.jm-booked span { background: var(--poseidon, #143C5D); } .jm-pin.jm-active span { background: var(--accent); outline: 3px solid rgba(217,119,87,.35); } .jm-pin.jm-done span { background: #5A6779; }
.jm-pin span i { transform: rotate(45deg); font-style: normal; }
.jm-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.jm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); } .jm-dot.jm-booked { background: var(--poseidon, #143C5D); } .jm-dot.jm-done { background: #5A6779; } .jm-dot.jm-open { background: var(--accent); opacity: .65; }
.jm-pop { font-size: 13px; min-width: 200px; }
@media (max-width: 900px) { .jobmap-wrap { grid-template-columns: 1fr; grid-template-rows: 60vh auto; height: auto; } .jobmap { min-height: 60vh; } }
.jm-arrive { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--accent); border-left: 4px solid var(--accent); border-radius: var(--r-ctl); background: var(--sheet-2); }
/* ---- the client page (office/ui/pages.mjs clientPage) */
.cl-actions { flex-wrap: wrap; gap: 6px; }
.plan-page { display: flex; flex-direction: column; height: 100%; padding: 8px 12px 0; box-sizing: border-box; }
.plan-bar { flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
/* the editor takes the room left under the bar, whatever the window (Sean, 31 Oct 2026: "the map gets cut off depending on
   the size"): the old 100vh - 190px pushed its foot, with Fit and the view bar, below the window when the bar took three rows */
.plan-frame { flex: 1 1 auto; width: 100%; min-height: 360px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.plan-tools { display: contents; } .plan-more { display: none; }
.plan-menu { display: grid; gap: 8px; } .plan-menu .btn { justify-content: flex-start; min-height: 48px; font-size: 16px; }
.plan-rm { display: grid; gap: 6px; } .plan-rm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.cap-removed { margin-top: 10px; } .cap-row.is-removed { opacity: .75; }
/* Measure and plan's home (Sean, 30 Oct 2026: "scan new job straight up, not having to search"): New job scan first, big;
   then the plans to carry on with; Delete plan and Start again ask first (askDanger) and Delete has 10 s of Undo */
.plan-home { max-width: 640px; }
.btn.nj-big { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 18px; margin: 4px 0 18px; justify-content: flex-start; text-align: left; font-size: 17px; }
.btn.nj-big .ic { width: 28px; height: 28px; } .nj-big span { display: flex; flex-direction: column; gap: 2px; } .nj-big small { font-weight: 400; opacity: .85; font-size: 13px; }
.plan-home h2 { margin: 0 0 8px; } .plan-home input[type=search] { width: 100%; min-height: 40px; margin-bottom: 8px; }
.pl-list { display: grid; gap: 6px; }
.pl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-ctl); background: var(--sheet); color: inherit; text-align: left; font: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pl-row:hover { background: var(--sheet-2); } } .pl-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; } .pl-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nj .f input:not([type=search]) { width: 100%; } .nj input[type=search] { width: 100%; margin-bottom: 6px; }
.nj-chips { display: flex; flex-wrap: wrap; gap: 6px; } .nj-chips .pill { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; } .nj-chips .pill:not(.on) { border-color: var(--hair); background: var(--sheet); color: inherit; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; } .btn.danger-text { color: var(--danger); }
.undo-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 75; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: var(--r-ctl); background: var(--ink-800); color: #fff; box-shadow: var(--shadow-3); font: 500 14px/1.4 var(--f-ui); max-width: calc(100vw - 32px); }
.undo-bar .btn { min-height: 36px; }
/* Measure and plan on a phone (Sean's notes, 30 Oct 2026: "Phone needs to be less fiddly"): one row with the project and a
   big Tools button; every tool in that menu at full width; the drawing gets the rest of the screen */
@media (max-width: 760px) {
  .plan-page { padding: 6px 6px 0; }
  .plan-bar { flex-wrap: nowrap; gap: 6px; margin-bottom: 6px; }
  .plan-bar select { flex: 1 1 auto; min-width: 0; min-height: 44px; font-size: 16px; }
  .plan-bar .btn { min-height: 44px; padding: 0 12px; font-size: 15px; }
  .plan-bar .grow { display: none; }
  .plan-tools { display: none; } .plan-more { display: inline-flex; }
  .plan-frame { min-height: 0; flex: 1 1 auto; border-radius: 6px; }
  .app:has(.plan-page) .pbar .ribbon { display: none; } /* the drawing gets the room; the tools are in Tools */
  .plan-bar .plan-new .t { display: none; }
  .plan-bar .plan-home-btn .t { display: none; }
  .btn.nj-big { min-height: 88px; font-size: 19px; } .pl-row { min-height: 56px; }
  .undo-bar { bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100vw - 32px); justify-content: space-between; }
  .cap-row { flex-wrap: wrap; } .cap-row .btn { min-height: 44px; }
}
.cl-ask textarea { width: 100%; margin-top: 6px; resize: vertical; }
.cl-cards { display: grid; gap: 6px; }
.cl-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-ctl); background: var(--sheet); color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .cl-card:hover { background: var(--sheet-2); } }
/* drop anywhere: the files go to Claude */
body.drop-claude::after { content: 'Drop it: Claude gets it in the sidebar'; position: fixed; inset: 12px; border: 3px dashed var(--accent); border-radius: 14px; background: rgba(217,119,87,.08); display: grid; place-items: center; font: 600 18px/1.3 system-ui, sans-serif; color: var(--accent); pointer-events: none; z-index: 9999; }
/* ---- Overview on Today */
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.ov-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 140px; }
.ov-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.ov-bar i { display: block; width: 100%; min-height: 2px; background: var(--navy, #143C5D); border-radius: 3px 3px 0 0; }
.ov-bar small { font-size: 10px; color: var(--text-3); }
.ov table tr { cursor: pointer; }
@media (max-width: 900px) { .ov-grid { grid-template-columns: 1fr; } }
/* ---- Measure */
.ms-room { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 8px 0; border-top: 1px solid var(--hair); }
.ms-room > input { width: 160px; } .ms-room label { display: flex; flex-direction: column; gap: 2px; } .ms-room label input { width: 90px; }
.ms-diagram { color: var(--text); background: var(--sheet-2); border-radius: var(--r-ctl); padding: 10px; } .ms-diagram svg { width: 100%; height: auto; }
/* photo measure (vendor/photomeasure.js) uses Trade Handy's class and colour names: map them to HQ's */
.th-pm { --bg: var(--sheet); --text-body: var(--text); }
.th-pm .btn-g { background: var(--sheet); } .th-pm .btn-p { background: var(--accent); color: #fff; border-color: var(--accent); } .th-pm .btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.check-row { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input { flex: none; }

/* ---- application layout (28 Oct 2026, "a real application software program"): split view, toolbar, record tabs ---- */
.tbar { display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tbar::-webkit-scrollbar { display: none; }
.tgroup { display: flex; gap: 2px; padding: 0 8px; border-left: 1px solid var(--hair); }
.tgroup:first-child { border-left: 0; padding-left: 0; }
.tbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 58px; height: 46px; padding: 3px 6px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--text); font: 500 11px/13px var(--f-ui); cursor: pointer; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .tbtn:hover { background: var(--sheet-2); } }
.tbtn:active { background: var(--hair); }
.tbtn.prime { color: var(--info); }
.tbtn.prime span { font-weight: 650; }
/* the document editor's one primary verb (declutter, 8 Nov 2026): orange like every primary button; the arrow beside it
   holds the other ways to send it; More holds every other verb */
.tbtn.primary { background: var(--accent); color: #fff; padding: 3px 14px; }
.tbtn.primary span { font-weight: 650; }
.tbtn.primary:active { filter: brightness(.94); }
@media (hover: hover) and (pointer: fine) { .tbtn.primary:hover { background: var(--accent-2, var(--accent)); } }
.tbtn.arrow { min-width: 30px; padding: 3px 4px; }
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100%; min-height: 0; }
.srclist { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--hair); background: var(--sheet-2); }
.srclist-head { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--hair); }
.srclist-head input { flex: 1; min-width: 0; height: 30px; }
.srclist-rows { overflow: auto; flex: 1; }
.srcrow { display: flex; flex-direction: column; padding: 6px 12px; border-bottom: 1px solid var(--hair); color: var(--text); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .srcrow:hover { background: var(--sheet); } }
.srcrow.on { background: var(--poseidon); color: #fff; }
.srcrow.on .sub { color: rgba(255,255,255,.75); }
.srcrow.dim .nm { color: var(--text-3); }
.srcrow .nm { font: 600 13px/18px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srcrow .sub { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; background: var(--sheet); }
.rec-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px 8px; }
.rec-head .nm { font: 650 17px/22px var(--f-ui); }
.pbar .ribbon { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.pbar .ribbon .tbar { max-width: 100%; }
.rec-head .av { width: 38px; height: 38px; border-radius: 50%; background: var(--poseidon); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 600 14px var(--f-ui); flex: none; }
.rec-head .back { display: none; }
.rec-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; background: var(--sheet); z-index: 2; }
.rtab { border: 0; background: none; padding: 8px 10px; font: 500 13px var(--f-ui); color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .rtab:hover { color: var(--text); } }
.rtab.on { color: var(--text); border-bottom-color: var(--poseidon); }
.rec-body { padding: 14px 18px 24px; }
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--hair); border-radius: var(--r-ctl); margin-bottom: 14px; }
.fig { display: flex; flex-direction: column; padding: 8px 12px; border-left: 1px solid var(--hair); }
.fig:first-child { border-left: 0; }
.fig .k { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.fig b { font: 650 18px/24px var(--f-ui); font-variant-numeric: tabular-nums; }
.fig small { color: var(--text-2); font-size: 11.5px; }
.fig.bad b { color: var(--danger); }
a.fig, button.fig { color: inherit; text-decoration: none; font: inherit; text-align: left; background: transparent; border-top: 0; border-right: 0; border-bottom: 0; border-radius: 0; cursor: pointer; width: 100%; }
@media (hover: hover) and (pointer: fine) { a.fig:hover b, button.fig:hover b { text-decoration: underline; text-underline-offset: 3px; } }
a.fig:focus-visible, button.fig:focus-visible { outline: 2px solid var(--accent, #D97757); outline-offset: -2px; }
tr.flash td { animation: rowflash 1.6s ease-out; }
@keyframes rowflash { from { background: var(--info-bg, #e7eefb); } to { background: transparent; } }
.rec-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; }
.rec-sec { margin-bottom: 16px; }
.rec-sec h3 { margin: 0 0 6px; font: 600 11.5px var(--f-ui); color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
dl.props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13px; }
dl.props dt { color: var(--text-2); }
dl.props dd { margin: 0; overflow-wrap: anywhere; }
table.list.dense td, table.list.dense th { padding-top: 5px; padding-bottom: 5px; }
.chart-wrap { position: relative; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .bar { fill: var(--chart-1); }
svg.chart .grid-l { stroke: var(--hair); stroke-width: 1; }
svg.chart .ax { fill: var(--text-3); font: 10px var(--f-ui); }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--sheet); border: 1px solid var(--hair-2); box-shadow: var(--shadow-1); border-radius: 6px; padding: 4px 8px; font-size: 12px; pointer-events: none; white-space: nowrap; z-index: 3; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split.has-rec .srclist { display: none; }
  .rec-head .back { display: inline-flex; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig:nth-child(3) { border-left: 0; }
  .fig:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .rec-cols { grid-template-columns: 1fr; }
  .tbtn { min-width: 52px; }
}
.rec > * { flex: none; }
@media (max-width: 760px) { .pbar .ribbon { flex-basis: 100%; } }

/* ---- charts (data-viz method; palette validated on #ffffff and #142538): s1 blue, s2 orange, s3 aqua; q1-q4 blue ramp; neg red ---- */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --q1: #86b6ef; --q2: #3987e5; --q3: #256abf; --q4: #104281; --neg: #e34948; --chart-1: var(--s1); }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --q1: #184f95; --q2: #256abf; --q3: #3987e5; --q4: #86b6ef; --neg: #e66767; }
.insights { max-width: 1400px; }
.ins-filter { margin: 0 0 12px; }
.figs.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ins-sec h2 { font: 600 13px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin: 18px 0 8px; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.ins-card { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 12px 14px; min-width: 0; }
.ins-card.wide { grid-column: span 2; }
.ins-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ins-head h3 { margin: 0; font: 600 14px/20px var(--f-ui); }
.ins-head .btn.on { background: var(--sheet-2); }
.ins-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); margin: 0 0 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sw.s1, .hb.s1 { background: var(--s1); } .sw.s2, .hb.s2 { background: var(--s2); } .sw.s3, .hb.s3 { background: var(--s3); }
.sw.q1, .ab.q1 { background: var(--q1); } .sw.q2, .ab.q2 { background: var(--q2); } .sw.q3, .ab.q3 { background: var(--q3); } .sw.q4, .ab.q4 { background: var(--q4); }
svg.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .ln.s1, svg.chart .dot.s1 { stroke: var(--s1); } svg.chart .ln.s2, svg.chart .dot.s2 { stroke: var(--s2); } svg.chart .ln.s3, svg.chart .dot.s3 { stroke: var(--s3); }
svg.chart .dot { fill: var(--sheet); stroke-width: 2; }
svg.chart .bar.s1 { fill: var(--s1); } svg.chart .bar.s2 { fill: var(--s2); } svg.chart .bar.s3 { fill: var(--s3); } svg.chart .bar.neg { fill: var(--neg); }
svg.chart .zero { stroke: var(--text-3); stroke-width: 1; }
svg.chart .cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
svg.chart .lbl { fill: var(--text-2); font: 600 10.5px var(--f-ui); }
.chart-tip .sw { width: 8px; height: 8px; }
.hbars { display: flex; flex-direction: column; gap: 2px; }
.hrow { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 4px; color: var(--text); text-decoration: none; font-size: 12.5px; }
@media (hover: hover) and (pointer: fine) { a.hrow:hover { background: var(--sheet-2); } }
.hl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl small { display: block; color: var(--text-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.htrack { position: relative; height: 14px; }
.hb { position: absolute; top: 0; height: 14px; border-radius: 0 4px 4px 0; left: 0; }
.hbars.signed .hb.neg { border-radius: 4px 0 0 4px; background: var(--neg); }
.hzero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--text-3); }
.hv { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.agebar { display: flex; gap: 2px; height: 22px; margin: 4px 0 8px; }
.ab { min-width: 4px; border-radius: 4px; }
.funnel { display: flex; flex-direction: column; gap: 6px; }
.fstage { display: grid; grid-template-columns: 90px minmax(0, 1fr) 200px; gap: 10px; align-items: center; font-size: 13px; }
.ftrack { height: 18px; }
.fb { display: block; height: 18px; border-radius: 0 4px 4px 0; }
/* hq-024: period steps and the client picker in the Analytics bar; stacked hours; estimate against actual per job */
.ins-filter { flex-wrap: wrap; row-gap: 8px; }
.ins-step { display: inline-flex; gap: 4px; }
.ins-client { max-width: 240px; }
.ins-who { margin: -4px 0 12px; }
.sw.neg { background: var(--neg); } .hb.q1 { background: var(--q1); }
svg.chart .bar.q1 { fill: var(--q1); }
.htrack.two { height: 16px; }
.htrack.two .hb { height: 7px; border-radius: 0 3px 3px 0; }
.htrack.two .hb.est { top: 0; } .htrack.two .hb.act { top: 9px; }
.htrack.two .hb.act.neg { background: var(--neg); }
.ins-rec { color: var(--text); text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ins-rec:hover { text-decoration: underline; } }
.ts-cl .ts-cl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ts-cl .ts-cl-bar select { max-width: 240px; }
.ts-cl tr.on td { background: var(--sheet-2); } .ts-cl > .ins-card { margin-top: 12px; }
@media (max-width: 560px) { .ins-filter .seg { max-width: 100%; overflow-x: auto; } .ins-client, .ts-cl .ts-cl-bar select { max-width: 100%; flex: 1 1 100%; } }
.fb.f0 { background: var(--q1); } .fb.f1 { background: var(--q2); } .fb.f2 { background: var(--q3); } .fb.f3 { background: var(--q4); } .fb.f4 { background: var(--q4); }
.fv small { color: var(--text-3); }
.ins-table { max-height: 320px; overflow: auto; }
.ins-empty { padding: 24px 0; text-align: center; }
@media (max-width: 900px) { .figs.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ins-card.wide { grid-column: auto; } .ins-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .figs.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fstage { grid-template-columns: 70px minmax(0, 1fr); } .fstage .fv { grid-column: 2; } }

/* ---- inventory ---- */
.inv-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.inv-top { padding: 8px 12px; border-bottom: 1px solid var(--hair); background: var(--sheet); flex: none; }
.inv-page > .split { flex: 1; min-height: 0; }
.inv-filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--hair); }
.srcrow.inv-row { flex-direction: row; align-items: center; gap: 10px; }
.inv-row img, .inv-row .ph0 { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--sheet); display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); border: 1px solid var(--hair); }
.inv-row .tx { display: flex; flex-direction: column; min-width: 0; }
.inv-photos { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; }
.inv-photos img { height: 140px; width: auto; border-radius: 8px; border: 1px solid var(--hair); display: block; }
.inv-addph { height: 140px; min-width: 120px; border: 1.5px dashed var(--hair-2); border-radius: 8px; background: var(--sheet-2); color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: 500 12px var(--f-ui); }
.pick-add { gap: 6px; margin: 0 0 10px; }
.pick-add input[type=text] { flex: 1; min-width: 180px; }
.term-row { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }
.term-row input[type=checkbox] { margin-top: 8px; flex: none; }
.term-row textarea { flex: 1; min-height: 44px; font-size: 12.5px; }
.term-row textarea:disabled { opacity: .5; }
.inv-group { position: sticky; top: 0; z-index: 1; padding: 5px 12px; font: 600 11px var(--f-ui); text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); background: var(--sheet-2); border-bottom: 1px solid var(--hair); }
.inv-group small { color: var(--text-3); font-weight: 500; }
.inv-catpick { padding: 0 8px 6px; border-bottom: 1px solid var(--hair); }
.inv-catpick select { width: 100%; height: 30px; }
.sort-list { max-height: 60vh; overflow: auto; border: 1px solid var(--hair); border-radius: 6px; }
.sort-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 260px); gap: 8px; align-items: center; padding: 5px 8px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.sort-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-ph { position: relative; flex: none; }
.inv-phx { position: absolute; top: 4px; right: 4px; background: rgba(20,31,43,.65); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
a.tbtn { text-decoration: none; color: var(--text); }
/* ---- Photos as a photo application ---- */
.ph-split .srclist { width: auto; }
.ph-src .nm { display: inline-flex; align-items: center; gap: 4px; }
.srcrow.ph-src { flex-direction: row; justify-content: space-between; align-items: center; }
.ph-right { position: relative; }
.ph-right.drop { outline: 3px dashed var(--poseidon); outline-offset: -8px; }
.ph-status { padding: 8px 16px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: var(--sheet); z-index: 2; }
.ph-gallery { padding: 4px 16px 24px; }
.ph-month { font: 600 14px var(--f-ui); margin: 14px 0 6px; }
.ph-month small { color: var(--text-3); font-weight: 500; }
.ph-tiles { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(var(--ph), 1fr)); }
.sz-s { --ph: 84px; } .sz-m { --ph: 140px; } .sz-l { --ph: 220px; }
.ph-cell { position: relative; padding: 0; border: 0; background: var(--sheet-2); aspect-ratio: 1; border-radius: 4px; overflow: hidden; cursor: default; }
.ph-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cell.sel { outline: 3px solid var(--poseidon); outline-offset: -3px; }
.ph-cell.sel::after { content: '✓'; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--poseidon); color: #fff; font: 700 12px/20px var(--f-ui); text-align: center; }
.ph-sug { position: absolute; left: 4px; bottom: 4px; background: rgba(20,31,43,.75); color: #fff; font: 600 10.5px var(--f-ui); padding: 2px 6px; border-radius: 4px; }
.ph-view { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
.ph-big { width: 100%; max-height: 72vh; object-fit: contain; background: #000; border-radius: 6px; }
.tbtn.on { background: var(--sheet-2); }
@media (max-width: 760px) { .ph-view { grid-template-columns: 1fr; } .sz-l { --ph: 160px; } .sz-m { --ph: 110px; } }
/* ---- inventory, HITS's layout in HQ's design ---- */
.inv-app { grid-template-columns: 230px minmax(0, 1fr); height: 100%; }
.inv-nav .srclist-rows { padding: 4px 0 16px; }
.inv-nav-row { flex-direction: row !important; align-items: center; justify-content: space-between; padding: 7px 12px !important; }
.inv-nav-row .nm { display: inline-flex; align-items: center; gap: 8px; }
.inv-nav-row .cnt, .inv-title .cnt, .inv-item .cnt { background: var(--sheet-2); }
.srcrow.on .cnt { background: rgba(255,255,255,.2); color: #fff; }
.inv-pane { background: var(--ground, var(--sheet-2)); }
.inv-head { position: sticky; top: 0; z-index: 3; background: var(--sheet); border-bottom: 1px solid var(--hair); padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.inv-title { display: flex; align-items: center; gap: 8px; }
.inv-title h2 { margin: 0; font: 650 18px/24px var(--f-ui); }
.inv-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--hair-2); border-radius: 10px; background: var(--sheet-2); }
.inv-search input { flex: 1; min-width: 0; border: 0; background: none; height: 36px; font-size: 14px; outline: none; }
.inv-scanbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border: 0; border-radius: 6px; background: var(--sheet); cursor: pointer; }
.fab { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--poseidon); color: #fff; cursor: pointer; box-shadow: var(--shadow-1); }
.fab .ic { background: #fff; }
.inv-rows { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 24px; }
.inv-card .inv-rows { padding: 6px 0 0; }
.inv-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--sheet); border: 1px solid var(--hair); color: var(--text); text-decoration: none; min-height: 64px; box-sizing: border-box; }
.inv-item.static { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.inv-item.on { border-color: var(--poseidon); box-shadow: inset 3px 0 0 var(--poseidon); }
@media (hover: hover) and (pointer: fine) { a.inv-item:hover { border-color: var(--hair-2); } }
.inv-ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--sheet-2); display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); }
.inv-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--text); text-decoration: none; }
.inv-tx .nm { font: 600 14px/19px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-tx .sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-flags { display: flex; gap: 4px; margin-top: 2px; }
.inv-chev { color: var(--text-3); display: inline-flex; }
.qstep { display: inline-grid; grid-template-columns: 30px minmax(44px, auto) 30px; align-items: center; height: 30px; border: 1px solid var(--hair-2); border-radius: 15px; overflow: hidden; background: var(--sheet); }
.qbtn { height: 30px; width: 30px; border: 0; background: none; font: 600 16px/1 var(--f-ui); color: var(--info); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) { .qbtn:hover { background: var(--sheet-2); } }
.qv { text-align: center; font: 600 13px/30px var(--f-ui); font-variant-numeric: tabular-nums; padding: 0 4px; border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.qstep.big { grid-template-columns: 38px 70px 38px; height: 38px; border-radius: 19px; }
.qstep.big .qbtn { height: 38px; width: 38px; }
.qstep.big input.qv { height: 36px; border: 0; border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); width: 100%; box-sizing: border-box; }
.qrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-home { display: flex; flex-direction: column; gap: 14px; }
.inv-card { background: var(--sheet); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; }
.inv-card-h { font: 650 14px var(--f-ui); margin-bottom: 4px; }
.inv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.inv-tile { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--sheet-2); font: 600 13px var(--f-ui); color: var(--text); cursor: pointer; text-align: left; }
.inv-tile .ti { width: 30px; height: 30px; border-radius: 8px; background: var(--poseidon); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.inv-tile .ti .ic { background: #fff; }
.inv-ihead { position: sticky; top: 0; z-index: 3; background: var(--sheet); border-bottom: 1px solid var(--hair); }
.inv-ihead .back { display: inline-flex; }
.inv-form { max-width: 920px; }
.inv-sec { background: var(--sheet); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.inv-sec h3 { margin: 0 0 8px; font: 600 11.5px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.inv-sec-h { display: flex; align-items: center; justify-content: space-between; }
.inv-gallery { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.inv-gph { position: relative; flex: none; }
.inv-gph img { height: 150px; width: auto; border-radius: 10px; display: block; border: 1px solid var(--hair); }
.inv-gadd { flex: none; height: 150px; width: 130px; border-radius: 10px; border: 1.5px dashed var(--hair-2); background: var(--sheet); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: 500 12px var(--f-ui); color: var(--text-2); cursor: pointer; }
.inv-gadd.muted { cursor: default; }
.inv-phx { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(20,31,43,.65); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.inv-phx .ic { background: #fff; }
.inv-bc { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.inv-doc { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.inv-cats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; }
.inv-cat-ed { padding: 10px 16px 24px 0; }
.inv-fieldrow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 28px 28px; gap: 6px; align-items: center; margin-bottom: 6px; }
.inv-tog { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.stk-in { width: 80px; text-align: right; }
tr.warn td { background: var(--warn-bg, #fff4e5); }
@media (max-width: 760px) {
  .inv-app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .inv-app .inv-nav { display: block !important; border-right: 0; border-bottom: 1px solid var(--hair); }
  .inv-nav .srclist-rows { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; }
  .inv-nav .inv-group { display: none; }
  .inv-nav-row { flex: none; height: 30px; padding: 0 12px !important; border: 1px solid var(--hair-2) !important; border-radius: 15px; background: var(--sheet); }
  .inv-nav-row .nm .ic { display: none; }
  .inv-cats { grid-template-columns: 1fr; }
  .inv-cat-ed { padding: 0 16px 24px; }
  .inv-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .inv-item .inv-chev { display: none; }
  .inv-bc { grid-template-columns: minmax(0, 1fr) auto; }
  .inv-bc .ghost { grid-column: 1 / -1; }
}
.inv-sell { display: flex; align-items: baseline; height: 38px; } .inv-sell b { font: 650 17px var(--f-ui); }
.inv-pick-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 96px 70px 70px 90px; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.inv-pick-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-pick-row b:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.inv-app > * { min-width: 0; }
.inv-pane { min-width: 0; overflow-x: hidden; }
.inv-item > * { min-width: 0; }
@media (max-width: 760px) { .inv-item { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; } .inv-ph { width: 44px; height: 44px; } .qstep { grid-template-columns: 28px minmax(36px, auto) 28px; } .qbtn { width: 28px; } .inv-rows { padding: 8px 10px 20px; } .inv-head { padding: 10px 12px; } }
.qstep { grid-template-columns: 30px 64px 30px !important; }
.qstep .qv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qstep.big { grid-template-columns: 38px 70px 38px !important; }
@media (max-width: 760px) { .qstep { grid-template-columns: 28px 56px 28px !important; } }
/* every stepper one width, box counts included ("6 bx +40") */
.qstep { grid-template-columns: 30px 84px 30px !important; }
@media (max-width: 760px) { .qstep { grid-template-columns: 28px 72px 28px !important; } }
/* ---- labels: options left, live preview right ---- */
.lab-dialog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; min-width: min(980px, 92vw); }
.lab-ticks { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-ticks .pill { cursor: pointer; }
.lab-prev { background: var(--sheet-2); border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.lab-prev-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.lab-stage { overflow: hidden; position: relative; }
.lab-frame { border: 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); display: block; }
@media (max-width: 760px) { .lab-dialog { grid-template-columns: 1fr; min-width: 0; } }

/* Site capture (capture.mjs): the project's captures */
.srcsearch { padding: 8px; border-bottom: 1px solid var(--hair); } .srcsearch input { width: 100%; box-sizing: border-box; }
.cap-list { display: flex; flex-direction: column; }
.cap-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); min-width: 0; }
.cap-row:first-child { border-top: 0; }
.cap-ic { width: 36px; height: 36px; border-radius: 8px; background: var(--sheet-2); display: grid; place-items: center; flex: none; color: var(--info); }
.cap-main { flex: 1; min-width: 0; } .cap-title { font-weight: 600; } .cap-main .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* client page › Messages: texts, iMessages and WhatsApp in one conversation */
.msg-list { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; padding: 8px 2px; }
.msg { align-self: flex-start; max-width: 78%; background: var(--sheet-2); border: 1px solid var(--hair); border-radius: 12px 12px 12px 4px; padding: 7px 10px; }
.msg.me { align-self: flex-end; background: var(--on-bg); border-color: var(--on-bg); color: #fff; border-radius: 12px 12px 4px 12px; }
.msg-meta { font-size: 11px; opacity: .7; margin-bottom: 2px; } .msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.compose .pillrow { margin-bottom: 10px; } .attach-list { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
/* a normal small tick box beside each attachment (the form's full-width input rule made them huge, 29 Oct 2026) */
.attach-list .cb { display: flex; align-items: center; gap: 8px; font-weight: 500; white-space: normal; }
.attach-list .cb input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; flex: none; margin: 0; padding: 0; }
.job-in { margin-top: 4px; width: 100%; font-size: 12px; padding: 3px 6px; border: 1px dashed var(--hair-2); border-radius: 6px; background: transparent; }
.jobs-box { margin-top: 10px; } .job-ed { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px; margin-bottom: 6px; }
@media (max-width: 760px) { .job-ed { grid-template-columns: 1fr; } }

/* Admin › Record */
.rec-page .bar input[type=search] { flex: 1 1 260px; min-width: 0; }
.rec-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.rec-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-top: 10px; min-height: 0; }
.rec-list { display: flex; flex-direction: column; max-height: calc(100vh - 220px); overflow-y: auto; border: 1px solid var(--hair); border-radius: 10px; background: var(--sheet); }
.rec-row { display: grid; grid-template-columns: 128px 116px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--hair); background: none; font: inherit; color: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .rec-row:hover { background: var(--sheet-2); } } .rec-row.on { background: var(--sheet-2); box-shadow: inset 3px 0 0 var(--poseidon); }
.rec-when { font-size: 12px; color: var(--text-2); white-space: nowrap; } .rec-kind { font-size: 12px; font-weight: 600; color: var(--info); }
.rec-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-detail { border: 1px solid var(--hair); border-radius: 10px; padding: 14px; background: var(--sheet); max-height: calc(100vh - 220px); overflow-y: auto; }
.rec-body-text { white-space: pre-wrap; background: var(--sheet-2); padding: 10px; border-radius: 8px; font: 13px/1.5 var(--f-ui); }
.rec-lines { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
@media (max-width: 860px) { .rec-split { grid-template-columns: 1fr; } .rec-row { grid-template-columns: 1fr; gap: 2px; } }

/* Corrections (29 Oct 2026): the estimate's jobs and lines, removed rows kept and shown apart, Restore */
.est-jobs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.est-job { border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; background: var(--sheet); }
.est-job .bar { flex-wrap: wrap; } .est-job-title { font-weight: 600; min-width: 200px; flex: 0 1 280px; }
.est-lines input, .est-lines select { width: 100%; min-width: 0; } .est-lines tbody.est-line + tbody.est-line tr:first-child td { border-top: 1px solid var(--hair-2); }
.est-line-more td { padding-top: 0; } .est-line-more input { font-size: 12px; }
.est-tot { margin-top: 12px; max-width: 420px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.est-removed { margin-top: 10px; } .est-removed summary { cursor: pointer; }
tr.is-removed td, li.is-removed, .is-removed { color: var(--text-2); } tr.is-removed td b, tr.is-removed td s { text-decoration: line-through; }
.rem-acts { display: inline-flex; gap: 4px; flex-wrap: wrap; } .rem-list li .rem-acts select { font-size: 12px; padding: 2px 4px; }
.part-state { font-size: 11px; margin-left: 6px; }
@media (max-width: 760px) { .est-lines thead { display: none; } .est-lines tr { display: grid; grid-template-columns: 1fr 1fr; } .est-lines td[rowspan] { grid-column: span 2; } }

/* ---- the team (hq/ui/team.mjs): My work for the people on the jobs, the team schedule and the role manager ---- */
.mw { min-height: 100vh; background: var(--ground, var(--bg)); }
.mw-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--poseidon); color: #fff; }
.mw-top img { width: 26px; height: 26px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); } .mw-top b { font: 600 17px/1 var(--f-ui); } .mw-top .grow { flex: 1; } .mw-top .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); }
.mw-who { font-size: 13px; opacity: .85; }
.mw-body { max-width: 860px; margin: 0 auto; padding: 14px 16px 40px; }
.mw-body h2 { font: 600 16px/1.3 var(--f-ui); margin: 20px 0 8px; }
.mw-jobs { display: grid; gap: 12px; }
.mw-job { border: 1px solid var(--hair-2); border-radius: var(--r, 10px); background: var(--card, #fff); padding: 12px 14px; }
.mw-job.on { border-color: var(--poseidon); box-shadow: 0 0 0 1px var(--poseidon) inset; }
.mw-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .mw-head .grow { flex: 1; }
.mw-no { font: 600 12px/1 var(--f-ui); color: var(--text-2); background: var(--hair); border-radius: 6px; padding: 3px 6px; }
.mw-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mw-notes { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--or, #D97757); background: var(--hair); border-radius: 4px; white-space: pre-wrap; font-size: 13.5px; }
.mw-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mw-sub { margin-top: 12px; } .mw-sub h4 { margin: 0 0 4px; font: 600 13px/1.3 var(--f-ui); color: var(--text-2); }
.mw-list { list-style: none; margin: 0; padding: 0; } .mw-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--hair); } .mw-list li .grow { flex: 1; }
.mw-list li.done { color: var(--text-2); text-decoration: line-through; }
.mw-list .tag { font: 600 11px/1 var(--f-ui); padding: 3px 6px; border-radius: 6px; background: var(--info-bg, #e8f0f7); color: var(--info, #143C5D); }
.mw-clock { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r, 10px); background: var(--ok-bg, #e7f5ec); border: 1px solid var(--ok, #2f855a); }
.mw-clock .tnum { font: 600 26px/1.1 var(--f-ui); font-variant-numeric: tabular-nums; } .mw-clock .grow { flex: 1; }
.mw-clock .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok, #2f855a); }
.mw-clock.brk { background: var(--warn-bg, #fff4e5); border-color: var(--warn, #9a5b00); } .mw-clock.brk .dot { background: var(--warn, #9a5b00); }
.mw-clock.off { background: var(--card, #fff); border-color: var(--hair-2); color: var(--text-2); }
.mw-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; } .mw-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.mw-pick { max-height: 46vh; overflow: auto; display: grid; gap: 4px; margin: 6px 0; }
.mw-count { max-height: 56vh; overflow: auto; } .mw-crow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--hair); } .mw-crow .grow { flex: 1; }
@media (max-width: 600px) { .mw-acts .btn { flex: 1 1 46%; justify-content: center; } .mw-top .mw-who { display: none; } }
.rm-wrap { overflow-x: auto; max-width: 100%; }
.rm th.rm-h { vertical-align: bottom; min-width: 96px; } .rm td.rm-c { text-align: center; white-space: nowrap; } .rm td.rm-c select { font-size: 12px; padding: 2px 4px; }
.rm td.rm-none { color: var(--text-3, #94a3b8); } .rm td.rm-view { color: var(--info, #143C5D); } .rm td.rm-change { color: var(--ok, #2f855a); font-weight: 600; }
.rm-tools { display: flex; gap: 4px; margin-top: 4px; justify-content: center; }
.rm-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; } .rm-dl dt { font-weight: 600; } .rm-dl dd { margin: 0; color: var(--text-2); }
ol.howto { padding-left: 20px; } ol.howto li { margin: 0 0 10px; } ol.howto li .hint { margin-top: 2px; }
.rm td.rm-a { min-width: 220px; } .rm td.rm-a b { font-weight: 600; }

/* ---- Estimator (hq/ui/estimator.mjs, 29 Oct 2026): estimates on the left, the estimate's record with Everything, Jobs, Quote, Ask Claude */
.est-split { height: 100%; }
.est-list .srclist-head .btn { flex: none; }
.est-grp { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 12px 6px; border: 0; border-bottom: 1px solid var(--hair); background: var(--sheet-2); color: var(--text-2); font: 600 11.5px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .est-grp:hover { color: var(--text); } }
.est-grp-n { margin-left: auto; font-weight: 500; color: var(--text-3); }
.est-total { font: 650 16px/22px var(--f-ui); color: var(--info); white-space: nowrap; }
.est-body > * + * { margin-top: 12px; }
.est-welcome .est-steps { padding-left: 20px; } .est-welcome .est-steps li { margin: 0 0 6px; }
.est-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; }
.est-in-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.est-drop { display: flex; align-items: center; justify-content: center; min-height: 168px; padding: 18px; border: 2px dashed var(--hair-2); border-radius: var(--r-sheet, 10px); background: var(--sheet-2); text-align: center; cursor: pointer; outline: none; transition: border-color .12s, background .12s; }
.est-drop:focus-visible { border-color: var(--poseidon); } @media (hover: hover) and (pointer: fine) { .est-drop:hover { border-color: var(--poseidon); } }
.est-drop.on { border-color: var(--poseidon); background: var(--info-bg, #e7eefb); }
.est-drop-msg { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 420px; }
.est-drop-msg b { font: 600 15px var(--f-ui); }
.est-paste textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.est-paste .bar { margin-top: 6px; }
.est-bring { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-sheet, 10px); background: var(--sheet); }
.est-bring > div { flex: 1; min-width: 0; }
.est-bring .btn { flex: none; }
.est-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.est-filters .pill[disabled] { opacity: .45; cursor: default; }
.est-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.est-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--hair); border-radius: var(--r-sheet, 10px); background: var(--sheet); overflow: hidden; color: var(--text); text-decoration: none; position: relative; }
@media (hover: hover) and (pointer: fine) { a.est-card:hover, .est-card:hover { border-color: var(--hair-2); box-shadow: var(--shadow-1, 0 1px 3px rgba(0,0,0,.08)); } }
.est-thumb { display: flex; align-items: center; justify-content: center; height: 120px; background: var(--sheet-2); color: var(--text-2); overflow: hidden; }
.est-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.est-card-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; min-width: 0; }
.est-card-body b { font: 600 12.5px/17px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-card-body .hint { font-size: 11.5px; line-height: 15px; }
.est-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.est-card-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.est-card:hover .est-card-acts, .est-card:focus-within .est-card-acts { opacity: 1; }
.est-card-acts .btn { background: var(--sheet); box-shadow: var(--shadow-1, 0 1px 3px rgba(0,0,0,.12)); }
.est-jobs-bar { flex-wrap: wrap; gap: 8px; }
.est-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.est-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 5px; background: var(--sheet-2); color: var(--text-2); font: 500 12px var(--f-ui); white-space: nowrap; }
.est-chip.ok { background: var(--ok-bg, #e3f3ea); color: var(--ok, #2f855a); }
.est-chip.part { background: var(--warn-bg, #fff3dc); color: var(--warn, #9a5b00); }
.est-chip.bad { background: var(--danger-bg, #fbe9e5); color: var(--danger, #c0392b); }
.est-chip.tot { background: var(--poseidon); color: #fff; font-weight: 650; }
.est-lic-banner { display: flex; align-items: center; gap: 4px; }
.est-lic-meter { height: 10px; margin: 10px 0; border-radius: 5px; background: var(--sheet-2); overflow: hidden; }
.est-lic-fill { height: 100%; border-radius: 5px; background: var(--ok, #2f855a); }
.est-lic-fill.part { background: var(--warn, #9a5b00); } .est-lic-fill.bad { background: var(--danger, #c0392b); }
.est-lic-nums { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; max-width: 520px; }
.est-lic-firm { border-left: 3px solid var(--danger, #c0392b); }
.est-lic table.list { width: 100%; margin-top: 6px; } .est-lic td .hint { margin-top: 2px; }
.est-editor { margin-bottom: 0; }
.est-url { display: flex; gap: 4px; align-items: center; } .est-url input { flex: 1; min-width: 0; }
.est-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-sheet, 10px); background: var(--sheet); box-shadow: var(--shadow-2, 0 -2px 10px rgba(0,0,0,.06)); }
.est-saved.warn { color: var(--warn, #9a5b00); font-weight: 600; }
.est-quote-bar { flex-wrap: wrap; gap: 8px; }
.est-a4wrap { position: relative; overflow: hidden; border: 1px solid var(--hair); border-radius: var(--r-sheet, 10px); background: var(--pv-canvas, #e9edf2); min-height: 120px; }
.est-a4 { display: block; width: 794px; height: 1123px; border: 0; background: #fff; transform-origin: 0 0; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.est-printform { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, .8fr); gap: 10px 14px; align-items: end; }
.est-printform > .bar { grid-column: 1 / -1; flex-wrap: wrap; }
.est-sizes { display: flex; flex-wrap: wrap; gap: 4px; }
.est-asks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.est-ask { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-sheet, 10px); background: var(--sheet); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
@media (hover: hover) and (pointer: fine) { .est-ask:hover { border-color: var(--poseidon); } }
.est-ask b { font: 600 13.5px var(--f-ui); }
.est-ask.prime { border-color: var(--poseidon); background: var(--poseidon); color: #fff; }
.est-ask.prime .hint { color: rgba(255,255,255,.8); }
.est-new .pillrow { display: flex; gap: 6px; margin-bottom: 10px; }
.est-pick { display: flex; flex-direction: column; max-height: 260px; overflow: auto; border: 1px solid var(--hair); border-radius: var(--r-ctl); margin-bottom: 10px; }
.est-pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--hair); background: var(--sheet); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
@media (hover: hover) and (pointer: fine) { .est-pick-row:hover { background: var(--sheet-2); } }
.est-pick-row.on { background: var(--poseidon); color: #fff; } .est-pick-row.on .hint { color: rgba(255,255,255,.8); }
@media (max-width: 760px) {
  .est-in { grid-template-columns: 1fr; }
  .est-drop { min-height: 120px; }
  .est-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .est-thumb { height: 96px; }
  .est-card-acts { opacity: 1; }
  .est-printform { grid-template-columns: 1fr; }
  .est-asks { grid-template-columns: 1fr; }
  .est-total { font-size: 14px; }
  .est-split .rec-head { flex-wrap: wrap; }
}

/* ---------- Mail tool (hq/ui/mail.mjs): sections | list | reading pane ---------- */
.mt-split { display: grid; grid-template-columns: 200px minmax(300px, 380px) minmax(480px, 1fr); border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); min-height: 560px; height: calc(100vh - 210px); overflow: hidden; }
.mt-rail { border-right: 1px solid var(--hair); padding: 8px 6px; overflow: auto; display: flex; flex-direction: column; gap: 2px; background: var(--sheet-2); }
.mt-sec { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; text-align: left; padding: 6px 8px; border-radius: var(--r-ctl); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .mt-sec:hover { background: var(--sheet); color: var(--text); } }
.mt-sec.on { background: var(--sheet); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--current); }
.mt-sec .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-sec .n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mt-railnote { margin: 10px 8px 0; font-size: 12px; }
.mt-needpw { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.mt-boxnote { margin: 4px 8px 6px 14px; font-size: 12px; }
.mt-oldhead { margin: 8px 8px 2px 14px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--text-3); }
.mt-listcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--hair); }
.mt-list { overflow: auto; min-width: 0; flex: 1; min-height: 0; }
.mt-listhead { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); font-size: 12px; font-weight: 600; color: var(--text-2); min-height: 32px; }
.mt-listhead .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-listhead .hint { font-weight: 400; white-space: nowrap; }
.mt-selbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 10px; border-bottom: 1px solid var(--hair); background: color-mix(in srgb, var(--accent) 8%, var(--sheet)); font-size: 13px; }
.mt-selbar[hidden] { display: none; }
.mt-selbar > b { margin-right: 6px; }
.mt-liveerr { margin: 0; padding: 6px 12px; border-bottom: 1px solid var(--hair); font-size: 12px; }
.mt-cb { margin: 2px 0 0; width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
.mt-rbody { display: grid; gap: 2px; min-width: 0; }
.mt-row.picked { background: color-mix(in srgb, var(--accent) 9%, var(--sheet)); }
.mt-flag { display: inline-flex; color: var(--warn); }
.mt-draft { font-size: 11px; font-weight: 600; color: var(--danger); }
.mt-railhead { display: flex; align-items: center; gap: 4px; margin: 10px 8px 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.mt-railhead:first-child { margin-top: 2px; }
.mt-railbtn { border: 0; background: none; color: var(--text-3); padding: 2px; border-radius: var(--r-ctl); cursor: pointer; display: inline-flex; }
@media (hover: hover) and (pointer: fine) { .mt-railbtn:hover { background: var(--sheet); color: var(--text); } }
.mt-box > summary { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 12px; color: var(--text-2); cursor: pointer; border-radius: var(--r-ctl); list-style: none; }
.mt-box > summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .mt-box > summary:hover { background: var(--sheet); color: var(--text); } }
.mt-box > summary .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-fold { font-size: 12.5px; padding-top: 4px; padding-bottom: 4px; }
.mt-fold.drop { background: color-mix(in srgb, var(--accent) 16%, var(--sheet)); box-shadow: inset 0 0 0 1px var(--accent); }
.mt-undo { bottom: 96px; }
.btn.small.on { box-shadow: inset 0 0 0 1px var(--current); }
.mt-list > .empty { padding: 24px 16px; }
.mt-row { padding: 8px 12px 8px 8px; border-bottom: 1px solid var(--hair); cursor: pointer; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 6px; align-items: start; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .mt-row:hover { background: var(--sheet-2); } }
.mt-row.on { background: var(--sheet-2); box-shadow: inset 3px 0 0 var(--current); }
.mt-row.unread .from { color: var(--text); }
.mt-row:not(.unread) .from { font-weight: 500; color: var(--text-2); }
.mt-r1, .mt-r3 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mt-r1 .from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-r1 .hint { white-space: nowrap; font-size: 12px; }
.mt-r2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.mt-r3 { flex-wrap: wrap; }
.mt-why { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mt-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 0 6px; }
.mt-biz { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 1px 6px; border-radius: var(--r-ctl); color: var(--biz, var(--text-2)); background: color-mix(in srgb, var(--biz, var(--text-3)) 14%, transparent); white-space: nowrap; }
.mt-pane { overflow: auto; }
/* grouped mail (4 Nov 2026): one line per job, client or sender, opening to compact rows */
.mt-group { border-bottom: 1px solid var(--hair); }
.mt-grp { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 12px 9px 8px; border: 0; background: var(--sheet); color: var(--text-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; min-height: 40px; }
.mt-grp.unread { color: var(--text); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .mt-grp:hover { background: var(--sheet-2); } }
.mt-grp .mt-caret2 { display: inline-flex; transition: transform .12s ease; }
.mt-grp[aria-expanded="true"] .mt-caret2 { transform: rotate(90deg); }
.mt-grp[aria-expanded="true"] { background: var(--sheet-2); }
.mt-grpt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-grp .hint { white-space: nowrap; font-size: 12px; font-weight: 400; }
.mt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.mt-grpbody .mt-row { padding: 6px 12px 6px 22px; border-bottom: 0; border-top: 1px solid var(--hair); background: var(--sheet); }
.mt-grpbody .mt-row .mt-r2 { font-size: 12.5px; color: var(--text-2); }
.mt-head { padding: 10px 16px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); display: flex; flex-direction: column; gap: 8px; }
.mt-whyline, .mt-linkline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.mt-whyline select { max-width: 220px; }
.mt-secname { font-weight: 600; }
.mt-screen { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--hair); border-left: 3px solid var(--warn); border-radius: var(--r-ctl); background: var(--sheet); font-size: 13px; }
.mt-unsub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--hair); border-left: 3px solid var(--text-3); border-radius: var(--r-ctl); background: var(--sheet); font-size: 13px; }
.mt-unsub .t { flex: 1 1 220px; min-width: 0; }
/* inbox calm (group/mailcalm.mjs, hq/ui/mailcalm.mjs): the Senders link on the rail, the Senders table, Today's "HQ did this" */
a.mt-sec { text-decoration: none; }
.mt-sec.mt-needs .t { font-weight: 600; }
.calm-filters { flex-wrap: wrap; gap: 6px; }
.calm-filters input[type=search] { min-width: 200px; flex: 1 1 200px; }
.calm-table td { vertical-align: top; }
.calm-table select, .calm-table input[type=text] { max-width: 180px; }
.calm-table tr.calm-prot td { color: var(--text-2); }
.calm-did td .ic { vertical-align: -2px; }
.calm-week summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 4px; }
.calm-claim { border-left: 3px solid var(--warn); }
.mt-acts { margin: 0; gap: 6px; flex-wrap: wrap; }
.mt-compose { margin: 12px 16px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-1); }
.dlg .mt-compose { margin: 0; border: 0; box-shadow: none; padding: 0; }
.mt-compose textarea { width: 100%; font: 14px/1.5 var(--f-ui); }
.mt-chead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-chead .hint { font-size: 12px; }
.mt-tools { margin: 4px 0 0; gap: 6px; flex-wrap: wrap; }
.mt-attach summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.mt-attach .attach-list { display: grid; gap: 2px; margin-top: 6px; max-height: 180px; overflow: auto; }
.mt-msg { display: flex; flex-direction: column; min-height: 460px; }
.mt-msg .mail-body { flex: 1; min-height: 460px; }
/* the open email uses the height of the pane, however tall the window (Sean, 14 Nov 2026: "it only shows me half of the screen,
   the rest is just white… I want to use up that full screen"). The frame was a fixed 460px box; a long email now scrolls
   in a frame as tall as the pane. On a phone the email keeps its own size. */
@media (min-width: 900px) {
  .mt-msg:not(.mt-tmsg) .mail-body { min-height: max(460px, calc(100vh - 350px)); }
}
.mt-hold { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink-950, var(--text)); color: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow-3); font-size: 14px; }
.mt-hold .btn { margin-left: 4px; }
/* Send later and the Outbox (13 Nov 2026): the row to pick a day and time, and the list of what waits or did not go */
.mt-later { flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; background: var(--bg-2, rgba(0,0,0,.03)); } .mt-later[hidden] { display: none; }
.mt-later input[type=date] { height: var(--ctl); padding: 0 8px; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--sheet); color: var(--text); font: inherit; }
.mt-outbox { display: flex; flex-direction: column; gap: 10px; min-width: min(640px, 86vw); }
.mt-out { padding: 10px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sheet); } .mt-out + .mt-out { margin-top: 8px; } .mt-out.open { border-color: var(--hair-2); }
.mt-out-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; } .mt-out-top b { font-weight: 600; overflow-wrap: anywhere; }
.mt-out-what { margin-top: 4px; font-size: 13px; } .mt-out-words { margin-top: 4px; font-size: 12px; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.mt-out .bar { margin-top: 8px; gap: 6px; flex-wrap: wrap; } .mt-out-done { margin-top: 4px; } .mt-out-done summary { cursor: pointer; font-size: 13px; color: var(--text-2, var(--text)); padding: 4px 0; } .mt-out-done .mt-out { margin-top: 8px; }
.mt-snips { display: grid; gap: 10px; margin-bottom: 8px; }
.mt-snip { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.mt-snip input { flex: 1; }
.mt-snip textarea { width: 100%; font: 13px/1.45 var(--f-ui); }
@media (max-width: 1099px) { .mt-split { grid-template-columns: 170px minmax(260px, 1fr) minmax(380px, 1.3fr); } }
/* Phone (Sean, 8 Nov 2026: "mail lists on a phone is not practical for navigation and bigger fingers"): the three columns
   become three screens, one at a time (data-ph on .mt-split: lanes, list, read), every row and button a full finger high. */
.mt-phlanes, .mt-phback, .mt-phclose { display: none; }
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) { /* phones only since 11 Nov 2026; a narrow Mac window keeps the list and the email side by side */
  .mt-split, .mt-split[style] { display: block; grid-template-columns: unset !important; height: auto; min-height: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
  .mt-split > .mt-rail, .mt-split > .mt-listcol, .mt-split > .mt-pane { display: none; }
  .mt-split[data-ph="lanes"] > .mt-rail, .mt-split[data-ph="list"] > .mt-listcol, .mt-split[data-ph="read"] > .mt-pane { display: flex; }
  .mt-rail { flex-direction: column; border: 1px solid var(--hair); border-radius: var(--r-sheet); padding: 6px; gap: 2px; background: var(--sheet); overflow: visible; }
  .mt-sec, .mt-fold { width: 100%; min-height: 48px; font-size: 16px; padding: 8px 12px; white-space: normal; }
  .mt-sec .n { font-size: 14px; }
  .mt-railhead { font-size: 13px; margin: 14px 10px 4px; }
  .mt-box > summary { min-height: 44px; font-size: 15px; }
  .mt-railnote { display: none; }
  .mt-phclose { display: flex; min-height: 44px; color: var(--text-2); border-bottom: 1px solid var(--hair); border-radius: 0; margin-bottom: 4px; }
  .mt-listcol { flex-direction: column; border: 1px solid var(--hair); border-right: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); overflow: hidden; }
  .mt-phlanes { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--hair); background: var(--sheet-2); color: var(--text); font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
  .mt-phlanes .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-phlanes .hint { font-size: 13.5px; font-weight: 400; white-space: nowrap; }
  .mt-listhead { min-height: 44px; font-size: 14px; padding: 6px 12px; }
  .mt-list { overflow: visible; }
  .mt-row { grid-template-columns: 48px minmax(0, 1fr); gap: 3px 0; padding: 12px 14px 12px 0; min-height: 68px; font-size: 15.5px; align-items: center; }
  .mt-cb { width: 24px; height: 24px; min-width: 24px; margin: 0 auto; }
  .mt-r1 .hint { font-size: 13.5px; }
  .mt-r2 { font-size: 15.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mt-r3 { gap: 6px; } .mt-tag, .mt-why { font-size: 13.5px; } .mt-tag { min-height: 26px; }
  .mt-grp { min-height: 56px; font-size: 15.5px; padding: 10px 14px 10px 12px; }
  .mt-grpbody .mt-row { padding: 10px 14px 10px 0; } .mt-grpbody .mt-row .mt-r2 { font-size: 15px; }
  .mt-selbar { padding: 8px 10px; gap: 6px; } .mt-selbar .btn.small { min-height: 44px; }
  .mt-pane { flex-direction: column; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); overflow: visible; }
  .mt-phback { display: inline-flex; margin: 8px 8px 0; min-height: 44px; align-self: flex-start; }
  .mt-head { padding: 10px 12px; } .mt-acts { flex-wrap: wrap; } .mt-acts .btn.small { min-height: 44px; }
}
.dlg .mt-chead > b { display: none; }

/* Claude's conversations per client (29 Oct 2026): the thread picker, the "new conversation" line, the client page's Claude tab */
.thr-pick { position: relative; }
.thr-btn { max-width: 100%; display: inline-flex; align-items: center; gap: 6px; }
.thr-btn .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.thr-pop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: min(340px, 90vw); max-height: 60vh; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-ctl); box-shadow: var(--shadow-1); }
.thr-pop input { width: 100%; }
.thr-rows { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.thr-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; font: inherit; }
@media (hover: hover) and (pointer: fine) { .thr-row:hover { background: var(--sheet-2); } } .thr-row.on { background: color-mix(in srgb, var(--current) 10%, transparent); }
.thr-row small { color: var(--text-3); font-size: 11px; }
.thr-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 6px 8px 2px; }
.thr-mark { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 11px; }
.thr-mark::before, .thr-mark::after { content: ''; flex: 1; border-top: 1px solid var(--hair); }
.thr-more { align-self: center; font-size: 12px; }
.cl-claude .msg.claude, .cl-claude .msg.tool { align-self: flex-start; }
.cl-claude .msg.tool { background: transparent; border: 0; color: var(--text-3); font-size: 12px; padding: 0 4px; }
/* live mail: the read status, Drafts per mailbox, alert cards (hq/ui/mailwatch.mjs) */
.mt-syncstate { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.mt-spin { width: 12px; height: 12px; border: 2px solid var(--hair); border-top-color: var(--accent); border-radius: 50%; animation: mt-spin .8s linear infinite; }
@keyframes mt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mt-spin { animation-duration: 2.4s; } }
.mt-alerts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; margin-bottom: 10px; }
.mw-stack { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.mw-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--sheet); border: 1px solid var(--hair); border-left: 3px solid var(--accent); border-radius: var(--r-sheet); box-shadow: var(--shadow-3); font-size: 13px; }
@media (max-width: 899px) { /* phone: one slim line at the top, clear of the tab bar and the + button (11 Nov 2026) */
  .mw-stack { top: calc(env(safe-area-inset-top, 0px) + 8px); bottom: auto; left: 8px; right: 8px; max-width: none; }
  .mw-card { padding: 6px 8px; } .mw-card .mw-t > span { display: none; } .mw-card .mw-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mw-card .mw-t { min-width: 0; }
}
.mw-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.mw-t span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .n.mw-new { background: var(--accent); color: #fff; border-radius: 9px; padding: 0 6px; font-weight: 600; }
/* live refresh (live.mjs): something changed while a form was being typed in; a quiet pill, never a redraw under the person */
.live-pill { position: fixed; left: 50%; bottom: calc(var(--sbar) + 12px); transform: translateX(-50%); z-index: 72; height: var(--pill-h); padding: 0 12px; border: 1px solid var(--hair-2); border-radius: 12px; background: var(--sheet); color: var(--text); box-shadow: var(--shadow-2); font: 500 12px/1 var(--f-ui); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .live-pill:hover { background: var(--sheet-2); } }
.live-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Champion HQ is not answering (ui.mjs, item 12): a bar at the top while it retries every 3 s */
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--hair); font: 600 13px/1.3 var(--f-ui); }
.offline .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); animation: offline-pulse 1.2s ease-in-out infinite; }
@keyframes offline-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .offline .dot { animation: none; } }
/* Laptop width with the Claude sidebar open (item 16): the sidebar lies over the page instead of crushing it */
@media (min-width: 900px) and (max-width: 1100px) {
  .app[data-side="open"] { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-areas: "gbar gbar" "rail work" "sbar sbar"; }
  .app[data-side="open"][data-rail="icons"] { grid-template-columns: var(--rail-fold) minmax(0, 1fr); }
  .cside { position: fixed; right: 0; top: var(--gbar); bottom: var(--sbar); width: min(var(--side-w, 420px), 92vw); z-index: 55; box-shadow: var(--shadow-3); }
}
/* Phones (item 11): a list with headings becomes cards, one per row: the first column is the card's title, the rest are
   "label: value" pairs (app.js puts each column's name on its cells as data-l). Lists without headings still scroll sideways. */
@media (max-width: 600px) {
  main#main table.list:has(> thead) { display: block; overflow: visible; width: 100%; border-collapse: separate; }
  main#main table.list:has(> thead) > thead { display: none; }
  main#main table.list:has(> thead) > tbody { display: grid; gap: 8px; }
  main#main table.list:has(> thead) > tbody > tr { display: block; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-sheet, 10px); background: var(--sheet); box-shadow: var(--shadow-1); }
  @media (hover: hover) and (pointer: fine) { main#main table.list:has(> thead) > tbody > tr:hover { background: var(--sheet-2); } }
  main#main table.list:has(> thead) > tbody > tr > td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 10px; align-items: start; height: auto; min-height: 0; padding: 2px 0; border: 0; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  main#main table.list:has(> thead) > tbody > tr > td::before { content: attr(data-l); color: var(--text-2); font: 600 11px/18px var(--f-ui); letter-spacing: .05em; text-transform: uppercase; }
  main#main table.list:has(> thead) > tbody > tr > td:first-child { display: block; font-weight: 600; font-size: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
  main#main table.list:has(> thead) > tbody > tr > td:first-child::before, main#main table.list:has(> thead) > tbody > tr > td:not([data-l])::before, main#main table.list:has(> thead) > tbody > tr > td[data-l=""]::before { display: none; }
  main#main table.list:has(> thead) > tbody > tr > td:not([data-l]), main#main table.list:has(> thead) > tbody > tr > td[data-l=""] { grid-template-columns: 1fr; }
  main#main table.list:has(> thead) > tbody > tr > td:empty { display: none; }
  main#main table.list:has(> thead) > tbody > tr > td .hint { min-width: 0; }
  main#main table.list:has(> thead) > tbody > tr > td.empty { display: block; }
  /* a cell's second part (the site under a job's name, a note under an amount) stays under its value, never in the label column */
  main#main table.list:has(> thead) > tbody > tr > td[data-l]:not([data-l=""]):not(:first-child) > * { grid-column: 2; min-width: 0; }
  main#main table.list:has(> thead) > tbody > tr.grand > td { background: transparent; }
}
/* Phone width (item 11): the record tab bars scroll sideways inside their own row, the mail sections wrap, the record head wraps,
   and an inventory pick row keeps three columns */
@media (max-width: 600px) {
  .rec-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rec-tabs::-webkit-scrollbar { display: none; }
  .rec-head { flex-wrap: wrap; row-gap: 6px; }
  .rec-head .who { min-width: 0; flex: 1 1 140px; }
  .rec-head .nm { overflow-wrap: anywhere; }
  .inv-pick-row { grid-template-columns: auto minmax(0, 1fr) 90px; }
  .inv-pick-row > :nth-child(n + 4) { grid-column: 2 / -1; }
}
/* subbie days (office/ui/subbie.mjs): big targets, used on the phone at the end of the day */
.sb-clients { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.sb-chip { display: grid; gap: 2px; min-height: 52px; min-width: 150px; padding: 8px 14px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.sb-chip b { font: 600 15px/1.2 var(--f-ui); } .sb-chip small { color: var(--text-2); font-size: 12px; }
@media (hover: hover) and (pointer: fine) { .sb-chip:hover { border-color: var(--ink-300); } } .sb-chip.on { background: var(--poseidon); border-color: var(--poseidon); color: #fff; } .sb-chip.on small { color: rgba(255, 255, 255, .8); }
.sb-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.sb-day { display: grid; align-content: start; justify-items: center; gap: 2px; min-height: 96px; padding: 8px 4px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet); color: var(--text); font: inherit; cursor: pointer; }
.sb-day:disabled { cursor: default; opacity: .6; } .sb-day:focus-visible { border-color: var(--poseidon); } @media (hover: hover) and (pointer: fine) { .sb-day:not(:disabled):hover { border-color: var(--poseidon); } }
.sb-day.today { background: color-mix(in srgb, var(--accent) 8%, var(--sheet)); } .sb-day.future { opacity: .75; }
.sb-day.has { border-color: var(--poseidon); } .sb-day.billed { border-style: dashed; color: var(--text-2); }
.sb-dow { font: 600 12px/1 var(--f-ui); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; } .sb-num { font: 600 20px/1.1 var(--f-ui); }
.sb-hrs { font: 600 15px/1.2 var(--f-ui); margin-top: 4px; } .sb-day small { font-size: 11px; color: var(--text-2); text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.sb-day .sb-inv { color: var(--ok); font-weight: 600; } .sb-add { margin-top: 8px; font: 500 26px/1 var(--f-ui); color: var(--text-3); }
.sb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sb-nav { display: inline-flex; gap: 4px; white-space: nowrap; }
.sb-quick { display: flex; flex-wrap: wrap; gap: 6px; } .sb-quick .btn { min-height: 36px; }
.sb-outbar { margin: 0; min-height: 24px; } .sb-out { font: 600 15px/1.3 var(--f-ui); }
.sb-pic img { display: block; max-width: 160px; max-height: 120px; border-radius: 6px; cursor: zoom-in; }
.sb-card { display: grid; gap: 6px; } .sb-mini { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--hair); color: inherit; text-decoration: none; }
@media (max-width: 640px) {
  .sb-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sb-day { min-height: 88px; }
  .sb-chip { flex: 1 1 100%; min-height: 56px; } .sb-clients select { flex: 1 1 100%; min-height: 44px; }
  .sb-times { grid-template-columns: 1fr 1fr 1fr; } .sb-times input { min-height: 44px; font-size: 16px; }
  .sb-acts .btn.big { flex: 1 1 100%; justify-content: center; }
}
/* client page › Messages as Messages shows it (30 Oct 2026): the thread scrolls with the record, the compose bar stays at
   the bottom (above the keyboard on the phone), photos inline, day lines, tapbacks on the message they answer */
.msgs-tab { display: flex; flex-direction: column; min-height: calc(100vh - 230px); }
.msg-list.thread { max-height: none; overflow: visible; flex: 1; justify-content: flex-end; gap: 4px; padding-bottom: 6px; }
.msg-list.thread .msg { position: relative; margin-bottom: 4px; max-width: 72%; padding: 6px 11px 7px; }
.msg-list.thread .msg.me { background: var(--on-bg); }
.msg-list.thread .msg.pic { background: transparent; border-color: transparent; padding: 0; }
.msg-list.thread .msg.pic .msg-meta { padding: 0 4px; }
.msg-list.thread .msg.me.pic .msg-meta { color: var(--text-2); opacity: 1; text-align: right; }
.msg-day { align-self: center; font: 500 11px var(--f-ui); color: var(--text-3); margin: 10px 0 4px; }
.msg-pic { display: block; max-width: min(280px, 100%); }
.msg-pic img { display: block; max-width: 100%; max-height: 300px; border-radius: 12px; border: 1px solid var(--hair); background: var(--sheet-2); }
.msg-file { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; background: rgba(255,255,255,.14); color: inherit; text-decoration: none; font-size: 13px; max-width: 100%; margin: 2px 0; }
.msg:not(.me) .msg-file { background: var(--sheet); border: 1px solid var(--hair); }
.msg-file .nm, .msg-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file small { opacity: .7; } .msg-file.dim { opacity: .7; font-size: 12px; }
.msg-react { position: absolute; right: -6px; bottom: -12px; background: var(--sheet); border: 1px solid var(--hair-2); border-radius: 12px; padding: 1px 6px; font-size: 12px; line-height: 16px; box-shadow: var(--shadow-1); }
.msg.me .msg-react { right: auto; left: -6px; }
.msg.sending { opacity: .7; } .msg-state { font-size: 11px; opacity: .75; margin-top: 3px; text-align: right; display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.msg-state.bad { color: var(--danger); background: var(--danger-bg); border-radius: 6px; padding: 3px 6px; opacity: 1; flex-wrap: wrap; } .msg.me .msg-state.bad { color: var(--danger); } .msg-state.bad .btn { min-height: 24px; height: 24px; }
.tx-bar { position: sticky; bottom: 0; z-index: 3; background: var(--sheet); border-top: 1px solid var(--hair); margin: 0 -18px -24px; padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
.tx-row { display: flex; align-items: flex-end; gap: 6px; }
.tx-row .ib { width: 34px; height: 34px; flex: none; border-radius: 50%; }
.tx-input { flex: 1; min-width: 0; resize: none; min-height: 36px; max-height: 160px; padding: 8px 14px; border: 1px solid var(--hair-2); border-radius: 18px; font: 14px/1.4 var(--f-ui); background: var(--sheet); color: var(--text); box-sizing: border-box; }
.tx-input:focus { outline: none; border-color: var(--poseidon); box-shadow: 0 0 0 2px rgba(20,60,93,.15); }
.tx-send { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: var(--poseidon); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tx-send:hover:not(:disabled) { background: var(--accent, #d97757); } } .tx-send:disabled { opacity: .4; cursor: default; }
.tx-opts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; } .tx-opts .tx-to { height: 26px; font-size: 12px; padding: 0 6px; width: auto; }
.tx-files { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 0 8px; }
.tx-file { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 6px; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--sheet-2); font-size: 12px; max-width: 240px; }
.tx-file img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; } .tx-file .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-file.up { opacity: .7; } .tx-file.bad { border-color: var(--warn); color: var(--warn); } .tx-file .ib { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .msgs-tab { min-height: calc(100vh - 200px); }
  .msg-list.thread .msg { max-width: 86%; }
  .tx-bar { margin: 0 -12px -24px; padding-left: 10px; padding-right: 10px; }
}

/* =====================================================================================================================
   THE CONTROL FAMILY (30 Oct 2026; Sean: "make sure your pills are correctly aligned and text is centred inside
   correctly ... some things are rushed and messy"). Every button, field, pill, chip, tab, segment and count badge is
   defined here (and its tokens in frame.css), nowhere else: test/ui-tokens.test.mjs fails if another stylesheet
   redefines .pill / .chip / .btn / .tab. One control height (--ctl: 32px, 44px on touch), one pill height (--pill-h:
   24px, 32px for tappable pills on touch), whole-pixel heights, text and icons centred with flex, corners 6px.
   See /mc/hq/#/<entity>/ui-gallery.
   ===================================================================================================================== */
.btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl); padding: 0 12px; font: 600 13px/1.2 var(--f-ui); text-decoration: none; }
.btn.small { min-height: var(--ctl-sm); padding: 0 10px; font-size: 12.5px; }
.btn.icon { padding: 0; width: var(--ctl); } .btn.small.icon { width: var(--ctl-sm); }
.btn.ghost { background: transparent; }
.btn.on, .btn[aria-pressed="true"] { background: var(--info-bg); color: var(--info); border-color: var(--info); }
.btn[disabled], .btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.ib-round { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0; border: 1px solid var(--hair-2); border-radius: 50%; background: var(--sheet); color: var(--text-2); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ib-round:hover { color: var(--text); border-color: var(--poseidon); } }

/* fields: one height; a field that sets its own smaller height wins by specificity, none is forced taller than that */
input:where(:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="image"])), select { height: var(--ctl); box-sizing: border-box; }
.f input, .f select, .bar input, .bar select, .grid-bar input, .grid-bar select, .lines input, .lines select, .timebar input, .timebar select { padding-top: 0; padding-bottom: 0; }
/* a text field outside a form row (Find a plan, a list's Search) had the browser's 2 px inside edge: text against the border */
input:where([type="text"], [type="search"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="password"], :not([type])) { padding-inline: 10px; }
.f input[type="checkbox"], .f input[type="radio"] { width: auto; }

/* pills (tappable filters), chips (status), buckets: ONE family. Flex centring keeps text and icons dead centre;
   line-height 1 and a fixed whole-pixel height keep every one the same size on every page. */
.pill, .chip, .bk, .chipbtn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: var(--pill-h); padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-pill) !important; font: 600 12px/1 var(--f-ui); letter-spacing: 0; text-transform: none; white-space: nowrap; vertical-align: middle; position: relative; }
.pill, .chipbtn { background: var(--sheet); border-color: var(--hair-2); color: var(--text-2); font-weight: 500; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pill:hover, .chipbtn:hover { color: var(--text); border-color: var(--poseidon); } }
.pill.on, .chipbtn.on { background: var(--on-bg); border-color: var(--on-bg); color: #fff; }
.pill[disabled], .pill[aria-disabled="true"], .chipbtn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.pill.warn, .inv-flags .pill:not(.warn) { cursor: default; border-color: transparent; background: var(--warn-bg); color: var(--warn); }
.inv-flags .pill:not(.warn) { background: var(--neutral-bg); color: var(--neutral); }
.pillx { border: 0; background: none; color: inherit; font: 600 14px/1 var(--f-ui); padding: 0; margin-left: 2px; cursor: pointer; }
.pillrow { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.pillrow::-webkit-scrollbar { display: none; }
.pillrow.wrap { flex-wrap: wrap; }
.pillrow select, .pill-in { height: var(--pill-h); min-height: 0; padding: 0 10px; border-radius: var(--r-pill) !important; font-size: 12px; line-height: 1; width: auto; }
.pill-in { border-style: dashed; width: 120px; }
.chip, .bk { background: var(--neutral-bg); color: var(--neutral); }
.chip.sent, .chip.st-scheduled, .chip.st-quoted, .bk.this-month { background: var(--info-bg); color: var(--info); }
.chip.accepted, .chip.paid, .chip.active, .bk.done, .bk.go { background: var(--ok-bg); color: var(--ok); }
.chip.overdue, .chip.declined, .chip.expired, .bk.overdue { background: var(--danger-bg); color: var(--danger); }
.chip.part, .chip.adjustment, .chip.credited, .bk.this-week, .bk.maybe { background: var(--warn-bg); color: var(--warn); }
.chip.void, .chip.closed, .chip.cancelled, .chip.void-soft, .bk.skip { background: var(--neutral-bg); color: var(--neutral); opacity: .85; }
.chip.void { text-decoration: line-through; }
.bk { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bk.needs-fact { background: var(--purple-bg, #f3e8ff); color: var(--purple, #5b2a86); }
.pv-draftlayer > .chip { align-self: center; margin: 8px; }

/* count badges: one style (tabs, segments, record tabs, inventory) */
.tabs .tab .n, .rtab .n, .seg > .tab .n, .cnt { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin: 0; border-radius: 5px; background: var(--hair); color: var(--text-2); font: 600 11px/1 var(--f-ui); }
.tab.on .n, .rtab.on .n { background: var(--info-bg); color: var(--info); }

/* tabs: ONE underline style (Ask, Banking, Reports, saved views, and the record tabs of a client or job) */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid var(--hair); } /* tabs wrap to a second line, never a sideways scroll (2 Nov 2026) */
.tabs::-webkit-scrollbar, .rec-tabs::-webkit-scrollbar { display: none; }
.tabs .tab, .rtab { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; flex: none; height: calc(var(--ctl) + 4px); margin: 0; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0 !important; background: none; color: var(--text-2); font: 500 13px/1 var(--f-ui); white-space: nowrap; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tabs .tab:hover, .rtab:hover { color: var(--text); } }
.tabs .tab.on, .rtab.on { color: var(--text); border-bottom-color: var(--on-line); }
.grid-views .tab .xv { margin-left: 6px; }

/* segmented control: a box of choices, the chosen one filled. Never inherits the underline tab. */
.seg { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; height: var(--ctl); padding: 0 1px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet-2); vertical-align: middle; }
.seg > .tab, .seg > button { box-sizing: border-box; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto; height: calc(var(--ctl) - 4px); margin: 0; padding: 0 12px; border: 0; border-bottom: 0; border-radius: 4px !important; background: transparent; color: var(--text-2); font: 500 13px/1 var(--f-ui); white-space: nowrap; text-transform: none; }
@media (hover: hover) and (pointer: fine) { .seg > .tab:hover { color: var(--text); } }
.seg > .tab.on { background: var(--on-bg); color: #fff; border: 0; }
.seg > .tab.on .n { background: rgba(255,255,255,.2); color: inherit; }
.cs-tools .seg { height: var(--ctl-sm); } .cs-tools .seg > .tab { height: calc(var(--ctl-sm) - 4px); padding: 0 10px; font-size: 12px; }

/* sidebar tools, compose bar, toolbars */
.cs-tools .btn.small, .cs-chat .askbar .btn { padding: 0; }
.cs-tools .btn.small { width: var(--ctl-sm); } .cs-chat .askbar .col .btn { width: var(--ctl-sm); min-height: var(--ctl-sm); }
.cs-tools select.small, .cs-tools select { height: var(--ctl-sm); flex: 1 1 90px; min-width: 0; max-width: 170px; padding: 0 6px; font-size: 12px; }
.tx-row .ib, .tx-file .ib { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0; border: 1px solid var(--hair-2); background: var(--sheet); color: var(--text-2); cursor: pointer; }
.tx-row .ib { width: max(34px, var(--ctl)); height: max(34px, var(--ctl)); }
@media (hover: hover) and (pointer: fine) { .tx-row .ib:hover { color: var(--text); border-color: var(--poseidon); } }
.tx-send { width: max(34px, var(--ctl)); height: max(34px, var(--ctl)); }
.tx-opts .tx-to { height: var(--ctl-sm); padding: 0 8px; font-size: 12.5px; border-radius: var(--r-ctl) !important; }
.pv-bar select, .pv-pagein { height: var(--ctl-sm); min-height: 0; font-size: 12px; }
.pv-pagein { width: 44px; padding: 0 4px; }
.srclist-head input { height: var(--ctl); }
.sbar span, .sbar a { flex: none; }

/* ---- layout on every device (30 Oct 2026): nothing off-screen, nothing hidden, one rhythm ---- */
.tbtn.ov, .tgroup:not(:has(.tbtn:not(.ov))) { display: none; }
.tbar { padding-bottom: 0; }
.tbtn { box-sizing: border-box; }
@media (max-width: 900px) { .tbtn { min-width: 56px; height: 48px; } .cmenu .it { height: 44px; } }
[data-fade~="r"] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
[data-fade~="l"] { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent); }
[data-fade="lr"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.ed-cmds { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
main#main .ed-head { position: sticky; top: 0; z-index: 5; padding: 6px 0; background: var(--ground); }
.sbar .lamp, .sbar span { flex: none; } .sbar .grow { flex: 1 1 0; min-width: 0; }
@media (max-width: 760px) {
  .rec-body { padding-left: 12px; padding-right: 12px; }
  .ed-head h1 { flex: 1 1 100%; font-size: 20px; }
  .ed-head > .hint { display: none; }
  .ed-cmds { flex: 1 1 100%; margin-left: 0; justify-content: flex-end; }
  .grid-bar input[type="search"] { min-width: 0; flex: 1 1 100%; }
}
@media (max-width: 640px) { .sbar .sb-opt { display: none; } .sbar { gap: 10px; } }
@media (max-width: 600px) {
  main#main table.list:has(> thead), main#main .grid-table { min-width: 0; }
  main#main table.list:has(> thead) > tbody > tr > td > .chip { justify-self: start; }
}
/* tappable pills: 32px on touch, with the hit area stretched to 44px so a finger never misses */
@media (max-width: 900px), (pointer: coarse) {
  .pill:not(.warn), .chipbtn, .pillrow select, .pill-in { height: 32px; }
  .pill:not(.warn)::after, .chipbtn::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
  .seg > .tab::after { content: ""; position: absolute; inset: -2px; } /* 40 px segment + 2 px each side = 44 px to a finger */
  .btn.small, .btn { font-size: 14px; }
}
/* touch targets: 44px for anything a finger presses (Sean, 31 Oct 2026: tap targets at least 44 px) */
@media (max-width: 900px), (pointer: coarse) {
  .gbar .ib, .gbar .navhist .ib { width: 44px; height: 44px; } .gbar .ksearch, .gbar .acct { height: 44px; }
  .rail a.row, .set-rail a.row, .mt-sec, .inv-nav-row, .est-grp, .srcrow, .swm .it, .kpal .it, .cmenu .it { min-height: 44px; }
  .insp-head .ib, .scanhead .ib, .cs-head .ib { width: 44px; height: 44px; }
}
@media (max-width: 900px), (pointer: coarse) {
  .ts-kinds button, .mt-railbtn, .rail .fold, .ye-src { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .leaflet-bar a { width: 44px !important; height: 44px !important; line-height: 44px !important; }
}
@media (max-width: 900px), (pointer: coarse) {
  .gbar .crumb a, .gbar .crumb .here { display: inline-flex; align-items: center; height: 44px; }
  .rec-row { min-height: 44px; }
}
/* line editors (quote, invoice, labour, bill) on a phone: one card per line, never a sideways scroll */
@media (max-width: 640px) {
  main#main table.lines.items { display: block; overflow: visible; width: 100%; table-layout: auto; }
  main#main table.lines.items > thead { display: none; }
  main#main table.lines.items > tbody { display: grid; gap: 10px; }
  main#main table.lines.items > tbody > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); box-shadow: var(--shadow-1); }
  main#main table.lines.items > tbody > tr > td { display: block; width: auto !important; min-width: 0; padding: 0; text-align: left; }
  main#main table.lines.items > tbody > tr > td:first-child, main#main table.lines.items > tbody > tr > td.tools { grid-column: 1 / -1; }
  main#main table.lines.items > tbody > tr > td[data-l]:not(:first-child):not(.tools)::before { content: attr(data-l); display: block; margin-bottom: 2px; color: var(--text-2); font: 600 11px/16px var(--f-ui); letter-spacing: .05em; text-transform: uppercase; }
  main#main table.lines.items > tbody > tr > td.amt { align-self: end; padding: 0 0 10px; text-align: right; font-size: 15px; font-weight: 600; }
  main#main table.lines.items > tbody > tr > td.tools { display: flex; justify-content: flex-end; gap: 8px; }
  main#main table.lines.items .icon-btn { min-width: 44px; height: 44px; }
  main#main table.lines.items textarea { height: auto; min-height: 56px; }
}
/* page view beside the Claude sidebar: the toolbar keeps to one or two rows (the title is in the window bar already) */
.pv-bar > * { flex: none; min-width: 0; } .pv-bar select { max-width: 150px; }
@container (max-width: 560px) { .pv-title, .pv-status { display: none; } .pv-centre { flex: 1 1 auto; } .pv-bar select { max-width: 110px; } }
@media (max-width: 900px), (pointer: coarse) {
  .rec-head .back { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .sentline { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
  .linklike, .linkbtn { min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; }
}
.lines textarea { min-height: var(--ctl); }
.askbar > .btn { align-self: flex-end; } .cs-chat .askbar > .btn { width: var(--ctl); padding: 0; } /* the attach button is a square at the foot of the box, not a tall bar */
/* forms: two and three columns on a wide screen, one on a phone (a key or a price never squeezed to a few letters) */
@media (max-width: 640px) { .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 641px) and (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-bar .btn, .srclist-head .btn { min-height: var(--ctl); } /* a search, a select and two buttons on one row are one height */

/* Measure and plan › Doors and windows (plan-openings.mjs, 30 Oct 2026): "Openings: 6 of 9 measured" over the plan, the
   schedule (a table on a wide screen, a checklist on the phone) and one opening's card */
.plan-page { position: relative; }
.op-status { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 14px; border: 0; border-radius: var(--r-pill, 999px); background: var(--poseidon); color: #fff; box-shadow: var(--shadow-3); font: 600 14px/1 var(--f-ui); cursor: pointer; }
.op-status b { background: var(--accent); color: #fff; border-radius: var(--r-pill, 999px); padding: 7px 12px; }
.op-status.done b { background: rgba(255,255,255,.18); }
.op-status[hidden] { display: none; }
.op-tools { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.op-table { width: 100%; border-collapse: collapse; font: 13px/1.35 var(--f-ui); }
.op-table th { text-align: left; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--hair); padding: 6px; white-space: nowrap; }
.op-table td { border-bottom: 1px solid var(--hair); padding: 6px; vertical-align: top; }
.op-table tbody tr { cursor: pointer; } @media (hover: hover) and (pointer: fine) { .op-table tbody tr:hover { background: var(--sheet-2); } }
.op-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.op-src { color: var(--text-3); font-size: 11px; font-weight: 400; }
.op-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.op-st { display: inline-block; white-space: nowrap; font: 600 11px/1 var(--f-ui); padding: 5px 8px; border-radius: var(--r-pill, 999px); background: var(--warn-bg); color: var(--text); }
.op-st.ok { background: var(--poseidon); color: #fff; }
.op-list { display: none; }
.op-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 8px; min-height: 56px; border: 0; border-bottom: 1px solid var(--hair); background: none; color: inherit; font: inherit; cursor: pointer; }
.op-mk { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--sheet-2); font-weight: 700; }
.op-row.ok .op-mk { background: var(--poseidon); color: #fff; }
.op-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.op-card { display: flex; flex-direction: column; gap: 10px; }
.op-voice { display: flex; gap: 6px; } .op-voice input { flex: 1; min-width: 0; }
.op-heard { min-height: 1em; margin-top: -4px; }
.op-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.op-num label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.op-badge { font-weight: 500; color: var(--text-3); font-size: 11px; }
.op-in { display: flex; align-items: center; gap: 6px; }
.op-in input { flex: 1; min-width: 0; font: 600 18px/1 var(--f-ui); font-variant-numeric: tabular-nums; }
.op-in .u { color: var(--text-3); }
.op-laser.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.op-swing { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.op-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.op-pick { border: 1px solid var(--hair); background: var(--sheet); color: inherit; border-radius: 10px; padding: 6px 8px 4px; cursor: pointer; min-width: 74px; }
.op-pick.on { border-color: var(--poseidon); box-shadow: inset 0 0 0 1px var(--poseidon); background: var(--sheet-2); }
.op-picw { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 11px/1.2 var(--f-ui); }
.op-pic { width: 52px; height: 56px; }
.op-pic .wl { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.op-pic .lf { stroke: var(--poseidon); stroke-width: 2.4; stroke-linecap: round; }
.op-pic .arc, .op-pic .ar { stroke: var(--text-3); stroke-width: 1.2; fill: none; stroke-dasharray: 2.5 2; }
.op-pic .ar { stroke-dasharray: none; stroke-width: 1.6; }
.op-pic .me { fill: var(--accent); }
.op-leaf { border: 1px solid var(--hair); border-radius: 8px; padding: 8px 10px; background: var(--sheet-2); display: flex; flex-direction: column; gap: 3px; }
.op-leaf:empty { display: none; }
.op-leaf-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-step { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); }
.op-photo { display: flex; align-items: center; gap: 10px; } .op-photo img { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; }
.op-extra { display: inline-flex; gap: 6px; }
.op-allow .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 760px) {
  .op-table { display: none; } .op-list { display: block; }
  .op-status { bottom: calc(12px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
  .op-nums { grid-template-columns: 1fr; }
  .op-allow .grid3 { grid-template-columns: 1fr; }
  .op-extra .btn { padding: 0 10px; }
}
@media print { .op-status { display: none; } }
/* ---- the plan on the phone (plan-phone.mjs, 31 Oct 2026, Sean: "this is where the plan becomes too much detail for a phone
   app"): the floor plan fills the screen, one short bar under it, a sheet for the wall in hand; nothing else */
.pp { display: flex; flex-direction: column; height: 100%; padding: 0 !important; margin: 0 !important; max-width: none !important; box-sizing: border-box; position: relative; }
.pp-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--hair); }
.pp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pp-name b, .pp-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pp-name small { color: var(--muted); font-size: 12px; }
.pp-head .btn { min-height: 44px; min-width: 44px; } .pp-storey { max-width: 40%; min-height: 44px; }
.pp-stage { position: relative; flex: 1 1 auto; min-height: 0; background: var(--card); }
.pp-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; display: block; }
.pp-room { fill: color-mix(in srgb, var(--navy, #143C5D) 6%, transparent); stroke: none; }
.pp-wall { stroke: var(--ink, #1c2430); stroke-linecap: square; }
.pp-wall.on { stroke: #D97757; } .pp-wall.stub { stroke: color-mix(in srgb, var(--ink, #1c2430) 70%, #D97757); }
.pp-gap { stroke: var(--card, #fff); stroke-linecap: butt; }
.pp-op { stroke: var(--ink, #1c2430); stroke-width: 1.4px; vector-effect: non-scaling-stroke; fill: none; }
.pp-op.arc { stroke: var(--muted, #6b7380); stroke-dasharray: 3 3; } .pp-op.open { stroke-dasharray: 4 3; stroke: var(--muted, #6b7380); }
.pp-op.glass { stroke: #2f7fb8; stroke-width: 2.2px; } .pp-op.window { stroke: #2f7fb8; }
.pp-fix { fill: color-mix(in srgb, var(--muted, #6b7380) 10%, transparent); stroke: var(--muted, #6b7380); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.pp-fix.fx-cold { fill: color-mix(in srgb, #2f7fb8 12%, transparent); stroke: #2f7fb8; } .pp-fix.fx-store { fill: color-mix(in srgb, #8a6d3b 10%, transparent); stroke: #8a6d3b; }
.pp-fix.up { stroke-dasharray: 5 4; fill: none; }
.pp-label text { text-anchor: middle; fill: var(--ink, #1c2430); font-family: var(--f-ui, system-ui); paint-order: stroke; stroke: var(--card, #fff); stroke-width: 3px; stroke-linejoin: round; }
.pp-label text.b { font-weight: 700; } .pp-label.fix text { fill: var(--text-2, #3c4654); } .pp-label.dim text { fill: var(--text-2, #3c4654); }
.pp-label.dim.measured text { font-weight: 700; fill: var(--navy, #143C5D); }
.pp-mark { fill: #D97757; stroke: #fff; stroke-width: 2px; }
.pp-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; padding: 8px 14px; border-radius: 999px; background: #D97757; color: #fff; font: 600 14px/1.3 var(--f-ui, system-ui); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-2, 0 2px 8px rgba(0,0,0,.2)); }
.pp-bar { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--hair); background: var(--chrome, var(--card)); padding-bottom: env(safe-area-inset-bottom); }
.pp-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; padding: 6px 2px; border: 0; background: none; color: inherit; font: 600 12px/1.15 var(--f-ui, system-ui); cursor: pointer; }
.pp-tab .ic { width: 22px; height: 22px; } .pp-tab small { font-weight: 500; font-size: 11px; color: var(--muted); } .pp-tab.done small { color: var(--ok, #2e7d32); }
.pp-tab:active { background: var(--sheet-2, rgba(0,0,0,.05)); }
/* the five tabs line up: icons on one line, labels on one line ("Add a room" wrapped to two at 320 px and pushed the others down) */
.pp-tab { justify-content: flex-start; padding-top: 8px; } .pp-tab .pp-t { white-space: nowrap; }
@media (max-width: 360px) { .pp-tab { font-size: 11px; } .pp-tab small { font-size: 10.5px; } }
.pp-sheet { position: absolute; left: 0; right: 0; bottom: calc(61px + env(safe-area-inset-bottom)); z-index: 4; max-height: 62%; overflow: auto; padding: 14px 14px 12px; background: var(--card); border-top: 1px solid var(--hair); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.12); display: grid; gap: 10px; }
.pp-sheet[hidden] { display: none; }
.pp-close { position: absolute; right: 8px; top: 8px; min-width: 44px; min-height: 44px; border: 0; background: none; color: inherit; cursor: pointer; }
.pp-sh { display: flex; flex-direction: column; gap: 2px; padding-right: 40px; } .pp-sh b { font-size: 16px; }
.pp-num label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.pp-in { display: flex; align-items: center; gap: 6px; } .pp-in .pp-mm { flex: 1; min-width: 0; min-height: 44px; font-size: 20px; font-variant-numeric: tabular-nums; } .pp-in .u { color: var(--muted); }
.pp-in .btn { min-height: 44px; }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .pp-row .btn.primary { flex: 1; min-height: 48px; justify-content: center; font-size: 16px; }
.pp-row.two { display: grid; grid-template-columns: 1fr 1fr; } .pp-row.two .btn { min-height: 48px; justify-content: center; }
.pp-menu { display: grid; gap: 8px; } .pp-menu .btn { justify-content: flex-start; min-height: 48px; font-size: 16px; }
.pp-hidden { position: fixed; left: -10000px; top: 0; width: 390px; height: 700px; visibility: hidden; pointer-events: none; border: 0; }
.app:has(.pp) .pbar { display: none; } /* the plan gets the screen: its own head says which plan */
main:has(> .pp) { padding: 0 !important; overflow: hidden; }
.undo-bar.pp-undo { bottom: calc(100px + env(safe-area-inset-bottom)); }

/* Measure and plan › Wall photos (plan-wallphotos.mjs, 30 Oct 2026): each wall as one true-scale photo */
.wp { display: grid; gap: 14px; }
.wp-cap { border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 10px; display: grid; gap: 8px; }
.wp-head { display: flex; align-items: center; gap: 8px; } .wp-head .grow { flex: 1; }
.wp-note progress { width: 160px; vertical-align: middle; }
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wp-card { display: grid; gap: 6px; padding: 6px; text-align: left; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-ctl); cursor: pointer; font: inherit; color: inherit; }
@media (hover: hover) and (pointer: fine) { .wp-card:hover { border-color: var(--line); } }
.wp-card img { width: 100%; height: 110px; object-fit: contain; background: #e9ecef; border-radius: 4px; }
.wp-none { height: 110px; display: grid; place-items: center; background: #e9ecef; border-radius: 4px; color: #5A6779; }
.wp-cap-t { display: grid; gap: 2px; font-size: 13px; } .wp-cap-t span { color: #5A6779; }
.wp-warn { display: inline-flex; align-items: center; gap: 4px; color: #8a5a00; }
.wp-view { display: grid; gap: 8px; }
.wp-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .wp-tools .grow { flex: 1; } .wp-tools .btn.on { background: #143C5D; color: #fff; }
.wp-stage { overflow: auto; height: min(62vh, 640px); background: #e9ecef; border: 1px solid var(--hair); border-radius: 6px; }
.wp-wrap { position: relative; touch-action: none; cursor: crosshair; user-select: none; }
.wp-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wp-wrap .wp-cov { opacity: .55; mix-blend-mode: multiply; pointer-events: none; }
.wp-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wp-ln { stroke: #D97757; } .wp-pt { fill: #fff; stroke: #D97757; }
.wp-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wp-scale { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; } .wp-scale i { display: inline-block; height: 6px; border: 2px solid #143C5D; border-top: 0; }
.wp-read b { font-size: 16px; } .wp-read span { color: #5A6779; }
.wp-info { display: grid; gap: 4px; font-size: 13px; }

/* ---- drop your bank files any time (hq/ui/bankdrop.mjs) */
#bankdrop-overlay { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: color-mix(in srgb, var(--navy, #143C5D) 55%, transparent); pointer-events: none; }
#bankdrop-overlay[hidden] { display: none; }
#bankdrop-overlay .bd-card { display: grid; justify-items: center; gap: 6px; padding: 34px 54px; border: 3px dashed #fff; border-radius: 18px; background: color-mix(in srgb, var(--navy, #143C5D) 92%, #000); color: #fff; text-align: center; }
#bankdrop-overlay .bd-card .ic { width: 44px; height: 44px; background: #fff; }
#bankdrop-overlay .bd-card b { font-size: 24px; }
#bankdrop-overlay .bd-card span { font-size: 17px; }
#bankdrop-overlay .bd-card small { opacity: .8; font-size: 13px; }
.bankdrop-zone { display: flex; align-items: center; gap: 14px; margin: 8px 0 14px; padding: 14px 16px; border: 2px dashed var(--line, #c9d3dc); border-radius: 12px; cursor: pointer; background: var(--sheet-2, #f6f8fa); }
@media (hover: hover) and (pointer: fine) { .bankdrop-zone:hover { border-color: var(--navy, #143C5D); } }
.bankdrop-zone.hot { border-color: var(--accent, #D97757); background: color-mix(in srgb, var(--accent, #D97757) 10%, var(--sheet, #fff)); animation: bd-pulse 1.2s ease-out 2; }
.bankdrop-zone > .ic { width: 28px; height: 28px; flex: none; }
.bankdrop-zone .hint { margin-top: 2px; }
.bankdrop-last { margin-top: 4px; font-weight: 600; color: var(--navy, #143C5D); }
@keyframes bd-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #D97757) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.bankdrop-today { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.bankdrop-today .ic { flex: none; }
.bankdrop-today.soft { background: var(--sheet-2, #f6f8fa); border-color: var(--line, #c9d3dc); color: inherit; }
.bankdrop-sum .bd-row { padding: 10px 0; border-top: 1px solid var(--line, #e3e8ee); }
.bankdrop-sum .bd-row:first-of-type { border-top: 0; }
.bankdrop-sum .bd-name > b { margin-right: 8px; overflow-wrap: anywhere; }
.bankdrop-sum ul { margin: 6px 0 0; padding-left: 18px; }
.bankdrop-sum li { margin: 2px 0; }
.bankdrop-sum .bd-remember { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
.bankdrop-sum .bd-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line, #e3e8ee); }
.bankdrop-sum .bd-links:empty { display: none; }
/* phone (small-screen check 31 Oct 2026): the drop panel's words had a 70 px column beside the button; the button goes
   under them, full width. In the summary a long "Lines to code" link wraps instead of pushing the dialog off the screen. */
.bankdrop-zone > .grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) {
  .bankdrop-zone { flex-wrap: wrap; align-items: flex-start; }
  .bankdrop-zone > .grow { flex: 1 1 calc(100% - 42px); }
  .bankdrop-zone > .btn { flex: 1 1 100%; }
}
.bankdrop-sum { min-width: 0; overflow-wrap: anywhere; }
.bankdrop-sum .bd-links .btn { white-space: normal; text-align: left; height: auto; padding-top: 6px; padding-bottom: 6px; max-width: 100%; }
.bankdrop-sum .bar select { min-width: 0; max-width: 100%; }

/* small-screen check (31 Oct 2026) */
/* a number and its unit stay together ("2 % off" never splits over two lines); the words before them wrap instead */
.unit-in { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
/* Email window: "Attach before and after photos" on one line, how many are attached under it */
.cb.photo-tick { flex-wrap: wrap; row-gap: 2px; }
.cb.photo-tick > .hint { flex: 1 1 100%; padding-left: 24px; font-weight: 400; }
/* Settings' word boxes show all their words where the browser can size a box to its text (Chrome, Safari 26); elsewhere they scroll as before */
.set-page textarea { field-sizing: content; max-height: 60vh; }
/* Settings: rows of fields one under another had no space between them (a label sat on the box above it); 10 px, as inside a row */
.set-panel :is(.grid2, .grid3, .f):not(:is(.grid2, .grid3) > *) + :is(.grid2, .grid3, .f) { margin-top: 10px; }
/* Openings: in the plan's bar, in line with its buttons, never floating over the drawing (Sean, 31 Oct 2026) */
.plan-bar .op-status { position: static; transform: none; z-index: auto; min-height: var(--ctl-sm); max-width: 100%; box-sizing: border-box; }
.plan-bar .op-status b { padding: 4px 10px; }
@media (max-width: 760px) {
  .plan-bar:has(> .op-status:not([hidden])) { flex-wrap: wrap; }
  .plan-bar .op-status { order: 9; flex: 1 1 100%; justify-content: space-between; min-height: 44px; }
}
/* the page's usual 80 px foot (room to scroll past the last row) left the plan 80 px short of the window: the plan has none */
main#main .page.plan-page { padding: 8px 12px 6px; }
@media (max-width: 760px) { main#main .page.plan-page { padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); } }
/* a laptop or an iPad (under 1180 px wide or 820 px tall): the plan's tools fold into one Tools button, so the bar is one
   row and the drawing keeps the height (they took three rows over the editor at 1280 x 800 and 1024 x 768) */
@media (max-width: 1180px), (max-height: 820px) {
  .plan-tools { display: none; } .plan-more { display: inline-flex; }
  .plan-bar { flex-wrap: nowrap; } .plan-bar select { flex: 1 1 auto; min-width: 0; }
  .plan-bar .grow { display: none; }
}
/* where a payment came from (office/ui/paysource.mjs): confirmed by Stripe or the bank, or awaiting the bank line */
.chip.pay-src { margin-left: 6px; text-decoration: none; } .chip.pay-src.ok { background: var(--ok-bg); color: var(--ok); } .chip.pay-src.wait { background: var(--warn-bg); color: var(--warn); }
.chip.pay-src .ic { width: 12px; height: 12px; } td > .chip.pay-src:first-child { margin-left: 0; }
/* the Materials screen (office/ui/materials.mjs): one row per line (the row's class is mat-need, never the Today .need
   flex row, which broke every needed line out of the table), quantities and money right-aligned in tabular figures */
.mats { width: 100%; }
.mats td { vertical-align: middle; }
.mats td.acts { white-space: nowrap; text-align: right; } .mats td.acts .btn + .btn { margin-left: 4px; }
.mats td:first-child { min-width: 220px; } .mats td.r, .mats th.r, .mats td.acts { white-space: nowrap; }
.mats td.st { min-width: 128px; } .mats td.st select { width: 100%; min-width: 112px; max-width: 200px; }
.mats-wrap { max-width: 100%; overflow-x: auto; } .mats .sup-under { display: none; }
@media (max-width: 1180px) and (min-width: 601px) { .mats .c-sup { display: none; } .mats .sup-under { display: block; } table.list.mats td, table.list.mats th { padding-left: 8px; padding-right: 8px; } }
.gbar .mark { white-space: nowrap; flex: none; }
.gbar .crumb { flex: 0 1 auto; overflow: hidden; } .gbar .crumb .here { min-width: 0; } /* the trail clips with an ellipsis at its own edge, never under the search box */ /* "Champion HQ" never breaks onto two lines in a narrow window */ /* the status shrinks before the item does */
.mats td.st .hint { margin-top: 2px; font-size: 12px; }
.mats-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; padding: 6px 8px; border-radius: 6px; background: var(--info-bg); color: var(--info); font-size: 12px; }
.mats tfoot td { font-weight: 600; } .mats tfoot td.warn { color: var(--warn); }
.mats-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mats-head .back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font: 500 13px/1 var(--f-ui); }
@media (hover: hover) and (pointer: fine) { .mats-head .back:hover { color: var(--text); } }
.mats-head h2 { margin: 0; }
@media (max-width: 600px) {
  .mats-head .back { flex: 1 1 100%; min-height: 32px; }
  .mats-head .grow { display: none; } .mats-head .btn { flex: 1 1 40%; }
  main#main table.list.mats > tbody > tr > td.acts { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
  main#main table.list.mats > tbody > tr > td.acts::before { display: none; }
  main#main table.list.mats > tfoot { display: block; margin-top: 8px; } main#main table.list.mats > tfoot > tr { display: flex; align-items: baseline; gap: 12px; padding: 8px 12px; }
  main#main table.list.mats > tfoot td { display: block; height: auto; padding: 0; border: 0; } main#main table.list.mats > tfoot td:last-child { flex: 1 1 auto; text-align: right; }
} .mats-head .grow { flex: 1 1 auto; }

/* ---- the client's whole story on the Overview (office/ui/clientstory.mjs, 1 Nov 2026). One grid per list so every column
   lines up row to row; money right-aligned in tabular figures; chips from the family above; on a phone each row stacks. */
.cst { display: grid; }
.cst-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0 24px; align-items: start; }
.cst-sec h3 { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.cst-h-note { margin-left: auto; font: 600 12px/1 var(--f-ui); color: var(--danger); text-transform: none; letter-spacing: 0; }
.cst-rows, .cst-jobs { display: grid; border: 1px solid var(--hair); border-radius: var(--r-ctl); overflow: hidden; background: var(--sheet); }
.cst-row { display: grid; align-items: center; column-gap: 12px; min-height: var(--row); padding: 4px 12px; border-top: 1px solid var(--hair); color: inherit; text-decoration: none; font-size: 13px; line-height: 18px; }
.cst-row:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) { a.cst-row:hover { background: var(--sheet-2); } }
.cst-row .r { justify-self: end; text-align: right; }
.cst-head { min-height: 30px; background: var(--sheet-2); color: var(--text-2); font: 600 11px/16px var(--f-ui); letter-spacing: .05em; text-transform: uppercase; }
.cst-row .c-title, .cst-row .c-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-row .c-st, .cst-row .c-acts { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cst-row .c-acts { justify-content: flex-end; }
.cst-row .c-date, .cst-row .c-when { color: var(--text-2); white-space: nowrap; }
.cst-row .chip.pay-src { margin-left: 0; }
.cst-docs .cst-row { grid-template-columns: 120px minmax(0, 1fr) 96px 200px 104px; }
.cst-pay { min-height: 32px; border-top-color: transparent; padding-top: 0; }
.cst-pay .c-title { display: flex; align-items: center; gap: 8px; }
.cst-rems .cst-row { grid-template-columns: 112px minmax(0, 1fr) auto; padding-top: 6px; padding-bottom: 6px; }
.cst-rems .c-text { white-space: normal; }
.cst-rems .c-text a { color: inherit; text-decoration: none; } @media (hover: hover) and (pointer: fine) { .cst-rems .c-text a:hover { text-decoration: underline; } }
.cst-rems .cst-row.due { background: var(--warn-bg); } .cst-rems .cst-row.due .c-when { color: var(--warn); font-weight: 600; }
.cst-mail .cst-row { grid-template-columns: 132px minmax(0, 1fr) auto; padding-top: 6px; padding-bottom: 6px; }
.cst-mail .c-text { display: grid; } .cst-mail .c-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-job { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name stage next" "facts facts facts"; align-items: center; gap: 6px 16px; padding: 10px 12px; border-top: 1px solid var(--hair); }
.cst-job:first-child { border-top: 0; }
.cst-job-name { grid-area: name; display: flex; align-items: baseline; gap: 8px; min-width: 0; color: inherit; text-decoration: none; font-size: 14px; }
.cst-job-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .cst-job-name:hover span { text-decoration: underline; } }
.cst-job-stage { grid-area: stage; display: flex; align-items: center; gap: 8px; }
.cst-job-next { grid-area: next; display: flex; justify-content: flex-end; }
.cst-job-facts { grid-area: facts; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; color: var(--text-2); font-size: 12.5px; line-height: 18px; }
.cst-fact { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; } @media (hover: hover) and (pointer: fine) { a.cst-fact:hover { color: var(--text); text-decoration: underline; } }
.cst-track { display: inline-flex; align-items: center; gap: 2px; }
.cst-track .seg { width: 12px; height: 6px; border-radius: 2px; background: var(--hair-2); }
.cst-track .seg.done { background: var(--on-line); } .cst-track .seg.now { background: var(--accent); }
.cst-track .seg.now.side-hold { background: var(--warn); } .cst-track .seg.now.side-cancelled { background: var(--danger); } .cst-track .seg.now.side-return { background: var(--purple); }
/* ---- alignment pass (1 Nov 2026; Sean: "align your text, pills and fields properly ... clean, symmetric and in place") */
/* the window title never gives way to the toolbar ("Clie…"); a toolbar that does not fit folds into More (responsive.mjs) */
.pbar h1 { flex-shrink: 0; max-width: 45%; }
/* a link inside a page is the brand's ink, never the browser's blue */
main#main a:not([class]) { color: var(--on-line); text-underline-offset: 2px; }
/* a segment that is a link reads like its neighbour, not underlined */
.seg > a.tab { text-decoration: none; }
/* a button beside a field is the field's height (Mail's toolbar, the sender filters, the bill amount) */
.bar:has(> input:not([type="checkbox"]):not([type="radio"]), > select) > .btn { min-height: var(--ctl); }
.mt-search { flex: 0 1 320px; min-width: 240px; }
/* Mail redesign (2 Nov 2026): a top bar of four, toolbars of at most five that never wrap (icons only in a narrow pane),
   the selection bar in the list header's place, Sean's shortcuts, and the conversation trail */
.mt-top { margin: 0 0 8px; flex-wrap: wrap; row-gap: 6px; }
.mt-top .mt-search { flex: 0 1 420px; }
button.mt-syncstate { border: 0; background: none; padding: 4px 6px; border-radius: var(--r-ctl); cursor: pointer; font: inherit; font-size: 12px; color: var(--text-3); }
@media (hover: hover) and (pointer: fine) { button.mt-syncstate:hover { background: var(--sheet-2); color: var(--text); } }
.mt-listhead[hidden] { display: none; }
.mt-selbar { flex-wrap: nowrap; min-height: 33px; }
.mt-selbar > b { white-space: nowrap; }
.mt-filt { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 500; padding: 2px 4px; border-radius: var(--r-ctl); cursor: pointer; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .mt-filt:hover { background: var(--sheet); color: var(--text); } }
.mt-count { font-size: 11px; font-weight: 600; color: var(--text-2); border: 1px solid var(--hair); border-radius: 999px; padding: 0 6px; line-height: 16px; font-variant-numeric: tabular-nums; }
.mt-pane { container-type: inline-size; }
.mt-acts { flex-wrap: nowrap; min-width: 0; }
.mt-splitbtn { display: inline-flex; }
.mt-splitbtn > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mt-splitbtn > .mt-caret { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 1px; padding-left: 6px; padding-right: 6px; }
@container (max-width: 560px) { .mt-acts .lbl { display: none; } }
.mt-short .t { font-weight: 500; }
.mt-shorts { display: grid; gap: 6px; }
.mt-shortrow { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.mt-shortrow .grow { min-width: 0; }
.mt-shortrow .hint { font-size: 12px; overflow-wrap: anywhere; }
.mt-trailwrap { display: flex; flex-direction: column; min-width: 0; }
.mt-trailhead { display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--hair); font-size: 12px; font-weight: 600; color: var(--text-2); }
.mt-ti { border-bottom: 1px solid var(--hair); min-width: 0; }
.mt-ti[hidden] { display: none; }
.mt-ti.me { box-shadow: inset 3px 0 0 var(--navy, var(--poseidon)); }
.mt-tline { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 16px; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .mt-tline:hover { background: var(--sheet-2); } }
.mt-ti.open > .mt-tline { background: var(--sheet-2); }
.mt-ti.cur.open > .mt-tline { cursor: default; }
.mt-tav { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: var(--sheet-2); color: var(--text-2); border: 1px solid var(--hair); }
.mt-ti.me .mt-tav { color: var(--navy, var(--poseidon)); }
.mt-twho { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.mt-tsnip { flex: 1 1 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-tav { flex: none; }
.mt-ti.open .mt-tsnip { visibility: hidden; }
.mt-twhen { white-space: nowrap; font-size: 12px; }
.mt-tmsg, .mt-tmsg .mail-body { min-height: 320px; }
@media (min-width: 900px) { .mt-tmsg, .mt-tmsg .mail-body { min-height: max(320px, calc(100vh - 440px)); } } /* an email in a conversation fills the pane too (14 Nov 2026) */
.mt-ttext { white-space: pre-wrap; padding: 4px 16px 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.mt-tnote { margin: 0; padding: 6px 16px 0; font-size: 12px; }
.mt-tdraft { margin: 0; padding: 6px 16px 0; }
.mt-tmore { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--hair); background: var(--sheet-2); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 16px; cursor: pointer; text-align: center; }
@container (max-width: 560px) { .mt-twho { flex: 1 1 auto; min-width: 0; } .mt-tline > .mt-tsnip, .mt-tline > .mt-draft, .mt-tline > span.hint:not(.mt-twhen) { display: none; } .mt-twho { max-width: none; } }
@media (min-width: 900px) { .mt-pane > .mt-head { position: sticky; top: 0; z-index: 2; } }
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) { .mail-page > .mt-top > .mt-search { flex: 1 1 100%; order: -1; } .mail-page > .mt-top > h1 { display: none; } .mail-page > .mt-top > .btn:not(.primary) .lbl { display: none; } .mail-page > .mt-top > .btn { flex: 0 0 auto; } }
/* Mail on a phone: each toolbar row fills the width evenly (the lanes themselves are their own screen, see the data-ph rules above) */
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .mail-page > .bar > input, .mail-page > .bar > select, .mail-page > .bar > .btn, .mail-page > .bar > .seg { flex: 1 1 auto; min-width: 0; }
  .mail-page > .bar > .hint { display: none; }
}
/* Today's reminders: the words in ink, the one-tap step in its own column so every Mark done lines up, one control height */
main#main .rem-list .t a, main#main .cst-rems .c-text a { color: inherit; text-decoration: none; } @media (hover: hover) and (pointer: fine) { main#main .rem-list .t a:hover, main#main .cst-rems .c-text a:hover { text-decoration: underline; } }
.rem-acts { align-items: center; flex-wrap: nowrap; }
.rem-list li .rem-acts select { height: var(--ctl-sm); padding: 0 8px; }
.rem-step { display: inline-flex; justify-content: flex-end; min-width: 128px; }
@media (max-width: 760px) { .rem-list li { flex-wrap: wrap; } .rem-list .when { width: auto; } .rem-list .t { flex: 1 1 100%; order: 2; }
  .rem-acts { order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; } .rem-acts > * { width: 100%; min-width: 0; }
  .rem-step { min-width: 0; grid-column: 1 / -1; } .rem-step:empty { display: none; } .rem-step .btn { flex: 1 1 auto; } }
/* "HQ did this": every row the same height whether it has Undo or not */
.calm-did table.list td { height: calc(var(--ctl-sm) + 12px); vertical-align: middle; }
/* the sender book fits its panel: fixed columns, each control the width of its column */
.calm-table { width: 100%; table-layout: fixed; }
.calm-table th:nth-child(1) { width: 27%; } .calm-table th:nth-child(2) { width: 15%; } .calm-table th:nth-child(3) { width: 18%; } .calm-table th:nth-child(4) { width: 16%; } .calm-table th:nth-child(5) { width: 14%; } .calm-table th:nth-child(6) { width: 116px; }
.calm-table td { overflow-wrap: anywhere; }
.calm-table select, .calm-table input[type=text] { width: 100%; max-width: none; min-width: 0; }
.calm-table select, .calm-table input[type=text] { height: var(--ctl); padding: 0 6px; font-size: 13px !important; }
.calm-table td > .chip:first-child { margin-top: calc((var(--ctl) - var(--pill-h)) / 2); }
@media (max-width: 900px), (pointer: coarse) { .calm-table select, .calm-table input[type=text] { font-size: 16px !important; } }
/* the "Updated — refresh" pill: a 6 px-cornered control like every other, text dead centre */
.live-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl-sm); border-radius: var(--r-pill); font-size: 12.5px; }
/* the job's buttons: one height for the next step and the side tools */
.pipe-side .btn.small { min-height: var(--ctl); }
@media (max-width: 640px) { .pipe-side { display: flex; width: 100%; margin-left: 0; gap: 6px; } .pipe-side .btn { flex: 1 1 0; } }
/* Pay now on an invoice: the label, the words and the button on one centre line */
.kv.paynow { align-items: center; } .kv.paynow > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* the client header: its actions in one row at the right (the slot other client tools add theirs to) */
.rec-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.rec-head > .grow { flex: 1 1 auto; }
.rec-head .back { width: var(--ctl); height: var(--ctl); align-items: center; justify-content: center; border-radius: var(--r-ctl); color: var(--text-2); text-decoration: none; flex: none; }
@media (hover: hover) and (pointer: fine) { .rec-head .back:hover { background: var(--sheet-2); color: var(--text); } }
@media (max-width: 760px) {
  .cst-cols { grid-template-columns: minmax(0, 1fr); }
  .cst-head { display: none; }
  .cst-docs .cst-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num amt" "title title" "st date"; row-gap: 4px; padding: 8px 12px; }
  .cst-docs .c-num { grid-area: num; } .cst-docs .c-title { grid-area: title; white-space: normal; } .cst-docs .c-date { grid-area: date; justify-self: end; } .cst-docs .c-st { grid-area: st; flex-wrap: wrap; } .cst-docs .c-amt { grid-area: amt; }
  .cst-docs .cst-pay { grid-template-areas: "title title" "date amt"; padding-top: 0; } .cst-docs .cst-pay .c-num, .cst-docs .cst-pay .c-st { display: none; } .cst-docs .cst-pay .c-date { justify-self: start; }
  .cst-rems .cst-row, .cst-mail .cst-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when acts" "text text"; row-gap: 4px; padding: 8px 12px; }
  .cst-row .c-when { grid-area: when; } .cst-row .c-text { grid-area: text; } .cst-row .c-acts { grid-area: acts; }
  .cst-job { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "stage" "facts" "next"; }
  .cst-job-name span { white-space: normal; }
  .cst-job-stage { flex-wrap: wrap; }
  .cst-job-next { justify-content: stretch; } .cst-job-next .btn { flex: 1 1 auto; }
  .rec-head .who { flex: 1 1 calc(100% - 120px); }
  .rec-head > .grow { display: none; }
  .rec-actions { margin-left: auto; } .rec-actions .btn { padding: 0 8px; }
}

/* client card › Client portal: the job builder's requests and the per-job toggles (1 Nov 2026) */
.portal-req-job { display: grid; gap: 3px; padding: 6px 0; border-top: 1px solid var(--line); }
.portal-req-job:first-of-type { border-top: 0; }
.portal-req-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.portal-req-files img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; border: 1px solid var(--line); }
.portal-vis { margin: 8px 0; }
.portal-vis-t { width: 100%; border-collapse: collapse; font-size: 12px; }
.portal-vis-t th, .portal-vis-t td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.portal-vis-t .c { text-align: center; width: 64px; }
.portal-vis-t input { margin: 0; }

/* The client workspace (office/ui/workspace.mjs, 1 Nov 2026): header with the money, tabs, a card per job, the client pane.
   Sizes on the 4 px grid; cards 12 px corners as the approved design; one column below 1080 px of page, phone rows stack. */
.ws { --ws-done: var(--poseidon); --ws-todo: var(--hair-2); --ws-now-bg: color-mix(in srgb, var(--accent) 16%, var(--sheet)); --ws-now-fg: #8a3b1e; --ws-r: 12px;
  display: grid; gap: 16px; padding: 20px 20px 80px; container-type: inline-size; min-width: 0; }
:root[data-theme="dark"] .ws { --ws-done: var(--info); --ws-now-fg: var(--accent); }
.ws .grow { flex: 1; }
.ws-loading { place-items: center; min-height: 240px; }
.ws-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 460px); gap: 20px; align-items: center; padding: 18px 20px; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--ws-r); box-shadow: var(--shadow-1); }
.ws-av { width: 52px; height: 52px; border-radius: 12px; background: var(--poseidon); color: #fff; display: grid; place-items: center; font: 700 18px/1 var(--f-ui); letter-spacing: .02em; }
.ws-who { min-width: 0; }
.ws-name { font: 700 24px/1.2 var(--f-ui); color: var(--navy); overflow-wrap: anywhere; }
.ws-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--text-2); font-size: 14px; }
.ws-contact > * { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .ws-contact a:hover { color: var(--text); } }
.ws-contact .on { color: var(--ok); font-weight: 600; }
.ws-figs, .ws-figrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ws-figrow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ws-fig { border: 1px solid var(--hair); border-radius: 10px; padding: 10px 14px; background: var(--sheet); min-width: 0; }
.ws-fig .k { display: block; font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.ws-fig b { display: block; font: 600 18px/1.3 var(--f-ui); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-fig.warn b { color: var(--danger); }
a.ws-fig { display: block; text-decoration: none; color: inherit; }
@media (hover: hover) and (pointer: fine) { a.ws-fig:hover { border-color: var(--line-2, #c9d2dc); } a.ws-fig:hover b { text-decoration: underline; text-underline-offset: 3px; } }
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 20px; align-items: start; }
.ws-main { display: grid; gap: 16px; min-width: 0; }
.ws-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ws-tab { display: inline-flex; align-items: center; height: var(--ctl); padding: 0 14px; border-radius: 8px; border: 1px solid var(--hair-2); background: var(--sheet); color: var(--text); font: 500 14px/1 var(--f-ui); text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .ws-tab:hover { border-color: var(--poseidon); } }
.ws-tab.on { background: var(--poseidon); border-color: var(--poseidon); color: #fff; font-weight: 600; }
.ws-card { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--ws-r); box-shadow: var(--shadow-1); overflow: hidden; min-width: 0; }
.ws-card-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 20px; border-bottom: 1px solid var(--hair); }
.ws-num { font: 700 17px/1.3 var(--f-ui); color: var(--navy); text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { a.ws-num:hover { text-decoration: underline; } }
.ws-card-sub { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.ws-card-b { padding: 16px 20px 4px; display: grid; gap: 14px; }
.ws-pad { padding: 14px 20px; }
.ws-empty { padding: 28px 20px; display: grid; justify-items: start; gap: 10px; }
.ws-empty p { margin: 0; color: var(--text-2); }
.chip.ws-now { background: var(--ws-now-bg); color: var(--ws-now-fg); }
/* the nine steps: a bar each, done navy, the one in progress orange, the rest grey */
.ws-steps { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; align-items: start; }
.ws-step { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; }
.ws-step i { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--ws-todo); }
.ws-step.done i { background: var(--ws-done); }
.ws-step.current i { background: var(--accent); }
.ws-step.skipped i { background: repeating-linear-gradient(90deg, var(--ws-todo) 0 4px, transparent 4px 7px); }
.ws-step .lab { font: 500 12px/1.2 var(--f-ui); color: var(--text-2); overflow-wrap: anywhere; }
.ws-step.done .lab { color: var(--navy); font-weight: 600; }
.ws-step.current .lab { color: var(--ws-now-fg); font-weight: 700; }
.ws-step .note { font-size: 11px; color: var(--text-3); line-height: 1.2; }
.ws-steps.bare { padding: 2px 0; }
.ws-notices { display: grid; gap: 6px; }
.ws-notice { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--info-bg); color: var(--info); text-decoration: none; font-size: 14px; }
.ws-notice .hint { margin-left: auto; color: inherit; opacity: .8; }
/* the next step: what, with whom, one button */
.ws-next { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border-radius: 10px; background: var(--sheet-2); border: 1px solid var(--hair); margin-bottom: 12px; }
.ws-next-t { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.ws-next-t .k { font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.ws-next.who-client .ws-next-t .k { color: var(--ok); }
.ws-next-t b { font: 600 16px/1.35 var(--f-read); color: var(--text); }
.ws-next-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-next-acts .btn { min-height: 40px; padding: 0 16px; }
/* materials: Quoted and Actual (Sean's) */
.ws-mats { padding: 0 20px 6px; }
.ws-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ws-table th { text-align: left; font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding: 8px 6px; white-space: nowrap; }
.ws-table th .you { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ws-table td { padding: 10px 6px; border-top: 1px solid var(--hair); vertical-align: middle; }
.ws-table td b { font-weight: 600; }
.ws-table .r { text-align: right; white-space: nowrap; }
.ws-table .c-st { width: 1%; white-space: nowrap; }
.ws-table td.good { color: var(--ok); font-weight: 600; } .ws-table td.bad { color: var(--danger); font-weight: 600; }
.ws-actual { font: inherit; border: 1px dashed transparent; background: none; color: var(--text); padding: 4px 6px; border-radius: 6px; cursor: text; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .ws-actual:hover { border-color: var(--hair-2); } }
.ws-actual.saving { color: var(--ok); } .ws-actual.over { color: var(--ws-now-fg); }
.ws-actual small { font-size: 12px; }
.c-act input { width: 100px; text-align: right; height: 30px; }
.ws-over { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 8px 20px 16px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--sheet)); color: var(--text); }
.ws-over > .ic { color: var(--ws-now-fg); }
.ws-over .grow { flex: 1 1 260px; }
/* profit, Sean's alone */
.ws-profit { margin: 0 20px 18px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--hair); background: var(--sheet-2); }
.ws-profit-h { display: flex; align-items: center; gap: 6px; font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: 8px; }
.ws-pfs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ws-pf { min-width: 0; display: grid; gap: 2px; align-content: start; }
.ws-pf .k { font-size: 12px; color: var(--text-2); }
.ws-pf b { font: 600 15px/1.3 var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-pf small { font-size: 11px; color: var(--text-3); line-height: 1.25; }
.ws-pf.good b { color: var(--ok); } .ws-pf.bad b { color: var(--danger); }
/* the timeline */
.ws-tl-rows { display: grid; padding: 4px 0; }
.ws-tl-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 9px 20px; color: var(--text); text-decoration: none; border-top: 1px solid var(--hair); }
.ws-tl-row:first-child { border-top: 0; }
/* the client's Record tab: when · kind · what happened · who */
.ws-tl-row.ws-rec-row { grid-template-columns: 112px 118px minmax(0, 1fr) 132px; } /* fixed columns: every row lines up */
.ws-rec-row .chip { justify-self: start; }
.ws-rec-who { text-align: right; overflow-wrap: anywhere; } /* a long name wraps inside its own column, never cut */
.ws-rec-sub { padding: 0 20px 12px; margin-top: -4px; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { a.ws-tl-row:hover { background: var(--sheet-2); } }
.ws-tl-row .when { color: var(--text-2); font-size: 14px; white-space: nowrap; }
.ws-tl-row .what { min-width: 0; overflow-wrap: anywhere; }
.ws-row-acts { display: flex; gap: 6px; }
.chip.ws-src-hq { background: var(--info-bg); color: var(--info); }
.chip.ws-src-client { background: var(--ok-bg); color: var(--ok); }
.chip.ws-src-bank { background: var(--neutral-bg); color: var(--neutral); }
.chip.ws-src-stripe { background: var(--purple-bg); color: var(--purple); }
.chip.ws-src-wait { background: var(--warn-bg); color: var(--warn); }
.ws-done > summary { cursor: pointer; font: 600 14px/1 var(--f-ui); color: var(--text-2); padding: 6px 2px; list-style: none; display: flex; align-items: center; gap: 8px; }
.ws-done > summary::before { content: "▸"; font-size: 12px; } .ws-done[open] > summary::before { content: "▾"; }
.ws-done[open] { display: grid; gap: 16px; }
.ws-sec { padding: 4px 20px 12px; }
.ws-sec .rec-sec { border: 0; padding: 0; margin: 0; box-shadow: none; background: none; }
.ws-compose { display: grid; gap: 10px; }
.ws-compose textarea { width: 100%; resize: vertical; }
.ws-row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ws-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; padding: 16px 20px; }
.ws-ph { display: grid; gap: 4px; color: var(--text-2); text-decoration: none; font-size: 12px; }
.ws-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--sheet-2); }
/* the client pane */
.ws-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; position: sticky; top: 12px; min-width: 0; } /* its contents fit its width (4 Nov 2026: no sideways scroll) */
.ws-pane-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--ws-r); background: var(--poseidon); color: #fff; }
.ws-pane-bar .grow { display: grid; gap: 2px; min-width: 0; }
.ws-pane-bar small { opacity: .8; font-size: 13px; }
.ws-pane-bar .btn.primary { min-height: 38px; padding: 0 16px; }
.ws-pane-bar .btn.primary[disabled] { opacity: .5; }
.wsp { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--ws-r); overflow: hidden; box-shadow: var(--shadow-1); }
.wsp-brand { padding: 12px 16px; border-bottom: 1px solid var(--hair); box-shadow: inset 4px 0 0 var(--wsp-accent, var(--poseidon)); font: 700 12px/1.3 'Archivo', var(--f-ui); letter-spacing: .05em; color: var(--navy); } /* the owning business's accent (Poseidon when it has none) */
.wsp-body { padding: 16px; display: grid; gap: 12px; }
.wsp-job { display: grid; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.wsp-title { font: 700 16px/1.3 var(--f-ui); color: var(--navy); }
.wsp-steps { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.wsp-steps i { height: 5px; border-radius: 3px; background: var(--ws-todo); }
.wsp-steps i.done { background: var(--ws-done); } .wsp-steps i.current { background: var(--accent); } .wsp-steps i.skipped { background: repeating-linear-gradient(90deg, var(--ws-todo) 0 3px, transparent 3px 6px); }
.wsp-next { margin: 0; font-size: 14px; color: var(--text-2); }
.wsp-k { font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-top: 2px; }
.wsp-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; font-size: 14px; }
.wsp-docs { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 10px; align-items: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.wsp-docs a { color: var(--text); text-decoration: none; } @media (hover: hover) and (pointer: fine) { .wsp-docs a:hover { text-decoration: underline; } }
.wsp-docs .r { text-align: right; }
.wsp-upd p { margin: 0 0 6px; font-size: 14px; color: var(--text-2); }
.ws-held { border: 2px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--accent) 6%, var(--sheet)); display: grid; gap: 6px; }
.ws-held-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-held-h .grow { flex: 1 1 0; min-width: 0; }
.ws-held-t { font: 600 13px/1.3 var(--f-ui); color: var(--text); min-width: 0; }
.ws-held p { margin: 0; font-size: 14px; }
.ws-held textarea { width: 100%; resize: vertical; }
.chip.ws-held-chip { background: var(--accent); color: var(--ink-950); font-weight: 700; }
.ws-vis, .ws-auto { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--ws-r); padding: 14px 16px; box-shadow: var(--shadow-1); }
.ws-vis-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ws-vis-h b { color: var(--navy); font-family: var(--f-ui); }
.ws-vis-h select { max-width: 200px; height: var(--ctl-sm); }
.ws-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ws-vis-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ws-tog { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--hair-2); border-radius: 8px; font-size: 14px; cursor: pointer; min-width: 0; white-space: nowrap; overflow: hidden; }
.ws-tog.on { border-color: var(--poseidon); }
.ws-tog.off { opacity: .5; cursor: default; }
.ws-tog input, .ws-sw input, .ws-auto input { margin: 0; width: 16px; height: 16px; flex: none; }
.ws-auto { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ws-auto span { display: grid; gap: 2px; }
.ws-auto small { color: var(--text-2); font-size: 13px; }
/* one column: the pane under the work; phone: rows stack, labels on the left */
@container (max-width: 1080px) {
  .ws-grid { grid-template-columns: minmax(0, 1fr); }
  .ws-pane { position: static; }
}
@container (max-width: 760px) {
  .ws-head { grid-template-columns: 52px minmax(0, 1fr); }
  .ws-figs { grid-column: 1 / -1; }
  .ws-pfs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-figrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 600px) {
  .ws-head { padding: 14px 16px; gap: 12px 14px; }
  .ws-name { font-size: 20px; }
  .ws-figs { gap: 8px; } .ws-fig { padding: 8px 10px; } .ws-fig b { font-size: 15px; letter-spacing: -.01em; }
  .ws-fig .k { font-size: 10px; }
  .ws-card-h, .ws-card-b, .ws-pad { padding-left: 16px; padding-right: 16px; }
  .ws-mats { padding: 0 16px 6px; }
  .ws-over, .ws-profit { margin-left: 16px; margin-right: 16px; }
  .ws-steps { position: relative; padding-bottom: 20px; }
  .ws-step .lab, .ws-step .note { display: none; }
  .ws-step.current .lab { display: block; position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
  .ws-next-acts { width: 100%; } .ws-next-acts .btn { flex: 1; }
  .ws-table thead { display: none; }
  .ws-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
  .ws-table td { border: 0; padding: 0; text-align: left !important; }
  .ws-table td:first-child { grid-column: 1 / -1; }
  .ws-table td[data-l]::before { content: attr(data-l); display: block; font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
  .ws-table .c-st { width: auto; }
  .ws-actual { padding: 2px 0; }
  .ws-tl-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 16px; }
  .ws-tl-row .when { grid-column: 1 / -1; font-size: 12px; }
  .ws-proj .ws-row-acts { grid-column: 1 / -1; }
  .ws-vis-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .ws-tabs .grow { display: none; }
}

/* ---- workspace fixes (1 Nov 2026): the chip stays right in the header, cards fold to one row, the status menu chip,
   labour and services under the materials, the close-out, the Variation dialog ---- */
.ws-card-h { flex-wrap: nowrap; min-width: 0; }
.ws-card-h .ws-num { flex: none; }
.ws-card-sub { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ws-card-h > .chip, .ws-card-h > .ws-nextchip, .ws-card-h > .ws-plan { flex: none; white-space: nowrap; }
.ws-card-h > .chip:last-child { margin-left: auto; }
.ws-fold { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: -8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ws-fold:hover { background: var(--sheet-2); color: var(--text); } }
.ws-card.folded .ws-card-h { border-bottom: 0; padding-top: 10px; padding-bottom: 10px; cursor: pointer; }
.ws-card.folded .ws-num { font-size: 15px; }
.ws-card.folded .ws-card-sub { -webkit-line-clamp: 1; }
.ws-mini { flex: 0 1 150px; min-width: 70px; }
.ws-mini .ws-steps { grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 2px; padding: 0; }
.ws-mini .ws-step i { height: 4px; }
.ws-nextchip.who-you { background: var(--warn-bg); color: var(--warn); }
.ws-nextchip.who-client { background: var(--ok-bg); color: var(--ok); }
.ws-foldbar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ws-steps:has(> .ws-step:nth-child(10)) { grid-template-columns: repeat(10, minmax(0, 1fr)); }
select.chip-select { appearance: none; -webkit-appearance: none; border: 0; font: 600 12px/1 var(--f-ui); height: 26px; padding: 0 22px 0 9px; border-radius: 6px; cursor: pointer; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 11px center, right 7px center; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
select.chip-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ws-svc-h td { font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding-top: 14px; }
.ws-svc td { color: var(--text-2); }
.ws-co { margin: 0 20px 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--hair); background: var(--sheet-2); transition: box-shadow .3s; }
.ws-co.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.ws-co.done { border-color: color-mix(in srgb, var(--ok) 40%, var(--hair)); }
.ws-co-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ws-co-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ws-co-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; padding: 7px 0; border-top: 1px solid var(--hair); }
.ws-co-tick { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--hair-2); font-size: 12px; color: var(--ok); }
.ws-co-list li.ok .ws-co-tick { border-color: var(--ok); background: var(--ok-bg); }
.ws-co-t { display: grid; gap: 1px; min-width: 0; } .ws-co-t > span { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.ws-co-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 10px; }
.ws-co-line { display: inline-flex; gap: 8px; align-items: baseline; font-size: 13px; }
.ws-var-modes { display: grid; gap: 8px; margin: 4px 0 10px; }
.ws-var-mode { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; padding: 10px 12px; border: 1px solid var(--hair-2); border-radius: 8px; cursor: pointer; }
.ws-var-mode:has(input:checked) { border-color: var(--poseidon); background: var(--sheet-2); }
.ws-var-mode span { display: grid; gap: 2px; } .ws-var-mode small { color: var(--text-2); }
.mats-svc { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 8px; display: grid; gap: 6px; }
.mats-svc-row { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
@container (max-width: 600px) {
  .ws-co { margin-left: 16px; margin-right: 16px; }
  .ws-co-list li { grid-template-columns: 20px minmax(0, 1fr); }
  .ws-co-acts { grid-column: 2; justify-content: flex-start; }
  .ws-card.folded .ws-card-h { flex-wrap: wrap; row-gap: 6px; }
  .ws-card.folded .ws-card-sub { flex-basis: calc(100% - 140px); }
  .ws-mini { order: 5; flex: 1 1 100%; margin-left: 20px; }
  .ws-card.folded .ws-nextchip { order: 6; margin-left: 20px; }
  .ws-card.folded .ws-card-h > .chip:last-child { order: 3; }
  .ws-foldbar .hint { display: none; }
}
select.chip-select { width: auto; display: inline-block; justify-self: start; }
#main .ws-table select.chip-select { width: auto; min-width: 0; height: 26px; }
.ws-tl-grp > summary, .rec-grp > summary { list-style: none; cursor: pointer; }
.ws-tl-grp > summary::-webkit-details-marker, .rec-grp > summary::-webkit-details-marker { display: none; }
.ws-tl-grp > summary .what::before, .rec-grp > summary .rec-sum::before { content: "▸ "; color: var(--text-3); }
.ws-tl-grp[open] > summary .what::before, .rec-grp[open] > summary .rec-sum::before { content: "▾ "; }
.ws-tl-row.sub, .rec-row.sub { padding-left: 28px; opacity: .85; }
#main select.chip-select { field-sizing: content; }
@container (max-width: 600px) {
  /* the number and the status chip share the first row (chip right), the description wraps below them */
  .ws-card:not(.folded) .ws-card-h { flex-wrap: wrap; row-gap: 4px; }
  .ws-card:not(.folded) .ws-card-sub { order: 5; flex: 1 1 100%; padding-left: 20px; }
  .ws-card:not(.folded) .ws-plan { display: none; }
}
/* engagement and Marketing & reach (1 Nov 2026; hq/ui/engagement.mjs, hq/ui/marketing.mjs) */
.chip.eng-hot { background: var(--danger-bg); color: var(--danger); }
.chip.eng-warm { background: var(--warn-bg); color: var(--warn); }
.chip.eng-quiet { background: var(--info-bg); color: var(--info); }
.eng-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px; margin: 6px 0 2px; border: 1px solid var(--hair); border-radius: var(--r-ctl); font-size: 13px; }
.eng-strip .eng-text { color: var(--text-2); }
.eng-strip .eng-nudge { font-weight: 600; }
.eng-today .need { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.eng-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mk .ws-tabs { margin: 8px 0 12px; }
.mk-body h2 { margin: 18px 0 6px; }
.mk td.link { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Driving day (hq/ui/drive.mjs, 1 Nov 2026): big answer buttons, today's jobs, the trailer switch, the nav sheet */
.drv-page h2 { margin: 16px 0 8px; }
.drv-ask { border-left: 4px solid var(--accent); }
.drv-ask h2 { margin-top: 0; }
.drv-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.drv-choices .btn.big { justify-content: flex-start; height: auto; min-height: 48px; padding: 8px 14px; text-align: left; white-space: normal; line-height: 1.25; }
.drv-other { display: flex; gap: 8px; margin-top: 10px; }
.drv-other input { flex: 1; min-width: 0; }
.drv-job { margin-bottom: 8px; }
.drv-job.on { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.drv-job .bar { gap: 6px; flex-wrap: wrap; }
.drv-acts, .drv-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.drv-held { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.drv-held .chip { border: 0; cursor: pointer; }
.drv-warn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; margin: 8px 0; }
.drv-warn ul { margin: 4px 0 0; padding-left: 18px; }
.drv-warn .drv-low { color: var(--danger); }
.drv-vehs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.drv-veh .bar { gap: 6px; }
.drv-tow { display: flex; align-items: center; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.drv-tow select { max-width: 220px; }
.drv-odo { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; cursor: pointer; font: inherit; text-align: left; }
.drv-run { gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.drv-nav h3 { display: flex; align-items: center; gap: 4px; margin: 12px 0 2px; }
.drv-go { text-decoration: none; }
.drv-words { white-space: pre-wrap; padding: 10px 12px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet-2); font-size: 15px; line-height: 1.4; }
.drv-open { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.drv-day table.list tbody tr { cursor: pointer; }
.drv-set h3 { display: flex; align-items: center; gap: 4px; }
.drv-key { word-break: break-all; }
.drv-guide ol { padding-left: 20px; display: grid; gap: 8px; }
.drv-guide code { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .drv-page > .bar { flex-wrap: wrap; gap: 6px; }
  .drv-page > .bar h1 { flex: 1 1 100%; }
  .drv-choices { grid-template-columns: 1fr; }
  .drv-acts .btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .drv-links .btn { flex: 1 1 100%; justify-content: center; }
  .drv-vehs { grid-template-columns: 1fr; }
}
/* the Record tab follows the card's own width (container queries), so the menu and the client pane beside it never squeeze
   the words: wide = four columns; medium = time · kind · who on one line, the words across the card under them; narrow (a
   phone) = time · kind, the words, then who under them */
.ws-tl:has(.ws-rec-row) { container-type: inline-size; }
@container (max-width: 760px) {
  .ws-tl-row.ws-rec-row { grid-template-columns: 84px auto minmax(0, 1fr); gap: 4px 12px; }
  .ws-tl-row.ws-rec-row .when { grid-column: auto; font-size: 13px; }
  .ws-tl-row.ws-rec-row .what { grid-column: 1 / -1; order: 1; }
}
@container (max-width: 440px) {
  .ws-tl-row.ws-rec-row { grid-template-columns: 84px minmax(0, 1fr); }
  .ws-tl-row.ws-rec-row .when { font-size: 12px; }
  .ws-tl-row.ws-rec-row .ws-rec-who { grid-column: 1 / -1; order: 2; text-align: left; font-size: 12px; }
}
/* the bell's Notifications page (hq/ui/notices.mjs): the Record's aligned rows as buttons, a day heading, unread in bold */
.nt-page { display: grid; gap: 12px; }
.nt-head { flex-wrap: wrap; gap: 8px; } .nt-search { flex: 1 1 240px; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); color: var(--text); font: inherit; }
.nt-more { height: 1px; }
.nt-day { padding: 12px 20px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); border-top: 1px solid var(--hair); }
.nt-day:first-child { border-top: 0; }
button.nt-row { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--hair); font: inherit; cursor: pointer; }
button.nt-row .nt-text { color: var(--text-2); }
button.nt-row.unread .nt-title { font-weight: 700; }
button.nt-row.unread .when::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #D97757); margin-right: 6px; vertical-align: middle; }
@media (hover: hover) and (pointer: fine) { button.nt-row:hover { background: var(--sheet-2); } }
.nt-deadlines { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid var(--hair); border-radius: 10px; background: var(--sheet); color: var(--text); text-decoration: none; font: inherit; text-align: left; width: 100%; cursor: pointer; }


/* ---- Walk 1 (1 Nov 2026, Jay's workspace): fixed structure, text wraps inside its own column, nothing pushes the next one out
   of line; container queries on the workspace (.ws is the container) so the layout follows the card's width (notes 24, 39). */
/* note 16: a paid deposit is green; a deposit never taken is amber */
.ws-step.paid i { background: var(--ok-line, var(--ok)); }
/* paid but not yet proven (entered by hand, not seen in the bank): amber until the bank, Stripe or Sean's "Seen in NAB" proves it */
.ws-step.pending i { background: var(--warn-line, #e0a526); } .ws-step.pending .lab { color: var(--warn); }
.ws-step.late i { background: var(--danger, #c0392b); } .ws-step.late .lab { color: var(--danger, #c0392b); }
.ws-step.paid .lab { color: var(--ok); }
.ws-step.warn i { background: repeating-linear-gradient(90deg, var(--warn) 0 4px, transparent 4px 7px); }
.ws-step.warn .note { color: var(--warn); font-weight: 600; }
.wsp-steps i.paid { background: var(--ok-line, var(--ok)) !important; } .wsp-steps i.pending { background: var(--warn-line, #e0a526) !important; } .wsp-steps i.late { background: var(--danger, #c0392b) !important; }
/* note 1: the tile names the step in the to-do colour; the drop-down of its choices sits with the buttons */
.ws-next.who-you { border-color: color-mix(in srgb, var(--accent) 45%, var(--hair)); background: var(--ws-now-bg); }
.ws-next.who-you .ws-next-t .k { color: var(--ws-now-fg); }
.ws-next-t .k { overflow-wrap: anywhere; }
.ws-next-who { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ws-next-acts { align-items: center; min-width: 0; max-width: 100%; }
.ws-next-menu { min-height: 40px; max-width: 100%; min-width: 0; }
.ws-next-acts .btn.is-blocked { opacity: 1; border-style: dashed; }
/* note 32: the PAID stamp on a job paid in full (as on a paid invoice) */
/* the PAID stamp (Sean, 1 Nov 2026: "light and fresh, matching the bright orange"): a fresh green line on a light green tint, the
   words a deeper green so the small date stays readable; the same three colours in the portal and on the PDF */
:root { --paid-line: var(--ok-line, #3dbb74); --paid-ink: var(--ok, #23874f); --paid-tint: var(--ok-bg, #eaf8f0); }
:root[data-theme="dark"] { --paid-line: #5fd597; --paid-ink: #8be6b4; --paid-tint: rgba(61, 187, 116, .14); } /* the stamp keeps a softer tint than --ok-bg in dark */
.ws-paid-stamp { justify-self: start; display: inline-grid; justify-items: center; margin: 0 0 10px; padding: 2px 12px; border: 3px solid var(--paid-line); border-radius: 6px; background: var(--paid-tint); color: var(--paid-ink); font: 800 18px/1.1 var(--f-ui); letter-spacing: .14em; transform: rotate(-4deg); }
.ws-paid-stamp small { font: 700 10px/1.2 var(--f-ui); letter-spacing: .04em; }
.wsp-job > .ws-paid-stamp { margin: 4px 0 8px; font-size: 15px; }
/* notes 5, 6, 9, 39: material lines as fixed rows (the .ws-rec-row pattern): the name wraps in its own column, figures right-
   aligned and never wrapped; below 760 px of card the figures sit in a tidy row under the name */
.ws-plan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 0; border-top: 1px solid var(--hair); }
.ws-plan-bar .k { font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.ws-plan-bar select { min-width: 0; max-width: 100%; }
.ws-plan-warn { white-space: normal; height: auto; min-height: var(--pill-h); text-align: left; }
.ws-mat-table { table-layout: fixed; }
.ws-mat-table col.c1 { width: auto; }
.ws-mat-table th:nth-child(2) { width: 150px; } .ws-mat-table th:nth-child(3), .ws-mat-table th:nth-child(4) { width: 112px; } .ws-mat-table th:nth-child(5) { width: 150px; }
.ws-mat-table td.c-mat, .ws-mat-table td.c-mat * { overflow-wrap: anywhere; }
.ws-mat-table td.c-qty { white-space: normal; overflow-wrap: normal; }
.ws-mat-table .c-st { width: auto; white-space: normal; }
.ws-mat-table select.chip-select { max-width: 100%; }
.ws-mat-w { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; padding: 3px 8px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.ws-mat-w .ic { flex: none; margin-top: 1px; }
.ws-mat-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
tr.ws-mat-warn > td:first-child { box-shadow: inset 3px 0 0 var(--warn); padding-left: 10px; }
/* notes 11 and 20: the job's own documents, a draft reads "Draft, not sent" */
.ws-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px; margin: 0 0 12px; }
.ws-doc { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; grid-template-areas: "k n t" "st st st"; gap: 2px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 8px; color: inherit; text-decoration: none; min-width: 0; }
.ws-doc-k { grid-area: k; font-size: 12px; color: var(--text-2); } .ws-doc-n { grid-area: n; overflow-wrap: anywhere; } .ws-doc-t { grid-area: t; text-align: right; white-space: nowrap; }
.ws-doc .chip { grid-area: st; justify-self: start; }
@media (hover: hover) and (pointer: fine) { a.ws-doc:hover { background: var(--sheet-2); } }
/* note 7: the bundle tile, note 14: the expiry line */
.ws-bundle { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 10px; background: var(--sheet-2); display: grid; gap: 6px; }
.ws-bundle-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ws-bundle-rows { display: grid; }
.ws-bundle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 4px 0; border-top: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
.ws-bundle-row:first-child { border-top: 0; }
.ws-bundle-row .r { white-space: nowrap; }
.ws-bundle-t { overflow-wrap: anywhere; min-width: 0; }
.ws-bundle-row.off { color: var(--text-3); text-decoration: line-through; }
.ws-bundle-row.sum { color: var(--text-2); }
.ws-bundle-row.price { font-weight: 700; }
.ws-expiry { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 12px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; overflow-wrap: anywhere; }
.ws-expiry.past { background: var(--danger-bg); color: var(--danger); }
/* notes 22 and 23: Publish never dulled; the traffic light beside it */
.ws-pane-bar { flex-wrap: wrap; }
.ws-pane-bar .grow { flex: 1 1 160px; }
.ws-pane-bar .btn.primary.ws-publish, .ws-pane-bar .btn.primary.ws-publish[disabled] { opacity: 1; }
.ws-light { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font: 600 12px/1.2 var(--f-ui); cursor: pointer; white-space: nowrap; }
.ws-light i { display: block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.ws-light.green i { background: #2fbf71; } .ws-light.yellow i { background: #f2c230; } .ws-light.red i { background: #e5484d; }
.ws-light-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; } .ws-light-list li { overflow-wrap: anywhere; } .ws-light-list li.red { color: var(--danger); font-weight: 600; }
/* note 25: details from the portal, waiting for Sean */
.ws-details { display: grid; gap: 8px; }
.ws-diff { margin: 6px 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
/* note 18: the payment source chip in full; it wraps inside its own column, never cut */
.chip.pay-src { height: auto; min-height: var(--pill-h); white-space: normal; text-align: left; line-height: 1.25; padding-top: 3px; padding-bottom: 3px; max-width: 100%; }
.chip.pay-src .pay-src-t { overflow-wrap: anywhere; min-width: 0; }
.cst-docs .cst-pay { grid-template-columns: 120px minmax(0, 1fr) 96px 104px; }
.cst-pay .c-paysrc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.pay-seen { font-size: 12px; white-space: nowrap; }
/* note 34: the close-out list on fixed columns: the label never squashes; the material lines get their own full row */
.ws-co-list li { grid-template-columns: 20px minmax(160px, 2fr) minmax(0, 3fr); }
.ws-co-acts { min-width: 0; }
.ws-co-list li:has(.ws-co-line) .ws-co-acts { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); justify-content: stretch; gap: 6px 12px; }
.ws-co-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; padding: 4px 8px; border-radius: 6px; background: var(--sheet); }
.ws-co-line > span:first-child { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
/* note 26: photos by stage with the client's answer and Sean's approval */
.ws-perm-job { padding: 12px 20px; border-top: 1px solid var(--hair); display: grid; gap: 8px; }
.ws-perm-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ws-perm-t { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.ws-perm-log { overflow-wrap: anywhere; }
.ws-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ws-perm-ph { margin: 0; display: grid; gap: 6px; min-width: 0; }
.ws-perm-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--sheet-2); }
.ws-perm-ph.hidden img { opacity: .4; }
.ws-perm-ph figcaption { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; }
/* note 36: receipts, hours and photos straight from the close-out */
.ws-drop { display: grid; place-items: center; gap: 6px; padding: 18px; border: 2px dashed var(--hair-2); border-radius: 10px; text-align: center; color: var(--text-2); }
.ws-drop.over { border-color: var(--accent); background: var(--ws-now-bg); }
.ws-drop .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ws-files { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.ws-files li { display: flex; gap: 8px; justify-content: space-between; overflow-wrap: anywhere; } .ws-files li.bad { color: var(--danger); } .ws-files li.ok { color: var(--ok); }
@container (max-width: 760px) {
  .ws-mat-table, .ws-mat-table tbody { display: block; }
  .ws-mat-table thead { display: none; }
  .ws-mat-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
  .ws-mat-table td { border: 0; padding: 0; text-align: left !important; }
  .ws-mat-table td.c-mat, .ws-mat-table tr.ws-svc-h td { grid-column: 1 / -1; }
  .ws-mat-table td.c-st { grid-column: 1 / -1; }
  .ws-mat-table td[data-l]::before { content: attr(data-l); display: block; font: 600 11px/1.3 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
  tr.ws-mat-warn > td:first-child { box-shadow: none; padding-left: 0; }
  .cst-docs .cst-pay { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "paysrc paysrc" "date amt"; }
  .cst-docs .cst-pay .c-num { display: none; } .cst-docs .cst-pay .c-paysrc { grid-area: paysrc; } .cst-docs .cst-pay .c-date { grid-area: date; justify-self: start; } .cst-docs .cst-pay .c-amt { grid-area: amt; }
  .ws .cst-docs .cst-row:not(.cst-pay) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num amt" "title title" "st date"; row-gap: 4px; padding: 8px 12px; }
  .ws .cst-docs .cst-row:not(.cst-pay) .c-num { grid-area: num; } .ws .cst-docs .c-title { grid-area: title; white-space: normal; } .ws .cst-docs .cst-row:not(.cst-pay) .c-date { grid-area: date; justify-self: end; } .ws .cst-docs .c-st { grid-area: st; flex-wrap: wrap; } .ws .cst-docs .cst-row:not(.cst-pay) .c-amt { grid-area: amt; }
  .ws .cst-head { display: none; }
}
@container (max-width: 600px) {
  .ws-perm-job { padding: 12px 16px; }
  .ws-mat-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-co-list li { grid-template-columns: 20px minmax(0, 1fr); }
  .ws-co-list li .ws-co-acts, .ws-co-list li:has(.ws-co-line) .ws-co-acts { grid-column: 2; }
  .ws-next-menu { flex: 1 1 100%; }
  .ws-pane-bar .ws-light, .ws-pane-bar .ws-publish { flex: 1 1 auto; }
}
/* the Materials screen (office/ui/materials.mjs): the same row pattern (note 39) */
.mats-page { container-type: inline-size; }
.mats-wrap table.mats { table-layout: fixed; width: 100%; }
.mats-wrap table.mats td:first-child, .mats-wrap table.mats td:first-child * { overflow-wrap: anywhere; }
.mats-wrap table.mats td.r { white-space: nowrap; }
@container (max-width: 760px) {
  .mats-wrap table.mats, .mats-wrap table.mats tbody, .mats-wrap table.mats tfoot { display: block; }
  .mats-wrap table.mats thead { display: none; }
  .mats-wrap table.mats tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
  .mats-wrap table.mats td { border: 0; padding: 0; text-align: left; }
  .mats-wrap table.mats td:first-child, .mats-wrap table.mats td.acts, .mats-wrap table.mats td.st { grid-column: 1 / -1; }
  .mats-wrap table.mats td.c-sup { display: none; }
}
.ws-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
/* note 24: in the workspace a long title wraps in its own column instead of being cut */
.ws .cst-row .c-title, .ws .cst-row .c-text { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@container (max-width: 600px) { .ws-tabs { flex-wrap: wrap; overflow-x: visible; } .ws-tabs .grow { display: block; flex: 1 1 100%; height: 0; } } /* note 24: the tabs wrap, nothing runs past the card */
@container (max-width: 760px) { .mats-wrap table.mats td { min-width: 0; overflow-wrap: anywhere; } .mats-wrap table.mats tfoot td.hint, .mats-wrap table.mats tfoot td.warn { grid-column: 1 / -1; white-space: normal; } }
/* note 39: the material rows and the close-out follow their OWN width (the card sits beside the client pane on a wide screen) */
.ws-mats, .ws-co, .ws-sec { container-type: inline-size; }
.ws-mat-table td.c-mat::before, .ws-mat-table tr.ws-svc-h td::before { content: none !important; display: none !important; }
/* close-out › Actual costs › From your receipts: material · receipt line · amount · Use, fixed columns; stacked on a narrow card */
.ws-co-rc { display: grid; gap: 0; margin: 6px 0 4px; border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; container-type: inline-size; }
.ws-co-rc-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--sheet-2); }
.ws-co-rc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 84px auto; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--hair); }
.ws-co-rc-mat, .ws-co-rc-rec { min-width: 0; overflow-wrap: anywhere; }
.ws-co-rc-amt { text-align: right; white-space: nowrap; }
.ws-co-rc-acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.ws-co-rc-extra { padding: 8px 12px; border-top: 1px solid var(--hair); }
@container (max-width: 560px) { .ws-co-rc-row { grid-template-columns: minmax(0, 1fr) auto; } .ws-co-rc-mat { grid-column: 1 / -1; } .ws-co-rc-rec { grid-column: 1 / -1; } }
/* client Photos tab: edit a photo by hand (stage, move, remove) under its permission switches */
.ws-ph-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.ws-ph-edit select { max-width: 100%; font-size: 12px; }


/* receipt capture and review (office/ui/receiptcapture.mjs, 1 Nov 2026): the scan's green light, the reading list, the
   full lines table with where each line goes. Fixed structures; text wraps in its own column; adapts to the width. */
.rcap-flash { position: fixed; inset: 0; pointer-events: none; z-index: 9999; box-shadow: inset 0 0 0 10px var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); animation: rcap-fade .65s ease-out forwards; }
.rcap-flash.bad { box-shadow: inset 0 0 0 10px var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
@keyframes rcap-fade { from { opacity: 1; } to { opacity: 0; } }
.rcap-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.rcap-list:empty { display: none; }
.rcap-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; font-size: 13px; padding: 4px 8px; border-radius: 6px; background: var(--neutral-bg); min-width: 0; }
.rcap-list li > span { min-width: 0; overflow-wrap: anywhere; }
.rcap-list li.ok { background: var(--ok-bg); color: var(--ok); } .rcap-list li.warn { background: var(--warn-bg); color: var(--warn); } .rcap-list li.bad { background: var(--danger-bg); color: var(--danger); }
.rc-rot { margin: 6px 0 0; flex-wrap: wrap; gap: 6px; }
.rl { display: grid; gap: 6px; min-width: 0; }
.rl-head { display: flex; align-items: center; gap: 8px; }
.rl-head .grow, .rl-go .grow { flex: 1 1 auto; }
.rl-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px; border: 1px solid var(--hair); border-radius: 8px; min-width: 0; }
.rl-main { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px; min-width: 0; }
.rl-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.rl-money label { display: grid; gap: 2px; font-size: 12px; color: var(--text-2); min-width: 0; }
.rl-row input, .rl-row select { width: 100%; min-width: 0; box-sizing: border-box; }
.rl-go { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.rl-go .rl-dest { flex: 1 1 200px; width: auto; }
.rl-qwrap { display: inline-flex; align-items: center; gap: 4px; }
.rl-qwrap .rl-qpart { width: 70px; }
.rl-check { font-size: 13px; padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.rl-check.ok { background: var(--ok-bg); color: var(--ok); } .rl-check.bad { background: var(--warn-bg); color: var(--warn); } .rl-check.none { background: var(--neutral-bg); color: var(--neutral); }
.rl-parts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; padding: 6px 10px; border-radius: 6px; background: var(--info-bg); color: var(--info); }
.rl-part { overflow-wrap: anywhere; }
.rc-same .bar { flex-wrap: wrap; }
.rc-att-one { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-right: 10px; }
@media (min-width: 900px) { .rl-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr); } .rl-go { grid-column: 1 / -1; } }
/* close-out: the receipt matches take the whole width of their row (they collapsed to 2 px when every open line had a match) */
.ws-co-acts > .ws-co-rc { flex: 1 1 100%; width: 100%; min-width: 0; }
.ws-co-list li:has(.ws-co-rc) .ws-co-acts { grid-column: 2 / -1; display: block; }
/* PAID stamp before the money is proven: amber, "awaiting bank" */
.ws-paid-stamp.pending { border-color: #e0a526; background: color-mix(in srgb, #e0a526 12%, var(--sheet)); color: var(--warn); }


/* the replies Claude prepared, on the client's Messages tab (2 Nov 2026) */
.msg-drafts { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--warn-line, #e0a526); border-radius: 8px; background: color-mix(in srgb, #e0a526 8%, var(--sheet)); }
.msg-draft { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .msg-draft .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }

/* ---- the price book (office/ui/pricebook.mjs, 2 Nov 2026): search, product page, receipt lines, price watch ---- */
.pb-search { display: grid; gap: 8px; margin: 8px 0 14px; }
.pb-sbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-sbar .pb-q { flex: 1 1 260px; min-width: 0; }
.pb-results { min-width: 0; }
.pb-none { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--text-2); }
.pb-table { width: 100%; }
.pb-table td { vertical-align: top; }
.pb-table td.acts { text-align: right; } .pb-table td.acts .btn { margin: 0 0 4px 4px; }
.pb-prod { font-weight: 600; }
.pb-find { margin: 6px 0 10px; } .pb-find > summary { cursor: pointer; color: var(--text-2); padding: 4px 0; }
.pb-chartbox { margin: 10px 0 14px; max-width: 720px; }
.pb-chart { width: 100%; height: auto; display: block; }
.pb-chart .pb-grid { stroke: var(--hair); stroke-width: 1; }
.pb-chart .pb-ax { fill: var(--text-3); font-size: 11px; }
.pb-chart .pb-line { fill: none; stroke-width: 2; }
.pb-s0 { stroke: var(--navy); background: var(--navy); fill: var(--navy); } .pb-s1 { stroke: var(--purple); background: var(--purple); fill: var(--purple); } .pb-s2 { stroke: var(--ok); background: var(--ok); fill: var(--ok); } .pb-s3 { stroke: var(--warn); background: var(--warn); fill: var(--warn); } .pb-s4 { stroke: var(--neutral); background: var(--neutral); fill: var(--neutral); }
.pb-chart .pb-line.pb-s0, .pb-chart .pb-line.pb-s1, .pb-chart .pb-line.pb-s2, .pb-chart .pb-line.pb-s3, .pb-chart .pb-line.pb-s4 { fill: none; }
.pb-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.pb-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pb-rc { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: var(--card-2); }
.pb-rc-head { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.pb-l { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--hair); }
.pb-l.done { opacity: .85; }
.pb-l-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pb-l-head b { overflow-wrap: anywhere; }
.pb-l .bar { margin: 0; gap: 6px; flex-wrap: wrap; }
.pb-sug { color: var(--text); overflow-wrap: anywhere; }
.pb-change { display: grid; gap: 6px; padding: 6px 0 2px; }
.pb-pick { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pb-watch { border-color: var(--warn); background: var(--warn-bg); }
.pb-watch > .bar { gap: 8px; flex-wrap: wrap; align-items: baseline; }
.pb-watch-job { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.pb-watch-job > .bar { gap: 8px; flex-wrap: wrap; align-items: baseline; margin: 0 0 6px; }
.pb-watch-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.pb-changed { margin: 0; padding: 4px 8px; font-size: 13px; } /* a receipt line changed since it was matched (review 2 Nov 2026) */
.pb-stale { margin: 8px 0 0; display: grid; gap: 2px; overflow-wrap: anywhere; } /* lines priced from an offer now out of use */
@media (max-width: 600px) { .pb-table td.acts { text-align: left; } .pb-table td.acts .btn { margin: 4px 4px 0 0; } .pb-sbar .btn { flex: 1 1 auto; justify-content: center; } }

/* an email HQ sent, as the Record kept it (2 Nov 2026) */
.ws-tl-btn { width: 100%; text-align: left; background: none; border: 0; font: inherit; cursor: pointer; } .ws-mail { display: grid; gap: 4px; } .ws-mail-line b { color: var(--text-2); font-weight: 600; } .ws-mail-body { white-space: pre-wrap; font: inherit; margin: 8px 0 0; padding: 12px; background: var(--sheet-2); border-radius: 8px; max-height: 60vh; overflow: auto; }

/* the progress line as round dots with ticks, the same as the client portal (Sean, 2 Nov 2026); money colours as before */
.ws-steps { gap: 0; }
.ws-step { position: relative; }
.ws-step::before { content: ''; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--ws-todo); z-index: 0; }
.ws-step:first-child::before { display: none; }
.ws-step.done::before, .ws-step.current::before, .ws-step.skipped::before { background: var(--navy); }
.ws-step i, .ws-mini .ws-step i { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ws-todo); background: var(--sheet); color: var(--text-3); font: 700 11px/1 var(--f-ui); font-style: normal; }
.ws-step.done i { background: var(--navy); border-color: var(--navy); color: #fff; }
.ws-step.current i { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.ws-step.skipped i { background: var(--sheet); border-style: dashed; border-color: var(--navy); color: var(--text-3); }
.ws-step.paid i { background: var(--ok-line, #3dbb74); border-color: var(--ok-line, #3dbb74); color: #fff; } .ws-step.paid::before { background: var(--ok-line, #3dbb74); }
.ws-step.pending i { background: var(--warn-line, #e0a526); border-color: var(--warn-line, #e0a526); color: #fff; } .ws-step.pending::before { background: var(--warn-line, #e0a526); }
.ws-step.late i { background: var(--danger, #c0392b); border-color: var(--danger, #c0392b); color: #fff; }
.ws-step.warn i { background: var(--sheet); border: 2px dashed var(--warn); color: var(--warn); }
.ws-step i .ic { width: 14px; height: 14px; background: currentColor; }
.ws-steps.bare .ws-step i { width: 18px; height: 18px; font-size: 10px; } .ws-steps.bare .ws-step::before { top: 8px; }
.ws-mini .ws-step i { width: 12px; height: 12px; border-width: 2px; font-size: 0; } .ws-mini .ws-step i .ic { display: none; } .ws-mini .ws-step::before { top: 5px; }

/* All mail reads at a glance (Sean, 2 Nov 2026): unread in bold with a dot; what you sent is marked Sent */
.mt-row.unread .from, .mt-row.unread .mt-r2 { font-weight: 700; color: var(--text); }
.mt-row.unread .mt-rbody { position: relative; padding-left: 12px; }
.mt-row.unread .mt-rbody::before { content: ''; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #D97757); }
/* Sent in the brand's orange marker, Received in Poseidon blue: told apart at a glance when scrolling All mail (13 Nov 2026) */
.mt-sent, .mt-recv { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.mt-sent { color: var(--text); background: color-mix(in srgb, var(--accent) 24%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.mt-recv { color: var(--text); background: color-mix(in srgb, #3f7f9a 22%, transparent); box-shadow: inset 3px 0 0 #3f7f9a; }
/* the Next step tile in the website's sand (Sean, 2 Nov 2026), not pink: the website's paper-2 and stone */
.ws-next.who-you { background: #f8f6f1; border-color: rgba(20, 60, 93, .22); } /* the website's paper #f2efe9 halfway to white: on a white card it reads as the website's page does (Sean, 3 Nov 2026) */
.ws-next.who-you .ws-next-t .k { color: var(--navy); }
:root[data-theme="dark"] .ws-next.who-you { background: color-mix(in srgb, #f2efe9 10%, var(--sheet)); border-color: color-mix(in srgb, #f2efe9 30%, var(--hair)); }
/* material warnings: quiet, in the website's sand, one small line (Sean, 2 Nov 2026: "I don't even know what those yellow stripes are") */
.ws-mat-w { background: #e9e4db; color: var(--text-2); }
.ws-mat-w .ic { color: var(--text-3); }
tr.ws-mat-warn > td:first-child { box-shadow: none; padding-left: 0; }
/* the variation window (Sean, 3 Nov 2026) */
.ws-var-sec { margin: 0 0 14px; }
.ws-var-sec h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #5b6b7a); }
.ws-var-photos { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
.ws-var-ph { position: relative; width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line, #d7dde3); cursor: pointer; }
.ws-var-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-var-ph input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; accent-color: var(--or, #d97757); z-index: 1; }
.ws-var-ph:has(input:checked) { outline: 3px solid var(--or, #d97757); }
.ws-var-lines { display: grid; gap: 6px; margin-bottom: 6px; }
.ws-var-line { display: flex; gap: 6px; align-items: center; }
.ws-var-line input[type=text] { flex: 1; min-width: 0; }
.ws-var-total { margin: 4px 0 12px; font-size: 15px; }
/* variations in the progress bar and ticks when a job is folded (Sean, 3 Nov 2026): the V is a round dot like every other
   step, in its own teal so it sits with the yellow and orange (never red) */
.ws-step { --ws-var: #2f8f8a; }
.ws-vmark i { border-color: var(--ws-var) !important; color: var(--ws-var) !important; } /* same size and shape as every step: colour only */
.ws-vmark.done i { background: var(--ws-var) !important; border-color: var(--ws-var) !important; color: #fff !important; } /* accepted: solid */
.ws-vmark.current i { background: var(--sheet, #fff) !important; border-color: var(--ws-var) !important; color: var(--ws-var) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ws-var) 22%, transparent) !important; } /* waiting for the client: outlined */
.ws-vmark .lab { color: var(--ws-var); }
.ws-mini .ws-step i { width: 18px !important; height: 18px !important; font-size: 10px !important; border-width: 2px; }
.ws-mini .ws-step i .ic { display: block !important; width: 11px !important; height: 11px !important; }
.ws-mini .ws-step::before { top: 8px !important; }
/* Claude in the variation window (Sean, 3 Nov 2026) */
.ws-var-claude { border: 1px solid var(--line, #d7dde3); border-radius: 10px; padding: 10px; background: var(--card-2, #f7f8fa); }
.ws-var-claude.over { outline: 2px dashed var(--accent); }
.ws-var-claude-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ws-var-claude textarea { width: 100%; }
.ws-var-chatlog p { margin: 0 0 6px; font-size: 13px; white-space: pre-line; } .ws-var-chatlog p.claude { color: var(--text-2, #45525e); }
.ws-claude-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d97757; color: #081a2b; } /* the website's orange, as on its buttons (navy on orange) */
.ws-claude-mark .ic { width: 13px; height: 13px; background: currentColor; }
.ws-var-photos.over { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; }

.ws-var-ph-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(8, 26, 43, .7); color: #fff; font: 700 14px/1 var(--f-ui); cursor: pointer; z-index: 2; }
.ws-var-chatlog p.busy { color: var(--muted, #5b6b7a); font-style: italic; }
.ws-vwait { margin: 8px 0 0; padding: 8px 12px; border: 1px solid color-mix(in srgb, #2f8f8a 45%, transparent); border-radius: 10px; background: color-mix(in srgb, #2f8f8a 8%, transparent); font-size: 13px; }

/* ---- job card: corner buttons, ⋯ menu and the money trail (Sean, 3 Nov 2026) */
.ws-card-h > .ws-vbtn, .ws-card-h > .ws-donebtn, .ws-card-h > .ws-morewrap { flex: none; }
.ws-card-h > .chip + .ws-vbtn, .ws-card-h > .chip + .ws-donebtn, .ws-card-h > .chip + .ws-morewrap { margin-left: 4px; }
.ws-card:not(.folded) .ws-card-h > .chip:last-child, .ws-card:not(.folded) .ws-card-h > .chip:has(+ .ws-vbtn), .ws-card:not(.folded) .ws-card-h > .chip:has(+ .ws-donebtn), .ws-card:not(.folded) .ws-card-h > .chip:has(+ .ws-morewrap) { margin-left: auto; }
.ws-vbtn { border-color: var(--ws-var, #2f8f8a); color: var(--ws-var, #2f8f8a); }
.ws-vdot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ws-var, #2f8f8a); color: #fff; font: 700 10px/1 var(--f-ui); margin-right: 2px; }
.ws-morewrap { position: relative; }
.ws-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; background: var(--card, #fff); border: 1px solid var(--line, #d7dde3); border-radius: 10px; padding: 4px; box-shadow: 0 8px 24px rgba(8, 26, 43, .14); display: grid; }
.ws-pop[hidden] { display: none; }
.ws-pop button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; font: 500 13px/1.3 var(--f-ui); color: var(--text, #081a2b); cursor: pointer; }
.ws-pop button:focus-visible { background: var(--hover, rgba(8, 26, 43, .06)); }
@media (hover: hover) { .ws-pop button:hover { background: var(--hover, rgba(8, 26, 43, .06)); } }
.ws-trail { margin-top: 12px; }
.ws-tiles { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.ws-tile { flex: 1 1 150px; min-width: 150px; max-width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 9px 11px; border: 1px solid var(--line, #d7dde3); border-radius: 10px; background: var(--card, #fff); color: inherit; text-decoration: none; }
@media (hover: hover) { a.ws-tile:hover { border-color: var(--text-2, #5b6b7a); } }
.ws-tile.var { border-color: var(--ws-var, #2f8f8a); }
.ws-tile.var.open, .ws-tile.todo { border-style: dashed; }
.ws-tile.off { opacity: .7; }
.ws-tk { font: 500 11px/1.3 var(--f-ui); color: var(--text-2, #5b6b7a); }
.ws-tile.var .ws-tk:first-child { color: var(--ws-var, #2f8f8a); }
.ws-tn { font: 600 13px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-ta { font: 600 15px/1.2 var(--f-ui); }
.ws-tchip { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 2px 7px; border-radius: 6px; font: 500 11px/1.4 var(--f-ui); }
.ws-tchip.ok { background: #eaf3de; color: #27500a; }
.ws-tchip.part { background: #faeeda; color: #633806; }
.ws-tchip.bad { background: #fcebeb; color: #791f1f; }
.ws-tchip.grey { background: var(--sheet, #fff); color: var(--text-2, #5b6b7a); box-shadow: inset 0 0 0 1px var(--hair-2, #cfc6b6); }
.ws-tchip.wait { border: 1.5px solid var(--ws-var, #2f8f8a); color: var(--ws-var, #2f8f8a); }
.ws-tarrow { display: flex; align-items: center; color: var(--text-3, #8a97a3); }
.ws-tsums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.ws-tsum { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--sheet, #fff); box-shadow: inset 0 0 0 1px var(--hair-2, #cfc6b6); }
.ws-tsum b { font: 600 15px/1.2 var(--f-ui); }
.ws-tsum.part { background: #faeeda; } .ws-tsum.part .ws-tk, .ws-tsum.part b { color: #633806; }
.ws-tsum.ok { background: #eaf3de; } .ws-tsum.ok .ws-tk, .ws-tsum.ok b { color: #27500a; }
@media (max-width: 640px) { .ws-tarrow { display: none; } .ws-tile { max-width: none; } .ws-card:not(.folded) .ws-card-h > .ws-vbtn { margin-left: 0; } }
.ws-card.ws-job .ws-next { padding: 8px 12px; margin-top: 10px; }
.ws-card.ws-job .ws-next-t .k { font-size: 10px; }
.ws-card.ws-job .ws-next-t b { font-size: 14px; }
.ws-var-ph-ask { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: rgba(8, 26, 43, .82); color: #fff; font: 600 12px/1.2 var(--f-ui); }
.ws-var-ph-ask button { min-width: 58px; padding: 3px 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; font: 600 12px/1.3 var(--f-ui); cursor: pointer; }
.ws-var-ph-ask button.yes { background: #fff; color: #081a2b; border-color: #fff; }
.ws-portalbtn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--line, #d7dde3); border-radius: 999px; background: none; font: inherit; color: inherit; cursor: pointer; }
.ws-portalbtn.on { border-color: var(--ok, #3b6d11); }
@media (hover: hover) { .ws-portalbtn:hover { background: var(--hover, rgba(8, 26, 43, .06)); } }
.ws-portalbox { margin: 10px 0; padding: 12px 16px; border: 1px solid var(--line, #d7dde3); border-radius: 12px; background: var(--card, #fff); }
.ws-portalbox[hidden] { display: none; }

/* ---- the photo viewer (hq/ui/lightbox.mjs, 3 Nov 2026) */
.lbx { position: fixed; inset: 0; z-index: 10000; background: rgba(8, 26, 43, .94); display: flex; flex-direction: column; color: #fff; }
.lbx-top { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; }
.lbx-top .grow { flex: 1; }
.lbx-cap { font: 500 14px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbx-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font: 600 13px/1 var(--f-ui); text-decoration: none; cursor: pointer; }
@media (hover: hover) { .lbx-btn:hover { background: rgba(255, 255, 255, .12); } }
.lbx-btn[hidden] { display: none; }
.lbx-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 10px calc(16px + env(safe-area-inset-bottom, 0px)); }
.lbx-img { max-width: calc(100% - 120px); max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.lbx-nav { position: relative; z-index: 2; flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font: 400 34px/1 var(--f-ui); cursor: pointer; }
@media (hover: hover) { .lbx-nav:hover { background: rgba(255, 255, 255, .26); } }
.lbx-nav[hidden] { visibility: hidden; display: block; }
@media (max-width: 640px) { .lbx-img { max-width: 100%; } .lbx-nav { position: absolute; top: 50%; transform: translateY(-50%); } .lbx-nav.prev { left: 8px; } .lbx-nav.next { right: 8px; } .lbx-stage { position: relative; } }
.ws-var-ph-view { position: absolute; left: 4px; bottom: 4px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(8, 26, 43, .7); color: #fff; display: grid; place-items: center; cursor: zoom-in; }
.ws-ph, .ph-tile { cursor: zoom-in; }
/* Claude working in the variation window: a moving bar and a timer (3 Nov 2026) */
.ws-var-busy { display: grid; gap: 6px; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--sheet-2, #e9e4db); border: 1px solid var(--hair, #ddd6ca); }
.ws-var-busy-bar { position: relative; height: 4px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, #d97757 18%, transparent); }
.ws-var-busy-bar i { position: absolute; top: 0; bottom: 0; width: 35%; border-radius: 4px; background: #d97757; animation: ws-var-slide 1.3s ease-in-out infinite; }
@keyframes ws-var-slide { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .ws-var-busy-bar i { animation-duration: 3s; } }
/* Claude's questions with answers to tick (variation window, 3 Nov 2026) */
.ws-vq-card { display: grid; gap: 8px; margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--hair-2, #cfc6b6); border-radius: 10px; background: var(--sheet, #fff); }
.ws-vq-card.answered { opacity: .6; }
.ws-vq { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.ws-vq legend { font-weight: 600; margin-bottom: 2px; }
.ws-vq-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--hair, #ddd6ca); border-radius: 8px; cursor: pointer; }
.ws-vq-opt:has(input:checked) { border-color: var(--navy, #143c5d); background: var(--sheet-2, #e9e4db); }
.ws-vq-opt input { accent-color: var(--navy, #143c5d); }
.ws-vq-other { margin-top: 2px; }
.ws-vq legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-vq-head { font: 600 11px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .06em; padding: 4px 7px; border-radius: 6px; background: var(--sheet-2, #f1f4f8); color: var(--text-2, #5a6779); }
.ws-vq-opt { align-items: flex-start; }
.ws-vq-opt input { margin-top: 3px; }
.ws-vq-txt { display: grid; gap: 2px; }
.ws-vq-txt small { color: var(--text-2, #5a6779); font-size: 12px; }
.ws-vq-rec { margin-left: 6px; font: 600 10px/1 var(--f-ui); padding: 3px 6px; border-radius: 5px; background: #eaf3de; color: #27500a; vertical-align: 1px; }
a.ws-tile .ws-tile-go { margin-top: 4px; width: fit-content; }

/* the bell's rows with their remove button (4 Nov 2026) */
.nt-rowwrap { display: flex; align-items: stretch; }
.nt-rowwrap > .nt-row { flex: 1; min-width: 0; }
.nt-x { flex: none; width: 36px; font-size: 18px; color: var(--text-3); border: 0; background: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .nt-x:hover { color: var(--text); background: var(--sheet-2); } }

/* a receipt's own picture in the Receipts list (4 Nov 2026) */
.rc-thumb { display: inline-block; width: 30px; height: 40px; border: 1px solid var(--hair); border-radius: 4px; overflow: hidden; background: #fff; vertical-align: middle; }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* the one uploader (hq/ui/uploader.mjs, 4 Nov 2026) */
.up-zone { display: grid; place-items: center; gap: 6px; padding: 20px 16px; border: 2px dashed var(--hair-2); border-radius: 10px; text-align: center; color: var(--text-2); outline: none; }
.up-zone:focus-visible, .up-zone.over { border-color: var(--accent); background: var(--ws-now-bg); }
.up-zone .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.up-zone .acts .btn { min-height: 40px; }
.up-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; max-height: 240px; overflow: auto; }
.up-list li { display: flex; gap: 8px; justify-content: space-between; overflow-wrap: anywhere; }
.up-list li.bad { color: var(--danger); } .up-list li.ok { color: var(--ok); }
.up-list .up-state { white-space: nowrap; flex: none; }

/* details a client sent, waiting for a check (group/details.mjs, 6 Nov 2026) */
.ws-detailsbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--ok, #2e7d4f); border-radius: var(--ws-r, 10px); background: color-mix(in srgb, var(--ok, #2e7d4f) 8%, var(--sheet)); }
.ws-detailsbar .grow { flex: 1 1 240px; }
.ws-details-t td, .ws-details-t th { padding: 7px 10px; vertical-align: top; text-align: left; }
.ws-details-t tr.diff td { background: color-mix(in srgb, var(--ok, #2e7d4f) 6%, transparent); }

/* who a client's paperwork can be made out to (6 Nov 2026) */
.billto { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 8px; }
.billto-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.billto-row input { min-width: 0; }
.billto-row select { flex: 0 0 auto; }

/* the review ask preview (office/ui/pipeline.mjs reviewSheet, 6 Nov 2026): the text and the email side by side */
.rv-top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-bottom: 12px; }
.rv-top .f { margin: 0; min-width: 12em; }
.rv-to { padding: 7px 0; font-weight: 600; }
.rv-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.rv-cols.two { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 860px) { .rv-cols.two { grid-template-columns: minmax(0, 1fr); } }
.rv-col h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2, #5A6779); }
.rv-text, .rv-words { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; line-height: 1.4; padding: 10px 12px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet-2); resize: vertical; }
.rv-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.rv-subj { font-size: 14px; margin-bottom: 6px; }
.rv-mail { width: 100%; height: 520px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: #fff; }
.rv-edit { margin-top: 8px; }
.rv-edit summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }

/* ---- Social (8 Nov 2026): three columns of posts, the editor with the photo picker ---- */
.so-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .so-cols { grid-template-columns: 1fr; } }
.so-col { margin: 0; } .so-col .empty { padding: 18px 8px; }
.so-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); margin: 0 0 8px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .so-card:hover { border-color: var(--hair-2); box-shadow: var(--shadow-1); } }
.so-card:focus-visible { outline: 2px solid var(--focus); }
.so-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--sheet-2); display: grid; place-items: center; color: var(--text-3); }
.so-body b { display: block; margin-bottom: 2px; } .so-words { font-size: 14px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.so-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.so-editor { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .so-editor { grid-template-columns: 1fr; } }
.so-chans { display: flex; flex-wrap: wrap; gap: 6px 16px; } .so-chans .cb { display: inline-flex; align-items: center; gap: 8px; min-height: var(--ctl); }
.so-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; max-height: 60vh; overflow: auto; }
.so-grid .empty { grid-column: 1 / -1; padding: 24px 12px; }
.so-pick { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--sheet-2); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.so-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-pick.on { border-color: var(--current); } .so-pick .so-n { position: absolute; top: 4px; left: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font: 700 13px/22px var(--f-ui); text-align: center; }

/* ---- the client page's Texts and Email tabs (office/ui/clientmsg.mjs, 2 Nov 2026) ---- */
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 2px 10px; font-size: 13px; color: var(--text-2); }
.cm-hp { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; color: inherit; text-decoration: none; }
.cm-hp.prefers { color: var(--text); font-weight: 600; } .cm-hp.warn { color: var(--danger); font-weight: 600; }
.cm-drafts .chip.ghost { background: transparent; border: 1px solid var(--hair-2); }
.cm-msgs { min-height: calc(100vh - 300px); }
.cm-filewrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; } .msg.me .cm-filewrap { align-items: flex-end; }
.cm-share { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; opacity: .85; cursor: pointer; white-space: nowrap; } .cm-share input { margin: 0; }
.msg.me .cm-share { color: inherit; } .msg.pic .cm-share { color: var(--text-2); }
.cm-seen.on { opacity: 1; }
.msg.cm-portal:not(.me) { border-style: dashed; }
.cm-editing { padding: 0 0 6px; }
.cm-ebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.cm-conv .ws-card-h { flex-wrap: wrap; gap: 6px; }
.cm-conv-t { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 260px; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.cm-mrows { display: grid; gap: 0; border-top: 1px solid var(--hair); }
.cm-mrow { border-bottom: 1px solid var(--hair); } .cm-mrow.me .cm-mhead b { color: var(--poseidon); }
.cm-mhead { display: grid; grid-template-columns: auto auto auto 1fr; align-items: baseline; gap: 6px; width: 100%; padding: 8px 12px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { a.cm-hp:hover { color: var(--poseidon); } .cm-mhead:hover { background: var(--sheet-2); } }
.cm-prev { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-msgpane { padding: 0 12px 12px; } .cm-msgpane .mail-body, .cm-reader .mail-body { width: 100%; min-height: 360px; border: 1px solid var(--hair); border-radius: 8px; background: #fff; }
.cm-att { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .cm-mhead { grid-template-columns: 1fr; } .cm-msgs { min-height: calc(100vh - 240px); } }

/* Working on (pass A, 8 Nov 2026): one quiet line over the Timesheets clock; the Reef-free family look, orange only on its marker */
.ts-workon { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 12px; border: 1px solid var(--line, #dde2e8); border-radius: 10px; background: var(--surface, #fff); }
.ts-workon.on { border-left: 3px solid var(--current); }
.ts-workon .grow { flex: 1; }
.tbtn.on { box-shadow: inset 0 -2px 0 var(--current); }

/* Social, the Meta connection (8 Nov 2026): comment rows and a small daily-reach strip (bars are days; figures in the table) */
.so-comment { border-top: 1px solid var(--line, #dde2e8); padding-top: 8px; }
.so-spark { display: flex; align-items: flex-end; gap: 2px; height: 52px; margin: 8px 0 12px; }
.so-spark span { flex: 1; min-width: 3px; background: var(--info, #3F7F9A); border-radius: 2px 2px 0 0; opacity: .85; }

/* Money in (9 Nov 2026) */
.mi .mi-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.mi .mi-row:first-of-type { border-top: 0; }
.mi .mi-amt { min-width: 92px; font-size: 1.15em; color: var(--heading); }
.mi .mi-main { flex: 1 1 220px; min-width: 0; }
.mi .mi-done { opacity: .7; }

/* Live Drive screen (9 Nov 2026) */
.ld { padding: 0; overflow: hidden; }
.ld .ld-map { height: 42vh; min-height: 240px; background: var(--hair); }
.ld .ld-read { display: flex; justify-content: space-around; gap: 12px; padding: 12px 16px 0; text-align: center; }
.ld .ld-km { font: 800 56px/1 var(--f-ui, Archivo, sans-serif); color: var(--heading); }
.ld .ld-time { font: 700 28px/1.2 var(--f-ui, Archivo, sans-serif); color: var(--heading); padding-top: 14px; }
.ld .ld-status { text-align: center; padding: 4px 16px 0; }
.ld .ld-acts { display: flex; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
.ld .ld-end { min-height: 52px; font-size: 18px; flex: 1 1 180px; }
.ld .ld-acts .btn { min-height: 52px; }
.ld .ld-nav { display: flex; gap: 8px; padding: 0 16px 14px; flex-wrap: wrap; }
.ld .ld-where, .ld .ld-pick { flex: 1 1 200px; min-height: 44px; font-size: 16px; }

/* ---- Routes (hq/ui/routes.mjs, 10 Nov 2026): every route driven on one map, the list beside it */
.rt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.rt-head .seg { display: flex; gap: 4px; flex-wrap: wrap; } .rt-veh { max-width: 220px; }
.rt-tot { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; align-items: baseline; }
.rt-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; height: calc(100vh - 210px); min-height: 520px; }
.rt-map { border: 1px solid var(--hair); border-radius: var(--r-sheet); overflow: hidden; min-height: 420px; background: var(--sheet-2); }
.rt-side { overflow: auto; border: 1px solid var(--hair); border-radius: var(--r-sheet); background: var(--sheet); padding: 6px 10px 10px; }
.rt-day { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 12px 2px 4px; font-size: 13px; position: sticky; top: 0; background: var(--sheet); z-index: 1; }
.rt-day span { color: var(--ink-3, #6b7785); font-size: 12px; }
.rt-row { display: flex; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--hair); cursor: pointer; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) { .rt-row:hover { background: var(--sheet-2); } }
.rt-row.on { background: var(--sheet-2); outline: 2px solid var(--poseidon, #143C5D); outline-offset: -2px; }
.rt-key { flex: none; width: 5px; border-radius: 3px; align-self: stretch; }
.rt-acts { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--hair); cursor: default; }
.rt-stop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.rt-txt { flex: 1; min-width: 0; font-size: 13px; } .rt-top { display: flex; justify-content: space-between; gap: 8px; } .rt-km { font-weight: 700; white-space: nowrap; }
.rt-foot { margin: 12px 4px 4px; }
@media (max-width: 900px) { .rt-wrap { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; } .rt-map { min-height: 55vh; } .rt-side { max-height: none; } }

.rt-views { margin-left: auto; display: flex; gap: 4px; }
.rt-dot { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(10,25,40,.45); }
.rt-map .maplibregl-canvas { outline: none; }

.rt-tabs { display: flex; gap: 4px; margin: 0 0 10px; flex-wrap: wrap; }
.rt-live { width: 18px; height: 18px; border-radius: 50%; background: #D97757; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(217,119,87,.6); animation: rt-pulse 1.6s infinite; }
@keyframes rt-pulse { 70% { box-shadow: 0 0 0 16px rgba(217,119,87,0); } 100% { box-shadow: 0 0 0 0 rgba(217,119,87,0); } }
.rt-tbl { width: 100%; font-size: 13px; } .rt-tbl th { text-align: left; font-weight: 600; padding: 4px 8px 4px 0; } .rt-tbl td { padding: 4px 8px 4px 0; border-top: 1px solid var(--hair); }
.rt-bars { display: flex; gap: 6px; align-items: flex-end; height: 150px; margin: 8px 0; }
.rt-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; font-size: 11px; }
.rt-bar i { display: block; width: 100%; background: var(--poseidon, #143C5D); border-radius: 3px 3px 0 0; min-height: 2px; } .rt-bar.slow i { background: #D97757; }
.rt-bar b { margin-top: 3px; font-weight: 600; } .rt-bar small { color: var(--ink-3, #6b7785); min-height: 13px; }
@media (prefers-reduced-motion: reduce) { .rt-live { animation: none; } }

.ld-views { display: flex; gap: 4px; margin-bottom: 8px; }

.ld-speed { font-size: 44px; font-weight: 700; line-height: 1; color: var(--poseidon, #143C5D); text-align: center; }

.rt-vcard { border-top: 1px solid var(--hair); padding: 10px 4px; font-size: 13px; }
.rt-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--sheet-2); color: var(--poseidon, #143C5D); white-space: nowrap; } .rt-badge.go { background: #D97757; color: #fff; }

.ld-spd { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ld-limit { margin-top: 6px; min-width: 44px; height: 44px; padding: 0 4px; border-radius: 50%; border: 5px solid #C2455A; background: #fff; color: #1d2b38; font-weight: 700; font-size: 18px; display: grid; place-items: center; }
.ld-limit.none { border-color: var(--hair); color: var(--ink-3, #6b7785); font-weight: 400; }
.ld-voice { display: block; text-align: center; font-size: 12px; color: var(--ink-3, #6b7785); margin: 4px 0; }

.ld-traffic { text-align: center; font-size: 11px; margin: 2px 8px; }

.mt-more > summary { list-style: none; cursor: pointer; } .mt-more > summary::-webkit-details-marker { display: none; }
.mt-more[open] > summary { margin-bottom: 2px; }

.ms-thread { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; max-height: 50vh; overflow: auto; }
.ms-msg { max-width: 80%; align-self: flex-start; background: var(--sheet-2); border-radius: 12px; padding: 6px 10px; font-size: 13px; }
.ms-msg.me { align-self: flex-end; background: #143C5D; color: #fff; } .ms-msg.me small { color: #cfe0ec; }

.wk-f summary { cursor: pointer; padding: 4px 0; } .wk-items { margin: 2px 0 6px 18px; font-size: 13px; } .wk-items li { margin: 2px 0; }
/* Mail: one toolbar at the top (New email + the open email's buttons), Sean 11 Nov 2026; the pane's own row only on the phone */
.mt-topacts { flex-wrap: nowrap; gap: 6px; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--hair); }
.mt-topacts:empty { display: none; }
@media (min-width: 701px) and (min-height: 501px), (min-width: 1001px), (min-width: 701px) and (pointer: fine) { .mt-paneacts { display: none; } }
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) { .mt-topacts { display: none; } }
@media (max-width: 1100px) { .mt-topacts .lbl { display: none; } }
@media (min-width: 701px) and (max-width: 899px) { .mt-split { grid-template-columns: 150px minmax(220px, 1fr) minmax(300px, 1.3fr); } }
/* the open email's client and sender buttons in the top row; the pane keeps its own only on the phone (Sean, 11 Nov 2026) */
.mt-topextra { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.mt-topextra:not(:empty) { padding-left: 8px; border-left: 1px solid var(--hair); }
@media (min-width: 701px) and (min-height: 501px), (min-width: 1001px), (min-width: 701px) and (pointer: fine) { .mt-linkline.mt-unlinked, .mt-unsub.mt-rulesonly, .mt-unsub .mt-rulebtn { display: none; } }
/* the conversation as file tabs: who, with the date and time under it */
.mt-tabs { display: flex; gap: 3px; padding: 8px 12px 0; overflow-x: auto; border-bottom: 1px solid var(--hair); background: var(--sheet-2); scrollbar-width: thin; }
.mt-tab { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 112px; max-width: 220px; padding: 6px 12px 5px; margin-bottom: -1px; border: 1px solid var(--hair); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--sheet-2); color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.mt-tab[aria-selected="true"] { background: var(--sheet); color: var(--text); box-shadow: inset 0 2px 0 var(--navy); border-bottom: 1px solid var(--sheet); }
@media (hover: hover) and (pointer: fine) { .mt-tab:not([aria-selected="true"]):hover { color: var(--text); background: var(--sheet); } }
.mt-tab:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.mt-tabwho { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-tabwhen { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-tab.draft .mt-tabwho { font-style: italic; }
/* ov-012: the conversation tab's marks: an unread dot (as the list's) before the date, a paperclip after it */
.mt-tab .mt-tabwhen { display: inline-flex; align-items: center; gap: 5px; }
.mt-tab.unread .mt-tabwho { font-weight: 700; color: var(--text); }
.mt-tabdot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--current, #143c5d); } /* navy: orange is for main buttons only (design law) */
.mt-tabclip { display: inline-flex; color: var(--text-2); }
.mt-tabclip .ic { width: 13px; height: 13px; }
/* the sender card (ov-011): rest on a sender's name (desktop) or hold it (phone); read only, links to the records */
.mt-scard { position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 16px); max-height: min(70vh, 520px); overflow: auto; background: var(--sheet); color: var(--text); border: 1px solid var(--hair-2); border-radius: var(--r-sheet, 10px); box-shadow: var(--shadow-2); padding: 10px 12px; font-size: 13px; }
.mt-scard[hidden] { display: none; }
.mt-scard.sheet { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; max-height: 70vh; }
.mt-scard-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.mt-scard-name { font-size: 14.5px; color: var(--heading); } .mt-scard-mail { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-scard-badge { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: var(--r-pill, 6px); border: 1px solid var(--hair-2); color: var(--text-2); }
.mt-scard-badge.client { border-color: var(--poseidon); color: var(--heading); }
.mt-scard-blk { padding: 6px 0 2px; } .mt-scard-blk + .mt-scard-blk { border-top: 1px solid var(--hair); }
.mt-scard-h { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 2px; }
.mt-scard-l { display: flex; align-items: center; gap: 6px; padding: 3px 4px; margin: 0 -4px; border-radius: 4px; color: var(--text); text-decoration: none; min-height: 24px; }
.mt-scard-l > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mt-scard-l:focus-visible { outline: 2px solid var(--poseidon); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { a.mt-scard-l:hover { background: var(--sheet-2); } }
.mt-scard-l.hint { color: var(--text-3); }
.mt-scard-l.due { box-shadow: inset 3px 0 0 var(--warn); padding-left: 8px; } /* money in, still to come: a yellow marker, never yellow text */
.mt-scard-l.late { color: var(--danger); font-weight: 600; } .mt-scard-l.paid { color: var(--paid-ink); }
.mt-scard-wait { margin: 4px 0; } .mt-scard-x { margin-top: 8px; width: 100%; min-height: var(--touch, 40px); }
@media (hover: none) { .mt-scard-on { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } .mt-scard .mt-scard-l { min-height: 36px; } }
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) { .mt-tab { min-height: 48px; } }
/* the composer's narrow Word-like toolbar (11 Nov 2026) */
.mt-editor { display: flex; flex-direction: column; border: 1px solid var(--hair); border-radius: var(--r-ctl, 6px); background: var(--sheet); }
.mt-editor > textarea { border: 0; border-radius: 0 0 var(--r-ctl, 6px) var(--r-ctl, 6px); box-shadow: none; }
.mt-fmtbar { display: flex; align-items: center; gap: 2px; padding: 3px 6px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); border-radius: var(--r-ctl, 6px) var(--r-ctl, 6px) 0 0; flex-wrap: wrap; }
.mt-fmtbar select { height: 26px; font-size: 12.5px; padding: 0 6px; max-width: 130px; }
.mt-fmtbar .btn.small.mt-fmt { min-width: 28px; height: 26px; padding: 0 6px; border-color: transparent; background: transparent; }
.mt-spell { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px 8px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); font-size: 13px; } .mt-spell[hidden] { display: none; }
.mt-spell .btn.small.mt-spellfix { height: 26px; padding: 0 8px; } .mt-spell .btn.small.mt-spellfix s { opacity: .65; }
.mt-spell .btn.small.mt-fmt { min-width: 28px; height: 26px; padding: 0 6px; border-color: transparent; background: transparent; }
@media (hover: hover) and (pointer: fine) { .mt-fmtbar .btn.small.mt-fmt:hover { background: var(--sheet); border-color: var(--hair); } }
.mt-fsep { width: 1px; height: 18px; background: var(--hair); margin: 0 4px; }
/* files attached in the composer (12 Nov 2026) */
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; } .mt-chips:empty { display: none; }
.mt-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 4px 3px 8px; border: 1px solid var(--hair); border-radius: 999px; background: var(--sheet-2); font-size: 13px; }
.mt-chip .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; font-weight: 600; } .mt-chip.busy { padding-right: 10px; color: var(--text-2); }
.mt-chipx { border: 0; background: none; color: var(--text-2); cursor: pointer; display: inline-flex; padding: 3px; border-radius: 50%; }
@media (hover: hover) and (pointer: fine) { .mt-chipx:hover { background: var(--sheet); color: var(--text); } }
.mt-compose.dropping { outline: 2px dashed var(--navy); outline-offset: 2px; }
/* address suggestions, Bcc and Important in the composer (12 Nov 2026) */
.mt-addr { position: relative; display: block; } .mt-addr > input { width: 100%; }
.mt-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-ctl, 6px); box-shadow: var(--shadow-1); overflow: hidden; }
.mt-suggrow { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; font: inherit; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-suggrow.on { background: var(--sheet-2); }
@media (hover: hover) and (pointer: fine) { .mt-suggrow:hover { background: var(--sheet-2); } }
.mt-tools .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--navy); }
/* the authenticator set-up picture (Settings › Devices on HQ's server) */
.auth-qr { width: 200px; height: 200px; background: #fff; border: 1px solid var(--line-2, #d9e0e6); border-radius: 8px; padding: 8px; margin: 8px 0; }
.auth-qr svg { width: 100%; height: 100%; display: block; }
/* the brand picker at the top of Mail's rail (hq-033): one brand of a business with several */
.mt-brand { display: block; padding: 4px 8px 8px; }
.mt-brand select { width: 100%; font-weight: 600; }
.mt-brand .sr-only, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Paid in advance: what the money is (hq-045) */
.adv-kinds { display: grid; gap: 6px; margin: 8px 0; }
.adv-kind { align-items: flex-start; gap: 8px; }
.adv-kind input { margin-top: 3px; }
/* A receipt's account: "What was this?" inside the receipt (hq-041 step 4) */
.acct-pick { display: grid; gap: 6px; }
.acct-cur { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line-2, #d9e0e6); border-radius: 8px; padding: 8px 10px; }
.acct-cur .hint { font-size: 13px; line-height: 1.35; }
.acct-cur .btn { flex: none; }
.acct-pick .what-list { max-height: min(40vh, 360px); margin: 0; }
/* "What was this?" on a bank line (hq-041): one searchable list of plain choices */
.what-list { display: grid; gap: 4px; max-height: min(56vh, 520px); overflow-y: auto; margin: 10px 0; padding-right: 2px; }
.what-head { font-size: 12px; color: var(--muted, #5b6b78); margin: 8px 2px 2px; text-transform: none; }
.what-item { display: grid; gap: 2px; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--line-2, #d9e0e6); border-radius: 8px; background: var(--card, #fff); color: inherit; font: inherit; cursor: pointer; }
.what-item b { font-weight: 600; }
.what-item span { font-size: 13px; color: var(--muted, #5b6b78); line-height: 1.35; }
.what-item:focus-visible { border-color: var(--navy, #143C5D); outline: none; background: var(--card-hover, #f2f5f8); }
@media (hover: hover) and (pointer: fine) { .what-item:hover { border-color: var(--navy, #143C5D); background: var(--card-hover, #f2f5f8); } }
.what-item.what-top { border-color: var(--navy, #143C5D); }
.what-more { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line-2, #d9e0e6); padding-top: 10px; }

/* Inventory: a new item, step by step (15 Nov 2026) */
.wiz-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; counter-reset: wiz; }
.wiz-steps li { counter-increment: wiz; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2, #d9e0e6); color: var(--muted, #5b6b78); }
.wiz-steps li::before { content: counter(wiz) ". "; }
.wiz-steps li.on { border-color: var(--navy, #143C5D); color: var(--navy, #143C5D); font-weight: 600; }
.wiz-steps li.done { color: var(--ok, #1baf7a); }
.wiz { display: grid; gap: 10px; min-height: 180px; }
.wiz-pics { display: flex; gap: 8px; flex-wrap: wrap; }
.wiz-pics img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2, #d9e0e6); }
.wiz-say.bad { color: var(--bad, #c0392b); }
.wiz-bar { border-top: 1px solid var(--line-2, #d9e0e6); padding-top: 10px; margin-top: 6px; }
.wiz-pic { position: relative; }
.wiz-pic .inv-phx { position: absolute; top: 4px; right: 4px; }

/* a map card: HQ's own map with the pin, Map or Satellite, Navigate (15 Nov 2026) */
.mapcard { border: 1px solid var(--line-2, #d9e0e6); border-radius: 12px; overflow: hidden; margin: 6px 0 10px; background: var(--card, #fff); }
.mapcard-map { height: 200px; }
.mapcard-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.mapcard-tabs { display: flex; gap: 4px; }
.mapcard-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: #D97757; border: 3px solid #fff; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }

/* Routes: colour by and its key (15 Nov 2026) */
.rt-by { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2, #5b6b78); }
.rt-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; width: 100%; font-size: 12px; color: var(--text-2, #5b6b78); }
.rt-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
/* Routes on a phone: the tab and period rows slide sideways instead of piling on top of each other (15 Nov 2026) */
@media (max-width: 480px) {
  .rt-tabs, .rt-head .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; height: auto; scrollbar-width: none; }
  .rt-tabs > *, .rt-head .seg > * { flex: 0 0 auto; }
  .rt-views { margin-left: 0; }
}

/* Inventory › Map (hq-051): where every tool is. Kept places are Poseidon navy pins, job sites are info-blue pins, the pin
   being looked at is orange; an approximate pin (a suburb's centre) has a dashed edge. Day and night follow HQ's theme. */
.smap { display: flex; flex-direction: column; height: 100%; }
.smap-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.smap-bar .pillrow { flex-wrap: wrap; }
.smap-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; padding: 12px 16px 16px; min-height: 520px; }
.smap-map { border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; min-height: 480px; background: var(--sheet-2); }
.smap-side { overflow: auto; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 230px); }
.smap-side .inv-group { position: static; padding: 6px 2px 2px; background: none; }
.smap-row .sub.warn, .inv-item .sub.warn { color: var(--warn); }
.smap-row .nm .ic { vertical-align: -2px; }
.smap-missing { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--hair-2); color: var(--text-2); text-decoration: none; font-size: 13px; }
.smap-lochint { margin: 10px 16px 0; }
.smap-pin { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 15px 15px 15px 3px; border: 2px solid #fff; background: var(--poseidon); color: #fff; font: 650 12px var(--f-ui); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.smap-pin.site { background: #2f6fa8; }
.smap-pin.approx { border-style: dashed; }
.smap-pin.on { background: var(--accent); transform: scale(1.12); z-index: 2; }
:root[data-theme="dark"] .smap-pin { border-color: #0f1c2a; background: #e8eef3; color: var(--poseidon); }
:root[data-theme="dark"] .smap-pin.site { background: #9fc4ea; color: #0f1c2a; }
:root[data-theme="dark"] .smap-pin.on { background: var(--accent); color: #fff; }
.smap .maplibregl-popup-content { background: var(--sheet); color: var(--text); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-1, 0 4px 14px rgba(0, 0, 0, .25)); }
.smap .maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--sheet); }
.smap .maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--sheet); }
.smap .maplibregl-popup-close-button { color: var(--text-2); font-size: 18px; }
.smap-pop { display: flex; flex-direction: column; gap: 4px; min-width: 200px; font-size: 13px; }
.smap-pop-h { display: flex; align-items: center; gap: 6px; padding-right: 14px; }
.smap-pop-items { display: flex; flex-direction: column; margin: 4px 0; max-height: 180px; overflow: auto; }
.smap-pop-items a { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--hair); color: var(--text); text-decoration: none; }
.smap-pop-items a b { font-variant-numeric: tabular-nums; }
.smap-pop-picks { display: flex; flex-direction: column; gap: 2px; }
.smap-pop .bar { margin: 6px 0 0; }
.smap-found { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.smap-found .btn { justify-content: flex-start; text-align: left; height: auto; padding: 6px 10px; white-space: normal; }
@media (max-width: 900px) {
  .smap-wrap { grid-template-columns: 1fr; grid-template-rows: 55vh auto; padding: 10px 12px 16px; }
  .smap-map { min-height: 55vh; }
  .smap-side { max-height: none; }
}

/* ov-014 Signing (hq/ui/signing.mjs, hq/ui/signeditor.mjs): rows that become cards on a narrow window (never a sideways
   scroll), the envelope view's two columns, the field editor's pages and boxes. Signer colours from the family tokens with
   a 12% tint; never yellow, brown or olive, and orange is not a field colour. */
.sg-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-list { display: grid; gap: 0; border: 1px solid var(--hair); border-radius: var(--r-sheet, 8px); background: var(--sheet); }
.sg-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) auto minmax(0, 1.6fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--hair); cursor: pointer; }
.sg-row:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) { .sg-row:hover { background: var(--sheet-2); } }
.sg-row b { overflow-wrap: anywhere; }
@media (max-width: 760px) { .sg-row { grid-template-columns: minmax(0, 1fr) auto; } .sg-row > .sg-c { grid-column: 1 / -1; } }
.sg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; background: var(--sg); }
.sg-now::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.sg-view { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .sg-view { grid-template-columns: minmax(0, 1fr); } }
.sg-view .pv { min-height: 520px; }
.sg-side .panel { margin-bottom: 12px; }
.sg-signer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--hair); }
.sg-signer:first-of-type { border-top: 0; }
.sg-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-time { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.sg-time li { padding: 5px 0; border-top: 1px solid var(--hair); overflow-wrap: anywhere; }
.sg-broken { color: var(--danger); font-weight: 600; }
.sg-verdict { border-left: 4px solid var(--poseidon); padding: 10px 14px; background: var(--sheet-2); border-radius: 4px; }
.sg-verdict.bad { border-left-color: var(--danger); }
.sg-drop { border: 2px dashed var(--hair-2); border-radius: 8px; padding: 22px; text-align: center; color: var(--text-2); }
.sg-drop.on { border-color: var(--poseidon); background: var(--sheet-2); }
.sg-ed { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .sg-ed { grid-template-columns: minmax(0, 1fr); } }
.sg-pal { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-pal button { touch-action: none; }
.sg-pages { display: grid; gap: 14px; justify-items: center; background: var(--pv-canvas); padding: 14px; border-radius: 8px; min-width: 0; }
.sg-page { position: relative; background: #fff; box-shadow: var(--shadow-2); max-width: 100%; }
.sg-page canvas { display: block; width: 100%; height: auto; }
.sg-box { position: absolute; border: 2px solid var(--sg); background: color-mix(in srgb, var(--sg) 12%, transparent); border-radius: 3px; font: 600 11px/1.2 var(--f-ui); color: var(--poseidon); padding: 2px 4px; touch-action: none; cursor: move; overflow: hidden; user-select: none; }
.sg-box.sel { outline: 2px solid var(--focus); outline-offset: 1px; }
.sg-box .sg-x { position: absolute; top: 0; right: 0; border: 0; background: var(--sheet); color: var(--poseidon); font-size: 12px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.sg-box .sg-h { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; background: var(--sg); cursor: nwse-resize; touch-action: none; }
.sg-c-navy { --sg: var(--poseidon); } .sg-c-blue { --sg: var(--ink-600); } .sg-c-purple { --sg: var(--purple); } .sg-c-slate { --sg: var(--neutral); } /* never the money green or red */
/* the signature pad (hq/ui/sign/pad.mjs) inside HQ's countersign: HQ's own tokens; white paper with navy ink in day and night */
.sp { margin: 12px 0; --sp-ink: #143c5d; }
.sp-label { font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.sp-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.sp-tab { min-height: var(--ctl-sm, 32px); padding: 0 14px; border: 1px solid var(--hair-2); background: var(--sheet); color: var(--text-2); border-radius: var(--r-ctl, 6px); font: 600 13px var(--f-ui, inherit); cursor: pointer; }
.sp-tab[aria-selected="true"] { background: var(--on-bg); border-color: var(--on-line); color: #fff; }
.sp-type { width: 100%; }
.sp-preview { font: italic 30px/1.4 'Times New Roman', Times, serif; color: #143c5d; background: #fff; min-height: 46px; padding: 0 10px; margin-top: 8px; border: 1px solid var(--hair); border-radius: var(--r-ctl, 6px); overflow-wrap: anywhere; }
.sp-canvas { display: block; border: 1px solid var(--hair); border-radius: var(--r-ctl, 6px); background: #fff; }
.sp-drawbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.sp-hint { color: var(--text-3); font-size: 12px; }
.sg-signers .sg-srow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: start; padding: 8px 0; border-top: 1px solid var(--hair); }
.sg-signers input, .sg-signers select { width: 100%; }
.sg-refusals { margin: 6px 0 0; padding-left: 18px; color: var(--danger); }

/* ---- Mail on phones, rebuilt (16 Nov 2026; Sean: "I'd like it to actually fit in the device that it's on … some of the
   things just hidden in drop-down menus, which are just typical things you would use every day"). Phones (≤700 px, the
   phone shell) and upright tablets only; the computer's Mail is untouched. One header row, the list edge to edge, swipes,
   a compose button, the open email over the list with its everyday buttons along the bottom, the composer as a sheet
   with Send always at the top. Menus everywhere open as a sheet from the bottom on a phone (hq/ui/grid.mjs). */
.mt-phshade, .mt-phhead, .mt-phsearch, .mt-seltop, .mt-fab, .mt-phread, .mt-phbar, .mt-sheethead, .mt-phonly { display: none; }
.mt-ccrow[hidden], .mt-bccrow[hidden], .mt-phsearch[hidden], .mt-seltop[hidden] { display: none !important; }
.cmenu-shade { position: fixed; inset: 0; z-index: 79; background: rgba(8, 19, 34, .4); }
.cmenu.sheet { left: 0; right: 0; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: min(520px, calc(100vw - 16px)); margin: 0 auto; min-width: 0; max-height: 80vh; max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px; border-radius: 18px; animation: ps-up .18s ease; }
.cmenu.sheet .it { height: auto; min-height: 48px; font-size: 16px; gap: 12px; }
.cmenu.sheet .it .ic { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .cmenu.sheet { animation: none; } }
/* the composer on a phone: a sheet as tall as the screen above the keyboard (hq/ui/mail.mjs phoneSheet) */
.mt-csheet { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100dvh; z-index: 45; display: flex; flex-direction: column; background: var(--sheet); }
.mt-cshead { flex: none; display: flex; align-items: center; gap: 4px; min-height: 52px; padding: calc(4px + env(safe-area-inset-top, 0px)) 8px 4px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); }
.mt-cshead .t { flex: 1; min-width: 0; text-align: center; font: 600 16px/1.2 var(--f-ui); color: var(--heading, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-cshead .btn { min-height: 44px; }
.mt-ccancel { border-color: transparent; background: transparent; color: var(--info); font-size: 16px; padding: 0 10px; }
.mt-csend { padding: 0 16px; font-size: 16px; }
.mt-cbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mt-cacc { flex: none; display: flex; align-items: center; gap: 2px; padding: 2px 6px calc(2px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hair); background: var(--sheet-2); overflow-x: auto; scrollbar-width: none; }
.mt-cacc .mt-fsep { height: 24px; }
.mt-csheet .mt-compose { margin: 0; padding: 8px 12px 20px; border: 0; border-radius: 0; box-shadow: none; gap: 6px; }
.mt-csheet .mt-chead, .mt-csheet .mt-tools, .mt-csheet .mt-fmtbar, .mt-csheet .mt-cfoot { display: none; }
.mt-csheet .mt-compose:not(.pv-on) .mt-preview { display: none; }
.mt-csheet .f > label { font-size: 13px; }
.mt-csheet input[type=text], .mt-csheet select { width: 100%; min-height: 44px; }
.mt-torow { display: flex; align-items: flex-end; gap: 6px; } .mt-torow > .f { flex: 1; min-width: 0; }
.mt-ccbtn { display: inline-flex; min-height: 44px; flex: none; }
.mt-csheet .mt-editor { border-radius: var(--r-ctl); }
.mt-csheet .mt-chip { min-height: 36px; font-size: 14px; } .mt-csheet .mt-chipx { min-width: 36px; min-height: 36px; justify-content: center; align-items: center; }
.mt-csheet .mt-later { flex-direction: column; align-items: stretch; }

@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  /* the page: no big title, no computer toolbar, no mailbox set-up (that is in Settings); the app's own + gives way to Mail's compose button */
  .mail-page > .mt-top, .mail-page > .mt-after { display: none; }
  body:has(.mail-page) .pfab { display: none; }
  .mt-split .mt-phlanes, .mt-split .mt-listhead { display: none; }
  .mt-split > .mt-listcol { display: flex; overflow: clip; }
  /* the one header row: the mailbox (tap: mailboxes and folders), search, ⋯ */
  .mt-phhead { display: flex; align-items: center; gap: 2px; position: sticky; top: 0; z-index: 4; min-height: 60px; padding: 4px 4px 4px 8px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); }
  .mt-phtitle { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 52px; padding: 2px 6px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; border-radius: var(--r-ctl); }
  .mt-phtitle .tt { display: flex; align-items: center; gap: 4px; max-width: 100%; }
  .mt-phtitle b { font: 600 18px/1.2 var(--f-ui); color: var(--heading, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-phtitle .hint { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-phicon { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border-color: transparent; background: transparent; color: var(--text-2); }
  .mt-phicon .ic { width: 22px; height: 22px; }
  .mt-phicon:disabled { opacity: .35; }
  .mt-phsearch { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--hair); background: var(--sheet); color: var(--text-3); }
  .mt-phsearch input { flex: 1; min-width: 0; min-height: 44px; }
  .mt-phsearch .btn { min-height: 44px; }
  /* the list: 72 px rows, the sender 16 px, the subject and first words 15 and 14 px, no tick boxes until Select or a held row */
  .mt-row { position: relative; overflow: hidden; touch-action: pan-y; grid-template-columns: minmax(0, 1fr); padding: 10px 14px; min-height: 72px; font-size: 15px; background: var(--sheet); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .mt-row > .mt-cb { display: none; }
  .mt-split.selecting .mt-row { grid-template-columns: 44px minmax(0, 1fr); padding-left: 0; }
  .mt-split.selecting .mt-row > .mt-cb { display: block; width: 24px; height: 24px; margin: 0 auto; }
  .mt-grpbody .mt-row { padding: 10px 14px 10px 26px; } .mt-split.selecting .mt-grpbody .mt-row { padding-left: 0; }
  .mt-r1 { gap: 6px; } .mt-r1 .from { font-size: 16px; } .mt-row:not(.unread) .mt-r1 .from { font-weight: 600; } .mt-r1 .hint { font-size: 13px; }
  .mt-r2, .mt-grpbody .mt-row .mt-r2 { font-size: 15px; } .mt-r2 .hint { font-size: 14px; }
  .mt-r3 .mt-why { display: none; } .mt-r3:empty { display: none; } .mt-tag { font-size: 13px; }
  .mt-sent, .mt-recv { font-size: 0; gap: 0; padding: 3px 4px; margin-right: 2px; } .mt-sent .ic, .mt-recv .ic { width: 15px; height: 15px; }
  .mt-count { font-size: 13px; line-height: 20px; padding: 0 7px; }
  .mt-grp { min-height: 56px; font-size: 16px; } .mt-grp .hint { font-size: 13px; }
  .mt-row > .mt-rbody { position: relative; z-index: 2; background: inherit; transition: transform .18s ease; }
  .mt-row.swiping > .mt-rbody, .mt-row.swopen > .mt-rbody { transform: translateX(var(--sx, 0px)); }
  .mt-row.swiping > .mt-rbody { transition: none; }
  .mt-swacts { position: absolute; top: 0; bottom: 0; right: 0; z-index: 1; display: flex; justify-content: flex-end; overflow: hidden; transition: width .18s ease; }
  .mt-row.swiping .mt-swacts { transition: none; }
  .mt-swbtn { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; border: 0; color: #fff; font: 600 13px/1 var(--f-ui); }
  .mt-swbtn .ic { width: 22px; height: 22px; }
  .mt-swbtn.flag { background: var(--text-2); } .mt-swbtn.del { background: var(--danger); } .mt-swbtn.arch { flex-grow: 1; background: var(--poseidon, #143C5D); }
  .mt-row.swfull .mt-swbtn:not(.arch) { display: none; }
  .mt-swread { position: absolute; top: 0; bottom: 0; left: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; background: var(--info); color: #fff; font: 600 13px/1 var(--f-ui); white-space: nowrap; }
  /* ticking: "3 selected · Tick all · Done" on top, the buttons along the bottom in place of the tab bar */
  .mt-seltop { display: flex; align-items: center; gap: 8px; position: sticky; top: 60px; z-index: 3; min-height: 52px; padding: 4px 8px 4px 14px; border-bottom: 1px solid var(--hair); background: var(--sheet); font-size: 15px; }
  .mt-seltop .btn { min-height: 44px; } .mt-seltop > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mt-seltop > .grow { display: none; }
  .mt-selbar:not([hidden]) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; min-height: 0; padding: 2px 2px env(safe-area-inset-bottom, 0px); border: 0; border-top: 1px solid var(--hair); background: var(--sheet); box-shadow: 0 -2px 10px rgba(8, 19, 34, .06); }
  .mt-selbar > b, .mt-selbar > .grow, .mt-selbar > .mt-selx { display: none; }
  .mt-selbar .btn.small { flex-direction: column; gap: 3px; min-height: 58px; height: auto; padding: 4px 0; border: 0; background: transparent; color: var(--text-2); font-size: 13px; }
  .mt-selbar .btn.small .ic { width: 22px; height: 22px; }
  .mt-selbar .lbl, .mt-selbar .mt-phonly { display: inline; }
  body:has(.mt-selbar:not([hidden])) .pnav, body:has(.mt-split.selecting) .mt-fab { display: none; }
  .mt-list { padding-bottom: 8px; }
  /* compose (Gmail): bottom right, above the tab bar */
  .mt-fab { display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 35; right: 16px; bottom: calc(var(--pnav, env(safe-area-inset-bottom, 0px)) + 12px); height: 56px; padding: 0 20px 0 18px; border: 0; border-radius: 28px; background: var(--accent); color: #fff; font: 600 16px/1 var(--f-ui); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 45%, transparent); }
  .mt-fab .ic { width: 22px; height: 22px; }
  .mt-split[data-ph="read"] .mt-fab, .mt-split[data-ph="lanes"] .mt-fab { display: none; }
  /* the mailboxes and folders: a sheet over the list, the folders right under All mail, Sent and Drafts */
  .mt-split[data-ph="lanes"] > .mt-phshade { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(8, 19, 34, .4); }
  .mt-split[data-ph="lanes"] > .mt-rail { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 20px 20px 0 0; padding: 0 8px calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow-3); background: var(--sheet); }
  .mt-sheethead { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 1; min-height: 56px; padding: 14px 0 4px 8px; background: var(--sheet); }
  .mt-sheethead .ps-grab { position: absolute; left: 50%; top: 6px; margin: 0; transform: translateX(-50%); }
  .mt-sheethead b { flex: 1; font: 600 17px/1.2 var(--f-ui); color: var(--heading, var(--text)); }
  .mt-sheetx { min-width: 44px; min-height: 44px; justify-content: center; border-color: transparent; background: transparent; }
  .mt-split .mt-rail > .mt-phclose { display: none; }
  .mt-rail > * { order: 4; } .mt-rail > .mt-sheethead { order: 0; } .mt-rail > .mt-brand { order: 1; } .mt-rail > .mt-outlane { order: 2; } .mt-rail > .mt-boxhead, .mt-rail > .mt-box, .mt-rail > .mt-boxhead ~ .mt-railnote { order: 3; }
  .mt-rail > .mt-boxhead ~ .mt-railnote { display: block; margin: 4px 12px 8px; font-size: 14px; }
  /* the open email: over the list, a back bar on top, the email at once, the everyday buttons along the bottom */
  .mt-split[data-ph="read"] > .mt-pane { display: flex; position: fixed; inset: 0; z-index: 37; flex-direction: column; overflow: hidden; border: 0; border-radius: 0; background: var(--sheet); padding: env(safe-area-inset-top, 0px) 0 calc(60px + env(safe-area-inset-bottom, 0px)); }
  .mt-phread { display: flex; flex: none; align-items: center; gap: 2px; min-height: 52px; padding: 2px 4px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); }
  .mt-phread .mt-phback { display: inline-flex; align-items: center; gap: 2px; margin: 0; min-height: 44px; max-width: 62%; padding: 0 8px 0 2px; border-color: transparent; background: transparent; color: var(--info); font-size: 16px; font-weight: 600; }
  .mt-phread .mt-phback .ic { width: 22px; height: 22px; } .mt-phread .mt-phback .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-pane > .mt-head { flex: none; padding: 0; gap: 0; border: 0; background: transparent; }
  .mt-pane > .mt-head > * { margin: 8px 12px 0; }
  .mt-pane .mt-whyline, .mt-pane .mt-paneacts, .mt-pane .mt-linkline.mt-unlinked, .mt-pane .mt-unsub.mt-rulesonly, .mt-pane .mt-unsub .mt-rulebtn { display: none; }
  .mt-pane .mt-linkline { font-size: 14px; } .mt-pane .mt-linkline .btn, .mt-pane .mt-unsub .btn, .mt-pane .mt-screen .btn { min-height: 44px; }
  .mt-pane > .mt-msg, .mt-pane > .mt-trailwrap { flex: 1 1 0; min-height: 0; }
  .mt-pane .mt-trailwrap, .mt-pane .mt-tabpanel, .mt-pane .mt-tbody { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
  .mt-pane .mt-msg, .mt-pane .mt-tmsg { flex: 1 1 0; min-height: 0 !important; }
  .mt-pane .mt-msg .mail-body, .mt-pane .mt-tmsg .mail-body { flex: 1 1 0; min-height: 0 !important; height: auto; }
  .mt-pane .mt-tabs { flex: none; padding: 6px 8px 0; }
  .mt-pane .mail-head { flex: none; padding: 10px 14px 8px; gap: 4px; }
  .mt-pane .mail-head h2 { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
  .mt-pane .mail-meta { cursor: pointer; } .mt-pane .mail-meta b { font-size: 15px; overflow-wrap: anywhere; } .mt-pane .mail-meta .hint { font-size: 13px; }
  .mt-pane .mail-head > .mail-to { display: none; } .mt-pane .mail-head.mail-to-open > .mail-to { display: block; font-size: 13px; overflow-wrap: anywhere; }
  .mt-pane .mail-atts { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .mt-pane .mail-att { min-height: 44px; font-size: 14px; white-space: nowrap; } .mt-pane .mail-att-file { min-width: 44px; }
  .mt-pane .mail-held, .mt-pane .mail-meet { font-size: 14px; } .mt-pane .mail-held .btn, .mt-pane .mail-meet .btn { min-height: 44px; }
  .mt-phbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; z-index: 38; left: 0; right: 0; bottom: 0; padding: 2px 2px env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--hair); background: var(--sheet); box-shadow: 0 -2px 10px rgba(8, 19, 34, .06); }
  .mt-split:not([data-ph="read"]) .mt-phbar { display: none; }
  .mt-phb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--text-2); font: 600 13px/1.1 var(--f-ui); }
  .mt-phb > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-phb .ic { width: 22px; height: 22px; } .mt-phb.main { color: var(--info); }
  body:has(.mt-split[data-ph="read"]) { overflow: hidden; }
  /* the Undo and Sending bars sit above the tab bar or the bottom buttons, the width of the screen */
  .mt-hold { left: 8px; right: 8px; transform: none; bottom: calc(var(--pnav, calc(66px + env(safe-area-inset-bottom, 0px))) + 8px); justify-content: space-between; max-width: none; font-size: 15px; }
  .mt-hold > span { flex: 1; min-width: 0; }
  .mt-hold .btn { min-height: 44px; }
  /* review 16 Nov 2026: the tick is its icon's size (it took half the bar and squeezed the words onto four lines), the words two lines at most,
     and the New button steps up above the bar instead of hiding under it */
  .mt-hold > .ic { flex: none; }
  .mt-hold > span:not(.ic) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.3; }
  .mt-hold .btn { flex: none; }
  body:has(.mt-hold) .mt-fab { bottom: calc(var(--pnav, env(safe-area-inset-bottom, 0px)) + 88px); }
  /* the open email's top bar: Back on the left, previous and next on the right */
  .mt-phread > .grow { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 340px) { .mt-phb, .mt-selbar .btn.small { font-size: 12px; } .mt-fab .lbl { display: none; } .mt-fab { padding: 0; width: 56px; justify-content: center; } }
/* a phone on its side: the screen is too short for a fixed reading column, so the open email scrolls as one page */
@media (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .mt-split[data-ph="read"] > .mt-pane { overflow-y: auto; }
  .mt-pane > .mt-msg, .mt-pane > .mt-trailwrap, .mt-pane .mt-msg, .mt-pane .mt-tmsg, .mt-pane .mt-tabpanel, .mt-pane .mt-tbody { flex: none; }
  .mt-pane .mt-msg .mail-body, .mt-pane .mt-tmsg .mail-body { flex: none; height: calc(100vh - 120px); min-height: 240px !important; }
}
/* an upright tablet (iPad): the list and the email side by side, the mailboxes as a sheet from the list's title */
@media (min-width: 701px) and (max-width: 1100px) and (pointer: coarse) and (orientation: portrait) {
  .mt-split { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); height: calc(100vh - 190px); }
  .mt-split > .mt-rail { display: none; }
  .mt-phhead { display: flex; align-items: center; min-height: 56px; padding: 4px 8px; border-bottom: 1px solid var(--hair); background: var(--sheet-2); }
  .mt-phhead .mt-phicon { display: none; }
  .mt-phtitle { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 48px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; }
  .mt-phtitle .tt { display: flex; align-items: center; gap: 4px; max-width: 100%; } .mt-phtitle b { font: 600 17px/1.2 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-phtitle .hint { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-split[data-ph="lanes"] > .mt-phshade { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(8, 19, 34, .4); }
  .mt-split[data-ph="lanes"] > .mt-rail { display: flex; position: fixed; z-index: 40; left: 50%; top: 10vh; bottom: auto; width: min(480px, 90vw); max-height: 80vh; transform: translateX(-50%); overflow-y: auto; border-radius: 18px; padding: 0 8px 12px; box-shadow: var(--shadow-3); background: var(--sheet); }
  .mt-sheethead { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 1; min-height: 52px; padding: 8px 0 4px 8px; background: var(--sheet); }
  .mt-sheethead .ps-grab { display: none; } .mt-sheethead b { flex: 1; font: 600 17px/1.2 var(--f-ui); }
  .mt-sheetx { min-width: 44px; min-height: 44px; justify-content: center; border-color: transparent; background: transparent; }
  .mt-split .mt-phback, .mt-split .mt-phclose, .mt-phlanes { display: none !important; }
  .mt-row { min-height: 68px; font-size: 15px; } .mt-r1 .from { font-size: 15.5px; } .mt-r1 .hint { font-size: 13px; } .mt-r2 .hint { font-size: 14px; }
  .mt-cb { width: 22px; height: 22px; } .mt-row { grid-template-columns: 30px minmax(0, 1fr); }
  .mt-acts .btn.small { min-height: 44px; min-width: 44px; }
  .mt-filt { min-height: 44px; font-size: 14px; }
  .mt-listhead > .t, .mt-listhead > .hint { display: none; } .mt-listhead > .mt-filt { margin-left: auto; }
  .mail-page > .mt-top .btn, .mail-page > .mt-top .mt-syncstate { min-height: 44px; min-width: 44px; }
}

/* Documents on a register entry (hq-docs-2, entrydocs.mjs): the list, the drop area, the pickers. No orange: navy for the drop. */
.entry-docs .list td { vertical-align: top; }
.entry-docs-acts { gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.entry-drop { border: 1px dashed var(--hair); border-radius: 8px; padding: 8px 10px; text-align: center; }
.entry-drop.drop { border-color: var(--poseidon); background: color-mix(in srgb, var(--poseidon) 8%, transparent); }
.entry-pick { max-height: 52vh; overflow: auto; margin-top: 6px; }
.entry-pick tr.entry-dir { cursor: pointer; }
.entry-crumbs { flex-wrap: wrap; gap: 2px; margin-bottom: 6px; }
.entry-docs-btn .ic { margin-right: 2px; }


/* ---- Operations (Group › Operations, 16 Nov 2026; hq/ui/operations.mjs): every product up and fast, the server, spending,
   storage, health. Green / gold / red from the frame's tokens (never brown); motion is CSS, off under reduced motion. ---- */
.ops { max-width: 1400px; }
.ops-dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); vertical-align: -1px; }
.ops-dot.green { background: var(--ok); } .ops-dot.amber { background: var(--warn); } .ops-dot.red { background: var(--danger); } .ops-dot.none { background: var(--hair-2); }
.ops-dot.live::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: ops-ping 2.4s ease-out infinite; }
@keyframes ops-ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.ops-strip { background: var(--sheet); border: 1px solid var(--hair); border-left: 4px solid var(--hair-2); border-radius: var(--r-sheet); padding: 12px 14px; margin: 10px 0 12px; }
.ops-strip.green { border-left-color: var(--ok); } .ops-strip.amber { border-left-color: var(--warn); } .ops-strip.red { border-left-color: var(--danger); }
.ops-light { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ops-light .ops-dot { width: 14px; height: 14px; }
.ops-light b { display: block; font: 650 17px/22px var(--f-ui); color: var(--heading); } .ops-light small { color: var(--text-2); }
.ops-figs { margin-bottom: 0; }
.ops-fig.green b { color: var(--ok); } .ops-fig.amber b { color: var(--warn); } .ops-fig.red b { color: var(--danger); }
.ops-why { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ops-why li { display: flex; align-items: center; gap: 8px; }
.ops-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; position: sticky; top: 0; z-index: 2; background: var(--ground); padding: 6px 0; }
.ops-nav .chip { text-decoration: none; cursor: pointer; }
.ops-sec { scroll-margin-top: 48px; }
.ops-sec h2 { display: flex; align-items: center; gap: 8px; font: 600 13px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin: 22px 0 4px; }
.ops-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--poseidon); color: #fff; font-size: 11px; letter-spacing: 0; }
:root[data-theme="dark"] .ops-n { background: var(--sheet-2); }
.ops-about { margin: 0 0 10px; max-width: 90ch; }
.ops-bar { margin: -4px 0 6px; }
.ops-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ops-prod { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ops-prod.red { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.ops-prod-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ops-prod-name { min-width: 0; display: flex; flex-direction: column; } .ops-prod-name b { font: 650 14.5px/19px var(--f-ui); }
.ops-prod-name a { font-size: 12px; color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-up3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.ops-up3 > div { padding: 4px 8px; border-left: 1px solid var(--hair); display: flex; flex-direction: column; } .ops-up3 > div:first-child { border-left: 0; }
.ops-up3 small { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; } .ops-up3 b { font: 650 15px/20px var(--f-ui); font-variant-numeric: tabular-nums; }
.ops-spark-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
svg.ops-spark { height: 40px; }
.ops-speed { display: flex; flex-direction: column; text-align: right; } .ops-speed b { font: 650 15px/20px var(--f-ui); font-variant-numeric: tabular-nums; } .ops-speed small { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.ops-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 14px; }
.ops-hour { border-radius: 2px; background: var(--hair); } .ops-hour.green { background: var(--ok-line); } .ops-hour.amber { background: var(--warn); } .ops-hour.red { background: var(--danger); }
.ops-targets { list-style: none; margin: 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.ops-targets li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ops-targets .ops-dot { width: 8px; height: 8px; }
.ops-t-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ops-t-val { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-fail { font-size: 12px; }
.ops-src { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.ops-waits { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.ops-wait { border: 1px dashed var(--hair-2); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--sheet); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ops-wait-head { display: flex; align-items: center; gap: 6px; } .ops-wait code { font-size: 11.5px; overflow-wrap: anywhere; }
.ops-meter { margin: 6px 0 10px; } .ops-meter-top { display: flex; justify-content: space-between; font-size: 13px; } .ops-meter-top b { font-variant-numeric: tabular-nums; }
.ops-meter-track { height: 10px; border-radius: 5px; background: var(--sheet-2); overflow: hidden; margin: 4px 0 2px; }
.ops-meter-fill { display: block; height: 100%; border-radius: 5px; background: var(--s1); } .ops-meter-fill.amber { background: var(--warn); } .ops-meter-fill.red { background: var(--danger); }
.ops-meter small { font-size: 11.5px; color: var(--text-3); }
.ops-props { font-size: 12.5px; margin-top: 8px; }
.ops-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; } .ops-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 8px; align-items: start; } .ops-list .ops-dot { margin-top: 4px; }
.ops-table td { vertical-align: middle; }
.ops-sell { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.ops-sellcard .figs { margin: 4px 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-sellcard .fig:nth-child(3) { border-left: 0; } .ops-sellcard .fig:nth-child(n+3) { border-top: 1px solid var(--hair); }
.ops-table td.ops-srcl { font-size: 11.5px; color: var(--text-2); white-space: normal; max-width: 220px; text-align: right; }
.hb.neg { background: var(--neg); }
/* motion on the first draw only (the page adds .ops-anim once): lines draw in, bars grow, the hour cells fade in in turn */
.ops-anim .ops-draw { stroke-dasharray: 1; animation: ops-draw 1.1s ease-out both; } /* the drawn line is the resting state: with motion off it simply shows */
@keyframes ops-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ops-anim .ops-grow { transform-origin: left center; animation: ops-grow .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ops-grow { from { transform: scaleX(0); } }
.ops-anim .ops-rise { transform-box: fill-box; transform-origin: bottom; animation: ops-rise .7s ease-out both; }
@keyframes ops-rise { from { transform: scaleY(0); } }
.ops-anim .ops-hour { animation: ops-fade .5s ease-out both; }
@keyframes ops-fade { from { opacity: 0; } }
@media (max-width: 900px) { .ops-prods, .ops-sell { grid-template-columns: 1fr; } .ops-figs.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-figs .fig:nth-child(odd) { border-left: 0; } .ops-figs .fig:nth-child(n+3) { border-top: 1px solid var(--hair); } }
@media (max-width: 560px) { .ops-t-val { max-width: 140px; } .ops-strip { padding: 10px; } .ops-table th:nth-child(4), .ops-table td:nth-child(4) { display: none; } }
