/* Roasters Desk. Values from the locked Figma (file uwS6PeGow0UaZpqBxk9v0m): the 1920 frames in "Locked"
   (106:2) and the 1440 frames in section 131:2. Spacing on the 8 px grid; 4 px only inside components.
   Layout switches by measurement in src/ui/layout.js, which sets data-layout on <html>:
   wide (1920 design), compact (1440 design), and data-tight below 1440 (the 1440 design tightened). */

@font-face { font-family: Figtree; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/league-spartan-latin-600-normal.woff2) format("woff2"); }

/* The type scale (Nov 25, 2026, account flag typeScale, which sets data-type on <html>): six roles, three weights, two
   letter spacings, all set here. Every rule below names its role and carries its own older value as the fallback, which
   is what shows with the flag off and always in print. When the scale is released everywhere the fallbacks can go. */
@media screen {
  html[data-type="six"] {
    --title-size: 24px; --title-line: 32px;       /* every page title, the week total */
    --figure-size: 20px; --figure-line: 28px;     /* stats, panel and dialog titles */
    --large-size: 16px; --large-line: 24px;       /* coffee name on Roasting, customer name on Packing, text in a field on touch */
    --heading-size: 14px; --heading-line: 20px;   /* card, section and day headings, Plan card names */
    --body-size: 13px; --body-line: 20px;         /* 400; controls 500; names and totals 600 */
    --small-size: 12px; --small-line: 16px;       /* 400; badges 500; column headings 600 */
    --strong: 600;
    --letter: normal; --letter-tight: -0.01em;      /* tight: Title and Figure only */
  }
}

/* Controls and padding (Nov 25, 2026, account flag controlScale, which sets data-controls on <html>): control heights 24,
   32 and 48, spacing 4 8 12 16 24 32, one radius. Same way as the type scale: each rule carries its older value. */
@media screen {
  html[data-controls="three"] {
    --ctl: 32px; --ctl-in: 30px;   /* buttons, fields, steppers, segment groups; -in is inside a 1 px edge */
    --mini: 24px; --mini-pad: 2px; /* segment items, choice items, chips */
    --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px; --s32: 32px;
    --card-pad: 16px;
    --rad: 6px;
    /* a box with another box inside it at 4 px: outer corner = inner corner + 4; inside a 1 px line, the corner less the line */
    --nest: 8px; --nest-in: 4px; --nest-line: 5px;
    --label-size: 13px; --label-line: 20px; /* every field label */
    --tile-size: 12px; --tile-line: 16px;
  }
}

:root {
  /* The brand tokens an account may set (src/accounts): these are Elysian's. */
  --teal-dark: #144041;
  --brand-press: #0e3233;
  --shade-rgb: 20, 64, 65;
  --cream-rgb: 255, 249, 244;
  --teal-text: #2c5b5d;
  --tint: #d6dfdf;
  --tint-soft: rgba(214, 223, 223, 0.4);
  --chip: #e4eeec;
  --page: #f5f0e8;
  --sand: #e6dfd3;
  --segment: #efe9df;
  --line: #ece6dc;
  --border: #ddd4c6;
  --past: #ecebe8;
  --ink: #1d1c1a;
  --muted: #6b655c;
  --faint: #a39c91;
  --red: #c23a2c;
  --green: #127a3c;
  --green-tint: #e2efe6;
  --live: #19e36b;
  --cream: #fff9f4;
  /* Elysian pink from the live theme (--colour-pink #ffcac9), desaturated and lightened for the Today band
     (R3-7): clearly pink, calm, never alert red. Text on it uses --ink-soft for 4.5:1 or better. */
  --pink: #ffcac9;
  --pink-soft: #f5e1de;
  --ink-soft: #4f4a44;
  /* One motion for selections and screens (R3-5): gentle ease in and out. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hover: 0.2s;
  --panel: 0.32s;
  --dur: 0.35s;
  --white: #ffffff;
  --scrim: rgba(29, 28, 26, 0.32);
  --shadow-panel: -16px 0 48px rgba(var(--shade-rgb), 0.16);
  --shadow-pop: 0 16px 48px rgba(var(--shade-rgb), 0.18);
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-display: "League Spartan", "Figtree", "Helvetica Neue", Arial, sans-serif;

  /* layout, set per layout below */
  --pad: 48px;       /* page side padding (top bar, toolbar, working area left) */
  --pad-r: 32px;     /* working area right padding before a sidebar */
  --gap: 24px;       /* between day columns */
  --side: 384px;     /* dashboard and packing sidebar */
  --roast-side: 384px;
}
/* The page padding depends on the window only, never on the screen's layout, so switching tabs never
   shifts the top bar or the titles (R3-5). */
html[data-layout="compact"] { --pad-r: 24px; --gap: 16px; --side: 320px; --roast-side: 320px; }
html[data-tight] { --pad: 24px; --pad-r: 16px; --gap: 16px; --side: 296px; --roast-side: 296px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-width: 1280px; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: var(--body-size, 14px); line-height: var(--body-line, 20px);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
p, h1, h2, h3, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { cursor: default; }
b { font-weight: var(--strong, bolder); }
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--teal-text); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: -1px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 32px; height: 64px;
  padding: 0 var(--pad); background: var(--teal-dark); color: var(--cream);
}
.brand { display: flex; align-items: center; gap: 12px; padding-right: 16px; flex: none; }
.brand img { width: 61.563px; height: 16px; }
.brand__rule { width: 1px; height: 20px; background: rgba(var(--cream-rgb), 0.25); }
.brand__name { font-size: var(--body-size, 13px); color: rgba(var(--cream-rgb), 0.5); white-space: nowrap; }
.tabs { position: relative; display: flex; gap: 4px; flex: none; }
.thumb { position: absolute; left: 0; transform-origin: 0 50%; will-change: transform; pointer-events: none; }
.tabs .thumb { top: 0; bottom: 0; border-radius: 8px; background: rgba(var(--cream-rgb), 0.14); }
/* The highlight glides with transform only (R3-5): its width is set once; translate and scale move it. */
.thumb.is-sliding { transition: transform var(--dur) var(--ease); }
.tabs.has-thumb .tab[aria-current="page"] { background: none; }
.tab { position: relative; transition: color var(--hover) var(--ease); }
.tab { padding: calc((var(--ctl, 36px) - 20px) / 2) 16px; border-radius: var(--rad, 8px); font-weight: 500; font-size: var(--body-size, 14px); color: rgba(var(--cream-rgb), 0.7); white-space: nowrap; }
.tab:hover { color: var(--cream); }
.tab[aria-current="page"] { background: rgba(var(--cream-rgb), 0.14); color: var(--cream); }
.top__spacer { flex: 1; min-width: 0; }
.search {
  display: flex; align-items: center; gap: 8px; width: 320px; min-width: 40px; padding: calc((var(--ctl, 36px) - 20px) / 2) 8px calc((var(--ctl, 36px) - 20px) / 2) 12px; border-radius: var(--rad, 8px);
  background: rgba(var(--cream-rgb), 0.1); color: rgba(var(--cream-rgb), 0.6); font-size: var(--body-size, 14px); flex: 0 1 auto;
}
html[data-tight] .search { width: 256px; }
.search span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search:hover { background: rgba(var(--cream-rgb), 0.14); }
.key { display: inline-block; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: var(--rad, 4px); font-weight: 500; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); background: var(--segment); color: var(--muted); white-space: nowrap; }
.key--dark { background: rgba(var(--cream-rgb), 0.14); color: rgba(var(--cream-rgb), 0.85); }
.clock { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; flex: none; }
.clock b { font-weight: 600; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); color: var(--cream); }
.clock span { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: rgba(var(--cream-rgb), 0.65); }
/* The end of the top bar (round 3, Chris's note on uneven spacing): the time, then one group of three equal
   40 px icon tiles 4 px apart, then a hairline and the account. The badge sits on the icon's top-right corner and
   never moves anything. */
.top__end { display: flex; align-items: center; gap: var(--s16, 20px); flex: none; }
.icons { display: flex; align-items: center; gap: var(--s12, 4px); flex: none; }
.icon-btn { position: relative; display: flex; align-items: center; justify-content: center; width: var(--ctl, 40px); height: var(--ctl, 40px); padding: 0; border-radius: var(--rad, 8px); flex: none; }
.icon-btn img, .icon-btn svg { width: 20px; height: 20px; color: var(--cream); }
.icon-btn.is-due svg { color: #ff8a7d; }
.icon-btn:hover, .icon-btn[aria-expanded="true"], .icon-btn[aria-current="page"] { background: rgba(var(--cream-rgb), 0.14); }
.icon-btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.badge {
  position: absolute; left: calc(21px - (40px - var(--ctl, 40px)) / 2); top: calc(4px - (40px - var(--ctl, 40px)) / 2); display: flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 4px; border: 2px solid var(--teal-dark); border-radius: var(--rad, 9px); background: var(--red); color: #fff; box-sizing: border-box;
  font-weight: 600; font-size: var(--small-size, 11px); line-height: var(--small-line, 14px); font-variant-numeric: tabular-nums; pointer-events: none;
}
.icon-btn:hover .badge, .icon-btn[aria-expanded="true"] .badge { border-color: #3b5d5e; }
.top__rule { width: 1px; height: 24px; background: rgba(var(--cream-rgb), 0.2); margin: 0 -4px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-direction: column; gap: 12px; padding: 24px var(--pad) 16px; background: var(--white); border-bottom: 1px solid var(--sand); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; }
.title-group { display: flex; align-items: center; gap: 24px; min-width: 0; }
.title { font-family: var(--font-display); font-weight: 600; font-size: var(--title-size, 36px); line-height: var(--title-line, 44px); white-space: nowrap; }
.title--week { line-height: var(--title-line, 48px); }
.title--week span { color: var(--teal-dark); font-size: var(--title-size, 40px); line-height: var(--title-line, 48px); }
html[data-tight] .title--week span { font-size: var(--title-size, 34px); }
/* Date controls (R4-3): 2 x 2 unit, 48 px tall like the title line; borders drawn with box-shadow so each
   button keeps its full 24 px. */
.week-unit {
  display: grid; grid-template-columns: 32px 32px; grid-template-rows: 24px 24px; flex: none;
  border-radius: var(--rad, 8px); background: var(--white); box-shadow: 0 0 0 1px var(--sand);
}
.week-unit button { display: flex; align-items: center; justify-content: center; }
.week-unit button:hover { background: var(--page); }
.week-unit__cal { grid-column: 1 / 3; border-radius: var(--rad, 8px) var(--rad, 8px) 0 0; box-shadow: inset 0 -1px 0 var(--sand); }
.week-unit button:nth-child(2) { border-radius: 0 0 0 var(--rad, 8px); box-shadow: inset -1px 0 0 var(--sand); }
.week-unit button:nth-child(3) { border-radius: 0 0 var(--rad, 8px) 0; }
.week-unit img { width: 16px; height: 16px; }
.page-head .title-group { gap: 16px; }
button.title { cursor: pointer; }
.title__meta { font-size: var(--body-size, 14px); color: var(--muted); white-space: nowrap; }
.actions { display: flex; align-items: center; gap: 12px; flex: none; }
.week-row { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.week-control { display: flex; align-items: center; border: 1px solid var(--sand); border-radius: var(--rad, 8px); background: var(--white); }
.week-control button { display: flex; padding: var(--s4, 5px) 8px; }
.week-control button:hover { background: var(--page); }
.week-control button:first-child { border-radius: var(--rad, 7px) 0 0 var(--rad, 7px); }
.week-control button:last-child { border-radius: 0 var(--rad, 7px) var(--rad, 7px) 0; }
.week-control img { width: 16px; height: 16px; }
.week-control i { width: 1px; height: 26px; background: var(--sand); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--rad, 8px);
  background: var(--white); font-weight: 500; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); white-space: nowrap; color: var(--ink);
  transition: border-color var(--hover) var(--ease), background-color var(--hover) var(--ease);
}
.btn:hover { border-color: var(--faint); }
.btn--key { padding-right: var(--s8, 6px); }
.btn--small { padding: 5px 12px; font-size: var(--body-size, 13px); }
.drawer .btn, .lightbox .btn { padding: calc((var(--ctl, 38px) - 22px) / 2) var(--s12, 16px); font-size: var(--body-size, 14px); }
.drawer .btn--key, .lightbox .btn--key { padding-right: 8px; }
.btn--dark { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--cream); }
.btn--dark:hover { background: var(--brand-press); border-color: var(--brand-press); }
.btn--dark .key { background: rgba(var(--cream-rgb), 0.14); color: var(--cream); }
.btn:disabled { opacity: 0.4; }
.btn--undo { border: 1.5px solid var(--teal-dark); color: var(--teal-dark); padding-left: 12px; }
.countdown { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(var(--teal-dark) var(--p, 100%), transparent 0); -webkit-mask: radial-gradient(circle, transparent 4.9px, #000 5px); mask: radial-gradient(circle, transparent 4.9px, #000 5px); }
.pill-done { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--rad, 999px); background: var(--green-tint); font-weight: 500; font-size: var(--body-size, 14px); color: var(--ink); }
.pill-done img { width: 16px; height: 16px; }

.segments { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: var(--rad, 8px); background: var(--segment); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); flex: none; }
.segments button { position: relative; display: flex; gap: var(--s4, 6px); padding: var(--mini-pad, 3px) var(--s8, 10px); border-radius: 6px; font-weight: 500; white-space: nowrap; }
.segments button span { font-weight: 400; color: var(--faint); }
.segments button[aria-pressed="true"] { background: var(--white); }
.segments .thumb { top: var(--s4, 3px); bottom: var(--s4, 3px); border-radius: 6px; background: var(--white); box-shadow: 0 1px 2px rgba(29, 28, 26, 0.08); }
.segments.has-thumb button[aria-pressed="true"] { background: none; }
.segments:not(.has-thumb) button:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, 0.5); }
.segments.has-thumb button:not([aria-pressed="true"]):hover { color: var(--teal-dark); }

/* ---------- main and sidebars ---------- */
.main { position: relative; display: flex; align-items: stretch; flex: 1; overflow-x: hidden; overflow-x: clip; }
#page { display: flex; flex-direction: column; min-height: calc(100vh - 64px); }
#page > div { display: flex; flex-direction: column; flex: 1; }
.work { flex: 1; min-width: 0; padding: 32px var(--pad-r) var(--s32, 40px) var(--pad); }
.work--full { padding-right: var(--pad); }
#page.is-entering { animation: page-in var(--dur) var(--ease); }
@keyframes page-in { from { opacity: 0; } }
.side { flex: none; width: var(--side); padding: 24px; background: var(--sand); display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--white); border-radius: var(--rad, 12px); overflow: hidden; }
.card--pad { padding: 24px; }
.card__title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 24px); }
.count { padding: 0 8px; border-radius: var(--rad, 10px); background: var(--chip); font-weight: 600; font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.empty { padding: 32px 24px; text-align: center; color: var(--faint); font-size: var(--body-size, 14px); }
.card--pad .empty { padding: 16px 0 8px; }

/* notes under rows: a small label plus body, with a 2 px rule */
.note { display: flex; gap: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.note::before { content: ""; width: 2px; flex: none; background: var(--border); }
.note b { font-weight: 600; color: var(--ink); margin-right: 1px; }
.note--red::before { background: var(--red); }
.note--red b { color: var(--red); }
.note--teal::before { background: var(--teal-dark); }
.note--teal b { color: var(--teal-dark); }

/* ---------- dashboard ---------- */
.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.day { background: var(--white); border-radius: var(--rad, 12px); overflow: hidden; transition: box-shadow var(--hover) var(--ease); }
.day.is-drop { box-shadow: 0 0 0 2px var(--teal-dark); }
.day__head { display: flex; flex-direction: column; gap: 4px; padding: var(--s16, 20px) 16px 16px 24px; background: var(--tint); border-bottom: 1px solid var(--line); }
.day__name { display: flex; align-items: center; gap: 8px; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); }
.day__name b { font-weight: 600; }
.day__name span { color: var(--muted); }
.day__name i { flex: 1; }
.day__stats { font-size: var(--body-size, 13px); color: var(--muted); }
.tag { padding: 2px 8px; border-radius: var(--rad, 4px); font-weight: 500; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); white-space: nowrap; background: var(--white); color: var(--muted); }
.tag--today, .day__name .tag--today { background: var(--teal-dark); color: var(--cream); }
.day.is-today .day__head { background: var(--pink-soft); }
.day.is-today .day__name span:not(.tag), .day.is-today .day__stats { color: var(--ink-soft); }
.day.is-past .day__head, .day.is-past .roast-sum, .day.is-past .row--collapsed { background: var(--past); }
.day.is-past .day__name, .day.is-past .day__stats, .day.is-past .roast-sum > *, .day.is-past .row--collapsed .row__line { opacity: 0.55; }
.day.is-past .row:not(.row--collapsed) > :not(.note) { opacity: 0.55; }

.row { position: relative; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 16px 12px 24px; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--white); }
.row[draggable="true"] { cursor: grab; }
.row[draggable="true"]:active { cursor: grabbing; }
.row.is-lifted { z-index: 2; box-shadow: 0 8px 24px rgba(var(--shade-rgb), 0.18); transform: scale(1.01); }
.row:hover { background: var(--tint-soft); }
.row__line { display: flex; align-items: flex-start; gap: 8px; }
.row__name { flex: 1; min-width: 0; font-weight: 500; font-size: var(--body-size, 14px); }
.row__name small { margin-left: 4px; font-weight: 400; font-size: var(--small-size, 12px); color: var(--faint); line-height: var(--small-line, inherit); }
.row__status { flex: none; width: 80px; font-size: var(--body-size, 13px); color: var(--ink); }
.row__lb { flex: none; width: 56px; text-align: right; font-weight: 500; font-size: var(--body-size, 14px); white-space: nowrap; }
.row__sub { padding-right: 64px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.row .note { margin-right: 64px; }
.s-received { color: var(--faint); }
.s-roasting, .s-roasted, .s-delivered { color: var(--teal-text); }
.s-packed { color: var(--ink); }
.row.is-dragging { opacity: 0.4; }
.drop-line { height: 0; margin: -1px 16px 0 16px; border-top: 2px solid var(--teal-dark); position: relative; z-index: 3; pointer-events: none; }
.row--collapsed .row__name { font-weight: 500; }
.roast-sum { padding: 16px 0; background: var(--tint); }
.roast-sum__label { padding: 0 16px 4px 24px; font-weight: 500; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); letter-spacing: var(--letter, 0.06em); color: var(--faint); }
.roast-sum__row { display: flex; gap: 8px; padding: 4px 16px 4px 24px; font-size: var(--body-size, 13px); }
.roast-sum__row span:first-child { flex: 1; min-width: 0; }
.roast-sum__row span:nth-child(2) { width: 80px; font-size: var(--small-size, 12px); color: var(--faint); line-height: var(--small-line, inherit); }
.roast-sum__row span:last-child { width: 56px; text-align: right; font-weight: 500; }
.day .empty { padding: 24px; text-align: left; }

.expected { display: flex; flex-direction: column; gap: 16px; }
.expected__head { display: flex; align-items: center; gap: 8px; }
.expected__head .card__title { flex: 1; }
.exp { display: flex; align-items: center; gap: 12px; }
.exp div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exp b { font-weight: 500; font-size: var(--body-size, 14px); }
.exp p { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.exp em { font-style: normal; font-weight: 500; }
.exp em.overdue { color: var(--red); }
.exp em.today { color: var(--teal-dark); }
.show-all { padding-top: 12px; border-top: 1px solid var(--line); font-weight: 500; font-size: var(--body-size, 13px); color: var(--teal-dark); text-align: left; }
.by-coffee { padding: 24px; }
.by-coffee .card__title { padding-bottom: 16px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: var(--body-size, 13px); }
.mini-table th { padding: var(--s8, 6px) 0; font-weight: 400; font-size: var(--small-size, 12px); color: var(--muted); text-align: left; border-bottom: 1px solid var(--border); line-height: var(--small-line, inherit); }
.mini-table td { padding: var(--s8, 6px) 0; }
.mini-table .r { text-align: right; }
.mini-table td.r { font-weight: 500; }
.mini-table tfoot td { padding-top: 12px; border-top: 1px solid var(--ink); font-weight: 600; }
.mini-table tbody tr:first-child td { padding-top: 12px; }

/* ---------- roasting ---------- */
.rtw { display: flex; flex-direction: column; gap: 8px; }
.rtw__sum { font-size: var(--body-size, 13px); color: var(--muted); margin-bottom: 8px; }
.side--roast { gap: 24px; }
.batches__head { padding-top: 24px; background: var(--tint); }
.batches__title { padding: 0 var(--bpad, 48px); font-weight: 600; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); }
.coffee-name { font-weight: 600; font-size: var(--heading-size, 14px); }
.coffee-sub { display: flex; align-items: center; gap: var(--s8, 6px); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.coffee-sub.is-live { color: var(--teal-text); }
.input-num {
  width: 64px; padding: var(--s8, 6px) var(--s12, 10px); border: 1px solid var(--border); border-radius: 6px; background: var(--white);
  font-weight: 500; font-size: var(--body-size, 14px); text-align: right; -moz-appearance: textfield; appearance: textfield;
}
.input-num::-webkit-outer-spin-button, .input-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bar { flex: none; width: 56px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal-dark); }
.bar--wide { width: 100%; }
.bar--green i { background: var(--green); }
.done-text { font-weight: 500; white-space: nowrap; }
.done-text.is-done { color: var(--teal-text); }
.side--roast { width: var(--roast-side); }

/* ---------- packing ---------- */
.stp { display: flex; flex-direction: column; gap: 16px; }
.stp__head { display: flex; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.stp__head span:first-child { flex: 1; }
.stp__group { display: flex; flex-direction: column; gap: 4px; }
.stp__group > b { font-weight: 600; font-size: var(--body-size, 13px); }
.stp__line { display: flex; align-items: center; gap: 8px; min-height: 20px; font-size: var(--body-size, 14px); }
.stp__line span:first-child { flex: 1; min-width: 0; }
.stp__line b { font-weight: 600; color: var(--red); }
.stp__line img { width: 20px; height: 20px; }
.is-green, .is-green > b { color: var(--green) !important; }
.stp__total { display: flex; padding-top: 16px; border-top: 1px solid var(--ink); font-weight: 600; font-size: var(--heading-size, 14px); }
.stp__total span:first-child { flex: 1; }
.stp__total .left { color: var(--red); }

/* ---------- settings: its own screen with a left sidebar (P15) ---------- */
.settings { display: grid; grid-template-columns: 232px minmax(0, 1fr); flex: 1; }
.settings__nav { display: flex; flex-direction: column; gap: 2px; padding: 32px 16px; background: var(--white); border-right: 1px solid var(--sand); }
.settings__title { padding: 0 12px 12px; font-family: var(--font-display); font-weight: 600; font-size: var(--heading-size, 24px); line-height: var(--heading-line, 32px); }
.settings__nav a { padding: 8px 12px; border-radius: var(--rad, 8px); font-weight: 500; color: var(--muted); }
.settings__nav a:hover { background: var(--page); color: var(--ink); }
.settings__nav a[aria-current="page"] { background: var(--tint); color: var(--ink); }
.settings__main { min-width: 0; padding: 32px var(--pad) var(--s32, 40px); display: flex; flex-direction: column; gap: 24px; }
.settings__main .title { font-size: var(--title-size, 32px); line-height: var(--title-line, 40px); }
.settings-note { margin: 0; color: var(--muted); font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); }

/* ---------- settings pages ---------- */
.table-card { padding: 0; }
.st { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.st:last-child { border-bottom: 0; }
.st--head { padding: 16px 24px 8px; border: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.st--head > * { color: inherit !important; font-size: var(--small-size, 12px) !important; }
.st--section { gap: 8px; background: var(--tint); border: 0; font-weight: 500; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); }
.st--section b { font-weight: 500; letter-spacing: var(--letter, 0.06em); color: var(--muted); }
.st--section span { color: var(--faint); }
.st .c-name { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.st .c-name b { font-weight: 500; }
.st .c-name small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.st.is-past { color: var(--faint); }
.st.is-past .c-name b, .st.is-past .c-name small, .st.is-past .c-type { color: var(--faint); font-weight: 400; }
a.st:hover { background: var(--tint-soft); }
.field {
  height: var(--ctl, 34px); padding: var(--s4, 6px) var(--s12, 10px); border: 1px solid var(--border); border-radius: 6px; background: var(--white); font-size: var(--body-size, 14px); min-width: 0;
}
.field::placeholder { color: var(--faint); }
select.field {
  -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%236b655c' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.field--date { width: 120px; }
.field--kg { width: 72px; text-align: left; -moz-appearance: textfield; appearance: textfield; }
.field--kg::-webkit-outer-spin-button, .field--kg::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field--time { width: 120px; }
textarea.field { height: auto; min-height: 64px; resize: vertical; line-height: var(--body-line, 20px); }

.customer-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
html[data-tight] .customer-grid { grid-template-columns: 360px minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 24px; }
.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px 0; align-items: center; margin-top: 16px; font-size: var(--body-size, 13px); }
.facts > span { color: var(--muted); }
.facts .field { width: 100%; }
.order-link { display: flex; align-items: center; gap: 8px; min-width: 0; }
.order-link a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--rad, 4px); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--faint); background: var(--white); }
.chip[aria-pressed="true"] { background: var(--tint); border-color: var(--tint); color: var(--ink); }
.name-chip { display: inline-flex; align-items: center; gap: 4px; padding: var(--mini-pad, 4px) 8px; border-radius: var(--rad, 4px); background: var(--tint); font-size: var(--body-size, 13px); }
.name-chip button { color: var(--muted); padding: 0 2px; }
.add-chip { width: var(--mini, 28px); height: var(--mini, 28px); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); text-align: center; }
.usual-line { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 16px; font-size: var(--body-size, 14px); }
.usual-line + .usual-line { border-top: 0; margin-top: 0; }
.usual-line span:first-child { flex: 1; }
.usual-line span:nth-child(2) { color: var(--muted); }
.usual-line b { font-weight: 500; width: 48px; text-align: right; }
.standing { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.standing label { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
/* Products (round 9): one switch per product, grouped coffee, tea, supplies. */
.prod-group { margin-top: 16px; }
.prod-group + .prod-group { margin-top: 24px; }
.prod-group__title { display: flex; justify-content: space-between; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prod-group__title span { color: var(--faint); }
.prods { list-style: none; margin: 0; padding: 0; }
.prod { display: flex; align-items: center; gap: 16px; min-height: var(--row, 40px); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); }
.prod__name { flex: 1; min-width: 0; }
.prod.is-off .prod__name { color: var(--faint); }
.switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--border); transition: background var(--dur) var(--ease); }
.switch i { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(29, 28, 26, 0.2); transition: transform var(--dur) var(--ease); }
.switch[aria-checked="true"] { background: var(--teal-text); }
.switch[aria-checked="true"] i { transform: translateX(16px); }
.switch:disabled { cursor: default; opacity: 0.48; }
@media (prefers-reduced-motion: reduce) { .switch, .switch i { transition: none; } }
.hist { display: flex; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: var(--body-size, 13px); cursor: pointer; }
.hist:hover { background: var(--tint-soft); }
.hist--head { padding: 8px 24px; border-bottom: 1px solid var(--line); font-size: var(--small-size, 12px); color: var(--muted); cursor: default; }
.hist--head:hover { background: none; }
.hist span:nth-child(1) { width: 136px; } .hist span:nth-child(2) { width: 72px; color: var(--faint); }
.hist span:nth-child(3) { flex: 1; min-width: 0; color: var(--muted); } .hist span:nth-child(4) { width: 48px; text-align: right; font-weight: 500; }
.hist span:nth-child(5) { width: 96px; }
.hist--head span { color: inherit !important; font-weight: 400 !important; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: 600px; display: flex; flex-direction: column;
  background: var(--white); box-shadow: var(--shadow-panel);
}
.drawer.is-entering { animation: slide-in var(--panel) var(--ease); }
.scrim.is-entering { animation: fade-in var(--panel) var(--ease); }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } }
.drawer__body { flex: 1; overflow-y: auto; padding: 24px 24px var(--s32, 40px); }
.drawer__foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); }
.drawer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.order-no { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--faint); }
.drawer h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--figure-size, 28px); line-height: var(--figure-line, 36px); margin-top: 8px; }
.drawer h2.title { font-size: var(--figure-size, 32px); line-height: var(--figure-line, 40px); margin: 0; }
.sub { font-size: var(--body-size, 13px); color: var(--muted); }
.close { display: inline-flex; align-items: center; gap: 8px; padding: calc((var(--ctl, 34px) - 22px) / 2) 8px calc((var(--ctl, 34px) - 22px) / 2) var(--s12, 16px); border: 1px solid var(--border); border-radius: var(--rad, 8px); font-weight: 500; font-size: var(--body-size, 13px); flex: none; }
.section { padding: 24px 0; border-top: 1px solid var(--line); }
.drawer__top + .sub + .section, .drawer__top + .section { margin-top: 24px; }
.section h3 { font-weight: 600; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 24px); margin-bottom: 16px; }
.timeline { display: flex; }
.timeline li { position: relative; flex: 1; padding-top: var(--s16, 20px); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
.timeline li::before { content: ""; position: absolute; top: 4px; left: 0; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--white); }
.timeline li::after { content: ""; position: absolute; top: 8px; left: 12px; right: 4px; height: 1.5px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li.is-done::before { background: var(--teal-dark); border-color: var(--teal-dark); }
.timeline li.is-done::after { background: var(--teal-dark); }
.timeline li.is-next::before { border-color: var(--teal-dark); }
.timeline li.is-future { color: var(--faint); }
.timeline small { display: block; font-size: var(--small-size, 11px); color: var(--muted); }
.drawer-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.drawer-actions i { flex: 1; }
.lines { width: 100%; border-collapse: collapse; font-size: var(--body-size, 14px); }
.lines th { padding-bottom: 12px; border-bottom: 1px solid var(--border); font-weight: 400; font-size: var(--small-size, 12px); color: var(--muted); text-align: left; line-height: var(--small-line, inherit); }
.lines td { padding: 16px 0; border-bottom: 1px solid var(--line); }
.lines .r { text-align: right; }
.lines tfoot td { border-top: 2px solid var(--border); border-bottom: 0; font-weight: 500; }
.details { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px 0; align-items: center; font-size: var(--body-size, 14px); }
.details > span { font-size: var(--small-size, 12px); color: var(--muted); }
.details .field { width: 200px; }
.std-notes { font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); }
.std-notes small { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); margin-bottom: 4px; }
.only-box { margin-top: 24px; padding: 16px; border-radius: var(--rad, 8px); background: var(--tint); }
.only-box small { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); margin-bottom: 4px; }

/* new order */
.no-lines .nl { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.nl--head { font-size: var(--small-size, 12px); color: var(--muted); padding-bottom: 8px !important; border-bottom: 1px solid var(--line); }
.nl .c-p { flex: 1; min-width: 0; } .nl .c-p .field { width: 100%; }
.nl .c-s { width: 96px; } .nl .c-s .field { width: 100%; }
.nl .c-q { width: 120px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.nl .c-l { width: 48px; text-align: right; }
.nl .c-x { width: 20px; color: var(--faint); font-size: var(--body-size, 16px); }
/* The x takes a press well outside its 20 px (36, 44 on touch); the row keeps its layout. */
.nl button.c-x { position: relative; }
.nl button.c-x::after { content: ""; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); }
.nl--total { border-top: 1px solid var(--ink); margin-top: 8px; padding-top: 16px !important; font-weight: 500; }
.step { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--body-size, 16px); line-height: var(--body-line, 1); background: var(--white); }
.step:disabled { opacity: 0.4; }
.counter { display: inline-flex; align-items: center; gap: 8px; }
.step--quiet { width: 28px; height: 28px; border-color: var(--line); color: var(--muted); font-size: var(--body-size, 15px); }
.step--quiet:not(:disabled):hover { border-color: var(--border); color: var(--ink); }
.counter .done-text { min-width: 44px; text-align: center; }
.step--40 { width: 40px; height: 40px; border-radius: var(--rad, 8px); font-size: var(--body-size, 18px); }
.add-line { display: inline-flex; gap: 8px; margin-top: 8px; color: var(--teal-dark); font-weight: 500; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.two-col .field { width: 100%; height: var(--ctl, 38px); }
.meta { margin-top: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }

/* lightbox */
.lightbox {
  position: fixed; z-index: 41; top: 48px; left: 50%; width: 720px; max-height: calc(100vh - 96px); transform: translateX(-50%);
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--rad, 16px); box-shadow: var(--shadow-pop);
}
.lightbox.is-entering { animation: lb-in var(--panel) var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.lb__head { padding: 24px 24px 0; }
.lb__body { flex: 1; overflow-y: auto; margin: 24px 24px 0; border-top: 1px solid var(--line); padding: 16px 12px 16px; mask-image: linear-gradient(#000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent); }
.lb__group { font-size: var(--small-size, 12px); color: var(--muted); padding: 8px 0; line-height: var(--small-line, inherit); }
.lb__line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.lb__row { display: flex; align-items: center; gap: 8px; }
.lb__row .n { flex: 1; min-width: 0; font-size: var(--body-size, 14px); }
.lb__row .n span { color: var(--muted); }
.lb__row .of { width: 64px; text-align: center; font-size: var(--body-size, 14px); white-space: nowrap; }
.lb__row .of b { font-weight: 500; }
.lb__row .of span { color: var(--muted); }
.lb__line .bar { margin-top: 8px; }
.lb__line.is-done { padding: 4px 0; }
.lb__line.is-done .n, .lb__line.is-done .of, .lb__line.is-done .of span { color: var(--green); }
.lb__line.is-done .step { width: 28px; height: 28px; font-size: var(--body-size, 14px); }
.lb__check { width: 20px; height: 20px; }
.lb__total { margin: 0 24px; padding: 16px 12px; border-radius: var(--rad, 8px); background: var(--tint); }
.lb__total .bar { background: var(--white); }
.lb__total div { display: flex; justify-content: space-between; font-weight: 500; font-size: var(--body-size, 14px); margin-bottom: 8px; }
.lb__total .ok { display: inline-flex; gap: var(--s8, 6px); align-items: center; color: var(--green); }
.lb__total .ok img { width: 16px; height: 16px; }
.lb__foot { display: flex; gap: 8px; margin: 16px 24px 0; padding: 16px 0 24px; border-top: 1px solid var(--line); }
.lb__foot i { flex: 1; }
.lb__notes { padding-top: 16px; }

/* popovers */
.pop {
  position: fixed; z-index: 45; background: var(--white); border: 1px solid var(--line); border-radius: var(--rad, 16px); box-shadow: var(--shadow-pop);
  animation: pop-in 0.25s var(--ease);
}
.notif { top: 60px; width: 380px; padding: var(--s16, 20px) 0 8px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.notif ul { overflow-y: auto; overscroll-behavior: contain; }
.pop__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px 12px; }
.pop__head h3 { font-weight: 600; font-size: var(--heading-size, 15px); }
.link { font-weight: 500; font-size: var(--body-size, 13px); color: var(--teal-dark); }
.link:hover { text-decoration: underline; }
.notif li.nrow + li.nrow { border-top: 1px solid var(--line); }
.notif .group { padding: 12px 16px 4px; font-weight: 500; font-size: var(--small-size, 11px); letter-spacing: var(--letter, 0.06em); color: var(--faint); border-top: 0; line-height: var(--small-line, inherit); }
.nrow { position: relative; display: flex; gap: 4px; padding: 12px var(--s32, 40px) 12px 8px; cursor: pointer; }
.nrow:hover { background: var(--tint-soft); }
.nrow .dot-mark { flex: none; width: 24px; display: flex; justify-content: center; padding-top: var(--s8, 6px); }
.nrow .dot-mark i { width: 8px; height: 8px; border-radius: 50%; }
.nrow.is-new .dot-mark i { background: var(--teal-dark); }
.nrow.is-new b { font-weight: 600; }
.nrow > div { flex: 1; min-width: 0; }
.nrow .mark { position: absolute; right: 8px; top: 12px; width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; opacity: 0; color: var(--teal-dark); }
.nrow:hover .mark, .nrow .mark:focus-visible { opacity: 1; }
.nrow .mark:hover { background: var(--white); }
.nrow .mark svg { width: 16px; height: 16px; }
.ctx { position: fixed; z-index: 60; min-width: 180px; padding: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--rad, 8px); box-shadow: var(--shadow-pop); }
.ctx button { display: block; width: 100%; padding: 8px 12px; border-radius: 6px; font-size: var(--body-size, 13px); text-align: left; }
.ctx button:hover, .ctx button:focus-visible { background: var(--tint); outline: none; }
.reminders li.exp { padding: 12px 16px; }
.notif b { font-weight: 500; }

.notif p { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); margin-top: 2px; }
.notif p em { font-style: normal; color: var(--red); }

.cal { padding: 16px; width: 280px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 600; }
.cal__head button { padding: 4px 8px; border-radius: 6px; }
.cal__head button:hover { background: var(--page); }
.cal__days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: var(--small-size, 12px); color: var(--faint); padding: 4px 0; line-height: var(--small-line, inherit); }
.cal__weeks { display: flex; flex-direction: column; gap: 2px; }
.cal__week { display: grid; grid-template-columns: repeat(7, 1fr); width: 100%; padding: 6px 0; border-radius: var(--rad, 999px); text-align: center; font-size: var(--body-size, 13px); transition: background-color var(--hover) var(--ease); }
.cal__week:hover { background: var(--page); }
.cal__week.is-current { background: var(--tint); }
.cal__week .is-out { color: var(--faint); }
.palette { top: 96px; left: 50%; width: 560px; transform: translateX(-50%); padding: 8px; }
.palette.is-entering { animation: fade-in 0.25s var(--ease); }
/* The search field's clear button in the Desk's ink, not the browser's blue (R4). */
.palette input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' stroke='%231d1c1a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}
.keys { top: 96px; left: 50%; width: 400px; transform: translateX(-50%); padding: 24px; animation: fade-in 0.25s var(--ease); z-index: 46; }
.keys ul { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; font-size: var(--body-size, 14px); }
.keys li { display: flex; align-items: center; gap: 12px; }
.keys .key { min-width: 32px; }
.palette input { width: 100%; padding: 12px; border: 0; outline: 0; font-size: var(--body-size, 16px); border-bottom: 1px solid var(--line); }
.palette__results ul { max-height: 420px; overflow-y: auto; padding-top: 8px; }
.palette li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border-radius: var(--rad, 8px); cursor: pointer; }
.palette li span { color: var(--muted); font-size: var(--body-size, 13px); white-space: nowrap; line-height: var(--body-line, inherit); }
.palette li[aria-selected="true"] { background: var(--tint); }
.palette .group { padding: 8px 12px 4px; font-size: var(--small-size, 11px); letter-spacing: var(--letter, 0.06em); color: var(--faint); line-height: var(--small-line, inherit); }

.toast-wrap { position: fixed; z-index: 50; left: 0; right: 0; bottom: 32px; display: flex; justify-content: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 16px; pointer-events: auto;
  padding: 8px 8px 8px 16px; border-radius: var(--rad, 8px); background: var(--teal-dark); color: var(--cream); font-size: var(--body-size, 14px); box-shadow: var(--shadow-pop);
}
.toast.is-entering { animation: pop-in 0.28s var(--ease); }
.toast button b { font-weight: 500; display: inline-block; min-width: 8px; }
.toast button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 6px; background: rgba(var(--cream-rgb), 0.1); font-weight: 500; }
.toast button:hover { background: rgba(var(--cream-rgb), 0.18); }
.toast .key { background: rgba(var(--cream-rgb), 0.14); color: var(--cream); }
.toast--error { background: var(--red); }

/* sign in */
.signin { max-width: 400px; margin: 96px auto; padding: 32px; }
.signin h1 { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 36px; margin-bottom: 24px; }
.signin label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.signin .field { height: 40px; color: var(--ink); }
.signin .err { margin-bottom: 16px; color: var(--red); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- print: Letter ---------- */
#print-root { display: none; }
@page { size: letter; margin: 0.5in; }
@media print {
  body { min-width: 0; background: #fff; }
  .top, .week-control, .week-unit, .week-row .btn, .actions, .scrim, .drawer, .lightbox, .pop, .toast { display: none !important; }
  .toolbar { padding: 0 0 16px; border: 0; }
  .work { padding: 16px 0 0; }
  .main { min-height: 0; }
  .side { background: none; padding: 16px 0 0; }
  .day, .card { break-inside: avoid; border: 1px solid #ccc; }
  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .row__sub, .row .note { padding-right: 0 !important; margin-right: 0 !important; }
  .main { display: block; }
  .side { width: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .side .btn, .show-all, .live-dot { display: none !important; }
  .page-roasting .side--roast { display: block; }
  .page-roasting { --bpad: 8px; --bgap: 6px; font-size: 11px; }
  .bt .c-done .btn { display: none; }
  .input-num, .bt .input-num, .day-score__cap { border: 0 !important; box-shadow: none !important; background: none !important; padding: 0; }
  /* Round 2 controls: paper keeps what was chosen (the week, the day) as plain text and drops every button. */
  .week-nav__today, .week-nav__arrows, .week-nav .chev, .th__arrow, .c-slip, .c-act, .step, .rc__toggle .chev, .plan-news__x,
  .page-head .segments .thumb, .page-head .segments button:not([aria-pressed="true"]), .actions, .pack-card__fold .chev { display: none !important; }
  .week-nav__title, .page-head .segments, .page-head .segments button { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; }
  .page-head .segments button[aria-pressed="true"] { font-size: 15px; font-weight: 500; color: #000; }
  .page-head .segments button[aria-pressed="true"]::after { display: none; }
  .att, .omark { border: 1px solid #ccc; background: none !important; }
  body.print-slips > :not(#print-root) { display: none !important; }
  body.print-slips #print-root { display: block; }
}
.slip { --strong: initial; font-size: 14px; line-height: 20px; width: 7.5in; min-height: 9.9in; display: flex; flex-direction: column; color: #000; font-family: var(--font); break-after: page; }
.slip:last-child { break-after: auto; }
.slip__top { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 16px; border-bottom: 2px solid #000; }
.slip__top img { width: 108px; height: 28px; filter: brightness(0); }
.slip__no { text-align: right; }
.slip__no small, .slip__k { display: block; font-weight: 500; font-size: 9px; letter-spacing: 0.16em; color: #444; }
.slip__no b { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 40px; }
.slip__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 32px 0 24px; }
.slip__meta b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 24px; margin: 8px 0; }
.slip__meta p { font-size: 12px; line-height: 24px; color: #444; }
.slip table { width: 100%; border-collapse: collapse; font-size: 15px; }
.slip th { padding: 8px 0; border-bottom: 2px solid #000; font-weight: 500; font-size: 9px; letter-spacing: 0.16em; color: #444; text-align: left; }
.slip td { padding: 12px 0; border-bottom: 1px solid #ccc; }
.slip .r { text-align: right; }
.slip .box { display: inline-block; width: 18px; height: 18px; border: 1.5px solid #000; border-radius: 2px; vertical-align: middle; }
.slip tfoot td { border: 0; font-family: var(--font-display); font-weight: 600; }
.slip__only { margin-top: 32px; padding: 16px 20px; border: 2px solid #000; }
.slip__only b { display: block; margin-top: 8px; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.slip__every { margin-top: 32px; font-size: 14px; line-height: 28px; }
.slip__sign { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 48px; font-size: 15px; }
.slip__sign div { display: flex; flex-direction: column; gap: 24px; }
.slip__sign span { display: flex; align-items: center; gap: 12px; }
.slip__sign i { border-bottom: 1px solid #000; height: 1px; }
.slip__foot { display: flex; gap: 16px; align-items: baseline; margin-top: 32px; font-size: 10px; color: #444; }
.slip__foot b { font-weight: 600; letter-spacing: 0.16em; color: #000; }
.slip__foot span:last-child { margin-left: auto; }
.preview { position: fixed; z-index: 41; top: 48px; left: 50%; transform: translateX(-50%); width: 720px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-pop); }
.preview__paper { flex: 1; overflow: auto; margin: 0 24px; padding: 24px; background: var(--sand); border-radius: 8px; }
.preview__paper .slip { zoom: 0.5; background: #fff; padding: 0.5in; margin: 0 auto 24px; width: 8.5in; min-height: 11in; }
.rtw .mini-table td, .rtw .mini-table th { white-space: nowrap; }
.rtw .mini-table td:first-child { white-space: normal; }
.rtw .mini-table .r { padding-left: 12px; }
.title--fixed { display: inline-grid; }
.title--fixed > span { grid-area: 1 / 1; }
.title__sizer { visibility: hidden; }

/* Confetti, copied from the live theme (assets/elysian-cart.css) */
.ely-confetti { position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; pointer-events: none; }
.ely-confetti__bit { position: absolute; left: 0; top: 0; display: block; width: 7px; height: 7px; margin: -4px 0 0 -3px; border-radius: 1px; will-change: transform, opacity; }
.ely-confetti__bit--round { border-radius: 50%; }
.ely-confetti__bit--light { box-shadow: 0 0 0 1px rgba(34, 56, 56, 0.35); }
@media (prefers-reduced-motion: reduce) { .ely-confetti { display: none; } }

/* ---------- Batches table hierarchy (R5-2 to R5-4) ----------
   Unfinished lines lead: larger names, ink numbers, the two controls (Leftover, the batch stepper) clearly
   interactive. Computed columns are quieter. Finished lines step back: muted text, a done check. */
.counter .done-text { min-width: 56px; font-weight: 600; font-size: var(--heading-size, 15px); }
.done-check { width: 18px; height: 18px; flex: none; }

/* ---------- Roasting This Week card (R5-5) ---------- */
.rtw .card__title { font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); }
.rtw__sum { margin: 0 0 16px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.rtw .mini-table th { padding: 0 0 8px; font-weight: 500; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); letter-spacing: var(--letter, 0.06em); text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.rtw .mini-table td { padding: 8px 0; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); border-bottom: 1px solid var(--line); }
.rtw .mini-table tbody tr:first-child td { padding-top: 12px; }
.rtw .mini-table tbody tr:last-child td { border-bottom: 0; }
.rtw .mini-table td.r { font-weight: 500; }
.rtw .mini-table tfoot td { padding-top: 16px; border-top: 1.5px solid var(--ink); font-size: var(--heading-size, 15px); font-weight: 600; }

/* ---------- Packing scope and status tabs (R5-8) ---------- */

/* Deliver waits for packing (R5-7) */
.btn--blocked, .btn--blocked:hover { background: var(--white); border-color: var(--border); color: var(--faint); cursor: not-allowed; }
.btn--blocked .key { background: var(--segment); color: var(--faint); }
.nudge { align-self: center; font-size: var(--body-size, 13px); color: var(--red); white-space: nowrap; }
.nudge.is-shaking { animation: shake 0.36s var(--ease); }
@keyframes shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ---------- Coffees: Roast math group (R5-9) ---------- */
html[data-tight] .settings { grid-template-columns: 184px minmax(0, 1fr); }

/* ---------- Plan: the software decides, the roaster informs (Nov 8) ----------
   Per coffee, its batches as quiet rows: the orders in each as chips, a thin fill bar. Full batches look
   settled; a part batch shows its spare lb. Reasons sit under the group as one muted line each. */
.btn--quiet { border-color: transparent; background: none; color: var(--teal-text); }
.btn--quiet:hover:not(:disabled) { background: var(--page); }
.btn--quiet:disabled { color: var(--faint); }
.plan-batches { list-style: none; margin: 8px 0 0; padding: 0; }
.pb { display: grid; grid-template-columns: 96px minmax(0, 1fr) 120px 96px; align-items: center; gap: 16px; min-height: 40px; padding: 4px 0; }
.pb + .pb { border-top: 1px solid var(--line); }
.pb__n { display: flex; align-items: center; gap: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); white-space: nowrap; }
.pb__check { width: 16px; height: 16px; flex: none; }
.pb__chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.pchip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 8px; border-radius: var(--rad, 4px); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px);
  background: var(--chip); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pchip b { font-weight: 600; }
button.pchip { cursor: pointer; }
button.pchip:hover { box-shadow: inset 0 0 0 1px var(--teal-text); }
.pchip--stock { background: repeating-linear-gradient(135deg, var(--sand) 0 6px, var(--segment) 6px 12px); color: var(--ink-soft); }
.pchip--short { background: var(--pink-soft); color: var(--red); }
.pchip.is-pinned { box-shadow: inset 0 0 0 1.5px var(--teal-dark); }
.pchip.is-over { box-shadow: inset 0 0 0 1.5px var(--red); }
.mark-shopify, .mark-pin { width: 16px; height: 16px; flex: none; }
.mark-shopify { color: #5e8e3e; }
.mark-pin { color: var(--teal-dark); }
.pb__fill { height: 8px; border-radius: 4px; background: var(--segment); overflow: hidden; }
.pb__fill i { display: block; height: 100%; border-radius: 4px; background: var(--faint); }
.pb.is-full .pb__fill i { background: var(--teal-dark); }
.pb.is-roasted .pb__fill i { background: var(--green); }
.pb.is-roasted .pchip { background: var(--page); color: var(--muted); }
.pb.is-roasted .pb__n { color: var(--faint); }
.pb__spare { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); text-align: right; color: var(--teal-text); font-weight: 600; white-space: nowrap; }
.plan-why { margin-top: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.plan-why--over { color: var(--red); }
html[data-layout="compact"] .pb { grid-template-columns: 80px minmax(0, 1fr) 96px 88px; gap: 12px; }
html[data-tight] .pb { grid-template-columns: 72px minmax(0, 1fr) 72px 80px; gap: 8px; }

/* What changed since the roaster last looked (late orders), one quiet dismissible line. */
.plan-news { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 8px 8px 8px 16px; border-radius: var(--rad, 8px); background: var(--tint);
  font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink); }
.plan-news span { flex: 1; min-width: 0; }
.plan-news__x { width: 24px; height: 24px; border-radius: var(--rad, 4px); font-size: var(--body-size, 16px); line-height: var(--body-line, 24px); color: var(--muted); }
.plan-news__x:hover { background: rgba(255, 255, 255, 0.6); }

/* Pin a chip to a day. */
.pin { width: 280px; padding: 16px 0; }
.pin .pop__head { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 8px; }
.pin__meta { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.pin__days { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 16px; }
.pin__days .chip { padding: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 16px); color: var(--ink); }
.pin__days .chip:disabled { color: var(--faint); background: var(--page); }
.pin__off { display: block; margin: 16px 16px 0; }
.c-to__buffer { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--faint); }

/* A batch logged as roasted settles. Reduced motion changes state at once. */
.pb.is-snapping .pb__fill { animation: pb-snap 0.22s cubic-bezier(0.2, 0, 0, 1); }
.pb.is-snapping .pb__n { animation: pb-snap 0.22s cubic-bezier(0.2, 0, 0, 1); }
@keyframes pb-snap { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .pb.is-snapping .pb__fill, .pb.is-snapping .pb__n { animation: none; } }

/* The day's score in the Roasting header, with the quiet perfect mark. */
.day-score { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); color: var(--muted); white-space: nowrap; }
.day-score__cap { width: 48px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--white); font: inherit; color: var(--ink); text-align: center; }
.day-score__cap { -moz-appearance: textfield; appearance: textfield; }
.day-score__cap::-webkit-outer-spin-button, .day-score__cap::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.day-score__cap:disabled { background: none; border-color: transparent; color: inherit; }
.day-score.is-over .day-score__cap { color: var(--red); }
.day-score.is-over { color: var(--red); }
.day-score.is-perfect { color: var(--teal-dark); font-weight: 600; }
.day-score__mark { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-dark); }
.day-score__mark::after { content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 11px; border: solid var(--cream); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Settings > Roasting */
.roaster-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); gap: 24px; align-items: start; }
.unit-field { display: inline-flex; align-items: center; gap: 8px; font-size: var(--body-size, 13px); color: var(--muted); }

/* ---------- round 1 (Nov 8): the Orders list, the date control (option A), the demo clock ---------- */
/* The demo clock sits beside the time; the search narrows to make room. */

/* Option A: [Today] ‹ › Nov 2 – 6 ▾ on one line, the title's own 48 px line height. */
html[data-tight] .week-nav__title .title--fixed span { font-size: var(--title-size, 34px); }

/* Needs attention: one line of buttons, only when something applies. */
.attention { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.att { padding: calc(4px + (24px - var(--body-line, 24px)) / 2) 12px; border-radius: var(--rad, 8px); background: #f8e2df; color: var(--red); font-weight: 500; font-size: var(--body-size, 13px); line-height: var(--body-line, 24px); }
.att:hover { background: #f3d2ce; }

/* One row per order. */
.olist { overflow: visible; }
.omark { padding: 0 8px; border-radius: var(--rad, 4px); background: var(--segment); font-weight: 500; font-size: var(--small-size, 12px); line-height: var(--small-line, 24px); color: var(--ink-soft); white-space: nowrap; }
.omark--shopify { display: inline-flex; align-items: center; padding: 0 4px; background: #e8f0e1; }
.omark--prio { background: var(--teal-dark); color: var(--cream); }
.omark--big { background: var(--chip); color: var(--teal-text); }
.omark--late { background: #f8e2df; color: var(--red); }
.omark--stock { background: var(--green-tint); color: var(--green); }
.s-stocked { color: var(--green); }
.ogroup { margin-top: 24px; }
.ogroup__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; font-size: var(--body-size, 13px); line-height: var(--body-line, 24px); color: var(--muted); }
.ogroup__title span { padding: 0 8px; border-radius: var(--rad, 8px); background: var(--segment); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); }

/* The row menu. */

/* Settings > Roasting: the expected-orders row. */
.unit-row { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--body-size, 14px); }


/* ==========================================================================================================
   Round 2 (Nov 10, 2026). Same look, clearer conventions: a page title with a compact week control beside
   it, sortable column headers, one working list on Roasting, the day read top to bottom on Packing, Settings
   as Products / Customers / Planning, and Green coffee as its own screen. Spacing on the 8 px grid.
   ========================================================================================================== */
:root { --warn: #8a5a0b; --warn-tint: #f4e8cf; --red-tint: #f8e2df; }
.grow { flex: 1; }
.center { text-align: center; }
.chev { width: 16px; height: 16px; flex: none; }

/* ---------- top bar: the week's three screens, a rule, then Green coffee ---------- */
.tab { display: inline-flex; align-items: center; gap: 8px; }
.tabs__rule { align-self: center; width: 1px; height: 20px; margin: 0 12px; background: rgba(var(--cream-rgb), 0.25); }
.tab__flag { min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--rad, 8px); background: var(--warn-tint); color: var(--warn); font-weight: 600; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); text-align: center; }
.tab__flag--short { background: var(--red); color: #fff; }
html[data-tight] .top { gap: 16px; }
.search span:first-child { min-width: 0; }

/* ---------- page title and the week control ---------- */
.page-head .title-group { gap: 24px; }
.title--fixed { display: inline-grid; }
.title--fixed > span { grid-area: 1 / 1; }
html[data-tight] .toolbar .title { font-size: var(--title-size, 32px); line-height: var(--title-line, 40px); }
.title__meta { font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); color: var(--muted); white-space: nowrap; }
.week-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.week-nav__today { height: 32px; margin-right: 4px; }
.week-nav__today:disabled { opacity: 1; border-color: var(--line); color: var(--faint); }
.week-nav__arrows { display: inline-flex; }
.week-nav__arrow { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--rad, 8px); flex: none; }
.week-nav__arrow:hover { background: var(--page); }
.week-nav__arrow img { width: 16px; height: 16px; }
.week-nav__title { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 12px; border-radius: var(--rad, 8px); font-weight: 600; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 32px); color: var(--ink); white-space: nowrap; }
.week-nav__title:hover { background: var(--page); }
.week-nav__title .chev { color: var(--muted); }
html[data-tight] .page-roasting .week-nav__today { display: none; }
.segments button.is-today::after { content: ""; align-self: center; width: 4px; height: 4px; border-radius: 50%; background: var(--teal-text); }

/* ---------- sortable column headers ---------- */
.th { display: inline-flex; align-items: center; gap: 4px; margin: -4px -8px; padding: 4px 8px; border-radius: 6px; font: inherit; color: inherit; white-space: nowrap; }
.th:hover { background: var(--page); color: var(--ink); }
.th__arrow { width: 12px; height: 12px; flex: none; opacity: 0; transition: opacity var(--hover) var(--ease); }
.th:hover .th__arrow { opacity: 0.4; }
.th.is-on { color: var(--ink); font-weight: 600; }
.th.is-on .th__arrow { opacity: 1; }
.th.is-asc .th__arrow { transform: rotate(180deg); }

/* ---------- Orders: one row per order, columns set apart ---------- */
.ol {
  display: grid; align-items: center; gap: 24px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--white);
  grid-template-columns: minmax(280px, 1fr) 136px 128px 80px 88px 120px 64px; font-size: var(--body-size, 14px); line-height: var(--body-line, 24px);
}
html[data-tight] .ol { gap: 16px; grid-template-columns: minmax(240px, 1fr) 128px 120px 72px 80px 112px 56px; }
.ol:last-child { border-bottom: 0; border-radius: 0 0 var(--rad, 12px) var(--rad, 12px); }
.ol[role="button"] { cursor: pointer; }
.ol[role="button"]:hover { background: var(--tint-soft); }
.ol--head { padding-top: 16px; padding-bottom: 12px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); border-radius: var(--rad, 12px) var(--rad, 12px) 0 0; }
.ol__cust { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.ol__name { margin-right: 4px; font-weight: 500; font-size: var(--body-size, 15px); }
.ol__status { white-space: nowrap; }
.ol__status.is-back { color: var(--red); font-weight: 500; }
.ol__roast, .ol__ship { white-space: nowrap; }
.ol__roast b { margin-left: 8px; color: var(--red); font-weight: 600; font-size: var(--small-size, 12px); line-height: var(--small-line, inherit); }
.ol__placed, .ol__method, .ol__usual { color: var(--muted); white-space: nowrap; }
.ol__lb { text-align: right; font-weight: 600; white-space: nowrap; }
.ol--head .ol__lb { display: flex; justify-content: flex-end; font-weight: 400; }
.ol__lb .th, .g-hand .th, .g-week .th, .g-rate .th, .g-cost .th, .g-value .th, .c-cust .th { flex-direction: row-reverse; }
.ol__plan { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; white-space: nowrap; }
.ol.is-done > * { opacity: 0.55; }
.ogroup--expected .ol { grid-template-columns: minmax(280px, 1fr) 200px 200px; background: transparent; color: var(--muted); border-bottom-color: var(--sand); }
.ogroup--expected .ol__name { font-weight: 400; color: var(--ink-soft); }
a.att { display: inline-block; }
a.omark:hover { text-decoration: underline; }

/* ---------- Roasting: one working list ---------- */
.page-roasting { --bpad: 32px; --bgap: 24px; }
html[data-layout="compact"] .page-roasting { --bpad: 24px; --bgap: 16px; }
html[data-tight] .page-roasting { --bgap: 8px; }
.bt { display: flex; align-items: center; gap: var(--bgap); padding: 16px var(--bpad); }
.bt > * { flex: none; text-align: right; }
.bt .c-coffee { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; text-align: left; }
.bt .c-ord { width: 88px; } .bt .c-left { width: 96px; } .bt .c-to { width: 88px; } .bt .c-green { width: 104px; }
.bt .c-done { width: 360px; display: flex; align-items: center; gap: 16px; text-align: left; }
html[data-layout="compact"] .bt .c-ord { width: 72px; } html[data-layout="compact"] .bt .c-left { width: 88px; }
html[data-layout="compact"] .bt .c-to { width: 80px; } html[data-layout="compact"] .bt .c-green { width: 96px; }
html[data-layout="compact"] .bt .c-done { width: 312px; }
html[data-tight] .bt .c-ord { width: 64px; } html[data-tight] .bt .c-left { width: 80px; }
html[data-tight] .bt .c-to { width: 72px; } html[data-tight] .bt .c-green { width: 88px; }
html[data-tight] .bt .c-done { width: 272px; gap: 8px; }
.bt--head { padding-top: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.rc { border-bottom: 1px solid var(--line); }
.rc.is-live { background: var(--tint-soft); }
.rc > .bt { padding-top: 24px; padding-bottom: 24px; }
.rc__toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 6px; color: var(--muted); }
button.rc__toggle:hover { background: var(--page); color: var(--ink); }
.rc__toggle .chev { transform: rotate(-90deg); transition: transform var(--dur) var(--ease); }
.rc__toggle[aria-expanded="true"] .chev { transform: none; }
.coffee-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); }
.bt .c-ord { font-size: var(--body-size, 15px); color: var(--ink-soft); }
.bt .c-to { font-weight: 600; font-size: var(--heading-size, 15px); }
.bt .c-green { font-size: var(--body-size, 15px); color: var(--ink-soft); }
.bt .input-num {
  width: 80px; height: 40px; padding: 8px 12px; border: 1.5px solid var(--faint); border-radius: var(--rad, 8px); font-weight: 600; font-size: var(--heading-size, 15px);
  box-shadow: 0 1px 2px rgba(29, 28, 26, 0.06); transition: border-color var(--hover) var(--ease);
}
html[data-tight] .bt .input-num { width: 72px; }
.bt .input-num:hover { border-color: var(--teal-text); }
.bt .input-num:focus { border-color: var(--teal-dark); outline: 2px solid rgba(var(--shade-rgb), 0.18); outline-offset: 0; }
/* Batches as bins: one per batch, filled as each is logged. */
.pips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pips i { width: 16px; height: 16px; border-radius: 4px; background: var(--segment); box-shadow: inset 0 0 0 1px var(--border); }
.pips i.is-on { background: var(--teal-dark); box-shadow: none; }
.pips i.is-next { box-shadow: inset 0 0 0 2px var(--teal-text); animation: blink 1.6s ease-in-out infinite; }
.rc.is-done .pips i.is-on { background: var(--green); }
html[data-layout="compact"] .pips i, html[data-tight] .pips i { width: 12px; height: 12px; border-radius: 3px; }
html[data-tight] .pips { gap: 2px; max-width: 112px; }
.c-done .bar { width: 96px; }
.step--count { width: 40px; height: 40px; border: 1.5px solid var(--faint); border-radius: var(--rad, 8px); color: var(--ink); font-size: var(--body-size, 20px); font-weight: 500; }
.step--count:not(:disabled):hover { border-color: var(--teal-dark); color: var(--teal-dark); }
.rc.is-open .step--count[data-n="1"]:not(:disabled) { border-color: var(--teal-dark); background: var(--teal-dark); color: var(--cream); }
.rc.is-open .step--count[data-n="1"]:not(:disabled):hover { background: var(--brand-press); }
.counter .done-text { min-width: 64px; }
.rc.is-done .coffee-name, .rc.is-done .c-ord, .rc.is-done .c-to, .rc.is-done .c-green { color: var(--muted); font-weight: 500; }
.rc.is-done .coffee-name { font-weight: var(--strong, 500); }
.rc.is-done .done-text { color: var(--green); }
.rc.is-done .input-num { border-color: var(--border); box-shadow: none; color: var(--muted); }
.rc.is-done .step--count { border-color: var(--line); color: var(--muted); }
.rc.is-skipped .coffee-name { color: var(--muted); }
.rc .plan-why { margin: -12px 0 16px; padding: 0 var(--bpad) 0 calc(var(--bpad) + 32px); }
.rc__batches { padding: 0 var(--bpad) 16px calc(var(--bpad) + 32px); }
.rc__batches .plan-batches { margin: 0; border-top: 1px solid var(--line); }
.rc__foot { display: flex; justify-content: flex-end; padding-top: 8px; }
.plan-group__tag { padding: 0 8px; border-radius: var(--rad, 4px); font-size: var(--small-size, 12px); line-height: var(--small-line, 24px); background: var(--segment); color: var(--ink-soft); }
.bt--total { background: var(--tint); font-weight: 600; font-size: var(--heading-size, 15px); border-radius: 0 0 var(--rad, 12px) var(--rad, 12px); }
.bt--total > * { color: var(--ink) !important; font-weight: 600 !important; }
.roast--stock { margin-top: 24px; }
.roast .pk--section { display: flex; align-items: center; gap: 8px; padding: 16px var(--bpad); background: var(--tint); font-weight: 500; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); }
.roast .pk--section b { font-weight: 500; letter-spacing: var(--letter, 0.06em); color: var(--muted); }
.roast .pk--section span { color: var(--faint); }
.bt--stock { border-bottom: 1px solid var(--line); }
.bt--stock:last-child { border-bottom: 0; }
.bt--stock .coffee-name { font-weight: 500; font-size: var(--body-size, 15px); }
.from-stock { font-size: var(--body-size, 13px); color: var(--muted); }

/* ---------- Packing: the day, top to bottom ---------- */
.pack { display: flex; flex-direction: column; gap: 24px; }
.pack-card__title { display: flex; align-items: center; gap: 8px; width: 100%; padding: 24px 32px 16px; font-weight: 600; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); }
.pack-card__fold { padding-bottom: 24px; cursor: pointer; }
.pack-card__fold:hover { background: var(--tint-soft); }
.pack-card__fold .chev { color: var(--muted); transition: transform var(--dur) var(--ease); }
.pack-card__fold[aria-expanded="true"] .chev { transform: rotate(180deg); }
.pack-card--done .pack-card__title { color: var(--muted); }
.pk { display: flex; align-items: center; gap: 16px; padding: 16px 32px; border-top: 1px solid var(--line); }
.pk[data-order] { cursor: pointer; }
.pk[data-order]:hover { background: var(--tint-soft); }
.pk .c-cust { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pk .c-cust > b { font-weight: var(--strong, 500); font-size: var(--large-size, 16px); line-height: var(--large-line, 24px); }
.pk .c-cust > p:not(.note) { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.pk .c-cust > p.pk__addr { color: var(--ink-soft); }
.pk .c-del { width: 96px; flex: none; font-size: var(--body-size, 13px); color: var(--muted); }
.pk .c-bags { width: 168px; flex: none; display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: var(--body-size, 13px); white-space: nowrap; }
.pk .c-bags.is-done { color: var(--teal-text); }
.pk .c-slip { width: 40px; flex: none; display: flex; justify-content: center; }
.pk .c-slip img { width: var(--ctl, 28px); height: var(--ctl, 28px); }
.pk .c-slip img.printed { width: var(--ctl-in, 26px); height: var(--ctl-in, 26px); }
.pk .c-act { width: 168px; flex: none; display: flex; justify-content: flex-end; }
.pk--waiting .c-cust > b { color: var(--ink-soft); }
.pk--waiting .c-bags, .pk--out .c-bags, .pk--done .c-bags { font-weight: 400; color: var(--muted); }
.pk.is-delivered .c-cust > b { color: var(--muted); }
.pk.is-delivered .c-cust > p, .pk.is-delivered .c-del { color: var(--faint); }
html[data-tight] .pk { gap: 12px; padding-left: var(--s16, 24px); padding-right: var(--s16, 24px); }
html[data-tight] .pack-card__title { padding-left: var(--s16, 24px); padding-right: var(--s16, 24px); }
html[data-tight] .pk .c-del { width: 80px; }
html[data-tight] .pk .c-bags { width: 136px; }
html[data-tight] .pk .c-bags .bar { width: 40px; }
html[data-tight] .pk .c-act { width: 152px; }
.btn--quiet { border-color: transparent; background: none; color: var(--teal-text); }
.btn--quiet:hover:not(:disabled) { border-color: transparent; background: var(--page); }

/* ---------- order drawer: ship-by, editing, the reasons menu ---------- */
.choice { display: inline-flex; justify-self: start; align-self: center; gap: 2px; padding: 2px; border-radius: var(--rad, 8px); background: var(--segment); }
.choice button { min-width: 40px; padding: var(--mini-pad, 4px) 12px; border-radius: 6px; font-weight: 500; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); text-align: center; white-space: nowrap; }
.choice button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(29, 28, 26, 0.08); }
.choice button:disabled { color: var(--faint); cursor: default; }
.choice button[aria-pressed="true"]:disabled { color: var(--ink-soft); }
.choice button:not(:disabled):not([aria-pressed="true"]):hover { color: var(--teal-dark); background: rgba(255, 255, 255, 0.5); }
.shipby { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.details > span.shipby { font-size: var(--body-size, 13px); }
.shipby__rule { font-size: var(--body-size, 13px); color: var(--muted); }
.edit-state { margin-top: 16px; }
.edit-diff { margin-left: 8px; font-weight: 500; color: var(--teal-text); }
.row-menu { display: flex; flex-direction: column; width: 240px; padding: 8px; border-radius: var(--rad, 12px); }
.row-menu__title { padding: 4px 12px 8px; font-weight: 600; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.row-menu button { padding: 8px 12px; border-radius: var(--rad, 8px); text-align: left; font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); }
.row-menu button:hover, .row-menu button:focus-visible { background: var(--page); }

/* ---------- a date: a month to pick from ---------- */
.field--datebtn { display: inline-flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; white-space: nowrap; }
.field--datebtn svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.field--datebtn.is-empty span { color: var(--faint); }
.field--datebtn:hover { border-color: var(--faint); }
.dp { width: 296px; }
.dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp__day { height: var(--ctl, 36px); border-radius: var(--rad, 8px); font-size: var(--body-size, 13px); text-align: center; font-variant-numeric: tabular-nums; }
.dp__day:hover:not(:disabled) { background: var(--page); }
.dp__day.is-out { color: var(--faint); }
.dp__day.is-today { box-shadow: inset 0 0 0 1px var(--teal-text); }
.dp__day[aria-pressed="true"] { background: var(--teal-dark); color: var(--cream); }
.dp__day:disabled { opacity: 0.3; }
.dp__foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp__foot .link:disabled { opacity: 0.4; }

/* ---------- Settings: Products, Customers, Planning, Demo ---------- */
.back { padding-block: calc((24px - var(--body-line, 24px)) / 2); display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-bottom: -16px; font-weight: 500; font-size: var(--body-size, 13px); line-height: var(--body-line, 24px); color: var(--muted); }
.back:hover { color: var(--ink); }
.back img { width: 16px; height: 16px; opacity: 0.6; }
.st--product, .st--customer, .st--demo { display: grid; gap: 24px; align-items: center; }
.st--product { grid-template-columns: minmax(200px, 1fr) 152px 168px 144px 112px 96px; }
.st--customer { grid-template-columns: minmax(200px, 1fr) 144px 96px 136px 96px 168px; }
.st--demo { grid-template-columns: minmax(280px, 1fr) 120px 160px; }
.st--product.st--section, .st--customer.st--section { display: flex; }
html[data-tight] .st--product { gap: 16px; grid-template-columns: minmax(176px, 1fr) 136px 152px 128px 96px 80px; }
html[data-tight] .st--customer { gap: 16px; grid-template-columns: minmax(176px, 1fr) 136px 88px 128px 80px 152px; }
.st .c-name { min-width: 0; }
.st .c-sizes, .st .c-roasts, .st .c-rot, .st .c-type, .st .c-prio { color: var(--ink-soft); font-size: var(--body-size, 13px); white-space: nowrap; }
.st .c-batch { color: var(--ink-soft); font-size: var(--body-size, 13px); white-space: nowrap; }
.st .c-cust { text-align: right; font-size: var(--body-size, 13px); white-space: nowrap; }
.st--head .c-cust { display: flex; justify-content: flex-end; }
.st .c-last, .st .c-url { color: var(--muted); font-size: var(--body-size, 13px); white-space: nowrap; }
.st.is-past > * { color: var(--faint) !important; }
.st--demo.is-current { background: var(--tint-soft); box-shadow: inset 2px 0 0 var(--teal-dark); }
.st--demo:hover { background: var(--tint-soft); }
.facts > label { color: var(--muted); }
.facts .choice { justify-self: start; }
.facts .unit-row .field { width: 80px; }
.facts textarea.field { min-height: 56px; }
.chip--lg { padding: var(--mini-pad, 4px) 12px; border-radius: 6px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.chip:disabled { opacity: 0.5; cursor: default; }
.field--chip { width: 160px !important; height: var(--ctl, 28px); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card__head .field { width: 200px; color: var(--ink-soft); }
.prods--cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); column-gap: 32px; }
.prod--all { margin-top: 16px; border-bottom: 1px solid var(--border); font-weight: 500; }
.prod .omark { margin-left: 8px; }
a.prod__name:hover { text-decoration: underline; }
.switch[aria-checked="mixed"] { background: var(--faint); }
.switch[aria-checked="mixed"] i { transform: translateX(8px); }
.loss { margin-left: 8px; font-size: var(--body-size, 13px); color: var(--muted); white-space: nowrap; }
.recipe { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.recipe__row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 24px; gap: 8px; align-items: center; }
.recipe__row select.field { width: 100%; }
.recipe__row .unit-row .field { width: 72px; }
.recipe__x { width: 24px; height: 24px; border-radius: var(--rad, 4px); color: var(--faint); font-size: var(--body-size, 16px); line-height: var(--body-line, 24px); text-align: center; }
.recipe__x:hover:not(:disabled) { background: var(--page); color: var(--ink); }
.recipe__foot { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.recipe__total { margin-right: 32px; font-weight: 600; color: var(--teal-text); }
.recipe__total.is-off { color: var(--red); }
.add-line:disabled { color: var(--faint); cursor: default; }
/* A setting reads as the sentence it means. */
.say { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 40px; margin-top: 8px; font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); color: var(--ink-soft); }
.card__title + .say { margin-top: 16px; }
.say .field { width: 72px; color: var(--ink); }
.say select.field { width: 144px; }
.say .field--time { width: 128px; }
.say .switch { margin-left: auto; }
.say__help { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.roaster-grid { grid-template-columns: repeat(2, minmax(0, 480px)); }
.roaster-grid .facts { grid-template-columns: 136px minmax(0, 1fr); }
.roaster-grid .facts select.field { width: 200px; }
.table-card + .roaster-grid { margin-top: 0; }

/* ---------- Green coffee ---------- */
.gr { display: grid; align-items: center; gap: 24px; padding: 16px 24px; border-top: 1px solid var(--line); grid-template-columns: minmax(220px, 1fr) 112px 128px 80px minmax(296px, 0.9fr) 88px 96px; font-size: var(--body-size, 14px); line-height: var(--body-line, 24px); }
html[data-tight] .gr { gap: 16px; grid-template-columns: minmax(200px, 1fr) 104px 120px 72px minmax(280px, 0.9fr) 80px 88px; }
.gr > span { min-width: 0; }
.gr--head { padding-top: 16px; padding-bottom: 12px; border-top: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.gr[data-green] { cursor: pointer; }
.gr[data-green]:hover { background: var(--tint-soft); }
.gr small { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); font-weight: 400; }
.g-name b { display: block; font-weight: 500; font-size: var(--body-size, 15px); }
.g-hand, .g-week, .g-rate, .g-cost, .g-value { text-align: right; white-space: nowrap; }
.gr--head .g-hand, .gr--head .g-week, .gr--head .g-rate, .gr--head .g-cost, .gr--head .g-value { display: flex; justify-content: flex-end; }
.g-hand b { font-weight: 600; font-size: var(--heading-size, 15px); }
.g-rate, .g-cost { color: var(--ink-soft); }
.g-reach { display: flex; align-items: center; gap: 16px; }
/* How far it reaches: the bar is twelve weeks wide, the tick is the warning distance. */
.runway { position: relative; flex: none; width: 112px; height: 8px; border-radius: 4px; background: var(--segment); }
.runway i { display: block; min-width: 4px; height: 100%; border-radius: 4px; background: var(--teal-dark); }
.runway b { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--faint); }
.runway--low i { background: var(--warn); }
.runway--short i { background: var(--red); }
.runway--idle i { display: none; }
.g-reach__text b { display: block; font-weight: 500; white-space: nowrap; }
.gr--low .g-reach__text b, .g-reach__text.gr--low b { color: var(--warn); }
.gr--short .g-reach__text b, .g-reach__text.gr--short b { color: var(--red); }
.gr--idle .g-reach__text b { font-weight: 400; color: var(--faint); }
.gr--total { background: var(--tint); border-top: 0; border-radius: 0 0 var(--rad, 12px) var(--rad, 12px); font-weight: 600; }
.gstatus { display: inline-block; padding: 0 8px; border-radius: var(--rad, 4px); background: var(--chip); color: var(--teal-text); font-weight: 500; font-size: var(--small-size, 12px); line-height: var(--small-line, 24px); }
.gstatus--low { background: var(--warn-tint); color: var(--warn); }
.gstatus--short { background: var(--red-tint); color: var(--red); }
.gstatus--idle { background: var(--segment); color: var(--muted); }
.gbig__n { font-family: var(--font-display); font-weight: 600; font-size: var(--title-size, 48px); line-height: var(--title-line, 56px); color: var(--teal-dark); }
.gforms { display: grid; gap: 8px; margin-top: 24px; }
.gform { padding: 16px; border-radius: var(--rad, 8px); background: var(--page); }
.gform h3 { margin-bottom: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 16px); }
.gform__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.gform .field { width: 96px; background-color: var(--white); }
.gform .field--datebtn { width: 152px; }
.gform .btn { margin-left: auto; }
.details--form, .details--green { grid-template-columns: 120px minmax(0, 1fr); }
.details > label { font-size: var(--label-size, var(--small-size, 12px)); color: var(--muted); line-height: var(--label-line, var(--small-line, inherit)); }
.details--form .field { width: 100%; }
.details--form .unit-row .field { width: 96px; }
.ledger .led { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--body-size, 13px); line-height: var(--body-line, 24px); }
.ledger .led:last-child { border-bottom: 0; }
.led > span:first-child { color: var(--muted); }
.led b { font-weight: 500; }
.led--roast b, .led--order { color: var(--muted); }

/* ---------- Green coffee on a phone (counting at the pallet): this screen and its drawers only ---------- */
@media (max-width: 720px) {
  html[data-route="green"] body { min-width: 0; }
  html[data-route="green"] .top { gap: 16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  html[data-route="green"] .top::-webkit-scrollbar { display: none; }
  html[data-route="green"] .brand { padding-right: 0; }
  html[data-route="green"] .brand__rule, html[data-route="green"] .brand__name, html[data-route="green"] .search,
  html[data-route="green"] .clock, html[data-route="green"] .top__spacer { display: none; }
  html[data-route="green"] .toolbar { padding: 16px; }
  html[data-route="green"] .page-head { flex-wrap: wrap; gap: 16px; }
  html[data-route="green"] .page-head .title-group { flex-wrap: wrap; gap: 0 16px; }
  html[data-route="green"] .toolbar .title { font-size: var(--title-size, 28px); line-height: var(--title-line, 36px); }
  html[data-route="green"] .work--full { padding: 16px 16px 32px; }
  html[data-route="green"] .gr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name hand" "reach reach"; gap: 8px 16px; padding: 16px; }
  html[data-route="green"] .gr--head, html[data-route="green"] .g-week, html[data-route="green"] .g-rate,
  html[data-route="green"] .g-cost, html[data-route="green"] .g-value { display: none; }
  html[data-route="green"] .g-name { grid-area: name; } html[data-route="green"] .g-hand { grid-area: hand; }
  html[data-route="green"] .g-reach { grid-area: reach; }
  html[data-route="green"] .gr--total .g-reach { display: none; }
  html[data-route="green"] .drawer { width: 100%; }
  html[data-route="green"] .drawer__body { padding: 16px 16px 32px; }
  html[data-route="green"] .gbig__n { font-size: var(--title-size, 40px); line-height: var(--title-line, 48px); }
  html[data-route="green"] .gform .btn { margin-left: 0; }
  html[data-route="green"] .details--form, html[data-route="green"] .details--green { grid-template-columns: 96px minmax(0, 1fr); }
  html[data-route="green"] .ledger .led { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; }
  html[data-route="green"] .toast-wrap { bottom: 16px; padding: 0 16px; }
  html[data-route="green"] .toast .key { display: none; }
}

.bt--head > * { font-size: var(--small-size, 12px) !important; font-weight: 400 !important; color: var(--muted) !important; }
.unit-row .field, .say .field { color: var(--ink); }
.pips i.is-snapping { animation: pb-snap 0.22s cubic-bezier(0.2, 0, 0, 1); }
@media (prefers-reduced-motion: reduce) { .pips i.is-snapping { animation: none; } }

/* Every hover and pressed change eases instead of snapping (Chris's bar: 180 to 240 ms, ease-out). Zero
   specificity, so any element with its own transition keeps it. */
:where(button, a, input, select, textarea, .row, .st, .hist, .nrow, .ol, .pk, .gr, .att, .th, .field, .input-num, .step, .pchip,
  .cal__week, .dp__day, .pack-card__fold, .rc__toggle, .back, .recipe__x, .search, .icon-btn, .switch) {
  transition: background-color var(--hover) var(--ease), border-color var(--hover) var(--ease), color var(--hover) var(--ease),
    box-shadow var(--hover) var(--ease), opacity var(--hover) var(--ease);
}

/* ======================================================================================================
   Round 3 (Nov 12, 2026). Chris: "make this whole app look like it was built in-house at Shopify or Apple."
   Type scale measured from Shopify Polaris (polaris 13.9 tokens, desktop): page title 20/24 semibold, body
   13/20, table heading 12/16 at weight 550 in the secondary text colour, card heading 14/20 semibold.
   Groups are made with space and weight, not rules: a drawer section is a heading and its content with
   32 px above it, and lists inside a group sit on a soft fill instead of between lines.
   ====================================================================================================== */

/* ---------- Green coffee: positions, the lot table, cost a roasted lb ---------- */
.gpos { display: flex; flex-wrap: wrap; gap: 8px 48px; padding-top: 4px; }
.gpos__item { display: grid; gap: 2px; min-width: 0; }
.gpos__item > span { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.gpos__item > b { font-weight: 600; font-size: var(--figure-size, 20px); line-height: var(--figure-line, 28px); color: var(--ink); white-space: nowrap; }
.gpos__item > small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); white-space: nowrap; }
.gpos__item--rate { margin-left: auto; text-align: right; }

.gr { grid-template-columns: minmax(200px, 1.3fr) 96px 96px 112px 88px 72px minmax(248px, 1.2fr) 88px; gap: 16px; padding: 12px var(--s16, 20px); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
html[data-tight] .gr { grid-template-columns: minmax(176px, 1.2fr) 88px 88px 104px 80px 64px minmax(224px, 1.2fr) 80px; gap: 12px; }
.gr small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
.g-name b { font-size: var(--body-size, 13px); font-weight: 600; }
.g-hand b { font-weight: 600; }
.g-transit, .g-importer, .g-landed, .g-value { text-align: right; }
.gr--head .g-transit, .gr--head .g-importer, .gr--head .g-landed { display: flex; justify-content: flex-end; }
.g-transit .th, .g-importer .th, .g-landed .th { flex-direction: row-reverse; }
.gr .dash { font-style: normal; color: var(--faint); }
.g-reach { gap: 12px; }
.runway { width: 80px; height: 6px; border-radius: 3px; }
.runway i { border-radius: 3px; }
.g-reach__text b { font-weight: 500; }
.g-reach__text small { white-space: normal; }
.gr--group { padding: var(--s16, 20px) var(--s16, 20px) 8px; border-top: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: var(--strong, 550); color: var(--muted); }
.gr--group + .gr { border-top: 0; }
.gr--idle .g-name b { font-weight: 500; }

.gcost { margin-top: 24px; padding: var(--s16, 20px) 0 8px; }
.gcost__head { display: flex; align-items: baseline; gap: 16px; padding: 0 var(--s16, 20px) 12px; }
.gcost__head .card__title { font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.gc { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.6fr) 112px 96px 112px; gap: 16px; align-items: center; padding: var(--s8, 10px) var(--s16, 20px); border-top: 1px solid var(--line); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.gc--head { border-top: 0; padding-top: 4px; padding-bottom: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: var(--strong, 550); color: var(--muted); }
.gc .r { text-align: right; }
.gc b { font-weight: 600; }

/* The lot drawer: groups by space. */
.dgroup { margin-top: 32px; }
.dgroup > h3, .section > h3 { margin-bottom: 12px; font-weight: 600; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); color: var(--ink); }
.gpos--drawer { gap: 16px 32px; padding: 0; }
.gpos--drawer .gpos__item > b { font-size: var(--figure-size, 17px); line-height: var(--figure-line, 24px); }
.gpos--drawer .gpos__item > b.gbig__n { font-family: var(--font); font-weight: 600; font-size: var(--title-size, 28px); line-height: var(--title-line, 36px); color: var(--teal-dark); }
.gpos--drawer .gpos__item { align-content: end; }
.greach { margin-top: 16px; padding: 12px 16px; border-radius: var(--rad, 10px); background: var(--page); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.greach small { display: block; margin-top: 2px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.gland { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px; border-radius: var(--rad, 10px); background: var(--page); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.gland > span:nth-child(odd) { color: var(--muted); }
.gland > span:nth-child(even) { text-align: right; }
.gland .gland__total { padding-top: 8px; margin-top: 4px; font-weight: 600; color: var(--ink); font-size: var(--heading-size, 14px); }
.gland b.gland__total { text-align: right; }
.gland__from { margin-top: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, inherit); }
.gforms { display: grid; gap: 8px; }
.gform { padding: 16px; border-radius: var(--rad, 10px); }
.gform h3 { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; }
.gform__more { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.gform__more .unit-row { font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.gform__more .field { width: 96px; }
.details--form { gap: 12px 0; }
.details .label { font-size: var(--label-size, var(--small-size, 12px)); color: var(--muted); line-height: var(--label-line, var(--small-line, inherit)); }
.field--cur { width: 64px !important; text-transform: uppercase; }
.field--unit { width: 72px !important; }
.unit-row--price { flex-wrap: wrap; }
.drawer--green .gstatus { font-size: var(--small-size, 12px); }
@media (max-width: 720px) {
  html[data-route="green"] .gpos { gap: 16px 24px; }
  html[data-route="green"] .gpos__item--rate { margin-left: 0; text-align: left; }
  html[data-route="green"] .gr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name hand" "reach reach"; }
  html[data-route="green"] .g-transit, html[data-route="green"] .g-importer, html[data-route="green"] .g-landed { display: none; }
  html[data-route="green"] .gr--group { display: block; }
  html[data-route="green"] .gc { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-route="green"] .gc > :nth-child(2), html[data-route="green"] .gc > :nth-child(3), html[data-route="green"] .gc > :nth-child(4) { display: none; }
  html[data-route="green"] .gcost__head { flex-direction: column; gap: 4px; }
  html[data-route="green"] .gpos--drawer .gpos__item > b.gbig__n { font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); }
}
.gr.gr--head { padding-top: 12px; padding-bottom: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: var(--strong, 550); color: var(--muted); }

/* ---------- B1. Page title and the week control ---------- */
.toolbar { padding-top: var(--s16, 20px); padding-bottom: 16px; }
.page-head { min-height: 36px; }
.title, .title--week span { font-family: var(--font); font-weight: var(--strong, 650); font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); letter-spacing: var(--letter-tight, -0.012em); }
.page-head .title-group, .title-group { gap: var(--s16, 20px); }
.title__meta { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.week-nav { gap: 8px; }
.week-nav__group { display: inline-flex; align-items: stretch; height: 32px; border: 1px solid var(--border); border-radius: var(--rad, 8px); background: var(--white);
  box-shadow: 0 1px 0 rgba(29, 28, 26, 0.04); overflow: hidden; }
.week-nav__group > button { display: inline-flex; align-items: center; justify-content: center; height: 30px; border-radius: 0; }
.week-nav__group > button + button { border-left: 1px solid var(--line); }
.week-nav__group .week-nav__arrow { width: 32px; }
.week-nav__group .week-nav__arrow img { width: 14px; height: 14px; opacity: 0.75; }
.week-nav__group .week-nav__arrow:hover, .week-nav__group .week-nav__today:not(:disabled):hover { background: var(--page); }
.week-nav__today { height: 30px; margin: 0; padding: 0 12px; font-weight: var(--strong, 550); font-size: var(--body-size, 13px); color: var(--ink); background: none; border: 0; }
.week-nav__today:disabled { color: var(--muted); opacity: 1; cursor: default; }
.week-nav__title { gap: 8px; height: 32px; padding: 0 var(--s12, 10px); font-weight: var(--strong, 550); font-size: var(--body-size, 13px); line-height: var(--body-line, 32px); color: var(--ink); }
.week-nav__title .cal-ico { width: 16px; height: 16px; color: var(--muted); }
.page-head .segments button { font-size: var(--body-size, 13px); }
.settings__title { font-family: var(--font); font-weight: var(--strong, 650); font-size: var(--heading-size, 20px); line-height: var(--heading-line, 28px); letter-spacing: var(--letter, -0.01em); padding-bottom: 16px; }
.settings__nav { gap: 2px; padding: 24px 12px; }
.settings__nav a { padding: 6px 12px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; color: var(--ink-soft); }
.settings__nav a[aria-current="page"] { background: var(--page); color: var(--ink); font-weight: 600; }
.drawer h2 { font-family: var(--font); font-weight: var(--strong, 650); font-size: var(--figure-size, 22px); line-height: var(--figure-line, 28px); letter-spacing: var(--letter-tight, -0.01em); }
.drawer h2.title { font-size: var(--figure-size, 22px); line-height: var(--figure-line, 28px); }

/* ---------- B2. Tables on the Polaris scale: 13/20 body, 12/16 headings at 550, 12 px vertical padding ---------- */
.ol { min-height: var(--row, auto); padding: var(--s8, 10px) var(--s16, 20px); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); gap: var(--s16, 20px); }
.ol--head, .ol.ol--head { padding-top: var(--s8, 10px); padding-bottom: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: var(--strong, 550); color: var(--muted); }
.ol__name { font-size: var(--body-size, 13px); font-weight: 600; }
.ol__lb { font-weight: 600; }
.omark, .ol .omark { font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); }
.st { min-height: var(--row, auto); padding: var(--s8, 10px) var(--s16, 20px); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.st--head { padding: 12px var(--s16, 20px) 8px; font-weight: var(--strong, 550); line-height: var(--small-line, 20px); }
.st .c-name b { font-weight: 600; }
.st--section { padding-top: 12px; padding-bottom: 8px; background: var(--page); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); }
.st--section b { letter-spacing: var(--letter, 0); font-weight: 600; color: var(--ink-soft); }
.hist { padding: var(--s8, 10px) var(--s16, 20px); line-height: var(--body-line, 20px); }
.hist--head { padding: 8px var(--s16, 20px); font-weight: var(--strong, 550); line-height: var(--small-line, 20px); }
.card__title { font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.pk { padding: var(--s8, 12px) var(--s16, 24px); }
.pk .c-cust > b { font-size: var(--large-size, 14px); line-height: var(--large-line, 20px); font-weight: 600; }
.pack-card__title { padding: var(--s16, 20px) var(--s16, 24px) 12px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.mini-table, .rtw .mini-table td { font-size: var(--body-size, 13px); }
.rtw .mini-table th { font-size: var(--small-size, 12px); font-weight: var(--strong, 550); letter-spacing: var(--letter, 0); text-transform: none; color: var(--muted); }
.rtw .card__title { font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.rtw .mini-table tfoot td { font-size: var(--body-size, 13px); border-top-width: 1px; }
.empty { font-size: var(--body-size, 13px); }

/* ---------- B4. Roasting: a calmer list; batches fill in softly ---------- */
.bt { padding-top: 12px; padding-bottom: 12px; }
.rc > .bt { padding-top: 16px; padding-bottom: 16px; }
.bt--head { padding-top: 12px; padding-bottom: 8px; font-weight: var(--strong, 550); }
.coffee-name { font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.bt .c-ord, .bt .c-to, .bt .c-green, .bt--stock .coffee-name { font-size: var(--body-size, 13px); }
.bt .c-to { font-weight: 600; }
.bt .input-num { width: 72px; height: 32px; padding: 4px var(--s12, 10px); border: 1px solid var(--border); border-radius: var(--rad, 8px); font-weight: 500; font-size: var(--body-size, 13px); box-shadow: none; }
.step--count { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--rad, 8px); font-size: var(--body-size, 16px); }
.counter .done-text { min-width: 56px; font-size: var(--body-size, 13px); font-weight: 600; }
.rc .plan-why { font-size: var(--small-size, 12px); }
.bt--total { background: none; border-top: 1px solid var(--border); font-size: var(--body-size, 13px); }
.roast .pk--section { padding: 12px var(--bpad) 8px; background: none; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.roast .pk--section b { letter-spacing: var(--letter, 0); font-weight: 600; color: var(--ink); }
.roast--stock .bt--stock:first-of-type { border-top: 1px solid var(--line); }
.pips { gap: 4px; }
.pips i { width: 14px; height: 14px; border-radius: 4px; background: var(--segment); box-shadow: inset 0 0 0 1px var(--border);
  transition: background-color 0.42s var(--ease), box-shadow 0.42s var(--ease); }
html[data-layout="compact"] .pips i, html[data-tight] .pips i { width: 12px; height: 12px; border-radius: 3px; }
.pips i.is-next { animation: none; box-shadow: inset 0 0 0 1.5px var(--teal-text); }
/* A batch logged: the bin fills from its centre and settles, 420 ms ease-out, no bounce. A batch taken back
   drains the same way. */
.pips i.is-snapping { animation: bin-fill 0.42s var(--ease) both; }
.pips i.is-draining { animation: bin-drain 0.36s var(--ease) both; }
@keyframes bin-fill {
  from { background-color: var(--segment); box-shadow: inset 0 0 0 1px var(--border); transform: scale(0.7); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes bin-drain {
  from { background-color: var(--teal-dark); box-shadow: none; transform: scale(0.85); }
  to { transform: scale(1); }
}
.pb.is-snapping .pb__fill, .pb.is-snapping .pb__n { animation: bin-fill 0.42s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  .pips i, .pips i.is-snapping, .pips i.is-draining, .pb.is-snapping .pb__fill, .pb.is-snapping .pb__n { animation: none; transition: none; }
}

/* ---------- B3. Drawers grouped by space and weight, not lines ---------- */
.drawer__body { padding: 24px var(--s24, 28px) var(--s32, 40px); }
.drawer .section { padding: 0; margin-top: 32px; border-top: 0; }
.drawer .section h3 { margin-bottom: 12px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.drawer .sub { margin-top: 2px; }
.drawer .timeline li { font-size: var(--small-size, 12px); }
.drawer-actions { margin-top: 20px; gap: 8px; }
.lines { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.lines th { padding: 0 0 var(--s8, 6px); border-bottom: 0; font-weight: var(--strong, 550); font-size: var(--small-size, 12px); line-height: var(--small-line, inherit); }
.lines td { padding: var(--s8, 6px) 0; border-bottom: 0; }
.lines tbody tr:first-child td { padding-top: 8px; }
.lines tbody { }
.lines tfoot td { padding-top: 12px; border-top: 0; font-weight: 600; }
.lines-wrap { padding: 12px 16px; border-radius: var(--rad, 10px); background: var(--page); }
.details { gap: 12px 16px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.details > span { font-size: var(--body-size, 13px); }
.details > span:nth-child(odd):not(.shipby) { color: var(--muted); }
.details > span:nth-child(even) { color: var(--ink); }
.std-notes { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.only-box { margin-top: 12px; border-radius: var(--rad, 10px); background: var(--page); }
.std-notes, .only-box { padding: 12px 16px; border-radius: var(--rad, 10px); background: var(--page); }
.std-notes p + p { margin-top: 4px; }
.no-lines { padding: 8px 16px; border-radius: var(--rad, 10px); background: var(--page); }
.no-lines .nl.nl--head { font-size: var(--small-size, 13px); line-height: var(--small-line, inherit); }
.no-lines .nl { padding: var(--s8, 6px) 0; gap: 12px; font-size: var(--body-size, 13px); }
.nl--head { padding: 4px 0 2px !important; border-bottom: 0; font-weight: var(--strong, 550); line-height: var(--small-line, inherit); }
.nl--total { margin-top: 4px; padding-top: var(--s8, 10px) !important; border-top: 0; font-weight: 600; }
.no-lines .field { background-color: var(--white); }
.add-line { margin: 4px 0; font-size: var(--body-size, 13px); }
.drawer .meta { margin-top: 8px; }
.drawer .field { font-size: var(--body-size, 13px); }
.drawer__top { min-height: 40px; }
:root { --fill: #f8f5ef; }
.lines-wrap, .std-notes, .only-box, .no-lines, .gland, .greach, .gform { background: var(--fill); }
.drawer .details:not(.details--form):not(.details--green) { grid-template-columns: 128px minmax(0, 1fr); }

/* ---------- C. Sign in: the Desk's own entrance ---------- */
.signin-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px;
  background: radial-gradient(120% 80% at 50% 0%, #1d5254 0%, var(--teal-dark) 55%, #0f3334 100%); }
.signin-wrap { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.signin__brand { display: flex; align-items: center; gap: 12px; color: rgba(var(--cream-rgb), 0.72); font-size: 14px; line-height: 20px;
  animation: signin-in 0.6s var(--ease) both; }
.signin__brand img { height: 18px; width: auto; }
.signin__brand .brand__rule { width: 1px; height: 16px; background: rgba(var(--cream-rgb), 0.3); }
.signin { width: 100%; max-width: none; margin: 0; padding: 32px; border-radius: 16px; background: var(--white);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24), 0 2px 6px rgba(0, 0, 0, 0.08); animation: signin-in 0.6s 0.08s var(--ease) both; }
.signin h1 { margin: 0 0 24px; font-family: var(--font); font-weight: 650; font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.signin__field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--ink-soft); font-weight: 500; }
.signin .field { width: 100%; height: 40px; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.signin .field:focus { border-color: var(--teal-dark); outline: 3px solid rgba(var(--shade-rgb), 0.14); outline-offset: 0; }
.signin__field.has-err .field { border-color: var(--red); }
.signin__field.has-err .field:focus { outline-color: rgba(194, 58, 44, 0.16); }
.signin__field.has-err + .signin__err { margin-top: -10px; }
.signin__err { margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--red); animation: signin-err 0.28s var(--ease) both; }
.signin__err--form { padding: 10px 12px; border-radius: 8px; background: var(--red-tint, #fbe9e6); }
.signin__pw { position: relative; display: block; }
.signin__pw .field { padding-right: 64px; }
.signin__show { position: absolute; top: 4px; right: 4px; height: 32px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 550; color: var(--muted); }
.signin__show:hover { background: var(--page); color: var(--ink); }
.signin__go { width: 100%; height: 40px; justify-content: center; margin-top: 8px; font-size: 14px; font-weight: 550; }
.signin__go .spin { width: 14px; height: 14px; margin-right: 8px; border: 2px solid rgba(var(--cream-rgb), 0.35); border-top-color: var(--cream); border-radius: 50%; animation: spin 0.8s linear infinite; }
.signin__forgot { display: block; margin: 16px auto 0; font-size: 13px; color: var(--teal-text); }
.signin__help { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--fill); font-size: 13px; line-height: 20px; color: var(--ink-soft); text-align: center; }
@keyframes signin-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes signin-err { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .signin__brand, .signin, .signin__err { animation: none; } .signin__go .spin { animation-duration: 2.4s; } }
body:has(.signin-page) { min-width: 0; }

/* ---------- D. Settings > Connections, and Send to QuickBooks (simulated for the demo) ---------- */
.conn__note { max-width: 640px; margin: -8px 0 24px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; max-width: 960px; }
.conn { display: flex; flex-direction: column; padding: 24px; }
.conn__head { display: flex; align-items: flex-start; gap: 16px; }
.conn__mono { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: var(--rad, 10px); font-weight: var(--strong, 700); font-size: var(--heading-size, 16px); letter-spacing: var(--letter, -0.02em); color: #fff; }
.conn__mono--shopify { background: #95bf47; }
.conn__mono--qbo { background: #2ca01c; text-transform: lowercase; }
.conn__mono svg { width: 22px; height: 22px; display: block; }
.conn__mono--qbo svg { width: 24px; height: 24px; }
.conn__mono--desk { background: var(--teal-dark); color: var(--cream); font-size: var(--body-size, 14px); }
.conn__title { flex: 1; min-width: 0; }
.conn__title h2 { font-weight: var(--strong, 650); font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); }
.conn__region { margin-left: 4px; font-weight: 500; font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.conn__title p { margin-top: 2px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.conn__status { flex: none; padding: 2px 8px; border-radius: var(--rad, 999px); background: var(--segment); font-weight: var(--strong, 550); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.conn__status.is-on { background: var(--green-tint); color: var(--green); }
.conn__status.is-on::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.conn__facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 16px; margin: 20px 0 0; padding: 16px; border-radius: var(--rad, 10px); background: var(--fill); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.conn__facts dt { color: var(--muted); }
.conn__facts dd { margin: 0; color: var(--ink); }
.conn__never { margin-top: 20px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.conn__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: var(--s16, 20px); }
.conn__foot i { flex: 1; }
.demo-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s8, 6px); border: 1px dashed var(--border); border-radius: var(--rad, 4px); font-weight: var(--strong, 550); font-size: var(--small-size, 11px); color: var(--muted); letter-spacing: var(--letter, 0.02em); line-height: var(--small-line, inherit); }
.btn .spin, .btn--dark .spin { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid rgba(var(--cream-rgb), 0.35); border-top-color: var(--cream); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { background: #a93224; }
.scrim--center { z-index: 70; }
.modal { position: fixed; z-index: 71; top: 50%; left: 50%; width: min(440px, calc(100vw - 32px)); transform: translate(-50%, -50%); padding: var(--s24, 28px); border-radius: var(--rad, 16px); background: var(--white); box-shadow: 0 24px 64px rgba(var(--shade-rgb), 0.24); }
.modal.is-entering { animation: modal-in 0.32s var(--ease) both; }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .modal.is-entering { animation: none; } }
.consent__pair { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.consent__dots { display: inline-flex; gap: 4px; } .consent__dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }
.consent h2 { font-weight: var(--strong, 650); font-size: var(--large-size, 17px); line-height: var(--large-line, 24px); text-align: center; }
.consent--small h2 { text-align: left; }
.consent__acct { margin-top: 8px; font-size: var(--body-size, 13px); color: var(--muted); text-align: center; }
.consent__acct b { color: var(--ink); font-weight: 600; }
.consent__lead { margin-top: 20px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.consent--small .consent__lead { margin-top: 8px; }
.consent__list { margin: 8px 0 0; padding: 12px 16px; border-radius: var(--rad, 10px); background: var(--fill); list-style: none; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.consent__list li { position: relative; padding-left: var(--s16, 20px); }
.consent__list li + li { margin-top: 6px; }
.consent__list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 8px; height: 5px; border-left: 1.6px solid var(--green); border-bottom: 1.6px solid var(--green); transform: rotate(-45deg); }
.consent__never { margin-top: 12px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.consent__foot { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.consent__foot i { flex: 1; }

.olist--pick .ol { grid-template-columns: 20px minmax(260px, 1fr) 136px 128px 80px 88px 120px 64px; }
html[data-tight] .olist--pick .ol { grid-template-columns: 20px minmax(220px, 1fr) 128px 120px 72px 80px 112px 56px; }
.ol__pick { display: flex; align-items: center; }
.pickbox { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1.5px solid var(--border); border-radius: var(--rad, 5px); background: var(--white); color: transparent; }
.pickbox svg { width: 12px; height: 12px; }
.pickbox:hover { border-color: var(--teal-text); }
.pickbox[aria-checked="true"] { border-color: var(--teal-dark); background: var(--teal-dark); color: var(--cream); }
.ol.is-picked { background: var(--tint-soft); }
.omark--inv { background: var(--green-tint); color: var(--green); }
.bulkbar { position: fixed; z-index: 40; left: 50%; bottom: 24px; display: flex; align-items: center; gap: 16px; min-width: 360px; padding: 8px 8px 8px var(--s16, 20px); border-radius: var(--rad, 12px);
  background: var(--teal-dark); color: var(--cream); box-shadow: var(--shadow-pop); transform: translateX(-50%); animation: bulk-in 0.32s var(--ease) both; font-size: var(--body-size, 13px); }
.bulkbar i { flex: 1; }
.bulkbar .link { color: rgba(var(--cream-rgb), 0.75); font-size: var(--body-size, 13px); }
.bulkbar .btn--dark { background: var(--cream); color: var(--teal-dark); border-color: var(--cream); }
@keyframes bulk-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .bulkbar { animation: none; } }
.drawer__foot .demo-tag { align-self: center; }
.drawer__foot .grow { flex: 1; }
.inv { padding: 16px; border-radius: var(--rad, 10px); background: var(--fill); }
.inv + .inv { margin-top: 12px; }
.inv__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: var(--body-size, 14px); }
.inv__head b { font-weight: 600; }
.inv__lines { width: 100%; border-collapse: collapse; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.inv__lines td { padding: var(--s4, 3px) 0; }
.inv__lines .r { text-align: right; white-space: nowrap; padding-left: 16px; }
.inv__lines tfoot td { color: var(--muted); }
.inv__lines tfoot tr:first-child td { padding-top: var(--s8, 10px); }
.inv__lines .inv__total td { padding-top: var(--s8, 6px); color: var(--ink); font-weight: 600; }
.sent { padding: 32px 0; text-align: center; }
.sent__check { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-tint); color: var(--green); animation: sent-in 0.5s var(--ease) both; }
.sent__check svg { width: 28px; height: 28px; }
.sent h3 { margin-top: 16px; font-weight: var(--strong, 650); font-size: var(--large-size, 17px); line-height: var(--large-line, 24px); }
.sent .sub { margin-top: 4px; }
.sent__demo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
@keyframes sent-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sent__check { animation: none; } }
.settings__main .title { font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); }
.gpos--drawer { align-items: flex-end; }
.gpos--drawer { align-items: flex-start; }
.gpos--drawer .gpos__item > b, .gpos--drawer .gpos__item > b.gbig__n { font-size: var(--figure-size, 20px); line-height: var(--figure-line, 28px); }
.gpos--drawer .gpos__item > b.gbig__n { color: var(--teal-dark); }

/* ---------- Orders: Source column (round 3) ---------- */
.olist .ol:not(.ol--expected) { grid-template-columns: 48px minmax(240px, 1fr) 136px 128px 80px 88px 120px 64px; }
html[data-tight] .olist .ol:not(.ol--expected) { grid-template-columns: 44px minmax(200px, 1fr) 128px 120px 72px 80px 112px 56px; }
.olist.olist--pick .ol:not(.ol--expected) { grid-template-columns: 20px 48px minmax(220px, 1fr) 136px 128px 80px 88px 120px 64px; }
html[data-tight] .olist.olist--pick .ol:not(.ol--expected) { grid-template-columns: 20px 44px minmax(180px, 1fr) 128px 120px 72px 80px 112px 56px; }
.ol__src { display: flex; align-items: center; }
.ol__src .src { width: 16px; height: 16px; color: var(--muted); opacity: 0.85; }
.ol.is-done .ol__src .src { opacity: 1; }
.st--head .th { padding-block: var(--s4, calc(4px + (20px - var(--small-line, 20px)) / 2)); }
.ol--head .ol__src .th { font-size: var(--small-size, 12px); }

/* New customer (round 3): what is missing, said under its field, in the sign-in's error red. */
.details--form .field.is-invalid { border-color: var(--red); }
.details--form .field.is-invalid:focus { outline-color: rgba(194, 58, 44, 0.16); }
.field-err { margin: -6px 0 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--red); animation: signin-err 0.28s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .field-err { animation: none; } }

/* Account (round 3): initials at the end of the top bar, a small menu under them, the Profile drawer. */
.avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--cream); color: var(--teal-dark); font-weight: 600; font-size: var(--small-size, 11px); line-height: var(--small-line, 16px); letter-spacing: var(--letter, 0.02em); }
.acct { top: 60px; width: 240px; max-width: calc(100vw - 32px); padding: 4px; border-radius: var(--rad, 12px); }
.acct__who { display: flex; flex-direction: column; padding: 8px 12px var(--s8, 10px); margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.acct__who b { font-weight: 600; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__who span { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct button { display: block; width: 100%; padding: calc((var(--ctl, 36px) - 20px) / 2) 12px; border-radius: 6px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); text-align: left; }
.acct button:hover, .acct button:focus-visible { background: var(--tint); outline: none; }
.pf-text { align-self: center; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); overflow-wrap: anywhere; }
@media (max-width: 720px) { .drawer[aria-label="Profile"] { width: 100%; } .drawer[aria-label="Profile"] .details--form { grid-template-columns: 96px minmax(0, 1fr); } }

/* Profile photo (round 3): the round mark in three sizes, the photo row at the top of Profile. */
.avatar--md { width: 36px; height: 36px; font-size: var(--body-size, 13px); }
.avatar--lg { width: 72px; height: 72px; font-size: 24px; line-height: 32px; background: var(--teal-dark); color: var(--cream); }
.avatar--img { background: var(--segment); }
.acct__who { flex-direction: row; align-items: center; gap: 12px; }
.acct__who > div { display: flex; flex-direction: column; min-width: 0; }
.acct__who .avatar--md:not(.avatar--img) { background: var(--teal-dark); color: var(--cream); }
.pf-photo { display: flex; align-items: center; gap: var(--s16, 20px); margin-top: 24px; }
.pf-photo.is-busy .avatar--lg { opacity: 0.5; }
.pf-photo__side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pf-photo__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-photo__status { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.pf-spin { width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--teal-dark); border-radius: 50%; animation: pf-spin 0.8s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pf-spin { animation-duration: 2.4s; } }
/* On a phone (Green coffee is the phone screen) the reminders, notifications and settings fold away (their lists
   and pages are desk-sized) and the account stays pinned at the right of the bar, so Sign out is always in reach. */
@media (max-width: 720px) {
  html[data-route="green"] .top__end { position: sticky; right: 0; padding-left: 12px; height: 64px; background: var(--teal-dark); gap: 0; box-shadow: -12px 0 12px -8px var(--teal-dark); }
  html[data-route="green"] .icons, html[data-route="green"] .top__rule { display: none; }
}

/* Side panels leave as they came (round 3, Chris: "it doesn't slide away"): back out to the right, a little faster
   than they enter and easing in; the scrim fades with them. A form with unsaved changes nudges instead. */
#leaving .drawer, #leaving .scrim { pointer-events: none; }
.drawer.is-leaving { transform: translateX(100%); transition: transform 0.22s cubic-bezier(0.4, 0, 1, 1); }
.scrim.is-leaving { opacity: 0; transition: opacity 0.22s cubic-bezier(0.4, 0, 1, 1); }
.drawer.is-nudging { animation: drawer-nudge 0.18s var(--ease); }
@keyframes drawer-nudge { 40% { transform: translateX(-6px); } }
.unsaved { align-self: center; margin-right: 4px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); white-space: nowrap; animation: fade-in 0.18s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .drawer.is-leaving, .scrim.is-leaving { transition: none; }
  .drawer.is-nudging, .unsaved { animation: none; }
}

/* ---------- Round 4 (the AD call, Nov 14) ---------- */
/* Orders: a narrow column for the row menu. */
.olist .ol:not(.ol--expected) { grid-template-columns: 48px minmax(240px, 1fr) 136px 128px 80px 88px 120px 64px 32px; }
html[data-tight] .olist .ol:not(.ol--expected) { grid-template-columns: 44px minmax(200px, 1fr) 128px 120px 72px 80px 112px 56px 32px; }
.olist.olist--pick .ol:not(.ol--expected) { grid-template-columns: 20px 48px minmax(220px, 1fr) 136px 128px 80px 88px 120px 64px 32px; }
html[data-tight] .olist.olist--pick .ol:not(.ol--expected) { grid-template-columns: 20px 44px minmax(180px, 1fr) 128px 120px 72px 80px 112px 56px 32px; }
.ol__more { display: flex; justify-content: flex-end; }
.ol__menu { width: 32px; height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: background-color var(--hover) var(--ease), color var(--hover) var(--ease); }
.ol__menu svg { width: 16px; height: 16px; }
.ol__menu:hover, .ol__menu[aria-expanded="true"] { background: var(--page); color: var(--ink); }
.fix-hint b { margin-right: 4px; }

/* The demo's View as switch in the top bar. */
.viewas { display: inline-flex; align-items: center; gap: 8px; margin-right: 16px; white-space: nowrap; flex: none; font-size: var(--body-size, 13px); color: rgba(var(--cream-rgb), 0.72); }
.viewas__sel { height: 32px; padding: 0 var(--s24, 28px) 0 var(--s12, 10px); border: 1px solid rgba(var(--cream-rgb), 0.28); border-radius: var(--rad, 8px); background: rgba(var(--cream-rgb), 0.08); color: var(--cream); font: inherit; font-weight: 500; }
.viewas__sel option { color: var(--ink); }
.viewas__tag { padding: 0 var(--s8, 6px); border: 1px dashed rgba(var(--cream-rgb), 0.5); border-radius: var(--rad, 4px); font-size: var(--small-size, 11px); line-height: var(--small-line, 18px); }

/* Roasting: batches today, the roaster's main control. */
.bt-today { display: flex; align-items: center; gap: 32px; margin-bottom: 16px; padding: var(--s16, 20px) 32px; }
.bt-today__main { display: flex; flex-direction: column; gap: 8px; }
.bt-today__label { font-weight: 600; font-size: var(--body-size, 13px); line-height: var(--body-line, 16px); letter-spacing: var(--letter, 0.04em); text-transform: uppercase; color: var(--muted); }
.bt-today__ctl { display: inline-flex; align-items: center; gap: 12px; }
.step--big { width: 48px; height: 48px; border: 1.5px solid var(--faint); border-radius: var(--rad, 10px); font-size: var(--body-size, 24px); font-weight: 500; color: var(--ink); transition: border-color var(--hover) var(--ease), color var(--hover) var(--ease); }
.step--big:not(:disabled):hover { border-color: var(--teal-dark); color: var(--teal-dark); }
.bt-today__n { width: 96px; height: 56px; border: 1.5px solid var(--faint); border-radius: var(--rad, 10px); text-align: center; font-family: var(--font-display); font-weight: 600; font-size: var(--title-size, 36px); line-height: var(--title-line, 56px); color: var(--teal-dark); -moz-appearance: textfield; appearance: textfield; }
.bt-today__n::-webkit-inner-spin-button, .bt-today__n::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bt-today__n:focus { border-color: var(--teal-dark); outline: 2px solid rgba(var(--shade-rgb), 0.18); outline-offset: 0; }
.bt-today__n--read { display: inline-block; width: auto; border: 0; text-align: left; }
.bt-today__say { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bt-today__say p { font-weight: 600; font-size: var(--figure-size, 20px); line-height: var(--figure-line, 28px); color: var(--ink); }
.bt-today.is-over .bt-today__say p { color: var(--red); }
.bt-today__extra { font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--muted); }
.bt-today__end { flex: none; }

/* The big warning: full width, high contrast, plain words, with the fix. */

/* Roasting table: batches needed beside batches roasted; on hand is a number, never typed. */
.bt .c-need { width: 72px; font-size: var(--body-size, 15px); color: var(--ink-soft); }
.bt .c-left { font-size: var(--body-size, 15px); }
.bt .c-done { width: 300px; }
html[data-layout="compact"] .bt .c-need { width: 64px; } html[data-layout="compact"] .bt .c-done { width: 264px; }
html[data-tight] .bt .c-need { width: 56px; } html[data-tight] .bt .c-done { width: 232px; }
.bt--head .c-to, .bt--head .c-need, .bt--head .c-done, .bt--head .c-green, .bt--head .c-left, .bt--head .c-ord { white-space: normal; }
.counter .done-text { min-width: 32px; }

/* Weighing: optional, inline under the coffee. */
.weigh { display: flex; flex-direction: column; gap: 8px; margin: -8px var(--bpad) 16px calc(var(--bpad) + 32px); }
.weigh__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 16px; border-radius: var(--rad, 10px); background: var(--tint-soft); }
.weigh__what { display: flex; flex-direction: column; min-width: 148px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.weigh__what small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.weigh__f { display: inline-flex; align-items: center; gap: 8px; font-size: var(--body-size, 13px); color: var(--muted); }
.weigh__f .input-num { width: 88px; height: var(--ctl, 36px); padding: var(--s4, 6px) var(--s12, 10px); border: 1.5px solid var(--faint); border-radius: var(--rad, 8px); font-weight: 600; font-size: var(--heading-size, 15px); color: var(--ink); }
.weigh__opt { font-size: var(--small-size, 12px); color: var(--faint); line-height: var(--small-line, inherit); }
.pb__weigh { font-size: var(--body-size, 13px); }

/* On hand this morning, beside the day. */
.onhand__why { margin-top: 12px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.onhand__fix { margin-top: 12px; align-self: flex-start; font-weight: 500; font-size: var(--body-size, 13px); color: var(--teal-dark); text-align: left; }
.onhand__fix:hover { text-decoration: underline; }

/* Add an order to today. */
.addtoday { position: fixed; z-index: 60; width: 360px; max-height: 420px; overflow: auto; padding: 16px 0 8px; }
.pop__title { padding: 0 16px; font-weight: 600; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); }
.pop__sub { padding: 4px 16px 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.pop__empty { padding: 8px 16px 12px; font-size: var(--body-size, 13px); color: var(--muted); }
.addtoday ul { list-style: none; margin: 0; padding: 0 4px; }
.addtoday li button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: calc((var(--ctl, 36px) - 20px) / 2) 12px; border-radius: 6px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); text-align: left; }
.addtoday li button span:last-child { color: var(--muted); font-size: var(--body-size, 13px); white-space: nowrap; }
.addtoday li button:hover { background: var(--tint); }

/* Not sent, priority note, units. */
.pill-back { display: inline-flex; align-items: center; padding: var(--s8, 6px) var(--s12, 14px); border-radius: var(--rad, 999px); background: #f8e2df; color: var(--red); font-weight: 500; font-size: var(--body-size, 13px); }
.prio-set { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s8, 6px); }
.prio-set small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.unit-pick { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s8, 6px); }
.unit-pick small { font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.say--quiet { margin-top: 16px; font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.yield-note { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }

/* ---------- Round 5 ---------- */
/* Ship today: one star on every order. Outline when off, filled amber when on; 32 px hit area, 16 px mark. */
.star { flex: none; display: inline-grid; place-items: center; width: var(--ctl, 28px); height: var(--ctl, 28px); margin: calc((20px - var(--ctl, 28px)) / 2) 0 calc((20px - var(--ctl, 28px)) / 2) -6px; border-radius: 6px; color: var(--faint); cursor: pointer; transition: color var(--hover) var(--ease), background var(--hover) var(--ease); }
.star svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.star:hover:not(:disabled) { color: var(--teal-dark); background: var(--tint-soft); }
.star.is-on { color: #b7791f; }
.star.is-on svg { fill: #e9a83a; stroke: #b7791f; }
.star:disabled { cursor: default; opacity: 0.4; }
.star:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }
.star--none { width: var(--ctl, 28px); height: 1px; margin-left: -6px; }
.order-no { font-size: var(--small-size, 11px); color: var(--muted); font-weight: 500; }
.pchip .order-no { margin-left: 2px; }
.prio-set .star { margin-left: -6px; }

/* Orders today on Roasting: one row per order, star first. */
.otd-list { list-style: none; margin: 0; padding: 0; }
.otd { display: flex; align-items: center; gap: 8px; padding: var(--s8, 6px) 0; border-bottom: 1px solid var(--line); }
.otd:last-child { border-bottom: 0; }
.otd.is-star { background: linear-gradient(90deg, rgba(233, 168, 58, 0.12), transparent); }
.otd__name { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s8, 6px); text-align: left; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink); cursor: pointer; }
.otd__name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otd__name:hover > span { text-decoration: underline; }
.otd__name .mark-shopify { flex: none; width: 14px; height: 14px; color: var(--muted); }
.otd__lb { font-size: var(--body-size, 14px); font-weight: 500; }
.otoday .count { margin-left: 8px; color: var(--muted); font-weight: 500; }

/* What goes first (Settings > Planning). */
.prio { margin-bottom: 24px; max-width: 824px; }
.prio__intro { margin: 0 0 16px; max-width: 640px; font-size: var(--body-size, 15px); line-height: var(--body-line, 22px); color: var(--ink-soft); }
.prio__grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: start; }
.prio__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.prio__row { display: grid; grid-template-columns: 16px 20px minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: var(--s8, 10px) 0; border-bottom: 1px solid var(--line); background: var(--white); }
.prio__row.is-off .prio__text { opacity: 0.5; }
.prio__row.is-dragging { opacity: 0.6; background: var(--tint-soft); }
.prio__grip { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.prio__grip svg { width: 16px; height: 16px; }
.prio__n { font-size: var(--heading-size, 14px); font-weight: 600; color: var(--teal-dark); text-align: center; }
.prio__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prio__text b { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; }
.prio__text small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.prio__move { display: inline-flex; gap: 2px; }
.prio__btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--teal-text); cursor: pointer; }
.prio__btn svg { width: 16px; height: 16px; }
.prio__btn:hover:not(:disabled) { background: var(--tint-soft); }
.prio__btn:disabled { color: var(--border); cursor: default; }
.prio__btn:focus-visible { outline: 2px solid var(--teal-dark); }
.prio__preview { padding: 16px; border-radius: var(--rad, 8px); background: var(--page); position: sticky; top: 16px; }
.prio__phead { margin: 0 0 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); font-weight: 600; color: var(--teal-dark); }
.prio__plist { margin: 0; padding-left: var(--s16, 20px); font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.prio__plist li { padding: var(--s4, 3px) 0; }
.prio__plist li span { font-weight: 500; }
.prio__plist .order-no { margin-left: 4px; }
.prio__star { margin-left: 6px; font-size: var(--small-size, 11px); color: #b7791f; font-weight: 600; line-height: var(--small-line, inherit); }
.prio__pempty { margin: 0; font-size: var(--body-size, 13px); color: var(--muted); }
.prio__foot { margin-top: 16px; }
@media (max-width: 760px) { .prio__grid { grid-template-columns: 1fr; } .prio__preview { position: static; } }

/* What each customer is (Settings > Customers). */
/* The order panel's Ship today: the star and its note on one line. */
.details .prio-set { flex-direction: row; align-items: center; gap: 8px; }
/* Four delivery methods fit a narrow card by wrapping. */
.facts .choice { flex-wrap: wrap; max-width: 100%; }

/* ---------- Round 5b: When it ships (order panel) ---------- */
.when__lead { margin: -4px 0 12px; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--muted); }
.when__plan { margin: 0 0 12px; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 22px); font-weight: 600; color: var(--ink); }
.when__pick { margin-bottom: 8px; }
.choice--days button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; min-height: var(--mini, 40px); padding: var(--mini-pad, 4px) var(--s12, 10px); }
.when__miss { margin: 0 0 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--red); }
.when__star { margin-top: 12px; flex-direction: row; align-items: center; gap: 8px; }
.goes-out { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: var(--body-size, 14px); color: var(--ink); }
.link--quiet { padding-block: calc((20px - var(--small-line, 20px)) / 2); font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.link--quiet:hover { color: var(--teal-dark); }


/* ---------- round 6: the unified priority model ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The Roasting tab's mark while any day this week does not have enough coffee. */
.tab__mark { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(var(--cream-rgb), 0.9); }
.omark--edit { background: #f6e7c8; color: #7a4f0c; }
.plan-help { margin: 0 0 16px; max-width: 760px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.plan-line { margin: 16px 0 0; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.plan-line b { color: var(--ink); font-weight: 600; }
.plan-line .link { margin-left: 2px; }

/* Plan: the week board. Five columns, Monday to Friday; each order is a card on the day it is sent. */
.board { display: grid; grid-template-columns: repeat(5, minmax(184px, 1fr)); gap: 16px; align-items: start; margin-bottom: 24px; }
.bd { display: flex; flex-direction: column; gap: 8px; min-height: 240px; padding: 12px; border-radius: var(--rad, 12px); background: var(--white); border: 2px solid transparent; transition: border-color var(--hover) var(--ease), background-color var(--hover) var(--ease); }
.bd.is-today { box-shadow: inset 0 3px 0 var(--pink); }
.bd.is-past { background: var(--past); }
.bd.is-short { border-color: var(--red); }
.bd.is-drop { border-color: var(--teal-dark); background: var(--tint-soft); }
.bd__head { padding: 0 4px 8px; border-bottom: 1px solid var(--line); }
.bd__day { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: var(--body-size, 13px); color: var(--muted); }
.bd__day b { font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); color: var(--ink); font-weight: var(--strong, 650); }
.bd__today { margin-left: auto; padding: 0 var(--s8, 6px); border-radius: var(--rad, 4px); background: var(--pink-soft); color: var(--ink-soft); font-size: var(--small-size, 11px); font-weight: 600; line-height: var(--small-line, 18px); }
.bd__meta { margin: 2px 0 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.bd__cards { display: flex; flex-direction: column; gap: 8px; }
.bc { display: flex; flex-direction: column; gap: 4px; padding: var(--s8, 10px) 12px; border-radius: var(--rad, 10px); background: var(--page); border: 1px solid var(--line); cursor: pointer; text-align: left; }
.bc[draggable="true"] { cursor: grab; }
.bc:hover { border-color: var(--border); }
.bc:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 1px; }
.bc.is-star { background: #fdf3e1; border-color: #efd29b; }
.bc.is-edited:not(.is-star) { border-color: #e2c48c; }
.bc.is-done { opacity: 0.6; }
.bc.is-dragging { opacity: 0.4; }
.bc.is-lifted { box-shadow: var(--shadow-pop); }
.bc__top { display: flex; align-items: center; gap: var(--s8, 6px); min-width: 0; }
.bc__top .star { margin: -4px 0 -4px -6px; }
.bc__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; }
.bc__meta { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.bc__marks { display: flex; flex-wrap: wrap; gap: 4px; }
.bc__marks .omark { font-size: var(--small-size, 11px); line-height: var(--small-line, 18px); padding: 0 6px; }
.bc__back { align-self: flex-start; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
.bc--ghost { cursor: default; background: transparent; border: 1px dashed var(--border); color: var(--faint); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
.bc--ghost:hover { border-color: var(--border); }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(5, minmax(168px, 1fr)); overflow-x: auto; padding-bottom: 8px; } }
@media (max-width: 720px) { .board { grid-template-columns: 1fr; overflow: visible; } .bd { min-height: 0; } }

/* Not enough coffee: a notice, never a popup. On a board column it is short; on Roasting it sits above Batches today. */
.nec { border-radius: var(--rad, 10px); background: var(--red-tint); color: var(--ink); }
.nec--col { padding: var(--s8, 10px) 12px; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); }
.nec--col p { margin: 0; }
.nec--col b { color: var(--red); }
.nec__ways { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; padding: 0; list-style: none; }
.nec--page { margin-bottom: 16px; padding: var(--s16, 20px) 24px; border-left: 4px solid var(--red); }
.nec__head { margin: 0; font-weight: var(--strong, 700); font-size: var(--figure-size, 20px); line-height: var(--figure-line, 28px); color: var(--red); }
.nec__line { margin: 4px 0 0; font-size: var(--body-size, 15px); line-height: var(--body-line, 22px); }
.nec--page .nec__ways { flex-direction: column; gap: 12px; margin-top: 16px; }
.nec__way { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nec__way > small { font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--ink-soft); }
.nec__moves { flex-basis: 100%; margin: 4px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(194, 58, 44, 0.2); }
.nec__moves li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(194, 58, 44, 0.12); font-size: var(--body-size, 14px); }
.bt-today__own { display: block; margin-top: 2px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 400; color: var(--muted); }

/* The order panel's This week section. */
.when__pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.when__pick .star { margin: 0; }
.choice--days button { position: relative; }
.when__dot { position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--teal-text); }
.when__state { margin: 8px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--ink-soft); }
.when__fact { margin: 6px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--muted); }

/* Settings > Priorities. */
.prio-page { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 824px); gap: 24px; align-items: start; }
.prio-page .prio { margin-bottom: 0; }
.prio__help { margin: 0 0 16px; }
.prio__row { grid-template-columns: 16px 20px minmax(0, 1fr) auto 28px; }
.prio__row.is-locked { background: var(--page); }
.prio__row.is-locked .prio__n { color: var(--faint); }
.prio__lock { font-size: var(--small-size, 11px); font-weight: 600; letter-spacing: var(--letter, 0.04em); text-transform: uppercase; color: var(--faint); line-height: var(--small-line, inherit); }
.prio__x { font-size: var(--body-size, 18px); line-height: var(--body-line, 1); color: var(--muted); }
.prio__add { display: block; margin-top: 12px; }
.prio__add select { max-width: 280px; }
.prio__tie { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
@media (max-width: 1280px) { .prio-page { grid-template-columns: 1fr; } }

/* Settings > Customers: Customer Type and Send day columns, and Edit types in the table. */
.st--customer .c-send { font-size: var(--body-size, 13px); color: var(--ink-soft); }
.st--customer.st--edit { grid-template-columns: minmax(180px, 1fr) 380px 136px 128px 80px 152px; cursor: default; }
.st--edit .choice button { padding: 4px 8px; }
.st--edit select { width: 100%; }

/* Round 6 Mac check: the page head wraps instead of overlapping. The title, week control and dates keep the
   first row; the switch, filters and buttons drop beneath, right-aligned, when the row runs out of space. */
.page-head { flex-wrap: wrap; row-gap: 12px; }
/* The title row keeps the head's own height either way, so wrapping never nudges the week control. */
.page-head > .title-group { flex: 0 0 auto; min-height: inherit; }
.page-head > .actions { margin-left: auto; }
/* The search always reads "Search" in full: only the words after it give way. "View as" hides its label when
   the bar runs short (the select keeps its own aria-label and the Demo tag). */
.search { min-width: 104px; }
.search span.search__label { display: flex; flex: 1; min-width: 0; overflow: hidden; }
.search__label > span:first-child { flex: none; }
.search__more { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1599px) { .viewas > span:first-child { display: none; } }

/* ---------- Round 7 ---------- */
/* Neutral surfaces (Chris: the segmented colours fought the card; table highlights matched the page). One cool
   grey for tracks and highlights, clearly apart from both the white card and the warm page. */
:root { --track: #e8e7e3; --row-hover: #f0efeb; --chip-shadow: 0 1px 2px rgba(29, 28, 26, 0.12), 0 0 0 0.5px rgba(29, 28, 26, 0.06); }

/* Orders: This week and All orders, underline tabs under the title. The underline sits on the toolbar's rule. */
.toolbar.toolbar--tabs { padding-bottom: 0; gap: 16px; }
.subtabs { display: flex; gap: 24px; }
.subtab { padding: 4px 0 var(--s8, 10px); margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 500; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--muted); white-space: nowrap; transition: color var(--hover) var(--ease); }
.subtab:hover { color: var(--ink); }
.subtab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--teal-dark); transition: none; }

/* Info tip: one soft tinted box for guiding text, rounded like a card. */
.tip { display: flex; align-items: flex-start; gap: 12px; max-width: 760px; padding: 16px var(--s16, 20px); border-radius: var(--rad, 12px); background: var(--chip); color: var(--ink-soft); }
.tip__icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--teal-text); }
.tip__text { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.tip__text .link { font-weight: 500; }
.work .tip { margin-bottom: 16px; }

/* Segmented controls, one look everywhere: white chip with a soft shadow on the grey track. */
.segments, .choice { background: var(--track); }
.segments { padding: var(--s4, 3px); }
.choice { padding: var(--s4, 3px); }
.segments button, .choice button { color: var(--ink-soft); }
.segments button[aria-pressed="true"], .choice button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--chip-shadow); }
.segments .thumb { background: var(--white); box-shadow: var(--chip-shadow); }
.segments.has-thumb button[aria-pressed="true"] { box-shadow: none; }
.segments:not(.has-thumb) button:not([aria-pressed="true"]):hover,
.choice button:not(:disabled):not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
.segments button span { color: var(--muted); }

/* Settings tables: the section band and the row highlight are the grey, never the page colour. */
.st--section { background: var(--track); }
a.st:hover, .st--demo:hover, .hist:hover, .pk[data-order]:hover { background: var(--row-hover); }
.st--demo.is-current { background: var(--row-hover); }
.settings-more { margin-top: 0; }

/* Roasting: the stepper's glyphs and the numeral sit at the optical centre of their boxes. */
.step__glyph { display: block; width: 16px; height: 16px; }
.step--big .step__glyph { width: 20px; height: 20px; }
.step--count .step__glyph { width: 16px; height: 16px; }
.bt-today__n { line-height: normal; padding: var(--s8, 6px) 0 0; }
.bt-today__n--read { padding: 0; }

/* Packing cards: name, then the key status beside it; the details are in the lightbox. */
.pk__top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pk__top > b { font-weight: var(--strong, 500); font-size: var(--large-size, 16px); line-height: var(--large-line, 24px); }
/* Nov 19: a Shopify order's card carries the Shopify mark before its buyer's name. */
.pk__top > b { display: inline-flex; align-items: center; gap: var(--s8, 6px); }
.pk__status { display: inline-flex; gap: 4px; }
.lb__details { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

/* Units: label left, control right of it, the helper under the control on the same edge. */
.unit-rows { margin-top: 8px; }
.unit-set { display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 24px; row-gap: 8px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.unit-set__label { font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink); }
.unit-set__ctl { grid-column: 2; }
.unit-set__help { grid-column: 2; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.unit-note { margin-top: 16px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.unit-page { max-width: 640px; }
.unit-set__ctl { display: flex; justify-content: flex-start; }
.unit-set__ctl .choice { margin: 0; }

/* Settings > Weekly Plan (round 7c): the roastery's normal week. The Orders week board's columns and tiles (.board,
   .bd, .bc), with a lane above for customers not placed yet and one below for Any day. */
.wp-lead { margin: 4px 0 0; max-width: 760px; font-size: var(--body-size, 15px); line-height: var(--body-line, 22px); color: var(--ink-soft); }
.wp-rules { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.wp-rules li { position: relative; padding-left: var(--s12, 14px); }
.wp-rules li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--teal-text); }
.wp { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.board--plan { margin-bottom: 0; }
.bd--plan { min-height: 200px; }
.bd--plan .bd__day b { font-size: var(--heading-size, 16px); }
.bd--plan .bd__cards { flex: 1; min-height: 48px; }
.bc--plan { cursor: grab; background: var(--page); }
.bc--plan[draggable="false"] { cursor: default; }
.bc--plan.is-shopify { background: #eef3ea; border-color: #d9e4d2; }
.bc--plan.is-over { opacity: 0.62; border-style: dashed; }
.bc__n { flex: none; min-width: 16px; font-size: var(--small-size, 12px); font-weight: var(--strong, 650); color: var(--teal-text); line-height: var(--small-line, inherit); }
.bc__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.bc__add { appearance: none; -webkit-appearance: none; padding: 0; border: 0; background: none; font: inherit; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 500; color: var(--teal-text); cursor: pointer; }
.bc__add:hover, .bc__add:focus-visible { text-decoration: underline; }
.bc__drop { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
.bc--plan:not(:hover):not(:focus-within) .bc__acts { opacity: 0.0001; height: 0; overflow: hidden; }
.omark--new { margin-left: auto; padding: 0 6px; font-size: var(--small-size, 11px); line-height: var(--small-line, 18px); background: var(--pink-soft); }
/* The capacity line: where the day fills up. Tiles under it move to the next day if the day is full. */
.wp-cap { display: flex; align-items: center; gap: 8px; margin: 2px 0; font-size: var(--small-size, 11px); font-weight: 600; letter-spacing: var(--letter, 0.02em); color: var(--red); line-height: var(--small-line, inherit); }
.wp-cap::before, .wp-cap::after { content: ""; flex: 1; height: 0; border-top: 2px dashed currentColor; opacity: 0.6; }
.wp-foot { margin: 0; padding: 0 4px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.wp-foot--over { color: var(--red); }
.wp-lane { padding: 12px 16px 16px; border-radius: var(--rad, 12px); background: var(--white); border: 2px solid transparent; transition: border-color var(--hover) var(--ease), background-color var(--hover) var(--ease); }
.wp-lane.is-drop { border-color: var(--teal-dark); background: var(--tint-soft); }
.wp-lane--tray { background: var(--fill); border: 2px dashed var(--border); }
.wp-lane__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 0 4px var(--s8, 10px); }
.wp-lane__head b { font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); font-weight: var(--strong, 650); color: var(--ink); }
.wp-lane__head span { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.wp-lane__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 8px; min-height: 48px; }
.wp-lane__empty { grid-column: 1 / -1; margin: 0; padding: 12px 4px; font-size: var(--body-size, 13px); color: var(--faint); }
@media (max-width: 720px) { .wp-lane__cards { grid-template-columns: 1fr; } }
.bc--plan .bc__name { white-space: normal; overflow: visible; }
.bc--plan .bc__top { align-items: baseline; }
.wp-lane__cards:empty { min-height: 16px; }

/* Roasting, the run sheet (round 7c, direction C in the app's own colours). */
.page-run .work { display: flex; flex-direction: column; gap: 16px; }
.page-run .title-group { gap: 12px; }
.rs-tag { padding: 0 8px; border-radius: var(--rad, 4px); background: var(--segment); color: var(--ink-soft); font-size: var(--small-size, 12px); font-weight: 600; line-height: var(--small-line, 24px); }
/* The week strip: the day picker, arrows only at its ends. */
.rs-week { display: flex; align-items: stretch; gap: 8px; }
.rs-week__arrow { flex: none; display: grid; place-items: center; width: 40px; border-radius: var(--rad, 10px); border: 1px solid var(--border); background: var(--white); cursor: pointer; transition: border-color var(--hover) var(--ease); }
.rs-week__arrow:hover { border-color: var(--faint); }
.rs-week__arrow img { width: 16px; height: 16px; }
.rs-week__days { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.rs-day { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: var(--rad, 10px); border: 1px solid var(--line); background: var(--white); text-align: left; cursor: pointer; transition: background-color var(--hover) var(--ease), border-color var(--hover) var(--ease); }
.rs-day b { font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); font-weight: var(--strong, 650); color: var(--ink); }
.rs-day > span { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.rs-day:hover { border-color: var(--border); }
.rs-day.is-today { box-shadow: inset 0 3px 0 var(--pink); }
.rs-day.is-past:not([aria-pressed="true"]) { background: var(--past); }
.rs-day[aria-pressed="true"] { background: var(--teal-dark); border-color: var(--teal-dark); }
.rs-day[aria-pressed="true"] b, .rs-day[aria-pressed="true"] > span { color: var(--cream); }
/* The day's batches, numbered 1 to N. */
.rs-run { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.rs-run__b { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: var(--rad, 8px); background: var(--white); border: 1px solid var(--line); }
.rs-run__b span { font-size: var(--small-size, 11px); line-height: var(--small-line, 14px); color: var(--muted); }
.rs-run__b b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.rs-run__b.is-done { background: var(--teal-dark); border-color: var(--teal-dark); }
.rs-run__b.is-done span, .rs-run__b.is-done b { color: var(--cream); }
.rs-run__b.is-spare { background: transparent; border-style: dashed; border-color: var(--border); }
.rs-run__b.is-spare b { color: var(--faint); font-weight: 500; }
.rs-run__b.is-short { background: var(--red-tint); border-color: rgba(194, 58, 44, 0.3); }
.rs-run__b.is-short b { color: var(--red); }
/* Suggested order and Done. */
.rs-list { display: flex; flex-direction: column; gap: 8px; }
.rs-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 4px; font-size: var(--heading-size, 18px); line-height: var(--heading-line, 24px); font-weight: var(--strong, 650); }
.rs-h small { font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); font-weight: 400; color: var(--muted); }
.rs-card { border-radius: var(--rad, 12px); background: var(--white); border: 1px solid var(--line); transition: border-color var(--hover) var(--ease), box-shadow var(--hover) var(--ease); }
.rs-card.is-just { border-color: var(--teal-text); box-shadow: 0 0 0 3px var(--tint-soft); }
.rs-card__main { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 152px; align-items: center; gap: 8px var(--s16, 20px); padding: 16px var(--s16, 20px); }
.rs-card__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--chip); color: var(--teal-dark); font-size: var(--heading-size, 14px); font-weight: var(--strong, 650); }
.rs-card__check { width: 24px; height: 24px; margin: 0 4px; }
.rs-card__what { min-width: 0; }
.rs-card .coffee-name { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--large-size, 17px); line-height: var(--large-line, 24px); font-weight: var(--strong, 650); }
/* Roast levels: the level after a coffee's name on a batch, a step back in weight and colour; under the type scale at Body size (16 px at 500 is no role). */
.coffee-level { font-size: var(--body-size, inherit); line-height: var(--body-line, inherit); font-weight: 500; color: var(--muted); }
.rs-run--lvl .rs-run__b { height: 70px; }
.rs-run__b .rs-run__lvl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--tile-size, 11px); line-height: var(--tile-line, 14px); font-weight: 400; color: var(--muted); }
.rs-run__b.is-done .rs-run__lvl { color: var(--cream); opacity: 0.75; }
.rs-run__b.is-short .rs-run__lvl { color: var(--red); }
.lvl .unit-row { flex: none; }
.lvl { gap: 12px; }
.lvl input[data-level-name] { flex: 1 1 0; width: auto; min-width: 0; }
.lvl .mrow__used { width: 64px; }
.lvl input[data-level-loss] { flex: none; width: 72px; }
.rs-card__name { display: inline-flex; align-items: center; gap: var(--s8, 6px); font: inherit; color: inherit; cursor: pointer; }
.rs-card__name .chev { width: 16px; height: 16px; color: var(--muted); transition: transform var(--hover) var(--ease); }
.rs-card__name[aria-expanded="true"] .chev { transform: rotate(180deg); }
.rs-card__line { margin: 2px 0 0; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.rs-card__green { color: var(--muted); }
.rs-card__note { margin: 2px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--teal-text); }
.rs-card .coffee-sub { margin: 2px 0 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.rs-card .coffee-sub:empty { display: none; }
.rs-card__prog { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s8, 6px); margin: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--ink-soft); white-space: nowrap; }
.rs-bar { flex-wrap: nowrap; gap: var(--s4, 3px); }
.rs-bar i { width: 18px; height: 8px; border-radius: 3px; }
.rs-card__act { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.rs-roasted, .rs-undo { min-width: 136px; justify-content: center; }
.rs-undo { border-color: var(--teal-text); color: var(--teal-dark); }
.rs-card__orders { padding: 0 var(--s16, 20px) 16px 72px; }
.rs-ords { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s8, 6px) 16px; }
.rs-ord { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--line); font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); text-align: left; }
.rs-ord small { margin-left: 6px; font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.rs-ord__name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.rs-ord b { font-weight: 600; }
button.rs-ord { cursor: pointer; }
button.rs-ord:hover .rs-ord__name { color: var(--teal-dark); text-decoration: underline; }
.rs-card .weigh { margin: 0 20px 16px 72px; }
.rs-card > .plan-why { margin: 0 20px 12px 72px; }
.rs-list--done .rs-card { background: transparent; }
.rs-list--done .rs-card__main { padding: var(--s8, 10px) var(--s16, 20px); }
.rs-list--done .coffee-name { font-size: var(--body-size, 15px); }
/* Roasted today: every batch with its time, Undo on each line. */
.rs-log__list { margin: 0; padding: 0; list-style: none; }
.rs-log__line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.rs-log__line span:nth-child(2) { color: var(--muted); font-size: var(--body-size, 13px); }
.rs-log__line .link { font-size: var(--body-size, 13px); }
.rs-log__more { margin: 8px 0 0; font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.roast--stock .bt--stock { display: flex; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .rs-card__main { grid-template-columns: 32px minmax(0, 1fr) auto; } .rs-card__act { grid-column: 2 / -1; justify-content: flex-start; } }
@media (max-width: 720px) { .rs-card__main { grid-template-columns: 32px minmax(0, 1fr); } .rs-card__prog { grid-column: 2; align-items: flex-start; } .rs-card__orders, .rs-card .weigh, .rs-card > .plan-why { margin-left: 20px; padding-left: 0; } .rs-week__arrow { width: 32px; } }
.rs-bar { display: flex; width: 132px; }
.rs-bar i { flex: 1; width: auto; min-width: 6px; }

/* Round 7b. Info tips sit on the grid of what is beneath them; a tip has a Got it button. */
.tipgrid { display: block; }
.tipgrid .tip { max-width: none; align-items: center; }
.tipgrid--board { display: grid; grid-template-columns: repeat(5, minmax(184px, 1fr)); gap: 16px; }
.tipgrid--board .tip { grid-column: 1 / span 2; }
.work .tipgrid { margin-bottom: 16px; }
.work .tipgrid .tip { margin-bottom: 0; }
.tip__text { flex: 1; min-width: 0; }
.tip__ok { flex: none; margin-left: 8px; background: var(--white); }
.settings__tips { margin: 16px 12px 0; align-self: flex-start; font-size: var(--body-size, 13px); }
.settings__tips:disabled { color: var(--faint); cursor: default; text-decoration: none; }
@media (max-width: 1100px) { .tipgrid--board { grid-template-columns: minmax(0, 384px); } .tipgrid--board .tip { grid-column: 1; } }

/* Round 7b. Orders tabs as file folders: the active tab is raised and joined to the panel below, the other recessed. */
.toolbar.toolbar--tabs { padding-bottom: 0; }
.subtabs { display: flex; align-items: flex-end; gap: 4px; margin-bottom: -1px; }
.subtab { position: relative; padding: var(--s8, 7px) var(--s16, 18px) 8px; margin-top: 6px; border: 1px solid var(--sand); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--segment); color: var(--muted); font-weight: 500; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); transition: color var(--hover) var(--ease), background-color var(--hover) var(--ease); }
.subtab:hover { color: var(--ink); background: var(--sand); }
.subtab[aria-selected="true"] { z-index: 1; margin-top: 0; padding: var(--s8, 10px) var(--s24, 22px) 12px; border-bottom: 1px solid var(--page); border-color: var(--sand) var(--sand) var(--page); background: var(--page); color: var(--ink); font-weight: 600; box-shadow: 0 -3px 8px rgba(var(--shade-rgb), 0.06); }
.subtab[aria-selected="true"]:hover { background: var(--page); }
.subtab:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }

/* Round 7b. The week board (Orders, The Plan; and the Weekly Plan), polished to the run sheet's level: generous
   padding, the day name bigger with one calm line under it, a tile reads name then lb and method, softer marks. */
.board { gap: 16px; }
.bd { gap: var(--s12, 10px); padding: 16px 16px var(--s16, 18px); border-radius: var(--rad, 14px); }
.bd__head { padding: 2px 4px 12px; }
.bd__day { gap: 8px; font-size: var(--body-size, 13px); }
.bd__day b { font-size: var(--heading-size, 18px); line-height: var(--heading-line, 26px); font-weight: var(--strong, 650); letter-spacing: var(--letter, -0.01em); }
.bd__meta { margin-top: 2px; font-size: var(--small-size, 13px); line-height: var(--small-line, 18px); color: var(--muted); }
.bd__cards { gap: 8px; }
.bc { gap: 4px; padding: 12px var(--s12, 14px); border-radius: var(--rad, 10px); background: var(--page); border: 1px solid var(--line); transition: border-color var(--hover) var(--ease), box-shadow var(--hover) var(--ease); }
.bc:hover { border-color: var(--border); box-shadow: 0 2px 8px rgba(var(--shade-rgb), 0.06); }
.bc__name { font-size: var(--body-size, 15px); line-height: var(--body-line, 20px); }
.bc__meta { font-size: var(--small-size, 13px); line-height: var(--small-line, 18px); }
.bc.is-star { background: #fcf7ec; border-color: #eedfbd; }
.bc.is-edited:not(.is-star) { border-color: #e8dbc0; }
.bc .omark { background: var(--sand); color: var(--ink-soft); }
.bc .omark--late { background: var(--pink-soft); color: var(--ink-soft); }
.bd.is-short { border-color: rgba(194, 58, 44, 0.45); }
.bd.is-today { box-shadow: inset 0 3px 0 var(--pink); }
.wp-lane { border-radius: var(--rad, 14px); padding: 16px 16px var(--s16, 18px); }

/* Round 7d. Roasting matches the approved C3 run sheet still: the week strip at the top right, the result line with
   the stepper on one row, the day's batches in one row, white cards (32 padding, 16 apart) with 20 px coffee names,
   "N of M roasted" over a segmented bar, a 152 x 56 Roasted button, and a calm rail on the page colour. */
.page-run .page-head { flex-wrap: wrap; row-gap: 16px; }
.page-run .page-head .title { font-family: var(--font); font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); font-weight: 600; letter-spacing: var(--letter-tight, -0.012em); }
.page-run .work { gap: 16px; padding-right: var(--pad); }
.page-run .side--roast { background: transparent; padding: 32px var(--pad) var(--s32, 40px) 0; gap: 24px; }
html[data-tight] .page-run .work { padding-right: var(--pad-r); }
/* The week strip: a segmented control of roast days, arrows at its two ends. */
.rs-week { align-items: center; gap: 8px; }
.rs-week__arrow { width: 32px; height: 32px; border-radius: var(--rad, 8px); }
.rs-week__arrow img { width: 14px; height: 14px; }
.rs-week__days { display: flex; flex: none; gap: 4px; padding: 4px; border-radius: var(--rad, 12px); background: var(--segment); }
.rs-day { width: 88px; gap: 0; padding: 6px 12px; border: 0; border-radius: var(--rad, 8px); background: transparent; }
.rs-day:hover { background: rgba(255, 255, 255, 0.55); }
.rs-dd { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; color: var(--muted); white-space: nowrap; }
.rs-day b { font-size: var(--heading-size, 16px); line-height: var(--heading-line, 20px); font-weight: 600; color: var(--ink); }
.rs-day small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.rs-dot { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--teal-dark); vertical-align: 2px; }
.rs-day.is-today { box-shadow: none; }
.rs-day.is-past:not([aria-pressed="true"]) { background: transparent; }
.rs-day.is-past:not([aria-pressed="true"]) b { color: var(--muted); }
.rs-day[aria-pressed="true"] { background: var(--white); border: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.rs-day[aria-pressed="true"] b { color: var(--ink); }
.rs-day[aria-pressed="true"] .rs-dd, .rs-day[aria-pressed="true"] small { color: var(--muted); }
/* The day: the result line, the stepper, the numbered batches. */
.rs-top { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.page-run .bt-today { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin: 0; padding: 0; background: none; border-radius: 0; }
.page-run .bt-today__say p { font-size: var(--heading-size, 18px); line-height: var(--heading-line, 28px); font-weight: var(--strong, 400); color: var(--muted); }
.page-run .bt-today__say p b { font-weight: 600; color: var(--ink); }
.page-run .bt-today.is-over .bt-today__say p b { color: var(--red); }
.page-run .bt-today__main { flex-direction: row; align-items: center; gap: 16px; flex: none; }
.page-run .bt-today__label { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 400; letter-spacing: var(--letter, 0); text-transform: none; color: var(--muted); }
.page-run .bt-today__ctl { gap: 0; height: 48px; border: 1px solid var(--border); border-radius: var(--rad, 12px); overflow: hidden; background: var(--white); }
.page-run .step--big { width: 48px; height: 46px; border: 0; border-radius: 0; background: var(--white); font-size: var(--figure-size, 20px); }
.page-run .step--big:not(:disabled):hover { background: var(--page); }
.page-run .bt-today__n { width: 64px; height: 46px; padding: 0; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0; font-family: var(--font); font-size: var(--figure-size, 22px); line-height: var(--figure-line, 46px); color: var(--ink); }
.page-run .bt-today__n:focus { outline: 2px solid rgba(var(--shade-rgb), 0.18); outline-offset: -2px; }
.page-run .bt-today__n--read { border: 0; padding: 0 8px; }
.rs-run { grid-template-columns: repeat(var(--n, 15), minmax(0, 1fr)); gap: 4px; }
.rs-run__b { justify-content: space-between; height: 56px; gap: 0; padding: 6px 8px; border: 0; border-radius: var(--rad, 8px); background: var(--sand); }
.rs-run__b span { font-size: var(--body-size, 13px); line-height: var(--body-line, 16px); font-weight: 600; color: var(--ink); }
.rs-run__b b { font-size: 11px; line-height: 14px; font-weight: 400; color: var(--muted); }
.rs-run__b.is-done { background: var(--teal-dark); }
.rs-run__b.is-done span { color: var(--cream); }
.rs-run__b.is-done b { color: var(--cream); opacity: 0.75; }
.rs-run__b.is-spare { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border); }
.rs-run__b.is-spare b { color: var(--muted); font-weight: 400; }
.rs-run__b.is-short { background: transparent; box-shadow: inset 0 0 0 2px var(--red); }
.rs-run__b.is-short span, .rs-run__b.is-short b { color: var(--red); }
/* Headings and cards. */
.rs-list { gap: 16px; }
.rs-h { align-items: center; justify-content: space-between; margin: 8px 0 0; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); font-weight: 600; letter-spacing: var(--letter, -0.005em); }
.rs-h small { flex-basis: 100%; }
.rs-list--done { margin-top: 16px; }
.rs-card { display: flex; flex-direction: column; gap: 24px; padding: 32px; border: 0; border-radius: var(--rad, 16px); }
.rs-card.is-just { box-shadow: 0 0 0 3px var(--tint-soft); }
.rs-card__main { grid-template-columns: 32px minmax(0, 1fr) 276px 152px; gap: 24px; padding: 0; }
.rs-card__n { background: var(--segment); color: var(--teal-text); font-size: var(--heading-size, 14px); font-weight: 600; }
.rs-card__check { margin: 0; background: var(--teal-dark); color: var(--cream); }
.rs-card__check svg { width: 18px; height: 18px; }
.rs-card__what { position: relative; display: flex; flex-direction: column; gap: 8px; padding-left: 48px; }
.rs-card .coffee-name { font-size: var(--large-size, 20px); line-height: var(--large-line, 28px); font-weight: 600; letter-spacing: var(--letter, -0.01em); }
.rs-card__name { gap: 0; }
.rs-card__name .chev { position: absolute; left: 0; top: 50%; margin-top: -8px; transform: rotate(-90deg); }
.rs-card__name[aria-expanded="true"] .chev { transform: none; }
.rs-card__line { margin: 0; font-size: var(--body-size, 15px); line-height: var(--body-line, 20px); color: var(--muted); }
.rs-card__note { align-self: flex-start; margin: 0; padding: 2px var(--s12, 10px); border-radius: 6px; background: var(--segment); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); color: var(--teal-text); white-space: nowrap; }
.rs-card .coffee-sub { margin: 0; }
.rs-card__prog { align-items: flex-start; gap: 8px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--muted); }
.rs-card__cnt b { font-weight: 600; color: var(--ink); }
.rs-bar { width: auto; max-width: 100%; gap: 4px; }
.rs-bar i { flex: 0 1 36px; width: 36px; min-width: 8px; height: 14px; border-radius: 4px; background: var(--sand); box-shadow: none; }
.rs-bar i.is-on, .rc.is-done .rs-bar i.is-on { background: var(--teal-dark); }
.rs-bar i.is-just { background: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.rs-roasted, .rs-undo { width: 152px; min-width: 0; height: 56px; justify-content: center; gap: 8px; border-radius: 12px; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); font-weight: 600; }
.rs-roasted::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3.2 3L14 5.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3.2 3L14 5.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.rs-undo { border: 1px solid var(--border); background: var(--white); color: var(--ink); font-weight: 500; font-size: var(--body-size, 14px); }
.rs-undo::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--teal-dark) 0 70%, var(--sand) 70% 100%); }
.rs-card__act .btn--small { height: 40px; }
/* A card's orders: an inset panel on the page colour, two columns. */
.rs-card__orders { margin: 0 0 0 80px; padding: 0; }
.rs-ords { gap: 0 48px; grid-template-columns: 1fr 1fr; padding: 8px 24px; border-radius: var(--rad, 12px); background: var(--page); }
.rs-ord { padding: 8px 0; border: 0; background: none; box-shadow: none; font-size: var(--body-size, 14px); }
.rs-ord small { font-size: var(--small-size, 12px); line-height: var(--small-line, inherit); }
.rs-ord b { font-weight: 400; }
.rs-card .weigh, .rs-card > .plan-why { margin: 0 0 0 80px; }
.rs-card__orders .rc__foot { margin: 12px 0 0; }
/* Done: outlined, quieter. */
.rs-list--done .rs-card { padding: 24px 32px; background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.rs-list--done .rs-card__main { padding: 0; }
.rs-list--done .coffee-name { font-size: var(--figure-size, 20px); color: var(--muted); }
.rs-list--done .rs-card__name { color: var(--muted); }
/* The rail: white cards on the page colour; Roasted today lines with a bordered Undo. */
.page-run .side--roast .card { border-radius: var(--rad, 24px); padding: var(--s24, 28px) 32px; }
.page-run .side--roast .card__title { font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); font-weight: 600; letter-spacing: var(--letter, -0.005em); margin-bottom: 12px; }
.rs-log__list { display: flex; flex-direction: column; gap: 4px; }
.rs-log__line { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: var(--s8, 6px) 0; border: 0; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.rs-log__line span:first-child { font-weight: 500; }
.rs-log__line span:nth-child(2) { font-size: var(--body-size, 14px); color: var(--muted); }
.rs-log__undo { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--rad, 8px); background: var(--white); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color var(--hover) var(--ease); }
.rs-log__undo:hover { border-color: var(--faint); }
.page-run .roast--stock { border-radius: var(--rad, 16px); }
@media (max-width: 1360px) { .rs-card__main { grid-template-columns: 32px minmax(0, 1fr) 200px 152px; } }
@media (max-width: 1100px) { .rs-card__main { grid-template-columns: 32px minmax(0, 1fr) auto; } .rs-card__act { grid-column: 2 / -1; justify-content: flex-start; } .rs-run { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); } }
@media (max-width: 720px) {
  .page-run .bt-today { flex-direction: column; align-items: flex-start; gap: 16px; }
  .page-run .bt-today__main { flex-wrap: wrap; }
  .rs-card { padding: 24px; }
  .rs-card__main { grid-template-columns: 32px minmax(0, 1fr); gap: 16px; }
  .rs-card__what { padding-left: 32px; }
  .rs-card__orders, .rs-card .weigh, .rs-card > .plan-why { margin-left: 0; }
  .rs-ords { grid-template-columns: 1fr; }
  .rs-week__days { flex: 1; min-width: 0; overflow-x: auto; }
  .rs-day { width: auto; flex: 1; min-width: 64px; padding: 6px 8px; }
}
@media (min-width: 1360px) { .page-run .side--roast { width: calc(400px + var(--pad)); } }
.page-run .rs-card .rs-bar i { flex: 0 1 36px; width: 36px; min-width: 8px; height: 14px; border-radius: 4px; }
.rs-card__cnt .done-text, .rs-card__cnt .done-text.is-done { color: inherit; }
.rs-top { margin-bottom: 40px; }
.rs-log__line span:first-child { min-width: 0; }
.rs-card__what .rs-card__green { margin: -4px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 18px); color: var(--faint); }
.rs-card > .plan-why { margin: -8px 0 0 104px; }
@media (max-width: 720px) { .rs-card > .plan-why { margin-left: 0; } }
html .page-run .toolbar .title { font-family: var(--font); font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); font-weight: 600; letter-spacing: var(--letter-tight, -0.012em); }
.rc.rs-card > .plan-why { margin: -8px 0 0 104px; padding: 0; font-size: var(--body-size, 13px); }
@media (max-width: 720px) {
  .rc.rs-card > .plan-why { margin-left: 0; }
  .page-run .bt-today__main { flex-wrap: wrap; gap: 8px 16px; }
  .page-run .bt-today__label { flex-basis: 100%; }
  .page-run .rs-week { width: 100%; }
  .rs-h { flex-wrap: wrap; gap: 8px; }
}
.page-run .bt-today__say { flex: 1 1 auto; min-width: 0; }
.page-run .bt-today__label { max-width: 176px; text-align: right; }
@media (max-width: 720px) {
  .page-run .bt-today__label { max-width: none; text-align: left; }
  .page-run .page-head > .rs-week { width: 100%; min-width: 0; }
  .page-run .rs-week__days { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); flex: 1 1 0; min-width: 0; overflow: hidden; }
  .page-run .rs-day { width: auto; min-width: 0; }
}

/* ==========================================================================================================
   Round 8 build (Nov 17, 2026): the signed-off design in the app's own styles. Design A refined (near-white page,
   white cards held by a hairline and a soft shadow, the 16/40 rhythm, one 6 px radius, no pills), then Chris's
   round 8, 9 and 10 comments (feedback-2026-11-17/ROUND-8, 9 and 10-REVIEW.md). Tokens from Design notes v3
   (Figma 113:268). Where an earlier rule in this file says otherwise, this section is the one that holds.
   ========================================================================================================== */
:root {
  --page: #f6f5f3; --sand: #f6f5f3; --segment: #f2f1ef; --line: #e3e3e1; --line-soft: #ededeb;
  --border: #d4d4d0; --past: #efeeec; --chip-n: #eeeeec; --fill-n: #f6f6f4; --card-in: #f7f7f6; --thead: #f7f7f6;
  --info: #eef4f3; --tint: #dce6e5; --tint-soft: rgba(var(--shade-rgb), 0.05); --ink-soft: #4a4a47; --muted: #6e6e69;
  --faint: #a6a6a0; --work: #fbfbfa; --side-bg: #f6f5f3; --nav-on: #ecebe8; --star: #e2a12b;
  --card-shadow: 0 0 0 1px #e3e3e1, 0 1px 2px rgba(26, 26, 26, 0.05);
  --r: 6px;
  /* No pink: today is the teal dot (round 3b, round 10). */
  --pink: transparent; --pink-soft: transparent;
}

/* Surfaces. The work area is #FBFBFA on every screen, Settings included; side panels and the Settings nav a step
   darker. The page floor is the 1024 tablet (round 8 proposal, Chris: "YES"). */
body { min-width: 1024px; background: var(--work); }
.main, #page { background: var(--work); }
.side { background: var(--side-bg); border-left: 1px solid var(--line); gap: var(--s16, 20px); padding: 32px 24px; }
.page-run .side--roast { background: var(--side-bg); padding: 32px 24px var(--s32, 40px); gap: var(--s16, 20px); }
.toolbar { background: var(--white); border-bottom: 1px solid var(--line); padding-top: 24px; padding-bottom: var(--s16, 20px); }
.toolbar.toolbar--tabs { padding-bottom: 0; }
.work { padding-top: 32px; }
/* The demo's View as switch is not part of the product's face; the demo states are in Settings > Demo. */
.viewas { display: none; }

/* Type: League Spartan 600 on page titles only, 28/36. */
.title, .title--week span, html .page-run .toolbar .title, .page-run .page-head .title { font-family: var(--font-display); font-weight: 600; font-size: var(--title-size, 28px); line-height: var(--title-line, 36px); letter-spacing: var(--letter-tight, -0.005em); }

/* Cards: white, a hairline and a soft 2 px shadow instead of a border. One radius, 6 px, on every rounded thing;
   the round Roasted button is the one exception. */
.card, .rs-card, .bd, .wp-lane, .rs-week__arrow { border: 0; border-radius: var(--r); box-shadow: var(--card-shadow); }
.card--pad { padding: var(--card-pad, 24px); }
.card__title { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: var(--strong, 650); }
.count { background: var(--chip-n); color: var(--ink-soft); font-weight: var(--strong, 550); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); padding: 0 8px; border-radius: var(--r); }
.card, .rs-card, .rc, .bd, .bc, .wp-lane, .rs-day, .rs-week__arrow, .rs-run__b, .tip, .btn, .step, .icon-btn, .tab, .search, .star,
.week-nav__title, .week-nav__group, .segments, .segments button, .thumb, .bt-today__n, .input-num, .field, input, select, button, .count,
.omark, .key, .badge, .rs-card__n, .weigh, .settings__nav a, .ogroup, .plan-group__tag, .pack-card, .att, .tag, .lightbox, .drawer,
.pop, .palette, .choice, .choice button, .switch, .stepper, .rs-tag, .r-cap, .bd__cap, .note, .lb__total, .rs-ords, .toast {
  border-radius: var(--r) !important;
}
.subtab[aria-selected="true"], .subtab, .pips i, .bar, .bar i { border-radius: 0 !important; }
.rs-roasted, .today-dot { border-radius: 50% !important; }
.avatar { border-radius: var(--r) !important; }

/* Hairlines over boxes: list rows 1 px #EDEDEB, table totals 1 px ink. */
.mini-table th { border-bottom: 1px solid var(--line); font-weight: var(--strong, 550); padding: 8px 0; }
.mini-table td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table tfoot td { border-top: 1px solid var(--ink); padding-top: 12px; }
.otd { border-bottom: 1px solid var(--line-soft); padding: 8px 0; }

/* Buttons: secondary white with a #D4D4D0 edge and a 1 px drop; primary teal with a darker bottom edge. */
.btn { border-color: var(--border); box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06); font-weight: var(--strong, 550); background: var(--white); }
.btn--dark { background: var(--teal-dark); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(26, 26, 26, 0.08); }
.key { background: var(--chip-n); }
.btn--dark .key { background: rgba(255, 255, 255, 0.16); }
.key--dark, .search .key { background: rgba(var(--cream-rgb), 0.14); color: rgba(var(--cream-rgb), 0.85); }

/* Focus on a field: a 1 px teal edge and a soft 3 px halo at 12 %, never a loud ring (round 8 review 48). */
.field:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-text); box-shadow: 0 0 0 3px rgba(var(--shade-rgb), 0.12); }

/* Tips: #EEF4F3, no border. */
.tip { background: var(--info); border: 0; padding: 16px var(--s16, 20px); }
.tip__ok { background: var(--white); }

/* Tabs: a quiet underline; the selected tab in ink at 650 with a 2 px teal line. */
.subtabs { gap: 0; margin-bottom: 0; }
.subtab, .subtab:hover { background: transparent; border: 0; box-shadow: none; padding: var(--s8, 10px) 4px 12px; margin: 0 24px 0 0; color: var(--muted); font-weight: 500; }
.subtab:hover { color: var(--ink); }
.subtab[aria-selected="true"], .subtab[aria-selected="true"]:hover { z-index: auto; margin: 0 24px 0 0; padding: var(--s8, 10px) 4px 12px; border: 0; background: transparent; color: var(--ink); font-weight: var(--strong, 650); box-shadow: inset 0 -2px 0 var(--teal-dark); }

/* Today (round 10): a 6 px teal dot before the day name, on the Plan board, the Roasting week strip and the Packing
   day strip. The plan day in an order's day picker uses the same dot. */
.today-dot { display: inline-block; flex: none; width: 6px; height: 6px; margin-right: 8px; background: var(--teal-dark); vertical-align: middle; position: relative; top: -2px; }
.rs-day .today-dot { margin-right: 0; top: 0; }
.segments button .today-dot { align-self: center; margin-right: 0; top: 0; }
.segments button.is-today::after { content: none; }
.rs-dot, .bd__today { display: none; }
.bd.is-today, .rs-day.is-today { box-shadow: var(--card-shadow); }

/* ---------- Orders: the Plan board ---------- */
.board { gap: 16px; }
.bd, .bd.is-past { background: var(--white); padding: var(--card-pad, 20px) 16px; }
.bd__head { border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; padding: 2px 4px 12px; }
.bd__day { display: flex; align-items: baseline; gap: 8px; }
.bd__day b { display: inline-flex; align-items: center; font-weight: var(--strong, 700); }
.bd__day b .today-dot { top: 0; }
/* The day's orders and pounds, then its batches as a small count on the right (round 8 review 3). */
.bd__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: var(--small-size, 13px); color: var(--ink-soft); }
.bd__cap { flex: none; margin-left: auto; padding: 0 8px; background: var(--chip-n); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); font-weight: var(--strong, 550); color: var(--ink-soft); white-space: nowrap; }
.bd__cards { gap: 8px; }
/* Order cards: white, two lines, a hairline (round 8 reviews 4 to 6); Shopify white too (round 10). */
.bc, .bc.is-done, .bc.is-shopify, .bc--plan.is-shopify { gap: var(--s4, 6px); padding: var(--s8, 12px) var(--s12, 14px); background: var(--white); border: 1px solid var(--line); box-shadow: none; }
.bc .bc__meta { color: var(--ink-soft); }
.bc .omark { background: var(--chip-n); }
/* The star: solid, no outline; grey when off, amber when on. */
.star svg { fill: #d9d9d5; stroke: none; }
.star.is-on svg, .star[aria-pressed="true"] svg { fill: var(--star); stroke: none; }
.star:disabled svg { fill: #e6e6e3; }
.star:disabled { opacity: 1; }

/* ---------- Orders: the Plan board's Online orders group (src/data/online-group.js) ---------- */
.og { display: flex; flex-direction: column; gap: 8px; }
.og__head { width: 100%; min-height: 44px; font: inherit; color: inherit; cursor: pointer; }
.og__head .bc__name { flex: 1; }
.og__head .chev { color: var(--muted); transition: transform var(--hover) var(--ease); }
.og.is-open .og__head .chev { transform: rotate(180deg); }
.omark--star { background: #fcf1d9 !important; color: #5f3d05; }
.og__list { display: flex; flex-direction: column; gap: 8px; padding-left: 8px; border-left: 2px solid var(--line); }
.og__list[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .og__head .chev { transition: none; } }
/* A printed week lists every order in the day's own order, open or closed, as without the group. */
@media print {
  .og__head { display: none !important; }
  .og, .og__list, .og__list[hidden] { display: contents; }
  .og__list .bc, .bd__cards:has(.og) > .bc { order: var(--n); }
  .bd__cards:has(.og) > .bc--ghost { order: 999; }
}

/* ---------- Orders: All Orders, one header style, the columns pack toward lb (round 10 review 4) ---------- */
.st--head, .ol--head, .mini-table thead th { background: var(--thead); }
.st--head, .ol--head { border-bottom: 1px solid var(--line); }
.olist .ol:not(.ol--expected) { grid-template-columns: 48px minmax(260px, 1fr) 128px 88px 80px 88px 120px 64px; }
.olist.olist--pick .ol:not(.ol--expected) { grid-template-columns: 20px 48px minmax(220px, 1fr) 128px 88px 80px 88px 120px 64px; }
html[data-tight] .olist .ol:not(.ol--expected) { grid-template-columns: 40px minmax(200px, 1fr) 120px 80px 72px 80px 112px 56px; gap: 16px; }
html[data-tight] .olist.olist--pick .ol:not(.ol--expected) { grid-template-columns: 20px 40px minmax(180px, 1fr) 120px 80px 72px 80px 112px 56px; gap: 16px; }
.ogroup--expected { margin-top: 40px; background: var(--white); border-radius: var(--r); box-shadow: var(--card-shadow); padding: 16px 24px 8px; }
.ogroup--expected .ol { border-bottom: 1px solid var(--line-soft); padding: 16px 0; }
.ogroup--expected .ol:last-child { border-bottom: 0; }

/* ---------- Order details (round 8 reviews 15 to 19, round 10) ---------- */
.drawer__heading { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: var(--strong, 650); color: var(--ink); align-self: center; }
.drawer .sub .order-no { font-size: inherit; line-height: var(--body-line, 16px); color: inherit; font-weight: inherit; }
.drawer__top + h2, .drawer__body > h2:first-of-type { margin-top: 16px; }
.drawer__foot { border-top: 0; box-shadow: none; }
.when__plan { margin: 0 0 16px; }
.when__pick { margin-bottom: 0; }
.when__state { margin-top: 24px; }
.when__pick .choice--days button { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; }
.when__dot { position: static; width: 6px; height: 6px; margin: 0 6px 0 0; }
/* Roast and Fulfill (Andie, Nov 26; flag sendDayLate). Round 2 (Chris: "make it cleaner"): one grid, label, star,
   days; every day cell the same width in both pickers, so Mon to Thu sit in the same columns. The scale from the
   Nov 25 audit: the segment group 32 high by mouse (cells 24), 48 by touch (cells 40); the star 32, 48 by touch. */
.when--out .when__grid { display: grid; grid-template-columns: max-content 32px max-content; justify-content: start; align-items: center; gap: 8px; }
.when--out .when__pick, .when--out .when__pick.shipby { display: contents; }
.when__label { padding-right: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; color: var(--ink-soft); }
.when--out .star { width: 32px; height: 32px; margin: 0; }
.when__nostar { width: 32px; }
.when--out .choice { height: 32px; padding: 4px; gap: 4px; border-radius: 8px; }
.drawer .when--out .choice--days button { width: 52px; min-width: 0; height: 24px; min-height: 0; padding: 0; border-radius: 4px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.when--out .when__dot { margin-right: 4px; }
.when--out .when__fact { margin-top: 16px; color: var(--muted); }
.when--out .when__state { margin-top: 16px; }
.when--out .when__miss { margin: 16px 0 0; }
@media (any-pointer: coarse) {
  .when--out .when__grid { grid-template-columns: max-content 48px max-content; }
  .when--out .star, .when__nostar { width: 48px; height: 48px; }
  .when--out .choice { height: 48px; }
  .drawer .when--out .choice--days button { width: 64px; height: 40px; font-size: var(--body-size, 14px); }
}
.attention--panel { margin: 12px 0 4px; }
/* New order: the customer, typed to find (round 8 review 21). */
.custfind { position: relative; }
.custfind__input { width: 100%; height: var(--ctl, 40px); }
.custfind__list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--ctl, 40px) + 4px); max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); }
.custfind__list li { padding: 8px 12px; border-radius: var(--r); font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); cursor: pointer; }
.custfind__list li[aria-selected="true"], .custfind__list li[role="option"]:hover { background: var(--tint); }
.custfind__none { color: var(--muted); cursor: default; }

/* ---------- Search: round 9's field (round 10 review: "I like the old one better") ---------- */
.palette { box-shadow: 0 0 0 1px var(--line), 0 16px 48px rgba(var(--shade-rgb), 0.18); }
.palette input[type="search"] { background: var(--white); color: var(--ink); font-size: var(--body-size, 16px); border: 0; border-bottom: 1px solid var(--line); box-shadow: none; }
.palette input[type="search"]:focus { border-bottom-color: var(--line); box-shadow: none; }
.palette input[type="search"]::placeholder { color: var(--muted); }

/* ---------- Expected orders: the customer and Remind, a red alert mark (round 8 review 25, round 10) ---------- */
.reminders .exp { align-items: center; }
.reminders .exp b { display: inline-flex; align-items: center; gap: 8px; }
.alert-mark { flex: none; width: 16px; height: 16px; color: var(--red); }

/* ---------- The stepper (round 8, Chris: "make this one UI element look prettier") ---------- */
.stepper { display: inline-flex; align-items: center; flex: none; height: var(--step, var(--ctl, 40px)); padding: 0; border: 1px solid var(--border); border-radius: var(--r); background: var(--white); box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04); transition: border-color var(--hover) var(--ease), box-shadow var(--hover) var(--ease); }
.stepper:focus-within { border-color: var(--teal-text); box-shadow: 0 0 0 3px rgba(var(--shade-rgb), 0.12); }
.stepper__btn { display: grid; place-items: center; width: var(--step-in, var(--ctl-in, 38px)); height: var(--step-in, var(--ctl-in, 38px)); padding: 0; border: 0; border-radius: var(--r); background: transparent; color: var(--ink-soft); cursor: pointer; transition: background-color var(--hover) var(--ease), color var(--hover) var(--ease); }
.stepper__btn .step__glyph { width: 16px; height: 16px; }
.stepper__btn:not(:disabled):hover { background: var(--tint-soft); color: var(--teal-dark); }
.stepper__btn:not(:disabled):active { background: rgba(var(--shade-rgb), 0.1); }
.stepper__btn:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: -2px; }
.stepper__btn:disabled { color: var(--faint); opacity: 0.55; cursor: default; }
.stepper__val { display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; min-width: 40px; padding: 0 4px; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); font-weight: 600; color: var(--ink); white-space: nowrap; }
.stepper__val b { font-weight: 600; }
.stepper__val span { font-weight: 400; color: var(--muted); }
.stepper__input { width: 44px; height: var(--step-in, var(--ctl-in, 38px)); padding: 0; border: 0; background: transparent; text-align: center; font: inherit; color: inherit; -moz-appearance: textfield; appearance: textfield; cursor: text; }
.stepper__input::-webkit-inner-spin-button, .stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input:focus { border: 0; box-shadow: none; outline: none; }
.stepper--lg .stepper__val { font-size: var(--heading-size, 18px); line-height: var(--heading-line, 24px); min-width: 48px; }
.stepper--lg .stepper__input { width: 48px; }
.nl .c-q { width: 128px; }
.nl .c-q .stepper { height: var(--ctl, 36px); }
.nl .c-q .stepper__btn { width: var(--ctl-in, 34px); height: var(--ctl-in, 34px); }
.nl .c-q .stepper__val { padding: 0; }
.nl .c-q .stepper__input { height: var(--ctl-in, 34px); }
/* On touch the line's quantity is 44 px in every direction; 16 px type so iOS does not zoom into the field. */
@media (any-pointer: coarse) {
  .nl .c-q { width: 136px; }
  .nl .c-q .stepper { height: var(--step, 46px); }
  .nl .c-q .stepper__btn { width: var(--step-in, 44px); height: var(--step-in, 44px); }
  .nl .c-q .stepper__input { width: 44px; height: var(--step-in, 44px); font-size: var(--large-size, 16px); }
  .nl button.c-x::after { width: 44px; height: 44px; }
}

/* ---------- Roasting ---------- */
/* The week strip: a segmented control; the picked day white. */
.rs-week__days { background: var(--segment); border-radius: var(--r); padding: 4px; gap: 4px; }
.rs-day, .rs-day.is-today, .rs-day.is-past:not([aria-pressed="true"]) { background: transparent; box-shadow: none; padding: var(--s4, 6px) 12px; }
.rs-day[aria-pressed="true"], .rs-day.is-today[aria-pressed="true"] { background: var(--white); box-shadow: var(--card-shadow); }
.rs-dd { display: inline-flex; align-items: center; gap: 4px; }
.rs-week__arrow { width: 32px; height: 32px; background: var(--white); }
/* Today's Roast Batches: one card; the title and the stepper on one line, the batches, one quiet line. */
.rs-top { margin-bottom: 0; gap: 0; }
.page-run .bt-today.rb-card { display: flex; flex-direction: column; align-items: stretch; gap: var(--s16, 24px); padding: var(--card-pad, 24px); background: var(--white); border-radius: var(--r); box-shadow: var(--card-shadow); }
.rb-card__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; }
.rb-card__title { margin: 0; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); font-weight: var(--strong, 700); }
.page-run .rb-card .bt-today__main { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.page-run .rb-card .bt-today__label { max-width: none; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); text-align: right; white-space: nowrap; }
.page-run .rb-card .bt-today__n--read { width: auto; height: auto; padding: 0 12px 0 0; border: 0; font-family: var(--font); font-size: var(--heading-size, 18px); line-height: var(--heading-line, 24px); font-weight: 600; }
.rb-card__note { margin: -8px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.rb-card__note b { font-weight: var(--strong, 650); color: var(--ink); }
.rb-card__note .c-short { font-weight: var(--strong, 650); color: var(--red); }
/* The batches: smaller chips; done teal, the coffee's batches sand, every spare dashed (round 10). */
.rb-card .rs-run { gap: 6px; }
.rb-card .rs-run__b { height: auto; min-height: 0; padding: var(--s4, 6px) var(--s4, 8px); gap: 8px; background: var(--white); box-shadow: inset 0 0 0 1px var(--border); }
.rb-card .rs-run__b span { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
.rb-card .rs-run__b b { font-size: var(--tile-size, 11px); line-height: var(--tile-line, 14px); }
.rb-card .rs-run__b.is-done { background: var(--teal-dark); box-shadow: none; }
.rb-card .rs-run__b.is-spare { background: transparent; box-shadow: none; outline: 1.5px dashed var(--border); outline-offset: -1.5px; }
.rb-card .rs-run__b.is-short { background: transparent; box-shadow: inset 0 0 0 2px var(--red); }
/* Suggested order and Done: one row per coffee (round 8 review 29). */
.rs-h { margin: 40px 0 12px; font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); font-weight: var(--strong, 700); }
.rs-list { gap: 12px; }
.rs-list--done { margin-top: 8px; }
.rs-card, .rs-list--done .rs-card { gap: 0; padding: 0; background: var(--white); box-shadow: var(--card-shadow); }
.rs-card.is-just { box-shadow: 0 0 0 2px var(--teal-text); }
.rs-card__main, .rs-list--done .rs-card__main { grid-template-columns: 32px minmax(240px, 1fr) minmax(160px, auto) auto; align-items: center; column-gap: 24px; padding: 16px 24px; }
.rs-card__n { background: var(--chip-n); color: var(--ink); font-size: var(--body-size, 13px); }
.rs-card__check { background: var(--chip-n); color: var(--ink); }
.rs-card__what { gap: 4px; }
.rs-card .coffee-name, .rs-list--done .coffee-name { font-size: var(--large-size, 16px); line-height: var(--large-line, 24px); font-weight: var(--strong, 700); }
.rs-list--done .rs-card .coffee-name, .rs-list--done .rs-card__name { color: var(--ink-soft); }
.rs-card__line { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); white-space: nowrap; }
.rs-card__what .rs-card__green, .rs-card__green { margin: 0; font-size: inherit; line-height: inherit; color: inherit; }
.rs-card__note { font-size: var(--small-size, 12px); }
.rs-card .weigh { background: var(--fill-n); border: 0; }
.rs-card__orders, .rs-card .weigh, .rs-card > .plan-why, .rc.rs-card > .plan-why { margin-left: 104px; margin-right: 24px; }
.rs-card > .plan-why, .rc.rs-card > .plan-why { margin-top: -8px; margin-bottom: 16px; }
.rs-card__orders { margin-bottom: 16px; }
.rs-ords { background: var(--work); }
/* The pips speak the batch chip language (round 8 review 34): 16 px squares, teal for roasted, grey for not yet. */
.pips, .rs-bar { display: inline-flex; gap: 4px; width: auto; }
.pips i, .page-run .rs-card .rs-bar i, .rs-bar i { flex: none; width: 16px; min-width: 0; height: 16px; border-radius: 4px !important; background: var(--chip-n); box-shadow: none; }
.pips i.is-on, .rs-bar i.is-on, .rs-list--done .pips i.is-on, .rc.is-done .pips i.is-on, .rc.is-done .rs-bar i.is-on { background: var(--teal-dark); }
/* Roasted: the 48 px round teal button with a check; once a coffee is done, a solid green check that undoes. */
.rs-card__act { grid-column: auto; grid-row: auto; justify-content: flex-end; }
.rs-act { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.rs-act__help { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); white-space: nowrap; text-align: right; }
.rs-roasted, .rs-roasted.is-done { display: grid; place-items: center; width: 48px; min-width: 0; height: 48px; padding: 0; border: 0; background: var(--teal-dark); color: var(--cream); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(26, 26, 26, 0.12); cursor: pointer; transition: background-color var(--hover) var(--ease), transform var(--hover) var(--ease); }
.rs-roasted::before { content: none; }
.rs-roasted svg { width: 22px; height: 22px; }
.rs-roasted:hover { background: var(--brand-press); }
.rs-roasted:active { transform: scale(0.96); }
.rs-roasted.is-done { background: var(--green); }
.rs-roasted.is-done:hover { background: #0f6732; }
.rs-roasted:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }
/* The rail. */
.page-run .side--roast .card { border-radius: var(--r); padding: var(--card-pad, 24px); }
.page-run .side--roast .card__title { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: var(--strong, 650); margin-bottom: 12px; }
.rs-log__line { border-bottom: 1px solid var(--line-soft); font-size: var(--body-size, 13px); gap: 8px; }
.rs-log__line span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.page-run .roast--stock { border-radius: var(--r); margin-top: 16px; }

/* ---------- Packing ---------- */
.lightbox .lb__foot { border-top: 0; box-shadow: none; }
/* From last week and Placed as two quiet rows (round 8 review 38). */
.lb__details { display: grid; gap: 4px; margin-bottom: 16px; }
.meta-row { display: flex; gap: 0; margin: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); color: var(--ink); }
.meta-row span:first-child { flex: none; width: 124px; color: var(--muted); }
.meta-row.is-red span:last-child { color: var(--red); }
/* Name, stepper and All on one grid, so they line up across the rows (round 8 review 36). */
.lb__row { display: grid; grid-template-columns: minmax(0, 1fr) auto 56px; align-items: center; column-gap: 12px; }
.lb__ctl .stepper__val { min-width: 64px; font-weight: 500; font-size: var(--body-size, 14px); }
.lb__all { display: flex; justify-content: flex-end; }
.lb__all .btn { width: 56px; justify-content: center; }
.lb__all .lb__check { width: 20px; height: 20px; margin-right: 18px; }
.lb__line.is-done .stepper__val, .lb__line.is-done .stepper__val span { color: var(--green); }
/* Packed: the time and Undo packed, in the lightbox (round 8 review 40). */
.lb__packed { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px; font-size: var(--heading-size, 14px); font-weight: var(--strong, 550); color: var(--ink); white-space: nowrap; }
.lb__packed img { width: 16px; height: 16px; }

/* ---------- Settings ---------- */
.settings, .settings__main { background: var(--work); }
.settings__nav { background: var(--side-bg); border-right: 1px solid var(--line); }
.settings__nav a:hover { background: var(--nav-on); }
.settings__nav a[aria-current="page"], .settings__nav a.is-on { background: var(--nav-on); color: var(--ink); font-weight: 600; }
/* One table header style everywhere, group rows in sentence case (round 8 reviews 41 and 50). */
.st--section { background: var(--work); }
.st--section b { text-transform: none; letter-spacing: var(--letter, 0); font-weight: 600; font-size: var(--small-size, 12px); color: var(--ink); }
/* The For sale switch: a 4 px rounded square in its 6 px track (round 8 review 45). */
.switch i { border-radius: 4px !important; }
/* A plain dropdown for one of several (round 8 review 51). */
.field--pick { height: var(--ctl, 40px); width: 100%; max-width: 320px; }
/* New product: room to breathe (round 8 review 46, round 10 review 22). */
.drawer .facts { row-gap: 24px; }
.drawer .choice button, .drawer .segments button { padding: var(--mini-pad, 8px) var(--s12, 16px); min-height: var(--mini, 36px); }
/* Weekly Plan: lanes #F6F5F3 with a hairline, white cards inside (round 10 review 24). */
.wp .bd, .wp-lane:not(.wp-lane--tray) { background: var(--side-bg); box-shadow: none; border: 1px solid var(--line); }
.wp-lane--tray { background: transparent; box-shadow: none; border: 1.5px dashed var(--border); }
.wp-lead { max-width: 760px; }
.settings__main > .tipgrid + .tipgrid { margin-top: -8px; }
/* Keyboard shortcuts. */
.keys-table { max-width: 720px; }
.kt { display: grid; grid-template-columns: minmax(0, 1fr) 160px 96px; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line-soft); font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.kt:last-child { border-bottom: 0; }
.kt--head { padding: 12px 24px; background: var(--thead); border-bottom: 1px solid var(--line); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: var(--strong, 550); color: var(--muted); }
.kt__act { display: flex; justify-content: flex-end; }
.kt__key .key { font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); padding: 0 8px; }
.kt__listen { display: inline-block; padding: 0 8px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--teal-text), 0 0 0 4px rgba(var(--shade-rgb), 0.12); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); color: var(--teal-dark); }
.kt__note { margin: 4px 0 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--red); }

/* ---------- Tablet, 1024 to 1100 (round 8 proposal; round 10 review 28) ---------- */
@media (max-width: 1100px) {
  html[data-tight] { --roast-side: 272px; }
  .rs-card__main, .rs-list--done .rs-card__main { grid-template-columns: 32px minmax(0, 1fr) auto auto; column-gap: 16px; padding: 12px 16px; }
  .rs-card__act { grid-column: auto; }
  .rs-card__line { white-space: normal; }
  .rs-act__help { display: none; }
  .rs-card__prog { min-width: 0; }
  .rs-card__orders, .rs-card .weigh, .rs-card > .plan-why, .rc.rs-card > .plan-why { margin-left: 64px; margin-right: 16px; }
  .rs-run { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .rb-card__head { flex-wrap: wrap; }
  .page-run .side--roast { padding: 24px 16px 32px; }
  .page-run .side--roast .card { padding: var(--s16, 20px); }
}
/* Drawer titles are page titles too: League Spartan 28/36. Size chips in New product breathe (round 10 review 22). */
.drawer h2.title { font-family: var(--font-display); font-weight: 600; font-size: var(--figure-size, 28px); line-height: var(--figure-line, 36px); letter-spacing: var(--letter-tight, -0.005em); }
.drawer [data-act="productNewSize"] { padding: var(--mini-pad, 8px) var(--s12, 16px); min-height: var(--mini, 36px); margin-right: 4px; }

/* ==========================================================================================================
   Round 8b (Nov 17, 2026): Chris's round 8 local review, items 26 to 32 (feedback-2026-11-17/FEEDBACK.md part 5).
   ========================================================================================================== */
/* 26. Spare batch chips: a thinner, lighter dash. */
.rb-card .rs-run__b.is-spare { outline: 1px dashed var(--border); outline-offset: -1px; }
/* 27. The coffee's batch segments fill as batches are logged. The earlier rule that drew every segment grey was
   stronger than is-on; this one holds. The last filled segment on today takes that batch back. */
.page-run .rs-card .rs-bar i.is-on, .page-run .rc.is-done .rs-bar i.is-on { background: var(--teal-dark); }
.page-run .rs-card .rs-bar i.is-just { background: var(--green); }
.page-run .rs-card .rs-bar i.is-last { cursor: pointer; transition: opacity var(--hover) var(--ease); }
.page-run .rs-card .rs-bar i.is-last:hover { opacity: 0.6; }
.rs-card__undo { margin-left: 12px; font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); font-weight: 500; }
/* 30. Grey table header bands: the band runs edge to edge and every first and last column keeps 12 px inside it,
   header and body alike, so the text lines up under the header on every small table. */
.mini-table th:first-child, .mini-table td:first-child, .rtw .mini-table th:first-child, .rtw .mini-table td:first-child { padding-left: 12px; }
.mini-table th:last-child, .mini-table td:last-child, .rtw .mini-table th:last-child, .rtw .mini-table td:last-child { padding-right: 12px; }
.mini-table thead th, .rtw .mini-table thead th { padding-top: 8px; padding-bottom: 8px; line-height: var(--small-line, 16px); vertical-align: middle; }
/* 31. The Roasting day strip slides its white selection like every other segmented control. */
.rs-week__days { position: relative; }
.rs-week__days .thumb { top: 4px; bottom: 4px; border-radius: 8px; background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.rs-week__days .rs-day { position: relative; z-index: 1; }
.rs-week__days.has-thumb .rs-day[aria-pressed="true"] { background: transparent; box-shadow: none; }
/* 32. Toasts: centred in the window, the text centred with even padding. */
.toast-wrap { left: 0; right: 0; justify-content: center; padding: 0 16px; }
.toast { justify-content: center; min-height: 44px; padding: 8px 8px 8px 20px; text-align: center; }
.toast.toast--plain { padding: 12px 20px; }

/* ==========================================================================================================
   Round 8c (Nov 17, 2026): Chris's review of the live round 8b, items 33 to 38 (feedback-2026-11-17/FEEDBACK.md
   part 6).
   ========================================================================================================== */
/* 33. Weigh batch: its own room inside the card, the card's 24 px inset on the sides and below, 16 px inside. */
.rs-card .weigh { gap: 8px; margin-top: 0; margin-bottom: 24px; padding: 0; background: transparent; }
.rs-card .weigh__row { padding: 16px 24px; border-radius: var(--r); background: var(--fill-n); box-shadow: inset 0 0 0 1px var(--line-soft); }
.rs-card__orders + .weigh, .rs-card .weigh + .plan-why { margin-top: 0; }
@media (max-width: 1100px) { .rs-card .weigh { margin-bottom: 16px; } .rs-card .weigh__row { padding: 12px 16px; } }
/* 36. Save: a saving state, then one confirmed line with a check; a message under the row when a value is missing
   or odd. */
.weigh__save.is-saving { opacity: 1; color: var(--muted); cursor: progress; }
.weigh__msg { flex-basis: 100%; margin: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--red); }
.weigh__row.has-note .input-num { border-color: var(--red); }
.rs-card .weigh__row--done { padding: 12px 24px; gap: 12px; background: var(--green-tint, #e9f4ee); box-shadow: none; }
.weigh__row--done .weigh__what { flex-direction: row; gap: 4px; min-width: 0; flex: 1; font-size: var(--body-size, 14px); color: var(--ink-soft); }
.weigh__row--done .weigh__what b { font-weight: 600; color: var(--ink); }
.weigh__ok { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: var(--white); flex: none; }
.weigh__ok svg { width: 12px; height: 12px; }
.weigh__saved { font-size: var(--body-size, 13px); font-weight: 600; color: var(--green); }
.weigh__row--done.is-fresh { animation: weigh-in 0.32s cubic-bezier(0, 0, 0.2, 1) both; }
.weigh__row--done.is-fresh .weigh__ok { animation: weigh-ok 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both; }
@keyframes weigh-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes weigh-ok { from { transform: scale(0.4); opacity: 0; } }
/* 35. The round Roasted button: hover lifts on a pointer, press sinks to 0.96 with a tighter shadow, release springs
   back, and a logged batch gives a short pulse while its segment fills (bin-fill). 48 px, so the touch target is past 44. */
.rs-roasted, .rs-roasted.is-done { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 2px 6px rgba(26, 26, 26, 0.16); transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s var(--ease), background-color var(--hover) var(--ease); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .rs-roasted:hover { transform: translateY(-1px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 4px 10px rgba(26, 26, 26, 0.18); }
}
.rs-roasted:active, .rs-roasted:hover:active { transform: scale(0.96); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(26, 26, 26, 0.14); transition-duration: 0.08s; }
.rs-roasted.is-pop { animation: roasted-pop 0.46s cubic-bezier(0.34, 1.56, 0.64, 1); }
.rs-roasted.is-pop svg { animation: roasted-check 0.4s cubic-bezier(0, 0, 0.2, 1); }
@keyframes roasted-pop { 0% { transform: scale(0.94); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(33, 122, 70, 0.4); } 55% { transform: scale(1.06); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 0 0 8px rgba(33, 122, 70, 0); } 100% { transform: none; } }
@keyframes roasted-check { from { opacity: 0.3; transform: scale(0.6) rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) {
  .rs-roasted, .rs-roasted:hover, .rs-roasted:active { transform: none; transition: none; }
  .rs-roasted.is-pop, .rs-roasted.is-pop svg, .weigh__row--done.is-fresh, .weigh__row--done.is-fresh .weigh__ok { animation: none; }
}
/* 34. The orders under a coffee open and close with an eased height (JS); the chevron turns with them. */
.rs-card__orders { will-change: height; }
/* 37. Segmented labels keep one weight pressed or not, so nothing reflows under the sliding indicator. */
.segments button, .segments button[aria-pressed="true"] { font-weight: 500; }
.rs-day, .rs-day[aria-pressed="true"] { font-weight: inherit; }
/* 38. The week control speaks the stepper's language (Roasting today): one white box, a hairline border, 6 px radius,
   quiet 38 px icon buttons, the label plain in the middle; no inner box, no split cells. */
.week-nav__group { height: var(--ctl, 40px); padding: 0; border: 1px solid var(--border); border-radius: var(--r) !important; background: var(--white); box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04); overflow: visible; }
.week-nav__group > button { height: var(--ctl-in, 38px); border: 0 !important; border-radius: var(--r) !important; background: transparent; box-shadow: none; }
.week-nav__group > button + button { border-left: 0 !important; }
.week-nav__group .week-nav__arrow { width: 38px; color: var(--ink-soft); transition: background-color var(--hover) var(--ease); }
.week-nav__group .week-nav__arrow img { width: 16px; height: 16px; opacity: 0.8; }
.week-nav__group .week-nav__today { min-width: 88px; padding: 0 4px; font-size: var(--body-size, 14px); font-weight: 600; color: var(--ink); background: transparent; }
.week-nav__group .week-nav__today:disabled { color: var(--ink); }
.week-nav__group .week-nav__arrow:hover, .week-nav__group .week-nav__today:not(:disabled):hover { background: var(--tint-soft); }
.week-nav__group .week-nav__arrow:active, .week-nav__group .week-nav__today:not(:disabled):active { background: rgba(var(--shade-rgb), 0.1); }
.week-nav__group > button:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: -2px; }
.week-nav__group:focus-within { border-color: var(--teal-text); }
.week-nav__title { height: var(--ctl, 40px); }
.rs-week__arrow { width: var(--ctl, 40px); height: var(--ctl, 40px); border: 1px solid var(--border); border-radius: var(--r); background: var(--white); box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04); }
.rs-week__arrow:hover { background: var(--white); box-shadow: inset 0 0 0 40px var(--tint-soft); }
/* 36. A placeholder is a hint, not a value: faint, so an empty weight never looks typed. */
.weigh__f .input-num::placeholder { color: var(--faint); font-weight: 400; opacity: 1; }
/* Nov 24: green in is the coffee's set weight, with a small change beside it; a changed one says so. */
.weigh__set b { font-weight: 600; font-size: var(--heading-size, 15px); line-height: var(--heading-line, 36px); color: var(--ink); white-space: nowrap; }
.weigh__change { min-width: 36px; min-height: var(--ctl, 36px); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.weigh__chg { padding: 0 8px; border-radius: var(--rad, 10px); background: var(--chip); font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.weigh__row--done .weigh__what:has(.weigh__chg) { flex-wrap: wrap; }
@media (any-pointer: coarse) { .weigh__change, .weigh__unset .btn { min-width: 44px; min-height: 44px; } }
/* No green in set: the red alert mark and words, on the weighing card (with Set it) and at the Green in field. */
.weigh__unset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; margin: 0; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--red); }
.weigh__unset b, .c-unset b { font-weight: 600; }
.weigh__unset .btn { display: inline-flex; align-items: center; justify-content: center; margin-left: 8px; }
.c-unset { grid-column: 2; display: flex; gap: 8px; margin: -8px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--red); }
.c-unset .alert-mark { margin-top: 2px; }
.facts .field[aria-describedby="c-in-unset"] { border-color: var(--red); }
/* Migration 0029: a carried over green in, quiet and muted, with Keep to confirm it. */
.c-check { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: -8px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.st .c-batch .c-check { display: block; margin: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }

/* Round 8d: Friday in the Roasting week strip. A day that is not a roast day reads "No roasting", muted, and opens to
   a calm note and the orders going out that day. */
.rs-day.is-off .rs-day__off { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; color: var(--faint); white-space: nowrap; }
.rs-day.is-off .rs-dd { color: var(--faint); }
.rs-day.is-off[aria-pressed="true"] .rs-day__off, .rs-day.is-off[aria-pressed="true"] .rs-dd { color: var(--muted); }
.rs-offday { margin-bottom: 20px; background: var(--white); }
.rs-offday__text { margin: 8px 0 0; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.rs-offday__text .link { margin-left: 4px; font-size: var(--body-size, 14px); }

/* Connect Shopify, the real connection (branch rd-shopify) */
.conn__connected { margin-top: 20px; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); color: var(--ink); }
.conn__connected b { font-weight: 600; }
.conn__connected + .conn__facts { margin-top: 12px; }
.conn__problem { margin-top: 12px; padding: 8px 12px; border-radius: var(--rad, 8px); background: var(--fill); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.conn__field { display: grid; gap: var(--s8, 6px); margin-top: 20px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.conn__field input { width: 100%; max-width: 360px; }
.conn-wait { max-width: 960px; margin-top: 24px; padding: 24px; }
.conn-wait h2 { font-weight: var(--strong, 650); font-size: var(--heading-size, 15px); line-height: var(--heading-line, 20px); }
.conn__count { margin-left: 6px; padding: 1px var(--s8, 7px); border-radius: var(--rad, 999px); background: var(--segment); font-weight: var(--strong, 550); font-size: var(--small-size, 12px); color: var(--muted); line-height: var(--small-line, inherit); }
.conn-wait .sub { margin-top: 4px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.conn-wait__list { margin: 16px 0 0; padding: 0; list-style: none; }
.conn-wait__row { display: grid; grid-template-columns: minmax(0, 1fr) 200px 140px auto auto; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.conn-wait__what { display: grid; gap: 2px; min-width: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.conn-wait__what small { color: var(--muted); font-size: var(--small-size, 12px); line-height: var(--small-line, inherit); }
@media (max-width: 900px) { .conn-wait__row { grid-template-columns: 1fr 1fr; } .conn-wait__what { grid-column: 1 / -1; } }

/* A note on one order line (the Shopify grind, migration 0021): under the line in the drawer, packing and the slip */
.line-note { display: block; margin-top: 2px; font-style: normal; font-weight: var(--strong, 550); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--teal-dark, #1d5c63); }
em.line-note { display: inline; margin-left: 4px; }

/* Orders this week heads the Roasting sidebar (Nov 19, AD: total pounds is "the roaster's barometer"). The week's
   total is the headline, big and first; batches and coffees one quiet line under it; the coffees below, smaller,
   as the breakdown. No total row at the foot any more. */
.page-run .side--roast .rtw--total .card__title { margin-bottom: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: var(--strong, 550); color: var(--muted); }
.wk-total { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--ink); }
.wk-total b { font-size: var(--title-size, 40px); line-height: var(--title-line, 48px); font-weight: var(--strong, 650); letter-spacing: var(--letter-tight, -0.02em); }
.wk-total span { font-size: var(--heading-size, 16px); line-height: var(--heading-line, 24px); font-weight: var(--strong, 550); color: var(--muted); }
.wk-total__sub { margin: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.rtw .mini-table.wk-total__by { margin-top: 24px; }
.rtw .wk-total__by td { padding-top: 8px; padding-bottom: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--ink-soft); }
.rtw .wk-total__by td.r { font-weight: 500; }

/* ---------- Version 1.1.0: accounts, the Staging marker, What's new ---------- */
.brand__name--solo { font-size: var(--heading-size, 15px); font-weight: 600; color: var(--cream); letter-spacing: var(--letter, -0.01em); }
.env-mark { flex: none; padding: 0 8px; border-radius: var(--rad, 4px); background: #f6e7c8; color: #5f3d05; font-weight: 600; font-size: var(--small-size, 12px); line-height: var(--small-line, 20px); white-space: nowrap; }
.slip__name { font-weight: 600; font-size: 22px; line-height: 28px; color: #000; }
.settings__version { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 16px 0 0; padding: 0 12px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.settings__version .link { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.whatsnew h2 { font-weight: var(--strong, 650); font-size: var(--large-size, 17px); line-height: var(--large-line, 24px); }
.whatsnew__ver { margin-top: 4px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.whatsnew__list { display: grid; gap: 16px; max-height: 50vh; margin: 24px 0 0; overflow-y: auto; font-size: var(--body-size, 14px); line-height: var(--body-line, 20px); }
.whatsnew__list b { font-weight: 600; } .whatsnew__list p { color: var(--ink-soft); }
.whatsnew__none { margin-top: 24px; font-size: var(--body-size, 14px); color: var(--muted); }
/* The 1024 tablet floor: the marker takes the brand's own padding, so the top bar still fits. */
@media (max-width: 1180px) { .brand:has(.env-mark) { gap: 8px; padding-right: 0; } }

/* Nov 24: a coffee with no green in set, where batches would show: pounds, red words and Set it. */
.unset-text { font-weight: 600; color: var(--red); }
.unset-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.unset-line > span { flex: 1; min-width: 0; }
.unset-line b { font-weight: 600; color: var(--red); }
.unset-line .link { text-decoration: underline; text-underline-offset: 2px; min-height: 24px; }
.bd > .unset-line { margin: 0 0 8px; padding: 0 8px; }
.rb-card .unset-line { padding: 0; }
.rb-card .unset-line > span { flex: none; }
.rs-card__unset { margin: 0 24px 16px 104px; }
.rs-day { position: relative; }
.rs-day__unset { position: absolute; top: 6px; right: 6px; }
.rs-day__unset .alert-mark { width: 14px; height: 14px; }
@media (max-width: 1100px) { .rs-card__unset { margin-left: 64px; } }
@media (any-pointer: coarse) { .unset-line .link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; } }
@media print { .unset-line .link, .rs-card__unset .btn { display: none !important; } }

/* ---------- 1.2.0: methods, Packed then Fulfilled ---------- */
.btn-say { display: inline-flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: center; }
.btn-say small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 400; color: var(--muted); white-space: nowrap; }
.btn-say .btn { justify-content: center; }
/* A8: Undo packed under the quiet button beside it, small and muted until hovered; a 24px tall target. */
.btn-say small .link--unpack { min-height: 24px; margin: -4px 0; padding: 0 4px; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; cursor: pointer; }
.btn-say small .link--unpack:hover, .btn-say small .link--unpack:focus-visible { color: var(--teal-dark); text-decoration-color: currentColor; }
.drawer-actions:has(.btn-say), .lb__foot:has(.btn-say) { align-items: flex-start; }
.lb__foot:has(.btn-say) { flex-wrap: wrap; row-gap: 12px; }
.lb__foot:has(.btn-say) .lb__packed { min-height: var(--ctl, 38px); }
.lb__next { display: flex; align-items: flex-start; gap: 8px; margin-left: auto; }
html .pk .c-act:has(.btn-say) { width: auto; min-width: 168px; gap: 8px; align-items: flex-start; }
.pk__method { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); align-self: center; }
.pk__status { align-items: center; gap: 8px; }
.goes-out small { flex-basis: 100%; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.mrow { display: flex; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mrow .field { flex: 1; min-width: 0; }
.mrow.is-off .field { color: var(--faint); }
.mrow__used { width: 88px; flex: none; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); text-align: right; }
.mrow__none { padding: 8px 0; }
/* ---------- Mark all packed (Nov 24) ---------- */
.pack-card__top { display: flex; align-items: center; gap: 16px; padding-right: var(--s16, 24px); }
.pack-card__top .pack-card__title { flex: 1; min-width: 0; padding-top: 16px; padding-bottom: 16px; }
.pack-card__top .btn { flex: none; }
.packall__head { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.packall__list { max-height: 200px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.packall__list li { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 4px 0; }
.packall__list b { font-weight: 600; }
.packall__list span { color: var(--muted); }
.packall__done { margin-bottom: 0; }
.packall__done > div { flex: 1; min-width: 0; }
.packall__done p { margin-top: 4px; }
.packall__done .btn { flex: none; }
.ptip { display: flex; align-items: center; gap: 8px; flex: none; }
.ptip__i { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--rad, 8px); color: var(--muted); }
.ptip__i:hover { color: var(--ink); }
.ptip__i .tip__icon { width: 16px; height: 16px; margin: 0; }
.ptip__text { display: none; max-width: 300px; padding: 4px 12px; border-radius: var(--rad, 8px); background: var(--ink); color: var(--white); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
@media (hover: hover) { .ptip:hover .ptip__text { display: block; } }
.ptip:has(:focus-visible) .ptip__text, .ptip.is-open .ptip__text { display: block; }
.ptip.is-off .ptip__text { display: none; }
@media (pointer: coarse) { .ptip__i { width: 44px; height: 44px; } }
/* Beside a card title: the text opens under the title, touching it, so the pointer can reach its link. */
.card__title:has(> .ptip--under) { position: relative; }
.ptip--under { margin: -4px 0; }
.ptip--under .ptip__text { position: absolute; z-index: 5; top: 100%; right: 0; width: 300px; max-width: 100%; padding: 8px 12px; font-weight: 400; }
/* Unseen but there, so Tab from the (i) reaches its link (a link that is not drawn cannot take the focus). */
.ptip--under:not(.is-off) .ptip__text { display: block; opacity: 0; pointer-events: none; }
.ptip--under:not(.is-off).is-open .ptip__text, .ptip--under:not(.is-off):has(:focus-visible) .ptip__text { opacity: 1; pointer-events: auto; }
@media (hover: hover) { .ptip--under:not(.is-off):hover .ptip__text { opacity: 1; pointer-events: auto; } }
/* While it shows, the title row beside it counts too, so a slanted move to the link does not lose it. */
@media (hover: hover) { .ptip--under:not(.is-off):hover::before { content: ''; position: absolute; top: 0; right: 0; width: 300px; height: 100%; } }
.ptip--under .ptip__i { position: relative; z-index: 1; }
.ptip--under .ptip__text a { color: inherit; text-decoration: underline; }
.ptip--under .ptip__text a:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.mrow__add { display: flex; justify-content: flex-end; margin-top: 24px; }
.facts .field.is-invalid { border-color: var(--red); }
.facts .field-err { margin: -8px 0 0; }

/* ---------- 1.2.0: Didn't go out ---------- */
.dgo__opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dgo__opt { border: 1px solid var(--border); border-radius: var(--rad, 8px); padding: 12px 16px; }
.dgo__opt.is-on { border-color: var(--ink); }
.dgo__opt label { display: flex; align-items: flex-start; gap: 12px; min-height: 36px; cursor: pointer; }
.dgo__opt label > span { display: flex; flex-direction: column; gap: 4px; }
.dgo__opt b { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; }
.dgo__opt small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.dgo__opt input[type="radio"] { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.dgo__opt .field { width: 100%; margin-top: 12px; }
.dgo .field-err { margin-top: 12px; }
@media print { .pack-card__top .ptip, .packall__done { display: none !important; } }

/* ---------- The Plan board's cards: name at the card's edge, star top right (Nov 25, account flag planStarRight) ---------- */
/* Screen only, by order: the page, the reading order and the printed week stay as they were. The star's 28 px button sits
   8 px from the card's top and right, so its mark lines up with the 14 px padding. By touch it takes the card's 44 px corner, unless it is off (a packed order), where the card keeps its press. */
@media screen {
  .bc--starright .bc__name { order: 1; }
  .bc--starright .bc__top > :not(.star, .bc__name) { order: 2; }
  .bc--starright .star { order: 3; position: relative; margin: -4px -6px -4px auto; }
}
@media screen and (any-pointer: coarse) {
  .bc--starright .star:not(:disabled)::after { content: ''; position: absolute; inset: -8px; }
}

/* ---------- Extra batches in spare spots (Nov 24) ---------- */
.rs-run__b:has(> .rs-run__btn) { container-type: inline-size; padding: 0; }
.rs-run__btn { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; flex: 1; width: 100%; min-width: 0; min-height: 44px; padding: 6px 8px; border-radius: inherit; text-align: left; }
.rs-run__btn:hover, .rs-run__btn[aria-expanded="true"] { background: var(--tint-soft); }
.rb-card .rs-run__b.is-spare .rs-run__btn b { color: var(--ink-soft); }
.rs-run__btn i { font-style: normal; font-weight: 600; }
.rb-card .extra-line { margin: 0; }
.rb-card .rs-run__b.is-extra { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.rb-card .rs-run__b.is-extra.is-done { box-shadow: none; }
.extra-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--ink); }
.extra-line .link { text-decoration: underline; text-underline-offset: 2px; min-height: 24px; }
.rs-run__b.is-marked { container-type: inline-size; padding: 0; }
.rb-card .rs-run__b.is-marked { padding: 0; }
.rs-run__in { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; flex: 1; min-width: 0; padding: 6px 8px; }
.rs-run__top { display: flex; align-items: center; justify-content: space-between; gap: 2px; min-width: 0; height: 16px; white-space: nowrap; }
.rb-card .rs-run__b .rs-run__mark { font-weight: 600; color: var(--ink); white-space: nowrap; }
.rb-card .rs-run__b.is-done .rs-run__mark { color: var(--cream); }
@container (max-width: 47px) { .rs-run__b > .rs-run__btn, .rs-run__in { padding-inline: 4px 2px; } .rs-run__top { gap: 1px; } }
/* The pop-up: a label (heading and help), then choices that all look like something to press. */
.spare { display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 32px); border-radius: 6px; z-index: 60; overflow: hidden; }
.spare__top { flex: none; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.spare__title { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; color: var(--ink); }
.spare__sub { margin-top: 4px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.spare__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.spare__sec + .spare__sec { margin-top: 24px; }
.spare__head { margin-bottom: 8px; }
.spare__head h3 { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; color: var(--ink); }
.spare__head p { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.spare ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.spare li.is-wide { grid-column: 1 / -1; }
.spare__pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--fill-n); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; color: var(--ink); text-align: left; transition: border-color var(--hover) var(--ease), background var(--hover) var(--ease); }
.spare__pick:hover { border-color: var(--ink-soft); background: var(--white); }
.spare__pick--fwd { min-height: 56px; padding: 8px 12px; border-color: var(--ink-soft); background: var(--white); box-shadow: 0 1px 2px rgba(26, 26, 26, 0.1); }
.spare__pick--fwd:hover { border-color: var(--ink); background: var(--tint-soft); }
.spare__pick small, .spare__what small, .spare__part > small { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 400; color: var(--muted); }
.spare__pick small { white-space: nowrap; }
.spare__pick .spare__what small { white-space: normal; }
.spare__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spare__plus { flex: none; margin-left: auto; font-style: normal; font-weight: 600; }
.spare__what { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink); }
.spare__line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.spare__line b { font-weight: 600; }
.spare__day { flex: none; padding: 2px 8px; border-radius: 6px; background: var(--chip-n); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 500; color: var(--ink); }
.spare__what .spare__needs { font-weight: 600; color: var(--ink); }
.spare__part { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.spare__part .spare__what { width: 100%; }
.spare li.is-unset { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.spare li.is-unset small { display: flex; align-items: center; gap: 4px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--red); }
.spare li.is-unset .alert-mark { width: 14px; height: 14px; }
.extra-pop { width: 280px; padding: 16px 0; }
.extra-pop .btn { margin: 0 16px; }
@media (any-pointer: coarse) { .spare li button, .spare li.is-unset, .extra-pop .btn { min-height: 44px; align-items: center; } .extra-line .link, .spare .link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; } }
@media print { .extra-line .link { display: none !important; } }

/* Green coffee in the menu and the green on a coffee (Nov 25), on accounts that have them: the fourth tab and the green
   table fit 1024. The top bar lines hold under 721 px too, where the page is still 1024 wide (Nov 26 staging merge: at
   390 the fourth tab took the bar to 1051). */
@media (max-width: 1180px) {
  .top:has(.tab[href="#green"]) .tabs { gap: 0; }
  .top:has(.tab[href="#green"]) .tab { padding: calc((var(--ctl, 36px) - 20px) / 2) 10px; }
  .top:has(.tab[href="#green"]) .tabs__rule { margin: 0 8px; }
  .top:has(.tab[href="#green"]) .top__end { gap: 12px; }
  .top:has(.tab[href="#green"]) .search { min-width: 60px; }
}
@media (min-width: 721px) and (max-width: 1180px) {
  html[data-route="green"][data-tight] .gr { grid-template-columns: minmax(128px, 1fr) 72px 76px 92px 80px 56px minmax(184px, 1fr) 72px; gap: 12px; }
}
@media (any-pointer: coarse) { .green-none .link { display: inline-flex; align-items: center; min-height: 44px; } }

/* A coffee that roasts as another, or as its own (Nov 25). */
.link-next { grid-column: 1 / -1; margin: -4px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.same-as small, .prod__why { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); font-weight: 400; }
.same-why { margin: 16px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.same-why .btn { flex: none; }

/* No roast day on a coffee (Nov 25). */
.st--product.st--noday { grid-template-columns: minmax(200px, 1fr) 152px 168px 112px 96px; }
html[data-tight] .st--product.st--noday { grid-template-columns: minmax(176px, 1fr) 136px 152px 96px 80px; }

/* ---------- Batches not marked (Nov 24) ---------- */
/* Condensed: a red outline, and per coffee a slim tinted band (the alert mark and the words)
   over its batches, side by side. */
.nm { display: grid; margin-bottom: 16px; box-shadow: 0 0 0 1px var(--red); }
.nm__group { display: grid; outline-offset: -2px; }
.nm__group:not(:focus-visible) { outline: none; }
.nm__head { display: flex; gap: 8px; min-width: 0; margin: 0; padding: 8px 16px; font-size: 14px; line-height: 20px; font-weight: 600; }
.nm__group.is-open .nm__head { background: var(--red-tint); color: var(--red); }
.nm__head svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.nm__group:not(.is-open) .nm__head svg { color: var(--green); }
.nm__answers { display: grid; gap: 8px; justify-items: start; padding: 12px 16px; }
.nm__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 8px 12px; width: 100%; margin: 0; padding: 0; list-style: none; }
/* One joined control per batch, built like the stepper: its number, then the three answers. Answered, it keeps its
   place, so nothing moves under a finger. */
.nm__row { display: flex; height: 32px; border: 1px solid var(--border); border-radius: var(--r); background: var(--white); box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06); }
.nm__row.is-said { border-color: transparent; background: var(--page); box-shadow: none; }
.nm__batch { flex: none; display: grid; place-items: center; min-width: 28px; padding: 0 4px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; }
.nm__row:not(.is-said) .nm__batch { border-right: 1px solid var(--border); border-radius: var(--r) 0 0 var(--r); background: var(--page); }
.nm__cell, .nm__ways { flex: 1; display: flex; align-items: center; min-width: 0; }
.nm__ways .btn { flex: 1 0 auto; justify-content: center; height: 30px; padding: 0 6px; border: 0; box-shadow: none; background: none; }
.nm__ways .btn + .btn::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 1px; background: var(--border); }
.nm__ways .btn:not(:disabled):hover { background: var(--tint-soft); color: var(--teal-dark); }
.nm__ways .btn:not(:disabled):active { background: rgba(var(--shade-rgb), 0.1); }
.nm__ways .btn:focus-visible { outline-offset: -2px; }
.nm__ways .btn, .nm__undo, .nm__each { position: relative; }
.nm__said { flex: 1; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 20px; color: var(--ink-soft); white-space: nowrap; }
.nm__said svg { width: 16px; height: 16px; color: var(--green); }
.nm__undo { flex: none; height: 30px; padding: 0 12px; text-decoration: underline; text-underline-offset: 2px; }
/* A folded list: Show each batch sits in the band. A coffee all answered while another is not: one short line. */
.nm__group.is-open:not(:has(.nm__row, .nec2__say)) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: var(--red-tint); }
.nm__group.is-open:not(:has(.nm__row, .nec2__say)) .nm__answers { padding: 6px 16px; }
.nm__group:not(.is-open) { display: flex; flex-wrap: wrap; align-items: center; }
.nm__group + .nm__group:not(.is-open) { border-top: 1px solid var(--line); }
.nm__group:not(.is-open) .nm__answers { flex: 1; }
.nm__group:not(.is-open) .nm__list { display: flex; flex-wrap: wrap; gap: 8px; width: auto; }
.nm__group:not(.is-open) .nm__said svg { display: none; }
.rs-day small.rs-day__nm { font-size: var(--small-size, 11px); font-weight: 600; white-space: nowrap; color: var(--red); margin-right: -8px; text-decoration: underline; text-underline-offset: 2px; }
.bd__nm { min-height: 32px; padding: 0; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* Touch: the control stays 32 px to look at and takes a 44 px press; the rows open up so two never overlap. */
@media (any-pointer: coarse) {
  .nm__ways .btn::after, .nm__undo::after, .nm__each::after { content: ""; position: absolute; inset: -7px 0; }
  .nm__undo::after { inset: -7px 0 -7px -8px; }
  .nm__list, .nm__group:not(.is-open) .nm__list, .nm__answers { row-gap: 12px; }
  .bd__nm { min-height: 44px; }
}
@media print { .nm, .bd__nm { display: none !important; } }

/* ---------- Skipped batches (Nov 25) ---------- */
.nm__head .nm__from { margin-left: auto; padding-left: 12px; font-size: 12px; line-height: 20px; font-weight: 400; color: var(--ink-soft); }
.nm__why { margin-left: 4px; color: var(--muted); font-size: 12px; }
.nm__said > span { overflow: hidden; text-overflow: ellipsis; }
.nm__ask { width: 100%; box-sizing: border-box; margin: 2px 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--white); }
.nm__q { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; outline: none; }
.nm__reasons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nm__note { flex: 1 1 220px; max-width: 360px; }
.nm__needs { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 20px; color: var(--ink); }
.nm__needs li { display: flex; gap: 8px; }
.nm__needs svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--red); }
.nm__ask .nec__ways { flex-direction: column; gap: 12px; margin-top: 12px; }
.nm__ask .nec__moves { border-top-color: var(--line); }
.nm__ask .nec__moves li { align-items: center; border-bottom-color: var(--line); }
.rb-card .rs-run:has(.rs-run__from) .rs-run__b { justify-content: flex-start; }
.rs-run__b .rs-run__from { margin-right: -6px; font-size: 10px; line-height: 12px; color: var(--ink-soft); }
@media (any-pointer: coarse) { .nm__ask .btn, .nm__ask .link, .nm__note { min-height: 44px; } }

/* ---------- Close roast day (Nov 25), sizes from the scale audit's section 5 ---------- */
.cd { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; padding: 24px; border-radius: 6px; box-sizing: border-box; outline: none; }
.cd h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.cd__line { margin: 4px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-soft); text-wrap: pretty; }
.cd__unset { display: flex; gap: 8px; color: var(--ink); }
.cd__unset svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.cd__left { margin-top: 16px; color: var(--ink); }
.cd__groups { display: grid; gap: 24px; margin-top: 16px; }
.cd__coffee { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--ink-soft); }
.cd__coffee b { margin-right: 4px; font-weight: 600; color: var(--ink); }
.cd__coffee small { margin-left: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.cd--wide { width: min(640px, calc(100vw - 32px)); }
.cd .nm__list { grid-template-columns: minmax(0, 1fr); }
.cd--wide .nm__list { grid-template-columns: 1fr 1fr; }
.cd .nm__ways .btn { flex: 1 1 0; gap: 4px; }
.cd .nm__ways .btn.is-on { background: var(--teal-dark); color: var(--cream); font-weight: 600; }
.cd .nm__ways .btn.is-on svg { width: 16px; height: 16px; }
.cd .nm__ways .btn:last-child { border-radius: 0 5px 5px 0; }
.cd .nm__needs { margin-top: 8px; }
.cd > .nm__needs { margin-top: 16px; }
.cd .nm__ask { margin-top: 8px; }
.cd__foot { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; gap: 8px; margin: 8px -24px -24px; padding: 16px 24px 24px; background: var(--white); }
.cd__foot .btn { height: 32px; padding: 0 12px; font-size: 13px; }
body:has(.modal.cd) .toast-wrap { z-index: 72; }
.cd-closed { margin-bottom: 16px; padding: 8px 16px; }
.cd-closed__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cd-closed__what { display: flex; gap: 8px; margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-soft); }
.cd-closed__what b { font-size: 14px; font-weight: 600; color: var(--ink); }
.cd-closed__what svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--green); }
.cd-closed__line, .cd-closed .nm__needs, .cd-closed__list { margin: 4px 0 0; font-size: 13px; line-height: 20px; }
.cd-closed > :first-child { margin-top: 0; }
.page-run .cd-closed[data-closed] { margin: 0; padding: 16px 24px; }
.page-run .cd-closed[data-closed] .cd-closed__what { margin-bottom: 4px; }
.cd-closed .nm__needs { margin-left: 0; }
.cd-closed__list { padding: 0; list-style: none; }
.cd-closed .cd-closed__list--flush { margin-left: 0; }
.cd-said { display: flex; align-items: center; gap: 12px; min-height: 24px; }
.cd-said b { font-weight: 600; }
.cd-said__undo { position: relative; text-decoration: underline; text-underline-offset: 2px; }
@media (any-pointer: coarse) {
  .cd__foot .btn { height: 48px; padding: 0 20px; }
  .cd--wide { width: min(720px, calc(100vw - 32px)); }
  .cd .nm__row { height: 48px; }
  .cd .nm__ways .btn { height: 46px; }
  .cd-reopen { position: relative; }
  .cd-reopen::after { content: ""; position: absolute; inset: -12px -8px; }
  .cd-said { min-height: 44px; }
  .cd-said__undo::after { content: ""; position: absolute; inset: -12px -8px; }
}
@media print { .cd-hold-wrap, .cd-stamp .cd-reopen, .cd-closed { display: none !important; } }

/* ---------- Complete Roast Day, v2 (Nov 26): press and hold, on the right of the Roast Batches card ----------
   The one serious action of the day, so it looks like no other button: the deep blue of the landing painting (the
   cool originals Chris picked, Nov 25; sampled from dawn-2400.jpg, not a new hue), and holding it lets the painting's
   dawn in from the left, under a ring that fills on the same curve (src/ui/hold.js drives --p, 0 to 1). The stamp
   after it keeps the full ring, so the action and its result read as one mark. */
:root { --rd-blue: #2b3a49; --rd-blue-press: #1e3043; --rd-ink: #181a22; }
.page-run .bt-today.rb-card--cd { gap: 16px; padding: 20px 24px; }
.rb-card__ctls { display: flex; align-items: center; gap: 24px; min-width: 0; margin-left: auto; }
.page-run .rb-card--cd .rb-card__head { flex-wrap: wrap; row-gap: 16px; }
.rb-card__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.rb-card__say { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cd-hold-wrap { flex: none; display: flex; }
.cd-hold__left { flex: none; font-size: 13px; line-height: 20px; color: var(--muted); white-space: nowrap; }
.cd-hold {
  position: relative; display: inline-grid; height: var(--step, var(--ctl, 40px)); border-radius: var(--rad, 10px); isolation: isolate;
  background: var(--white); box-shadow: inset 0 0 0 1px var(--border); color: var(--ink);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s var(--ease), background-color var(--hover), box-shadow var(--hover);
}
.cd-hold__face, .cd-hold__fill { grid-area: 1 / 1; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 10px; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; white-space: nowrap; }
/* By touch the press reaches 48 px (4 px above and below the 40 px face); the fill keeps the corners itself. */
.cd-hold__fill { border-radius: inherit; }
@media (any-pointer: coarse) { .cd-hold::after { content: ""; position: absolute; inset: -4px 0; } }
/* The dawn comes in with a soft leading edge (16 px), like the painting's own strokes; at 0 none shows, at 1 all. */
.cd-hold__fill {
  --edge: calc(var(--p, 0) * (100% + 16px));
  background: #e4e9ef url(/assets/close/dawn-band.jpg) 0 50% / cover no-repeat; color: var(--rd-ink);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--edge) - 16px), transparent var(--edge)); mask-image: linear-gradient(90deg, #000 calc(var(--edge) - 16px), transparent var(--edge));
}
.cd-hold__fill .cd-hold__label::before { content: attr(data-label); }
.cd-ring { flex: none; width: 20px; height: 20px; overflow: visible; }
.cd-ring circle { fill: none; stroke-width: 2; }
.cd-ring__track { stroke: var(--border); }
.cd-ring__fill { stroke: var(--rd-blue); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); transform: rotate(-90deg); transform-origin: center; transform-box: fill-box; }
.cd-hold:not(.is-pressing):not(.is-full) .cd-ring__fill { opacity: 0; } /* a round cap would leave a dot at rest */
.cd-hold:not(.is-full) .cd-ring__check { opacity: 0; }
.cd-ring__check { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.22s var(--ease); }
.cd-hold__fill .cd-ring__track { stroke: rgba(24, 26, 34, 0.16); }
.cd-hold__fill .cd-ring__fill { stroke: var(--rd-ink); }
.cd-hold.is-ready { background: var(--rd-blue); box-shadow: none; color: var(--white); }
.cd-hold.is-ready .cd-hold__face .cd-ring__track { stroke: rgba(255, 255, 255, 0.28); }
.cd-hold.is-ready .cd-hold__face .cd-ring__fill { stroke: var(--white); }
.cd-hold.is-pressing { transform: scale(0.97); }
.cd-hold.is-ready.is-pressing { background: var(--rd-blue-press); }
.cd-hold.is-full .cd-ring__check { stroke-dashoffset: 0; }
.cd-hold.is-full { animation: cd-settle 0.32s var(--ease); }
@keyframes cd-settle { 0% { transform: scale(0.97); } 55% { transform: scale(1.03); } 100% { transform: scale(1); } }
@media (hover: hover) {
  .cd-hold:not(.is-ready):hover { box-shadow: inset 0 0 0 1px var(--rd-blue); }
  .cd-hold.is-ready:hover { background: var(--rd-blue-press); }
}
.cd-hold:focus-visible { outline: 2px solid var(--rd-blue); outline-offset: 2px; }
.cd-hold:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .cd-hold.is-pressing, .cd-hold.is-full { transform: none; animation: none; } }
/* The batches stepper's outer height beside it (Nov 26, Chris): 40 px, or the control scale's step (32 by mouse, 48 by touch). */
/* The stamp: the ring, full, with its check; then when and who. Reopen is a quiet link. */
.cd-stamp { flex: none; display: flex; align-items: center; gap: 8px; min-height: var(--step, var(--ctl, 40px)); margin: 0; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); color: var(--ink-soft); white-space: nowrap; }
.cd-stamp b { font-weight: 600; color: var(--ink); }
.cd-stamp svg { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--rd-blue); color: var(--white); }
.cd-stamp .cd-reopen { margin-left: 8px; height: auto; padding: 0; font-size: 14px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.cd-stamp .cd-reopen:hover { color: var(--ink); }
/* ---------- Not enough coffee (Nov 25, account flag shortWarning): the unmarked batches card's outline and band ---------- */
.nec2 .nm__answers { grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: 8px 24px; padding: 8px 16px; }
.nec2__say, .nec2__say p { margin: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.nec2__say:not(p) { padding: 4px 0; color: var(--ink-soft); }
.nec2__say .nec2__lead { margin-bottom: 4px; font-size: var(--large-size, 16px); line-height: var(--large-line, 24px); font-weight: 600; color: var(--ink); }
.nec2--col .nec2__lead { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; }
.nec2__ways { display: grid; gap: 4px; align-content: start; margin: 0; padding: 0; list-style: none; }
.nec2 .nec__way { display: grid; grid-template-columns: minmax(128px, max-content) minmax(0, 1fr); gap: 12px; }
.nec2 .nec__way > small { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.nec2 .btn { position: relative; justify-content: center; height: 32px; padding: 0 12px; white-space: nowrap; }
.nec2 .link { position: relative; text-align: left; text-decoration: underline; text-underline-offset: 2px; line-height: 20px; }
.nec2 .nec__moves { margin: 0; border-color: var(--line); }
.nec2 .nec__moves li { align-items: center; min-height: 40px; padding: 4px 0; border-color: var(--line); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.nec2 .nec__moves li:last-child { border-bottom: 0; }
@media screen and (min-width: 900px) {
  .nec2:not(.nec2--col) .nm__answers { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); }
  .nec2 .nec__moves { grid-column: 1 / -1; }
}
.nec2--col { margin: 0; }
.nec2--col .nm__head { padding: 8px 12px; }
.nec2--col .nm__answers { padding: 8px 12px; gap: 4px; }
.nec2--col .nec2__ways { display: flex; flex-wrap: wrap; gap: 4px 12px; }
/* Touch: drawn as by mouse, with a 44 px press; the rows open up so two never overlap. */
@media (any-pointer: coarse) {
  .nec2:not(.nec2--col) .nec2__ways { gap: 12px; }
  .nec2 .btn::after { content: ""; position: absolute; inset: -7px 0; }
  .nec2 .link::after { content: ""; position: absolute; inset: -12px -4px; }
  .nec2 .nec__moves li { min-height: 48px; }
  .nec2--col .nm__answers { gap: 12px; padding: 8px 12px 16px; }
  .nec2--col .nec2__ways { gap: 24px 12px; }
}
@media print { .nm.nec2 { display: block !important; } }
/* The touch rule: text inside a field is 16 px, so an iPad does not zoom in on it (the type scale's Large).
   A time opens the clock instead of the keyboard, so it keeps its size and its width. */
@media screen and (any-pointer: coarse) {
  html[data-type="six"] :is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="time"]), textarea, select:not(.bc__add)) { font-size: var(--large-size); line-height: var(--large-line); }
}

/* ---------- What the control scale changes besides a size (Nov 25, account flag controlScale) ---------- */
@media screen {
  html[data-controls="three"] { --row: 40px; }
  html[data-controls="three"] .bc--starright .star { margin: -6px -8px -6px auto; }
  /* "from Monday" under a batch tile: its -6 px right margin was for the 8 px side padding; at the scale's 4 px the tile
     is 51 px wide at 1440, so the two lines take 3 px of the padding on each side and stay inside the tile. */
  html[data-controls="three"] .rs-run__b .rs-run__from { margin-inline: -3px; }
  /* one choice control: the sizes sit in the same track as Kind, and what is on is the white item with a check. The
     check and its gap take what the side padding gives up, so turning a size on or off moves nothing. */
  html[data-controls="three"] .chips:has(> .chip--lg) { display: inline-flex; justify-self: start; align-self: center; gap: 2px; padding: 4px; background: var(--track); }
  html[data-controls="three"] .chips > .chip--lg { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; min-height: 24px; margin: 0; padding: 2px 16px; border: 0; background: none; color: var(--muted); font-weight: 500; text-align: center; box-shadow: none; }
  html[data-controls="three"] .chips > .chip--lg[aria-pressed="true"] { padding: 2px 8px; background: var(--white); color: var(--ink); box-shadow: var(--chip-shadow); }
  html[data-controls="three"] .chips > .chip--lg[aria-pressed="true"]::after { content: ""; order: -1; flex: none; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--check) center / 12px no-repeat; mask: var(--check) center / 12px no-repeat; }
  html[data-controls="three"] .chips > .chip--lg:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
  html[data-controls="three"] { --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  /* nested corners, every track and switch: 8 outside, 4 inside, 4 between; in a 1 px line 6 and 5 */
  html[data-controls="three"] :is(.segments, .choice, .chips:has(> .chip--lg), .rs-week__days, .subtabs, .switch) { border-radius: var(--nest) !important; }
  html[data-controls="three"] :is(.segments button, .choice button, .chips > .chip--lg, .rs-day, .subtab, .switch i, .segments .thumb, .rs-week__days .thumb, .subtabs .thumb) { border-radius: var(--nest-in) !important; }
  html[data-controls="three"] :is(.stepper__btn, .week-nav__group > button) { border-radius: var(--nest-line) !important; }
  /* a track is one row, always: a choice too wide for the field column takes the card's width, under its label */
  html[data-controls="three"] :is(.choice, .chips:has(> .chip--lg)) { flex-wrap: nowrap; max-width: none; }
  html[data-controls="three"] .unit-row > .choice { flex-wrap: wrap; max-width: 100%; } /* a coffee's Roasts: being removed, left as it was */
  html[data-controls="three"][data-tight] .facts > :is(.choice, .chips:has(> .chip--lg)) { grid-column: 1 / -1; margin-top: -8px; }
  /* one header: 16, the 32 px controls, 16, on Orders and Packing; the day strip's 48 with 8 on Roasting. 65 on all three. */
  html[data-controls="three"] :is(.page-orders, .page-packing) .toolbar { padding-block: 16px; }
  html[data-controls="three"] .page-run .toolbar { padding-block: 8px; }
  html[data-controls="three"] :is(.page-orders, .page-packing, .page-run) .page-head { min-height: 32px; }
  html[data-controls="three"] .page-orders .page-head { gap: 12px 16px; }
  html[data-controls="three"] .subtabs { position: relative; align-items: stretch; gap: 2px; margin: 0; padding: 4px; background: var(--track); flex: none; }
  html[data-controls="three"] .subtabs .thumb { top: 4px; bottom: 4px; background: var(--white); box-shadow: var(--chip-shadow); }
  html[data-controls="three"] .subtabs .subtab { position: relative; z-index: 1; margin: 0; padding: 2px 8px; color: var(--ink-soft); font-weight: 500; background: none; box-shadow: none; }
  html[data-controls="three"] .subtabs .subtab[aria-selected="true"] { color: var(--ink); }
  html[data-controls="three"] .subtabs:not(.has-thumb) .subtab[aria-selected="true"] { background: var(--white); box-shadow: var(--chip-shadow); }
  html[data-controls="three"] .plan-filters { display: flex; margin-left: auto; }
  html[data-controls="three"] .plan-filters + .actions { margin-left: 0; }
  html[data-controls="three"][data-tight] .plan-filters { order: 1; flex-basis: 100%; margin: 0; }
  html[data-controls="three"][data-tight] .plan-filters + .actions { margin-left: auto; }
  /* the day strip: the day, then its batches, in a cell that fits "No roasting" and any count */
  html[data-controls="three"] .rs-week__days .rs-day { width: 96px; min-height: 40px; padding: 2px 8px; gap: 0; justify-content: center; }
  html[data-controls="three"][data-tight] .rs-week__days .rs-day { width: 80px; padding-inline: 4px; }
  html[data-controls="three"] .rs-day .rs-dd { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); }
  html[data-controls="three"] .rs-day .rs-day__n { font-size: var(--small-size, 12px); line-height: var(--body-line, 20px); color: inherit; white-space: nowrap; }
  html[data-controls="three"] .rs-day :is(b, .rs-day__off) { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
  html[data-controls="three"] .page-orders .week-nav__title { min-width: 160px; }
  html[data-controls="three"] .rs-day .rs-day__unset { top: 4px; right: 4px; }
  /* the date sits in a small filled chip (Nov 26, Chris): the strip's own greys, a step darker than the cell it sits in;
     no height of its own beyond the 16 px line, so the strip stays 48 px. The text lines up with the count under it. */
  html[data-controls="three"] .rs-week__days .rs-dd { align-self: flex-start; margin-inline-start: -4px; padding: 0 4px; border-radius: var(--nest-in); background: var(--line); }
  html[data-controls="three"] .rs-week__days .rs-day[aria-pressed="true"] .rs-dd { background: var(--segment); color: var(--ink); font-weight: 500; }
  html[data-controls="three"] .rs-week__days .rs-day:is(.is-past, .is-off):not([aria-pressed="true"]) .rs-dd { background: var(--chip-n); }
}
/* Print: the two views stay a row of tabs under the title, as they were. */
@media print {
  html[data-controls="three"] .page-orders .page-head { row-gap: 16px; }
  html[data-controls="three"] .page-orders .subtabs { order: 1; flex-basis: 100%; }
  html[data-controls="three"] .page-orders .subtabs .thumb, html[data-controls="three"] .plan-filters { display: none; }
  html[data-controls="three"] .rs-day .rs-day__n { display: contents; }
  /* the sliding mark is placed for the screen's cells: on paper the day itself carries it */
  html[data-controls="three"] .rs-week__days .thumb { display: none; }
  html[data-controls="three"] .rs-week__days.has-thumb .rs-day[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
}
/* By touch: steppers 48, one line rows 48, and everything else keeps its drawing and gets a 44 px hit area. */
@media screen and (any-pointer: coarse) {
  html[data-controls="three"] { --step: 48px; --step-in: 46px; --row: 48px; }
  html[data-controls="three"] :is(.btn, .tab, .search, .icon-btn, .close, .choice button, .segments button, .chips > .chip--lg, .week-nav__group > button, .week-nav__title, .rs-week__arrow, .switch, .back, .subtab, .rs-day, .add-chip, .recipe__x, .rs-log__undo, .pk .c-slip button) { position: relative; }
  html[data-controls="three"] :is(.btn, .tab, .search, .icon-btn, .close, .choice button, .segments button, .chips > .chip--lg, .week-nav__group > button, .week-nav__title, .rs-week__arrow, .switch, .back, .subtab, .rs-day, .add-chip, .recipe__x, .rs-log__undo, .pk .c-slip button)::before { content: ""; position: absolute; inset: min(0px, calc(50% - 22px)) 0; }
  html[data-controls="three"] :is(.icon-btn, .close, .rs-week__arrow, .add-chip, .recipe__x, .week-nav__arrow, .pk .c-slip button)::before { inset: min(0px, calc(50% - 22px)); }
  html[data-controls="three"] .star:not(:disabled) { position: relative; }
  html[data-controls="three"] .star:not(:disabled)::after { content: ""; position: absolute; inset: -6px; }
  html[data-controls="three"] .bc--starright .star:not(:disabled)::after { inset: -3px -5px -9px -7px; }
  /* a field has no box of its own to grow into: a clear edge above and below takes the press, the line is drawn inside it */
  html[data-controls="three"] :is(input.field, select.field, .input-num) { height: 44px; margin-block: -6px; border-block: 6px solid transparent; border-inline: 0; border-radius: 6px / 12px !important; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--border); }
  html[data-controls="three"] :is(input.field, select.field, .input-num):focus { border-color: transparent; box-shadow: inset 0 0 0 2px var(--teal-text); }
}
/* Counting what is on hand (Nov 24): the On hand card, the count, what it found, the bar. */
.oh__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.page-run .side--roast .oh__head .card__title { margin-bottom: 0; }
.oh__when { display: block; margin-bottom: 16px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
/* Nov 26: due and not saved, it says so with the red alert mark of the Reminders row. */
.oh__when--due { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; }
.oh__when--due .alert-mark { width: 14px; height: 14px; }
/* Edit count: quiet, there only on the day of the count. */
.oh__edit { position: relative; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; color: var(--muted); text-underline-offset: 3px; }
.oh__edit:hover { color: var(--teal-dark); text-decoration: underline; }
/* A batch pressed before the week's count: the one line that says why, over the window's own words. */
.cnt__why { margin-top: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; color: var(--red); }
.cnt__why + .consent__lead { margin-top: 4px; }
.oh__n { min-width: 56px; min-height: 36px; padding: 0 8px; margin: -4px -8px -4px 0; border-radius: var(--r); font-weight: 600; text-align: right; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.oh__n:hover { background: var(--row-hover); }
.countbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px var(--pad); border-bottom: 1px solid var(--line); background: var(--warn-tint); font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); color: var(--ink); }
.countbar > span { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; }
.countbar svg { flex: none; width: 16px; height: 16px; }
.countbar b { font-weight: 600; }
.countbar__left { color: var(--ink-soft); }
.countbar .btn { flex: none; }
.modal.countbox { display: flex; flex-direction: column; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding-bottom: 0; }
.countbox:focus { outline: none; }
.countbox > * { flex: none; }
.countbox .consent__foot { position: sticky; bottom: 0; margin: 16px -28px 0; padding: 16px 28px; background: var(--white); border-top: 1px solid var(--line); }
.countbox ~ .toast-wrap { z-index: 80; }
.modal.countbox--wide { width: min(848px, calc(100vw - 32px)); }
.modal.countbox--wide.countbox--grid { width: min(920px, calc(100vw - 32px)); overflow: hidden; }
.countbox--grid > .cnt__scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 16px -28px 0; padding: 0 28px; overscroll-behavior: contain; }
.countbox--grid .consent__foot { margin-top: 0; }
.cnt__head, .cnt__row { display: grid; grid-template-columns: minmax(104px, 1fr) repeat(var(--sizes, 4), 104px) 96px 88px; align-items: center; gap: 0 16px; }
.cnt__head { position: sticky; top: 0; z-index: 1; padding: 8px 0; border-bottom: 1px solid var(--line); background: var(--white); font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 600; color: var(--muted); }
.cnt__head span { text-align: center; } .cnt__head span:first-child { text-align: left; } .cnt__head span:last-child { text-align: right; } .cnt__head span:nth-last-child(2) { padding-right: 20px; }
.cnt { margin: 0; padding: 0 0 8px; list-style: none; }
.cnt__row { min-height: 56px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.cnt__row:last-child { border-bottom: 0; }
.cnt__name { font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; }
.cnt__name small { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 400; color: var(--muted); }
.cnt__sum { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.cnt__total { font-size: var(--heading-size, 14px); font-weight: 600; white-space: nowrap; }
.cnt__total.is-none { font-size: var(--body-size, 13px); font-weight: 400; color: var(--muted); }
.cnt__ask { flex: 1; min-width: 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; }
.qty { display: block; } .qty__l { display: none; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 600; color: var(--muted); }
.qtys { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; } .qtys .qty__l { display: block; margin-bottom: 4px; }
.stepper--32 { width: 104px; height: 32px; justify-content: space-between; box-shadow: none; }
.stepper--32 .stepper__btn { position: relative; width: 32px; height: 30px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.stepper--32 .stepper__val { flex: 1; min-width: 0; padding: 0; font-size: var(--heading-size, 14px); }
.stepper--32 .stepper__input { width: 100%; height: 30px; font-weight: 600; } .stepper--32 .stepper__input::placeholder, .qty--loose .field::placeholder { color: var(--faint); font-weight: 400; opacity: 1; }
.is-counted .stepper__input::placeholder, .is-counted .qty--loose .field::placeholder { color: var(--ink-soft); }
.cnt__box { display: inline-flex; align-items: center; gap: 8px; font-size: var(--body-size, 13px); color: var(--muted); }
.cnt__box .field { width: 72px; height: 32px; font-size: var(--heading-size, 14px); text-align: right; color: var(--ink); }
.cnt__row.is-bad .field { border-color: var(--red); }
.cnt__note { flex-basis: 100%; grid-column: 1 / -1; padding: 4px 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--red); }
.cnt__note .link { margin-left: 8px; min-height: 32px; text-decoration: underline; text-underline-offset: 2px; }
.cnt__foot { margin-top: 8px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.cnt__past { margin: 8px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; }
.cnt__list { margin: 4px 0 24px; padding: 0; list-style: none; }
.cnt__old { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; gap: 16px; min-height: 48px; padding: 4px 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); align-items: center; }
.cnt__old + .cnt__old { border-top: 1px solid var(--line-soft); }
.cnt__old .btn { justify-self: end; }
.cnt__old small { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.toast--count { gap: 8px; padding-left: 20px; }
.toast--count span { margin-right: 16px; }
.toast--count button { min-height: 32px; padding: 4px 12px; }
.why { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.why__chip { min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--white); font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 500; }
.why__chip:hover { border-color: var(--faint); }
.why__chip[aria-pressed="true"] { border-color: var(--teal-dark); background: var(--teal-dark); color: var(--white); }
.why__chip[aria-pressed="true"]::before { content: "\2713"; margin-right: 6px; }
.cnt__reasons { margin: 0 0 8px; padding: 0; list-style: none; }
.cnt__reasons li { display: flex; align-items: center; gap: 16px; padding: 4px 0; }
.cnt__reasons .field { flex: 1; min-width: 0; }
.cnt__reasons li.is-off .field { color: var(--muted); }
/* By touch a field is 44 px with 6 px of it reaching into the row's padding (control scale): rows 52 px, so no field covers the next. */
@media (any-pointer: coarse) { .cnt__reasons li { padding: 8px 0; } }
@media (any-pointer: coarse) { .oh__n { min-height: 44px; } .oh__edit::after { content: ""; position: absolute; inset: -12px -8px; } .why__chip { min-height: 44px; } .countbar .btn { min-height: 44px; }
  .stepper--32 .stepper__btn::after { content: ""; position: absolute; inset: -7px 0; } .stepper--32 .stepper__btn:first-child::after { left: -8px; right: -4px; } .stepper--32 .stepper__btn:last-child::after { right: -8px; left: -4px; } .stepper--32 .stepper__input { font-size: var(--large-size, 16px); } .qty--loose { padding: 6px 0; } .qty--loose .field { font-size: var(--large-size, 16px); }
  .countbox .consent__foot .btn { min-height: 48px; padding: 0 16px; } .toast--count button { min-height: 44px; } .cnt__old .btn { min-height: 44px; } }
@media (max-width: 919px) { .cnt__head { display: none; } .cnt__row { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px 16px; padding: 12px 0; } .cnt__name { grid-column: 1 / -2; } .cnt__sum { grid-column: -2 / -1; grid-row: 1; } .cnt__row .qty__l { display: block; margin-bottom: 4px; } }
@media (max-width: 720px) { .countbar { padding: 8px 16px; } }
@media print { .countbar, .oh__head .btn, .oh__edit { display: none !important; } .oh__n { text-decoration: none; } }

/* Reports (Nov 24). */
.page-reports .work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page-reports .title-group { display: flex; align-items: baseline; gap: 16px; }
.page-reports .actions { display: flex; gap: 8px; }
.rp__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.rp__range { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; padding: 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.rp__pick { margin-left: auto; font-size: 13px; line-height: 20px; color: var(--muted); }
.rp__head { margin: 8px 0; }
.rp__head h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.rp__head p { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--ink-soft); }
.wk .card__title { font-size: 14px; line-height: 20px; }
.wk__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 136px); gap: 8px; margin: 8px -8px -8px; overflow-x: auto; }
.wk__w { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 120px; padding: 8px 4px; border-radius: 6px; font-size: 12px; line-height: 16px; }
.wk__w:hover { background: var(--row-hover); }
.wk__w[aria-pressed="true"] { background: var(--tint-soft); }
.wk__n { font-size: 13px; line-height: 20px; font-weight: 600; } .wk__n.is-none { font-weight: 400; color: var(--muted); }
.wk__bar { display: block; width: 24px; margin: 4px 0 0; border-radius: 4px 4px 0 0; background: var(--teal-text); }
.wk__w[aria-pressed="true"] .wk__bar { background: var(--teal-dark); }
.wk__d { color: var(--muted); } .wk__bar + .wk__d { width: 100%; margin-top: 0; padding-top: 4px; border-top: 1px solid var(--border); text-align: center; }
.wk__w[aria-pressed="true"] .wk__d { color: var(--ink); font-weight: 600; }
.rp__dates { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.rp__dates label { display: inline-flex; align-items: center; gap: 8px; }
.rp__dates .field { width: 144px; color: var(--ink); }
.card.rp { overflow: hidden; padding: 0; }
.rp__scroll { overflow-x: auto; }
.rp__table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.rp__table th, .rp__table td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.rp__table .r { text-align: right; white-space: nowrap; }
.rp__table thead th { padding: 8px; background: var(--thead); border-bottom: 1px solid var(--line); font-size: 12px; line-height: 16px; font-weight: 550; color: var(--muted); }
.rp__table tr > :first-child { padding-left: 24px; }
.rp__table tr > :last-child { padding-right: 24px; }
.rp__table tbody th { font-weight: 550; white-space: nowrap; }
.rp__table small { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.rp__table b { font-weight: 600; }
.rp__table tbody tr:last-child > * { border-bottom: 0; }
.rp__name { font-weight: 550; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; text-align: left; }
.rp__name:hover { text-decoration-color: currentColor; }
.rp__name:has(.rp__chev) { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.rp__chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform var(--hover) var(--ease); }
[aria-expanded="true"] > .rp__chev { transform: rotate(90deg); }
.rp__table { table-layout: fixed; } .rp__table thead th:first-child { width: 34%; }
.rp__table .rp__group th { padding: 16px 24px 4px; border-bottom: 0; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.rp__quiet { color: var(--muted); }
.rp__off { color: var(--red); }
.is-match th, .is-match b, .is-none th, .is-first th { font-weight: 400; } .is-match td, .is-match .rp__name, .is-none .rp__name { color: var(--ink-soft); }
.rp__table tr.is-open > * { border-bottom-color: transparent; }
.rp__table .rp__say td:first-child { padding: 0 24px 16px 48px; } .rp__say p { max-width: 72ch; font-size: 13px; line-height: 20px; color: var(--ink-soft); } .rp__say b { color: var(--ink); } .rp__say .link { display: inline-block; margin-top: 4px; font-size: 13px; line-height: 20px; }
.oh__link { display: block; width: max-content; }
.tr svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.tr__bar { fill: var(--teal-text); } .tr__g:hover .tr__bar, .tr__g:focus .tr__bar { fill: var(--teal-dark); } .tr__g:focus { outline: none; }
.tr__base { stroke: var(--border); stroke-width: 1; fill: none; }
.tr__v, .tr__x { font-size: 12px; text-anchor: middle; font-variant-numeric: tabular-nums; } .tr__v { fill: var(--ink); font-weight: 600; } .tr__x { fill: var(--muted); }
@media (any-pointer: coarse) { .rp__name { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; } .page-reports .btn, .rp__dates .field { min-height: 44px; } }
@media print {
  .page-reports .actions, .page-reports .week-nav__arrow, .rp__bar .btn, .rp__dates, .page-reports .back, .rp__pick, .rp__chev, .rp__say .link { display: none !important; }
  .page-reports .main, .page-reports .work { display: block; padding: 0; } .page-reports .work > * { margin-top: 12px; }
  .card.rp { border: 0; box-shadow: none; } .rp__scroll { overflow: visible; }
  .rp__table { font-size: 10px; line-height: 14px; } .rp__table small { font-size: 8px; line-height: 10px; } .rp__table th, .rp__table td { padding: 4px 5px; } .rp__table tr > :first-child, .rp__table tr > :last-child { padding-left: 5px; padding-right: 5px; }
  .page-reports .week-nav__group { border: 0; box-shadow: none; } .rp__range { padding: 0; } .wk__bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; } .wk, .wk__w[aria-pressed="true"] { background: none; } .rp__say p { font-size: 10px; line-height: 14px; }
  .rp__name { text-decoration: none; } .rp__table tr { break-inside: avoid; }
}
@media (max-width: 1140px) { .top:has(.tab[href="#reports"]) { gap: 16px; } .top:has(.tab[href="#reports"]) .tab { padding-left: 10px; padding-right: 10px; } .top:has(.tab[href="#reports"]) .brand { padding-right: 0; } }

/* Staff Coffee (Nov 25). */
.usd { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; margin-top: 16px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); align-items: start; }
.modal.countbox--wide:has(.usd) { width: min(944px, calc(100vw - 32px)); }
.usd__l { display: block; padding-top: 6px; color: var(--muted); }
.usd__l b { display: block; font-weight: 600; color: var(--ink); }
.usd .why { margin-top: 0; } .usd .why__chip { min-height: 32px; }
.usd .field { height: 32px; font-size: var(--body-size, 13px); } .usd__text { width: 144px; }
.usd__when { display: flex; gap: 8px; } .usd__when select { flex: none; width: 144px; } .usd__when input { flex: 1; min-width: 0; }
[data-used-hint]:empty { display: none; }
.sc { margin-bottom: 0; } .sc .usd__row > b { font-weight: 600; }
@media (any-pointer: coarse) { .usd .why__chip, .usd .why .field, .usd__when .field { height: 44px; min-height: 44px; } .usd .field { font-size: var(--large-size, 16px); } .usd .cnt__box .field { height: 32px; } .qtys .qty--loose { padding: 0; } .usd__l { padding-top: 12px; } }
.usd__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }
.usd__row + .usd__row { border-top: 1px solid var(--line-soft); }
.usd__row small { display: block; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.usd__row > span { flex: 1; min-width: 0; } .usd__row .btn { flex: none; } .usd__row { gap: 8px; }
@media (any-pointer: coarse) { .usd__row .btn { min-height: 44px; } .oh__link, .onhand__fix { min-height: 44px; display: flex; align-items: center; margin-top: 0; } }
@media print { .usd__row .btn { display: none !important; } }

/* Go-out day on the Weekly Plan (Andie, Nov 26; flag sendDayLate). The setting at the top reads as a sentence; each
   customer carries a bordered chip, "Out Tue", that opens the day picker, and a customer set apart from the setting
   gets the filled chip, so the exceptions read at a glance. Online orders say their rule in plain grey instead. */
.wp-out { margin: 16px 0 0; }
.wp-out label { color: var(--ink); }
.wp-out select.field { width: auto; min-width: 200px; }
.wp-out__say { color: var(--ink); }
.bc--plan .bc__out { position: relative; display: inline-flex; align-self: flex-start; align-items: center; margin-top: 4px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--white); font-weight: 500; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--ink-soft); white-space: nowrap; }
.bc__outtext { padding-right: 16px; background: no-repeat right center / 8px 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 2.5l3 3 3-3' fill='none' stroke='%234f4a44' stroke-width='1.3'/%3E%3C/svg%3E"); }
/* The native picker sits over the chip, unseen, so the whole chip opens it. */
.bc__outpick { position: absolute; inset: 0; width: 100%; opacity: 0; appearance: none; -webkit-appearance: none; border: 0; font: inherit; cursor: pointer; }
.bc--plan .bc__out:not(.is-fixed):hover { border-color: var(--ink-soft); color: var(--ink); }
.bc__out:focus-within { outline: 2px solid var(--teal-text); outline-offset: 2px; }
.bc--plan .bc__out.is-own { border-color: var(--teal-dark); background: var(--teal-dark); color: var(--cream); }
.bc--plan .bc__out.is-own .bc__outtext { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 2.5l3 3 3-3' fill='none' stroke='%23ffffff' stroke-width='1.3'/%3E%3C/svg%3E"); }
.bc--plan .bc__out.is-own:hover { border-color: var(--brand-press); background: var(--brand-press); color: var(--cream); }
.bc__outsay { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }

/* ==========================================================================================================
   The Roaster's Desk look (Nov 26, Chris: direction A, Ink, plus B's paintings in empty states only). Account flag
   rdBrand: src/app.js sets html[data-brand="rd"] and leaves the account's own colours out. Nothing here applies without
   it. Tokens are the landing's (landing-site-2026-11-17/variant-b) and the painting's deep blue, #2b3a49.
   The brand move: ink, the dot, the blue. The dot marks where you are (the tab you are on, today, the empty logo
   slot); the blue is on what you press to move the day on; the paintings come in only where a screen has nothing to
   show yet, never behind data.
   ========================================================================================================== */
@font-face { font-family: Questrial; font-weight: 400; font-display: swap; src: url(/assets/login/questrial-normal.woff2) format("woff2"); }
@font-face { font-family: Newsreader; font-weight: 300 500; font-display: swap; src: url(/assets/login/newsreader-normal.woff2) format("woff2"); }
html[data-brand="rd"] {
  --rd-ink: #181a22; --rd-blue: #2b3a49; --rd-blue-press: #1e3043;
  --teal-dark: #2b3a49; --brand-press: #1e3043; --teal-text: #2b3a49; --shade-rgb: 24, 26, 34;
  --cream: #ffffff; --cream-rgb: 255, 255, 255;
  --tint: #dde4ec; --tint-soft: rgba(43, 58, 73, 0.05); --chip: #eceff3; --info: #eef2f6;
  --page: #f6f7f9; --sand: #f6f7f9; --segment: #eff1f4; --line: #e3e6eb; --line-soft: #eceef2; --border: #d3d8df;
  --past: #eef0f3; --chip-n: #eef0f3; --fill-n: #f5f6f8; --card-in: #f7f8fa; --thead: #f7f8fa; --side-bg: #f6f7f9;
  --nav-on: #eceff3; --work: #fafbfc; --ink: #181a22; --ink-soft: #454b58; --muted: #5b6170; --faint: #9aa2b1;
  --card-shadow: 0 0 0 1px #e3e6eb, 0 1px 2px rgba(24, 26, 34, 0.05);
  --mark: Questrial, Figtree, sans-serif;
  --voice: Newsreader, "Iowan Old Style", Georgia, serif;
}

/* The top bar: the landing's ink, its wordmark, then the roaster's light logo. */
html[data-brand="rd"] .top { background: var(--rd-ink); gap: 24px; }
html[data-brand="rd"] .brand { gap: 12px; padding-right: 0; }
html[data-brand="rd"] .brand__mark { font: 400 19px/24px var(--mark); letter-spacing: -0.01em; color: #fff; white-space: nowrap; }
html[data-brand="rd"] .brand__rule { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.24); }
html[data-brand="rd"] .brand .brand__logo { width: auto; max-width: 112px; height: 20px; object-fit: contain; object-position: left center; }
html[data-brand="rd"][data-route="green"] .top__end { background: var(--rd-ink); box-shadow: -12px 0 12px -8px var(--rd-ink); }

/* The roaster's slot, empty: a frame drawn in the landing's dots, 4 px on an 8 px pitch. It opens Settings > Logo. */
.logo-slot {
  --dot: rgba(255, 255, 255, 0.5);
  display: inline-grid; place-items: center; width: 80px; height: 24px; flex: none;
  font: 500 12px/16px var(--font); color: rgba(255, 255, 255, 0.72); white-space: nowrap;
  background:
    radial-gradient(circle, var(--dot) 1.5px, transparent 2px) 0 0 / 8px 4px repeat-x,
    radial-gradient(circle, var(--dot) 1.5px, transparent 2px) 0 100% / 8px 4px repeat-x,
    radial-gradient(circle, var(--dot) 1.5px, transparent 2px) 0 0 / 4px 8px repeat-y,
    radial-gradient(circle, var(--dot) 1.5px, transparent 2px) 100% 0 / 4px 8px repeat-y;
}
a.logo-slot { transition: color var(--hover) var(--ease); }
a.logo-slot:hover { --dot: rgba(255, 255, 255, 0.85); color: #fff; }
.logo-slot--dark { --dot: rgba(24, 26, 34, 0.4); color: var(--muted); }

/* The tab you are on gets the dot, as the landing's nav does, instead of a filled pill. (::after: the control scale
   uses ::before for touch areas.) */
html[data-brand="rd"] .tabs .thumb { display: none; }
html[data-brand="rd"] .tab[aria-current="page"], html[data-brand="rd"] .tabs.has-thumb .tab[aria-current="page"] { background: none; color: #fff; }
html[data-brand="rd"] .tab::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.45s cubic-bezier(0.22, 0.8, 0.24, 1); pointer-events: none; }
html[data-brand="rd"] .tab[aria-current="page"]::after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html[data-brand="rd"] .tab::after { transition: none; } }

/* Today is the brand dot, in the painting's blue; primary actions are that blue too (--teal-dark above). */
html[data-brand="rd"] .today-dot { background: var(--rd-blue); }

/* The search stays a search at 1024 with the logo in the bar: "Search" always shows; the words after it give way. */
html[data-brand="rd"] .search { width: 280px; min-width: 112px; flex: 0 1 auto; }
/* Under 1280 the bar's room for the logo comes out of the gaps, the tabs' side padding and the clock's date line (the
   date is on every page beneath it); the search keeps "Search" and its key. */
@media (max-width: 1279px) {
  html[data-brand="rd"] .top { gap: 16px; }
  html[data-brand="rd"] .search__more { display: none; }
  html[data-brand="rd"] .top .search { flex: none; width: 112px; min-width: 112px; }
  html[data-brand="rd"] .clock span { display: none; }
}
@media (max-width: 1180px) {
  html[data-brand="rd"] .brand { gap: 8px; }
  html[data-brand="rd"] .brand__mark { font-size: 18px; }
  html[data-brand="rd"] .logo-slot { width: 72px; }
  html[data-brand="rd"] .brand .brand__logo { max-width: 80px; }
  html[data-brand="rd"] .top { gap: 12px; }
  html[data-brand="rd"] .top:has(.tab[href="#green"]) .tabs__rule { margin: 0 4px; }
  html[data-brand="rd"] .icons { gap: 8px; }
}

/* ---------- Paintings, only where a screen has nothing to show yet. Each one covers its box at any width, held near the lighter foot of the dawn so the words sit on light (Nov 26 paint fix). ---------- */
html[data-brand="rd"] :is(.rs-log, .olist, .pack > .card, .stp, .rs-list[data-suggested]) > .empty {
  display: flex; align-items: flex-end; min-height: 120px; margin: 16px 0 0; padding: 16px; border-radius: var(--rad, 6px);
  background: #dfe7ef url(/assets/brand/dawn-1200.jpg) 72% 88% / cover no-repeat;
  color: var(--rd-ink); text-align: left; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: var(--strong, 600);
}
html[data-brand="rd"] :is(.olist, .pack > .card) > .empty { min-height: 200px; margin: 16px; background-size: cover; background-position: 60% 88%; }
/* A day with no roasting: the day off is painted, quietly, the sky the next roast day opens on. */
html[data-brand="rd"] .rs-offday { background: #e9eef3 url(/assets/brand/steam-1200.jpg) 20% 30% / cover no-repeat; min-height: 176px; }
html[data-brand="rd"] .rs-offday .rs-offday__text { max-width: 480px; color: var(--rd-ink); }

/* ---------- Packing slip: the roaster's own dark logo, as it is (no filter) ---------- */
.slip__top .slip__logo { width: auto; max-width: 200px; height: 32px; object-fit: contain; object-position: left bottom; filter: none; }

/* ---------- Settings > Logo: each logo on the background it goes on ---------- */
.logo-card .card__title { margin-bottom: 16px; }
.logo-card__view { display: grid; place-items: center; height: 128px; border-radius: var(--rad, 6px); }
.logo-card__view--light { background: var(--rd-ink, #181a22); }
.logo-card__view--dark { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.logo-card__view img { width: auto; max-width: 75%; height: 40px; object-fit: contain; }
.logo-card__say { display: flex; align-items: center; min-height: 20px; margin: 16px 0 0; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
.logo-card__acts { display: flex; gap: 8px; margin-top: 16px; }

/* ---------- Settings sidebar foot with rdBrand: a rule after Demo, a real Show tips button, the version at the bottom ---------- */
html[data-brand="rd"] .settings__nav { position: sticky; top: 64px; align-self: start; min-height: calc(100vh - 64px); }
.settings__rule { width: calc(100% - 24px); margin: 16px 12px; border: 0; border-top: 1px solid var(--line); }
html[data-brand="rd"] .settings__tips { margin: 0 12px; align-self: flex-start; }
.settings__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding: 32px 12px 0; }
.settings__ver { font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--faint); }

/* ---------- What's new as release notes: newest first, version and date, grouped New, Improved, Fixed ---------- */
.whatsnew--list { width: min(560px, calc(100vw - 32px)); }
.whatsnew__body { max-height: min(60vh, 560px); margin: 16px -24px 0; padding: 0 24px; overflow-y: auto; }
.rn + .rn { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.rn__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); font-weight: 600; }
.rn__date { font-weight: 400; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
.rn__group { margin-top: 16px; }
.rn__badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 500; }
.rn__badge--new { background: #e3ecf5; color: #2b3a49; }
.rn__badge--improved { background: #e6f1ea; color: #1f5a36; }
.rn__badge--fixed { background: #f3ece2; color: #6b4a1f; }
.rn ul { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
.rn li b { font-weight: 600; color: var(--ink); }
/* What's new: each note's title on its own line above its text, 16px between notes (Chris, Nov 26). */
.rn ul { gap: 16px; }
.rn__group li b, .whatsnew__list li b { display: block; margin-bottom: 4px; }

/* ==========================================================================================================
   Brand moments (Nov 26, Chris approved the nine). The rule: Newsreader is the desk's own voice. It names the page, asks
   the desk's questions, and speaks when a screen is empty or finished. Never in data, tables, controls, alerts or chips.
   ========================================================================================================== */
/* 1. Page titles. #page keeps drawers and dialogs out; the id outranks the older title rules above. */
html[data-brand="rd"] #page :is(.title, .title--week span) { font-family: var(--voice); font-weight: 500; font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); letter-spacing: -0.02em; color: var(--ink); }

/* 2. The Monday count asks its question in the desk's voice; one plain line under it. */
html[data-brand="rd"] .countbox > h2 { font-family: var(--voice); font-weight: 400; font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); letter-spacing: -0.01em; color: var(--ink); }
html[data-brand="rd"] .countbox > .consent__lead { margin-top: 8px; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }

/* 3. Complete Roast Day, done: the dawn in the disc, the ink check, the words in the desk's voice. */
html[data-brand="rd"] .cd-stamp { gap: 8px; font-size: var(--body-size, 13px); line-height: 24px; color: var(--muted); }
html[data-brand="rd"] .cd-stamp svg { width: 24px; height: 24px; padding: 4px; background: #dfe7ef url(/assets/close/dawn-band.jpg) 50% 50% / cover no-repeat; color: var(--rd-ink); }
html[data-brand="rd"] .cd-stamp b { font-family: var(--voice); font-weight: 500; font-size: var(--large-size, 16px); line-height: var(--large-line, 24px); color: var(--ink); }
html[data-brand="rd"] .cd-stamp .cd-reopen { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }

/* 4 and 5. A painting speaks in the desk's voice; a second sentence stays in Figtree. */
html[data-brand="rd"] :is(.rs-log, .olist, .pack > .card, .stp, .rs-list[data-suggested]) > .empty { font-family: var(--voice); font-weight: 400; font-size: var(--figure-size, 20px); line-height: var(--figure-line, 28px); color: var(--rd-ink); }
html[data-brand="rd"] :is(.stp, .rs-list[data-suggested]) > .empty { min-height: 120px; margin: 0; background-size: cover; background-position: 64% 88%; }
html[data-brand="rd"] .rs-offday > .card__title { font-family: var(--voice); font-weight: 400; font-size: var(--figure-size, 20px); line-height: var(--figure-line, 28px); color: var(--rd-ink); }
html[data-brand="rd"] .rs-offday .rs-offday__text { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); }

/* 7. What's new: one dawn band across the top, the title in the desk's voice, the groups as plain headings. */
html[data-brand="rd"] .whatsnew { overflow: hidden; }
html[data-brand="rd"] .whatsnew::before { content: ""; display: block; height: 96px; margin: calc(-1 * var(--s24, 28px)) calc(-1 * var(--s24, 28px)) 24px; background: #dfe7ef url(/assets/brand/dawn-1200.jpg) 60% 40% / cover no-repeat; }
html[data-brand="rd"] .whatsnew > h2 { font-family: var(--voice); font-weight: 400; font-size: var(--title-size, 24px); line-height: var(--title-line, 32px); letter-spacing: -0.01em; color: var(--ink); }
html[data-brand="rd"] .rn__head { font-weight: 500; font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--muted); }
html[data-brand="rd"] .rn__group { margin-top: 32px; }
html[data-brand="rd"] .rn__head + .rn__group { margin-top: 16px; }
html[data-brand="rd"] .rn__badge { display: block; padding: 0; border-radius: 0; background: none; font-weight: 600; font-size: var(--heading-size, 14px); line-height: var(--heading-line, 20px); color: var(--ink); }

/* 10. The day strip, one level (Chris: "a pill in a pill in a pill"). No track, no date chip: each day is a quiet column,
   the day shown is the only filled shape, today keeps its dot, past days and days off are quieter in colour only. */
html[data-brand="rd"] .rs-week { gap: 16px; }
html[data-brand="rd"] .rs-week__days, html[data-brand="rd"][data-controls] .rs-week__days { gap: 8px; padding: 0; background: none; box-shadow: none; }
html[data-brand="rd"] .rs-week__days .thumb { display: none; }
html[data-brand="rd"] .rs-week__days .rs-day, html[data-brand="rd"][data-controls] .rs-week__days .rs-day {
  width: 96px; min-height: 48px; padding: 4px 12px; gap: 0; justify-content: center; border: 0; border-radius: 8px !important;
  background: none; box-shadow: none; transition: background-color var(--hover) var(--ease);
}
/* at 1024 the title, Back to today and Read only share the row: the columns sit closer, each keeps its 88 */
html[data-brand="rd"][data-tight] .rs-week { gap: 8px; }
html[data-brand="rd"][data-tight] .rs-week__days, html[data-brand="rd"][data-tight][data-controls] .rs-week__days { gap: 4px; }
html[data-brand="rd"][data-tight] .rs-week__days .rs-day { width: 88px; padding-inline: 8px; }
@media screen and (hover: hover) { html[data-brand="rd"] .rs-week__days .rs-day:not([aria-pressed="true"]):hover { background: var(--fill-n); } }
html[data-brand="rd"] .rs-week__days .rs-day .rs-dd, html[data-brand="rd"][data-controls] .rs-week__days .rs-day .rs-dd { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 0; border-radius: 0; background: none !important; font-weight: 500; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); }
html[data-brand="rd"] .rs-week__days .rs-day :is(b, .rs-day__off) { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); font-weight: 600; color: var(--ink); }
html[data-brand="rd"] .rs-week__days .rs-day small:not(.rs-day__nm) { font-size: var(--body-size, 13px); line-height: var(--body-line, 20px); color: var(--ink-soft); }
html[data-brand="rd"] .rs-week__days .rs-day .rs-day__nm { margin-right: 0; font-size: var(--small-size, 12px); }
/* past days and the day off: the same column, in the quieter greys */
html[data-brand="rd"] .rs-week__days .rs-day:is(.is-past, .is-off):not([aria-pressed="true"]) :is(.rs-dd, b, .rs-day__off, small:not(.rs-day__nm)) { color: var(--faint); }
html[data-brand="rd"] .rs-week__days .rs-day.is-off .rs-day__off { font-weight: 500; }
/* the day shown: ink, as the bar above it */
html[data-brand="rd"] .rs-week__days .rs-day[aria-pressed="true"], html[data-brand="rd"][data-controls] .rs-week__days.has-thumb .rs-day[aria-pressed="true"] { background: var(--rd-ink); box-shadow: none; }
html[data-brand="rd"] .rs-week__days .rs-day[aria-pressed="true"] :is(.rs-dd, b, .rs-day__off, small) { color: #fff; }
html[data-brand="rd"] .rs-week__days .rs-day[aria-pressed="true"] .rs-dd { color: rgba(255, 255, 255, 0.72); }
html[data-brand="rd"] .rs-week__days .rs-day[aria-pressed="true"] .today-dot { background: #fff; }
html[data-brand="rd"] .rs-week__days .rs-day[aria-pressed="true"] .rs-day__nm { color: #ffb8ae; }
/* on paper a day is three lines either way, so each column starts at the top, with or without the control sizes */
@media print { html[data-brand="rd"] .rs-week__days .rs-day, html[data-brand="rd"][data-controls] .rs-week__days .rs-day { justify-content: flex-start; } }

/* ==========================================================================================================
   Fourth staging release (Nov 26, UI consistency audit). One place, so it reads as one pass.
   ========================================================================================================== */
/* Colours the rebrand missed: the fills, tracks, hover rows and scrims go cool, in the rd ink. */
html[data-brand="rd"] {
  --fill: #f5f6f8; --track: #e6e9ee; --row-hover: #eef0f3;
  --chip-shadow: 0 1px 2px rgba(24, 26, 34, 0.12), 0 0 0 0.5px rgba(24, 26, 34, 0.06);
  --scrim: rgba(24, 26, 34, 0.32);
}
html[data-brand="rd"] .btn--dark { border-color: var(--teal-dark); }
/* Dialog and panel titles are Figure, 20/28. */
html[data-type="six"] .consent h2, html[data-type="six"] .drawer__heading, html[data-type="six"] .pop.spare :is(h2, h3, .pop__title):first-of-type { font-size: var(--figure-size, 17px); line-height: var(--figure-line, 24px); letter-spacing: var(--letter-tight, normal); }
/* Today's Roast Batches card on the 8 grid. */
@media screen { html[data-controls="three"] .bt-today.rb-card { padding: 16px; } } /* paper keeps its own, the same with the flag off */
/* Next morning (Roasted / Roast today / Not needed): the dividers sit inside the group. By touch ::before is the 44 px
   hit area, so the divider is drawn as a 1 px background line, not a pseudo element. */
.nm__ways .btn + .btn::before { background: none; }
.nm__ways .btn + .btn { background-image: linear-gradient(var(--border), var(--border)); background-size: 1px 20px; background-position: left center; background-repeat: no-repeat; }
/* Partial count: the coffees not counted yet, in grey. */
.oh__not { margin-left: 4px; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); font-weight: 400; color: var(--faint); white-space: nowrap; }
/* Complete Roast Day let go too early: the line under the button. */
.cd-hold-wrap { position: relative; }
.cd-hold__tip { position: absolute; top: calc(100% + 4px); right: 0; font-size: var(--small-size, 12px); line-height: var(--small-line, 16px); color: var(--muted); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.16s var(--ease); }
.cd-hold-wrap.is-hinting .cd-hold__tip { opacity: 1; }
@media print { .cd-hold__tip { display: none; } }
/* A roast level in a narrow batch tile: the short form, never a word cut in half. */
.rs-run__lvl .lvl-s { display: none; }
@media screen { html[data-tight] .rs-run__b .rs-run__lvl .lvl-l { display: none; } html[data-tight] .rs-run__b .rs-run__lvl .lvl-s { display: inline; } }
/* Plan at iPad width: names on up to two lines, the day's orders and pounds on one line, the batches below them. */
html[data-tight] .bc__name { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: break-word; }
html[data-tight] .bd__meta { flex-wrap: wrap; row-gap: 4px; }
html[data-tight] .bd__meta > span:first-child { white-space: nowrap; }
html[data-tight] .bd__meta .bd__cap { margin-left: 0; }
/* The Roasting day strip at iPad width: 8 px between the days. */
html[data-brand="rd"][data-tight] .rs-week__days, html[data-brand="rd"][data-tight][data-controls] .rs-week__days { gap: 8px; }
html[data-brand="rd"][data-tight] .rs-week__days .rs-day, html[data-brand="rd"][data-tight][data-controls] .rs-week__days .rs-day { width: 84px; }
/* By touch: footers one height (48), steppers 48, fields 16 px so iPad Safari does not zoom, and 44 px hit areas. */
@media screen and (any-pointer: coarse) {
  html[data-controls="three"] :is(.consent__foot, .drawer__foot, .cd__foot) .btn { min-height: 48px; }
  html[data-controls="three"] .stepper--32 { width: 136px; height: 48px; }
  html[data-controls="three"] .stepper--32 .stepper__btn { width: 46px; height: 46px; }
  html[data-controls="three"] .stepper--32 .stepper__input { height: 46px; }
  html[data-controls="three"] :is(input.field, select.field, textarea.field, textarea, .stepper__input, .input-num) { font-size: var(--large-size, 16px); }
  html[data-controls="three"] :is(.name-chip button, .att, .rs-card__name, .th, .settings__nav a, .add-chip, .ptip__i) { position: relative; }
  html[data-controls="three"] :is(.name-chip button, .att, .rs-card__name, .th, .settings__nav a, .add-chip, .ptip__i)::after { content: ""; position: absolute; inset: min(0px, calc(50% - 22px)) min(0px, calc(50% - 22px)); }
  html[data-controls="three"] :is(select.bc__add, select.bc__outpick) { min-height: 44px; }
}
