/* The calm redesign (Oct 16, 2026): Stock (inventory/stock.js). Loaded after styles.css, so a rule here wins over the same rule there.
   Docs/Hub design standard.md has the rules (Motion; Calm and focus). Colours only from the tokens in styles.css. */

/* ---------- Moved from styles.css (Oct 21, 2026): only this area draws these, so they load with it (js/screen-css.js).
   Kept in their old order, ahead of this file's own rules, as before. ---------- */
/* ---------- plain lists (replies waiting, stock) ---------- */
.lrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; cursor: pointer; }
.lrow:hover { background: var(--rt-hover); }
.lrow:focus-visible { outline-offset: -3px; }
.lrow .l1 { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.lrow .l2 { grid-column: 1 / -1; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the website's spec box (load list) ---------- */
/* Stock's invoice-check lines, under the lede (Hub clarity, Oct 10, 2026). */
.stock-checks { display: flex; flex-direction: column; gap: 4px; margin-top: -14px; }
.stock-checks .nw { white-space: nowrap; }
/* Stock's "Lines to check" (Brandon, Oct 11, 2026; Docs/Hub design standard.md): the shared section title with its
   count (eyebrow), one card per line with the shared head (icon chip, 18 px title, one-line summary), the story at
   16 px, the buttons side by side, solid then outline, and a quieter 14 px line on what the second one does; two across
   from 1440 px (where both buttons still fit side by side); "Nothing to do" folded under. Space, not lines, between. */
.drift-sec { display: flex; flex-direction: column; gap: 12px; }
.drift-list, .drift-quiet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.drift-list { gap: 16px; }
@media (min-width: 1440px) {
  .drift-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); align-items: start; }
}
.drift-story, .drift-ask { font-size: 1rem; line-height: 1.5; font-weight: 400; color: var(--text); overflow-wrap: anywhere; }
.drift-story + .drift-ask { margin-top: -8px; }
.drift-note { margin-top: -4px; }
.drift-quiet-list { gap: 12px; }
.drift-quiet-list li { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }

/* ---------- Final design pass (Oct 11, 2026; Docs/Hub design standard.md, every screen) ---------- */
/* Stock's item rows open the item: the chevron at the right of both lines. */
.lrow:has(> .go) { grid-template-columns: 1fr auto auto; }
.lrow > .go { grid-column: 3; grid-row: 1 / span 2; }
.lrow:has(> .go) .l2 { grid-column: 1 / 3; }

/* ---------- Stock ---------- */
.st-screen { gap: 16px; }
.st-items { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.st-item { display: flex; align-items: center; gap: 4px; }
.st-item[hidden] { display: none; }
.st-item .lrow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border-radius: 10px; }
.st-item .lrow:hover { background: none; }
.st-item .lrow:hover .l1 { text-decoration: underline; text-underline-offset: 3px; }
.st-item-w { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-item .lrow .l1 { display: block; font: 700 .9375rem/1.3 var(--rt-body); color: var(--text); }
.st-item .lrow .l2 { font-size: .75rem; line-height: 1.35; color: var(--text-3); white-space: normal; }
/* The small lines (when it updated, what the screen is for, the invoice check) at the foot of the side column. */
.st-about { display: flex; flex-direction: column; gap: 4px; }
.st-about .lede { font-size: .8125rem; line-height: 1.45; color: var(--text-3); }
.st-about .stock-checks { gap: 2px; }
.st-h { margin: 0; font: 700 .9375rem/1.3 var(--rt-body); letter-spacing: 0; color: var(--text); }
.st-sec { display: flex; flex-direction: column; gap: 6px; }
.st-rows { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.st-row-w { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.st-row-t { font: 400 .875rem/1.35 var(--rt-body); color: var(--text); }
strong.st-row-t { font-weight: 700; }
.st-row-s { font-size: .75rem; line-height: 1.4; color: var(--text-3); }
/* "Exclude an invoice…" at the left, Clear at the right (Oct 15, 2026). */
.st-left-acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Lines to check: "2 lines to check" with the dot, then a quiet tinted card per line. */
.drift-sec { gap: 8px; }
.drift-list { gap: 8px; }
@media (min-width: 1440px) {
  .drift-list { display: flex; }
}
.card.drift .drift-story, .card.drift .drift-ask { font-size: .875rem; line-height: 1.45; }
.card.drift .drift-story + .drift-ask { margin-top: -4px; }
/* An item's sheet: its tile, name and counts at the top; Receive · Count · Edit item; − / + around the number; one Save. */
.sheet.st-sheet { border-radius: 22px 22px 0 0; }
.st-sheet .sheet-head { gap: 12px; padding: 16px 10px 10px 14px; border-bottom: 0; }
.st-sheet-w { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-sheet .sheet-title { font: 700 1rem/1.3 var(--rt-body); color: var(--text); }
.st-sheet .st-sheet-s { font-size: .75rem; line-height: 1.35; color: var(--text-3); }
.st-sheet .sheet-x { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 12px; font-size: 0; }
.st-sheet .sheet-body { gap: 10px; padding: 4px 14px 26px; }
.st-moves { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.st-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.st-tabs button { min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 700 .8125rem/1.2 var(--rt-body); cursor: pointer; }
.st-tabs button[aria-pressed="true"] { background: var(--pick); color: var(--on-pick); }
.st-pane { display: flex; flex-direction: column; gap: 10px; }
.st-pane[hidden] { display: none; }
.st-sheet .field.st-step label { font: 400 .875rem/1.35 var(--rt-body); color: var(--text); }
.st-stepper { display: flex; align-items: center; gap: 8px; }
.st-stp { flex: none; width: 56px; height: 56px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font: 400 1.625rem/1 var(--rt-body); cursor: pointer; }
.st-stp:hover { background: var(--rt-hover); }
.st-sheet .st-stepper input { flex: 1; min-width: 0; min-height: 56px; padding: 0; border: 0; background: none; text-align: center; font: 800 2.75rem/1 var(--rt-cond);
  -moz-appearance: textfield; }
.st-sheet .st-stepper input::-webkit-inner-spin-button, .st-sheet .st-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.st-change { margin: 0; font-size: .8125rem; color: var(--text-2); }
.st-sheet .seg.st-seg { display: flex; width: max-content; max-width: 100%; gap: 2px; padding: 3px; border: 0; background: var(--surface-2); }
.st-sheet .seg.st-seg button { min-height: 44px; padding: 0 14px; font: 600 .8125rem/1 var(--rt-body); color: var(--text-2); }
.st-sheet .seg.st-seg button[aria-pressed="true"] { color: var(--on-pick); }
.st-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
@media (min-width: 720px) {
  .sheet.st-sheet { width: 420px; border-radius: 18px; }
  .sheet.st-sheet.st-add-sheet { width: 520px; }
}
/* ---------- end of the rules moved from styles.css ---------- */

/* ---------- the exact rebuild (Oct 23, 2026; the design's StockPage) ----------
   The header, summary strip, list card, rows, status pills and detail card are the design's own .ds-* classes (styles.css).
   Here only what the Hub adds: the list as a ul, the search box over a long list, and the Hub's own parts folded under the
   two cards (lines to check, not in use, invoices left out, History, the invoice check, the availability PDF). */
.st-items { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.st-item[hidden] { display: none; }
.st-none { margin: 10px 12px; font-size: .85rem; }
.st-screen .ds-page-header__actions .ds-button .ic { width: 18px; height: 18px; }
.st-detail .ds-mobile-back .ic { width: 18px; height: 18px; }
.st-detail .ds-big-number small { font-weight: 600; }
.st-detail .ds-detail-list dd { overflow-wrap: anywhere; }
/* The Hub's own parts: a column of quiet folds (and the lines to check) under the two cards. */
.st-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-side > .more { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.st-side > .more > .more-s { padding: 0 18px; }
.st-side > .more > .more-b { padding: 2px 14px 14px; }
.st-side .st-sec > .more { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.st-side .st-sec > .more > .more-s { padding: 0 18px; }
.st-side .st-sec > .more > .more-b { padding: 2px 14px 14px; }
.st-side .more .st-row { background: var(--surface-2); }
.st-side .more.st-older { border: 0; background: none; }
.st-side .more.st-older > .more-s { min-height: 44px; padding: 0 4px; font-size: .8125rem; }
.st-side .more.st-older > .more-b { padding: 2px 0 0; }
.st-side .st-row .ib.st-undo { margin: -4px -4px -4px 0; }
.st-side .st-left-acts { padding: 0 4px; }
.st-side .more.st-check > .more-s { font-weight: 500; font-size: .875rem; }
.st-side .more.drift-quiet .drift-story { font-size: .875rem; }
.st-side .more.drift-quiet .drift-quiet-list { padding: 0 4px; }
.st-side .more.drift-quiet .acts { padding: 0 4px; }
.st-side .more.st-off .st-items { gap: 0; }
.st-pdf-b { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.st-pdf-b p { margin: 0; font-size: .85rem; }
.st-pdf-b .ds-button .ic { width: 18px; height: 18px; }
.st-about { display: flex; flex-direction: column; gap: 4px; }
.st-about .stock-checks { gap: 2px; }
.st-h { margin: 0; font: 700 .9375rem/1.3 var(--rt-body); letter-spacing: -.015em; color: var(--text); }

/* Lines to check: the question and its two buttons; what the second button does is one tap away. */
.card.drift .drift-more > .more-s { min-height: 44px; padding: 0; font-size: .8125rem; font-weight: 500; color: var(--text-3); }
.card.drift .drift-more > .more-b { padding: 0 0 4px; }
.st-side .more.drift-quiet .drift-story { font-size: .875rem; }
.st-side .more.drift-quiet .drift-quiet-list { padding: 0 4px; }
.st-side .more.drift-quiet .acts { padding: 0 4px; }

/* An item's sheet: its recent changes fold away under the head. */
.st-sheet .more.st-moves-more > .more-s { min-height: 40px; padding: 0 2px; font-size: .8125rem; font-weight: 500; color: var(--text-3); }
.st-sheet .more.st-moves-more > .more-b { padding: 0 2px 6px; }


/* ---------- Until the stock comes (Oct 21, 2026: no pop-in; inventory/stock.js placeholder()) ----------
   The design's own shape in styles.css's grey bars: the summary strip's three cells, the list card's rows (a 36 px count
   tile, two lines, a pill) and the detail card. Same boxes as the real parts, so the data swaps in without anything moving. */
.skel.st-sk { gap: 22px; padding-block: 0; }
.st-sk-strip > div { gap: 10px; }
.sk.st-sk-k { height: .8rem; }
.sk.st-sk-v { height: 1.45rem; border-radius: 8px; }
.sk.st-sk-search { display: block; height: 44px; margin: 6px 6px 10px; border-radius: 12px; }
.st-sk-items { display: flex; flex-direction: column; }
.st-sk-item { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 12px; }
.sk.st-sk-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; }
.st-sk-w { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sk.st-sk-l1 { height: 1rem; }
.sk.st-sk-l2 { height: .75rem; }
.sk.st-sk-pill { flex: none; width: 90px; height: 30px; border-radius: 999px; }
.st-sk-detail { display: flex; flex-direction: column; gap: 14px; }
.sk.st-sk-big { height: 2rem; border-radius: 8px; }
.st-sk-list .sk.st-sk-search { width: auto; }

/* Lines to check in the rebuild: one design card holding "2 lines to check" and a soft box per line; Nothing to do folds
   inside it. */
.drift-sec.ds-card { gap: 12px; }
.drift-sec .card.drift { gap: 10px; padding: 16px; border: 1px solid var(--ds-line); border-radius: 12px; background: var(--surface-2); box-shadow: none; }
.drift-sec .more.drift-quiet { border-top: 1px solid var(--ds-line); background: none; }
.drift-sec .more.drift-quiet > .more-s { padding: 0 2px; }
.drift-sec .more.drift-quiet > .more-b { padding: 2px 2px 4px; }
.drift-sec .drift-list { display: flex; flex-direction: column; gap: 10px; }
.drift-sec .drift-list > li { width: 100%; }
.drift-sec .acts { display: flex; flex-wrap: wrap; gap: 9px; }
