/* CraftsmanBid, Look A: the office screens (docs/GOAL_LOOK_A.md, approved by Adrian 2026-09-30; the drawn screens are in
   docs/look_a/). OCP's brand, laid out as a phone app: DM Sans on one type scale, Big Shoulders only for screen titles,
   a customer's name on their own page and stage counts, brick only for the main action, a top bar with the + and a tab
   bar at the bottom. On a desk the sidebar stays and the same parts sit in it.

   The rules, each held by a test (tests/test_look_styles.py):
   - every rule sits under .shell, so nothing here can reach the customer's documents or the cover;
   - type sizes are the scale's (--t-*), lengths the spacing scale's (--s*), corners the three radii (--r-*);
   - no colour and no typeface is named here: tokens.css names them, and its text colours read at 4.5:1;
   - nothing moves by itself; no gradients, shadows, hover lifts or all-caps labels;
   - a thumb's target is 44px or more (the layout check, scripts/look_check/, measures it at 360 and 390 wide). */

/* ------------------------------------------------------------------ the frame */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; background: var(--ground);
  color: var(--text); font-family: var(--sans); font-size: var(--t-body); line-height: 1.5; overflow-wrap: anywhere; }
/* A name typed as one long word (a company's, say) breaks where it must rather than push a phone sideways (Codex on
   #367). Preview keeps the customer's page as it is, where words never break. */
.shell .main { min-width: 0; display: flex; flex-direction: column; }
.shell .page { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-block: var(--s7) var(--s8);
  padding-inline: var(--s7); }
.shell .muted:not(.proposal-doc *) { color: var(--muted); }
.shell .small:not(.proposal-doc *) { font-size: var(--t-13); }
.shell .num { font-variant-numeric: tabular-nums; }
.shell .spacer { flex: 1 1 auto; }
.shell .narrow { max-width: 44rem; }
.shell .grow { flex: 1 1 auto; min-width: 0; }
.shell .show-phone { display: none; }
.shell .inline { display: inline; margin: 0; }

/* The desk's sidebar: dark the whole height of the page, however long (2026-10-31 live walk: it stopped at the window's
   height); its contents stay in view as the page scrolls (sticky): the destinations scroll, the account block stays. */
.shell .side { align-self: stretch; min-height: 100vh; background: var(--side-ground); color: var(--side-text); }
.shell .side-in { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  gap: var(--s5); padding-block: var(--s5); padding-inline: var(--s4); overflow: hidden; }
.shell .side .brand { display: flex; align-items: center; gap: var(--s3); padding-inline: var(--s2); padding-block-end: var(--s4);
  border-bottom: 1px solid var(--brass-line); color: var(--side-text); text-decoration: none; }
.shell .side .brand span { font-family: var(--sans); font-size: var(--t-15); font-weight: 500; }
.shell .side nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s5); }
.shell .navgroup { display: flex; flex-direction: column; gap: var(--s1); }
.shell .side nav a { display: flex; align-items: center; min-height: 44px; padding-inline: var(--s3); border-radius: var(--r-button);
  color: var(--side-text); font-size: var(--t-body); font-weight: 400; text-decoration: none; }
.shell .side nav a:hover { background: var(--side-hover); }
.shell .side nav a[aria-current="page"] { background: var(--side-current); color: var(--side-strong); font-weight: 400; }
/* Today's count of reminders due (2026-10-31): a small figure at the menu item's end, and on the phone's Today link. */
.shell .navcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: var(--s1);
  border-radius: var(--r-column); font-size: var(--t-12); font-weight: 600; line-height: 1; }
.shell .side nav a .navcount { margin-inline-start: auto; background: var(--side-current); color: var(--side-strong); }
.shell .who { display: grid; gap: var(--s3); padding-block-start: var(--s4); border-top: 1px solid var(--side-line); }
.shell .who .me { display: grid; font-size: var(--t-body); line-height: 1.3; }
.shell .who .me em { font-style: normal; font-size: var(--t-12); color: var(--side-muted); }
.shell .who .row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.shell .who .seg { border-color: var(--side-line-strong); background: transparent; }
.shell .who .seg .segbtn { min-height: 36px; padding-inline: var(--s3); color: var(--side-text); font-size: var(--t-12); }
.shell .who .seg .segbtn + .segbtn { border-color: var(--side-line-strong); }
.shell .who .seg .segbtn[aria-pressed="true"] { background: var(--side-current); color: var(--side-strong); }
.shell .who .btn.quiet { min-height: 36px; padding-inline: var(--s2); color: var(--side-text); font-size: var(--t-13); }
.shell .who .btn.quiet:hover { background: var(--side-hover); }

/* The phone's top bar (the desk has the sidebar instead): the mark, or Back; the signed-in first name; the +. */
.shell .topbar { display: none; }
/* The phone's tab bar, and the desk's Back above the page. */
.shell .tabbar { display: none; }
.shell .page > .backlink { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; margin-block-end: var(--s2);
  color: var(--muted); font-size: var(--t-body); font-weight: 500; text-decoration: none; }
.shell .page > .backlink:hover { color: var(--text); }
.shell .toast { position: fixed; inset-inline: var(--s4); bottom: calc(var(--s6) + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: fit-content; margin-inline: auto; padding-block: var(--s3); padding-inline: var(--s4);
  border-radius: 999px; background: var(--text); color: var(--ground); font-size: var(--t-body); }

/* ------------------------------------------------------------------ type */
/* The customer's document inside Preview keeps its own look: the office's resets stop at .proposal-doc. */
.shell h1:not(.proposal-doc *), .shell h2:not(.proposal-doc *), .shell h3:not(.proposal-doc *) { margin: 0; text-wrap: balance; }
/* Look B: no 700 anywhere. A browser draws b, strong, headings and table heads bold (700, or 900 inside 600); here they are
   600, and any rule below that names a weight wins. The customer's document keeps its own. */
.shell :where(b):not(:where(.proposal-doc *)), .shell :where(strong):not(:where(.proposal-doc *)),
.shell :where(h1):not(:where(.proposal-doc *)), .shell :where(h2):not(:where(.proposal-doc *)),
.shell :where(h3):not(:where(.proposal-doc *)), .shell :where(h4):not(:where(.proposal-doc *)),
.shell :where(th):not(:where(.proposal-doc *)) { font-weight: 600; }
.shell .pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3);
  margin-block-end: var(--s5); }
.shell .pagehead h1, .shell .bidhead h1 { font-family: var(--sans); font-size: var(--t-title); font-weight: 600; line-height: 1.25;
  letter-spacing: -.01em; }
.shell .pagehead .sub { margin-block-start: var(--s2); color: var(--muted); font-size: var(--t-body); line-height: 1.45; }
.shell .pagehead .actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.shell h2.section { margin-block: var(--s6) var(--s2); font-size: var(--t-15); font-weight: 600; }
.shell h2.section:first-child, .shell .pagehead + h2.section { margin-block-start: 0; }
.shell h3.sub { margin-block: var(--s4) var(--s2); font-size: var(--t-body); font-weight: 600; }

/* ------------------------------------------------------------------ links */
.shell .page a:not(.proposal-doc *) { color: inherit; text-decoration: none; }
.shell .page a:hover:not(.proposal-doc *) { text-decoration: underline; }
/* A link inside a sentence says it is one; a link that is a record's name reads as the name. */
.shell .page p a:not(.btn), .shell .notice a:not(.btn) { color: var(--due); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ controls: every one styled, every one a thumb's size */
.shell button, .shell .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px;
  padding-block: var(--s1); padding-inline: var(--s4); border: 1px solid var(--line); border-radius: var(--r-button);
  background: var(--surface); color: var(--text); font-family: var(--sans); font-size: var(--t-body); font-weight: 500;
  line-height: 1.2; text-align: center; text-decoration: none; white-space: normal; cursor: pointer; }
.shell button:hover, .shell .btn:hover { background: var(--hover); }
.shell .page a.btn:hover { text-decoration: none; }
.shell button.small, .shell .btn.small { padding-inline: var(--s3); }
.shell button.primary, .shell .btn.primary, .shell .page a.btn.primary { border-color: var(--action); background: var(--action);
  color: var(--on-brick); }
.shell button.primary:hover, .shell .btn.primary:hover { border-color: var(--text); background: var(--action); }
.shell button.quiet, .shell .btn.quiet { border-color: transparent; background: transparent; }
.shell button.quiet:hover, .shell .btn.quiet:hover { background: var(--hover); }
.shell button:disabled, .shell .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.shell .block { width: 100%; }

.shell input:not([type]), .shell input[type=text], .shell input[type=email], .shell input[type=tel], .shell input[type=search], .shell input[type=number],
.shell input[type=date], .shell input[type=time], .shell input[type=datetime-local], .shell input[type=url], .shell input[type=password],
.shell textarea, .shell .select select { width: 100%; min-height: 44px; padding-block: var(--s2); padding-inline: var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-button); background: var(--surface); color: var(--text);
  font-family: var(--sans); font-size: var(--t-input); }
.shell textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
.shell textarea[readonly] { background: var(--ground); font-size: var(--t-body); resize: none; }
.shell input[type=file] { width: 100%; max-width: 100%; min-height: 44px; font-family: var(--sans); font-size: var(--t-body); }
.shell input[type=file]::file-selector-button { min-height: 44px; margin-inline-end: var(--s3); padding-inline: var(--s4);
  border: 1px solid var(--line-strong); border-radius: var(--r-button); background: var(--surface); color: var(--text);
  font-family: var(--sans); font-size: var(--t-body); font-weight: 500; cursor: pointer; }
.shell input[type=checkbox]:not(.proposal-doc *), .shell input[type=radio]:not(.proposal-doc *) { width: 20px; height: 20px; margin: 0;
  accent-color: var(--action); }
.shell .select { position: relative; display: block; }
.shell .select select { appearance: none; -webkit-appearance: none; padding-inline-end: var(--s6); cursor: pointer; }
.shell .select.inline { display: inline-block; }
.shell .select.inline select { width: auto; }

.shell .field:not(.proposal-doc *) { display: grid; gap: var(--s1); }
.shell .field > span:not(.proposal-doc *) { font-size: var(--t-13); font-weight: 500; }
.shell .field .hint { font-size: var(--t-12); font-weight: 400; color: var(--muted); }
.shell .check:not(.proposal-doc *) { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-size: var(--t-body); font-weight: 500;
  cursor: pointer; }
.shell .stagerow .nudge { min-width: 44px; }   /* Edit pipelines: Up and Down are a thumb's size on a phone */
.shell .stagerow .stagepos { min-width: 6.5rem; }
.shell .stagerow[draggable="true"] { cursor: grab; }
.shell .stagerow.dragging { opacity: .5; }
.shell .formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s4); }
.shell .choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.shell .choices label { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding-inline: var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r-button); background: var(--surface); font-size: var(--t-body);
  font-weight: 500; cursor: pointer; }
.shell .choices label:has(input:checked) { border-color: var(--text); background: var(--raised); }
.shell .seg { display: inline-flex; flex-wrap: wrap; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--r-button); background: var(--surface); }
.shell .seg .segbtn { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s4); color: inherit;
  font-size: var(--t-body); font-weight: 500; text-decoration: none; }
.shell .seg .segbtn + .segbtn { border-inline-start: 1px solid var(--line); }
.shell .seg .segbtn[aria-pressed="true"], .shell .seg .segbtn[aria-current="true"] { background: var(--text); color: var(--ground); }
.shell .page .seg a.segbtn:hover { text-decoration: none; }
.shell details > summary { display: flex; align-items: center; gap: var(--s2); min-height: 44px; font-size: var(--t-body);
  font-weight: 500; list-style: none; cursor: pointer; }
.shell details > summary::-webkit-details-marker { display: none; }
.shell details > summary::after { content: ""; width: 7px; height: 7px; margin-inline-start: var(--s1);
  border-inline-end: 1.5px solid currentColor; border-block-end: 1.5px solid currentColor; transform: rotate(45deg); }
.shell details[open] > summary::after { transform: rotate(225deg); }
.shell details > summary.small { color: var(--muted); font-size: var(--t-13); }
.shell details[open] > form { margin-block: var(--s2) var(--s3); }
/* A switch: on and off, never a checkbox in disguise. */
.shell .switch { display: inline-flex; align-items: center; width: 52px; min-height: 44px; padding: 0; border: 0; background: transparent; }
.shell .switch::before { content: ""; width: 52px; height: 32px; border-radius: 999px; background: var(--line-strong); }
.shell .switch[aria-checked="true"]::before { background: var(--action); }

/* ------------------------------------------------------------------ layout */
.shell .stack:not(.proposal-doc *) { display: grid; gap: var(--s4); }
.shell .row:not(.proposal-doc *) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.shell .row.between:not(.proposal-doc *) { justify-content: space-between; }
/* A search: the button sits on the box's line, and the list keeps its distance. */
.shell .row.searchrow:not(.proposal-doc *) { align-items: flex-end; margin-block-end: var(--s4); }
.shell .cols { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s5); align-items: start; }
.shell .cols.half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shell .cols.preview-rail { grid-template-columns: 20rem minmax(0, 1fr); }
/* A grid's parts may shrink below their content's widest word (a date box would otherwise push a phone sideways). */
.shell .cols > *, .shell .stack > *, .shell .formgrid > * { min-width: 0; }
.shell .space-y { margin-block: var(--s4); }
.shell .space-top { margin-block-start: var(--s5); }

/* ------------------------------------------------------------------ cards, lists, tables */
.shell .card { padding: var(--s4); border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); }
.shell .card > h2, .shell .card > h3 { margin-block: 0 var(--s3); font-size: var(--t-15); font-weight: 600; }
.shell .card > .row > h2 { margin: 0; font-size: var(--t-15); font-weight: 600; }
.shell .card > .row.between:first-child { margin-block-end: var(--s3); }
.shell .card.flush { padding: 0; overflow: hidden; }

.shell .list { display: grid; }
.shell .list > .item { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px;
  padding-block: var(--s3); border-top: 1px solid var(--line); }
.shell .list > .item:first-child { border-top: 0; }
.shell .item .title { font-size: var(--t-body); font-weight: 500; line-height: 1.3; }
.shell .item .meta { color: var(--muted); font-size: var(--t-13); line-height: 1.35; }
.shell .list.ruled { border-block: 1px solid var(--line); }
.shell ul.plain:not(.proposal-doc *) { display: grid; gap: var(--s2); margin-block: var(--s1) 0; padding-inline-start: var(--s5); font-size: var(--t-body); }
/* A list of things to open (a customer's jobs, the packet's datasheets): each a thumb's height. */
.shell ul.opens { gap: 0; padding-inline-start: 0; list-style: none; }
.shell ul.opens > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); min-height: 44px;
  border-top: 1px solid var(--line); }
.shell ul.opens > li:first-child { border-top: 0; }
.shell ul.opens > li > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

.shell .tablewrap { overflow-x: auto; border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); }
.shell table.rows { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
.shell table.rows th { padding-block: var(--s2); padding-inline: var(--s3); border-bottom: 1px solid var(--line); color: var(--muted);
  font-size: var(--t-12); font-weight: 500; text-align: start; white-space: nowrap; }
.shell table.rows td { padding-block: var(--s2); padding-inline: var(--s3); border-top: 1px solid var(--line); vertical-align: middle; }
.shell table.rows tr:first-child td { border-top: 0; }
.shell table.rows td.num, .shell table.rows th.num { text-align: end; white-space: nowrap; }
.shell table.rows .strong { font-weight: 500; }   /* Look B: a name in a list is a card name, 500 */
.shell table.rows .strong .small { font-weight: 400; overflow-wrap: anywhere; }
/* A record's name in a list opens it: the whole width of its cell, however short the name ("—" for one not yet named). */
.shell table.rows td.strong a { display: flex; align-items: center; min-height: 44px; }

/* ------------------------------------------------------------------ signals: chips, notices, the due mark */
.shell .chip { display: inline-flex; align-items: center; gap: var(--s1); min-height: 24px; padding-inline: var(--s2);
  border-radius: var(--r-chip); background: var(--raised); color: var(--text); font-size: var(--t-12); font-weight: 500;
  line-height: 1.2; white-space: nowrap; }
.shell .chip.ok { background: var(--ok-soft); color: var(--ok); }
.shell .chip.warn { background: var(--warn-soft); color: var(--warn); }
.shell .chip.bad { background: var(--bad-soft); color: var(--bad); }
.shell .chip.ai { background: var(--ai-soft); color: var(--ai); }
.shell .chip.line { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); }
.shell .chip.stage { background: var(--text); color: var(--ground); }
.shell .notice:not(.proposal-doc *) { display: flex; align-items: flex-start; gap: var(--s3); padding-block: var(--s3); padding-inline: var(--s4);
  border-radius: var(--r-card); background: var(--hover); font-size: var(--t-body); }
.shell .notice.warn { background: var(--warn-soft); }
.shell .notice.bad { background: var(--bad-soft); }
.shell .notice.ok { background: var(--ok-soft); }
.shell .notice.ai { background: var(--ai-soft); }
.shell .page > .notice { margin-block-end: var(--s4); }
.shell .formerror { color: var(--bad); font-size: var(--t-body); font-weight: 600; }
.shell .due { display: inline-flex; align-items: center; gap: var(--s2); color: var(--due); font-weight: 600; }
.shell .due::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--due); }
.shell .kv { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); font-size: var(--t-body); }
.shell .kv dt { color: var(--muted); }
.shell .kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; }
.shell .withheld { display: flex; gap: var(--s2); align-items: flex-start; color: var(--muted); font-size: var(--t-13); }
.shell .restricted { display: grid; gap: var(--s2); padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-card); }
.shell .lock { display: flex; gap: var(--s2); align-items: center; color: var(--muted); font-size: var(--t-13); font-weight: 500; }
.shell .savestate { min-width: 5rem; color: var(--muted); font-size: var(--t-13); text-align: end; }
.shell .savestate.bad { color: var(--bad); }

/* ------------------------------------------------------------------ the pipeline */
/* What is due now: a list of rows, each with what kind of reminder it is. The same list sits above Bids. */
.shell .card.duestrip { margin-block-end: var(--s5); padding: 0; border: 0; background: transparent; }
.shell .duestrip > h2 { display: flex; align-items: baseline; justify-content: space-between; margin-block: 0 var(--s2);
  font-size: var(--t-15); font-weight: 600; }
.shell .duestrip > h2 .count { color: var(--muted); font-size: var(--t-13); font-weight: 500; }
.shell .duestrip .list { overflow: hidden; border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); }
.shell .duestrip .list > .item { min-height: 64px; padding-block: var(--s2); padding-inline: var(--s3); color: inherit; text-decoration: none; }
.shell .duestrip .list > .item:hover { background: var(--hover); }
.shell .kindmark { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--raised); color: var(--text); }
.shell .kindmark svg, .shell .chev svg { display: block; }
.shell .chev { flex: 0 0 auto; color: var(--muted); }
.shell [data-my-tasks] { margin-block-end: var(--s5); }
.shell ul.tasks { gap: 0; padding-inline-start: 0; list-style: none; }
.shell .tasks li { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding-block: var(--s2);
  border-top: 1px solid var(--line); }
.shell .tasks li:first-child { border-top: 0; }
.shell .tasks li.done { color: var(--muted); }
.shell .tasks li .small a { display: inline-flex; align-items: center; min-height: 44px; }
.shell .tasks .taskdue { font-weight: 600; }
.shell .tasks .taskdue[data-task-due="overdue"] { color: var(--bad); }
.shell .tasks .taskdue[data-task-due="today"] { color: var(--text); }
/* Done keeps its width beside a long title (the walkthrough's questions are a sentence or two). */
.shell .tasks li > form { flex: 0 0 auto; }

/* The stages: on a phone, six boxes that pick the stage below them; on a desk, the board shows every stage at once. */
.shell .stagepick { display: none; }
.shell .stagebox { display: flex; flex-direction: column; justify-content: center; gap: var(--s1); min-height: 64px;
  padding-block: var(--s2); padding-inline: var(--s3); border: 1px solid var(--line); border-radius: var(--r-button);
  background: var(--surface); color: var(--text); text-decoration: none; }
.shell .page a.stagebox:hover { text-decoration: none; border-color: var(--line-strong); }
.shell .stagebox b { font-family: var(--sans); font-size: var(--t-count); font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.shell .stagebox span { color: var(--muted); font-size: var(--t-13); font-weight: 500; line-height: 1.2; }
.shell .stagebox[aria-current="true"] { border-color: var(--text); background: var(--text); color: var(--ground); }
.shell .stagebox[aria-current="true"] b, .shell .stagebox[aria-current="true"] span { color: var(--ground); }   /* the
   office's link rule (color: inherit) out-ranks the box's own colour: named here, or the lit number is dark on dark */

.shell .board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: var(--s3); overflow-x: auto;
  overscroll-behavior-x: contain; padding-block-end: var(--s2); }
.shell .stagecol { display: grid; align-content: start; gap: var(--s2); min-width: 0; }
.shell .stagecol > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2);
  font-size: var(--t-15); font-weight: 600; }
.shell .stagecol > h2 .small { font-weight: 500; }
.shell .stagecol > .small { display: inline-flex; align-items: center; min-height: 44px; }
/* All (docs/GOAL_PIPELINE_TO_LIVE_IN.md, Decided 3): every job as one ruled list, each row a link to its stage's screen. */
.shell .alllist { gap: 0; }
.shell .allrow { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding-block: var(--s2); padding-inline: var(--s4);
  border: 1px solid var(--line); border-top-width: 0; background: var(--surface); color: var(--text); text-decoration: none; }
.shell .alllist > h2 + .allrow { border-top-width: 1px; border-start-start-radius: var(--r-card); border-start-end-radius: var(--r-card); }
.shell .allrow:last-child { border-end-start-radius: var(--r-card); border-end-end-radius: var(--r-card); }
.shell .page a.allrow:hover { text-decoration: none; background: var(--hover); }
.shell .allrow .grow { display: grid; flex: 1; gap: var(--s1); min-width: 0; }
.shell .allrow .grow b { font-size: var(--t-body); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.shell .allrow .end { display: grid; flex: 0 0 auto; justify-items: end; gap: var(--s1); text-align: end; }
.shell .seg .segbtn[aria-current="true"] { background: var(--text); color: var(--ground); }
.shell .bidsource { margin-block-end: var(--s4); }

/* The calendar (docs/GOAL_PIPELINE_TO_LIVE_IN.md, Decided 8): the prototype's week strip, Day, Week and List
   (prototype/screens-plan.js), in Look A. Every part is a link, so nothing needs a script. */
.shell .calswitches { flex-wrap: wrap; gap: var(--s2); margin-block-end: var(--s4); }
.shell .daystrip { display: grid; gap: var(--s1); margin-block-end: var(--s4); }
.shell .daystrip .weeknav { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.shell .daystrip .weeknav b { font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.shell .daystrip .iconbtn { display: grid; flex: 0 0 auto; place-items: center; min-width: 44px; min-height: 44px;
  border-radius: var(--r-button); font-size: var(--t-15); text-decoration: none; }
.shell .daystrip .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
.shell .daystrip .dayb { display: grid; justify-items: center; gap: var(--s1); min-width: 0; min-height: 44px;
  padding-block: var(--s2); border-radius: var(--r-button); text-decoration: none; }
.shell .daystrip .dayb span { color: var(--muted); font-size: var(--t-12); font-weight: 500; }
.shell .daystrip .dayb b { color: var(--text); font-size: var(--t-16); font-variant-numeric: tabular-nums; }
.shell .daystrip .dayb i { width: 6px; height: 6px; border-radius: 50%; }
.shell .daystrip .dayb.has i { background: var(--brass); }
.shell .daystrip .dayb.today b { color: var(--action); }
.shell .daystrip .dayb[aria-current="true"] { background: var(--text); }
.shell .daystrip .dayb[aria-current="true"] span, .shell .daystrip .dayb[aria-current="true"] b { color: var(--ground); }
.shell .daystrip .dayb[aria-current="true"].has i { background: var(--ground); }
.shell .calday { display: grid; border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.shell .hourrow { display: grid; grid-template-columns: 4rem minmax(0, 1fr); min-height: 48px; border-top: 1px solid var(--line); }
.shell .hourrow:first-child { border-top: 0; }
.shell .hourrow .hour { padding-block: var(--s1); padding-inline: var(--s2); border-inline-end: 1px solid var(--line); color: var(--muted);
  font-size: var(--t-12); }
.shell .hourrow .slots { display: grid; align-content: start; gap: var(--s1); padding: var(--s1); }
.shell .apptchip { display: grid; align-content: center; min-width: 0; min-height: 44px; padding-block: var(--s1); padding-inline: var(--s2);
  border-inline-start: 3px solid var(--action); border-radius: var(--r-button); background: var(--raised); color: var(--text);
  text-decoration: none; }
.shell .page a.apptchip:hover { text-decoration: none; }
/* A booked week (Adrian, 2026-10-31: "not sure what it looks like whenever things are booked up"): a long name or job wraps
   inside its visit rather than being cut to "Maximiliano Ferná...", and a word too long for a phone's column breaks. */
.shell .apptchip b { font-size: var(--t-13); font-weight: 500; overflow-wrap: anywhere; }
.shell .apptchip .small { color: var(--muted); overflow-wrap: anywhere; }
.shell .apptchip.slim { padding-inline: var(--s1); }
.shell .calweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s1); }
.shell .wkcol { display: grid; align-content: start; gap: var(--s1); min-width: 0; }
.shell .wkcol > h3 { padding-block: var(--s1); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--t-12);
  font-weight: 500; text-align: center; }
.shell .wkcol.today > h3 { color: var(--action); }
.shell .callist { display: grid; border-top: 1px solid var(--line); }
.shell .callist .item { display: flex; align-items: center; gap: var(--s3); padding-block: var(--s2); border-bottom: 1px solid var(--line); }
.shell .callist .time { flex: 0 0 auto; min-width: 5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.shell .callist .grow { display: grid; flex: 1; min-width: 0; }
.shell .callist .title { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; overflow-wrap: anywhere; }
.shell .callist .meta { color: var(--muted); font-size: var(--t-13); overflow-wrap: anywhere; }
.shell .calendarlinks { flex-wrap: wrap; }

/* Smoother page changes (Decided 7): the old screen fades into the new one (the browser's own cross-fade) instead of
   blanking, a tap shows at once, and a thin bar slides across the top while the next page loads (app.js marks the frame
   data-loading on the tap). Look A's never-list stands: nothing moves by itself, so no keyframes; the bar is a transition
   the tap starts, and with reduced motion nothing slides. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.shell .loadbar { position: fixed; inset-inline: 0; top: 0; z-index: 50; height: 3px; transform: scaleX(0); transform-origin: left center;
  background: var(--action); opacity: 0; pointer-events: none; }
.shell[data-loading] .loadbar { opacity: 1; transform: scaleX(.85); transition: transform 2400ms ease-out; }
@media (prefers-reduced-motion: reduce) { .shell[data-loading] .loadbar { transition: none; } }
.shell a:active, .shell button:active, .shell .allrow:active, .shell .stagebox:active { opacity: .6; }
.shell .dealcard { display: grid; gap: var(--s1); padding-block: var(--s3); padding-inline: var(--s4); border: 1px solid transparent; box-shadow: var(--shadow-card);
  border-radius: var(--r-card); background: var(--surface); }
.shell .dealcard > .row.between b { font-size: var(--t-body); font-weight: 500; line-height: 1.3; }
.shell .dealcard > .row.between b a { display: inline-flex; align-items: center; min-height: 44px; }
.shell .dealcard .age { color: var(--muted); font-size: var(--t-13); font-variant-numeric: tabular-nums; white-space: nowrap; }
.shell .dealcard > a.dealjob { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: var(--t-body);
  line-height: 1.35; }
.shell .dealcard > .row { gap: var(--s1) var(--s2); }
.shell .dealcard .dealprice { font-size: var(--t-body); font-weight: 600; font-variant-numeric: tabular-nums; }
.shell .dealcard > p { font-size: var(--t-13); }
.shell .dealcard > p.due { font-size: var(--t-13); }
.shell .dealcard > details > summary { min-height: 44px; }

/* ------------------------------------------------------------------ one bid: header, tabs, the action bar */
.shell .bidhead { display: grid; gap: var(--s2); margin-block-end: var(--s3); }
.shell .bidhead .chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.shell .bidhead .jobline { font-size: var(--t-16); line-height: 1.35; }
.shell .bidhead .facts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); color: var(--muted); font-size: var(--t-body); }
.shell .tabs { display: flex; gap: var(--s1); margin-block-end: var(--s5); border-bottom: 1px solid var(--line); }
.shell .tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: var(--s3);
  margin-block-end: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: var(--t-body); font-weight: 500;
  white-space: nowrap; }
.shell .page .tabs a:hover { color: var(--text); text-decoration: none; }
.shell .tabs a[aria-current="page"] { border-bottom-color: var(--text); color: var(--text); font-weight: 500; }
.shell .actionbar { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2);
  margin-block-start: var(--s5); padding-block: var(--s3) calc(var(--s3) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--ground); }

/* A reminder that is due: what it is, its message, one main action (Text it), then the shaded panel for "I sent it". */
.shell .nextmsg { display: grid; gap: var(--s3); margin-block-end: var(--s4); padding: var(--s4); border: 1px solid var(--line);
  border-radius: var(--r-card); background: var(--surface); font-size: var(--t-body); }
.shell .nextmsg .duerow { display: grid; gap: var(--s3); }
.shell .nextmsg .duerow + .duerow { padding-block-start: var(--s3); border-top: 1px solid var(--line); }
.shell .duehead { font-size: var(--t-15); font-weight: 600; line-height: 1.3; }
.shell .duehead.due { align-items: baseline; color: var(--text); }
.shell .nextmsg textarea { width: 100%; }
.shell .sendrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.shell .sendrow > .primary { grid-column: 1 / -1; min-height: 48px; font-size: var(--t-16); }
.shell .sendrow > .muted { grid-column: 1 / -1; }
.shell .markpanel { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-button); background: var(--panel); }
.shell .markpanel .label { color: var(--muted); font-size: var(--t-13); font-weight: 600; }
.shell .markpanel .marks { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: var(--s2); }
.shell .markpanel .marks form, .shell .markpanel .marks button { width: 100%; }
.shell .stoprow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.shell .stoprow button.quiet { padding-inline: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.shell .stoprow button.quiet:hover { background: transparent; color: var(--text); }

.shell .timeline { display: grid; }
.shell .timeline .ev { display: grid; grid-template-columns: 11rem 1fr; gap: var(--s3); padding-block: var(--s3);
  border-top: 1px solid var(--line); font-size: var(--t-body); }
.shell .timeline .ev:first-child { border-top: 0; }
.shell .timeline .when { color: var(--muted); font-size: var(--t-13); font-variant-numeric: tabular-nums; }
.shell .sigimg { display: block; max-width: 16rem; max-height: 64px; margin-block-start: var(--s2); border: 1px solid var(--line);
  border-radius: var(--r-chip); background: var(--paper); }

/* ------------------------------------------------------------------ the estimate */
.shell .area { border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); }
.shell .area + .area { margin-block-start: var(--s3); }
.shell .areahead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line); }
.shell .roomhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: var(--s3); }
.shell .lines { display: grid; }
.shell .editline { display: grid; gap: var(--s3); padding: var(--s4); border-top: 1px solid var(--line); }
.shell .editline:first-child { border-top: 0; }
.shell .editline.is-hidden { background: var(--hover); }
.shell .editline.is-optional { border-inline-start: 3px solid var(--brass); }
.shell .lrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); align-items: end; gap: var(--s3); }
.shell .lrow.checks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.shell .lrow .field > span { color: var(--muted); font-size: var(--t-12); }
.shell .lrow .withheld { grid-column: span 2; align-self: center; }
.shell .addline { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.shell .card.details { margin-block-end: var(--s4); }
.shell .card.details .lrow + .lrow { margin-block-start: var(--s3); }
.shell .card.colours { margin-block-end: var(--s5); }
.shell .card.colours .lrow { grid-template-columns: repeat(2, minmax(0, 9rem)) auto; }

/* Where a line's cost came from (docs/CATALOG_PRICING_PLAN.md): the catalog row it is priced as, a chip for catalog or typed,
   Use catalog rate, the other tiers' material and the notes on the rate. */
.shell .ratebox .ratewhere { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.shell .ratebox .ratetiers, .shell .ratebox .ratenotes { grid-column: 1 / -1; margin: 0; }
.shell .ratebox .ratetiers:empty, .shell .ratebox .ratenotes:empty { display: none; }
.shell .ratebox .ratenotes { display: flex; flex-wrap: wrap; gap: var(--s2); }
.shell .ratebox .ratenotes .chip { white-space: normal; max-width: 100%; padding-block: var(--s1); }

/* The rates page: a row per sheet row, a block per job type, the item's name wrapping rather than widening the phone. */
.shell .raterow { display: grid; gap: var(--s4); }
.shell .raterow h2 { overflow-wrap: anywhere; }
.shell .ratectx { display: grid; gap: var(--s3); padding-block-start: var(--s3); border-top: 1px solid var(--line); }
.shell .ratectx:first-of-type { border-top: 0; padding-block-start: 0; }
.shell .ratekv { grid-template-columns: minmax(5rem, auto) minmax(0, 1fr); }
.shell .ratekv dd { text-align: start; font-weight: 400; overflow-wrap: anywhere; }
.shell .ratekv dd b { font-weight: 600; }
.shell .ratename { overflow-wrap: anywhere; }

/* The walkthrough (docs/GOAL_LIVE_AND_WALKTHROUGH.md): a line it made looks different until a person confirms it, and
   says where it came from; its way in, the bid's tasks, the upload and the draft wear the same parts. */
.shell .editline.is-check { background: var(--ai-soft); }
.shell .wtmark { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.shell .card.wtcard, .shell .card.bidtasks { margin-block-end: var(--s4); }
.shell .wtcard .chip { flex: 0 0 auto; }
.shell .wtpage .pagehead { margin-block-end: 0; }
.shell .wtpage .pagehead h2 { font-size: var(--t-15); font-weight: 600; }
.shell .wtroom + .wtroom { margin-block-start: var(--s4); padding-block-start: var(--s4); border-top: 1px solid var(--line); }
.shell .wtroom > h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-block-end: var(--s2);
  font-size: var(--t-16); font-weight: 600; }
.shell .wtroom li { line-height: 1.45; overflow-wrap: anywhere; }
.shell ol.wtasks { display: grid; gap: var(--s2); margin: 0; padding-inline-start: var(--s5); font-size: var(--t-body); line-height: 1.45;
  overflow-wrap: anywhere; }
.shell .wtpage .actionbar { align-items: center; }

/* Answering a walkthrough's question: its choices as big buttons, a short box, then Done; an answered one shows its answer. */
.shell .tasks li.ask { flex-direction: column; align-items: stretch; gap: var(--s2); }
.shell .tasks li.ask > form.inline { align-self: flex-start; }
.shell .answerform { margin-block-start: var(--s2); }
.shell .answerform .choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.shell .answerform .choice { min-height: 44px; text-align: start; }
.shell .answerform textarea { min-height: 64px; }
.shell .tasks li.answered .qtitle { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.shell .tasks li.answered .answer { color: var(--text); overflow-wrap: anywhere; }
.shell .tasks .reanswer > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.shell .bidtasks .updateform { margin-block-start: var(--s4); padding-block-start: var(--s3); border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ the price */
.shell .tiercols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.shell .tiercol { display: grid; align-content: start; gap: var(--s2); padding: var(--s4); border: 1px solid var(--line);
  border-radius: var(--r-card); background: var(--surface); }
.shell .tiercol.picked { border-color: var(--text); }
.shell .tiercol h3 { font-size: var(--t-15); font-weight: 600; }
.shell .tiercol .price { font-size: var(--t-count); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.shell .tiercol ul { display: grid; gap: var(--s1); margin: 0; padding-inline-start: var(--s4); color: var(--muted); font-size: var(--t-13); }
.shell .tierstrip { display: none; }
.shell .tile { display: grid; gap: var(--s1); padding: var(--s3); border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card);
  background: var(--surface); }
.shell .tile .label { color: var(--muted); font-size: var(--t-13); font-weight: 500; }
.shell .tile .value { font-size: var(--t-15); font-weight: 600; font-variant-numeric: tabular-nums; }
.shell .reporttiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 760px) { .shell .reporttiles { grid-template-columns: minmax(0, 1fr); } }   /* the phone stacks the four tiles */
.shell table.trend td:nth-child(2) { min-width: 9rem; }
.shell .breakdownpick { display: none; }
@media (min-width: 761px) {   /* the import review's short columns keep their words whole; the detail column wraps */
  .shell table.importrows th, .shell table.importrows td:nth-child(-n+3) { white-space: nowrap; }
  .shell table.pipemap thead th, .shell table.pipemap td:last-child { white-space: nowrap; }   /* GHL to Bid: headers and row counts whole */
}
.shell [data-scope="company"] { font-size: var(--t-12); font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-chip); padding: 0 var(--s2); white-space: nowrap; }
@media (max-width: 760px) {   /* the phone picks Source or Rep and reads each row as labeled lines */
  .shell .breakdownpick { display: inline-flex; }
  .shell .breakdown:not(.picked) { display: none; }
  .shell table.stacktable thead { display: none; }
  .shell table.stacktable, .shell table.stacktable tbody, .shell table.stacktable tr,
  .shell table.stacktable th, .shell table.stacktable td { display: block; width: auto; }
  .shell table.stacktable tr { padding: var(--s2) 0; border-top: 1px solid var(--line); }
  .shell table.stacktable td { display: flex; justify-content: space-between; gap: var(--s3); }
  .shell table.stacktable td::before { content: attr(data-label); color: var(--muted); }
  .shell table.trend td:nth-child(2) { min-width: 0; }   /* the trend keeps its columns; the bar gives way, the number stays */
  .shell table.trend .trendbar { max-width: 3rem; }
  .shell table.trend th { white-space: normal; overflow-wrap: normal; word-break: keep-all; hyphens: none; }   /* wrap between words only */
}
/* A link inside a report table (a source or rep name, a trend count): a thumb's size, 44px tall and wide (live retest 2026-11-01). */
.shell .taplink { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.shell .trendbar { display: inline-block; height: .6rem; min-width: 2px; vertical-align: middle; background: var(--action); border-radius: var(--r-chip); max-width: 6rem; }   /* the number beside it is the value */
.shell .products ul { padding-inline-start: var(--s4); }

/* ------------------------------------------------------------------ the preview, and sending */
.shell .previewpane { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--doc-ground);
  line-height: 1.55; overflow-wrap: normal; }   /* the customer's page's own (app.css body), so Preview draws it as it is */
.shell .previewpane .frame { max-height: 44rem; overflow-y: auto; }
/* The customer's page reads at the customer's 15px, whatever size a desk gives the office around it (Look B). */
.shell .previewpane .frame { font-size: var(--t-15); }
.shell .previewpane .proposal-doc { padding: var(--s5); }
.shell .previewpane .proposal-doc .hero { grid-template-columns: minmax(0, 1fr) 16rem; }
.shell .card > .field .seg { justify-self: start; }
.shell .card > h3.sub { margin-block-start: var(--s5); }
.shell .linkcard .row input { flex: 1 1 14rem; font-variant-numeric: tabular-nums; }
.shell .photothumb { display: block; max-width: 16rem; margin-block: var(--s2); border: 1px solid var(--line); border-radius: var(--r-button); }

/* ------------------------------------------------------------------ follow-up and the packet: steps and their wording */
.shell .steps { display: grid; gap: var(--s4); margin-block: var(--s3); }
.shell .step { display: grid; gap: var(--s2); padding-block-start: var(--s3); border-top: 1px solid var(--line); }
.shell .step .message { max-width: none; padding: var(--s4); border-radius: var(--r-button); font-size: var(--t-16); }
.shell .step .editstep { margin-block-start: var(--s3); }
.shell .step .editstep textarea { font-family: var(--sans); }

/* ------------------------------------------------------------------ a customer */
.shell .custhead { display: grid; gap: var(--s2); margin-block-end: var(--s4); }
.shell .custhead .chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.shell .custhead h1 { font-family: var(--sans); font-size: var(--t-title); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.shell .custhead .where { color: var(--muted); font-size: var(--t-body); }
.shell .quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); max-width: 32rem; margin-block-end: var(--s5); }
.shell .quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1); min-height: 64px;
  border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); color: var(--text); font-size: var(--t-12);
  font-weight: 500; text-decoration: none; }
.shell .page .quick a:hover { text-decoration: none; border-color: var(--line-strong); }
.shell .custcols .custpart > h2 { margin-block-end: var(--s3); }
.shell .custpart ul.plain { gap: 0; padding-inline-start: 0; list-style: none; }
.shell .custpart ul.plain > li { padding-block: var(--s2); border-top: 1px solid var(--line); line-height: 1.45; }
.shell .custpart ul.plain > li:first-child { border-top: 0; }
.shell .custpart li > form.inline, .shell .custpart li > .chip { vertical-align: middle; }

/* ------------------------------------------------------------------ review asks */
.shell .revgroup { display: grid; gap: var(--s3); margin-block-end: var(--s5); }
.shell .revgroup > h2 { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--t-15); font-weight: 600; }
.shell .revgroup > h2 .count { color: var(--muted); font-size: var(--t-13); font-weight: 500; }
.shell .reviewrow { display: grid; gap: var(--s2); }
.shell .reviewrow > .row.between b { font-size: var(--t-body); font-weight: 500; }
.shell .reviewrow > .row.between b a { display: inline-flex; align-items: center; min-height: 44px; }
.shell .reviewrow .duerow { display: grid; gap: var(--s3); }
.shell .rules { padding: var(--s3) var(--s4); border-radius: var(--r-card); background: var(--raised); font-size: var(--t-13); line-height: 1.45; }

/* ------------------------------------------------------------------ More */
.shell .menulist { display: grid; overflow: hidden; border: 1px solid transparent; box-shadow: var(--shadow-card); border-radius: var(--r-card); background: var(--surface); }
.shell .menulist a { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 52px;
  padding-inline: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-body); font-weight: 500; text-decoration: none; }
.shell .menulist a:first-child { border-top: 0; }
.shell .page .menulist a:hover { background: var(--hover); text-decoration: none; }
.shell .prefs { display: grid; gap: var(--s3); }
.shell .prefs .prefrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }

/* ------------------------------------------------------------------ the desk (861px and wider) */
@media (min-width: 861px) {
  .shell .page { padding-block: var(--s5) var(--s7); padding-inline: var(--s6); }
  .shell .pagehead { margin-block-end: var(--s4); }
  .shell .tabs a { padding-inline: var(--s4); }
  .shell .card { padding: var(--s4); }
  .shell .phone-only { display: none; }
  .shell .board > .alllist { display: none; }
}
@media (min-width: 861px) and (max-height: 940px) {
  .shell .side-in { gap: var(--s4); padding-block: var(--s4); }
  .shell .side nav { gap: var(--s4); }
}
@media (max-width: 1100px) and (min-width: 861px) {
  .shell .cols, .shell .cols.preview-rail { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ the phone (860px and narrower) */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell .side, .shell .desk-only, .shell .hide-phone, .shell .pagehead .actions.desk-only { display: none; }
  .shell .show-phone { display: block; }
  .shell .page { padding-block: var(--s4) calc(var(--s8) + var(--s7) + env(safe-area-inset-bottom, 0px)); padding-inline: var(--s4); }
  /* Back lives in the top bar on a phone. */
  .shell .page > .backlink { display: none; }

  .shell .topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--s2); min-height: 52px;
    padding-block-start: env(safe-area-inset-top, 0px); padding-inline: var(--s4) var(--s3); border-bottom: 1px solid var(--line);
    background: var(--ground); }
  .shell .topbar .phone-brand { display: flex; align-items: center; gap: var(--s2); min-height: 44px; color: var(--text); text-decoration: none; }
  .shell .topbar .phone-brand span { font-family: var(--sans); font-size: var(--t-15); font-weight: 500; }
  .shell .topbar .topback { display: inline-flex; align-items: center; gap: var(--s1); min-width: 0; min-height: 44px;
    margin-inline-start: calc(var(--s2) * -1); padding-inline-end: var(--s2); color: var(--text); font-size: var(--t-body);
    font-weight: 500; text-decoration: none; }
  /* Back's name is one line, cut with "…" when it is long: the + always stays on the screen. */
  .shell .topbar .topback [data-back-label] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell .topbar .topback svg { flex: 0 0 auto; }
  .shell .topbar .topwho { overflow: hidden; max-width: 40%; color: var(--muted); font-size: var(--t-13); white-space: nowrap;
    text-overflow: ellipsis; }
  .shell .topbar .toptoday { position: relative; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px;
    color: var(--text); }
  .shell .topbar .toptoday .navcount { position: absolute; inset-block-start: var(--s1); inset-inline-end: 0; background: var(--surface);
    color: var(--due); box-shadow: var(--shadow-card); }
  .shell .topbar .topplus { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--action); color: var(--on-brick); }

  .shell .tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-block: var(--s1) calc(var(--s1) + env(safe-area-inset-bottom, 0px)); padding-inline: var(--s1);
    border-top: 1px solid var(--line); background: var(--surface); }
  .shell .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1); min-height: 52px;
    color: var(--muted); font-size: var(--t-12); font-weight: 500; line-height: 1.1; text-align: center; text-decoration: none; }
  .shell .tabbar .ti { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; }
  .shell .tabbar a[aria-current="page"] { color: var(--text); font-weight: 500; }
  .shell .tabbar a[aria-current="page"] .ti { background: var(--raised); }
  .shell .toast { bottom: calc(var(--s8) + var(--s5) + env(safe-area-inset-bottom, 0px)); }
  .shell .actionbar { bottom: calc(var(--s8) + env(safe-area-inset-bottom, 0px)); }

  .shell .pagehead { margin-block-end: var(--s4); }
  .shell .cols, .shell .cols.half, .shell .cols.preview-rail { grid-template-columns: minmax(0, 1fr); }

  /* The pipeline on a phone (docs/GOAL_PIPELINE_TO_LIVE_IN.md, Decided 4). List: All and the stage boxes, then the picked
     one as one list. Board, which it opens on: the stage columns side by side, swiped one at a time. */
  .shell .stagepick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-block-end: var(--s5); }
  .shell .stagebox[data-pick="all"] { grid-column: 1 / -1; min-height: 56px; }
  .shell .board[data-view="list"] { display: block; overflow: visible; padding: 0; }
  .shell .board[data-view="list"] > .stagecol:not(.picked) { display: none; }
  .shell .board[data-view="board"] { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: var(--s3); overflow-x: auto;
    overscroll-behavior-x: contain; scroll-snap-type: x mandatory; margin-inline: calc(var(--s4) * -1); padding-inline: var(--s4);
    scroll-padding-inline: var(--s4); padding-block-end: var(--s2); }
  /* Each column at most a screen tall, scrolling on its own under its pinned name (Decided 4; Codex on #386: a long
     column made the whole page tall). The screen less the top bar, the page's head and the tab bar. */
  .shell .board[data-view="board"] > .stagecol { display: grid; }
  .shell .board[data-view="board"] > .stagecol { scroll-snap-align: start; max-height: calc(100vh - 220px);
    max-height: calc(100dvh - 220px - env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior-y: contain; }
  .shell .board[data-view="board"] > .stagecol > h2 { position: sticky; top: 0; z-index: 1; margin-block-end: 0;
    padding-block: var(--s2); background: var(--ground); }
  .shell .board[data-view="board"] > .alllist { display: none; }
  .shell .page:has(.board[data-view="board"]) .stagepick { display: none; }
  .shell .pagehead .boardview { flex: 0 0 auto; }
  /* The week on a phone (Codex on #387: seven columns cut "10:30 AM"): columns swiped, three to a screen. */
  .shell .calweek { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 2 * var(--s2)) / 3);
    gap: var(--s2); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-block-end: var(--s2); }
  .shell .calweek > .wkcol { scroll-snap-align: start; }
  .shell .stagecol { gap: 0; }
  .shell .stagecol > h2 { margin-block-end: var(--s2); }
  .shell .stagecol > .dealcard { border-radius: 0; border-top-width: 0; }
  .shell .stagecol > .dealcard:first-of-type { border-top-width: 1px; border-start-start-radius: var(--r-card); border-start-end-radius: var(--r-card); }
  .shell .stagecol > .dealcard:last-of-type { border-end-start-radius: var(--r-card); border-end-end-radius: var(--r-card); }
  .shell .stagecol > .small { margin-block-start: var(--s2); }

  /* A bid: five tabs that fit the screen, full width. */
  .shell .tabs { justify-content: space-between; gap: 0; margin-inline: calc(var(--s4) * -1); padding-inline: var(--s2); }
  .shell .tabs a { padding-inline: var(--s1); }
  .shell .bidhead .facts .f-more { display: none; }

  .shell .roomhead { grid-template-columns: minmax(0, 1fr); }
  .shell .lrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .card.details .lrow { grid-template-columns: minmax(0, 1fr); }
  .shell .lrow .withheld { grid-column: 1 / -1; }
  .shell .card.colours .lrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .tiercols { display: none; }
  .shell .tierstrip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
  .shell .previewpane .proposal-doc .hero { grid-template-columns: minmax(0, 1fr); }
  .shell .timeline .ev { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .shell .formgrid { grid-template-columns: minmax(0, 1fr); }

  /* A customer on a phone: one column, in the order Decided 8 and the drawing give: what's due (open tasks), contacts,
     jobs, history, then properties and details. A desk keeps its two columns. */
  .shell .custcols { display: flex; flex-direction: column; align-items: stretch; gap: var(--s4); }
  .shell .custcols > .stack { display: contents; }
  .shell .custpart.c-tasks { order: 1; }
  .shell .custpart.c-contacts { order: 2; }
  .shell .custpart.c-bids { order: 3; }
  .shell .custpart.c-invoices { order: 3; }   /* QuickBooks' invoiced and paid, just after the jobs (same order, later in the page) */
  .shell .custpart.c-history { order: 4; }
  .shell .custpart.c-properties { order: 5; }
  .shell .custpart.c-details { order: 6; }
}

@media print {
  .shell .side, .shell .topbar, .shell .tabbar, .shell .actionbar { display: none; }
}

.shell .materials { display: grid; gap: var(--s4); }
.shell .mtgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s3); }
.shell .materials fieldset { min-width: 0; }
.shell .materials pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.shell .mtsha { overflow-wrap: anywhere; }
.shell .mtlines { list-style: none; padding: 0; }
.shell .mtlines li { padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.shell .materials input[type="file"] { max-width: 100%; min-width: 0; }
.shell .materials select { min-height: 44px; font-family: inherit; font-size: inherit; max-width: 100%; padding: var(--s2);
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-button); }
.shell .materials li > a { display: inline-flex; align-items: center; min-height: 44px; }
/* One customer conversation: the existing Look A frame, with one pane at a time on a phone. */
.shell .conversation-layout {display:grid;gap:var(--s5);min-width:0;align-items:start}
.shell .conversation-layout h1,.shell .conversation-layout h2,.shell .conversation-layout h3 {overflow-wrap:anywhere}
.shell .conversation-inbox,.shell .conversation-thread,.shell .conversation-details {min-width:0}
.shell .conversation-inbox h1 {font-size:var(--t-title);margin-top:0}
.shell .conversation-views {display:flex;flex-wrap:wrap;gap:var(--s1);margin-bottom:var(--s4)}
.shell .conversation-views a {min-height:44px;min-width:44px;padding:var(--s2) var(--s3);font-size:var(--t-13)}
.shell .conversation-views [aria-current=page] {border-bottom:4px solid var(--line-strong)}
.shell .conversation-search,.shell .conversation-assign {display:flex;align-items:end;gap:var(--s2);margin-bottom:var(--s4)}
.shell .conversation-search .field,.shell .conversation-assign .field {flex:1;min-width:0}
.shell .conversation-search button,.shell .conversation-assign button {min-height:44px;flex-shrink:0}
.shell .conversation-items {display:grid;gap:var(--s2);margin-bottom:var(--s4)}
.shell .conversation-item {display:flex;flex-wrap:wrap;gap:var(--s2);border:1px solid var(--line);border-radius:var(--r-button);padding:var(--s4);text-decoration:none;min-height:72px;color:inherit}
.shell .conversation-item b {flex:1;min-width:0;overflow-wrap:anywhere}
.shell .conversation-item[aria-current=page] {border-color:var(--line-strong);background:var(--hover)}
.shell .conversation-item .small {flex-basis:100%}
.shell .conversation-excerpt {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:var(--t-body)}
.shell .conversation-history {display:grid;gap:var(--s4)}
.shell .conversation-message {padding:var(--s4);border:1px solid transparent;box-shadow:var(--shadow-card);border-radius:var(--r-card);background:var(--surface);min-width:0}
.shell .conversation-message.out {border-left:4px solid var(--line-strong)}
.shell .conversation-message.internal {border-style:dashed}
.shell .conversation-message .small {margin-bottom:var(--s3);line-height:1.55}
.shell .conversation-words {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.shell .conversation-composer,.shell .conversation-review,.shell .conversation-internal {padding:var(--s4);border:1px solid var(--line);border-radius:var(--r-card);min-width:0}
.shell .conversation-composer textarea {scroll-margin-bottom:100px}
.shell .conversation-review {background:var(--raised);margin-top:var(--s3)}
.shell .conversation-review h3 {font-size:var(--t-15);line-height:1.4;font-weight:600;margin:0 0 var(--s2)}
.shell .conversation-review .conversation-words {margin:var(--s2) 0}
.shell .conversation-review .notice {margin:var(--s1) 0}
.shell .conversation-review .review-device {border-top:1px solid var(--line);padding-top:var(--s4);margin-top:var(--s1)}
.shell .conversation-review button {width:100%;white-space:normal;min-height:44px}
.shell .conversation-review[data-no-show-draft] > a {display:flex;align-items:center;min-height:44px}
.shell .conversation-contact {border-top:1px solid var(--line);padding-top:var(--s4);overflow-wrap:anywhere}
.shell .conversation-contact p {margin:var(--s2) 0}
.shell .conversation-devices {flex-wrap:wrap}
.shell .conversation-devices a {min-width:44px;min-height:44px}
.shell .conversation-internal summary {min-height:44px;display:flex;align-items:center;cursor:pointer}
.shell .conversation-thread .conversation-detail-link {min-height:44px}
.shell .conversation-list-only {max-width:780px}
@media (min-width:1100px) {
  .shell .conversation-layout.conversation-open {grid-template-columns:minmax(200px,.8fr) minmax(0,1.6fr) minmax(200px,.8fr);gap:var(--s4)}
  .shell .conversation-open .conversation-inbox h1 {font-size:var(--t-count)}
  .shell .conversation-thread .conversation-detail-link {display:none}
  .shell .conversation-details {border-left:1px solid var(--line);padding-left:var(--s4)}
}
@media (max-width:1099px) {
  .shell .conversation-open > .conversation-inbox,.shell .conversation-open > .conversation-details {display:none}
  .shell .conversation-details-only > .conversation-thread {display:none}
  .shell .conversation-details-only > .conversation-details {display:grid}
  .shell .conversation-composer {padding:var(--s4)}
}

/* Daily calls: a bounded queue and focused record, one pane on a phone. */
.shell .call-layout{display:grid;grid-template-columns:minmax(240px,300px) minmax(0,1fr);gap:24px;align-items:start}
.shell .call-list-only{display:block;max-width:920px}
.shell .call-list,.shell .call-card,.shell .call-settings{min-width:0}
.shell .call-card{padding:var(--s4);background:var(--surface);border:1px solid transparent;box-shadow:var(--shadow-card);border-radius:var(--r-card)}
.shell .call-card h1{overflow-wrap:anywhere;margin-bottom:4px;font-size:var(--t-title);line-height:1.25;font-weight:600}
.shell .call-card h2{margin-top:var(--s4);font-size:var(--t-15);line-height:1.4;font-weight:600}
.shell .call-views{display:flex;flex-wrap:wrap;gap:4px;margin:16px 0}
.shell .call-views [aria-current=page]{outline:1px solid currentColor;outline-offset:-1px;background:var(--raised)}
.shell .call-search{display:flex;gap:8px;align-items:end;margin-bottom:16px}
.shell .call-search .field{flex:1;min-width:0}
.shell .call-items{border-top:1px solid var(--line)}
.shell .call-item{display:flex;flex-direction:column;gap:4px;padding:16px 8px;border-bottom:1px solid var(--line);text-decoration:none;color:inherit;overflow-wrap:anywhere}
.shell .call-item[aria-current=page]{border-left:4px solid currentColor}
.shell .call-item:hover{background:var(--hover)}
.shell .call-row-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px}
.shell .call-progress{font-variant-numeric:tabular-nums}
.shell .call-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s2) var(--s4);margin:var(--s4) 0}
.shell .call-facts dt{font-size:var(--t-12);color:var(--muted)}
.shell .call-facts dd{margin:4px 0 0;overflow-wrap:anywhere}
.shell .call-project,.shell .call-number{overflow-wrap:anywhere}
.shell .call-number{font-size:var(--t-count);font-weight:600}
.shell .call-controls{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center;margin:var(--s2) 0 var(--s4)}
.shell .call-controls p{flex-basis:100%;margin:0}
.shell .call-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.shell .call-fields .field{min-width:0}
.shell .call-card input:not([type=checkbox]),.shell .call-card select,.shell .call-card textarea,.shell .call-settings input:not([type=checkbox]){width:100%;max-width:100%;min-width:0;min-height:44px;font-size:var(--t-16);box-sizing:border-box}
.shell .call-card textarea{resize:vertical}
.shell .call-card button,.shell .call-card .btn,.shell .call-list button,.shell .call-list .btn,.shell .call-settings button{min-height:44px;box-sizing:border-box;white-space:normal}
.shell .call-card summary{min-height:44px;cursor:pointer;display:flex;align-items:center;padding:8px 0;box-sizing:border-box}
.shell .call-outcomes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}
.shell .call-outcomes button{overflow-wrap:anywhere}
.shell .call-sheet,.shell .call-plans,.shell .call-management{border-top:1px solid var(--line);padding:8px 0}
.shell .call-management{margin-top:16px}
.shell .call-check{display:flex;align-items:center;gap:8px;min-height:44px}
.shell .call-check input{width:22px;height:22px;flex:none}
.shell .call-management-forms{display:grid;gap:24px}
.shell .call-history{padding-left:24px}
.shell .call-history li{border-bottom:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}
.shell .call-note{white-space:pre-wrap}
.shell .call-settings{max-width:760px}
.shell .call-settings fieldset{min-width:0}
.shell .call-card .notice{overflow-wrap:anywhere}
.shell .call-card [data-call-recovery]{display:block}
.shell .call-card [data-call-recovery] p{margin:var(--s2) 0}
.shell .pipeline-saved{margin-block-end:var(--s4)}
.shell .stale-filter{align-items:flex-end;margin-block-end:var(--s4)}
.shell .stale-filter .field{max-width:100%;min-width:0}
.shell .stale-filter select,.shell .stale-filter button{min-height:44px}
.shell .stale-list{padding:0;margin-block-end:var(--s4)}
.shell .stale-row{display:grid;gap:var(--s3);padding:var(--s4);border-bottom:1px solid var(--line)}
.shell .stale-row:last-child{border-bottom:0}
.shell .stale-row>*{min-width:0;overflow-wrap:anywhere}
.shell .stale-row p{margin:var(--s1) 0}
.shell .stale-row a{min-height:44px;min-width:44px;display:inline-flex;align-items:center;max-width:100%;box-sizing:border-box}
.shell .stale-row .btn{white-space:normal}
.shell .stale-name{font-weight:600}
.shell .stale-row .stale-label{font-family:var(--sans);font-size:var(--t-12);color:var(--muted);margin:0}
.shell .stale-help{margin-block-start:var(--s4)}
.shell .stale-help summary{min-height:44px;cursor:pointer;align-content:center}
@media(min-width:860px){.shell .stale-row{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr) minmax(0,2fr)}}
/* Desktop workflow management shares the office frame and company wording pages. */
.shell .wf-scroll{overflow-x:auto}
.shell .wf-table{width:100%;min-width:64rem;border-collapse:collapse;text-align:left}
.shell .wf-table th,.shell .wf-table td{vertical-align:top;padding:var(--s4);border-bottom:1px solid var(--line)}
.shell .wf-table thead th{font-size:var(--t-12);font-weight:500;color:var(--muted)}
.shell .wf-table tbody th{font-size:var(--t-body);font-weight:600;width:20%}
.shell .wf-table tbody td{font-size:var(--t-13)}
.shell .wf-table tr>:last-child{min-width:12rem;width:12rem}
.shell .wf-table p{margin:var(--s2) 0 0}
.shell .wf-table tbody tr:last-child th,.shell .wf-table tbody tr:last-child td{border-bottom:0}
.shell .wf-detail{display:grid;grid-template-columns:minmax(200px,.7fr) minmax(0,1.3fr);gap:var(--s5);margin-bottom:var(--s5)}
.shell .wf-detail>section{min-width:0;align-self:start}
.shell .wf-detail .chip{justify-self:start;align-self:start}
.shell .wf-rules{margin:0;padding-left:var(--s5)}
.shell .wf-rules li{padding:var(--s3) 0}
.shell .wf-rules h3{font-size:var(--t-body);margin:0 0 var(--s2)}
.shell .wf-rules p{margin:0}
.shell .wf-wording{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s5)}
.shell .wf-wording h4{font-size:var(--t-13);color:var(--muted);margin:0 0 var(--s2)}
.shell .wf-wording pre{font-family:inherit;font-size:var(--t-body);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.shell .wf-control-updated{border-top:1px solid var(--line);padding-top:var(--s2)}
.shell .wf-recent{margin-top:var(--s5)}
.shell .wf-recent ol{margin:0;padding-left:var(--s5)}
.shell .wf-recent li{padding:var(--s3) 0;border-bottom:1px solid var(--line)}
.shell .wf-recent p{margin:var(--s2) 0}
/* The workflows as flows (Adrian, 2026-10-31: "does not look like a high-level workflow"): each a card with its trigger,
   then its steps top to bottom as connected boxes, then what ends it. Read only. */
.shell .wf-flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--s4);
  align-items: start; margin-block-end: var(--s5); }
.shell .wf-flowcard { display: grid; gap: var(--s2); min-width: 0; }
.shell .wf-flow-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.shell .wf-flow-head h2 { margin: 0; font-size: var(--t-15); font-weight: 600; }
.shell .wf-flow-head h2 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.shell .wf-flow-meta { margin: 0; }
.shell .wf-flow { display: grid; justify-items: center; margin: var(--s2) 0 0; padding: 0; list-style: none; }
.shell .wf-flow-step { position: relative; display: grid; gap: calc(var(--s1) / 2); width: 100%; padding: var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-button); background: var(--surface); font-size: var(--t-13);
  overflow-wrap: anywhere; }
.shell .wf-flow-step + .wf-flow-step { margin-block-start: var(--s4); }
.shell .wf-flow-step + .wf-flow-step::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--s4) - 1px);
  height: var(--s4); border-inline-start: 1px solid var(--line); }
.shell .wf-flow-trigger { border-inline-start: 3px solid var(--action); }
.shell .wf-flow-end, .shell .wf-flow-empty { background: var(--raised); color: var(--muted); }
.shell .wf-flow-kind { color: var(--muted); font-size: var(--t-12); font-weight: 500; }
.shell .wf-flow-words { color: inherit; font-weight: 400; }
.shell .wf-flow-trigger .wf-flow-words, .shell .wf-flow-step[data-flow-kind="step"] .wf-flow-words { font-weight: 500; }
.shell .wf-flow-note { color: var(--muted); font-size: var(--t-12); }
.shell .wf-flow-note[data-flow-approved="no"] { color: var(--due); }
.shell .wf-flow-last { margin-block-start: var(--s2); font-size: var(--t-13); }
.shell .wf-flow-last summary { display: flex; align-items: center; min-height: 44px; color: var(--muted); cursor: pointer; }
.shell .wf-flow-last p { margin: var(--s1) 0 0; }

/* The Bids list's kinds, counted, and its stage dropdown (the pipeline picker's own pattern). */
.shell .bidfilters { flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-block-end: var(--s4); }
.shell .bidfilters .seg { margin: 0; }
.shell .bidsource .count { margin-inline-start: var(--s1); font-size: var(--t-12); font-variant-numeric: tabular-nums; opacity: .75; }
.shell .bidrows .bidstate { white-space: normal; }
.shell .bidrows .bidstate .chip { margin-block: calc(var(--s1) / 2); }

/* The customers, calmer: the search on the face, the filters folded until used, one muted line under each name. */
.shell .custsearch { display: grid; gap: var(--s2); margin-block-end: var(--s4); }
.shell .custsearch .searchrow { margin-block-end: 0; }
.shell .custfilters summary { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; color: var(--muted);
  font-size: var(--t-13); font-weight: 500; cursor: pointer; }
.shell .custfilters summary .count { color: var(--action); }
.shell .custfilters .row { flex-wrap: wrap; gap: var(--s3); }
.shell .custrows td.num { color: var(--muted); }

/* More: the company's settings under their own heading. */
.shell h2.section.moresettings { margin-block: var(--s2) calc(-1 * var(--s2)); color: var(--muted); font-size: var(--t-13); font-weight: 500; }
@media(max-width:1080px){.shell .call-layout{grid-template-columns:minmax(200px,240px) minmax(0,1fr);gap:16px}
.shell .call-card{padding:16px}}
@media(max-width:860px){.shell .call-layout{display:block}
.shell .call-layout:has(.call-card)>.call-list{display:none}
.shell .call-card{padding:16px}
.shell .call-facts{gap:var(--s2) var(--s4)}
.shell .call-fields{grid-template-columns:minmax(0,1fr)}
.shell .call-search{flex-wrap:wrap}
.shell .call-search .field{flex-basis:100%}
.shell .call-outcomes{gap:8px}}

/* Desktop booking association review, alongside workflow management. */
.shell .br-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s5); align-items:start; margin-bottom:var(--s5); }
.shell .br-grid > .card { min-width:0; overflow-wrap:anywhere; }
.shell .br-choices { margin:0; padding-left:var(--s5); }
.shell .br-choices li { padding:var(--s2) 0; }
.shell .br-action + .br-action { border-top:1px solid var(--line); padding-top:var(--s4); }
.shell .br-action p { max-width:62ch; }
.shell .notice.br-recorded { display:block; }
.shell .br-recorded p { margin:var(--s2) 0; }
@media (max-width:800px) { .shell .br-grid { grid-template-columns:1fr; } }
.shell .br-table { width:100%; border-collapse:collapse; text-align:left; }
.shell .br-table th, .shell .br-table td { vertical-align:top; padding:var(--s3); border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.shell .br-table thead th { font-size:var(--t-12); font-weight:500; color:var(--muted); }
.shell .br-table tbody tr:last-child td { border-bottom:0; }
@media (max-width:760px) { .shell .br-table td { border-bottom:0; padding:var(--s1) 0; } .shell .br-table td .btn { width:100%; } }

/* Connected desktop workflow map. Lines represent the configured branches. */
.shell .wf-map{margin-bottom:var(--s5)}
.shell .wf-map h2,.shell .wf-map h3{margin:0}
.shell .wf-map-layout{min-width:0}
.shell .wf-inspecting .wf-map-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:var(--s5);align-items:start}
.shell .wf-map-surface{overflow:auto;border:1px solid var(--line);border-radius:var(--r-card);background:var(--ground)}
.shell .wf-map-track{min-width:36rem;padding:var(--s5);display:flex;flex-direction:column;align-items:center}
.shell .wf-map-track:has(.lanes-3){min-width:708px}
.shell .wf-map-track:has(.lanes-4){min-width:944px}
.shell .wf-map-trunk{display:flex;flex-direction:column;align-items:center;width:264px}
.shell .wf-node{width:100%;display:flex;align-items:flex-start;gap:var(--s3);padding:var(--s4);text-align:left;white-space:normal;border:1px solid var(--line-strong);border-radius:var(--r-button);background:var(--surface);color:var(--text);font-family:inherit;line-height:1.35;min-height:100px}
.shell .wf-node:hover{background:var(--surface);border-color:var(--action)}
.shell .wf-node[aria-pressed="true"]{outline:2px solid var(--focus);outline-offset:3px}
.shell .wf-node-icon{display:grid;place-items:center;flex:0 0 32px;height:32px;background:var(--raised);border-radius:var(--r-chip);color:var(--text)}
.shell .wf-node-trigger .wf-node-icon{color:var(--ok);background:var(--ok-soft)}
.shell .wf-node-stop .wf-node-icon{color:var(--bad);background:var(--bad-soft)}
.shell .wf-node-wait .wf-node-icon{color:var(--warn);background:var(--warn-soft)}
.shell .wf-node-copy{min-width:0;display:flex;flex-direction:column;gap:var(--s1);overflow-wrap:anywhere}
.shell .wf-node-kind{font-size:var(--t-12);color:var(--muted);font-weight:500}
.shell .wf-node-copy b{font-size:var(--t-body);font-weight:600}
.shell .wf-node-status{font-size:var(--t-12);color:var(--muted);font-weight:400}
.shell .wf-connector{display:block;width:1px;height:32px;min-height:32px;background:var(--line-strong);position:relative;align-self:center}
.shell .wf-connector:after{content:"";position:absolute;bottom:0;left:-3px;width:7px;height:7px;border-right:1px solid var(--muted);border-bottom:1px solid var(--muted);transform:rotate(45deg)}
.shell .wf-map-lanes{display:flex;align-items:stretch;gap:24px;width:100%}
.shell .wf-map-lanes.lanes-1{width:264px}
.shell .wf-map-lane{position:relative;flex:1 0 204px;display:flex;flex-direction:column;align-items:center;padding:24px 0 0;min-width:0}
.shell .wf-map-lane:before{content:"";position:absolute;left:50%;width:1px;height:24px;background:var(--line-strong)}
.shell .wf-map-lane:before{top:0}
.shell .wf-lane-tail{display:block;flex:1 0 28px;width:1px;background:var(--line-strong)}
.shell .wf-map-lane>h3{position:relative;font-family:inherit;font-size:var(--t-12);font-weight:500;color:var(--muted);padding:var(--s1) var(--s2);margin:0 0 12px;background:var(--ground);border:1px solid var(--line);border-radius:999px;text-align:center;z-index:1}
.shell .wf-map-lanes{position:relative}
.shell .wf-map-lanes:before,.shell .wf-map-lanes:after{content:"";position:absolute;height:1px;left:var(--fork-inset);right:var(--fork-inset);background:var(--line-strong)}
.shell .wf-map-lanes:before{top:0}
.shell .wf-map-lanes:after{bottom:0}
.shell .lanes-1{--fork-inset:50%}.shell .lanes-2{--fork-inset:calc(25% - 6px)}.shell .lanes-3{--fork-inset:calc(16.6667% - 8px)}.shell .lanes-4{--fork-inset:calc(12.5% - 9px)}
.shell .wf-map-lanes:has(.wf-map-lane:nth-child(4)){min-width:888px}
.shell .wf-map-event{display:flex;align-items:center;gap:var(--s5);width:552px;border-top:1px dashed var(--line-strong);margin-top:32px;padding-top:24px}
.shell .wf-event-connector{color:var(--muted)}
.shell .wf-node-details{border-left:3px solid var(--action);padding:var(--s2) var(--s4);background:var(--surface);margin-top:16px;min-width:0}
.shell .wf-inspecting .wf-node-details{position:sticky;top:24px;max-height:calc(100vh - 48px);overflow:auto;margin-top:0;padding-right:4px}
.shell .wf-node-close{display:none}
.shell .wf-inspecting .wf-node-close{display:inline-flex;align-self:start}
.shell .wf-node-details .row{flex-wrap:wrap;gap:12px}
.shell .wf-node-details [data-node-copy]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;max-width:90ch}
.shell .wf-node-details [data-node-heading]{font-size:var(--t-15)}
@media(max-width:900px){.shell .wf-inspecting .wf-map-layout{display:block}.shell .wf-inspecting .wf-node-details{position:static;max-height:none;margin-top:16px}}

/* Connections (docs/GOAL_PIPELINES_AND_CONNECTIONS.md part 1): a grid of tiles; a tile opens steps beside its keys and switch. */
.shell .conngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s3); }
.shell .conntile { display: grid; gap: var(--s2); align-content: start; color: inherit; text-decoration: none; padding: var(--s4); }
.shell .conntile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.shell .conntile-name { font-weight: 600; }
.shell .connchip { justify-self: start; font-size: var(--t-12); font-weight: 600; padding: 0 var(--s2); border-radius: var(--r-chip); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.shell .connchip[data-state="on"] { color: var(--ok); border-color: var(--ok); }
.shell .connchip[data-state="problem"] { color: var(--bad); border-color: var(--bad); }
.shell .connchip[data-state="ready_off"] { color: var(--text); border-color: var(--line-strong); }
.shell .connpanel { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); align-items: start; }
.shell .connsteps { display: grid; gap: var(--s2); padding-left: var(--s5); margin: 0; }
.shell .connkey input[type="password"] { width: 100%; }
.shell [data-copy] { overflow-wrap: anywhere; }
@media (max-width: 760px) { .shell .connpanel { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ Look B, "Warm minimal" (docs/LOOK_B.md, 2026-10-31) */
/* Any select or box a page draws without the .select wrapper or a type still looks like the rest. */
.shell :where(select):not(:where(.proposal-doc *)) { max-width: 100%; min-height: 44px; padding-block: var(--s1); padding-inline: var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-button); background: var(--surface); color: var(--text);
  font-family: var(--sans); font-size: var(--t-input); }

/* The pipeline picker: one labeled dropdown beside the title, like GHL's Opportunities. Open is for a page without
   app.js; with it, picking opens the pipeline and Open steps aside. */
.shell .pagehead.pipehead { align-items: center; justify-content: flex-start; }
.shell .pipepick { display: flex; flex: 0 1 auto; align-items: center; gap: var(--s2); min-width: 0; margin: 0; }
.shell .pipepick .select { flex: 0 1 auto; min-width: 0; }
.shell .pipepick .select select { width: auto; max-width: 100%; }
.shell .pipepick[data-auto] .pipepick-open { display: none; }
/* Another pipeline's stages and cards, in the same parts as the sales board. */
.shell nav.pipe-stage-boxes.row { gap: var(--s2); margin-block: var(--s2) var(--s4); }
.shell nav.pipe-stage-boxes.row .stagebox { flex-direction: row; align-items: center; gap: var(--s2); min-width: 44px; min-height: 44px;
  padding-block: 0; color: var(--muted); }
.shell nav.pipe-stage-boxes.row .stagebox b { font-size: var(--t-13); color: var(--text); }
.shell nav.pipe-stage-boxes.row .stagebox.on { border-color: var(--text); color: var(--text); }
.shell form.row[role="search"]:has(> input[type=search]) { flex-wrap: nowrap; }
.shell form.row[role="search"] > input[type=search] { flex: 1 1 auto; min-width: 0; }
.shell form.row[role="search"] > button { flex: 0 0 auto; white-space: nowrap; }
.shell [data-pipeline-cards] { gap: var(--s2); margin-block: var(--s4); }
.shell [data-pipeline-cards] > .pipe-card { display: grid; gap: var(--s1); padding: var(--s3); border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--shadow-card); }
.shell [data-pipeline-cards] > .pipe-card > label.row { min-height: 44px; }
.shell [data-pipeline-cards] > .pipe-card a { display: inline-flex; align-items: center; min-height: 44px; }
.shell [data-pipeline-cards] > .pipe-card b { font-weight: 500; }
/* Another pipeline's Board (Adrian, 2026-10-31): one Look B column per stage, its own cards white on it, stacked. A desk
   shows every column side by side; a phone swipes from one column to the next. A card's Move menu is the tap way to move. */
.shell .pipehead .kview { margin-inline-start: auto; }
.shell .kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: var(--s2); align-items: start;
  overflow-x: auto; overscroll-behavior-x: contain; padding-block-end: var(--s2); margin-block: var(--s2) var(--s4); }
.shell .kcol { display: grid; align-content: start; gap: var(--s2); min-width: 0; padding: var(--s2); border-radius: var(--r-column);
  background: var(--column); }
.shell .kcol-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s1) 0; }
.shell .kcol-head h2 { margin: 0; font-size: var(--t-13); font-weight: 500; overflow-wrap: anywhere; }
.shell .kcol-head b { color: var(--muted); font-size: var(--t-13); font-weight: 400; font-variant-numeric: tabular-nums; }
.shell .kcol > .kstep { justify-self: start; margin: 0; font-size: var(--t-12); }
.shell .kcards { display: grid; gap: var(--s2); min-height: 48px; align-content: start; }
.shell .kcards > .kempty { margin: 0; padding: var(--s2) var(--s1); }
.shell .kcard { display: grid; gap: var(--s1); min-width: 0; padding: var(--s3); border: 1px solid transparent; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--shadow-card); }
.shell .kcard .kcard-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 500;
  overflow-wrap: anywhere; }
.shell .kcard > .small { overflow-wrap: anywhere; }
.shell .kcard[draggable="true"] { cursor: grab; }
.shell .kcard.dragging { opacity: .5; }
.shell .kcol.drop-over { outline: 2px dashed var(--focus); outline-offset: -2px; }
.shell .kmores { flex-wrap: wrap; gap: var(--s2); }
.shell .kmore { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-13); }
.shell .kmove > summary.small { min-height: 44px; }
.shell .kmove-list { display: grid; gap: var(--s1); }
.shell .kmove-list > p { margin: 0; }
.shell .kmove-list > button { justify-content: flex-start; width: 100%; text-align: start; }
.shell [data-pipeline-cards] > .pipe-card > .kmove { justify-self: start; }
.shell [data-kanban-status]:empty { display: none; }
/* The short confirm before a card enters a stage with a step on: over the board when the script runs, its own page when not. */
.shell .kconfirm { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: var(--s4); background: var(--scrim); }
.shell .kconfirm[hidden] { display: none; }
.shell .kconfirm-box { width: 100%; max-width: 28rem; padding: var(--s5); border-radius: var(--r-card); background: var(--surface);
  box-shadow: var(--shadow-card); }
.shell .kconfirm-box h2 { margin: 0; font-size: var(--t-15); font-weight: 600; }
.shell .kconfirm-box p { margin: 0; }
.shell .kconfirm-box .row, .shell .kconfirm-page .row { flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 860px) {
  .shell .pipehead .kview { margin-inline-start: 0; }
  .shell .kanban { grid-auto-columns: 86%; scroll-snap-type: x mandatory; }
  .shell .kcol { scroll-snap-align: start; }
}

/* The desk with a mouse: compact controls, 34px and 8px corners, at 14px. A phone or a touch screen never gets these: its
   taps stay 44px (tests/test_look_b.py holds both). */
@media (min-width: 861px) and (pointer: fine) {
  .shell button, .shell .btn, .shell .seg .segbtn, .shell select:not(.proposal-doc *),
  .shell input:not([type=checkbox]):not([type=radio]):not([type=file]):not(.proposal-doc *) { min-height: var(--control); }
  .shell button, .shell .btn { padding-block: 0; padding-inline: var(--s3); }
  .shell input:not([type=checkbox]):not([type=radio]):not([type=file]):not(.proposal-doc *), .shell select:not(.proposal-doc *) {
    padding-block: var(--s1); }
  .shell .seg .segbtn { padding-inline: var(--s3); }
  .shell input[type=file]::file-selector-button { min-height: var(--control); padding-inline: var(--s3); }
  .shell .side-in { padding-block: var(--s4); padding-inline: var(--s3); }
  .shell .side nav a { min-height: var(--control); padding-inline: var(--s3); }
  .shell .side .navgroup { gap: 0; }
  .shell details > summary, .shell .check:not(.proposal-doc *), .shell .choices label, .shell .page > .backlink,
  .shell .tabs a, .shell ul.opens > li, .shell ul.opens > li > a, .shell table.rows td.strong a, .shell .taplink { min-height: var(--control); }
  .shell nav.pipe-stage-boxes.row .stagebox, .shell [data-pipeline-cards] > .pipe-card > label.row,
  .shell [data-pipeline-cards] > .pipe-card a { min-height: var(--control); }
  .shell .kcard .kcard-link, .shell .kmore, .shell .kmove > summary.small { min-height: var(--control); }
}

/* Approved sold-on-job card. Office tokens only; native details retain full scope. */
.shell .sold-proposal{margin-top:var(--s4)}
.shell .sold-proposal h2{margin:0;font-size:var(--t-15);font-weight:600}
.shell .sold-proposal header p{margin:var(--s2) 0 0}
.shell .sold-document{border-bottom:1px solid var(--line)}
.shell .sold-document summary{display:flex;gap:12px;justify-content:space-between;min-height:44px;padding:var(--s3) 0;cursor:pointer}
.shell .sold-document summary>span{min-width:0}
.shell .sold-name{font-weight:500;overflow-wrap:anywhere}
.shell .sold-meta{display:block;margin-top:4px}
.shell .sold-number{margin-left:auto;text-align:right;overflow-wrap:anywhere;max-width:52%}
.shell .sold-lines{padding:0 0 8px 12px}
.shell .sold-lines p{margin:var(--s2) 0}
.shell .sold-words{white-space:pre-wrap}
.shell [data-sold-retry][hidden]{display:none}
.shell .sold-total{font-weight:600;font-size:var(--t-15);overflow-wrap:anywhere}
.shell .sold-proposal p{overflow-wrap:anywhere}
.shell .sold-proposal button{max-width:100%;white-space:normal;text-align:left}
