/*
 * v2.11.0 Polish: the design foundation (items 1 to 8 of the plan; Curtis's plan gate of Nov 22, T1: its own file, loaded after styles.css, so it wins by order and styles.css stays as it is).
 * One meaning per color (book line 23: red = act now, violet = getting old, amber = the brand only); a type scale; spacing; the four kinds of buttons, with the old class names restyled here so every
 * screen moves at once; one set of state labels; tables; forms; the Safari fixes. The heading font (Space Grotesk) is named in the stack and falls back cleanly to the system font until its file is
 * added (Curtis's G10: the file waits for his "font: go").
 */

:root {
  --bg-deep: #121212;
  --bg: #1a1a1a;
  --panel: #1e1e1e;
  --panel-mid: #242424;
  --border: #3a3a3a;
  --text: #f5f5f7;
  --text-2: #c0c0c0;
  --text-muted: #a1a1a6;          /* the dimmest text allowed: about 6.4:1 on --panel */
  --amber: #f5a623;               /* the brand: the one main button and the active menu tab. Never a warning, never a link. */
  --amber-dark: #d4891a;
  --red: #ff453a;                 /* act now: late, past due, a tech's report waiting for the desk */
  --violet: #a78bfa;              /* getting old (the line-26 clocks) */
  --green: #34d399;               /* done, paid */
  --blue: #93c5fd;                /* on its way: Scheduled, Dispatched, En route, Sent */
  --gray: #8e8e93;                /* waiting, not started, Draft, Void */
  --teal: #7ed6cf;                /* v2.13.0 item 19 (Mike's Q23, Nov 25): On site, on Home and the Live Map. The four steps: Not started --gray, En route --blue, On site --teal, Done --green */
  --focus: #93c5fd;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-base: .9375rem; --fs-md: 1rem; --fs-lg: 1.25rem; --fs-xl: 1.5rem; --fs-2xl: 2rem;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem;
  --radius: 11px; --radius-sm: 8px; --radius-pill: 999px;
  --font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

/* ---- v2.11.0 stage 2, S1: the heading font, served from our own site (Space Grotesk, a variable font, weights 300 to 700; SIL Open Font License 1.1: /fonts/OFL.txt).
   `swap`: the page draws at once in the system font and takes Space Grotesk when it arrives; without the file the stack falls back as before. ---- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---- the heading font: page titles, card and panel titles, big money numbers only (Mike: "I like yours"; "as long as we dont over due it") ---- */
h1, .page-title-row h1, .panel-header h2, .card .label, .stat-value, .tech-h1, .tech-stat-n, .money-big {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}
.price, td.price, .money-table td.price, .stat-value, .tech-stat-n { font-variant-numeric: tabular-nums; }

/* ---- the focus ring is not amber (amber means only "the main button") ---- */
:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---- links go somewhere: a faint underline so a link never looks like plain text; actions are buttons ---- */
main a:not(.btn):not(.btn-quiet):not(.brand-link):not(.status-latch):not(.hub-range-chip):not(.tech-job):not(.home-hub-sat):not(.home-hub-core):not(.home-board):not(.home-list-chip) { /* v2.11.0 item 143 (b): a quiet button is never underlined */
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}
main a:not(.btn):hover { text-decoration-color: currentColor; }

/* ---- four kinds of buttons; the old names are restyled here (items 2) ---- */
.btn-main, a.btn.btn-main, button.btn.btn-main { background: var(--amber); color: var(--bg-deep); border: 1px solid var(--amber); }
.btn-main:hover, a.btn.btn-main:hover, button.btn.btn-main:hover { background: var(--amber-dark); color: var(--bg-deep); }
.btn-second, a.btn.btn-second, button.btn.btn-second { background: rgba(130, 155, 185, 0.14); color: rgba(200, 214, 230, 0.95); border: 1px solid rgba(130, 155, 185, 0.55); }
.btn-second:hover, a.btn.btn-second:hover, button.btn.btn-second:hover { background: rgba(130, 155, 185, 0.24); color: var(--text); }
.btn-quiet, .btn-link, button.btn-link, a.btn-link, td.tech-col .assign-link, .assign-link {
  display: inline-flex; align-items: center; gap: var(--s-1);
  min-height: 2rem; padding: 0.2rem 0.55rem;
  background: transparent; color: var(--text-2);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  text-decoration: none; font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
}
.btn-quiet:hover, .btn-quiet:focus-visible, .btn-link:hover, .btn-link:focus-visible, .assign-link:hover, .assign-link:focus-visible {
  background: rgba(255, 255, 255, 0.06); border-color: var(--border); color: var(--text); text-decoration: none;
}
td.tech-col .assign-link { border-color: rgba(130, 155, 185, 0.55); background: rgba(130, 155, 185, 0.14); color: rgba(200, 214, 230, 0.95); }
.btn-danger, a.btn.btn-danger, button.btn.btn-danger { background: transparent; color: #ff8a80; border: 1px solid rgba(255, 69, 58, 0.7); }
.btn-danger:hover, button.btn.btn-danger:hover { background: rgba(255, 69, 58, 0.12); color: #ffb4ab; }
.btn-link.danger, .btn-quiet.danger { color: #ff8a80; }
.btn-sm, .btn.btn-sm { padding: 0.3rem 0.65rem; font-size: var(--fs-sm); }
.tech-panel .btn, .tech-complete .btn, .tech-panel button.btn { min-height: 44px; }  /* the tech's buttons keep their phone size */

/* ---- one set of state labels (item 3); "needs the office" has no color until line 26's clocks color it ---- */
.label { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.55rem; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; white-space: nowrap; color: var(--text-2); }
.label-done { color: var(--green); border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.1); }
.label-way { color: var(--blue); border-color: rgba(147, 197, 253, 0.45); background: rgba(147, 197, 253, 0.08); }
.label-wait { color: var(--gray); border-color: rgba(142, 142, 147, 0.45); }
.label-act { color: #ff8a80; border-color: rgba(255, 69, 58, 0.55); background: rgba(255, 69, 58, 0.1); }
.label-old { color: var(--violet); border-color: rgba(167, 139, 250, 0.5); background: rgba(167, 139, 250, 0.1); }
.label-office { color: var(--text); border-color: var(--text-2); font-weight: 700; }

/* ---- tables (item 4): list pages use the full width; one line per row; money right-aligned; the whole row opens its record ---- */
body.page-wide main { max-width: 1600px; }
.cell-clip { display: block; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr[data-row-href] { cursor: pointer; }
tr[data-row-href]:hover td { background: rgba(255, 255, 255, 0.03); }
table th { color: var(--text-muted); }

/* ---- forms (item 5): labels above boxes; boxes sized to what goes in them; rare forms behind their button ---- */
.w-date { width: 10.5rem; max-width: 100%; }
.w-money { width: 8rem; max-width: 100%; }
.w-qty { width: 5rem; max-width: 100%; }
.w-short { width: 14rem; max-width: 100%; }
.form-row-compact { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: flex-end; }
details.behind > summary { list-style: none; display: inline-flex; }
details.behind > summary::-webkit-details-marker { display: none; }
details.behind[open] > summary { margin-bottom: var(--s-2); }

/* ---- Safari (item 8) ---- */
/* (a) a tick box or a radio inside its label stays a small box with its words beside it (Mike's screenshot: the follow-up's box drawn huge, the words pushed off the edge) */
label input[type="checkbox"], label input[type="radio"], .checkbox-label input[type="checkbox"], .checkbox-label input[type="radio"],
.action-box label input[type="checkbox"], .action-box label input[type="radio"] {
  width: 1.1rem; height: 1.1rem; min-width: 1.1rem; flex: 0 0 auto; margin: 0.2rem 0 0;
}
.checkbox-label { display: flex; align-items: flex-start; flex-wrap: nowrap; }
.checkbox-label > span, .checkbox-label { overflow-wrap: normal; word-break: normal; }
/* (b) an empty date box shows only "No date" in Safari too: its date parts inherit the transparent fill */
input[type="date"].date-empty:not(:focus) { -webkit-text-fill-color: transparent; }
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit,
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-fields-wrapper,
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-month-field,
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-day-field,
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-year-field,
input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-text { color: transparent; -webkit-text-fill-color: transparent; }
input[type="date"]:focus { -webkit-text-fill-color: currentColor; }
/* v2.11.0 item 134 (Curtis's gate, Mike's Safari): an empty date box's "No date" stays on one line inside its box. The placeholder never wraps, and a filter's date box (the customer's Work orders,
   the board's Filter: `.filter-bar`, whose labels set caps and spacing) is as wide as a date and "No date" need, as `.w-date` is. The Ledgers filter keeps its own sizes; the words and the focused box are unchanged */
.date-placeholder { white-space: nowrap; }
.filter-bar:not(.filter-bar-ledgers) input[type="date"] { min-width: 10.5rem; max-width: 100%; box-sizing: border-box; }
/* (c) number boxes grow no spinners */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* (d) a summary drawn as a button has no disclosure mark hanging outside its box */
summary.btn, summary.btn-link, summary.btn-quiet, .job-hold-details > summary { list-style: none; }
summary.btn::-webkit-details-marker, summary.btn-link::-webkit-details-marker, summary.btn-quiet::-webkit-details-marker, .job-hold-details > summary::-webkit-details-marker { display: none; }
/* (e) the Assign window's day and time rows wrap instead of being cut off (Mike, Nov 21, point 4) */
.aw-chips-days, .aw-chips-times { flex-wrap: wrap; overflow-x: visible; }
.aw-pill { font-size: var(--fs-xs); }
/* (f) a phone number never breaks inside itself */
td.phone-cell, .tech-phone, a[href^="tel:"] { white-space: nowrap; overflow-wrap: normal; }

/* ---- the two-factor warning: one slim neutral line (item 31's look; Mike's words unchanged) ---- */
.flash.two-factor-warning { background: var(--panel); border: 1px solid var(--border); color: var(--text-2); padding: 0.35rem 0.75rem; font-size: var(--fs-sm); border-radius: var(--radius-sm); }

/* ---- v2.11.0 logic items' own pieces ---- */
.stop-decision { border-color: rgba(255, 69, 58, 0.55); }
.stop-decision .stop-choice { margin: 0.25rem 0; }
.stop-decision .stop-hold-more { margin: 0.25rem 0 0.5rem 1.6rem; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: flex-end; }
.stop-confirm { margin-top: var(--s-3); }
.stop-confirm-q, .cancel-confirm-q, .remove-void-q, .remove-service-q { font-weight: 600; margin: 0 0 var(--s-2); }
.tech-waiting-line { color: var(--text-2); }
.receipt-tick { margin-top: var(--s-2); }
.receipt-hint, .send-now-sentence { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.trip-question { margin: var(--s-3) 0; }
.aw-phone-yes.is-on { box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.35); }

/* ---- the old status badges are the new labels (item 3): the same classes in the HTML, one look and one meaning each ---- */
.badge { display: inline-flex; align-items: center; padding: 0.1rem 0.55rem; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; white-space: nowrap; background: transparent; color: var(--text-2); }
.badge.unassigned { color: var(--text); border-color: var(--text-2); background: transparent; font-weight: 700; }   /* Open: needs the office (no amber: line 23) */
.badge.notscheduled, .badge.inquiry, .badge.cancelled { color: var(--gray); border-color: rgba(142, 142, 147, 0.45); background: transparent; }
.badge.scheduled, .badge.progress { color: var(--blue); border-color: rgba(147, 197, 253, 0.45); background: rgba(147, 197, 253, 0.08); }
.badge.complete { color: var(--green); border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.1); }
.badge.bad, .badge.past-due, .badge.late { color: #ff8a80; border-color: rgba(255, 69, 58, 0.55); background: rgba(255, 69, 58, 0.1); }

/* ---- v2.11.0 fix round (Curtis's gate) ---- */
/* item 43: a label that holds a round button or a tick box reads as one row, its words beside it (Safari drew each on its own line: styles.css makes form labels a column) */
label:has(> input[type="radio"]), label:has(> input[type="checkbox"]) { flex-direction: row; align-items: center; gap: .5rem; }
label.checkbox-label, .stop-started label, .stop-what-next label, .trip-question label, .trip-way label, .receipt-tick { flex-direction: row; align-items: center; gap: .5rem; }
/* item 54 (Curtis's re-gate, real Safari): the round button and the tick box sit level with their words, not lower: centred on the row, with no top margin of their own */
label:has(> input[type="radio"]) > input[type="radio"], label:has(> input[type="checkbox"]) > input[type="checkbox"], label.checkbox-label > input[type="radio"], label.checkbox-label > input[type="checkbox"] { margin: 0; align-self: center; }
/* item 44: no list bullet drawn outside the box ("›" in Safari) on To invoice's next invoice rows, the payments list, the money summary and Pay runs */
ul.plain, ul.next-invoice-list, ul.job-payment-list, .pay-runs ul, .pay-run ul, .tech-payables ul, [data-pay-runs] ul { list-style: none; padding-left: 0; }

/* ==== v2.11.0 stage 2: the screens ==== */
/* G5 (Curtis): one token for the one hue the boards had outside the table: the tech is at the site now (On site). Nothing else uses it. */
:root { --teal: #7ed6cf; }
.progress-on-site { color: var(--teal); }

/* ---- item 20: the work order page ---- */
.wo-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.wo-head .job-ops-titleline { min-width: 0; }
.wo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.wo-when { margin: var(--s-1) 0 0; color: var(--text-2); }
.wo-more { position: relative; }
.wo-more > summary { list-style: none; }
.wo-more > summary::-webkit-details-marker { display: none; }
.wo-more-menu { position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 40; width: min(26rem, 92vw); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.wo-more-menu > * { max-width: 100%; }
.wo-more-menu form { width: 100%; }
@media (max-width: 640px) { .wo-more-menu { position: static; width: auto; margin-top: var(--s-2); box-shadow: none; } }
.wo-cols { display: block; }
@media (min-width: 1100px) {
  .wo-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem); gap: var(--s-5); align-items: start; }
}
.wo-side > .panel, .wo-side > .job-ops-card { margin-top: 0; margin-bottom: var(--s-4); }
.wo-side .job-ops-grid { display: block; }
.wo-money-big { font-family: var(--font-heading); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; margin: 0; }
.wo-money-facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0 0 var(--s-3); }
.wo-money-facts .muted { display: block; font-size: var(--fs-xs); }
.wo-tabs { margin-top: var(--s-5); }
.wo-tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: var(--s-1); border-bottom: 1px solid var(--border); margin: 0 0 var(--s-3); }
.wo-tabs [role="tab"] { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); padding: 0.55rem 0.8rem; font: inherit; font-weight: 600; cursor: pointer; }
.wo-tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.wo-tabs [data-tab-panel] > .panel { margin-top: 0; }
/* services read like a receipt; Edit opens the row in place */
.svc-edit > summary { list-style: none; }
.svc-edit > summary::-webkit-details-marker { display: none; }
.svc-edit[open] { position: relative; }
.svc-edit-form { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: flex-end; margin-top: var(--s-2); }
.svc-edit-warning, .svc-add-warning { font-weight: 600; color: var(--text); margin: 0 0 var(--s-2); flex-basis: 100%; }
td.svc-actions { text-align: right; white-space: nowrap; }
tr.svc-row-editing td { vertical-align: top; }
/* Curtis's stage 2 amendment: the stop box's questions draw their legend cleanly at 390 px in Safari (the border ran through a two-line legend) */
fieldset.stop-started, fieldset.stop-what-next, fieldset.stop-days-ahead, fieldset.trip-question { border: 0; margin: var(--s-2) 0; padding: 0; min-width: 0; }
fieldset.stop-started > legend, fieldset.stop-what-next > legend, fieldset.stop-days-ahead > legend, fieldset.trip-question > legend { float: left; width: 100%; padding: 0; margin: 0 0 var(--s-2); font-weight: 600; color: var(--text); white-space: normal; }
fieldset.stop-started > legend + *, fieldset.stop-what-next > legend + *, fieldset.stop-days-ahead > legend + *, fieldset.trip-question > legend + * { clear: both; }
.form-hint { margin: var(--s-1) 0 0; }
.inquiry-accept-form { margin-top: var(--s-3); }
.svc-total-label { text-align: right; font-weight: 600; }
.svc-add-body { border-top: 1px solid var(--border); }
.wo-main > .panel, .wo-main > .section-panel, .wo-main > .job-ops-facts { margin-top: var(--s-4); }
.wo-more-menu details.behind[open], .wo-more-menu .action-box { width: 100%; }

/* ---- item 23: Ledgers → To invoice, one list grouped by customer ---- */
.money-tabs-row { margin-bottom: var(--s-3); }
.to-invoice-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-4); }
/* v2.15.3 C 2e: the one bar sits at the bottom of the list and stays in view while the page scrolls */
.to-invoice-bar-bottom { position: sticky; bottom: 0; z-index: 5; margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); background: var(--panel); border-top: 1px solid var(--border); }
.to-invoice-ticked { font-weight: 600; }
.to-invoice-drafts { margin: 0 0 var(--s-3); }
.to-invoice-hint { margin: 0; flex-basis: 100%; }
.to-invoice-when { font-family: inherit; font-size: var(--fs-sm); font-weight: 500; }
.to-invoice-table td.to-invoice-action { text-align: right; white-space: nowrap; }
.to-invoice-count { margin: 0 0 var(--s-3); }

/* ---- item 21: the customer page ---- */
.customer-balance-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); }
.customer-balance { margin: 0; font-size: var(--fs-lg); }
.customer-balance-link { margin: 0; }
.customer-contact-cards { margin: var(--s-4) 0; }
.card-line { margin: var(--s-1) 0 0; }
.customer-recent .panel-header a { font-size: var(--fs-sm); }

/* ---- items 23 and 24 (Curtis): calm the amber: no amber line over a table's headings, no amber row hover, no amber sort link (amber is the main button only, line 23) ---- */
table th { border-top-color: var(--border); }
tr:hover td { background: rgba(255, 255, 255, 0.03); }
.money-table th.th-sort a:hover, .money-table th.th-sort-active a { color: var(--text); }

/* ---- item 24: Pay runs ---- */
details.pay-tech > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
details.pay-tech > summary::-webkit-details-marker { display: none; }
.pay-tech-total { font-size: var(--fs-lg); }
.pay-tech-name { font-weight: 600; }
.pay-lines .pay-line, .pay-lines { color: var(--text-2); font-size: var(--fs-sm); }
.pay-sent-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3); margin-top: var(--s-3); }
.pay-sent-mail { margin: var(--s-1) 0 0; font-size: var(--fs-xs); }
.pay-run { padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.pay-run:first-child { border-top: 0; }
.pay-run-note { margin: 0 0 var(--s-2); }
/* v2.15.3 C 2f: each run in its own frame, as tall as what it holds; an approved run folds to its one line */
.pay-run-framed { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-3); }
.pay-run-framed:first-child { border-top: 1px solid var(--border); }
.pay-run-total { font-weight: 400; color: var(--text-2); }
details.pay-run > summary { cursor: pointer; list-style: none; }
details.pay-run > summary h3 { display: inline; margin: 0; }

/* ---- item 22: the invoice page ---- */
.invoice-head { margin-bottom: var(--s-4); }
.invoice-owed { margin: var(--s-2) 0 0; font-size: var(--fs-xl); }
.invoice-history li { padding: var(--s-1) 0; color: var(--text-2); }

/* ---- item 25: the boards ---- */
.progress-stop { color: #ff8a80; font-weight: 600; }   /* a tech's stop waits for the desk: act now (red, line 23) */
.attn-where { font-size: var(--fs-sm); opacity: 1; color: var(--text); }
.attn-where::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: 0.05rem; background: var(--blue); }
.attn-where--on-site::before { background: var(--teal); }
.board-sched-door, .board-late-add > summary { text-decoration: none; }

/* ---- items 28 to 30: the tech's screens ---- */
.tech-past-due { border-color: rgba(255, 69, 58, 0.55); }                 /* Past due, under Today, in red when it holds anything (act now, line 23) */
.tech-past-due .panel-header h2, .tech-act-mark { color: #ff8a80; }
a.tech-call { min-height: 44px; display: inline-flex; align-items: center; }  /* one tap to call from the driveway */
.tech-pay-none { margin: 0; color: var(--text); }
@media (max-width: 640px) {
  .tech-pay-stack thead { display: none; }
  .tech-pay-stack, .tech-pay-stack tbody, .tech-pay-stack tr { display: block; width: 100%; }
  .tech-pay-stack tr { padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
  .tech-pay-stack td { display: inline; padding: 0; border: 0; background: none; }
  /* item 63 (Curtis's stage 2 gate): a dot only between parts that have words: every word cell that another word cell follows ends with one; Done and Where are not on the phone row (item 580's rule already hid Where) */
  .tech-pay-stack td.tp-part:has(~ td.tp-part)::after { content: "\00A0\00B7"; color: var(--text-muted); }  /* the dot ends the part before it (a no-break space), so a wrapped row never starts with a dot */
  .tech-pay-stack td.tp-done, .tech-pay-stack td.tp-where { display: none; }
  .tech-pay-stack td.tp-state { display: block; margin-top: var(--s-1); }
  /* item 137 (the tester's S-14-A): a row's title wraps (styles.css's .tech-table td is nowrap), so nothing in My pay's boxes scrolls sideways at 390 */
  .tech-pay-stack td { white-space: normal; overflow-wrap: anywhere; }
  .tech-scroll:has(> .tech-pay-stack) { overflow-x: visible; }
}
.tech-table a:not(.btn) { color: var(--text); }  /* item 63: amber is never a link (the old .tech-table rule in styles.css drew the work order numbers amber) */

/* ---- items 31 to 33 ---- */
.two-factor-lock { margin-right: 0.25rem; }
/* item 32: the long Edit form's Save and Cancel stay on screen (the form's panel lets it stick: a sticky bar inside overflow: hidden never sticks) */
form.wo-form .panel.section-panel { overflow: visible; }
.save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); margin: var(--s-4) calc(-1 * var(--s-4)) 0; background: var(--panel); border-top: 1px solid var(--border); }
.person-links { margin: 0 0 var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---- S8 (Mike's "10 yes"): an available tech's pick reads as ONE choice, a round dot (no hue outside the tokens: the old #74d7a0 is --green) ---- */
.aw-mark-round { border-radius: 50%; border-color: var(--green); }
.aw-tech.on .aw-mark-round { background: transparent; border-color: var(--green); color: var(--green); font-size: 0.75rem; }
.aw-tech.bookable:hover { border-color: var(--green); }

/* ---- stage 2 (S6): the ratchet: the inline styles of the files this stage touched are these classes now ---- */
.gap-top-s { margin: 0.35rem 0 0; }
.gap-top-m { margin-top: 1rem; }
.gap-top-panel, .notes-panel[data-gap] { margin-top: 1.25rem; }
.gap-queue { margin: 0.5rem 0 0.75rem; }
.gap-under-s { margin: 0 0 0.35rem; }
.gap-queue-head { margin: 0.5rem 0 0.35rem; }
.list-tight { margin: 0; padding-left: 1.1rem; }
.inline-after { display: inline; margin-left: 0.5rem; }
.inline-form-plain { display: inline; }
.fieldset-plain { border: 0; padding: 0; margin: 0; }
/* the paid-date summaries are quiet buttons now (they were amber, underlined: amber is the main button only) */
.btn-link.paid-mark, .btn-link.paid-clear { color: var(--text-2); text-decoration: none; }
/* item 20 at 390 px: the services stack like receipt lines, so a row's Edit opens across the full width (it squeezed into the last cell) */
@media (max-width: 640px) {
  table.svc-receipt thead { display: none; }
  table.svc-receipt, table.svc-receipt tbody, table.svc-receipt tfoot { display: block; width: 100%; }
  table.svc-receipt tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); }
  table.svc-receipt td { display: block; border: 0; padding: 0; background: none; }
  table.svc-receipt tbody td:nth-child(2) { flex: 1 1 55%; }
  table.svc-receipt tbody td:nth-child(3)::after { content: " \00D7"; color: var(--text-muted); }
  table.svc-receipt tbody td:nth-child(5), table.svc-receipt tfoot td.price { margin-left: auto; font-weight: 600; }
  table.svc-receipt td.svc-actions { flex-basis: 100%; text-align: left; white-space: normal; }
  table.svc-receipt tfoot td:empty { display: none; }
}
td.svc-actions details[open] { min-width: min(24rem, 80vw); }
.tech-count-due { color: #ff8a80; border-color: rgba(255, 69, 58, 0.55); }   /* item 28: the Past due count in red (its own class: label-act marks a row that must act) */

/* ---- v2.11.0 stage 2 fix round (Curtis's gate, items 57 to 68) ---- */
/* item 57: the heading's review button is a form; it sits in the action bar like the links beside it */
.wo-actions form.wo-action-form { display: inline-flex; margin: 0; }
/* item 61: Home's "Needs you today" keeps the page's gap above "Today at a glance" (Safari drew them flush), and its tiles are a grid */
.home-needs { margin: var(--s-4) 0 var(--s-5); }
.home-needs-list li + li { margin-top: var(--s-2); }
.home-needs-n { display: inline-block; min-width: 2ch; font-family: var(--font-heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.home-tiles { margin-top: var(--s-5); }
.home-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--s-3); }
main a.home-tile { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; }
main a.home-tile:hover { border-color: var(--text-muted); }
.home-tile-label { font-family: var(--font-heading); font-weight: 600; }
/* item 66: Receivables in Safari: the ages line has the panel's padding, and two customers' panels never touch */
.receivables-ages { margin: 0; padding: var(--s-3) 1.25rem 0; }
.receivables-customer + .receivables-customer { margin-top: var(--s-4); }

/* ==== v2.11.0 stage 3 ==== */
/* item 78 (Curtis's S3-a): the line under the title (customer · service line) has its own row under the heading's buttons at every width, even when the buttons leave room beside it (no main button) */
.wo-head > .subtitle, .wo-head > p.muted, .wo-head > .editing-line { flex-basis: 100%; }
/* item 78: the buttons stay at the right end of their row when the title is long and they wrap under it, so "More"'s menu (right: 0) opens inside the page at 700 to 1000 px too */
.wo-head > .wo-actions { margin-left: auto; }

/* ---- v2.11.0 testers' fix round (items 135 to 148) ---- */
/* item 142 (c) (Qusie's F3): the customer's Work orders tab: the open Status list is not cut off by the card's edge (.panel clips with overflow: hidden; the table keeps its own .table-scroll) */
.panel.customer-hub-jobs { overflow: visible; }
.customer-hub-jobs-header .customer-hub-all { margin-left: auto; }
/* item 143 (b) (the tester's #2; Qusie's F5): quiet buttons, not underlined links: Length's "change" (styles.css .length-edit > summary underlined it), the boards' "Change day or time"
   (styles.css button.assign-link.assign-trigger outranked .btn-quiet), "N need a date", the Summary cards' "Review" and "Pay runs", and the tech's pay method tile */
.length-edit > summary.btn-quiet { display: inline-flex; text-decoration: none; color: var(--text-2); }
button.assign-link.assign-trigger.btn-quiet { min-height: 2rem; padding: 0.2rem 0.55rem; margin-left: 0; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); opacity: 1; text-decoration: none; }
button.assign-link.assign-trigger.btn-quiet:hover, button.assign-link.assign-trigger.btn-quiet[aria-expanded="true"], .length-edit > summary.btn-quiet:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border); color: var(--text); }
.tech-stat a.tech-pay-method { min-height: 44px; }  /* a tech's tap target (line 23's phone size) */
/* item 143 (d) (Qusie's F5): a fieldset draws the design's border token, never the browser's white groove ("Bill To (optional)" in New's customer form, "Who reads it" on Notes, and any other) */
fieldset { border: 1px solid var(--border); }
fieldset.form-fieldset, fieldset.note-kind-choice { border-radius: var(--radius-sm); padding: var(--s-2) var(--s-3); margin: var(--s-2) 0; min-width: 0; }
fieldset.form-fieldset > legend, fieldset.note-kind-choice > legend { padding: 0 var(--s-1); color: var(--text-2); }

/* ---- v2.11.0 demo walk round (items 149 to 167) ---- */
/* item 152 (Mike, Nov 24, about 9:20 PM EST: "5. sounds good!"; Curtis's held H9, Qusie's Q-N2, the tester's R-8-A): a quiet button has a light outline at rest, so it reads as a button on a phone or
   a tablet too. Lighter and smaller than the second button's blue-grey box (Mike's Nov 21 rule: buttons sized by importance), so "Change day or time" still reads below the boxed "Change tech" */
.btn-quiet, button.assign-link.assign-trigger.btn-quiet, .length-edit > summary.btn-quiet { border-color: rgba(255, 255, 255, 0.15); min-height: 1.75rem; padding: 0.1rem 0.5rem; }
.btn-quiet:hover, .btn-quiet:focus-visible, button.assign-link.assign-trigger.btn-quiet:hover, button.assign-link.assign-trigger.btn-quiet[aria-expanded="true"], .length-edit > summary.btn-quiet:hover { border-color: rgba(255, 255, 255, 0.34); }
.btn-quiet.danger { border-color: rgba(255, 69, 58, 0.4); }
/* item 153 (Curtis's held H2): New customer's Business and Person sit at the left, each beside its words (the radios' row was a .form-row, whose labels styles.css stacks and pushes to a column's end) */
.nc-kind { justify-content: flex-start; }
.nc-kind > label.checkbox-label { flex-direction: row; align-items: center; gap: var(--s-2); }
/* item 154 (the tester's R-8-B): the work order's Contact attempts card has the inner padding every card has (its body was a bare .panel-body, with none) */
#contact-attempts > .panel-body { padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: var(--s-2); } /* the work order page's cards' own padding (11.2 by 12.8 px) */
/* item 154: Home's orbit labels clear their bubbles. The state-label rule above (.label: one line, a pill's border and padding) also caught the bubbles' own .label, so "Today's work not on Dispatch"
   stayed on one line, 167 px in an 88 px bubble; here it wraps inside the bubble as it did before the design foundation */
.home-hub .label { white-space: normal; border: 0; padding: 0; background: none; border-radius: 0; display: block; overflow-wrap: break-word; }
/* item 154 (Curtis's held H8): My pay's pay method tile lines up with the other two at 390: its word ("Zelle") takes the big numbers' line height, so the line under it starts where theirs do, and
   "pay method" stays on one line (it wrapped to two inside its outline) */
.tech-stat .tech-stat-n.tech-stat-s { line-height: 2.1rem; }
.tech-stat a.tech-pay-method { white-space: nowrap; align-self: flex-start; }
/* item 168 (Mike, Nov 24, about 10:17 PM EST: "Can we fix that text to be a button? Not sure how that one slipped through the polish?"): every action still drawn as underlined (or plain) text is
   a quiet button, as item 152 draws one: the Assign window's "Let Finley set the day" (it was "or let Finley Brooks set and change the day on this work order", underlined), its "Can't take it" names
   (a click says why), "Pick another tech", the stop and absent openers and "Remove <tech>" (quiet, below the main button), the change box's "Answer it" links, "Clear date", "Copy address",
   the tech's "No Customer signature? Say why", the boards' "Collapse all" and "Expand all", and the older .btn-link actions (Hold off, Change, Retry, Cancel, Remove, Set the paid date, ...).
   Links that only go somewhere stay links: Waze, phone numbers, the tables' sort headers, the pulse legend, the invoice page's work order link (a.btn-link) */
.btn-link:not(a), .assign-window .assign-link, .assign-link:not(.assign-trigger), .aw-grant, .aw-cantname, button.clear-date, button.map-link, .tech-nosig > summary, .nest-bulk {
  display: inline-flex; align-items: center; gap: var(--s-1);
  min-height: 1.75rem; padding: 0.1rem 0.5rem;
  background: transparent; color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--fs-sm); font-weight: 500; text-decoration: none; text-align: left; cursor: pointer;
}
.btn-link:not(a):hover, .btn-link:not(a):focus-visible, .assign-window .assign-link:hover, .assign-window .assign-link:focus-visible, .assign-link:not(.assign-trigger):hover, .aw-grant:hover, .aw-grant:focus-visible,
.aw-cantname:hover, .aw-cantname:focus-visible, button.clear-date:hover, button.clear-date:focus-visible, button.map-link:hover, button.map-link:focus-visible, .tech-nosig > summary:hover, .nest-bulk:hover, .nest-bulk:focus-visible {
  border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.06); color: var(--text); text-decoration: none;
}
.aw-cantname { font-weight: 600; margin: 0.1rem 0; }  /* a tech's name in "Can't take it now: …": a small button that says why */
.btn-link.danger:not(a) { border-color: rgba(255, 69, 58, 0.4); color: #ff8a80; }  /* a red quiet action keeps its red; "Remove <tech>" is a plain quiet button, below the window's main button */
.tech-nosig > summary { min-height: 44px; font-size: 0.95rem; }  /* the tech's phone keeps his tap size (line 23) */
.board-progress > summary.btn-link { border-color: transparent; min-height: 2rem; padding: 0.2rem 0.55rem; }  /* the boards' Progress pill opens its panel: the pill is its own box, so no second outline */
@media (max-width: 640px) { .nest-bulk { min-height: 44px; } }
button.map-link { min-height: 44px; padding: 0.4rem 0.75rem; }  /* "Copy address" is on the tech's page only (lib/mapButtons.js, routes/tech.js): his tap size at every width */
/* item 169 (Mike, Nov 24, about 10:26 PM EST: "... should that not be over by the submit button?"): on a wide window the Assign window's foot is one block at the bottom right: its question ("Did
   Finley Brooks agree ...?"), its answer, any warning or sentence, and the buttons under them, so the eye goes question, Yes, button in one spot (the foot was a full-width grid: the question at the
   far left, the buttons at the far right). Below 1024 px it stacks full width as before. The foot keeps its 40% height and its scroll, and Save stays in view (sticky) */
@media (min-width: 1024px) {
  .aw-foot { grid-template-columns: minmax(0, 36rem); justify-content: end; }
}
/* item 169: the whole window, its foot and buttons included, fits the visible height (dvh is the height Safari shows with its toolbar; a browser without dvh keeps 90vh) */
@media (min-width: 768px) { .aw-dialog { max-height: min(90vh, calc(100dvh - 3rem)); } }  /* under 768 px the window is the full-screen sheet (styles.css), as before */

/* ---- v2.11.0 demo walk round, the gate's fix round (items 170 to 179) ---- */
/* item 172 (Mike's screenshot, Nov 24): the windows' "Note for the office (optional)" box (Assign and Change day or time), and the "can't make it" note, are text boxes like every other, not flat bars:
   the form boxes' fill, border, corners, padding and height (styles.css .form-body input) */
.assign-window .aw-note, .assign-window .assign-cant-note, .assign-window .aw-reason input[type="text"] {
  background: var(--bg-deep); border: var(--hairline, 1px solid var(--border)); border-radius: var(--radius-sm); color: var(--text);
  padding: 0.6rem 0.75rem; min-height: 2.5rem; font: inherit; font-size: 0.95rem; box-sizing: border-box;
}

/* ---- v2.11.0 testers' recheck round (items 194 to 202) ---- */
/* item 197 (the tester's D-5-A; look rules 1 and 2, item 152): a quiet button that is also a .btn (the Assign window's "Other date", "Other time" and "No date"; the email box's Cancel) keeps its outline at
   rest: styles.css's `button.btn` set a transparent border, which outranked .btn-quiet. Only the border: each keeps its .btn size */
button.btn.btn-quiet, a.btn.btn-quiet { border-color: rgba(255, 255, 255, 0.15); }
button.btn.btn-quiet:hover, button.btn.btn-quiet:focus-visible, a.btn.btn-quiet:hover, a.btn.btn-quiet:focus-visible { border-color: rgba(255, 255, 255, 0.34); }
button.btn.btn-quiet.danger { border-color: rgba(255, 69, 58, 0.4); }
/* item 197: the tech's "Update site access" is a quiet button that fits a thumb (44 px), as "No Customer signature? Say why" is (it was grey text 19 px tall) */
.tech-site-access > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.75rem; font-size: 0.95rem; list-style: none; }
.tech-site-access > summary::-webkit-details-marker { display: none; }

/* ---- v2.12.0 stage 1, the screens round: the Edit window (lib/editWindow.js, public/edit-window.js; LOOK-AND-LAYOUT rules 7, 8, 16). The boards' window's look (.aw-dialog), its own classes.
   It opens over the page and never squeezes it; the backdrop covers the page and its save bar, so one Save is lit; under 768 px it is a sheet from the bottom. ---- */
.ew { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(8, 9, 12, 0.62); font-size: 0.92rem; line-height: 1.4; }
.ew[hidden] { display: none !important; }
.ew-dialog { display: flex; flex-direction: column; width: min(780px, calc(100vw - 48px)); max-height: min(90vh, calc(100dvh - 3rem)); min-width: 0; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); overflow: hidden; outline: none; }
.ew-dialog.ew-wide, .ew-wide .ew-dialog { width: min(1000px, calc(100vw - 48px)); }
.ew-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); }
.ew-title { margin: 0; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.ew-close { background: none; border: 0; color: inherit; font-size: 1.5rem; line-height: 1; padding: 0.1rem 0.4rem; cursor: pointer; min-width: 2.75rem; min-height: 2.75rem; }
.ew-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; margin: 0; }
/* v2.12.0 item 18 (Curtis's Safari at 390): the scrolling body is a plain block (a grid inside the sheet's flex column let Safari draw the parts below the pay table over its rows) */
.ew-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 0.8rem 0.9rem; display: block; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ew-body > * { margin: 0; }
.ew-body > * + * { margin-top: 0.7rem; }
.ew-table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.ew-body label { display: grid; justify-content: stretch; gap: 0.2rem; font-size: var(--fs-sm); color: var(--text-2); }
.ew-body label.checkbox-label { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--text); font-size: var(--fs-base); }
.ew-body input:not([type="checkbox"]):not([type="radio"]), .ew-body select, .ew-body textarea { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 0.5rem 0.65rem; min-height: 2.4rem; font: inherit; box-sizing: border-box; max-width: 100%; }
.ew-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.6rem 0.8rem; align-items: end; }
.ew-grid-3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem 0.8rem; align-items: end; }
.ew-help { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.ew-fault { margin: 0 0.9rem 0.4rem; }
.ew-fault[hidden], .ew-question[hidden] { display: none; }
.ew-question { margin: 0 0.9rem 0.4rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-mid); }
.ew-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--border); background: var(--panel); }
.ew-foot-left { margin-right: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ew-foot-buttons { display: inline-flex; gap: 0.6rem; }
.ew-apart { margin-top: 0.4rem; padding-top: 0.7rem; border-top: 1px solid var(--border); display: grid; gap: 0.5rem; }
.ew-toast { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1300; max-width: 28rem; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
body.ew-open { overflow: hidden; }
.ew .form-fault { border-color: var(--red) !important; }
/* the summary rows: label, line, Edit; a framed table, the label in small capitals */
.ew-rows { display: grid; max-width: 52rem; } /* v2.14.0 item 18 (Mike, Nov 27: the Invoices row's Edit "a bit to the right and I missed it"): the rows stop at about 52rem, so each Edit sits close to its text on a wide screen; the phone is unchanged */
.ew-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; align-items: center; gap: 0.4rem 1rem; padding: 0.6rem 1rem; border-top: 1px solid var(--border); }
.ew-rows > .ew-row:first-child { border-top: 0; }
.ew-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.ew-line { overflow-wrap: anywhere; }
.ew-line .ew-soft { color: var(--text-muted); }
.ew-line .ew-old { color: var(--violet); }
.ew-line .ew-late { color: var(--red); }
.ew-row-extra { grid-column: 2 / -1; }
.ew-rows-panel .ew-rows { padding: 0; }
/* the pay table inside the Pay window: a framed table, amounts in small boxes on the right */
.ew-pay-table { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.ew-pay-table th, .ew-pay-table td { padding: 0.35rem 0.6rem; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
.ew-pay-table thead th { border-top: 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.ew-pay-table td.ew-amt, .ew-pay-table th.ew-amt { text-align: right; width: 10rem; white-space: nowrap; }
.ew-pay-table input { width: 6.5rem; text-align: right; }
.ew-pay-table tr[hidden] { display: none; }
.ew-pay-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; border-top: 1px solid var(--border); }
.ew-ask-box { padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-mid); display: grid; gap: 0.5rem; }
.ew-ask-box[hidden], .ew-picked[hidden] { display: none; }
.ew-hand { color: var(--text-muted); font-size: var(--fs-xs); }
.ew-short { width: 6.5rem; }
/* the page's save bar stays at the bottom of the screen (Edit customer, Add user) */
.page-save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: flex-end; padding: var(--s-3) var(--s-4); margin-top: var(--s-4); background: var(--panel); border-top: 1px solid var(--border); }
.page-save-bar .page-save-note { margin-right: auto; color: var(--text-2); font-size: var(--fs-sm); }
@media (max-width: 767.98px) {
  .ew { align-items: flex-end; padding: 0; }
  .ew-dialog, .ew-wide .ew-dialog { width: 100%; max-height: 92dvh; border-radius: 14px 14px 0 0; border-bottom: 0; }
  .ew-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .ew-row { grid-template-columns: minmax(0, 1fr) auto; padding: 0.6rem 0.85rem; }
  .ew-row .ew-label { grid-column: 1 / -1; }
  .ew-row-extra { grid-column: 1 / -1; }
  .ew-foot { padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px)); }
  .ew-foot-buttons { width: 100%; justify-content: flex-end; }
  .ew-pay-table td.ew-amt, .ew-pay-table th.ew-amt { width: auto; }
  .ew-pay-table input { width: 5.5rem; }
  .ew-pay-table th, .ew-pay-table td { padding: 0.35rem 0.45rem; }
  .ew-pay-more { flex-direction: column; align-items: flex-start; }
}
/* folds inside the rows (Service lines, More): the summary reads like a row */
.ew-fold { border-top: 1px solid var(--border); }
.ew-fold > summary { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; align-items: center; gap: 0.4rem 1rem; padding: 0.6rem 1rem; cursor: pointer; list-style: none; }
.ew-fold > summary::-webkit-details-marker { display: none; }
.ew-fold > summary::before { content: "\25B8"; position: absolute; margin-left: -0.8rem; color: var(--text-muted); font-size: 0.75rem; }
.ew-fold[open] > summary::before { content: "\25BE"; }
.ew-fold > :not(summary) { margin: 0 1rem 0.8rem; }
.ew-fold-edit { justify-self: end; pointer-events: none; }
.ew-check-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.2rem 1rem; }
.ew-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ew-small-title { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 0.3rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem 0.8rem; }
.customer-bill-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(4rem, 0.5fr) minmax(5.5rem, 0.7fr) minmax(5.5rem, 0.7fr); gap: 0.6rem 0.8rem; }
.customer-pays-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 1rem; }
.customer-pays-row select { min-width: 10rem; }
.seg-group { display: inline-flex; flex-wrap: wrap; gap: 0; border: 0; padding: 0; margin: 0; }
.seg-group > legend { font-size: var(--fs-sm); color: var(--text-2); padding: 0 0 0.25rem; }
.seg-choice { display: inline-flex; align-items: center; cursor: pointer; }
.seg-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-choice span { display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0.35rem 0.85rem; border: 1px solid var(--border); background: var(--bg-deep); color: var(--text-2); }
.seg-choice:first-of-type span { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.seg-choice:last-of-type span { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg-choice + .seg-choice span { border-left: 0; }
.seg-choice input:checked + span { background: rgba(245, 166, 35, 0.14); border-color: var(--amber); color: var(--text); }
.seg-choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.customer-stop-lines { display: grid; gap: 0.25rem; }
/* the Team person page: Away in the panel head, days off as one row */
.away-panel .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.away-head { display: inline-flex; align-items: center; gap: 0.6rem; }
.away-head .checkbox-label { margin: 0; }
.hours-off-row { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(0, 2fr) auto; gap: 0.6rem 0.8rem; align-items: end; }
.hours-panel .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.hours-max-line { margin-top: 0.6rem; color: var(--text-2); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.person-title h1 .badge { vertical-align: middle; margin-left: 0.4rem; }
.person-links { margin: 0.2rem 0 0.8rem; }
.panel + .panel, .panel + .ew-rows-panel, form + .panel, .ew-rows-panel + .panel { margin-top: var(--s-4); }
@media (max-width: 767.98px) {
  .ew-fold > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .ew-fold > summary .ew-label { grid-column: 1 / -1; }
  .form-row-3, .customer-bill-row, .ew-two { grid-template-columns: minmax(0, 1fr); }
  .hours-off-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hours-off-row > label:nth-of-type(3), .hours-off-row > button { grid-column: 1 / -1; }
}
/* the days box of Terms only for "Other number of days" (it is still posted) */
.customer-pays-row:not(:has(option[value="other"]:checked)) .terms-other { display: none; }
.away-panel ul, .open-work-preview ul { padding-left: 1.2rem; margin: 0.3rem 0; }
.req-top-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 16rem)); gap: 0.6rem 0.8rem; }

/* ---- v2.12.0 stage 2 ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* item 4: the Notes' "Office only | Techs too" switch on the Add note row (the help on hover); a paid Tech pay panel folded to one line; the two small Edit buttons */
.note-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.note-add-row .note-kind-choice { margin: 0; }
.note-add-row .seg-choice span { min-height: 2.1rem; padding: 0.25rem 0.7rem; }
.tech-pay-paid > summary { cursor: pointer; padding: 0.6rem 1rem; list-style: none; font-weight: 600; }
.tech-pay-paid > summary::-webkit-details-marker { display: none; }
.tech-pay-paid > summary::after { content: " \25B8"; color: var(--text-muted); font-weight: 400; }
.tech-pay-paid[open] > summary::after { content: " \25BE"; }
.wo-inline-edit { margin-left: 0.35rem; vertical-align: baseline; }
/* item 5 and 6: the work order's number in the heading; Billing folded to one line; locked dates as text; a small "How many days?"; the requested day and time as one group */
.wo-head-number { font-size: 0.6em; font-weight: 500; color: var(--text-2); margin-left: 0.4rem; vertical-align: middle; }
h1 .badge { vertical-align: middle; }
.wo-billing-fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; cursor: pointer; padding: 0.5rem 0; list-style: none; }
.wo-billing-fold > summary::-webkit-details-marker { display: none; }
.wo-billing-fold > summary::after { content: "Edit"; margin-left: auto; font-size: var(--fs-sm); color: var(--text-2); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius-sm); padding: 0.1rem 0.5rem; }
.wo-billing-fold[open] > summary::after { content: "Close"; }
.wo-billing-row { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.6rem 0.9rem; align-items: start; }
.wo-billing-row > label, .wo-billing-row > .locked-field { display: grid; justify-content: stretch; gap: 0.2rem; align-content: start; margin: 0; }
.locked-field .field-label, .requested-group .field-label { font-size: var(--fs-sm); color: var(--text-2); }
.locked-date { display: inline-flex; align-items: center; min-height: 2.4rem; color: var(--text); }
.locked-why { font-size: var(--fs-xs); }
.wo-form input[name="service_days"], .wo-form input[name="days"] { width: 5.5rem; }
.requested-group { display: grid; gap: 0.25rem; }
.requested-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.requested-inline input[type="date"] { width: auto; }
.requested-hint { font-size: var(--fs-xs); margin: 0; }
/* item 7: the customer page: the contact strip, Next invoice as a line, a gap and a frame between the tables, Notes as a two-row box with Add beside it */
.customer-contact-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.5rem; padding: 0.6rem 0.9rem; margin: 0 0 var(--s-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.customer-contact-strip .ew-label { margin-right: 0.4rem; }
.next-invoice-line { margin: calc(-1 * var(--s-2)) 0 var(--s-4); padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--panel-mid); }
.next-invoice-line .next-invoice-body > * { display: inline; margin: 0; }
.next-invoice-line .next-invoice-body ul, .next-invoice-line .next-invoice-body div { display: block; margin-top: 0.3rem; }
.customer-hub-notes, [data-customer-recent], .customer-invoices-panel, .customer-hub-jobs { margin-top: var(--s-4); }
.tab-panel > .panel + .panel, .tab-panel > section + section { margin-top: var(--s-4); }
.notes-panel--compact .note-add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.6rem; }
.notes-panel--compact .note-add-form textarea { min-height: 3.2rem; }
.notes-panel--compact .note-add-form .note-add-row { margin: 0; }
/* item 8: Settings: one row of tabs and page buttons; the five numbers on one row; How strict as a folded table; the grades in a row; the board limits as a table; the company card; the six email ticks in two columns */
.settings-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: var(--s-4); }
.settings-bar .settings-tabs { margin: 0; }
.settings-page-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.numbers-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.8rem 1rem; align-items: start; }
.number-cell { display: grid; gap: 0.25rem; align-content: start; }
.number-cell .rec-words { font-size: var(--fs-xs); color: var(--text-muted); }
.strict-fold > summary { cursor: pointer; list-style: none; }
.strict-fold > summary::-webkit-details-marker { display: none; }
.strict-fold > summary h2::after { content: " \25B8"; color: var(--text-muted); font-weight: 400; }
.strict-fold[open] > summary h2::after { content: " \25BE"; }
.strict-state { font-weight: 400; color: var(--text-2); }
.strict-table, .board-attention-table { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.strict-table th, .strict-table td, .board-attention-table th, .board-attention-table td { padding: 0.45rem 0.7rem; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.strict-table thead th, .board-attention-table thead th { border-top: 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.strict-table th[scope="row"], .board-attention-table th[scope="row"] { font-weight: 500; }
.strict-row.is-fixed th, .strict-row.is-fixed td { color: var(--text-muted); } /* v2.15.0 item 3: System preferences: a fixed row is greyed ("Under development") */
.strict-why > summary { font-size: var(--fs-xs); color: var(--text-2); cursor: pointer; margin-top: 0.2rem; }
.strict-why p { font-weight: 400; font-size: var(--fs-sm); margin: 0.3rem 0 0; }
.board-attention-table .tone-violet { color: var(--violet); }
.board-attention-table .tone-red { color: var(--red); }
.board-attention-table input { width: 5rem; }
.board-attention-unit { color: var(--text-2); }
.settings-help { margin-top: 0.8rem; }
.settings-help > summary, .settings-more > summary, .pay-schedule-fold > summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }
.settings-more { margin-top: var(--s-4); }
.grades-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; }
.grade-cell { display: inline-flex; align-items: center; gap: 0.35rem; }
.grade-cell input { width: 4.5rem; }
.trip-mileage-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; margin: 0.6rem 0; }
.pay-schedule-fold { margin: 0.6rem 0; }
.company-card-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.8rem 1.2rem; align-items: start; }
.company-card-body .company-logo-preview { max-width: 7rem; max-height: 4rem; }
.company-card-lines p { margin: 0 0 0.2rem; }
.company-card-actions { display: flex; gap: 0.4rem; }
.customer-email-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.2rem; }
@media (max-width: 767.98px) {
  .company-card-body { grid-template-columns: minmax(0, 1fr); }
  .customer-email-group { grid-template-columns: minmax(0, 1fr); }
}
/* item 9: the invoice page: a gap between its panels; Payments and History side by side */
.invoice-side-by-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); align-items: start; margin-top: var(--s-4); }
.invoice-side-by-side > .panel { margin: 0; }
main .panel.section-panel + .panel.section-panel, main .panel.section-panel + .invoice-side-by-side, .invoice-side-by-side + .panel { margin-top: var(--s-4); }
@media (max-width: 900px) { .invoice-side-by-side { grid-template-columns: minmax(0, 1fr); } }
/* item 10: the tech's Profile: a compact list; "Two-factor: off" in amber until it is on (the build's item 10) */
.tech-dl-compact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.8rem; margin: 0; }
.tech-dl-compact dt { color: var(--text-2); font-size: var(--fs-sm); }
.tech-dl-compact dd { margin: 0; overflow-wrap: anywhere; }
.two-factor-off { color: var(--amber); font-weight: 600; }
.tech-profile-rows .ew-row { grid-template-columns: minmax(0, 1fr) auto; }
.tech-profile-rows .ew-row .ew-label { grid-column: 1 / -1; }
/* item 11 (everywhere): boxes sized to their values; a gap and a frame between panels */
.form-body input[name$="zip"], .form-body input[name="zip"], .form-body input[name="bill_zip"], .form-body input[name="site_zip"] { max-width: 8rem; }
.form-body input[name="state"], .form-body input[name="bill_state"], .form-body input[name="site_state"] { max-width: 5rem; }
.form-body input[type="number"]:not(.days-input), .form-body input[name="trip_charge"], .form-body input[name="terms_other_days"] { max-width: 9rem; }
main > .panel + .panel, main > .panel + section.panel, main > section.panel + .panel { margin-top: var(--s-4); }

/* v2.12.0 item 13g: New work order's one warning above its buttons when it would bill $0.00 (a warning, not a fault: no red, and amber is the brand only) */
.zero-warning { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--text-2); color: var(--text); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); margin: 0 0 0.5rem; font-size: var(--fs-sm); }
/* v2.12.0 item 13f: To invoice's confirm line, right above its Send and Cancel, before anything is emailed */
.send-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 1 1 100%; }
.send-confirm[hidden] { display: none; }
.send-confirm-line { margin: 0; flex: 1 1 100%; font-weight: 500; color: var(--text); }
.tech-start-on { margin: 0.35rem 0 0; color: var(--text); }
.field-hint { display: block; font-size: var(--fs-sm); color: var(--text-muted); font-weight: 400; margin-top: 0.2rem; }
.wo-money-note { font-size: var(--fs-sm); font-weight: 400; }
.wo-edit-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.wo-edit-head h1 { margin: 0; }

/* ---- v2.12.0 stage 2's gate (Curtis's fix items 25 and 26) ---- */
/* item 25 (Safari 390): the Contact window's ZIP box ran past the window's right edge. A window's label is a one-column grid, and Safari sizes that column to the input's own minimum width (wider
   than the half row the box has); the column, and the City / State / ZIP row's columns at narrow widths, may now shrink to the box they are given */
.ew-body label, .wo-billing-row > label, .wo-billing-row > .locked-field { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ew-body .form-row-csz input, .ew-body .form-row-csz select { width: 100%; min-width: 0; }
@media (max-width: 560px) {
  .form-row-csz { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* item 26 (Safari): the old box rules (styles.css `.form-body input`, with its density and narrow copies) give EVERY input of a form, radios and tick boxes too, a box's height, padding, border and
   dark fill; Safari then draws a selected radio as a bare dot and a ticked box as a bare tick. Radios and tick boxes are drawn by the browser again, wherever they sit (their sizes stay as set) */
input[type="radio"], input[type="checkbox"] { min-height: 0 !important; padding: 0 !important; background: revert !important; border: revert !important; border-radius: revert !important; box-shadow: none; }

/* v2.13.0 item 12: the Team page's temporary password box, when the password has run out (desk words, proposed) */
.temp-ran-out { color: var(--danger, #c0392b); }

/* ---- v2.15.3 C 3: Ledgers → Summary (the Claude designer's DESIGN.md; Mike, Nov 27: "well done I like it go ahead"). Three tiles in a fixed order, each only as tall as what it holds
   (look rule 19: align-items start, nothing stretches over empty space); amounts right-aligned in normal weight; a late pay approval turns its own tile red in place (book line 23). ---- */
.ms-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); align-items: start; margin: 0 0 var(--s-4); }
.ms-tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.ms-tile--late { border-color: rgba(255, 69, 58, 0.55); box-shadow: inset 4px 0 0 var(--red); }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.ms-label { font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.ms-alert { font-size: 12px; color: #ff8a80; border: 1px solid rgba(255, 69, 58, 0.55); background: rgba(255, 69, 58, 0.1); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ms-bigline { display: flex; align-items: baseline; gap: var(--s-2); }
.ms-big { font-family: var(--font-heading); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ms-unit { font-size: 13px; color: var(--text-muted); }
.ms-say { margin: 0; font-size: 13px; }
.ms-red { color: #ff8a80; }
.ms-facts { display: grid; gap: 6px; border-top: 1px solid var(--border); padding-top: var(--s-2); }
.ms-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: start; }
.ms-pair-label { font-size: 13px; color: var(--text-muted); }
.ms-pair-amount { font-size: 14px; font-weight: 400; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-pair.ms-red .ms-pair-label, .ms-pair.ms-red .ms-pair-amount { color: #ff8a80; }
.ms-indent .ms-pair-label { padding-left: var(--s-3); }
.ms-sub { font-size: 12px; color: var(--text-muted); }
.ms-button { margin-top: var(--s-1); }
.ms-button .btn { white-space: nowrap; }
.ms-row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s-3); align-items: start; }
.ms-row2 > :only-child { grid-column: 1 / -1; }
.ms-list { margin: 0 0 var(--s-3); }
.ms-table td.num, .ms-table th.num { text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-table tr.ms-total td { font-weight: 600; border-top: 1px solid var(--border); }
.ms-table tr.row-late td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.ms-clue { margin: 0 0 var(--s-2); font-size: 13px; }
.ms-line { margin: 0 0 var(--s-3); }
.ms-line-title { font-weight: 600; }
@media (max-width: 640px) {
  .ms-tiles, .ms-row2 { grid-template-columns: 1fr; }
  .ms-big { font-size: 28px; }
  .ms-button .btn { min-height: 40px; }
  .ms-table thead { display: none; }
  .ms-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-2); padding: 6px 0; }
  .ms-table td { padding: 0; border: 0; }
  .ms-table td:nth-child(n+3) { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); text-align: left; }
}

/* v2.15.3 C 5 (look rules 18 and 19): every customer's table on To invoice has the same column widths down the page, and nothing stretches */
.to-invoice-table { table-layout: fixed; width: 100%; }
.to-invoice-table th.invoice-tab-check { width: 2.5rem; }
.to-invoice-table th:nth-child(3) { width: 9rem; }
.to-invoice-table th:nth-child(4) { width: 7rem; text-align: right; }
.to-invoice-table th:nth-child(5) { width: 13rem; }
.to-invoice-table th:nth-child(6) { width: 12rem; }
.team-phone a { white-space: nowrap; }
.bell-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.bell-chip-n { font-variant-numeric: tabular-nums; color: var(--text-2); }
.bell-fold summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.lists-tabs { margin: 0 0 var(--s-3); }
.hours-ro { list-style: none; padding: 0; margin: 0 0 var(--s-2); }
.hours-ro-day { display: inline-block; min-width: 7rem; color: var(--text-2); }
.tech-desk-line { margin: 0 0 var(--s-3); }
.tech-pay-top .tech-stat-n { font-variant-numeric: tabular-nums; }
.tech-by-wo > summary { cursor: pointer; margin: var(--s-3) 0; font-weight: 600; }

/* ---- v2.15.3 B: the board rows (direction A, the Quiet table; Closed with C's track). Two lines, every row the same height, never a third line; one fixed button column, every button the same width;
   the columns of each board fixed (LOOK 18), so a row redrawn live can't move them. lib/boardRows.js draws the cells. ---- */
.jb2 { table-layout: fixed; width: 100%; }
.jb2 td { height: 3.25rem; vertical-align: middle; }
.jb2 .br-two { min-width: 0; line-height: 1.3; }
.jb2 .br-l1, .jb2 .br-l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.jb2 .br-l2 { font-size: 12.5px; color: var(--text-muted); }
.jb2 .br-l2 .attn { display: inline-flex; vertical-align: middle; }
.jb2 .br-l2 > div { display: inline; }
.jb2 .br-wo-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; text-decoration: none; }
.jb2 .br-wo-link .board-wo { font-weight: 600; }
.jb2 .br-btn { text-align: right; white-space: nowrap; }
.jb2 .br-btn .row-btn { width: 5.5rem; text-align: center; }
.jb2 .br-needs-date { color: var(--amber); }
.jb2 .sched-row-error { margin: 2px 0 0; font-size: 12px; }
.jb2 col.col-btn { width: 6.5rem; }
.jb2-dispatch col.col-wo { width: auto; } .jb2-dispatch col.col-customer { width: 14rem; } .jb2-dispatch col.col-tech { width: 8.5rem; } .jb2-dispatch col.col-progress { width: 9rem; } .jb2-dispatch col.col-when { width: 17rem; }
.jb2-scheduling col.col-wo { width: auto; } .jb2-scheduling col.col-customer { width: 14rem; } .jb2-scheduling col.col-tech { width: 9rem; } .jb2-scheduling col.col-when { width: 22rem; }
.jb2-all col.col-wo { width: auto; } .jb2-all col.col-customer { width: 12rem; } .jb2-all col.col-tech { width: 8.5rem; } .jb2-all col.col-status { width: 14.5rem; } .jb2-all col.col-when { width: 15.5rem; } /* v2.15.3 item 74: a Dispatched row's badge and its progress button on one line */
.jb2-open col.col-wo { width: auto; } .jb2-open col.col-customer { width: 13rem; } .jb2-open col.col-asked { width: 15rem; } .jb2-open col.col-techs { width: 14rem; } .jb2-open col.col-added { width: 6.5rem; }
.jb2-closed col.col-wo { width: auto; } .jb2-closed col.col-customer { width: 10.5rem; } .jb2-closed col.col-tech { width: 7.5rem; } .jb2-closed col.col-completed { width: 11.5rem; } .jb2-closed col.col-track { width: 15rem; } .jb2-closed col.col-cpaid { width: 12rem; } .jb2-closed col.col-tpaid { width: 10.5rem; } /* v2.15.3 item 74: the track's words and "Clear Company Paid Date" whole */
/* Closed's track: three steps, filled as the work order gets paid, always with its words; red with a pay hold */
.br-trk { display: inline-flex; gap: 3px; vertical-align: middle; }
.br-trk i { display: inline-block; width: 18px; height: 6px; border-radius: 3px; background: var(--panel-mid); border: 1px solid var(--border); }
.br-trk i.f { background: var(--green); border-color: var(--green); }
.br-trk.red i.f { background: var(--red); border-color: var(--red); }
.br-tw { font-size: 13px; }
.br-tw.red { color: #ff8a80; }
/* v2.15.3 item 74 (Curtis's walk): every row one height with its dates set, on every board, at 1366: Closed's track words are never cut ("Company not paid yet" fits its 15rem), a paid date sits on line 1 and
   its Clear on line 2 (one line each; the Clear box opens below on press); All's status badge and the progress button share one line */
.jb2 .br-paid .br-l1, .jb2 .br-paid .br-l2 { overflow: hidden; text-overflow: ellipsis; }
.jb2 .br-paid .br-l2:has(details[open]), .jb2 .br-paid:has(details[open]) .br-l2 { white-space: normal; overflow: visible; }
.jb2 .board-cell-track .br-l1 { overflow: visible; text-overflow: clip; }
.jb2 .br-l2 .attn-tag { white-space: nowrap; }
.jb2 .br-l1 .board-time { white-space: nowrap; } /* v2.15.3 item 86 (Curtis's walk): line 1 of the day cell never wraps ("Sat, Nov 28, 2026 · time not set" at 768); cut, its whole words are in the cell's hover */
/* v2.15.3 item 76 (Curtis's walk): the Late pill's note form fits inside its box (the box is placed inside the window by routes/boards.js placeAttn, again when "Add a note" opens) */
.attn-detail { white-space: normal; box-sizing: border-box; max-width: min(22rem, calc(100vw - 16px)); }
.attn-detail .board-late-add form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.4rem; margin: 0.35rem 0 0; }
.attn-detail .board-late-add label { display: block; flex: 1 1 100%; min-width: 0; }
.attn-detail .board-late-add input[name="late_note"] { display: block; width: 100%; min-width: 0; box-sizing: border-box; } /* a pill on line 2 never wraps to a second line of its own */
.jb2 .br-paid .paid-confirm { margin: 0; } .jb2 .br-paid .btn-link:not(a) { min-height: 1.4rem; padding: 0 0.4rem; line-height: 1.3; } /* the Clear button, compact under its date (still spaced apart from other targets) */
.jb2 .paid-chip { padding: 0 0.4rem; line-height: 1.3; }
.jb2-all .board-cell-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb2-all .board-cell-status > *, .jb2-all .board-cell-status > form, .jb2-all .board-cell-status > details { display: inline-block; vertical-align: middle; margin: 0 0.25rem 0 0; } /* v2.15.3 item 85: the cell's own children only; the progress panel inside its details reads as on Dispatch */
.jb2-all .board-cell-status .board-progress-panel { white-space: normal; }
/* v2.15.3 item 75 (Curtis's walk): the Work order column keeps at least 9rem; below the width that fits every column, the table scrolls sideways inside its own box, never the page, and nothing is clipped */
.jb2-dispatch { min-width: 64rem; } .jb2-scheduling { min-width: 60.5rem; } .jb2-all { min-width: 66rem; } .jb2-open { min-width: 64rem; } .jb2-closed { min-width: 76rem; }
.job-board-body:has(> table.jb2), .board-section-body:has(> table.jb2) { overflow-x: auto; position: relative; } /* relative: the hidden header words stay inside the box, so the page itself never scrolls sideways */
@media (min-width: 43.8125em) and (max-width: 74.9375em) { /* 701 to 1199 px: narrower fixed columns, so 1024 fits and smaller windows scroll inside the box */
  .jb2-dispatch col.col-customer { width: 11rem; } .jb2-dispatch col.col-tech { width: 7.5rem; } .jb2-dispatch col.col-progress { width: 8rem; } .jb2-dispatch col.col-when { width: 14rem; } .jb2-dispatch { min-width: 56rem; }
  .jb2-scheduling col.col-customer { width: 11rem; } .jb2-scheduling col.col-tech { width: 7.5rem; } .jb2-scheduling col.col-when { width: 17rem; } .jb2-scheduling { min-width: 51rem; }
  .jb2-all col.col-customer { width: 9rem; } .jb2-all col.col-tech { width: 7rem; } .jb2-all col.col-status { width: 14.5rem; } .jb2-all col.col-when { width: 13rem; } .jb2-all { min-width: 59rem; }
  .jb2-open col.col-customer { width: 10rem; } .jb2-open col.col-asked { width: 13rem; } .jb2-open col.col-techs { width: 11rem; } .jb2-open col.col-added { width: 6rem; } .jb2-open { min-width: 55.5rem; }
  .jb2-closed col.col-customer { width: 8rem; } .jb2-closed col.col-tech { width: 6.5rem; } .jb2-closed { min-width: 72.5rem; } /* the date, track and Clear columns keep their widths: their words are never cut */
}
/* The phone (700 px and under): one card per row, every cell whole and in reading order: the work order, the customer, the tech, the day (and Open's columns), the progress, then the button last */
@media (max-width: 43.75em) {
  .jb2, .jb2-dispatch, .jb2-scheduling, .jb2-all, .jb2-open, .jb2-closed { min-width: 0; }
  .jb2 td { height: auto; flex: 1 0 100%; }
  .jb2 .br-l1, .jb2 .br-l2, .jb2 .br-l1 .board-time { white-space: normal; overflow: visible; }
  .jb2 .br-l2:empty { display: none; }
  .jb2 .board-cell-title { order: 1; } .jb2 .board-cell-customer { order: 2; } .jb2 .board-cell-tech { order: 3; }
  .jb2 .board-cell-when, .jb2 .board-cell-asked, .jb2 .board-cell-completed { order: 4; } .jb2 .board-cell-techs, .jb2 .board-cell-track { order: 5; }
  .jb2 .board-cell-progress, .jb2 .board-cell-status, .jb2 .board-cell-added, .jb2 .board-cell-company-paid, .jb2 .board-cell-tech-paid { order: 6; }
  .jb2 .br-btn { order: 7; text-align: left; }
}
