/* 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-15); 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: the destinations scroll, the account block stays on screen. */
.shell .side { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column;
  gap: var(--s5); padding-block: var(--s5); padding-inline: var(--s4); overflow: hidden; background: var(--side-ground);
  color: var(--side-text); }
.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(--serif); font-size: var(--t-17); font-weight: 500; letter-spacing: -.01em; }
.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-15); font-weight: 500; text-decoration: none; }
.shell .side nav a:hover { background: var(--side-hover); }
.shell .side nav a[aria-current="page"] { background: var(--cream); color: var(--ink); font-weight: 700; }
.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-15); 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(--cream); color: var(--ink); }
.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-15); font-weight: 600; 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-15); }

/* ------------------------------------------------------------------ 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; }
.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(--label); font-size: var(--t-title); font-weight: 700; line-height: 1;
  letter-spacing: .005em; }
.shell .pagehead .sub { margin-block-start: var(--s2); color: var(--muted); font-size: var(--t-15); 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-17); font-weight: 700; }
.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-15); font-weight: 700; }

/* ------------------------------------------------------------------ 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-strong); border-radius: var(--r-button);
  background: var(--surface); color: var(--text); font-family: var(--sans); font-size: var(--t-15); font-weight: 600;
  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[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-strong); border-radius: var(--r-button); background: var(--surface); color: var(--text);
  font-family: var(--sans); font-size: var(--t-16); }
.shell textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
.shell textarea[readonly] { background: var(--ground); font-size: var(--t-15); resize: none; }
.shell input[type=file] { width: 100%; max-width: 100%; min-height: 44px; font-family: var(--sans); font-size: var(--t-15); }
.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-15); font-weight: 600; 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: 600; }
.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-15); font-weight: 500;
  cursor: pointer; }
.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-15);
  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-strong);
  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-15); font-weight: 600; text-decoration: none; }
.shell .seg .segbtn + .segbtn { border-inline-start: 1px solid var(--line-strong); }
.shell .seg .segbtn[aria-pressed="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-15);
  font-weight: 600; 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 var(--line); border-radius: var(--r-card); background: var(--surface); }
.shell .card > h2, .shell .card > h3 { margin-block: 0 var(--s3); font-size: var(--t-17); font-weight: 700; }
.shell .card > .row > h2 { margin: 0; font-size: var(--t-17); font-weight: 700; }
.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-16); font-weight: 600; 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-15); }
/* 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: 600; }

.shell .tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.shell table.rows { width: 100%; border-collapse: collapse; font-size: var(--t-15); }
.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: 600; 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: 600; }
.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: 600;
  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-15); }
.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-15); 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-15); }
.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: 600; }
.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-17); font-weight: 700; }
.shell .duestrip > h2 .count { color: var(--muted); font-size: var(--t-13); font-weight: 500; }
.shell .duestrip .list { overflow: hidden; border: 1px solid var(--line); 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; }
/* 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(--label); font-size: var(--t-count); font-weight: 700; line-height: 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-17); font-weight: 700; }
.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-15); font-weight: 600; 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-15); 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-17); 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: 600; }
.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 var(--line); 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; }
.shell .apptchip b { overflow: hidden; font-size: var(--t-13); text-overflow: ellipsis; white-space: nowrap; }
.shell .apptchip .small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.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: 600; 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: 700; 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: 700; }
.shell .callist .meta { color: var(--muted); font-size: var(--t-13); }
.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 var(--line);
  border-radius: var(--r-card); background: var(--surface); }
.shell .dealcard > .row.between b { font-size: var(--t-16); font-weight: 600; 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-15);
  line-height: 1.35; }
.shell .dealcard > .row { gap: var(--s1) var(--s2); }
.shell .dealcard .dealprice { font-size: var(--t-15); 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-15); }
.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-15); 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: 700; }
.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-15); }
.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-17); font-weight: 700; 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-15); }
.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 var(--line); 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; }

/* 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-17); font-weight: 700; }
.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: 700; }
.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-15); line-height: 1.45;
  overflow-wrap: anywhere; }
.shell .wtpage .actionbar { align-items: center; }

/* ------------------------------------------------------------------ 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-17); font-weight: 700; }
.shell .tiercol .price { font-size: var(--t-count); font-weight: 700; 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 var(--line); 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-17); font-weight: 700; font-variant-numeric: tabular-nums; }
.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; }
.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(--label); font-size: var(--t-title); font-weight: 700; line-height: 1; letter-spacing: .005em; }
.shell .custhead .where { color: var(--muted); font-size: var(--t-15); }
.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 var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--text); font-size: var(--t-12);
  font-weight: 600; 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-17); font-weight: 700; }
.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-16); font-weight: 600; }
.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 var(--line); 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-16); font-weight: 600; 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(--s7) var(--s8); }
  .shell .pagehead { margin-block-end: var(--s6); }
  .shell .tabs a { padding-inline: var(--s4); }
  .shell .card { padding: var(--s5); }
  .shell .phone-only { display: none; }
  .shell .board > .alllist { display: none; }
}
@media (min-width: 861px) and (max-height: 940px) {
  .shell .side { 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(--serif); font-size: var(--t-17); font-weight: 500; letter-spacing: -.01em; }
  .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-15);
    font-weight: 600; 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 .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: 700; }
  .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-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; }
}
