/* The customer's order pages. Everything on them is a component from ativv-ui, so what is left
   here is only what is these pages' own: their column, the list's rows, the grid of tiles beside
   the one well, the toggles under it and the tray's drop. Every rule is under `.customer-orders`, the wrapper both pages
   render, so nothing here can reach a shell or the component set (docs/frontend/frontend-conventions.md,
   "Crates, compile times and size"). No color, size or radius: tokens only. */

/* The list's own measure, centred in the frame: on a phone the frame is this wide and the margins
   do nothing; on a laptop the frame is wider (frame-adapt.css) and a list of sentences does not
   want the window's width, so it sits in the middle of the shell rather than against its left
   edge. */
.customer-orders {
  max-width: 48rem;
  margin-inline: auto;
}

/* One order takes the room the frame gives it: the grid and the well side by side need more than
   the list's measure, and the frame stops growing at a measure the sentences still read at
   (frame-adapt.css).

   **And it takes the shell's height, not only its width** (Reed, 8 Oct 2026, after the viewer first
   drew: "so much extra space; the viewer should at least stretch to the top ... it is the main
   point and you can only get it as big as that little viewport"). The page is a column that fills
   the shell, the work — the letter grid and the well — takes every row left over, and the well's
   paper takes the height of that row, so the garment is as large as the window allows. The same
   two rules HQ's order page needs for its tray, and for the same reason: `.page` is a block whose
   height is the shell's, so a percentage against it resolves to nothing and the only way to fill it
   is for the page itself to be a column (hq-orders.css says it at length). */
.page:has(> .customer-order) {
  display: flex;
  flex-direction: column;
}

.customer-order {
  max-width: none;
  display: flex;
  flex-direction: column;
  flex: 1;
  /* The list's centring margins, undone. `.customer-orders` is `margin-inline: auto`, and an auto
     margin on a flex item's cross axis wins over the stretch it would otherwise get, so with the
     page a column this section was drawn at its content's width and centred in the shell rather
     than filling it. */
  align-self: stretch;
  margin-inline: 0;
}

.customer-orders .back {
  margin: 0 0 var(--space-3);
}

/* ---- the list: "your orders" ------------------------------------------ */

.customer-orders .orders-title {
  margin: 0;
  font-size: var(--text-display-4);
  font-weight: var(--weight-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

/* Sheet 1k: rows under an ink rule, a hairline between them. Each row is the order's name at the
   interface's strong weight with whose it is at its right in the mono face, then its standing as a
   pill, then the order's line, quiet. */
.customer-orders .order-rows {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  border-top: var(--rule-strong) solid var(--color-ink);
}

.customer-orders .order-row-link {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: var(--hairline) solid var(--color-line);
  color: inherit;
  text-decoration: none;
}

.customer-orders .order-row-link:hover .order-row-name {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.customer-orders .order-row-link:focus-visible {
  outline: var(--focus-width) solid var(--color-accent);
  outline-offset: var(--focus-offset);
}

.customer-orders .order-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.customer-orders .order-row-name {
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-lead);
}

.customer-orders .order-row-whose {
  flex: none;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-meta);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

/* The customer's stage words are lower case, as the ladder writes them; the pill leads with one. */
.customer-orders .order-row-stage {
  display: inline-block;
}

.customer-orders .order-row-stage::first-letter {
  text-transform: uppercase;
}

.customer-orders .order-row-headline {
  color: var(--color-meta);
  font-size: var(--text-label);
  text-wrap: pretty;
}

/* ---- one order: the top ------------------------------------------------ */

.customer-orders .back {
  margin: 0;
  font-size: var(--text-quiet);
}

.customer-orders .back a {
  color: var(--color-muted);
  text-decoration: none;
}

.customer-orders .back a:hover {
  color: var(--color-ink);
}

/* **The way back and Messages on one line** (docs/decisions.md, 12 Oct 2026, "Where an order
   stands, built", (11); the canvas's customer top): the way back at the left, the button at the right. */
.customer-orders .order-back-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  /* **The whole width of the page, at every width** (Reed, 13 Oct 2026, on the preview: at desktop
     width the button sat mid-page above the picture). It is a paragraph, and base.css gives every
     paragraph the text measure, so the line stopped at about 590 px and its right end was the middle
     of a wide page; the button belongs at the page's right edge. */
  max-width: none;
}

/* The order's name, as the title: a phone's page title, display-4 at 600 (the brand book; the
   15 Oct artboards and the 7 Oct design pass draw it so). Under it the organization and need-by in
   mono before Confirm, the order's chips after it (`order::Marks`). */
.customer-orders .order-title {
  margin: var(--space-2) 0 0;
  font-size: var(--text-display-4);
  font-weight: var(--weight-display);
  line-height: var(--leading-order-title);
  letter-spacing: var(--tracking-display);
  text-wrap: pretty;
}

.customer-orders .order-marks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}

.customer-orders .order-need-by {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ---- your move, and ours ------------------------------------------------ */

.customer-orders .order-moves {
  margin-top: var(--space-5);
}

.customer-orders .order-moves-head {
  margin: 0;
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-strong);
}

.customer-orders .order-move {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: var(--hairline) solid var(--color-line);
}

.customer-orders .order-move-detail {
  color: var(--color-muted);
  font-size: var(--text-quiet);
}

.customer-orders .order-move-go {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: var(--hairline) solid var(--color-ink);
  background: var(--color-shell);
  color: var(--color-ink);
  font: inherit;
  font-weight: var(--weight-strong);
  cursor: pointer;
}

/* ---- the cards -------------------------------------------------------- */

/* **One card per thing offered** (the 15 Oct handoff's *Customer, the pack* and *Customer, the
   kit*): sections by proof under a mono heading, "Proof 2 · 14 Oct", how many things at its right;
   the cards themselves are `ativv_ui::OfferCard`'s. */
.customer-orders .order-offered {
  margin-top: var(--space-5);
}

.customer-orders .order-cards {
  margin-top: var(--space-5);
}

.customer-orders .order-cards-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}

.customer-orders .order-cards-heading {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.customer-orders .order-cards-count {
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

/* *Below ↓* on a move: quiet mono, it scrolls to the card. */
.customer-orders .order-move-below {
  min-height: 44px;
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  color: var(--color-meta);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
}

/* *Change*, *Close*, *Keep it as it was*: an underlined word, a thumb's height. */
.customer-orders .offer-change {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-quiet);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  justify-self: start;
}

/* The well open in a card: the customer's, registration marks and no rim, the picture a fixed
   height so the card's ask stays on a phone's screen. `GarmentView` draws itself 4:3 wherever a
   page gives it the width, which is what HQ's cards want; here the box sets the height and the
   component fills the paper instead. */
.customer-orders .offer-well .well {
  margin: 0;
}

.customer-orders .offer-well .well-paper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--customer-well-height);
  padding: var(--space-2);
}

.customer-orders .offer-well .garment-view {
  height: 100%;
  aspect-ratio: auto;
}

.customer-orders .offer-well {
  --customer-well-height: 320px;
}

/* **Taller where there is room** (the staging look of 18 Oct, (1)): from a tablet's width the
   well grows with the window, between the phone's 320 px and 600, so on a laptop the garment is
   drawn large beside the card's words and ask. */
@container offers (min-width: 40rem) {
  .customer-orders .offer-well {
    --customer-well-height: clamp(320px, 55vh, 600px);
  }
}

/* **The well's line** (the staging look of 18 Oct, (2)): the name, the version apart in mono as a
   quiet link (an address to share or come back to, not a control, so not underlined like *Close*),
   and *Close* at the right. Round C's rename of the old `.well-line` rule had left it with no
   `display: flex`, so the three ran together as "Shirtv1Close". */
.customer-orders .offer-well .well-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin: var(--space-2) 0 0;
  font-size: var(--text-quiet);
}

.customer-orders .offer-well .well-name {
  font-weight: var(--weight-medium);
}

.customer-orders .offer-well .well-version {
  color: var(--color-meta);
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  letter-spacing: var(--tracking-label);
  text-decoration: none;
}

.customer-orders .offer-well .well-version:hover {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.customer-orders .offer-well .well-close {
  margin-left: auto;
}

/* **What a yes asks for, in its own panel** (the artboard *Customer, the kit*'s `.next`): a quiet
   panel under the ask, so the fields read as the yes's and not the card's. */
.customer-orders .offer-next {
  padding: var(--space-3);
  border: var(--hairline) solid var(--color-line);
  background: var(--color-line-panel-quiet);
}

/* The run's sizes in one row: it scrolls inside the card rather than wrapping "All" onto a line of
   its own, and "All" stays at the row's right end while the sizes scroll under it (the backlog's
   "the size row hides ALL off the card's edge at 390"). */
.customer-orders .offer-counts-row {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.customer-orders .offer-counts-row .offer-count-total {
  position: sticky;
  right: 0;
  border-left: var(--hairline) solid var(--color-ink);
}

.customer-orders .offer-counts-row .offer-count {
  flex: none;
}

/* **ALL stays in sight** at the row's right edge while the sizes scroll under it (the polish
   round's verification, 17 Oct 2026: at 390 it sat past the card's edge, reached only by a sideways
   scroll the row did not show). Its lattice ground is opaque, so the sizes pass behind it. */
.customer-orders .offer-counts-row .offer-count-total {
  position: sticky;
  right: 0;
  border-left: var(--hairline) solid var(--color-field-line);
}

/* A side-by-side card's counts: each letter's label beside its box, inline, no grid round them. */
.customer-orders .offer-counts-beside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.customer-orders .offer-count-beside {
  flex-direction: row;
  gap: var(--space-2);
  min-width: 0;
  padding: 0;
  border-left: 0;
}

/* The answer that stands on an open card, quiet, its words under it. */
.customer-orders .offer-answered {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

.customer-orders .offer-answered-note {
  color: var(--color-ink);
  text-wrap: pretty;
}

/* ---- So far ----------------------------------------------------------- */

.customer-orders .order-so-far {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: var(--hairline) solid var(--color-ink);
}

.customer-orders .order-so-far-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}

.customer-orders .order-so-far-head {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.customer-orders .order-so-far-sum {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: var(--weight-strong);
}

.customer-orders .order-so-far-words {
  margin: var(--space-1) 0 0;
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

/* ---- the ask: Yes · No · Comment -------------------------------------- */

/* **One ask** (docs/decisions.md, 15 Oct 2026, "The order as a tree…", (4) and (18)): Yes and No of
   equal weight, because the entry that asked for them asked for answers of equal weight, and Comment
   a quieter word beside them. They stage; nothing here commits. */
.customer-orders .answering {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
}

.customer-orders .answer {
  flex: 1 1 0;
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border: var(--hairline) solid var(--color-ink);
  border-radius: var(--radius-button);
  background: var(--color-shell);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-control);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

/* The hover is the secondary button's (button.css) and not the paper token: paper is the shell's
   white from 8 Oct 2026, so a paper-coloured hover on a white shell is no hover at all. */
.customer-orders .answer:hover:not([disabled]) {
  background: color-mix(in oklab, var(--color-ink) 6%, transparent);
}

.customer-orders .answer:focus-visible {
  outline: var(--focus-width) solid var(--color-accent);
  outline-offset: var(--focus-offset);
}

.customer-orders .answer[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* **Four looks** (docs/decisions.md, 10 Oct 2026, "The conversation, second pass", (4)). Sent is
   the answer that stands, filled; staged is lighter and dashed, as HQ draws what is pending; about
   to clear is sent and staged to be taken back (or replaced), filled but faded and struck through,
   until Send records it; none is the plain outline above. */
.customer-orders .answer-sent {
  background: var(--color-ink);
  color: var(--color-shell);
}

.customer-orders .answer-sent:hover:not([disabled]) {
  background: var(--color-accent-hover);
}

/* **Staged is unfinished** (docs/decisions.md, "The customer's page tells the truth…", (5)): hollow
   and dashed, its "will send" in words beside its name, never filled or ticked until Send. */
.customer-orders .answer-staged {
  border-style: dashed;
  border-width: var(--rule-strong);
  background: var(--color-shell);
}

.customer-orders .answer-staged {
  white-space: nowrap;
}

.customer-orders .answer-will {
  color: var(--color-muted);
  font-size: var(--text-quiet);
  font-weight: var(--weight-regular);
}

.customer-orders .answer-clearing {
  border-style: dashed;
  background: color-mix(in oklab, var(--color-ink) 22%, var(--color-shell));
  color: var(--color-ink);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.customer-orders .answer-comment {
  min-height: var(--control-height);
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  color: var(--color-meta);
  font: inherit;
  font-size: var(--text-quiet);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.customer-orders .answer-comment-on {
  color: var(--color-ink);
  font-weight: var(--weight-strong);
}

/* ---- the tray: what is staged, and the one × per chip ------------------ */

/* **The tray is the frame's foot** (docs/decisions.md, 14 Oct 2026, "The browser crates", (10)), as
   HQ's is: the page puts it in the frame's tray (`FrameTray`), on the ground under the shell, which
   ends above it in its rounded corners and scrolls inside itself, so nothing runs under the tray
   and it never moves (base.css, "The frame"). Until then it was sticky at the foot of the page,
   inside the shell, with the record scrolling under it. Its wrapper carries this page's class for
   the rules below, and none of the list's measure: the tray runs the frame's width. */
.customer-orders.customer-tray {
  max-width: none;
  margin: 0;
}

/* The tray is the ground at the foot of the page (tray-bar.css); what is this page's is the × that
   takes one chip back, which rides inside the chip's own words. */
.customer-orders .tray-drop {
  margin-left: var(--space-2);
  padding: 0 var(--space-1);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.customer-orders .tray-drop:hover {
  opacity: 1;
}

.customer-orders .tray-drop:focus-visible {
  outline: var(--focus-width) solid currentColor;
  outline-offset: var(--focus-offset);
}

/* ---- also settled: one quiet line, and its days behind "show" ---------- */

.customer-orders .order-settled {
  margin: var(--space-5) 0 0;
  color: var(--color-muted);
  font-size: var(--text-quiet);
  line-height: var(--leading-body);
}

.customer-orders .order-settled > summary {
  list-style: none;
  cursor: pointer;
}

.customer-orders .order-settled > summary::-webkit-details-marker {
  display: none;
}

.customer-orders .order-settled-show,
.customer-orders .order-settled-hide {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.customer-orders .order-settled-hide,
.customer-orders .order-settled[open] .order-settled-show {
  display: none;
}

.customer-orders .order-settled[open] .order-settled-hide {
  display: inline;
}

.customer-orders .order-settled-days {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
}

.customer-orders .order-settled-days > li {
  display: grid;
  grid-template-columns: var(--thread-date-column) minmax(0, 1fr);
  gap: var(--space-3);
}

.customer-orders .order-settled-day {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  line-height: var(--leading-body);
}

/* **Under the quantities, each item's pieces and sizes** (docs/decisions.md, 13 Oct 2026, "D3…",
   (8)): the second column of the quantities' row, one item a line. */
.customer-orders .order-settled-counts {
  grid-column: 2;
  list-style: none;
  margin: 0;
  padding: 0;
}

.customer-orders .order-settled-sizes {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
}

/* **Under the quote, its total before tax and what it covers** (docs/decisions.md, 13 Oct 2026, "D3…",
   (10)): the second column of the quote's row, as the counts sit under the quantities. */
.customer-orders .order-settled-quote {
  grid-column: 2;
  margin: 0;
}

.customer-orders .order-settled-quote b {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
}

/* ---- write to the house: one bordered box at the foot ------------------ */

/* Since 10 Oct 2026 the box is Messages' own, at its foot (below). */
.customer-orders .write-to {
  padding-top: var(--space-3);
  border-top: var(--rule-strong) solid var(--color-ink);
}

/* The box is the page's: the editor inside it gives up its own frame, so the box, the editor's
   toolbar and send read as one thing. */
.customer-orders .write-to-box {
  display: flex;
  flex-direction: column;
  border: var(--hairline) solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.customer-orders .write-to-box:focus-within {
  border-color: var(--color-ink);
}

.customer-orders .write-to .comment-editor {
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

/* Inside the box the editor's own frame and focus ring give way to the box's; its colours are the
   tokens' already (comment-editor.css). */
.customer-orders .write-to .comment-editor wordgard-editor {
  border: 0;
  outline: none;
}

.customer-orders .write-to .comment-editor wg-content {
  min-height: var(--space-14);
}

/* The invitation, in the empty editor's one paragraph: an empty paragraph, or one holding only
   the break an editor keeps in an empty line. */
.customer-orders .write-to wg-content > p:only-child:is(:empty, :has(> br:only-child))::before {
  content: var(--write-to-placeholder);
  float: left;
  height: 0;
  color: var(--color-muted);
  pointer-events: none;
}

.customer-orders .write-to-box > .button {
  align-self: flex-end;
  margin: 0 var(--space-3) var(--space-3);
}

.customer-orders .write-to .refusal {
  margin-top: var(--space-2);
}

.customer-orders .subscribing {
  margin: var(--space-3) 0 0;
}

/* ---- what's happened ----------------------------------------------------- */

/* **Folded, and the last thing on the page**, under the tray (Reed, 8 Oct 2026). Its summary is one
   line: the label, and how many there are. Closed it is a foot to the page; open it runs on under
   the tray, which stays where it is. */
.customer-orders .order-thread {
  margin-top: var(--space-6);
}

.customer-orders .order-thread > summary::-webkit-details-marker {
  display: none;
}

/* Under an ink rule, as the snapshot sets a section: the mono label, and which way it reads. */
.customer-orders .order-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-top: var(--space-3);
  border-top: var(--rule-strong) solid var(--color-ink);
  list-style: none;
  cursor: pointer;
}

.customer-orders .order-thread-heading {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-chip);
  line-height: var(--leading-section);
  text-transform: uppercase;
}

.customer-orders .order-thread-order {
  color: var(--color-muted);
  font-size: var(--text-meta);
}

/* ---- Messages: the conversation, slid in ---------------------------------- */

/* **A slide-in at every width** (docs/decisions.md, 10 Oct 2026, "The conversation on both order
   pages", (3)). The page and Messages share a row: on a phone Messages covers the page, over
   everything but the shell's top line; on a wide screen it is docked beside the well, which
   narrows while it is open, so the picture stays in view and can still be turned and answered. */
.customer-orders .order-body {
  display: flex;
  flex: 1;
  gap: var(--space-6);
  min-height: 0;
}

.customer-orders .order-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.customer-orders .messages {
  display: none;
}

.customer-orders .messages-open {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  background: var(--color-shell);
}

/* **Beside the page, where there is room for both** ("The conversation, second pass", (1)): from
   the width the main column has its widest measure and the chat its own beside it
   (`messages::BESIDE`, the same query), the frame grows by the chat's width and the gap, so the
   main column keeps its measure and moves over and nothing narrows; the chat is a sticky column in
   the room the page's sides had. Below it, it covers the page, as on a phone, and is modal. */
@media (min-width: 98rem) {
  .frame-adapt:has(.customer-orders .messages-open) {
    max-width: calc(
      var(--measure-adapt) + var(--messages-width-beside) + var(--space-6) + 2 * var(--shell-inset)
    );
  }

  .customer-orders .messages-open {
    position: sticky;
    top: var(--space-2);
    z-index: auto;
    flex: none;
    width: var(--messages-width-beside);
    height: calc(100dvh - var(--customer-work-above));
    min-height: 26rem;
    padding: 0 0 0 var(--space-5);
    border-left: var(--hairline) solid var(--color-line);
    background: transparent;
  }
}

.frame-adapt {
  --messages-width-beside: 22rem;
}

.customer-orders .messages {
  --messages-width: 22rem;
  --customer-work-above: 7.5rem;
  --customer-tray-band: 4.75rem;
}

.customer-orders .messages-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--rule-strong) solid var(--color-ink);
}

.customer-orders .messages-title {
  margin: 0;
  font-size: var(--text-display-3);
}

.customer-orders .messages-close {
  border: 0;
  background: none;
  color: var(--color-muted);
  font: inherit;
  font-size: var(--text-control-small);
  cursor: pointer;
}

.customer-orders .messages-close:hover {
  color: var(--color-ink);
}

/* The lines scroll; the box stays at the foot. **A column turned upside down**, the one child at the
   end, so the browser keeps the scroll at the newest line as the box's editor loads under it and a
   picture arrives above it: a chat's own anchoring, with nothing measured in script. */
.customer-orders .messages-body {
  display: flex;
  flex-direction: column-reverse;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-4) 0;
}

.customer-orders .messages-box {
  flex: none;
}

.customer-orders .messages-says {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font-size: var(--text-label);
}

/* **The Messages button**, on the title's line: outlined, a chat icon, and a dot while something of
   ours is new to this customer; never the pill's style. */
.customer-orders .order-messages-open {
  flex: none;
  margin-top: var(--space-1);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: var(--hairline) solid var(--color-ink);
  border-radius: var(--radius-button);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-control-small);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

/* Open, it stays outlined, never filled as the pill is: a heavier rule says it is pressed. */
.customer-orders .order-messages-open[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1px var(--color-ink);
}

.customer-orders .order-messages-icon {
  width: 1.1em;
  height: 1.1em;
}

.customer-orders .order-messages-dot {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: currentColor;
}

/* ---- the chips above Messages' box, and the tray's way to it --------------- */

/* **What goes with the message** ("The conversation, second pass", (2) and (3)): the answers staged,
   dashed as staged things are, and the options the message is about, outlined; each with its ×. */
.customer-orders .messages-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}

.customer-orders .messages-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-1) 0 var(--space-2);
  border: var(--hairline) solid var(--color-ink);
  border-radius: var(--radius-chip);
  font-size: var(--text-label);
}

.customer-orders .messages-chip-answer {
  border-style: dashed;
  background: color-mix(in oklab, var(--color-ink) 8%, var(--color-shell));
}

.customer-orders .messages-chip button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0 var(--space-1);
}

.customer-orders .tray-write {
  margin-left: var(--space-2);
  padding: 0 var(--space-1);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.customer-orders .messages-chip-file img {
  height: 1.5rem;
  width: auto;
}

/* ---- the roster's door ------------------------------------------------- */

/* **The roster's door** (src/roster.rs; no artboard of its own): a sheet over the page, a section
   per thing they said yes to, a row per person — on a phone a one-column form, on a wide screen a
   compact table (below). */
.roster-door-words,
.roster-door-others,
.roster-door-closed {
  margin: 0 0 var(--space-3);
  color: var(--color-meta);
  font-size: var(--text-quiet);
  text-wrap: pretty;
}

.roster-door-section {
  margin-top: var(--space-4);
}

.roster-door-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-ink);
}

.roster-door-head h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}

.roster-door-so-far {
  color: var(--color-meta);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
}

/* **A row: how many on the left, standing for everything it says, its fields, its ×** (choices 3d;
   Reed, 3 Nov 2026; the handoff's 6c and 6e): on a phone the fields on two lines, names and numbers
   over the size and each choice's cell; on a computer one line, the labels once over the first
   row as its column heads. */
.roster-door-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: var(--hairline) solid var(--color-line);
}

.roster-door-row > .roster-door-counted-name {
  grid-column: 1 / -1;
}

.roster-door-counted {
  background: var(--color-paper-lattice);
  padding-inline: var(--space-2);
}

.roster-door-counted-name {
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

.roster-door-fields {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.roster-door-line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2);
  min-width: 0;
}

.roster-door-line:empty {
  display: none;
}

.roster-door-line > .roster-door-field {
  flex: 1 1 var(--grid-size-column);
  min-width: 0;
}

.roster-door-line > .roster-door-cell {
  flex: 0 1 auto;
}

/* *How many*, wide enough to click (polish item 15): its box never narrower than two digits and a
   thumb, the × before it as the frames draw it. */
.roster-door-many {
  grid-template-columns: auto auto;
  align-self: start;
}

.roster-door-row .roster-door-many > input {
  min-width: var(--grid-box-least);
  width: var(--offer-count-width);
}

.roster-door-times {
  color: var(--color-meta);
  font-family: var(--font-mono);
}

/* **One control height** (the polish round's area 6; the crawl's S7): every box in a row, text,
   count and size, at the compact control's 30 px, as `Select`'s compact form already is. */
.roster-door-field {
  display: grid;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  font-size: var(--text-quiet);
  color: var(--color-meta);
}

.roster-door-field input {
  box-sizing: border-box;
  width: 100%;
  height: var(--control-height-compact);
  border: var(--hairline) solid var(--color-field-line);
  border-radius: var(--radius);
  background: var(--color-shell);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-md);
  padding: 0 var(--space-2);
}

.roster-door-field .select-compact,
.roster-door-field .select-compact .select-control {
  width: 100%;
}

.roster-door-quantity input {
  font-family: var(--font-mono);
  text-align: center;
}

.roster-door-drop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  justify-self: end;
  min-width: var(--control-height-compact);
  min-height: var(--control-height-compact);
  border: 0;
  background: none;
  color: var(--color-meta);
  font-size: var(--text-lg);
  cursor: pointer;
}

/* **On a phone a row's labels are its boxes' words** (the handoff's 6c): each box keeps its label
   as its name, and a text box says it as its placeholder; on a computer they show once, over the
   first row, below. */
.card-roster .roster-door-field > span:not(.roster-door-times) {
  position: absolute;
  width: var(--hairline);
  height: var(--hairline);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* **On a computer the two lines are one**, and the labels show once, over the first row: where the
   card's roster, or the door's, has the room (a container query, so the card's narrow column on a
   laptop keeps the phone's two lines and the full-width foot gets the table). */
@container card-roster (min-width: 36rem) {
  .roster-door-fields {
    display: flex;
    gap: var(--space-2);
  }

  .roster-door-line {
    flex: 1 1 auto;
    flex-wrap: nowrap;
  }

  .roster-door-row:has(+ .roster-door-row),
  .roster-door-row + .roster-door-row {
    padding-block: var(--space-1);
  }

  .card-roster .roster-door-row:first-child .roster-door-field > span:not(.roster-door-times) {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .roster-door-row + .roster-door-row .roster-door-field > span:not(.roster-door-times) {
    position: absolute;
    width: var(--hairline);
    height: var(--hairline);
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* **The rows align as a table** (the handoff's 6e, "the roster as HQ draws it"; choices 3d's
     verification): the typed fields share what a row leaves them, and the size and each choice's
     cell keep one width on every row, so a name's box starts and ends in the same place on each and
     the labels over the first row head their columns. A cell as wide as its words past that width
     (a split of three values) pushes its own row's names narrower, never off the row. */
  .roster-door-line:first-child {
    flex: 1 1 0;
  }

  .roster-door-line + .roster-door-line {
    flex: 0 0 auto;
  }

  .roster-door-line + .roster-door-line > .roster-door-field {
    flex: 0 0 calc(var(--grid-size-column) * 2);
  }

  .roster-door-line + .roster-door-line > .roster-door-cell {
    flex: 0 0 auto;
    min-width: calc(var(--grid-size-column) * 3.5);
  }

  /* **A row of many boxes keeps two lines** (`found-186`): a kit sizing three items or more gives
     four boxes or more after the names (a size for every item, then each item's own), which cannot
     share one line with the names in the door's panel; the names collapsed to nothing and the sizes
     ran past its edge. So the names keep the first line whole and the boxes share the second in
     equal columns, each at least a size column and a half, wrapping onto a further line in the same
     columns where even that does not fit (six sized items in the door at a computer's width). Every
     row of a home has the same boxes, so they wrap alike and the labels over the first row still
     head their columns. */
  .roster-door-row-many .roster-door-fields {
    display: grid;
  }

  .roster-door-row-many .roster-door-line {
    flex-wrap: wrap;
  }

  .roster-door-row-many .roster-door-line + .roster-door-line {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(var(--grid-size-column) * 1.5), 1fr));
  }
}

.roster-door-more {
  display: flex;
  gap: var(--space-4);
}

.roster-door-paste {
  box-sizing: border-box;
  width: 100%;
  min-height: 12rem;
  border: var(--hairline) solid var(--color-field-line);
  background: var(--color-shell);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  padding: var(--space-2);
}

/* ---- after Confirm: what they agreed, what is being made ---------------- */

/* The handoff's *Customer, after Confirm*: rows under an ink rule, a name and its pieces at the left,
   what it comes to in mono at the right, a quieter line under each. */
.customer-orders .agreed {
  margin-top: var(--space-5);
}

.customer-orders .agreed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-ink);
}

.customer-orders .agreed-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.customer-orders .agreed-meta,
.customer-orders .agreed-words {
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

.customer-orders .agreed-words {
  margin: var(--space-2) 0 0;
}

.customer-orders .agreed-row,
.customer-orders .agreed-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.customer-orders .agreed-row {
  padding-top: var(--space-3);
}

.customer-orders .agreed-sub {
  padding: var(--space-1) 0 var(--space-2) var(--space-3);
  border-bottom: var(--hairline) solid var(--color-line);
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

.customer-orders .agreed-made {
  padding-left: 0;
  color: var(--color-ink);
}

.customer-orders .agreed-sizes {
  color: var(--color-meta);
}

.customer-orders .agreed-no {
  color: var(--color-muted);
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-line);
}

.customer-orders .agreed-total {
  padding-bottom: var(--space-1);
}

.customer-orders .agreed-n {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  white-space: nowrap;
}

/* ---- the timeline ------------------------------------------------------ */

/* The handoff's *Customer, after release* (the artboard `CustomerTimeline`): a rail down the left
   joining a line's dots — done ones filled and ticked, the current one a larger filled dot with a
   halo on a light panel, later ones hollow with their names muted; what they were told sits under a
   step, its day in a mono column. Each run's head sits on an ink rule. The measures are the
   artboard's, from the tokens. */
.customer-orders .timeline {
  margin-top: var(--space-5);
  --tl-indent: calc(var(--space-8) + var(--rule-strong) * 2);
  --tl-dot: var(--space-4);
  --tl-dot-now: calc(var(--space-6) - var(--rule-strong) * 2);
  --tl-rail-at: calc(var(--space-3) - var(--rule-strong));
  --tl-day: calc(var(--space-12) + var(--space-1));
}

.customer-orders .tl {
  position: relative;
  margin: var(--space-2) 0 0;
  padding-left: var(--tl-indent);
}

/* The rail: one line behind every dot of a line, from the first to the last. */
.customer-orders .tl::before {
  content: "";
  position: absolute;
  left: var(--tl-rail-at);
  top: var(--space-2);
  bottom: var(--space-4);
  width: calc(var(--rule-strong) * 2);
  background: var(--color-line);
}

.customer-orders .tl-step {
  position: relative;
  padding: var(--space-1) 0 var(--space-4);
}

.customer-orders .tl-step:last-child:not(.tl-current) {
  padding-bottom: var(--space-1);
}

.customer-orders .tl-dot {
  position: absolute;
  left: calc(var(--space-1) - var(--tl-indent));
  top: calc(var(--space-1) + var(--rule-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tl-dot);
  height: var(--tl-dot);
  box-sizing: border-box;
  border: calc(var(--rule-strong) * 2) solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-shell);
  color: var(--color-shell);
  font-size: var(--text-mono-chip);
  font-weight: var(--weight-strong);
}

.customer-orders .tl-done .tl-dot {
  border-color: var(--color-ink);
  background: var(--color-ink);
}

/* The current step: a 22 px filled dot with its halo, the step on a light panel. */
.customer-orders .tl-current .tl-dot {
  left: calc(var(--space-1) - var(--tl-indent) - (var(--tl-dot-now) - var(--tl-dot)) / 2);
  top: calc(var(--rule-strong) * 2);
  width: var(--tl-dot-now);
  height: var(--tl-dot-now);
  border-color: var(--color-ink);
  background: var(--color-ink);
  box-shadow: 0 0 0 calc(var(--space-1) + var(--rule-strong)) var(--color-rule);
}

.customer-orders .tl-current::before {
  content: "";
  position: absolute;
  inset: calc(var(--space-2) * -0.75) calc(var(--space-2) * -1) var(--space-1) calc(var(--space-2) * -1.25);
  border-radius: var(--radius-card);
  background: var(--color-line-panel);
  z-index: -1;
}

.customer-orders .tl-step.tl-current {
  isolation: isolate;
}

.customer-orders .tl-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
}

.customer-orders .tl-later .tl-name {
  color: var(--color-muted);
}

.customer-orders .tl-when {
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-number);
  font-weight: var(--weight-regular);
  white-space: nowrap;
}

.customer-orders .tl-later .tl-when {
  color: var(--color-muted);
}

.customer-orders .tl-mail {
  margin-left: var(--space-1);
  color: var(--color-muted);
}

/* What they were told under a step: its day in a mono column, the words beside it. "Look ›" sits
   inside the words, so it wraps with them and never past the card's edge. */
.customer-orders .tl-event {
  display: grid;
  grid-template-columns: var(--tl-day) minmax(0, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-1);
  color: var(--color-meta);
  font-size: var(--text-quiet);
}

.customer-orders .tl-event-day {
  padding-top: calc(var(--rule-strong) * 2);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-number-sm);
}

.customer-orders .tl-look {
  color: var(--color-ink);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  text-underline-offset: 0.15em;
}

.customer-orders .tl-paused {
  margin-top: var(--space-1);
  font-size: var(--text-quiet);
}

/* ---- the stages (docs/decisions.md, 3 Nov 2026, "From yes to paid…"; the canvas's *The stages
   panel*) ---- */

/* A stage's line: its name, what a done one came to in the quiet ink beside it, the day or a stage
   ahead's one note at the right. */
.customer-orders .tl-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
  min-width: 0;
}

.customer-orders .tl-came {
  color: var(--color-meta);
  font-size: var(--text-quiet);
  font-weight: var(--weight-regular);
}

.customer-orders .tl-aside {
  flex: none;
  color: var(--color-muted);
  font-size: var(--text-quiet);
  font-weight: var(--weight-regular);
  white-space: nowrap;
}

/* Passed, not met: a dark hollow ring the rail shows through, no halo. */
.customer-orders .tl-passed .tl-dot {
  border-color: var(--color-ink);
  background: transparent;
}

.customer-orders .tl-said {
  margin-top: calc(var(--rule-strong) * 2);
}

/* The current stage's block: who it waits on, then what for. On them, the filled chip and the
   sentence at the strong weight; on Ativv, the mono label and the sentence in the meta ink. */
.customer-orders .tl-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  margin-top: calc(var(--space-1) * 1.5);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
}

.customer-orders .tl-with {
  color: var(--color-meta);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.customer-orders .tl-sentence {
  color: var(--color-meta);
}

.customer-orders .tl-sentence-theirs {
  color: var(--color-ink);
  font-weight: var(--weight-strong);
}

.customer-orders .tl-strong {
  font-weight: var(--weight-strong);
}

.customer-orders .tl-then {
  color: var(--color-muted);
  font-size: var(--text-quiet);
}

/* **The runs hang off *Making* as branches** ((4)): each leaves the main rail at an elbow onto a rail
   of its own, the main one running on past them to *Handed over*. The elbow is the head's, from the
   main rail across to the branch's (`--timeline-branch-reach`, after HQ's tree's `--group-rail-elbow`);
   the branch's rail is the run's own line's, at the same place in its box as the main one is in
   the panel's. A run's dots are smaller than a stage's, its step names 14 px. */
.customer-orders .tl-runs {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) * 1.5);
  margin: 0 0 var(--space-4);
}

.customer-orders .tl-branch {
  position: relative;
}

.customer-orders .tl-branch .tl-run-head {
  position: relative;
  margin-top: 0;
  padding: calc(var(--rule-strong) * 2) 0 calc(var(--space-1) * 1.5) var(--tl-indent);
  border-bottom: 0;
}

.customer-orders .tl-branch .tl-run-head::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-rail-at) - var(--tl-indent));
  top: var(--timeline-branch-from);
  bottom: 0;
  width: var(--timeline-branch-reach);
  box-sizing: border-box;
  border-top: calc(var(--rule-strong) * 2) solid var(--color-line);
  border-right: calc(var(--rule-strong) * 2) solid var(--color-line);
  border-top-right-radius: var(--radius-card);
}

.customer-orders .tl-branch .tl-run-items {
  position: relative;
  margin: 0 0 var(--space-1);
  padding-left: var(--tl-indent);
}

/* The branch runs on past a run's folded items ("The 12"), open or shut, from the head's elbow to
   the run's own rail, across the gap under it: the elbow stops at the head and the rail starts at
   the run. */
.customer-orders .tl-branch .tl-run-items::before {
  content: "";
  position: absolute;
  left: var(--tl-rail-at);
  top: 0;
  bottom: calc(var(--space-1) * -1);
  width: calc(var(--rule-strong) * 2);
  background: var(--color-line);
}

.customer-orders .tl-run {
  margin: 0;
}

.customer-orders .tl-run::before {
  top: 0;
}

.customer-orders .tl-run .tl-step {
  padding: calc(var(--rule-strong) * 2) 0 var(--space-3);
}

.customer-orders .tl-run .tl-step:last-child:not(.tl-current) {
  padding-bottom: var(--space-1);
}

.customer-orders .tl-run .tl-name {
  font-size: var(--text-sm);
}

.customer-orders .tl-run .tl-dot {
  left: calc(var(--tl-rail-at) + var(--rule-strong) - var(--tl-indent) - var(--timeline-run-dot) / 2);
  top: calc(var(--space-3) - var(--timeline-run-dot) / 2);
  width: var(--timeline-run-dot);
  height: var(--timeline-run-dot);
  font-size: calc(var(--timeline-run-dot) * 0.6);
}

.customer-orders .tl-run .tl-current .tl-dot {
  left: calc(var(--tl-rail-at) + var(--rule-strong) - var(--tl-indent) - var(--timeline-run-dot-now) / 2);
  top: calc(var(--space-3) - var(--timeline-run-dot-now) / 2);
  width: var(--timeline-run-dot-now);
  height: var(--timeline-run-dot-now);
  box-shadow: 0 0 0 var(--timeline-run-halo) var(--color-rule);
}

/* A run's head: what it makes and its pieces in bold, how it is made and its "about" quiet at the
   right, over an ink rule. */
.customer-orders .tl-run-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-4);
  padding-bottom: var(--space-1);
  border-bottom: var(--hairline) solid var(--color-ink);
}

.customer-orders .tl-run-head b {
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
}

.customer-orders .tl-run-meta {
  color: var(--color-muted);
  font-size: var(--text-meta);
}

/* A run of more than three items, a line each under its head (docs/decisions.md, "The rules decided
   twice…", (3)). */
.customer-orders .tl-run-items {
  margin: var(--space-1) 0 0;
  color: var(--color-muted);
  font-size: var(--text-meta);
}

.customer-orders .tl-run-items > summary {
  cursor: pointer;
}

.customer-orders .tl-run-items > ul {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
}

.customer-orders .agreed-fold {
  margin-top: var(--space-5);
}

.customer-orders .agreed-fold > summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.customer-orders .agreed-fold > summary::-webkit-details-marker {
  display: none;
}

.customer-orders .agreed-fold-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline) solid var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.customer-orders .agreed-open {
  color: var(--color-meta);
  font-weight: var(--weight-regular);
}

.customer-orders .agreed-fold[open] .agreed-open {
  visibility: hidden;
}

.customer-orders .agreed-precis {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) 0;
}

.customer-orders .agreed-fold[open] .agreed-precis {
  display: none;
}

.customer-orders .agreed-headless {
  margin-top: 0;
}

/* A row's thumbnail beside its name, on the after-Confirm page. */
.customer-orders .agreed-thing {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---- the factory sample's page ------------------------------------------ */

/* The handoff's *Customer, the factory sample* (the artboard `CustomerSignoff`), a page of its own:
   the title and what it is of, the words, the photos two by two on the lattice with their names in a
   white tab, Ativv's look first on ruled rows, Sign off and Ask for changes of equal weight, the box
   for words, and what each does. */
.customer-orders .sample-page {
  max-width: var(--measure-column);
}

.customer-orders .sample-words {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  text-wrap: pretty;
}

.customer-orders .sample-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.customer-orders .sample-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: var(--hairline) solid var(--color-ink);
  background-color: var(--color-paper-lattice);
  background-image:
    linear-gradient(var(--color-rule) var(--hairline), transparent var(--hairline)),
    linear-gradient(90deg, var(--color-rule) var(--hairline), transparent var(--hairline));
  background-size: var(--space-5) var(--space-5);
}

.customer-orders .sample-photo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.customer-orders .sample-photo-caption {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  padding: calc(var(--space-1) / 2) var(--space-2);
  background: var(--color-shell);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-chip);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.customer-orders .sample-look {
  margin-top: var(--space-3);
  border-top: var(--hairline) solid var(--color-ink);
}

.customer-orders .sample-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--hairline) solid var(--color-line);
  font-size: var(--text-sm);
  text-wrap: pretty;
}

.customer-orders .sample-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-4);
  height: var(--space-4);
  margin-right: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-shell);
  font-size: var(--text-mono-chip);
  font-weight: var(--weight-strong);
  vertical-align: middle;
}

.customer-orders .sample-meta {
  color: var(--color-muted);
  font-size: var(--text-meta);
}

p.sample-meta {
  margin: var(--space-2) 0 0;
  text-wrap: pretty;
}

.customer-orders .sample-answering {
  margin-top: var(--space-4);
}

.customer-orders .sample-answering > button {
  flex: 1;
}

.customer-orders .sample-text {
  box-sizing: border-box;
  width: 100%;
  min-height: calc(var(--space-12) + var(--space-4));
  margin-top: var(--space-2);
  border: var(--hairline) solid var(--color-field-line);
  background: var(--color-shell);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-md);
  padding: var(--space-2);
}

/* **What is read keeps a column's measure on a wide screen** (tokens.css, `--measure-column`): the
   page's lead, *Your move*, the timeline and what was agreed are sentences, drawn for a phone (the
   handoff's frames are all 390 wide), and a sentence does not want the window's width. */
.customer-orders .order-lead,
.customer-orders .order-moves,
.customer-orders .agreed,
.customer-orders .timeline,
.customer-orders .agreed-fold {
  max-width: var(--measure-column);
}

/* **The cards use the room** (docs/decisions.md, 18 Oct 2026, "The staging look", (1), amending the
   7 Oct entry's (5); Reed's call over the 16 Oct cap, which kept every card at the phone's width and
   left most of a laptop's shell empty). The list of cards is the container the card asks about
   (`offers`, ativv-ui/styles/offer-card.css): from 56rem a card is a row, its picture or open well
   three fifths of it on the left and its words and ask beside; from a tablet's 40rem, below that, a
   card is still drawn as on a phone but up to 44rem wide with a taller strip. A folded card, a card
   of something coming and So far are one line and keep the column's measure. */
.customer-orders .order-offered {
  container: offers / inline-size;
}

.customer-orders .order-offered .offer-line,
.customer-orders .order-offered .order-so-far {
  max-width: var(--measure-column);
}

@container offers (40rem <= width < 56rem) {
  .customer-orders .order-offered .offer-card:not(.offer-line) {
    --offer-picture-height: var(--offer-row-picture-height);
    max-width: 44rem;
  }

  /* One width with the cards above them (the cleanup round, 21 Oct 2026, the candidates' 30). */
  .customer-orders .order-offered .offer-line,
  .customer-orders .order-offered .order-so-far {
    max-width: 44rem;
  }
}

/* **One width on a wide screen** (the cleanup round, 21 Oct 2026, the candidates' 2 and 30, Reed:
   the pages after everything is agreed sat at a phone's width on a desktop, and the cards' page had
   two widths). The order's column is the container `page`; from the cards' own 56rem, nothing on it
   keeps the phone's measure. **The cards' page**: a folded card, a card of something coming and So
   far run the row's width, as the cards do. **Every other page takes the cards' row**: three fifths
   on the left, two on the right, as a card's picture and its words do. The lead's *Your move* and
   *Ours* sit side by side under the title; after Confirm, what they agreed on the left and what is
   being made on the right; after release, the timeline on the left and what they agreed on the
   right. A sentence keeps a line's measure inside its column. */
.customer-orders .order-main {
  container: page / inline-size;
}

@container page (min-width: 56rem) {
  .customer-orders .order-lead,
  .customer-orders .order-offered .offer-line,
  .customer-orders .order-offered .order-so-far {
    max-width: none;
  }

  /* **The stages and *Your move* on the left (3fr), what they agreed on the right (2fr)** (the 2 Nov
     canvas's frames 16 and 17; docs/decisions.md, "From yes to paid…", (5)); while the cards are the
     page, *Your move* beside the stages instead. After Confirm, what they agreed and what is being
     made one above the other in the right column. */
  .customer-orders .order-top-beside,
  .customer-orders .order-top:not(.order-top-beside) .order-top-main {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: var(--space-8);
    align-items: start;
  }

  .customer-orders .order-top > *,
  .customer-orders .order-top-main > * {
    max-width: none;
  }

  .customer-orders .order-top-beside > .agreed-fold,
  .customer-orders .order-top-beside > .order-agreed > .agreed:first-child {
    margin-top: var(--space-5);
  }

  /* **What is being made is the order's pieces, wide** (the handoff's 12b; choices 3d's
     verification): what they agreed stays in the right column beside the stages, and *Being made*
     takes the page's whole width beneath both, where its size columns fit; in the right column it
     drew its phone form on every computer. */
  .customer-orders .order-top-beside > .order-agreed {
    display: contents;
  }

  .customer-orders .order-top-beside > .order-agreed > .agreed-being-made {
    grid-column: 1 / -1;
    max-width: none;
    margin-top: var(--space-6);
  }

  .customer-orders .order-top .agreed-words {
    max-width: var(--measure-text);
  }
}

/* **Leaving with something not sent asks, at the tray** (HQ's drawer asks the same way): the flag,
   the pale warning with its rule, above what is staged, so the link held back is answered where the
   answers are. */
.customer-orders .order-leaving {
  /* The flag's inks for what is drawn on it, as `.on-ground` gives the ground's: the tray is on the
     ground, and its buttons would otherwise wear the ground's white on the pale flag. */
  --color-ink: var(--color-flag-ink);
  --color-muted: var(--color-flag-ink);
  --color-line: var(--color-flag-rule);
  --color-accent: var(--color-flag-ink);
  --color-accent-hover: var(--color-flag-rule);
  --color-accent-ink: var(--color-flag);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  /* Inset as the tray bar's own content is, so its edges line up with the chips and Send. */
  margin: var(--space-2) var(--space-5) 0;
  padding: var(--space-2) var(--space-3);
  border: var(--hairline) solid var(--color-flag-rule);
  background: var(--color-flag);
  color: var(--color-flag-ink);
  font-size: var(--text-quiet);
}

.customer-orders .order-leaving-end {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* **The sample's page points to a newer sample of its run**, under its mono line: the line a person
   arriving from an old email reads first. */
.customer-orders .sample-newer {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border: var(--hairline) solid var(--color-flag-rule);
  background: var(--color-flag);
  color: var(--color-flag-ink);
}

/* ---- Asked again for a size (`AskedAgain`; the 20 Oct handoff's frame) ----
   What changed in one line, a size again for each row in the dropped size, the rest kept. */
.customer-order .asked-again {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.customer-order .asked-rows {
  display: flex;
  flex-direction: column;
}

.customer-order .asked-who {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: var(--hairline) solid var(--color-rule);
  font-size: var(--text-sm);
}

.customer-order .asked-was {
  display: block;
  color: var(--color-muted);
  font-size: var(--text-quiet);
}

.customer-order .asked-unset {
  border-style: dashed;
  color: var(--color-muted);
}

.customer-order .asked-answering .answer:first-child {
  flex: 2 0 auto;
  /* *Yes, with these sizes* on one line, as the artboards draw it; the comment link goes beneath
     when the row is too narrow for all three (the wide card's 30rem column). */
  white-space: nowrap;
}

/* A yes's counts beside the rows, where the two differ (the roster counts by option, 29 Oct 2026). */
.roster-door-against {
  margin: 0 0 var(--space-2);
  color: var(--color-ink);
  font-size: var(--text-sm);
}

/* Close pressed with rows not saved: said once, above the rows. */
.roster-door-leaving {
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: var(--hairline) solid var(--color-ink);
  font-size: var(--text-sm);
}

/* A yes's count per colourway: the colourway's name over its row of sizes. */
.customer-orders .offer-colourway {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.customer-orders .offer-colourway-name {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* **The card holds the roster** (choices 3d, crate::card_roster; the handoff's 6 to 6e): before Yes
   the values as a legend under the picture; after it, how many, the grid or the rows, how many in
   all, and for a yes sent its Save. */
.customer-orders .card-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-top: var(--hairline) solid var(--color-line);
  border-bottom: var(--hairline) solid var(--color-line);
}

.customer-orders .card-legend-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.customer-orders .card-legend-label {
  flex: none;
  min-width: var(--grid-size-column);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-meta);
}

.customer-orders .card-legend-values {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.customer-orders .card-legend-note,
.customer-orders .card-roster-for {
  font-size: var(--text-quiet);
  color: var(--color-meta);
}

.customer-orders .card-roster {
  container: card-roster / inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.customer-orders .card-roster-head,
.customer-orders .card-roster-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}

.customer-orders .card-roster-head {
  padding-top: var(--space-2);
  border-top: var(--hairline) solid var(--color-ink);
}

.customer-orders .card-roster-foot {
  padding-top: var(--space-2);
  border-top: var(--hairline) solid var(--color-line);
}

.customer-orders .card-roster-total {
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}

.customer-orders .card-roster-again {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-left: var(--rule-strong) solid var(--color-note-rule);
  background: var(--color-note-ground);
  color: var(--color-note-ink);
  font-size: var(--text-quiet);
}

.customer-orders .card-roster-above {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-quiet);
  color: var(--color-meta);
}

.customer-orders .card-roster-rows {
  display: flex;
  flex-direction: column;
}

.customer-orders .card-roster-more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) 0;
}

/* *Upload a CSV* is for a computer, where a spreadsheet is (the handoff's 6e). */
@media (max-width: 40rem) {
  .customer-orders .roster-upload {
    display: none;
  }
}

.customer-orders .roster-upload {
  cursor: pointer;
}

.customer-orders .card-roster-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* **What a paste left out, and the yes beside the rows** (the note titled "The roster to the
   factory…", (3); "The roster counts by option…", (6)): a quiet note under the rows, kept until the
   rows are saved, never a toast alone. */
.customer-orders .card-roster-noted,
.customer-orders .card-roster-against {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--color-ink);
}

.customer-orders .card-roster-noted {
  padding: var(--space-2) var(--space-3);
  border: var(--hairline) solid var(--color-flag-rule);
  background: var(--color-flag);
  color: var(--color-flag-ink);
}

/* Why a paste was not read, under its box as well as in a toast. */
.roster-door-refused {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--color-danger);
}

.customer-orders .card-roster-unsaved {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-meta);
}

/* **An added value, told on the item** (the handoff's 9a): a note in the note colours. */
/* **An added value told, its drawing at the left and its words beside** (the handoff's 9a). */
.customer-orders .card-added {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: var(--space-3);
  border-left: var(--rule-strong) solid var(--color-note-rule);
  background: var(--color-note-ground);
  color: var(--color-note-ink);
  font-size: var(--text-quiet);
}

.customer-orders .card-added-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.customer-orders .card-added .offer-change {
  align-self: flex-start;
  color: var(--color-note-ink);
}

/* In the card's foot the roster is the foot's own, with no panel of its own around it. */
.customer-orders .offer-foot .card-roster {
  padding: 0;
  border: 0;
  background: none;
}

/* **The quote asking them** (docs/decisions.md, "The quote out of the gate…", (5)): a card of its
   lines, its total and one Confirm. */
.customer-orders .order-quote-covers {
  margin: 0 0 var(--space-2);
  overflow-wrap: anywhere;
}

.customer-orders .order-quote-lines {
  width: 100%;
  border-collapse: collapse;
}

.customer-orders .order-quote-lines td {
  padding: var(--space-1) 0;
  vertical-align: top;
  border-top: var(--hairline) solid var(--color-field-line);
}

.customer-orders .order-quote-words {
  overflow-wrap: anywhere;
}

.customer-orders .order-quote-lines .order-quote-each,
.customer-orders .order-quote-lines .order-quote-amount {
  padding-left: var(--space-3);
  text-align: right;
  white-space: nowrap;
}

.customer-orders .order-quote-lines tfoot td {
  font-weight: var(--weight-strong);
}

.customer-orders .order-quote-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}

.customer-orders .order-quote-staged {
  color: var(--color-muted);
}

/* **Their invoice, once QuickBooks has emailed it** (docs/decisions.md, the note titled "QuickBooks
   as a peer…", (11)): one line under the stages, what is owed and *Pay ›* beside it. */
.customer-orders .order-invoice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-3) 0 0;
  overflow-wrap: anywhere;
}

/* The quote's *Confirm* staged: hollow and dashed like a staged answer, never ticked. */
.customer-orders .order-quote-pressed {
  border-style: dashed;
  border-width: var(--rule-strong);
}

/* **A comment that waits on Ativv** (docs/decisions.md, "The customer's page tells the truth…",
   (3)): one quiet line under the card's yes and no, which stay. */
.customer-orders .offer-waits {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font-size: var(--text-quiet);
}

/* **A shipped run's carrier and tracking** ((4)), under its head, *Track ›* to the carrier's page. */
.customer-orders .tl-run-handover {
  margin: 0 0 var(--space-1);
  padding-left: var(--tl-indent);
  font-size: var(--text-meta);
  overflow-wrap: anywhere;
}
