/* SetDip design system (always the bright light look; the tablet board has its own light/dark setting)
   Paper:  #f4f6f9   Surface: #ffffff   Ink: #14202e
   Brand:  #0b6e5f (prep green)   Tape: #ffd43b (masking tape label)
   Type:   Bricolage Grotesque for headings, Figtree for everything else */

/* The site's two fonts, served from mybohq.com itself instead of Google Fonts.
   One less outside server to wait for, so the real letters arrive with the page and nothing jumps.
   Each file covers every weight we use. "latin" covers English and Spanish (á, ñ, ¿, ¡); "latin ext" only
   downloads if a page ever shows rarer letters. Both fonts are free to host under the SIL Open Font License.
   The file names carry the font version, so a new version gets a new name and browsers can keep these for a year. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-stretch: 100%; font-display: swap;
  src: url("/fonts/bricolage-grotesque-v9-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-stretch: 100%; font-display: swap;
  src: url("/fonts/bricolage-grotesque-v9-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/figtree-v9-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/figtree-v9-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Look alike stand ins while the web fonts load. Arial is resized to match Bricolage Grotesque
   and Figtree across the site's own wording, so the words take the same space before and after the real font
   arrives and the page doesn't jump (Google's layout shift score). Measured from the font files
   against the home page wording, Nov 17 2026. A device without Arial just skips these. */
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 600 800; size-adjust: 95.2%; ascent-override: 97.7%; descent-override: 28.4%; line-gap-override: 0%; }
@font-face { font-family: "Figtree Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");
  font-weight: 300 500; size-adjust: 100.1%; ascent-override: 94.9%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: "Figtree Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 600 900; size-adjust: 95.4%; ascent-override: 99.6%; descent-override: 26.2%; line-gap-override: 0%; }

:root {
  --bg: #f6fbff;
  --surface: #ffffff;
  --surface-2: #eef5fb;
  --ink: #14202e;
  --muted: #4b5768;
  --line: #d7e2ec;
  --accent: #18c48f;          /* bright prep green: buttons, bars, fills */
  --accent-ink: #06291f;      /* text on bright green */
  --accent-text: #0a7457;     /* green used as text and links */
  --accent-soft: #dcf8ec;
  --tape: #ffd43b;
  --tape-ink: #2b2100;
  /* Day dot colors for icons and stickers, each with readable text */
  --sun: #ffd43b;   --sun-soft: #fff3c4;   --sun-ink: #6b4e00;
  --coral: #ff7a59; --coral-soft: #ffe4d9; --coral-ink: #7a2e12;
  --sky: #4cc3ff;   --sky-soft: #e3f4ff;   --sky-ink: #0b4f7a;
  --grape: #9b7bff; --grape-soft: #efeaff; --grape-ink: #5b3fb8;
  --danger: #b42318;
  --ok: #1e6b2f;
  --focus: #1a56db;
  --display: "Bricolage Grotesque", "Bricolage Fallback", "Figtree", "Figtree Fallback", system-ui, sans-serif;
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(20 32 46 / .05), 0 10px 30px rgb(40 90 140 / .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font, "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-family: var(--font-head, var(--font, var(--display))); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent-text); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .6rem 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

/* ---------- Top bar ---------- */
/* English / Español switch on the dashboard, log in page and tablet preview (same as the public site) */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; }
.lang-btn svg { width: 18px; height: 18px; flex: none; }
.lang-btn[aria-busy=true] { opacity: .7; cursor: progress; }
.lang-btn .lang-short { display: none; }
@media (max-width: 559px) {
  .lang-btn { padding-left: 12px; padding-right: 12px; }
  .lang-btn .lang-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .lang-btn .lang-short { display: inline; font-weight: 800; }
}
/* The language button inside a menu (phones): the full word, never the short ES. */
.lang-menu-btn .lang-short { display: none !important; }
.lang-menu-btn .lang-word { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; clip-path: none !important; }

.topbar { background: color-mix(in srgb, var(--surface) 88%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(10px); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; line-height: 1; }
.brand .mark { display: none; }  /* old spot for a logo; the BOHQ mark is in the wordmark now */
/* The BOHQ logo: BOH in the display font, and a Q drawn as a circle with a green check for its tail. The check
   cuts a small gap in the circle (an SVG mask, so it works on any background). It sizes with the font, so each
   header sets only font-size. Black parts follow the text color; the check is the green used for links. */
.bohq { display: inline-flex; align-items: center; gap: .04em; }
.bohq-q { width: .86em; height: .8em; margin-top: .06em; flex: none; overflow: visible; }
.bohq-check { stroke: var(--brand-check, var(--accent-text)); }
.who { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); font-weight: 600; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; font-family: var(--display); }
main { padding: 32px 0 72px; }

/* ---------- Building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Masking tape label: the one playful accent */
.tape { display: inline-block; background: var(--tape); color: var(--tape-ink); font-weight: 700; font-size: .9rem; padding: 3px 12px 4px; border-radius: 3px; transform: rotate(-1.5deg); box-shadow: 0 1px 0 rgb(0 0 0 / .08); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--accent-text); border-color: var(--accent-text); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover, .btn.secondary:hover { background: var(--surface-2); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn.big { min-height: 56px; padding: 0 28px; font-size: 1.1rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }

label { display: block; font-weight: 700; margin-bottom: .35rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .92rem; margin-top: .15rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; min-height: 50px; padding: 11px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm);
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); }
input[type=file] { font: inherit; max-width: 100%; }
.field + .field { margin-top: 1rem; }
.grid > .field { margin-top: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 800; font-size: 1.1rem; margin-bottom: .75rem; padding: 0; font-family: var(--display); }

.status { padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface); }
.status[data-kind=error] { border-color: var(--danger); color: var(--danger); }
.status[data-kind=ok] { border-color: var(--ok); color: var(--ok); }

.pill { display: inline-block; font-size: .82rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }
.pill.quiet { background: var(--surface-2); color: var(--muted); }

.tabs { display: flex; gap: .25rem; background: var(--surface-2); padding: 5px; border-radius: 999px; margin-bottom: 1.5rem; }
.tabs button { flex: 1; background: none; border: 0; border-radius: 999px; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 46px; }
.tabs button[aria-selected=true] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }

.status .spam-word{color:var(--danger);font-weight:800}
/* A message under one box, like "The passwords don't match". Red text plus a red border, never color alone. */
.field-error{margin:.4rem 0 0;color:var(--danger);font-weight:700;font-size:.95rem}
input[aria-invalid=true]{border-color:var(--danger)}
/* ---------- Dashboard ---------- */

.qr { background: #fff; padding: 10px; border-radius: var(--radius); width: 148px; height: 148px; display: grid; place-items: center; }
.qr img, .qr canvas, .qr svg { width: 128px; height: 128px; image-rendering: pixelated; }

.checklist { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.checklist li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.checklist li[data-done=true] .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checklist li[data-done=true] strong { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.tool { display: flex; flex-direction: column; gap: .5rem; text-align: left; font: inherit; color: inherit; height: 100%; }
a.tool { text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
a.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool[aria-disabled=true] { background: transparent; box-shadow: none; border-style: dashed; }
.tool .tool-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.tool .tool-icon[data-c=sun] { background: var(--sun-soft); color: var(--sun-ink); }
.tool .tool-icon[data-c=coral] { background: var(--coral-soft); color: var(--coral-ink); }
.tool .tool-icon[data-c=sky] { background: var(--sky-soft); color: var(--sky-ink); }
.tool .tool-icon[data-c=grape] { background: var(--grape-soft); color: var(--grape-ink); }
.tool[aria-disabled=true] .tool-icon { background: var(--surface-2); color: var(--muted); }
.tool .tool-icon svg { width: 26px; height: 26px; }
.tool .go { margin-top: auto; padding-top: .5rem; font-weight: 700; color: var(--accent-text); }

.back { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; min-height: 44px; }

/* ---------- Recipes page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.cat-title { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 .25rem; }

dialog { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
dialog::backdrop { background: rgb(10 16 24 / .6); }
.dialog-head { position: sticky; top: 0; background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 16px 20px; border-bottom: 1px solid var(--line); z-index: 1; }
.dialog-body { padding: 20px; }

footer { padding: 28px 0 44px; color: var(--muted); font-size: .95rem; }

/* ---------- New feature bits ---------- */
.pill.out { background: var(--coral-soft); color: var(--coral-ink); }
.pill.allergen { background: var(--sun-soft); color: var(--sun-ink); }
.starter { background: var(--sun-soft); border-color: transparent; }
.es-card { background: var(--sky-soft); border-color: transparent; }
.task-report { list-style: none; padding: 0; margin: 0; }
.task-report li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.task-report .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.task-report li[data-done=true] .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.who-did { font-size: .92rem; white-space: nowrap; }
.cl-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; cursor: pointer; }
.cl-pick input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.cl-pick:has(input:checked) { border-color: var(--accent); }
.cl-pick:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.cl-pick:has(input:disabled) { opacity: .6; cursor: wait; }
button.cl-tab { background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; }
.cl-tab[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cl-tab:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
#cl-del-dialog { width: min(460px, calc(100vw - 32px)); }
.cl-opts-wrap { position: relative; }
.cl-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / .15); }
.cl-menu[hidden] { display: none; }
.cl-menu-item { min-height: 44px; padding: 8px 12px; text-align: left; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.cl-menu-item:hover { background: var(--surface-2); }
.cl-menu-item:focus-visible { outline: 3px solid var(--accent-text); outline-offset: -3px; }
.danger-text { color: var(--danger); }
.add-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; }
.add-chip img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.add-attached[hidden] { display: none; }
#cl-add-more { gap: .4rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.cl-gone { align-items: flex-start; }
.sort-q { gap: .4rem; }
.sort-ask { margin: 0; }
.sort-picks { gap: .4rem; }
.sort-snip { overflow-wrap: anywhere; }
.date-input { min-height: 46px; padding: 8px 12px; font: inherit; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.choice input[type=checkbox]:checked + span::before { content: "✓ "; }

/* ---------- Tablet look page ---------- */
.look { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 980px) {
  .look { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
  .look .preview-col { position: sticky; top: 88px; }
}
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices label { margin: 0; font-weight: 600; }
.choice input, .swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span, .swatch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.swatch span { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 8px 4px; min-height: 44px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .92rem; background: var(--surface); }
.swatch i { width: 32px; height: 32px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 2px rgb(0 0 0 / .12); }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.swatch input:checked + span::after { content: "Selected"; font-size: .75rem; font-weight: 700; }
input[type=color] { width: 64px; height: 48px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.logo-preview { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.logo-preview img { max-height: 72px; max-width: 200px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 4px; }

.device-wrap { display: flex; justify-content: center; }
.device { background: #1b222b; border-radius: 30px; padding: 18px; box-shadow: 0 18px 50px rgb(20 32 46 / .28); width: 100%; position: relative; }
.device[data-orient=portrait] { max-width: 430px; }
.device::before { content: ""; position: absolute; top: 7px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #39424e; }
.device[data-orient=landscape]::before { top: 50%; left: 7px; margin: -4px 0 0; }
.device[data-orient=landscape] { padding: 18px 22px; }
.screen { position: relative; overflow: hidden; border-radius: 10px; background: #000; }
.screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.preview-note { font-size: .92rem; text-align: center; margin-top: .75rem; }
.save-bar { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 36px 0 24px; }
.legal h1 { margin-bottom: .25rem; }
.legal .meta { color: var(--muted); margin-bottom: 1.5rem; }
.legal h2 { margin-top: 2.2rem; scroll-margin-top: 90px; }
.legal h3 { margin-top: 1.4rem; }
.legal ul, .legal ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.legal li + li { margin-top: .4rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .98rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--surface-2); }
.legal .table-scroll { overflow-x: auto; }
.legal .glance { background: var(--accent-soft); border: 2px solid var(--accent); border-radius: var(--radius-lg); padding: 20px 22px; }
.legal .glance h2 { margin-top: 0; }
.legal .glance ul { margin-bottom: 0; }
.legal nav.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 1.5rem 0; }
.legal nav.toc h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.legal nav.toc ol { columns: 2 220px; margin: 0; }
.legal .callout { border-left: 5px solid var(--tape); background: var(--sun-soft); padding: 14px 18px; border-radius: var(--radius-sm); }
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 40px; }
.site-foot nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------- Signup consent checklist ---------- */
.consent { border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; min-width: 0; margin: 0; background: var(--surface-2); }
.consent legend { float: left; width: 100%; font-weight: 800; font-family: var(--display); font-size: 1.1rem; padding: 0; margin: 0 0 .4rem; }
.consent legend + * { clear: both; }
.consent .summary { font-size: .97rem; color: var(--ink); padding-left: 1.2rem; margin: .25rem 0 1rem; }
.consent .summary li + li { margin-top: .3rem; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.check input[type=checkbox] { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--accent-text); cursor: pointer; }
.check label { font-weight: 600; cursor: pointer; }
.check input[aria-invalid=true] { outline: 3px solid var(--danger); outline-offset: 2px; }

/* ===== Shared list rows for the newer tools ===== */
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list.card { padding-top: 8px; padding-bottom: 8px; }
.item-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0 14px 14px; border-top: 1px solid var(--line); border-left: 5px solid transparent; }
.item-list > .item-row:first-child { border-top: 0; }
.item-row[data-status=red], .item-row[data-status=expired] { border-left-color: var(--danger); }
.item-row[data-status=yellow], .item-row[data-status=soon] { border-left-color: #e0a800; }
.item-row[data-status=green], .item-row[data-status=good] { border-left-color: var(--accent); }
.item-row p { margin: 0; }
.pill.bad { background: #fde3e1; color: #8a1c13; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details.card > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.tool .pill.alert { background: var(--coral-soft); color: var(--coral-ink); }

/* Certification Tracker: copy of each certificate */
.cert-file { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.cert-file legend { font-weight: 700; padding: 0 4px; }
.cert-file-preview img { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }

/* Inspector view: the list and every card, printable or saved as a PDF */
.cert-view { width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.cert-view-head h3 { margin: 0; font-size: 1.3rem; }
.cert-view-head p { margin: .25rem 0 1rem; }
.cert-view-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-bottom: 1.5rem; }
.cert-view-table th, .cert-view-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.cert-view-table thead th { background: var(--surface-2); }
.cert-view-card { margin: 0 0 1.5rem; break-inside: avoid; page-break-inside: avoid; }
.cert-view-card figcaption { margin: 0 0 .4rem; }
.cert-view-card img { display: block; max-width: 100%; max-height: 80vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
@media print {
  @page { margin: 0.5in; }
  body > *:not(#cert-view) { display: none !important; }
  #cert-view { display: block !important; position: static !important; inset: auto; width: auto; max-width: none; max-height: none; overflow: visible; margin: 0; padding: 0; border: 0; box-shadow: none; color: #000; background: #fff; }
  #cert-view::backdrop { display: none; }
  #cert-view .no-print { display: none !important; }
  #cert-view .dialog-body { padding: 0; overflow: visible; max-height: none; }
  .cert-view-table th, .cert-view-table td { border-color: #000; }
  .cert-view-card { break-before: page; page-break-before: always; }
  .cert-view-card img { max-height: 8.5in; border-color: #999; }
}

/* ===== Main menu ===== */
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a[aria-current=page] { background: var(--accent-soft); color: var(--ink); font-weight: 800; box-shadow: inset 4px 0 0 var(--accent-text); }
.side-nav .nav-ico { flex: none; place-items: center; width: 22px; height: 22px; color: var(--muted); }
.side-nav .nav-ico svg { width: 20px; height: 20px; }
.side-nav a[aria-current=page] .nav-ico { color: var(--accent-text); }
.side-nav .nav-count { margin-left: auto; }
.side-nav:focus { outline: none; }
/* Dashboard and Tablets on top, then the tools, then settings and help set apart at the bottom */
.side-nav .nav-main { padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
/* The first group already sits under the Dashboard line, and Settings under the shaded footer edge. */
.side-nav .nav-main + .nav-group, .side-nav .nav-footer .nav-group { border-top: 0; padding-top: 0; margin-top: 14px; }
.side-nav .nav-footer { margin: 14px -10px -10px; padding: 4px 10px 10px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.side-nav .nav-footer a { font-weight: 500; min-height: 42px; }
.side-nav .nav-footer a:hover { background: var(--surface); }
.side-nav .nav-help { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.side-nav .nav-group { font-family: inherit; font-size: .8rem; font-weight: 900; line-height: 1.2; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 12px 12px 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-count { min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--coral-soft, #ffe4d9); color: var(--coral-ink, #7a2e12); font-size: .8rem; font-weight: 800; display: inline-grid; place-items: center; }
.app-layout > .content { min-width: 0; }
/* .wrap sets side padding with a shorthand that wiped out the top and bottom space on the dashboard. Put it back. */
main.app-layout { padding-top: 28px; }
/* Dashboard side column: keep the cards apart. */
#inbox-home:not(:empty) { margin-top: 18px; }
/* Menu stays tucked away until the owner opens it */
.side-nav:not(.open) { display: none; }
.side-nav.open { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 10px; margin-bottom: 20px; }
.menu-btn { display: inline-flex; align-items: center; gap: .45rem; }
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (min-width: 960px) {
  .side-nav.open { position: fixed; top: 76px; right: max(16px, calc((100vw - 1104px) / 2)); width: 290px; max-height: calc(100vh - 96px); overflow-y: auto; z-index: 25; margin: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .side-nav.open { animation: navIn .16s ease-out; }
  @keyframes navIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

/* ===== Home (dashboard) ===== */
.home-head { margin-bottom: 1.25rem; }
.home-head h1 { margin: .15rem 0 0; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.home .card h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
.section-title { font-size: 1.2rem; margin: .5rem 0 .25rem; }

/* Needs attention */
.needs { padding: 18px 22px; }
.need { display: flex; align-items: center; gap: .85rem; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; }
.need:hover { border-color: var(--accent-text); background: var(--surface-2); }
.need .tool-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; }
.need .tool-icon svg { width: 22px; height: 22px; }
.needs-empty { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 600; }
.ok-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; flex: none; }

/* Getting started, tighter */
.start { padding: 18px 22px; }
.start-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.start-top h2 { margin: 0 !important; }
.start-top:has(.setup-skip:not([hidden])) { align-items: center; }
.start-top:has(.setup-skip:not([hidden])) h2 { flex-basis: 100%; }
.start-top #start-summary { order: 2; flex: 1 1 auto; }
.start-top .setup-skip { order: 3; }
.start-foot { display: flex; justify-content: center; }
.start-foot .btn { width: 100%; max-width: 360px; }
.start .progress { margin: .6rem 0 .25rem; }
/* Setup checklist as app-icon tiles: the whole list shows at once, no scrolling
   through one row per tool. Each icon carries a status badge in the corner. */

/* Tool tiles: icon, name, one status line */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile { display: flex; align-items: center; gap: .8rem; min-height: 72px; height: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: border-color .15s ease; }
.tile:hover { border-color: var(--accent-text); }
.tile .tool-icon { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.tile .tool-icon svg, .need .tool-icon svg { width: 24px; height: 24px; }
.tool-icon[data-c=sun] { background: var(--sun-soft) !important; color: var(--sun-ink) !important; }
.tool-icon[data-c=coral] { background: var(--coral-soft) !important; color: var(--coral-ink) !important; }
.tool-icon[data-c=sky] { background: var(--sky-soft) !important; color: var(--sky-ink) !important; }
.tool-icon[data-c=grape] { background: var(--grape-soft) !important; color: var(--grape-ink) !important; }
.tool-icon[data-c=green] { background: var(--accent-soft); color: var(--accent-text); }
.tile-name { font-weight: 700; font-size: 1.05rem; }
.tile-status { font-size: .92rem; color: var(--muted); }
.tile.hot .tile-status { color: var(--coral-ink); font-weight: 700; }

/* Tablets at work (home card). The whole card is one link to the Tablets page. */
/* stretch the link over the whole card */

.link-btn { justify-self: start; background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-weight: 700; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Phone tab bar */
.tabbar { display: none; }
@media (max-width: 959px) {
  .tabbar:not([hidden]) { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgb(20 32 46 / .06); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; background: none; border: 0; border-radius: 12px; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; cursor: pointer; }
  .tabbar a[aria-current=page], .tabbar button[aria-expanded=true] { color: var(--accent-text); background: var(--accent-soft); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tb-count { position: absolute; top: 4px; right: calc(50% - 26px); min-width: 20px; height: 20px; padding: 0 5px; font-size: .72rem; }
  body.has-tabbar { padding-bottom: 76px; }
  body.has-tabbar .menu-btn { display: none !important; }
  .side-nav.open { position: fixed; left: 12px; right: 12px; bottom: 80px; max-height: 70vh; overflow-y: auto; z-index: 31; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .tile, a.tool, .add-tablet { transition: none; } }

/* ===== Tablets page ===== */
.station-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .station-list { grid-template-columns: minmax(0, 1fr); } }
/* The list resets its own margin, which removed the gap under the page intro. */
#view-tablets .station-list { margin-top: 1.25rem; }
.station-card { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-content: start; height: 100%; box-sizing: border-box; }
.station-card h2 { margin: 0; font-size: 1.25rem; }
.station-card .shows { display: flex; flex-wrap: wrap; gap: .35rem; margin: .1rem 0 0; padding: 0; list-style: none; }
.station-setup { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface-2); }
.station-setup .qr { width: 112px; height: 112px; flex: none; border: 1px solid var(--line); box-sizing: border-box; }
.station-setup .qr svg { width: 100%; height: 100%; }
/* Tablet PIN: one slim row (lock, name, status, short note, button). The PIN form opens under it only when changing it. */
.tablet-code { display: grid; gap: 8px; justify-items: start; padding: 8px 0 0; border-top: 1px solid var(--line); }
.tc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: 100%; }
.tc-ico { display: inline-grid; place-items: center; color: var(--muted); }
.tablet-code h3 { margin: 0; font-size: .95rem; }
.tc-meta { color: var(--muted); font-size: .88rem; }
.tablet-code .status { width: 100%; box-sizing: border-box; margin: 0; }
.pill.ok { background: #dff3e6; color: #1d5a33; }
.station-setup code { grid-column: 1 / -1; display: block; font-size: .9rem; word-break: break-all; background: var(--surface); padding: 6px 10px; border-radius: 8px; }
.setup-hint { margin: 0; font-size: .92rem; font-weight: 600; color: var(--muted); }
.station-card .row { margin-top: auto; }

/* Mini drawing of each tablet's screen */
.mini-screen { --ms-brand: var(--accent); --ms-ink: var(--accent-ink); border: 7px solid var(--ink); border-radius: 18px; background: #fff; overflow: hidden; aspect-ratio: 16 / 10; display: grid; grid-template-rows: auto auto 1fr; font-size: .72rem; color: var(--ink); }
.ms-bar { display: flex; align-items: center; gap: .4rem; padding: 6px 8px; background: var(--ms-brand); color: var(--ms-ink); font-weight: 800; min-width: 0; }
.ms-logo { width: 18px; height: 18px; border-radius: 6px; background: rgb(255 255 255 / .9); color: var(--ink); display: grid; place-items: center; font-size: .66rem; flex: none; }
.ms-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-station { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: rgb(255 255 255 / .85); color: var(--ink); white-space: nowrap; font-size: .66rem; }
.ms-tabs { display: flex; gap: 4px; padding: 6px 8px 0; flex-wrap: wrap; }
.ms-tabs span { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-weight: 700; color: var(--muted); }
.ms-tabs span.on { background: var(--ms-brand); color: var(--ms-ink); }
.ms-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; }
.ms-tiles span { border-radius: 8px; background: var(--surface-2); min-height: 22px; }
.ms-tiles span:nth-child(3n+1) { background: color-mix(in srgb, var(--ms-brand) 22%, #fff); }
.ms-rows { display: grid; gap: 6px; padding: 8px; align-content: start; }
.ms-check, .ms-count { position: relative; height: 18px; border-radius: 6px; background: var(--surface-2); padding-left: 24px; }
.ms-check::before { content: ""; position: absolute; left: 4px; top: 3px; width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--line); box-sizing: border-box; }
.ms-check.done::before { background: var(--ms-brand); border-color: var(--ms-brand); }
.ms-count::after { content: ""; position: absolute; right: 6px; top: 4px; width: 26px; height: 10px; border-radius: 4px; background: color-mix(in srgb, var(--ms-brand) 30%, #fff); }

/* Add a tablet: the last card */
.add-tablet { display: grid; place-items: center; align-content: center; gap: .4rem; width: 100%; height: 100%; min-height: 260px; padding: 22px; border: 3px dashed var(--line); border-radius: var(--radius-lg); background: transparent; color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.add-tablet:hover, .add-tablet:focus-visible { border-color: var(--accent-text); background: var(--accent-soft); }
.add-tablet:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.add-plus { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 2rem/1 var(--display); }
.add-title { font: 800 1.2rem var(--display); }
.add-text { color: var(--muted); max-width: 26ch; }
body.read-only .add-tablet-item, body.read-only #station-add { display: none !important; }
.opt-check { display: flex; gap: .65rem; align-items: center; min-height: 44px; margin: 0; font-weight: 600; cursor: pointer; }
.opt-check input[type=checkbox] { width: 24px; height: 24px; min-height: 0; margin: 0; accent-color: var(--accent-text); flex: none; }
@media (max-width: 599px) { #biz-label { display: none; } .topbar .wrap { flex-wrap: nowrap; } }

/* ===== COGS Genie ===== */
.cogs-stats { display: block; }
.win-select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 700; color: var(--ink); width: auto; }
.sub-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* Price list: one line per item, tap to open */
.br-line { display: grid; grid-template-columns: minmax(0, 1.6fr) 120px 130px minmax(0, 1.5fr) 18px; gap: 12px; align-items: center; }
.br-line { width: 100%; padding: 12px 16px 12px 12px; min-height: 60px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
button.br-line:hover { background: var(--surface-2); }
.br-static { cursor: default; }
.br-span { grid-column: 2 / -1; }
.br-line .br-name { display: grid; gap: 0; min-width: 0; }
.br-line .pill { justify-self: start; }
.br-name small { color: var(--muted); font-size: .84rem; }
.br-pay { font-weight: 800; white-space: nowrap; }
.br-best { min-width: 0; }
.ok-text { color: var(--accent-text); font-weight: 700; }
.br-chev { width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; justify-self: center; }
.br-line[aria-expanded=true] .br-chev { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .br-chev { transition: none; } }
.br-detail { display: grid; gap: 10px; padding: 0 16px 16px 12px; }
.br-detail p { margin: 0; }
.br-detail .br-vendors { display: grid; gap: 6px; }
.vrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.vrow.best { background: #dff3e6; color: #12421f; }
.vrow .vtag { margin-left: 8px; }
.pill.warn { background: #fff3c4; color: #6b4e00; }
@media (max-width: 759px) {
  .br-line { grid-template-columns: minmax(0, 1fr) auto 18px; }
  .br-line .br-pay { grid-row: 2; grid-column: 1; font-weight: 700; }
  .br-line .pill { grid-row: 1; grid-column: 2; }
  .br-line .br-best { grid-row: 2; grid-column: 2 / -1; text-align: right; font-size: .9rem; }
  .br-line .br-chev { grid-row: 1; grid-column: 3; }
}
.stat { display: flex; flex-direction: column; gap: .2rem; padding: 16px 18px; }
.stat.hot { border-color: var(--coral); box-shadow: inset 4px 0 0 var(--coral); }
.stat.good { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }

/* ---------- COGS Genie: the price board ---------- */
.board-search { margin: 0; min-width: min(100%, 240px); }
.chip-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip-btn[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-btn:disabled { color: var(--muted); cursor: default; background: var(--surface-2); }
.board { list-style: none; margin: 0; padding: 0; }
.board-row { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: 16px 0 16px 16px; border-top: 1px solid var(--line); border-left: 6px solid transparent; }
.board-row:first-child { border-top: 0; }
.board-row[data-status=red] { border-left-color: var(--danger); }
.board-row[data-status=green] { border-left-color: var(--accent); }
.board-row[data-status=yellow] { border-left-color: #e0a800; }

/* position: relative keeps the hidden screen reader labels inside the scrolling box, so they can't stretch the page on phones */
.board-row p { margin: 0; }
.br-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.br-name strong { font-size: 1.1rem; }
.br-vendors { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vtag { font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #1e6b2f; color: #fff; }
.br-save { padding: 8px 12px; border-radius: 12px; background: #dff3e6; color: #12421f; }
.board-empty { border: 2px dashed var(--line); box-shadow: none; }

/* ---------- COGS Genie: vendors ---------- */
.vfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.vfact dt { font-size: .85rem; color: var(--muted); font-weight: 600; }
.vfact dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.vendor-mail { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.vendor-mail-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.vendor-mail-add .field { margin: 0; flex: 1 1 220px; }
.vendor-mail .ok-dot { display: inline-grid; vertical-align: middle; width: 24px; height: 24px; font-size: .85rem; }
.vmail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vmail-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vmail-addr { flex: 1 1 180px; overflow-wrap: anywhere; font-weight: 600; }
.vendor-rows { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 10px; }
.vnd-row { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.vrow-head { margin: 0; font-size: inherit; }
.vrow-btn { width: 100%; min-height: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto 20px; align-items: center; gap: 8px 14px; padding: 14px 18px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vrow-btn:hover { background: var(--accent-soft); }
.vrow-btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: -3px; }
.vrow-name { font-weight: 800; font-size: 1.1rem; }
.vrow-num { display: inline-block; min-width: 1.6em; color: var(--muted, inherit); font-variant-numeric: tabular-nums; }
.vrow-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.vrow-money { font-weight: 700; white-space: nowrap; }
.vrow-btn[aria-expanded=true] .br-chev { transform: rotate(45deg); }
.vrow-panel { display: grid; gap: 14px; padding: 4px 18px 18px; }
.vrow-panel[hidden] { display: none; }
@media (max-width: 640px) {
  .vrow-btn { grid-template-columns: minmax(0, 1fr) auto 20px; }
  .vrow-tags { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; }
}
.vendor-mail .status { flex-basis: 100%; margin: 0; }
.inbox-address { font-size: 1rem; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); overflow-wrap: anywhere; }

/* Sample data labels for the shared demo */
.sample-note { color: #2b2100; }
.sample-tag { display: inline-block; font-family: var(--font, inherit); font-size: .82rem; font-weight: 700; letter-spacing: 0; padding: 2px 10px; border-radius: 999px; background: #ffd43b; color: #2b2100; vertical-align: middle; }
.demo-nudge { padding: 14px 16px; border-radius: 14px; background: #dff3e6; color: #12421f; border: 1px solid #7fcf9b; display: grid; gap: 10px; }

/* ---------- Dashboard: the COGS Genie card ---------- */
.btn.hero-main { background: #18c48f; border-color: #18c48f; color: #06291f; }
.btn.hero-main:hover { filter: brightness(1.08); }
@media (max-width: 599px) {
  .board-row { flex-direction: column; padding-left: 12px; }
}
.stat-label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cogs-thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cogs-thumbs li { display: grid; gap: .35rem; justify-items: start; }
.cogs-thumbs img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.pdf-chip { display: grid; place-items: center; width: 100%; height: 120px; border-radius: var(--radius-sm); border: 2px dashed var(--line); font-weight: 800; color: var(--muted); }
.thumb-name { font-size: .85rem; color: var(--muted); word-break: break-all; }
.cogs-tabs { display: flex; overflow-x: auto; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; scrollbar-width: thin; }
.cogs-tabs button { flex: 1 0 auto; white-space: nowrap; }
.draft { border-left: 5px solid var(--accent); }
.draft-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.draft-line fieldset { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: .6rem; }
.draft-line legend { font-weight: 700; padding: 0 .35rem; max-width: 100%; overflow-wrap: anywhere; }
/* Boxes in a row line up: each field is label, box, help (help under the box), sharing three rows with the
   fields beside it, so a hint like "Optional" never pushes one box below the others (Nov 16). */
.line-grid, .cogs-head-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 14px; }
.line-grid > .field, .cogs-head-grid > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; margin: 0; padding-bottom: 10px; min-width: 0; }
.line-grid > .field > label, .cogs-head-grid > .field > label { align-self: end; }
.line-grid .hint, .cogs-head-grid .hint { margin-top: .3rem; }
.line-grid .hint:empty, .cogs-head-grid .hint:empty { margin: 0; }

/* Invoice review: every line closed to one row until tapped; the lines that need you listed first (Nov 16). */
.draft-line > details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.draft-line > details > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 14px; min-height: 44px; cursor: pointer; list-style: none; }
.draft-line > details > summary::-webkit-details-marker { display: none; }
.draft-line > details > summary::before { content: ""; flex: none; align-self: center; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.draft-line > details[open] > summary::before { transform: rotate(45deg); }
.draft-line > details > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius); }
.line-sum-name { font-weight: 700; overflow-wrap: anywhere; flex: 1 1 12rem; }
.line-sum-meta { color: var(--muted); font-variant-numeric: tabular-nums; }
.line-sum-flag { font-size: .85rem; font-weight: 700; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.line-sum-flag[data-kind=need] { border-color: var(--coral-ink); color: var(--coral-ink); background: var(--surface); }
.line-sum-from { flex-basis: 100%; padding-left: 20px; font-size: .85rem; color: var(--muted); }
.draft-line > details > fieldset { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 14px; }
.line-group { display: grid; gap: 8px; }
.line-group-title { margin: 0; font-weight: 800; }
details.line-group > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 44px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); cursor: pointer; }
details.line-group > summary .hint { margin: 0; }
details.line-group > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
details.line-group[open] > summary { border-style: solid; }
.draft-actions { gap: 10px; }
.draft-bottom { padding-top: 12px; border-top: 1px solid var(--line); }
/* Phone and tablet: Save stays at the bottom of the screen while you look through lines, above the tab bar. */
@media (max-width: 959px) {
  .draft-top { display: none; }
  .draft-bottom { position: sticky; bottom: 0; z-index: 6; margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: 0 -6px 16px rgb(20 32 46 / .08); }
  body.has-tabbar .draft-bottom { bottom: 76px; padding-bottom: 12px; }
}
.line-out { margin: 0; font-weight: 700; color: var(--accent-text); }
.line-out[data-kind=warn] { color: var(--coral-ink); }
.draft-line .btn.ghost { justify-self: start; }
.cogs-checks { display: grid; gap: 8px; }
.table-wrap { overflow-x: auto; }
.cogs-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.cogs-table th, .cogs-table td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.cogs-table thead th { border-top: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cogs-table tbody th { font-weight: 700; }
.small { font-weight: 400; }
.cost-result { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 14px; background: var(--surface-2); border-radius: var(--radius); }
.cost-result > div { display: flex; flex-direction: column; gap: .15rem; }
.cost-result strong { font-family: var(--display); font-size: 1.35rem; }
.cost-result strong.over { color: var(--danger); }
#view-cogs input[type=number], #view-cogs input[type=date], #view-fight input[type=date], dialog .dialog-body input[type=number] {
  width: 100%; min-height: 50px; padding: 11px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm);
}
@media (max-width: 599px) {
  .cogs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px; }
  .stat-label { font-size: .72rem; letter-spacing: .02em; }
}

/* ===== Pick your tools ===== */
.pick-group { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.pick-group legend { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .5rem; padding: 0; }
/* Tool picker tiles: tap a tile to turn a tool on. The checkbox is still there for keyboards and screen readers, just not drawn. */
.pick-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.pick-tile { position: relative; }
.pick-group + .pick-group { margin-top: 14px; }
.pick-tile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick-tile label { display: grid; gap: 6px; align-content: start; justify-items: start; height: 100%; padding: 16px; border: 2px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.pick-tile strong { font-size: 1.1rem; }
.pt-desc { font-size: .92rem; line-height: 1.35; }
.pt-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.pick-tile .tool-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.pick-tile .tool-icon[data-c=sun] { background: var(--sun-soft); color: var(--sun-ink); }
.pick-tile .tool-icon[data-c=coral] { background: var(--coral-soft); color: var(--coral-ink); }
.pick-tile .tool-icon[data-c=sky] { background: var(--sky-soft); color: var(--sky-ink); }
.pick-tile .tool-icon[data-c=grape] { background: var(--grape-soft); color: var(--grape-ink); }
.pick-tile .tool-icon svg { width: 30px; height: 30px; }
.pt-check { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: transparent; font-weight: 800; }
.pick-tile input:checked + label { border-color: var(--accent-text); background: var(--accent-soft); }
.pick-tile input:checked + label .pt-check { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.pick-tile input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 479px) { .pick-tiles { grid-template-columns: 1fr 1fr; } .pick-tile label { padding: 12px; min-height: 0; } }
.pick { display: flex; gap: .85rem; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pick input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--accent-text); }
.pick label { display: flex; flex-direction: column; gap: .15rem; cursor: pointer; flex: 1; min-height: 44px; }
@media (max-width: 959px) { .tabbar:not([hidden]) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } .tabbar a[hidden] { display: none; } }

/* ===== Managers ===== */
body.manager .owner-only { display: none !important; }
body.read-only .content .btn:not([data-keep]):not(#cert-print-btn),
body.read-only #cogs-add-btn, body.read-only #cogs-add, body.read-only .content .link-btn,
body.read-only dialog .btn:not([data-keep]) { display: none !important; }
.role-note { margin: .4rem 0 0; display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--sky-soft); color: var(--sky-ink); font-weight: 700; }
.invite-box { background: var(--surface-2); box-shadow: none; }
.pick input[type=radio] { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--accent-text); }
.pick:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }

/* ===== Order checking ===== */
.order-check { display: grid; gap: 10px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
/* The order check folded to its one line in the invoice review; tap to see what doesn't match and the message. */
.order-fold > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; }
.order-fold > summary::-webkit-details-marker { display: none; }
.order-fold > summary::before { content: ""; flex: none; width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.order-fold[open] > summary::before { transform: rotate(45deg); }
.order-fold > summary > .status { flex: 1; }
.order-fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius); }
.order-fold > .order-check { margin-top: 8px; }
.credit-box textarea { min-height: 140px; }

/* ===== Health Inspections ===== */
.insp-status { display: grid; gap: 18px; grid-template-columns: auto minmax(0, 1fr); align-items: start; border-left: 6px solid var(--accent); }
.insp-status[data-status=soon] { border-left-color: #e0a800; background: linear-gradient(90deg, var(--sun-soft), var(--surface) 55%); }
.insp-status[data-status=overdue] { border-left-color: var(--danger); background: linear-gradient(90deg, #fde3e1, var(--surface) 55%); }
.insp-status[data-status=none] { display: flex; flex-direction: column; border-left-color: var(--line); }
.insp-status h2 { font-size: 1.5rem; }
.insp-status[data-status=overdue] h2 { color: var(--danger); }
.insp-status[data-status=soon] h2 { color: var(--sun-ink); }
.insp-status[data-status=overdue] h2::before { content: "⚑ "; }
.insp-head { font-size: 1.1rem; font-weight: 600; }
.insp-grade { width: 92px; height: 92px; border-radius: 22px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 2.6rem; background: var(--surface-2); color: var(--ink); border: 3px solid var(--line); }
.insp-grade[data-grade=A], .insp-grade[data-grade=Pass] { background: #e3f2ff; color: #0b3d91; border-color: #0b3d91; }
.insp-grade[data-grade=B], .insp-grade[data-grade=Conditional] { background: #e6f6ea; color: #14532d; border-color: #14532d; }
.insp-grade[data-grade=C], .insp-grade[data-grade=Fail], .insp-grade[data-grade=Closed] { background: #fde3e1; color: #8a1c13; border-color: #8a1c13; font-size: 1.6rem; }
@media (max-width: 520px) { .insp-status { grid-template-columns: minmax(0, 1fr); } .insp-grade { width: 72px; height: 72px; font-size: 2rem; } }
.insp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.insp-checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.insp-checks li:first-child { border-top: 0; }
.insp-checks input { width: 24px; height: 24px; accent-color: var(--accent-text); margin: 0; }
.insp-checks label { cursor: pointer; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.insp-checks li:has(input:checked) label { color: var(--muted); }
.insp-note { color: var(--coral-ink); }
#view-inspect input[type=tel], #view-inspect input[type=url], #view-inspect input[type=date], #view-inspect input[type=number] {
  width: 100%; min-height: 50px; padding: 11px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm);
}
#view-inspect input:focus { border-color: var(--focus); }


/* Folded settings: a short summary with an Edit button; the form opens below it */
.fold-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
.fold-text { min-width: 0; flex: 1 1 16rem; }
.fold-summary { margin: .3rem 0 0; font-size: .95rem; line-height: 1.45; }
.fold-summary p { margin: 0; }
.fold-summary .fold-list { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.fold-btn { display: inline-flex; align-items: center; gap: .4rem; flex: none; }
.fold-chev { transition: transform .2s ease; }
.fold-btn[aria-expanded="true"] .fold-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .fold-chev { transition: none; } }
/* ---------- First time walkthrough ---------- */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-spot { position: fixed; border-radius: var(--radius); box-shadow: 0 0 0 9999px rgb(10 16 24 / .62); outline: 3px solid var(--tape); outline-offset: 0; pointer-events: none; }
.tour-spot.none { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; outline: 0; }
.tour-bubble { position: fixed; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 18px 20px 16px; box-shadow: 0 20px 60px rgb(0 0 0 / .35); border-top: 6px solid var(--accent); }
.tour-bubble.center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); }
.tour-bubble.dock { top: auto !important; left: 12px !important; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
.tour-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tour-count { margin: 0; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tour-skip { min-height: 44px; font-size: .95rem; color: var(--muted); }
.tour-title { font-size: 1.35rem; margin: .25rem 0 .4rem; }
.tour-title:focus { outline: none; }
.tour-body { margin: 0 0 .9rem; }
.tour-list { margin: -.3rem 0 .9rem; padding-left: 1.1rem; display: grid; gap: .45rem; }
.tour-list[hidden] { display: none; }
.tour-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots span[data-on] { background: var(--accent-text); width: 22px; border-radius: 6px; }
.tour-actions { display: flex; justify-content: flex-end; gap: .6rem; }
@media (prefers-reduced-motion: no-preference) {
  .tour-spot { transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
  .tour-bubble { animation: tourIn .2s ease-out; }
  @keyframes tourIn { from { opacity: 0; } to { opacity: 1; } }
}
@media (forced-colors: active) { .tour-spot { outline-color: Highlight; } .tour-bubble { border: 2px solid CanvasText; } }
.tour-bubble.dock-top { top: calc(12px + env(safe-area-inset-top)) !important; left: 12px !important; right: 12px; width: auto; }
/* Desktop: a wide, short bubble docked at the screen edge when the lit up part is too big to sit beside */
.tour-bubble.wide { left: 50% !important; right: auto; width: min(760px, calc(100vw - 24px)); transform: translateX(-50%); }
.tour-bubble.wide .tour-body { margin-bottom: .6rem; }
.copy-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.copy-addr { font-size: 1rem; overflow-wrap: anywhere; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
.copy-btn { flex: none; }
body.touring #main { padding-bottom: 75vh; } /* room to scroll the last cards up under the tour bubble */
.need-line { font-weight: 700; color: var(--coral-ink); }
/* "Is this real?" emails Gmail couldn't verify: a yellow edge so the owner notices before tapping anything */
.suspect-box { border-left: 4px solid var(--sun); padding: .25rem 0 .25rem .85rem; }

/* Tablet look: a real button for the logo upload instead of the browser's file box */
.file-pick { position: relative; display: inline-block; }
.file-pick .file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-pick .file-input + label { cursor: pointer; margin: 0; }
.file-pick .file-input:focus-visible + label { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.more-look { border-top: 1px solid var(--line); padding-top: 1rem; }
.more-look > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.more-look > summary .hint { font-weight: 400; }

/* ===== Home on phones: less scrolling, the important stuff first ===== */
button.need { width: 100%; font: inherit; font-weight: 600; text-align: left; background: var(--surface); cursor: pointer; }
.needs.is-clear { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: 12px 22px; }
.needs.is-clear h2 { margin: 0 !important; font-size: 1.05rem; }
.needs.is-clear .needs-empty { min-height: 36px; color: var(--muted); }
.inbox-more > summary, .inbox-card details > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; color: var(--accent-text); }
.inbox-card details > summary { list-style: none; gap: .4rem; }
.inbox-card details > summary::-webkit-details-marker { display: none; }
.inbox-card details > summary::before { content: "▸"; display: inline-block; width: 1em; transition: transform .15s ease; }
.inbox-card details[open] > summary::before { transform: rotate(90deg); }
#inbox-home-title:focus, #inbox-odd-title:focus { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 599px) {
  .home-head h1 { font-size: 1.5rem; }
  /* Getting started: just the next step, no extra words */
  .start { padding: 14px 16px; }
  /* Tools: two small tiles per row */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { flex-direction: column; align-items: flex-start; gap: .45rem; min-height: 0; padding: 12px; }
  .tile .tool-icon { width: 38px; height: 38px; }
  .tile .tool-icon svg { width: 22px; height: 22px; }
  .tile-name { font-size: 1rem; line-height: 1.2; }
  .tile-status { font-size: .85rem; }
  /* Tablets at work: a slim strip instead of a big banner */
  .copy-addr { font-size: .9rem; }
}

/* Staff Alerts: emails for each location or tablet */
.alert-routes { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; }
.alert-routes legend { font-weight: 800; padding: 0 .35rem; }
.req { font-weight: 600; color: var(--muted); font-size: .9rem; }

/* Recipes page: tablet preview tucked at the bottom, made to stand out */
/* Plain card like the others: thin gray border, no glow, no gradient, no side stripe (design audit, Nov 14). */
details.live-tablet { position: relative; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
details.live-tablet > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: 4px 0 4px 6px; border-radius: 12px; }
details.live-tablet > summary::-webkit-details-marker { display: none; }
details.live-tablet > summary:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 4px; }
.lt-ico { flex: none; width: 64px; height: 48px; border-radius: 10px; background: var(--ink, #12202b); padding: 5px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.35); }
.lt-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 100%; height: 100%; border-radius: 5px; background: var(--surface); padding: 4px; }
.lt-screen i { border-radius: 3px; background: var(--accent); }
.lt-screen i:nth-child(2), .lt-screen i:nth-child(3) { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.lt-sum { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.lt-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.lt-sum strong { font-size: 1.3rem; }
.lt-sub { color: var(--muted); }
.lt-go { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.lt-go::after { content: "▾"; transition: transform .2s; }
.lt-go-close { display: none; }
details.live-tablet[open] .lt-go-open { display: none; }
details.live-tablet[open] .lt-go-close { display: inline; }
details.live-tablet[open] .lt-go::after { transform: rotate(180deg); }
details.live-tablet > summary:hover .lt-go { filter: brightness(1.05); }
@media (max-width: 560px) { .lt-ico { display: none; } .lt-go { padding: 10px 14px; } .lt-sub { font-size: .92rem; } }
@media (prefers-reduced-motion: reduce) { .lt-go::after { transition: none; } }

/* Recipes: Add your recipes card */
.add-ways { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.way { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); min-height: 44px; }
.way input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.way .way-ico { font-size: 1.5rem; }
.way .muted { font-size: .9rem; }
.way:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }
.way:has(input:focus-visible) { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.way-panel { border-top: 1px solid var(--line); padding-top: .9rem; }
.file-btn { position: relative; }
.file-btn:focus-within { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.voice-live { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fde3e1; color: #8a1c13; font-weight: 700; }
.small { font-size: .92rem; }

/* Recipes: select several to delete */
.pick-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: 10px 12px; margin-bottom: .75rem; border-radius: 12px; background: var(--surface-2); position: sticky; top: 70px; z-index: 5; }

/* Recipes: category on top of each card, and the Categories card */
.cat-pick { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.cat-pick label { font-weight: 800; }
.cat-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cat-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.cat-name { flex: 1; min-width: 160px; margin: 0; }
.cat-count { font-size: .92rem; min-width: 80px; }

/* Recipes: arrange and quick look right above the tablet preview */
.quick-look { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; }
.quick-look legend { font-weight: 800; padding: 0 .35rem; }
.ql-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.ql-field { margin: 0; min-width: 140px; }
.ql-colors { display: flex; flex-wrap: wrap; gap: .4rem; }
.ql-swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.ql-swatch[aria-checked=true] { box-shadow: 0 0 0 3px var(--ink, #12202b); }
.ql-swatch:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.ql-icons { margin: 0; min-height: 44px; display: flex; align-items: center; }

/* Recipes the reader wasn't sure about. Words carry the meaning, color only backs it up. */
.pill.needs-look { display: inline-block; white-space: nowrap; background: var(--surface-2); color: var(--coral-ink); border: 1px solid currentColor; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.check-item { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem 1rem; border: 1px solid var(--line, var(--surface-2)); border-radius: 14px; }
.check-why { margin: .2rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .95rem; }
.check-note { padding: .75rem 1rem; border-radius: 14px; border-left: 4px solid var(--coral-ink); background: var(--surface-2); }

/* Floating Tablet view button and the side panel it opens */
.fab-tablet { position: fixed; right: 20px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: .6rem; min-height: 56px; padding: 8px 18px 8px 8px; border: 0; border-radius: 18px; background: var(--ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 12px 28px -10px rgba(0,0,0,.45); }
.fab-tablet:hover { transform: translateY(-1px); }
.fab-tablet:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.fab-ico { width: 46px; height: 36px; border-radius: 8px; background: #000; padding: 4px; }
.fab-ico .lt-screen { padding: 3px; gap: 2px; }
details.live-tablet.as-panel { position: fixed; top: 76px; right: 16px; bottom: 16px; width: min(620px, calc(100vw - 32px)); z-index: 60; overflow: auto; margin: 0; overscroll-behavior: contain; box-shadow: 0 24px 60px -18px rgba(0,0,0,.5); background: var(--surface); }
details.live-tablet.as-panel .lt-sub { display: none; }
@media (max-width: 699px) {
  .fab-tablet { right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); padding-right: 14px; }
  details.live-tablet.as-panel { top: 64px; right: 8px; left: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }
}
@media print { .fab-tablet { display: none !important; } }

/* Health Inspections: Get ready as one square with drop downs */
details.insp-ready { border: 2px solid var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); }
details.insp-ready > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; min-height: 64px; border-radius: 12px; }
details.insp-ready > summary::-webkit-details-marker, details.ready-group > summary::-webkit-details-marker { display: none; }
details.insp-ready > summary:focus-visible, details.ready-group > summary:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 4px; }
.ready-ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 1.6rem; font-weight: 900; }
.ready-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.ready-head h2 { margin: 0; font-size: 1.25rem; }
.ready-sub { font-size: .92rem; }
.ready-meter { display: flex; align-items: center; gap: .6rem; margin-top: .2rem; }
.ready-bar { flex: 1; max-width: 260px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ready-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.ready-count { font-weight: 800; font-size: .92rem; white-space: nowrap; }
.ready-go { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.ready-go::after { content: "▾"; transition: transform .2s; }
.ready-go-close { display: none; }
details.insp-ready[open] .ready-go-open { display: none; }
details.insp-ready[open] .ready-go-close { display: inline; }
details.insp-ready[open] .ready-go::after { transform: rotate(180deg); }
.ready-body { margin-top: 1rem; }
details.ready-group { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details.ready-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: 6px 14px; border-radius: 12px; font-weight: 700; }
details.ready-group > summary::after { content: "▾"; margin-left: .25rem; color: var(--muted); transition: transform .2s; }
details.ready-group[open] > summary::after { transform: rotate(180deg); }
.ready-gtitle { flex: 1; }
.ready-chip { font-size: .85rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #fde3e1; color: #8a1c13; white-space: nowrap; }
.ready-chip[data-done=true] { background: #dff3e6; color: #1d5a33; }
details.ready-group .insp-checks { padding: 0 14px 8px; }
@media (max-width: 560px) { .ready-ico { display: none; } .ready-go { padding: 10px 14px; } }
@media (prefers-reduced-motion: reduce) { .ready-bar > span, .ready-go::after, details.ready-group > summary::after { transition: none; } }
body.manager .side-nav .nav-help { border-top: 0; margin-top: 0; }

/* Health Inspections status card: permit and award lines read as info badges, not text boxes */
.insp-note { display: inline-block; justify-self: start; align-self: flex-start; margin: 0; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.35; }
.insp-note[data-kind=ok] { background: color-mix(in srgb, var(--ok) 11%, #fff); color: var(--ok); }
.insp-note[data-kind=bad] { background: color-mix(in srgb, var(--danger) 11%, #fff); color: var(--danger); }
.insp-contact { margin: 0; font-size: .95rem; }
.insp-contact a { font-weight: 600; }

/* Certification Tracker: compact cards, edit pencil right beside the name */
.cert-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cert-card { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 10px 12px 14px; display: grid; gap: 4px; align-content: start; }
/* Status colors are fixed so a shop's theme color never changes what green, yellow and red mean. */
.cert-card[data-status=good] { border-left-color: #1e7a3c; }
.cert-card[data-status=soon] { border-left-color: #d49b00; }
.cert-card[data-status=expired] { border-left-color: #c0261a; }
.cert-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef1ef; color: #3c4a43; }
.cert-pill[data-status=good] { background: #e2f4e7; color: #1a6a33; }
.cert-pill[data-status=soon] { background: #fff2c7; color: #6e4f00; }
.cert-pill[data-status=expired] { background: #fde3e0; color: #a3261b; }
.cert-pill[data-status=missing] { background: #ffe7d6; color: #8a3b00; }
.cert-card-top { display: flex; align-items: center; gap: 6px; }
.icon-btn { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent-text); color: var(--accent-text); }
.icon-btn svg { width: 18px; height: 18px; }

.cert-name { flex: 1; min-width: 0; text-align: left; padding: 4px 0; border: 0; background: none; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; overflow-wrap: anywhere; }
.cert-name:hover, .cert-name:focus-visible { text-decoration-color: currentColor; color: var(--accent-text); }
.cert-show { width: min(640px, calc(100vw - 24px)); }
.cert-show-img img { display: block; max-width: 100%; max-height: 65vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Who a certificate belongs to (Nov 17): a quiet note under the name, or a small "Who is this?" pick. */
.cert-match:empty { display: none; }
.cert-match p { margin: .35rem 0 0; }
.cert-ask { margin-top: .5rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); display: grid; gap: .5rem; }
.cert-ask .row { flex-wrap: wrap; }
.cert-pick { flex: 1 1 12rem; min-width: 0; max-width: 100%; }
.cert-ask-more { font-weight: 400; }
/* Certificates / People switch. */
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; margin-bottom: 12px; background: var(--surface); }
.seg-toggle button { all: unset; box-sizing: border-box; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; }
.seg-toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.seg-toggle button:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
/* People view: each person once, folded. */
.cert-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cert-person { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.cert-person > summary { list-style: none; cursor: pointer; min-height: 52px; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cert-person > summary::-webkit-details-marker { display: none; }
.cert-person > summary:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: var(--radius-sm); }
.cert-person-name { font-weight: 700; margin-right: auto; }
.cert-person[open] > summary { border-bottom: 1px solid var(--line); }
.cert-person > .item-list, .cert-person > .btn, .cert-person > .cert-person-actions { margin: 10px 14px; }
.crew-add { justify-self: start; }
.crew-needs { border: 0; padding: 0; margin: 0; min-width: 0; }
.crew-needs legend { font-weight: 700; padding: 0; margin-bottom: .4rem; }
.crew-need-boxes { display: grid; gap: .25rem; }
.crew-need-boxes .check-row { display: flex; align-items: center; gap: .55rem; min-height: 44px; }
.crew-need-boxes input { width: 22px; height: 22px; flex: none; }
.cert-person > .btn { margin-top: 0; }
/* ---------- COGS Genie: Build an order ---------- */
.chip-btn.usual:not([aria-pressed=true]) { border: 2px solid var(--accent-text); }
.ord-results { list-style: none; margin: 0; padding: 0; }
/* Vendor picker: calm rows, one radio each. Only the price difference is called out, in words. */
.ord-saved { list-style: none; margin: 0; padding: 0; }
#ord-cart:focus { outline: none; }
#ord-cart:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* "Email it in": a small button on the right; the address pops open under it. */
.mail-pop { position: relative; display: flex; justify-content: flex-end; }
.mail-pop-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; }
.mail-pop-btn:hover { background: var(--surface-2); }
.mail-pop-btn[aria-expanded=true] { border-color: var(--ink); }
.mail-pop-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.mail-pop-icon { display: inline-flex; color: var(--accent-text); }
.mail-pop-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(20 32 46 / .16); padding: 14px 16px; display: grid; gap: 8px; }
.mail-pop-panel[hidden] { display: none; }
.mail-pop-panel h2 { margin: 0; font-size: 1.05rem; }
.mail-pop-panel h2:focus { outline: none; }
.mail-pop-panel p { margin: 0; }
/* The small button sits on its own line at the right, under the dark green header. */
#cogs-inbox:has(.mail-pop) { display: flex; justify-content: flex-end; margin-bottom: -.5rem; }
/* On a first visit the Forward an email tile already shows the address. */
#cogs-inbox.start-mode .mail-pop { display: none; }
.add-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.add-head h2 { margin: 0; }
.add-picks { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.add-picks .field, .add-picks .field + .field { margin: 0; }
.add-picks label { font-weight: 700; }
.add-picks select { width: 100%; min-height: 48px; }
.add-actions { padding-top: .25rem; border-top: 1px solid var(--line); margin-top: .25rem; padding-top: 1rem; }
#cogs-add { border: 2px solid var(--accent); }
#cogs-files { width: 100%; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); font: inherit; cursor: pointer; }
#cogs-files:hover, #cogs-files:focus-visible { border-color: var(--accent-text); }
#cogs-files::file-selector-button { margin-right: 12px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent-text); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* COGS Genie: Build an order gets its own box beside Add an invoice */
.head-actions { gap: .6rem; }
.btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ink:hover { background: color-mix(in srgb, var(--ink) 85%, #fff); }
.shop-box { display: grid; }
.btn.ink[aria-expanded=true] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.shop-box { gap: .5rem; }
.shop-box > .link-btn { min-height: 32px; }
.shop-title { font-size: 1.5rem; margin: 0 0 .5rem; }
.shop-title:focus { outline: none; }
/* Import low stock from Inventory Tracker: one button under the title with a plain line beside it */
.shop-import { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.shop-import .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #14202e; border-color: #14202e; background: #ffffff; }
.shop-import .btn:hover { background: #f1f4f2; }
.shop-import-ico { display: inline-flex; }
.shop-import p { margin: 0; }
.shop-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 42%); }
  .shop-cart { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
}
.shop-list, .shop-cart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.shop-tools { display: grid; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.shop-usual { margin: 0; }
.shop-search { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface-2); font: inherit; }
.shop-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-chips .chip-btn { min-height: 38px; padding: 6px 12px; font-size: .92rem; }
.more { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 28px; }
.more:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.shop-rows { list-style: none; margin: 0; padding: 0; }
.shop-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.shop-item:last-child { border-bottom: 0; }
.shop-empty { padding: 16px; }
.shop-main { min-width: 0; display: grid; gap: 2px; justify-items: start; }
.shop-name { font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.shop-today { font-size: .78rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.shop-sub { font-size: .9rem; color: var(--muted); }
.shop-sub b { color: var(--ink); }
.badge { vertical-align: 1px; }
.b-creep { background: #fff3c4; color: #6b4f00; }
.b-down { background: var(--accent-soft); color: var(--accent-text); }
.shop-picker { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin: 6px 0 0; display: grid; gap: 6px; width: 100%; min-width: 0; }
.shop-picker[hidden] { display: none; }
.shop-vopt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 2px solid transparent; background: var(--surface-2); cursor: pointer; min-height: 46px; }
.shop-vopt.on { border-color: var(--ink); background: var(--surface); }
.shop-vopt input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.shop-vopt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.shop-tag { font-size: .78rem; font-weight: 700; color: var(--accent-text); }
.shop-keep { display: flex; gap: 8px; align-items: center; font-size: .92rem; padding: 4px; cursor: pointer; }
.shop-keep input { width: 20px; height: 20px; accent-color: var(--ink); }
.shop-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.shop-stepper button { width: 44px; height: 44px; border: 0; background: var(--surface-2); font-size: 1.3rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.shop-stepper button:hover { background: var(--line); }
.shop-stepper button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.shop-stepper output { min-width: 86px; text-align: center; line-height: 1.15; font-weight: 700; padding: 0 4px; }
.shop-stepper output small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.shop-add { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--accent-text); background: var(--surface); color: var(--accent-text); font: inherit; font-weight: 700; cursor: pointer; }
.shop-add:hover { background: var(--accent-soft); }
.shop-cart { padding: 16px; display: grid; gap: 12px; }
.shop-cart:focus { outline: none; }
.cart-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cart-top h2 { margin: 0; font-size: 1.15rem; }
.cart-group { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.cart-group header { display: flex; justify-content: space-between; gap: 10px; }
.cart-group h3 { margin: 0; font-size: 1rem; font-family: var(--body); }
.cart-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cart-group li { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; color: var(--muted); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 1.4rem; font-weight: 800; }
.cart-saved { margin: 0; background: var(--accent-soft); color: var(--accent-text); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: .9rem; }
.cart-confirm { display: grid; gap: 8px; background: #fde8e6; border: 2px solid #b42318; border-radius: 12px; padding: 12px; }
.cart-confirm strong { color: #b42318; }
.shop-cart .ord-send-all { width: 100%; justify-content: center; }
@media (max-width: 560px) {
  .shop-item { grid-template-columns: 1fr; }
  .shop-item > .shop-stepper, .shop-item > .shop-add { justify-self: start; }
}

/* Send your orders: one row per vendor to check off */
.send-head { border-radius: var(--radius); padding: 18px 20px; background: linear-gradient(135deg, #e8f3fd, #f1f8ff); border: 1px solid #b9d4ef; }
.send-head h2 { margin: 0 0 4px; color: #123a5e; font-size: 1.45rem; }
.send-head p { color: #2b4560; }
.send-head.all { background: var(--accent-soft); border: 2px solid var(--accent-text); }
.send-head.all p { color: var(--ink); }
.send-head.all h2 { color: var(--accent-text); }
.send-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.send-row { border-radius: var(--radius); border: 2px solid #e2bd4a; background: var(--surface); overflow: hidden; }
.send-row.sent { border-color: var(--accent-text); }
.send-toggle { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto 20px; gap: 12px; align-items: center; padding: 14px 16px; min-height: 64px; border: 0; background: #fffbea; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.send-row.sent .send-toggle { background: var(--accent-soft); }
.send-st { font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #fff3c4; color: #5c4300; white-space: nowrap; }
.send-row.sent .send-st { background: #fff; white-space: normal; overflow-wrap: anywhere; }
.send-row.sent .send-st { color: var(--accent-text); }
.send-who { font-weight: 700; font-size: 1.05rem; min-width: 0; }
.send-who small { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; }
.send-amt { font-weight: 700; }
.send-toggle[aria-expanded=true] .br-chev { transform: rotate(45deg); }
.send-body { padding: 16px; border-top: 1px solid var(--line); }
.send-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.send-fields .field { margin: 0; }
.send-lines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.send-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.send-lines li:first-child { border-top: 0; }
/* Preview box: stands out so owners know they can check the message before it goes out. */
.send-preview { border: 2px solid var(--accent-text); border-radius: var(--radius); background: var(--accent-soft); }
.send-preview summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; align-items: center; min-height: 64px; padding: 10px 14px; color: var(--ink); border-radius: calc(var(--radius) - 2px); }
.send-preview summary::-webkit-details-marker { display: none; }
.send-preview summary:hover { background: color-mix(in srgb, var(--accent-text) 10%, var(--accent-soft)); }
.send-preview summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sp-eye { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-text); -webkit-mask: none; position: relative; }
.sp-eye::before { content: ""; position: absolute; inset: 10px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%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 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.sp-text { display: grid; gap: 2px; }
.sp-text strong { font-size: 1.05rem; color: var(--accent-text); }
.sp-sub { font-size: .9rem; color: var(--muted); }
.sp-chev { width: 12px; height: 12px; border-right: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text); transform: rotate(45deg); justify-self: center; margin-top: -6px; transition: transform .15s; }
.send-preview[open] .sp-chev { transform: rotate(225deg); margin-top: 6px; }
.send-preview[open] summary { border-bottom: 1px solid var(--line); border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.send-preview > :not(summary) { margin: 12px 14px 14px; }
.send-msg { white-space: pre-wrap; font-family: inherit; font-size: .92rem; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin: 6px 0 0; }
@media (max-width: 559px) {
  .send-toggle { grid-template-columns: minmax(0, 1fr) auto 20px; }
  .send-st { grid-column: 1 / -1; justify-self: start; }
  .send-lines li { grid-template-columns: minmax(0, 1fr) auto; }
  .send-lines li > .muted { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 560px) { .head-actions { width: 100%; } .head-actions .btn { flex: 1 1 0; padding: 0 12px; } }

.num { font-variant-numeric: tabular-nums; }
/* Change amounts right in the cart */
.cart-group li.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 4px 0; }
.cart-what { color: var(--ink); min-width: 0; }
.cart-pick { color: var(--muted); }
.cart-cost { text-align: right; }
.cart-ctrl { grid-column: 1; display: flex; align-items: center; gap: 6px; }
.cart-step { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 700; line-height: 1; cursor: pointer; }
.cart-step:hover { background: var(--line); }
.cart-n { min-width: 1.6rem; text-align: center; font-weight: 700; color: var(--ink); }
.cart-del { grid-column: 2; justify-self: end; background: none; border: 0; padding: 4px 2px; min-height: 32px; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.cart-del:hover { color: var(--danger); }
.cart-step:focus-visible, .cart-del:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Pack choice (a sleeve or a box) and the vendor for a no price yet line sit on their own row under the item. */
.cart-pack, .cart-hand-vendor { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); font-weight: 600; }
.cart-pack select, .cart-hand-vendor select { min-height: 36px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; }
.cart-pack select:focus-visible, .cart-hand-vendor select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cart-group.cart-noprice { background: var(--surface-2); border-left-color: var(--line); }
.order-where { font-size: .92rem; font-weight: 600; color: var(--ink); }
/* Vendor colors in the cart. Soft backgrounds keep dark text easy to read. */
.cart-group .cart-step { background: #fff; }
/* Wide cart: each item fits on one line, amount buttons beside it. */
.shop-cart { container-type: inline-size; }
@container (min-width: 380px) {
  .cart-group li.cart-line { grid-template-columns: minmax(0, 1fr) auto 5.5rem auto; gap: 8px; }
  .cart-ctrl { grid-column: 2; grid-row: 1; }
  .cart-cost { grid-column: 3; grid-row: 1; }
  .cart-del { grid-column: 4; grid-row: 1; margin-left: 0; }
}

/* Send checklist: friendly yellow while waiting, green once it's out */
.send-ways { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.send-ways legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.send-way { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; cursor: pointer; }
.send-way.on { border-color: var(--ink); background: var(--surface-2); }
.send-way input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.send-way:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.send-contact { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.send-to { margin: 0; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.send-go { min-width: 12rem; justify-content: center; }
.send-body .send-fields { align-items: start; }
.send-body textarea { min-height: 48px; height: 48px; resize: vertical; }

.send-list { margin-top: 4px; }
.send-cc { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; }
.send-cc input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent-text); flex: none; }

/* Add by voice (Checklists, Prep Check, Certification Tracker) */
.voice-fill { border: 2px solid var(--accent-text); }
.voice-fill textarea { width: 100%; box-sizing: border-box; }
.voice-example { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: inherit; }
.voice-btn { display: inline-flex; align-items: center; gap: .4rem; }
.voice-btn svg { width: 18px; height: 18px; flex: none; }
.voice-fill .btn[aria-pressed="true"] { background: #b3261e; border-color: #b3261e; color: #fff; }
.voice-fix h3 { font-size: 1.05rem; }
body.read-only .voice-fill { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .voice-fill .btn[aria-pressed="true"] svg { animation: voice-pulse 1.2s ease-in-out infinite; } }
@keyframes voice-pulse { 50% { opacity: .45; } }

/* ---- Smaller "What we heard" box ---- */
textarea.short { min-height: 84px; }

/* ---- Recipes list as icons, like apps on a tablet ---- */
.icon-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.icon-grid > li { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.icon-tile { position: relative; width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  padding: 16px 8px 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  box-shadow: 0 1px 2px rgb(20 32 46 / .05); transition: transform .12s ease, box-shadow .12s ease, border-color .12s; }
.icon-tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px -10px rgb(10 116 87 / .45); }
.icon-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.icon-tile .tile-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center;
  font: 800 1.6rem var(--display); overflow: hidden; flex: none; }
.icon-tile .tile-ico img { width: 100%; height: 100%; object-fit: cover; }
.icon-tile.cat-tile .tile-ico { width: 72px; height: 72px; font-size: 2.2rem; border-radius: 20px; }
.icon-tile b { font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; }
.icon-tile small { color: var(--muted); font-size: .85rem; }
.icon-tile .tile-badge { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff;
  font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.icon-tile .tile-tag.out { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-ink); }
.icon-tile.is-out .tile-ico { filter: grayscale(.7); }
.icon-tile.picked { border: 2px solid var(--danger); background: #fde3e1; }
.icon-tile .tile-check { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); background: var(--surface);
  display: grid; place-items: center; font-weight: 800; color: #fff; }
.icon-tile.picked .tile-check { background: var(--danger); border-color: var(--danger); }
.tile-out { min-height: 32px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-family: inherit; font-weight: 600; font-size: .82rem; cursor: pointer; padding: 4px 10px; }
.tile-out:hover { border-color: var(--accent); color: var(--accent-text); }
.tile-out[aria-pressed="true"] { background: var(--coral-soft); color: var(--coral-ink); border-color: var(--coral); }
.tile-out:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.folder-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.folder-head h3 { margin: 0; display: inline-flex; align-items: center; gap: .5rem; font-size: 1.3rem; }
.folder-head h3 .inline-ico { font-size: 1.5rem; }
.folder-head h3:focus { outline: none; }
.folder-head h3:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 560px) { .icon-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; } .icon-tile { min-height: 132px; padding: 12px 6px 10px; } }
@media (prefers-reduced-motion: reduce) { .icon-tile { transition: none; } .icon-tile:hover { transform: none; } }

/* ---- Rename or combine categories: folded away until needed ---- */
details.cat-card > summary { list-style: none; gap: .5rem; }
details.cat-card > summary::-webkit-details-marker { display: none; }
details.cat-card > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
details.cat-card[open] > summary::after { transform: rotate(180deg); }
details.cat-card > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.icon-grid > li > .icon-tile { flex: 1; }

/* Food Fights */
.fight-sub { font-weight: 700; font-size: 1.05rem; }
/* Food Fights rows are calm and neutral: a request waiting to be reviewed, not an emergency. */
.fight-row .send-st { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.fight-row .send-toggle { background: var(--surface); }
.fight-row { border-color: var(--line); }
.fight-every { padding-top: 4px; }
.fight-every select { max-width: 260px; }
.fight-sent { border-color: var(--line); }
.fight-sent.done { opacity: .85; }
.fight-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 16px; min-height: 64px; cursor: pointer; list-style: none; }
.fight-sum::-webkit-details-marker { display: none; }
.fight-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.fight-sent details[open] > .fight-sum { border-bottom: 1px solid var(--line); }
.fight-sent details > :not(summary) { margin: 12px 16px; }
.fight-items { list-style: none; padding: 0; display: grid; gap: 8px; }
.fight-tag { display: inline-block; font-size: .85rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.fight-tag.beat { background: var(--accent-soft); color: var(--accent-text); }
.fight-tag.lower { background: #fff3c4; color: #5c4300; }
.fight-row .cogs-table input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ink); }
@media (max-width: 560px) { .fight-sum { grid-template-columns: minmax(0, 1fr) auto; } .fight-sum .pill { grid-column: 1 / -1; justify-self: start; grid-row: 2; } }
@media (max-width: 560px) { .fight-row .fight-save { display: none; } }

/* Keep short words and % signs from sitting alone on the last line */
p, li, small, dd, .lead { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* Food Fights: a gladiator shield button beside Build an order and Add an invoice */
.head-actions { flex-wrap: wrap; align-items: center; }
.fight-pill { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 .4em; margin-left: .45em; border-radius: 999px; background: var(--bronze); color: #fff; font-size: .8rem; font-weight: 800; line-height: 1; }
.fight-box > .link-btn { justify-self: start; }


/* Emailed price lists: check which item each line is, then save (price-mail.js). */
#cogs-prices-mail .field { max-width: 22rem; }
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .35rem .75rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.pm-row:first-child { border-top: 0; }
.pm-row > input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: 0; }
.pm-row .pm-name { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.pm-row:not(:has(> input)) { grid-template-columns: minmax(0, 1fr) auto auto; }
.pm-price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pm-was { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-btns { gap: .4rem; flex-wrap: nowrap; }
.pm-fold > summary { cursor: pointer; font-weight: 600; padding: .35rem 0; min-height: 44px; display: flex; align-items: center; }
.pm-notes { margin: .25rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.pm-save { position: sticky; bottom: 0; background: var(--surface); padding: .75rem 0 .25rem; border-top: 1px solid var(--line); z-index: 1; }
@media (max-width: 600px) {
  .pm-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pm-row .pm-was { grid-column: 2; }
  .pm-row:not(:has(> input)) { grid-template-columns: minmax(0, 1fr) auto; }
  .pm-row:not(:has(> input)) > .pm-btns, .pm-row:not(:has(> input)) > .btn { grid-column: 1 / -1; justify-self: start; }
}
/* ===== SetDip Help: "Need help?" button and chat box (help.js) ===== */
.help-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px 0 8px; border-radius: 999px;
  border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 800; cursor: pointer; box-shadow: var(--shadow);
}
.help-fab-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-ink); color: var(--accent); font-family: var(--display); font-size: 1.05rem; }
.help-fab[aria-expanded=true] { background: var(--surface); color: var(--accent-text); border-color: var(--accent-text); }
.help-fab:focus-visible, .help-close:focus-visible, .help-form textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.help-panel {
  position: fixed; right: 16px; bottom: 76px; z-index: 41;
  width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgb(20 32 46 / .18);
}
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.help-head h2 { margin: 0; font-family: var(--display); font-size: 1.15rem; }
.help-close { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.help-intro { margin: 0; color: var(--muted); font-size: .9rem; }
.help-log { list-style: none; margin: 0; padding: 4px 2px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1 1 auto; }
.help-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: .95rem; line-height: 1.45; }
.help-msg.bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.help-msg.me { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.help-msg.wait { color: var(--muted); font-style: italic; }
.help-msg.err { background: #fdecea; color: var(--danger); }
.help-form { display: grid; gap: 6px; }
.help-label { font-weight: 700; font-size: .9rem; }
.help-form textarea { width: 100%; min-height: 56px; max-height: 140px; resize: vertical; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm); }
.help-form textarea:disabled { background: var(--surface-2); }
.help-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.help-count, .help-left { color: var(--muted); font-size: .82rem; margin: 0; }
/* Phones: sit above the bottom quick menu */
@media (max-width: 959px) {
  .help-fab { bottom: calc(76px + env(safe-area-inset-bottom)); padding-right: 14px; }
  .help-panel { bottom: calc(136px + env(safe-area-inset-bottom)); max-height: calc(100vh - 170px); }
}
/* Stay out of the way while the walkthrough runs or an editor is open */
body.touring .help-fab, body.touring .help-panel { display: none; }
@media print { .help-fab, .help-panel { display: none !important; } }
/* Need help is a small, still bubble in the bottom right corner again (Nov 17 2026): no pulsing, neutral colors,
   the words kept for screen readers. On phones it sits above the bottom quick menu. help.js hides it while a Save bar
   or a dialog shows (body.help-tucked) and lifts it above Tablet view on laptops (body.help-lift). */
.help-float { width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; border-radius: 50%;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 6px 18px rgb(20 32 46 / .14); }
.help-float:hover { background: var(--surface-2); }
.help-float .help-fab-ico { width: auto; height: auto; background: none; color: inherit; font-family: inherit; font-size: 1.35rem; font-weight: 800; }
.help-float .help-fab-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.help-float[aria-expanded=true] { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }
.help-panel { bottom: 76px; top: auto; max-height: min(560px, calc(100vh - 110px)); }
body.help-lift .help-float { bottom: 96px; }
body.help-lift .help-panel { bottom: 156px; max-height: min(560px, calc(100vh - 190px)); }
@media (max-width: 959px) {
  .help-float { width: 48px; height: 48px; min-height: 48px; bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; }
  .help-float .help-fab-ico { width: auto; height: auto; font-size: 1.35rem; }
  .help-panel { right: 8px; width: min(380px, calc(100vw - 16px)); bottom: calc(136px + env(safe-area-inset-bottom)); max-height: calc(100vh - 176px); }
}
body.help-tucked .help-float { display: none; }
body.touring .help-float, body.touring .help-panel { display: none; }
@media print { .help-float, .help-panel { display: none !important; } }

/* Trash and activity (history.js) */
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.activity-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }

/* ===== Location switcher (beside the logo, top left) ===== */
.top-left { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.top-sep { color: var(--line); font-size: 1.5rem; font-weight: 300; line-height: 1; }
.loc-switch { position: relative; min-width: 0; }
#biz-label { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; min-height: 44px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.loc-btn:hover { background: var(--surface-2); }
.loc-btn[aria-expanded=true] { border-color: var(--accent-text); }
.loc-caret { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.loc-btn[aria-expanded=true] .loc-caret { transform: rotate(180deg); }
.loc-menu { position: absolute; left: 0; top: calc(100% + 8px); width: min(320px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgb(0 0 0 / .18); padding: 8px; z-index: 30; }
.loc-head { font-family: inherit; font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin: 6px 10px 8px; color: var(--ink); }
.loc-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; }
.loc-item, .loc-add { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.loc-item:hover, .loc-add:hover { background: var(--surface-2); }
.loc-item[aria-current=true] { background: var(--accent-soft); font-weight: 800; }
.loc-item .avatar { width: 32px; height: 32px; flex: none; }
.loc-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.loc-tag { font-size: .78rem; font-weight: 700; color: var(--muted); }
.loc-here { color: var(--accent-text); font-weight: 900; }
.loc-add { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); color: var(--accent-text); font-weight: 800; }
.loc-add span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px dashed currentColor; font-size: 1.1rem; }
@media (max-width: 599px) { .loc-btn { padding-right: 8px; } }

/* ===== Sign out, at the very bottom of the menu ===== */
.side-nav .nav-signout { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.side-nav .nav-signout:hover { background: var(--surface); }

/* COGS Genie header: a plain white card like the other cards, dark text, no colored banner. */
.cogs-page-hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: center; justify-content: space-between; box-shadow: none; container-type: inline-size; }
.cogs-page-hero h1 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.4rem); line-height: 1.05; }
.cph-main { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cph-kicker { margin: 0; display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.cph-kicker svg { width: 16px; height: 16px; }
.cph-intro { margin: 0; font-size: 1rem; text-wrap: pretty; line-height: 1.45; color: var(--muted); max-width: 560px; }
/* Big version on a first visit */
.cogs-page-hero.big { padding: 32px; gap: 28px 32px; }
.cogs-page-hero.big h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.2rem); }
.cogs-page-hero.big .cph-main { gap: 14px; flex-basis: 420px; }
.cph-steps { flex: 1 1 320px; list-style: none; margin: 0; padding: 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 14px; }
.cph-steps li { display: flex; gap: 12px; align-items: flex-start; }
.cph-steps li > span:last-child { display: flex; flex-direction: column; }
.cph-steps strong { color: var(--ink); }
.cph-steps li > span:last-child > span { color: var(--muted); font-size: .95rem; }
.cph-steps .here { color: var(--ink); }
.cph-dot { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #9aa6b2; background: var(--surface); color: var(--muted); display: grid; place-items: center; font-weight: 800; }
.cph-steps li.now .cph-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
/* Two numbers: a small label over a large number. Each opens the list behind it. */
.cogs-nums { display: grid; grid-template-columns: repeat(2, max-content); gap: 12px 40px; margin-top: 4px; }
.cn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 0; margin: 0; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; min-height: 44px; }
button.cn { cursor: pointer; border-radius: 8px; }
.cn-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.cn-value { font: 800 clamp(1.6rem, 1.2rem + 1.5vw, 2rem)/1.1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.cn-sub { font-size: .85rem; color: var(--muted); }
button.cn:hover .cn-value { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
#cogs-head :focus-visible { outline: 3px solid var(--focus, #0a7457); outline-offset: 3px; }
/* The two numbers adapt to the card's own width, not the screen's. */
@container (max-width: 560px) { .cogs-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } }
/* Buttons in the header: plain and neutral, white with a thin gray border. */
#cogs-head .btn, #cogs-head .btn.ghost { background: var(--surface); border: 1px solid #c9ced6; color: var(--ink); box-shadow: none; }
#cogs-head .btn:hover { background: var(--surface-2); }
#cogs-head .btn[aria-expanded=true] { background: var(--surface-2); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
#cogs-head .btn.locked { background: transparent; border: 1px dashed #9aa6b2; color: var(--muted); box-shadow: none; opacity: 1; cursor: help; }
#cogs-head .btn.locked svg:not(.lock-ico svg) { display: none; }
.lock-ico { display: inline-flex; }
.lock-ico svg { width: 16px; height: 16px; }

/* Slim unlock progress */
.cogs-progress { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cp-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; align-items: center; }
.cp-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #9aa6b2; color: var(--muted); background: var(--surface); display: grid; place-items: center; font-weight: 800; }
.cp-steps li.ok .cp-dot { background: #18c48f; border-color: #18c48f; color: #06291f; }
.cp-steps li.now .cp-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.cp-line { width: 28px; height: 3px; background: #e2cf8a; border-radius: 2px; }
.cp-msg { margin: 0; flex: 1 1 380px; }
.cp-note { margin: 0; flex-basis: 100%; font-weight: 700; color: #6b4e00; }

/* One time "all unlocked" note */
.cogs-unlocked { background: #dcf8ec; border: 1px solid #8fdcbc; border-radius: 18px; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cu-check { width: 40px; height: 40px; border-radius: 50%; background: #18c48f; color: #06291f; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }

/* ===== First visit ===== */
.cogs-start { gap: 28px; }
.cogs-start h2 { margin: 0; font-family: var(--display); font-weight: 800; }
.cs-add { display: flex; flex-direction: column; gap: 14px; }
.cs-add h2 { font-size: 1.25rem; }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cs-tile { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-height: 0; box-shadow: none; cursor: pointer; }
.cs-tile.main { border: 2px solid var(--accent); }
.cs-tile:hover { border-color: var(--accent-text); background: #fbfffd; }
.cs-name { font-family: var(--display); font-weight: 800; font-size: 1.1rem; line-height: 1.2; }
.cs-text { color: var(--muted); }
.cs-foot { margin-top: auto; font-weight: 700; color: var(--muted); font-size: .95rem; }
.cs-foot.go { color: var(--accent-text); font-weight: 800; font-size: 1rem; }
.cs-foot.addr { background: var(--surface-2); color: var(--ink); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.cs-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.cs-ico svg { width: 22px; height: 22px; }
.cs-ico.green { background: var(--accent-soft); color: var(--accent-text); }
.cs-ico.blue { background: var(--sky-soft); color: var(--sky-ink); }
.cs-ico.yellow { background: var(--sun-soft); color: var(--sun-ink); }
.cs-ico.gray { background: var(--surface-2); color: var(--muted); }
.cs-more { margin: 0; }
.cs-sample { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.cs-sample-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs-sample-head h2 { font-size: 1.5rem; }
.cs-badge { background: var(--tape); color: var(--tape-ink); font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.cs-sample-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; opacity: .72; }
.cs-rows { flex: 999 1 480px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-rows li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; }
.cs-rows strong { flex: 1 1 160px; }
.ss-v { color: var(--muted); }
.ss-p { font-weight: 700; }
.t-up { font-weight: 800; color: #b42318; background: #ffe4d9; padding: 3px 10px; border-radius: 999px; }
.t-down { font-weight: 800; color: #1e6b2f; background: #dcf8ec; padding: 3px 10px; border-radius: 999px; }
.ss-plus { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.cs-cart { flex: 1 1 240px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.cs-cart p { margin: 0; display: flex; justify-content: space-between; gap: 10px; }
.cs-cart .cc-title { justify-content: flex-start; align-items: center; gap: 8px; font-weight: 800; }
.cs-cart .cc-title svg { width: 20px; height: 20px; }
.cs-cart .cc-save { padding-top: 8px; border-top: 1px solid var(--line); color: #1e6b2f; font-weight: 800; }
.cs-cta { align-self: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; box-shadow: none; }
.cs-cta :focus-visible { outline: 3px solid var(--focus, #0a7457); outline-offset: 3px; }
.cs-locked { display: flex; flex-direction: column; gap: 14px; }
.cs-locked h2 { font-size: 1.3rem; }
.cs-lock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cs-lock { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px dashed #9fb3c5; border-radius: 18px; background: var(--surface); }
.cs-lock > span:nth-child(2) { display: flex; flex-direction: column; }
.cs-lock > span:nth-child(2) > span { color: var(--muted); font-size: .95rem; }
.cs-lock .cs-ico { width: 36px; height: 36px; border-radius: 12px; }
.cs-lock .cs-ico svg { width: 20px; height: 20px; }
.cs-lock.gold { border-color: #c9a43a; background: #fffaf0; }
.cs-lock-ico { margin-left: auto; flex: none; color: var(--muted); display: inline-flex; }
.cs-lock.gold .cs-lock-ico { color: var(--sun-ink); }
.cs-lock-ico svg { width: 20px; height: 20px; }
@media (max-width: 599px) { .cogs-page-hero, .cogs-page-hero.big { padding: 18px; } .cs-sample { padding: 18px; } }


/* Settings menu at the top right, next to Espanol (Nov 15). Same size and look as the language button. The panel
   opens under it, right aligned, like the account menu in Shopify, Square and Google. */
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; }
.acct-btn svg { width: 18px; height: 18px; flex: none; }
.acct-btn[aria-expanded=true] { background: var(--surface-2); }
body.desk.cmd .topbar .acct-btn { background: #fff; color: var(--ink); border-color: var(--line); }
body.desk.cmd .topbar .acct-btn[aria-expanded=true] { background: var(--surface-2); }
@media (max-width: 559px) {
  .acct-btn { padding-left: 12px; padding-right: 12px; }
  .acct-btn .acct-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(260px, calc(100vw - 24px)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgb(0 0 0 / .18); padding: 8px; z-index: 40; }
.acct-menu[hidden] { display: none; }
.acct-head { margin: 4px 10px 4px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.acct-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--ink); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface-2); }
.acct-menu a:focus-visible, .acct-menu button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.acct-menu a[aria-current=page] { font-weight: 700; background: var(--surface-2); }
.acct-help-head { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
body.manager .acct-help-head { margin-top: 0; padding-top: 4px; border-top: 0; }
.acct-menu .acct-help-head:first-child { margin-top: 0; padding-top: 4px; border-top: 0; }
@media (forced-colors: active) { .acct-menu { border: 2px solid CanvasText; } }
/* Language and Settings stay side by side in the top bar, even on a narrow phone. */
body.cmd .topbar [data-lang-slot] { flex-wrap: nowrap; flex: none; gap: 8px; }
/* Small phones: tighter gaps so BOHQ, the shop, its Sample tag, language and Settings fit on one line.
   The BOHQ word always shows (before, it was hidden here, and with no logo yet the header had no name at all). */
@media (max-width: 440px) {
  body.cmd .topbar .wrap { gap: .5rem; }
  body.cmd .topbar .top-left { min-width: 0; gap: 4px; }
  body.cmd .topbar .top-sep { display: none; }
}

/* ---------- Phones (Nov 17): the top bar shows BOHQ on the left and one menu button on the right ----------
   The menu button is the Settings button wearing three lines. Inside it: the location, Settings, Help, Espanol and
   Sign out. The location switcher and the language button leave the top bar; a Sample tag stays next to BOHQ. */
.acct-btn .acct-ico-menu, .acct-btn .acct-phone-word, .acct-phone, .acct-menu .acct-lang { display: none; }
.acct-loc { flex-direction: column; align-items: flex-start !important; justify-content: center; gap: 2px; padding-top: 6px !important; padding-bottom: 6px !important; min-height: 52px !important; }
.acct-loc-word { font-size: .8rem; font-weight: 700; color: var(--muted); }
.acct-loc-name { font-weight: 700; max-width: 100%; overflow-wrap: anywhere; }
.acct-menu .lang-btn { gap: 8px; }
.acct-menu .lang-btn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 599px) {
  .topbar .top-sep, .topbar .loc-btn, .topbar [data-lang-slot] > .lang-btn { display: none !important; }
  .acct-btn { width: 46px; height: 46px; padding: 0 !important; justify-content: center; }
  .acct-btn .acct-ico-gear, .acct-btn .acct-word { display: none; }
  .acct-btn .acct-ico-menu { display: block; width: 24px; height: 24px; }
  .acct-btn .acct-phone-word { display: inline; }
  .acct-phone { display: grid; margin-bottom: 6px !important; padding-bottom: 6px !important; border-bottom: 1px solid var(--line); }
  .acct-menu .acct-lang { display: block; }
  .acct-menu { width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow-y: auto; }
  /* The location list opens under the top bar, across the screen, since its button is now in the menu. */
  .loc-menu { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; }
}
/* ===== Pick your tools: centered page with a "Your picks" side panel ===== */
.tools-page { max-width: 1100px; margin-inline: auto; width: 100%; }
.tools-head { max-width: 760px; }
.tools-layout { display: grid; gap: 24px; align-items: start; }
.tools-layout > * { min-width: 0; }
.demo-nudge + .pick-group, .demo-nudge + fieldset { margin-top: 12px; }
.tools-summary { display: none; }
@media (min-width: 1000px) {
  .tools-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .tools-foot { display: none; }
  /* Save button sits up top under the count and never scrolls away; only the picks list scrolls. */
  .tools-summary { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 104px; max-height: calc(100vh - 124px); overflow: hidden; }
  .tools-summary .sum-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 4px; margin: -4px; }
}
/* Smaller screens: the Save bar sticks to the bottom of the screen while you pick. */
@media (max-width: 999px) {
  .tools-foot { position: sticky; bottom: 0; z-index: 6; margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: 0 -6px 16px rgb(20 32 46 / .08); }
  .tools-foot .btn { width: 100%; }
}
@media (max-width: 959px) {
  body.has-tabbar .tools-foot { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
.tools-summary h2 { margin: 0; font-size: 1.25rem; }
.sum-count { margin: -6px 0 0; font-weight: 700; color: var(--accent-text); }
.sum-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sum-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 8px 6px 8px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sum-list .tool-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.sum-list .tool-icon[data-c=sun] { background: var(--sun-soft); color: var(--sun-ink); }
.sum-list .tool-icon[data-c=coral] { background: var(--coral-soft); color: var(--coral-ink); }
.sum-list .tool-icon[data-c=sky] { background: var(--sky-soft); color: var(--sky-ink); }
.sum-list .tool-icon[data-c=grape] { background: var(--grape-soft); color: var(--grape-ink); }
.sum-list .tool-icon svg { width: 22px; height: 22px; }
.sum-text { display: grid; gap: 1px; }
.sum-text strong { font-size: .98rem; }
.sum-text .muted { font-size: .85rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sum-list li.sum-empty { display: block; padding: 18px 14px; border-style: dashed; text-align: center; background: transparent; }
.sum-remove { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.sum-remove:hover { background: var(--surface-2); color: var(--ink); }
.sum-remove:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.tools-summary .btn { width: 100%; }
.sum-note { margin: 0; font-size: .88rem; }

/* ---------- COGS Genie: Prices tab (headline, switch and save, went up, the rest folded) ---------- */
.bad-text { color: var(--danger); font-weight: 700; }
.pt-head { display: grid; gap: 8px; }
.pt-big { margin: 0; font-family: var(--display); font-size: clamp(1.35rem, 3.6vw, 1.9rem); line-height: 1.25; }
.pt-money { color: var(--danger); }
.pt-sub { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 1.02rem; }
.pt-note { margin: 0; }
.pt-search { margin: 16px 0; }
.pt-search input { width: 100%; }
.pt-body { gap: 16px; }
.pt-section { gap: 12px; }
.pt-h { margin: 0; font-size: 1.15rem; }
.pt-groups, .pt-rows { list-style: none; margin: 0; padding: 0; }
.pt-groups { display: grid; gap: 14px; }
.pt-group { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.pt-gh { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.pt-rows { display: grid; gap: 0; }
.pt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.pt-row:first-child { border-top: 0; }
.pt-item { grid-column: 1; justify-self: start; background: none; border: 0; padding: 0; min-height: 32px; font: inherit; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-align: left; cursor: pointer; }
.pt-item:hover { color: var(--accent-text); }
.pt-line { grid-column: 1; color: var(--muted); }
.pt-amt { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; white-space: nowrap; }
.pt-actions { gap: 8px; flex-wrap: wrap; }
.pt-rest { padding: 0; overflow: hidden; }
.pt-rest > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; min-height: 56px; cursor: pointer; list-style: none; font-weight: 700; }
.pt-rest > summary::-webkit-details-marker { display: none; }
.pt-rest > summary:hover { background: var(--surface-2); }
.pt-rest[open] > summary { border-bottom: 1px solid var(--line); }
.pt-rest[open] > summary .br-chev { transform: rotate(45deg); }
.pt-rest .board { padding: 0; }
.pt-rest .board-row { display: block; padding: 0; border-left-width: 6px; }
@media (max-width: 640px) {
  .pt-row { grid-template-columns: 1fr; }
  .pt-amt { grid-column: 1; grid-row: auto; text-align: left; white-space: normal; }
  .pt-actions .btn { flex: 1 1 100%; }
}

/* =====================================================================
   DESK LOOK (owner dashboard, Nov 2026)
   Calm business look: light gray page, white panels, a black top bar,
   amber for the main button, monospace numbers that line up like a stock screen.
   The owner's own colors stay on their tablets and emails, never here.
   ===================================================================== */
body.desk {
  --surface: #ffffff; 
  --ink: #0a0a0a; --muted: #52525b; --line: #e1e1e5;
  --accent: #f5a524; --accent-ink: #1e1300; --accent-text: #7a4f00; --accent-soft: #fff1d6;
  --danger: #b42318; --ok: #067647; --focus: #b86e00;
  --display: "Bricolage Grotesque", "Bricolage Fallback", "Figtree", "Figtree Fallback", system-ui, sans-serif;
  --mono: "Figtree", "Figtree Fallback", system-ui, sans-serif;
  --radius-lg: 12px; --radius: 10px; --radius-sm: 8px;
  --shadow: none;
  font-family: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.desk h1, body.desk h2, body.desk h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
body.desk .card { box-shadow: none; }
body.desk .btn { border-radius: var(--radius-sm); font-weight: 600; }
body.desk .btn:not(.ghost):not(.secondary):not(.danger):not(.ink):not(.shield) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.desk .btn.ghost { background: #fff; border-color: #d4d4d8; }
body.desk .link-btn { color: var(--ink); }
body.desk .loc-menu { color: var(--ink); }
body.desk .progress { height: 8px; background: #e4e4e7; }
body.desk .progress span { background: var(--ink); }
.num { font-family: var(--mono); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* Black top bar */
body.desk .topbar { background: #000; border-bottom: 0; backdrop-filter: none; color: #f2f2f2; }
body.desk .topbar .wrap { min-height: 60px; gap: .5rem 1.75rem; }
body.desk .brand { color: #f2f2f2; font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1; }
@media (max-width: 599px) { body.desk .brand { font-size: 1.4rem; } }
@media (max-width: 380px) { body.desk .brand { font-size: 1.25rem; } }
body.desk .brand { --brand-check: #5fe0b2; }
body.desk .top-sep { color: #52525b; }
body.desk .who, body.desk .loc-btn { color: #f2f2f2; }
body.desk .loc-btn { border-color: #3f3f46; background: #000; }
body.desk .loc-btn:hover { background: #18181b; }
body.desk .loc-btn[aria-expanded=true] { border-color: #b9a6ff; }
body.desk .topbar .avatar { background: #18181b; color: #f2f2f2; border: 1px solid #3f3f46; font-family: var(--display); }
body.desk .topbar .menu-btn, body.desk .topbar .lang-btn { background: transparent; color: #f2f2f2; border-color: #3f3f46; }
body.desk .topbar .menu-btn:hover, body.desk .topbar .lang-btn:hover { background: #18181b; }
body.desk .topbar :focus-visible { outline-color: #b9a6ff; }
.top-tabs { display: flex; gap: 1.5rem; margin-right: auto; }
.top-tabs a { display: inline-flex; align-items: center; min-height: 60px; padding-top: 3px; border-bottom: 3px solid transparent; color: #a1a1aa !important; font-weight: 600; text-decoration: none; }
.top-tabs a:hover { color: #f2f2f2 !important; }
.top-tabs a[aria-current=page] { color: #f2f2f2 !important; border-bottom-color: #b9a6ff; }
/* Phones already have the bottom quick menu with Home, so the top tabs step aside there. */
@media (max-width: 699px) { .top-tabs { display: none; } }

/* Home */
body.desk .home-head { margin-bottom: 1.5rem; }
body.desk .home-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.15rem); margin: .35rem 0 0; }
.money-line { margin: .5rem 0 0; font-size: 1.1rem; }
.money-line .num.up { color: var(--danger); }
.money-line .num.good { color: var(--ok); }
.money-line a { font-weight: 600; margin-left: .15rem; }
.setup-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: -8px 0 22px; padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.setup-bar .btn { min-height: 40px; }
.launchpad { display: grid; gap: 28px; }
.section-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
body.desk .section-title { font-size: 1.2rem; margin: 0 0 .75rem; }

/* Setup mode: one guided list */
body.desk #start-card { max-width: 860px; padding: 26px 0 8px; }
body.desk #start-card .start-top { padding: 0 24px; display: grid; gap: .25rem; }
body.desk #start-card h2#start-title { font-size: clamp(1.5rem, 3vw, 2rem); }
body.desk #start-card .progress { margin: 1rem 24px .5rem; }
.setup-list { list-style: none; margin: .75rem 0 0; padding: 0; }
.setup-list > li.step-row { display: grid; gap: 6px 16px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line); }
.step-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--surface-2); color: var(--muted); border: 1px solid #d4d4d8; }
.step-row[data-state=done] .step-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-row[data-state=next] .step-num { background: #14202e; border-color: #14202e; color: #fff; }
.step-text { display: grid; gap: 2px; min-width: 0; }
.step-title { font-weight: 600; }
.step-row[data-state=done] .step-title { color: var(--muted); }
.step-sub { font-size: .92rem; color: var(--muted); }
.step-tag { margin-left: .6rem; vertical-align: 1px; }
.setup-list .step-row > .btn { white-space: nowrap; }
.start-foot { padding: 6px 24px 10px; }
@media (max-width: 599px) { .setup-list > li.step-row { } .setup-list .step-row > .btn, .setup-list .step-row > .badge.is-ok { grid-column: 2; justify-self: start; } }

/* Badges: honest status on every tile */
.badge { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.is-need { background: #ffe4d9; color: #7a2e12; }
.badge.is-setup, .badge.is-off { background: #f4f4f5; color: #52525b; border: 1px solid #e1e1e5; }
.badge.is-ok { background: #e3f4ea; color: #055c37; }

/* What do you want to do today? */
body.desk .btn.hero-main { background: #5fe0b2; border-color: #5fe0b2; color: #06291f; justify-self: start; }
.quick-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-auto-rows: 1fr; }
.quick-act { width: 100%; height: 100%; min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.quick-act:hover { border-color: var(--ink); }
/* The icon square on Build an order, Add an invoice and Food Fights: keep the icon in its middle */
.quick-act .tool-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.quick-act .tool-icon svg { width: 22px; height: 22px; display: block; }
.qa-text { display: grid; gap: 2px; }
.qa-title { font-weight: 600; }
.qa-sub { font-size: .9rem; color: var(--muted); }

/* Toolbox tiles */
body.desk .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
body.desk .tile { flex-direction: column; align-items: stretch; gap: 8px; min-height: 120px; padding: 16px; border-radius: var(--radius); box-shadow: none; }
body.desk .tile:hover { border-color: var(--ink); }
.tile-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
body.desk .tile .tool-icon, body.desk .quick-act .tool-icon, body.desk .need .tool-icon { width: 38px; height: 38px; border-radius: 8px; background: #f4f4f5; color: var(--ink); }
body.desk .tile .tool-icon svg, body.desk .quick-act .tool-icon svg { width: 20px; height: 20px; }
body.desk .tile-name { font-weight: 600; font-size: 1.02rem; }
body.desk .tile.hot .tile-status { color: #b42318; font-weight: 600; }

/* Needs attention: only when something is waiting */
body.desk .needs { padding: 18px 22px; border-color: #f0d49a; }
body.desk .need { border-radius: var(--radius-sm); }

/* Lower row: tablets and the SetDip email, kept calm */

/* Colors pulled from the logo on the Tablet look page */
.logo-colors { margin-bottom: 1rem; }
.logo-colors-head { margin: 0 0 .4rem; font-weight: 700; }
.tile-top .badge { flex: none; line-height: 1.3; }
/* Each tile is its own size container. On a narrow tile, like two across on a phone, the badge sits under
   the icon, so a longer badge such as Needs attention stays inside the tile. */
body.desk .tile { container-type: inline-size; }
@container (max-width: 180px) { body.desk .tile-top { flex-direction: column; align-items: flex-start; gap: 6px; } }
body.desk .tile .tool-icon[data-c], body.desk .quick-act .tool-icon[data-c], body.desk .need .tool-icon[data-c] { background: #f4f4f5 !important; color: #0a0a0a !important; }
@media (max-width: 599px) { body.desk .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } body.desk .tile { min-height: 0; padding: 12px; } }

/* Tablet look page, roomy: big preview on top, then numbered sections, then one save bar */
body.desk .look-page { max-width: 1100px; }
body.desk .look-page .preview-col { position: static; padding: 22px; }
body.desk .look-page .device-wrap { padding: 8px 0; }
.look-form { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; margin-top: 4px; }
.look-form > .more-look, .look-form > .save-bar { grid-column: 1 / -1; }
@media (max-width: 859px) { .look-form { grid-template-columns: 1fr; } }
.look-sec { padding: 24px; margin: 0; min-width: 0; }
fieldset.look-sec { border: 1px solid var(--line); }
.look-sec h3, .look-legend { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: 1.15rem; font-weight: 600; margin: 0 0 .75rem; font-family: var(--display); }
.look-legend { padding: 0; float: left; width: 100%; }
.look-legend + * { clear: both; }
.look-num { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: #0a0a0a; color: #fff; font-size: .85rem; font-weight: 700; flex: none; }
.look-sec .hint { font-weight: 400; }
body.desk .look-sec .swatches { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
body.desk .swatch span { border-radius: var(--radius-sm); border-width: 1px; min-height: 76px; justify-content: center; }
body.desk .swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
body.desk .more-look { border-top: 1px solid var(--line); padding-top: 24px; }
body.desk .more-look > summary { font-family: var(--display); font-size: 1.15rem; font-weight: 600; gap: .6rem; }
.look-opts { display: grid; gap: 20px 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1rem; }
body.desk .look-save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 -6px 24px rgb(0 0 0 / .06); }
.look-save-msgs { flex: 1 1 260px; min-width: 0; }
.look-save-msgs .status { margin: 0; }
@media (max-width: 959px) { body.has-tabbar .look-save-bar { bottom: 76px; } }

/* Next step strip on setup pages (Nov 16 2026): sits in the page under Back, neutral, never floats over anything */
.step-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 8px 8px 16px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.step-bar .sb-words { margin: 0; flex: 1 1 220px; min-width: 0; }
.step-bar .sb-count { font-weight: 700; margin-right: 4px; }
#step-bar-btn { flex: none; white-space: nowrap; }
body.desk .look-page .device-wrap .device[data-orient=landscape] { max-width: 720px; margin: 0 auto; }
body.desk .look-page .device-wrap .device[data-orient=portrait] { max-width: 420px; margin: 0 auto; }
/* Phones and small tablets: Tablet view sits bottom left, just above the bottom menu. */
@media (max-width: 959px) {
  .fab-tablet { right: auto; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); }
}
.sb-short { display: none; }
@media (max-width: 599px) { .sb-long { display: none; } .sb-short { display: inline; } }

/* ===== First time setup (Set up your business) ===== */
/* The owner dashboard uses amber, but this first screen stays in the SetDip greens (Jesus: orange and yellow read as caution). */
.onb { --accent: #5fe0b2; --accent-ink: #06291f; --accent-text: #0a7457; --accent-soft: #e6faf2; --focus: #0a7457;
  display: grid; gap: 18px 40px; grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
body.desk :is(.onb, .sg) .btn:not(.ghost):not(.secondary):not(.danger) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.desk :is(.onb, .sg) .btn:not(.ghost):not(.secondary):not(.danger):hover { background: #4cd3a3; border-color: #4cd3a3; }
body.desk.in-setup .brand { --brand-check: #5fe0b2; }
body.desk.in-setup .topbar :focus-visible { outline-color: #5fe0b2; }
body.desk.in-setup .top-tabs a[aria-current=page] { border-bottom-color: #5fe0b2; }
.onb-intro h1 { margin: .6rem 0 .4rem; }
.onb-tag { border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: .9rem; }
.onb-lead { font-size: 1.12rem; color: var(--muted); max-width: 46ch; margin: 0; }
.onb-form .btn { width: 100%; }
.onb-show { position: relative; padding: 18px 8px 8px; }
.onb-dot { position: absolute; border-radius: 50%; pointer-events: none; }
.onb-dot.o1 { width: 110px; height: 110px; top: -6px; left: -10px; }
.onb-dot.o2 { width: 70px; height: 70px; top: 20px; right: 4px; }
.onb-dot.o3 { width: 90px; height: 90px; bottom: 40px; right: -14px; }
.onb-tablet { position: relative; margin: 0; display: grid; gap: 12px; justify-items: center; }
.onb-device { width: 100%; max-width: 460px; background: #1b222b; border-radius: 28px; padding: 16px; box-shadow: 0 24px 60px rgb(20 32 46 / .25); }
.onb-screen { background: #f7f9fb; border-radius: 12px; overflow: hidden; color: var(--ink); font-size: .9rem; }
.onb-bar { display: flex; align-items: center; gap: .55rem; padding: 10px 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; min-width: 0; }
.onb-logo { width: 28px; height: 28px; flex: none; border-radius: 8px; background: #fff; color: var(--ink); display: grid; place-items: center; font: 800 .95rem var(--display); }
.onb-name { font: 800 1.05rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.onb-station { margin-left: auto; flex: none; padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / .85); color: var(--ink); font-size: .75rem; }
.onb-tabs { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.onb-tabs span { padding: 3px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .8rem; }
.onb-tabs span.on { background: var(--accent-ink); color: var(--accent); }
.onb-hi { padding: 12px 12px 4px; font: 700 1.05rem var(--display); }
.onb-cards { list-style: none; margin: 0; padding: 6px 12px 14px; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.onb-cards li { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center; padding: 9px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.onb-cards i { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 800; }
.onb-cards b { font-size: .86rem; line-height: 1.2; }
.onb-cards small { font-size: .74rem; color: var(--muted); line-height: 1.2; }
.onb-cards .c1 { background: var(--accent-soft); color: var(--accent-text); }
.onb-cards .c2 { background: var(--accent); color: var(--accent-ink); }
.onb-cards .c3 { background: var(--accent-soft); color: var(--accent-text); }
.onb-cards .c4 { background: var(--accent); color: var(--accent-ink); }
.onb-tablet figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; font-weight: 700; }
.onb-live { display: inline-flex; align-items: center; gap: .4rem; padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .85rem; }
.onb-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.onb-url { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .92rem; overflow-wrap: anywhere; }
.onb-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.onb-next li { display: flex; align-items: center; gap: .75rem; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.onb-next .n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 1rem var(--display); }
/* Setup steps: the step you're on stands out in green, steps still to come are greyed (by color, not see through, so the text still reads clearly), finished steps get a check. */
.onb-next { --accent: #5fe0b2; --accent-ink: #06291f; --accent-text: #0a7457; --accent-soft: #e6faf2; }
.onb-next li[data-state="current"] { background: #fff; border: 2px solid var(--accent-text); box-shadow: inset 5px 0 0 var(--accent-text), 0 6px 18px rgb(10 116 87 / .14); }
.onb-next li[data-state="upcoming"] { background: var(--surface-2); color: var(--muted); }
.onb-next li[data-state="upcoming"] b { color: var(--muted); }
.onb-next li[data-state="upcoming"] .n { background: #e2e5e9; color: #4b5563; }
.onb-next li[data-state="done"] .n { background: var(--accent-soft); color: var(--accent-text); }
.onb-next .t { min-width: 0; }
.onb-next .now { margin-left: auto; flex: none; padding: 3px 10px; border-radius: 999px; background: var(--accent-text); color: #fff; font-weight: 800; font-size: .78rem; white-space: nowrap; }
@media (min-width: 900px) {
  .onb { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "intro show" "form show" "next show"; align-items: start; }
  .onb-intro { grid-area: intro; } .onb-form { grid-area: form; } .onb-next { grid-area: next; }
  .onb-show { grid-area: show; position: sticky; top: 96px; padding-top: 40px; }
}
/* A quick pop on the tablet's name bar when the name changes (skipped when motion is turned off) */
@media (prefers-reduced-motion: no-preference) {
  .onb-bar.pop { animation: onbPop .35s ease-out; }
  @keyframes onbPop { from { filter: brightness(1.18); } to { filter: none; } }
}

/* ================= First time setup, steps 2 and 3 ==========   Same lighter SetDip green as step 1. No yellow or orange anywhere in setup. */
.sg { --accent: #5fe0b2; --accent-ink: #06291f; --accent-text: #0a7457; --accent-soft: #e6faf2; --focus: #0a7457; }

/* The 1 2 3 steps, short version that sits under the heading */
.onb-next.compact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.onb-next.compact li { padding: 5px 14px 5px 5px; border-radius: 999px; gap: .55rem; font-size: .95rem; }
.onb-next.compact li[data-state="current"] { box-shadow: 0 4px 14px rgb(10 116 87 / .16); }
.onb-next.compact .n { width: 28px; height: 28px; font-size: .9rem; }
.onb-next.compact li[data-state="done"] { background: var(--accent-soft); border-color: transparent; }

/* Step 2: Pick your tools */
.tools-page.sg .tools-head { display: grid; gap: 10px; justify-items: start; }
.tools-page.sg .tools-head h1 { margin: 0; }
.tools-page.sg .tools-head p { max-width: 52ch; }
.tools-page.sg .tools-summary { border: 0; }
@media (min-width: 1000px) { .tools-page.sg .tools-layout { } }
.pick-mock { display: grid; gap: 12px; }
.pick-mock .pm-where { margin-left: auto; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.pm-dash { border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.pm-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #0a0a0a; color: #f2f2f2; }
.pm-brand { font: 800 .95rem var(--display); }
.pm-brand { --brand-check: #5fe0b2; }
.pm-hi { margin: 10px 12px 6px; font: 700 1rem var(--display); }
.pm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.pm-tile { display: grid; justify-items: center; align-content: center; text-align: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.pm-tile .tool-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.pm-tile .tool-icon svg { width: 18px; height: 18px; }
.pm-tile b { font-size: .74rem; line-height: 1.2; overflow-wrap: normal; hyphens: none; }
.pm-tablet { border-radius: 18px; border: 8px solid #14202e; background: #fff; overflow: hidden; }
.pm-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--accent); color: var(--accent-ink); }
.pm-name { font: 800 .95rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pm-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 10px 4px; }
.pm-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-empty { grid-column: 1 / -1; padding: 12px; border: 2px dashed #b9cfc6; border-radius: 10px; color: var(--muted); font-size: .85rem; text-align: center; width: 100%; }
.pm-cap { margin: 0; display: flex; justify-content: center; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips:empty { display: none; }
.pick-chips .tool-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.pick-chips .tool-icon svg { width: 18px; height: 18px; }
.pick-chips .tool-icon[data-c=sky] { background: var(--sky-soft); color: var(--sky-ink); }
.pick-chips .tool-icon[data-c=grape] { background: var(--grape-soft); color: var(--grape-ink); }
.pm-tile .tool-icon[data-c=sky] { background: var(--sky-soft); color: var(--sky-ink); }
.pm-tile .tool-icon[data-c=grape] { background: var(--grape-soft); color: var(--grape-ink); }
/* A tool you just picked pops in once (skipped when motion is turned off) */
@media (prefers-reduced-motion: no-preference) {
  .pm-tile.new { animation: sgPop .3s ease-out both; }
  @keyframes sgPop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* Step 3: Open SetDip on your shop tablet */
.golive .gl-list { list-style: none; margin: 0; padding: 0; }
.gl-step { display: flex; gap: 14px; align-items: flex-start; }
.gl-step h2 { margin: 0; font-size: 1.2rem; }
.gl-step .muted { margin: 0; }
.gl-n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 1.05rem var(--display); }
.gl-pin-form { display: grid; gap: 10px; }
.gl-pin-form .field { max-width: 240px; }
.gl-pin-form input { font-size: 1.4rem; letter-spacing: .3em; font-family: var(--mono, ui-monospace, monospace); }
.gl-open { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.gl-qr { width: 132px; height: 132px; flex: none; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.gl-qr svg { width: 100%; height: 100%; display: block; }
.gl-open-text { flex: 1 1 200px; min-width: 0; gap: 8px; }
.gl-open-text code { font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.gl-done { display: grid; gap: 10px; justify-items: start; }
.gl-screen { min-height: 300px; display: flex; flex-direction: column; }
.gl-lock { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px 12px; text-align: center; }
.gl-lock-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.gl-lock-icon svg { width: 28px; height: 28px; }
.gl-lock b { font: 800 1.15rem var(--display); }
.gl-dots { display: flex; gap: 10px; }
.gl-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #6b8a7e; }
.gl-unlock { padding: 8px 22px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .pin-set .gl-dots i { animation: sgPop .3s ease-out both; }
  .pin-set .gl-dots i:nth-child(2) { animation-delay: .05s; } .pin-set .gl-dots i:nth-child(3) { animation-delay: .1s; }
  .pin-set .gl-dots i:nth-child(4) { animation-delay: .15s; } .pin-set .gl-dots i:nth-child(5) { animation-delay: .2s; }
  .pin-set .gl-dots i:nth-child(6) { animation-delay: .25s; }
}
@media (min-width: 900px) {
  .golive { grid-template-areas: "intro show" "steps show" "done show"; }
  .golive .gl-list { grid-area: steps; } .golive .gl-done { grid-area: done; }
}

/* Back and Continue on the setup steps: Back on the left in a quiet style, the main button on the right */
.setup-nav { display: flex; gap: 10px; align-items: center; width: 100%; }
.setup-nav > .btn:last-child { flex: 1 1 auto; }
.setup-nav .setup-back { flex: none; }
.setup-nav .setup-back[hidden] { display: none; }
.tools-foot .setup-nav .btn, .tools-summary .setup-nav .btn { width: auto; }
.gl-done .setup-nav { width: auto; flex-wrap: wrap; }
.gl-done .setup-nav > .btn:last-child { flex: 0 1 auto; }
.slug-change { margin: 4px 0 0; }
/* Step 2 on phones and narrow windows: the live drawing sits above the tools, smaller */
@media (max-width: 999px) {
  .tools-page.sg .tools-summary { display: grid; gap: 10px; order: -1; padding: 14px; }
  .tools-page.sg .tools-summary :is(#sum-count, .setup-nav, #sum-status, .sum-note) { display: none; }
  .tools-page.sg .tools-summary h2 { font-size: 1rem; }
  .tools-page.sg .pick-mock { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .tools-page.sg .pm-cap { grid-column: 1 / -1; }
  .tools-page.sg .pm-tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .tools-page.sg .pick-mock { grid-template-columns: minmax(0, 1fr); }
  .tools-page.sg .pm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Tool names never split in the middle of a word ("Certification" stays whole) */
.pick-tile strong { overflow-wrap: normal; hyphens: none; }
@media (max-width: 479px) { .pick-tile strong { font-size: 1rem; } }
.pm-tile .tool-icon { margin-inline: auto; }
.pm-tile .tool-icon svg { display: block; }

/* ================= One set of site colors, everywhere in the owner pages =================
   Same palette as the home page: a warm white page, dark text, dark ink buttons, and the site green
   for links, text accents and the focus ring. Every tool uses these same colors. A tool's own color
   only ever shows on its icon, never on headings, text, buttons or bars. */
body.desk, body.desk .onb, body.desk .sg, body.desk .onb-next {
  --accent: #14202e; --accent-ink: #ffffff; --accent-text: #0a7457; --accent-soft: #e6faf2; --focus: #0a7457;
}
body.desk { --bg: #fbfaf7; --surface-2: #f4f2ee; }
.tool-icon[data-c] { background: var(--tbg) !important; color: var(--ic) !important; }
/* Tool icons: one neutral look for every tool, a soft gray tile with a dark drawing, so the only color on
   the page is status (needs attention, running low, ready). That's how large apps keep alerts easy to spot.
   Dark slate on the gray tile is about 12:1, well past ADA. */
.tool-icon[data-c] { --ic: #1f2a37; --tbg: #eef1f5; box-shadow: inset 0 0 0 1px #d9dfe7; }
@media (forced-colors: active) { .tool-icon[data-c] { background: Canvas !important; color: CanvasText !important; border: 1px solid CanvasText; } }
/* The 1 2 3 setup steps all use the site green. Tool colors stay on tool icons only. */
.onb-next li { --sc: #0a7457; --ss: #cdf3e2; }
body.desk .onb-next li[data-state="current"] .n { background: var(--sc); color: #fff; }
body.desk .onb-next .now { background: var(--sc); color: #fff; }
.gl-list > li .gl-n { background: #14202e; color: #fff; }
.gl-step.is-done .gl-n { background: #cdf3e2 !important; color: #0a7457 !important; }
/* Soft colored circles behind the tablet drawings, like the home page */
.onb-dot.o1 { background: #ffdccd; opacity: .9; }
.onb-dot.o2 { background: #d3e5ff; opacity: 1; }
.onb-dot.o3 { background: #fde9a6; opacity: .8; }
.tools-page.sg .tools-summary { background: #fff; box-shadow: 0 18px 40px rgb(20 32 46 / .1); }
.pm-bar, .onb-bar { background: #14202e !important; color: #fff !important; }
.pin-set .gl-dots i { background: #14202e; border-color: #14202e; }
.pin-set .gl-unlock { background: #14202e; color: #fff; }
/* Picking a tool: the tile keeps its normal look, only the round check turns green */
body.desk .pick-tile input:checked + label { border-color: var(--line); background: var(--surface); }
body.desk .pick-tile input:checked + label .pt-check { background: #0a7457; border-color: #0a7457; color: #fff; }
body.desk .pick-tile .pt-check { border-color: #8a96a3; }

/* Your setup, live: every tool shows as its icon with a small name under it, on the dashboard and the tablet.
   Tiles wrap to a new row instead of squeezing, so names never split mid word. */
.pm-tiles, .tools-page.sg .pm-tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.pm-tabs, .pm-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; padding: 10px 12px 4px; }
.pm-btns { padding: 4px 12px 12px; }
.pm-tabs:empty, .pm-btns:empty { display: none; }
.pm-tabs .pm-empty { grid-column: 1 / -1; }
/* Setup steps: finished steps get a green check, the step you're on is dark ink, steps to come are grey. No purple. */
body.desk .onb-tag { background: #14202e; color: #fff; }
body.desk .onb-next li[data-state="current"] { border-color: #14202e; box-shadow: inset 4px 0 0 #14202e, 0 6px 18px rgb(20 32 46 / .08); }
body.desk .onb-next.compact li[data-state="current"] { box-shadow: 0 4px 14px rgb(20 32 46 / .1); }
body.desk .onb-next li[data-state="current"] .n, body.desk .onb-next .now { background: #14202e; color: #fff; }
body.desk .onb-next li[data-state="done"] { background: #e8f8f1; border-color: #9fdcc3; color: #0b4d3a; }
body.desk .onb-next li[data-state="done"] b { color: #0b4d3a; }
body.desk .onb-next li[data-state="done"] .n { background: #0a7457; color: #fff; }

/* Pick your tools: short one line subtitles, and every tile the same height so no tool looks bigger than another */
.pick-tiles { grid-auto-rows: 1fr; }
.pick-tile label { min-height: 0; }
.pick-tile .pt-desc { font-size: .92rem; line-height: 1.35; min-height: calc(2 * 1.35em); }
@media (min-width: 480px) { .pick-tile .pt-desc { min-height: 1.35em; } }
/* The small i button on each tool tile: opens a short explanation over the tile. Tapping the tile itself still picks the tool. */
.pick-tile .pt-desc { padding-right: 36px; }
.pt-info { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #8a96a3; background: #fff; color: #14202e; font: italic 700 1rem/1 Georgia, "Times New Roman", serif; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pt-info:hover, .pt-info[aria-expanded="true"] { background: #14202e; border-color: #14202e; color: #fff; }
.pt-info:focus-visible, .pt-more-close:focus-visible { outline: 3px solid var(--focus, #0a7457); outline-offset: 2px; }
.pt-more { position: absolute; top: 0; left: 0; right: 0; min-height: 100%; z-index: 5; display: grid; align-content: start; gap: 10px; padding: 14px 16px; border-radius: var(--radius-lg); background: #fff; border: 2px solid #14202e; box-shadow: 0 14px 34px rgb(20 32 46 / .2); color: #14202e; }
.pt-more[hidden] { display: none; }
.pt-more p { margin: 0; font-size: .95rem; line-height: 1.45; }
.pt-more-close { justify-self: start; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 0; background: #14202e; color: #fff; font-weight: 700; cursor: pointer; }
.pick-tile.info-open { z-index: 6; }

/* ================= Setup steps 1, 2 and 3: light and colorful like the home page =================
   No black panels. Bright home page green for buttons and the tablet bar, soft tool colors as accents,
   dark text on light surfaces so everything stays easy to read. */
body.desk.in-setup { background: #fff; }
/* Light tablet and dashboard drawings instead of black frames */
body.desk.in-setup .onb-device { border: 1px solid #d6dde5; box-shadow: 0 20px 50px rgb(20 32 46 / .12); }
body.desk.in-setup .onb-screen { border: 1px solid #e3e8ee; }
body.desk.in-setup .pm-tablet { border-color: #e3e8ee; box-shadow: 0 10px 26px rgb(20 32 46 / .08); }
body.desk.in-setup .pm-top { background: #fff; color: #14202e; border-bottom: 1px solid #e3e8ee; }
body.desk.in-setup .gl-list > li:nth-child(3) .gl-n { background: #0e6b67; }
/* Step tag: text sits in the exact middle of the pill */
.onb-tag { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 14px; line-height: 1; text-align: center; }
/* Step 2 sized like step 3: same 1100px page centered on the screen, same heading size,
   and a tighter grid of smaller tool tiles so it feels as tidy as step 3. */
body.desk.in-setup :is(.onb, .tools-page.sg) { max-width: 1100px; margin-inline: auto; width: 100%; }
.tools-page.sg .tools-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; }
.tools-page.sg .tools-head p { font-size: 1rem; }
.tools-page.sg #tools-form.card { padding: 18px; }
.tools-page.sg .pick-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.tools-page.sg .pick-tile label { padding: 12px; gap: 4px; border-width: 1.5px; box-shadow: none; }
.tools-page.sg .pick-tile .tool-icon { width: 44px; height: 44px; border-radius: 12px; }
.tools-page.sg .pick-tile .tool-icon svg { width: 24px; height: 24px; }
.tools-page.sg .pick-tile strong { font-size: 1rem; }
.tools-page.sg .pick-tile .pt-desc { font-size: .88rem; }
.tools-page.sg .pick-tile .pt-check { width: 24px; height: 24px; font-size: .8rem; }
.tools-page.sg .pt-info { width: 28px; height: 28px; right: 8px; bottom: 8px; font-size: .9rem; }
.tools-page.sg .pick-group legend { margin-bottom: .3rem; }
.tools-page.sg .pick-group + .pick-group { margin-top: 10px; }
@media (min-width: 1000px) { .tools-page.sg .tools-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; } }

/* Setup steps 1 to 3: no rainbow. Plain white, one brand green for buttons, progress and the step you're on.
   Tool icons keep their own color only inside their small icon box. */
body.desk.in-setup .onb-dot { display: none; }
body.desk.in-setup .tools-page.sg .tools-summary { background: #fff; border: 1px solid #e3e8ee; box-shadow: 0 10px 28px rgb(20 32 46 / .07); }
body.desk.in-setup .onb-device { background: #f4f6f8; }
body.desk.in-setup .onb-next.compact li[data-state="current"] { box-shadow: 0 4px 14px rgb(20 32 46 / .08); }
body.desk.in-setup .gl-step.is-done .gl-n { background: #0a7457 !important; color: #fff !important; }

/* Step 2: the Back and Next buttons always show. On laptops the side drawing grew taller than the screen and
   hid the button under it, so in setup the buttons live in one bar that sticks to the bottom of the screen. */
.tools-page.sg .tools-summary :is(#sum-count, .setup-nav, #sum-status) { display: none; }
@media (min-width: 1000px) {
  .tools-page.sg .tools-summary { overflow-y: auto; }
  .tools-page.sg .tools-foot { display: grid; position: sticky; bottom: 0; z-index: 6; margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e3e8ee; border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: 0 -6px 16px rgb(20 32 46 / .08); }
  .tools-page.sg #pick-chips { display: none; }
}
.tools-page.sg .tools-foot .setup-nav { justify-content: flex-end; }
.tools-page.sg #tools-save { min-height: 48px; min-width: 160px; font-size: 1.05rem; }

/* ================= Setup steps 1 to 3: neutral colors =================
   White page, charcoal buttons with white text, soft grays for borders, tags and steps.
   Green only means done: finished steps and picked tools get a small green check.
   Tool icons keep their own colors inside their icon boxes. */
body.desk.in-setup :is(.onb, .sg, .onb-next) { --accent: #1f2933; --accent-ink: #ffffff; --accent-text: #1f2933; --accent-soft: #f1f3f5; --focus: #1f2933; }
body.desk.in-setup :is(.onb, .sg) .btn:not(.ghost):not(.secondary):not(.danger) { background: #1f2933; border-color: #1f2933; color: #fff; }
body.desk.in-setup :is(.onb, .sg) .btn:not(.ghost):not(.secondary):not(.danger):hover { background: #3a4651; border-color: #3a4651; }
body.desk.in-setup :is(.onb, .sg) .btn:is(.ghost, .secondary) { background: #fff; border-color: #cfd6dd; color: #1f2933; }
body.desk.in-setup :is(.onb, .sg) .btn:is(.ghost, .secondary):hover { background: #f1f3f5; }
/* Step tag and the 1 2 3 list */
body.desk.in-setup .onb-tag { background: #f1f3f5 !important; color: #3d4752 !important; }
body.desk.in-setup .onb-next li { border-color: #e3e7eb; }
body.desk.in-setup .onb-next li[data-state="current"] { background: #fff; border-color: #1f2933; box-shadow: 0 4px 14px rgb(20 32 46 / .08); }
body.desk.in-setup .onb-next li[data-state="current"] .n, body.desk.in-setup .onb-next .now { background: #1f2933; color: #fff; }
body.desk.in-setup .onb-next li[data-state="upcoming"] { background: #f7f8f9; color: #59636e; }
body.desk.in-setup .onb-next li[data-state="upcoming"] .n { background: #e3e7eb; color: #3d4752; }
body.desk.in-setup .onb-next li[data-state="done"] { background: #fff; border-color: #e3e7eb; color: #1f2933; }
body.desk.in-setup .onb-next li[data-state="done"] b { color: #1f2933; }
body.desk.in-setup .onb-next li[data-state="done"] .n { background: #0a7457; color: #fff; }
/* Tablet and dashboard drawings */
body.desk.in-setup :is(.pm-bar, .onb-bar) { background: #f1f3f5 !important; color: #1f2933 !important; border-bottom: 1px solid #e3e7eb; }
body.desk.in-setup :is(.pm-bar, .onb-bar) .onb-logo { background: #1f2933; color: #fff; }
body.desk.in-setup .pm-brand { --brand-check: #0a7457; }
body.desk.in-setup .onb-tabs span.on { background: #1f2933; color: #fff; }
body.desk.in-setup .onb-live { background: #f1f3f5; color: #3d4752; }
body.desk.in-setup .onb-live::before { background: #0a7457; }
/* Step 2: a picked tool gets a dark border and a green check */
body.desk.in-setup .pick-tile input:checked + label { border-color: #1f2933; background: #fff; box-shadow: 0 0 0 1px #1f2933 inset; }
body.desk.in-setup .pick-tile input:checked + label .pt-check { background: #0a7457; border-color: #0a7457; color: #fff; }
body.desk.in-setup .pt-info:hover, body.desk.in-setup .pt-info[aria-expanded="true"] { background: #1f2933; border-color: #1f2933; color: #fff; }
body.desk.in-setup .pt-more { border-color: #cfd6dd; }
body.desk.in-setup .pt-more-close { background: #1f2933; color: #fff; }
/* Step 3: gray numbers, a green check once a step is done */
body.desk.in-setup .gl-list > li .gl-n { background: #1f2933 !important; color: #fff !important; }
body.desk.in-setup .gl-list > li.gl-step.is-done .gl-n { background: #0a7457 !important; color: #fff !important; }
body.desk.in-setup .pin-set .gl-unlock { background: #1f2933; color: #fff; }
body.desk.in-setup .pin-set .gl-dots i { background: #1f2933; border-color: #1f2933; }

/* Inventory Tracker shelf labels (tools.js openLabels). One label per item for the shelf edge. */
.stock-labels { width: min(900px, 96vw); }
.lab-shelf { display: grid; gap: 8px; }
.lab-shelf-name { margin: 0; font-size: 1.05rem; }
.lab-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0; }
.lab { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px dashed #8a949e; background: #ffffff; color: #1b1b1b; break-inside: avoid; page-break-inside: avoid; }
.lab-qr { flex: none; width: 84px; height: 84px; display: block; }
.lab-qr svg { width: 100%; height: 100%; display: block; }
.lab-text { display: grid; gap: 2px; min-width: 0; font-size: .85rem; line-height: 1.25; }
.lab-text strong { font-size: 1.05rem; overflow-wrap: anywhere; }
@media print {
  body.print-labels > *:not(#stock-labels) { display: none !important; }
  body.print-labels #stock-labels { display: block !important; position: static !important; inset: auto; width: auto; max-width: none; max-height: none; overflow: visible; margin: 0; padding: 0; border: 0; box-shadow: none; background: #fff; color: #000; }
  body.print-labels #stock-labels::backdrop { display: none; }
  body.print-labels #stock-labels .no-print { display: none !important; }
  body.print-labels #stock-labels .dialog-body { padding: 0; overflow: visible; max-height: none; }
  .lab-grid { grid-template-columns: repeat(3, 1fr); }
  .lab { border-color: #000; }
  .lab-qr { width: 0.9in; height: 0.9in; }
}

/* COGS Genie: a stack of uploads being read */
.check-row { display: flex; gap: .6rem; align-items: flex-start; }
.check-row input { width: 22px; height: 22px; margin: .15rem 0 0; flex: none; accent-color: var(--green, #0a6b4f); }
.check-row label { display: grid; gap: .15rem; font-weight: 600; cursor: pointer; }
.job-box h2 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.job-box .job-count { margin: 0; font-weight: 700; font-size: 1.05rem; }
.job-box progress { width: 100%; height: 14px; border-radius: 999px; overflow: hidden; appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: #eef2ef; }
.job-box progress::-webkit-progress-bar { background: #eef2ef; }
.job-box progress::-webkit-progress-value { background: #0a6b4f; border-radius: 999px; }
.job-box progress::-moz-progress-bar { background: #0a6b4f; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) { .job-box progress::-webkit-progress-value { transition: width .4s ease; } }
.job-done { border-color: #0a6b4f; }
.job-check { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #0a6b4f; color: #fff; font-size: .95rem; }

/* ================= Step 3, one screen layout ==========   Heading and step pills on one row, the three steps as cards side by side,
   then the more screens line and a Back and Go to my dashboard bar that stays at the bottom. */
.golive.onb { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 16px; }
.golive .gl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.golive .gl-head h1 { margin: .5rem 0 .3rem; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12; }
.golive .gl-head .onb-lead { font-size: 1.05rem; }
.golive .gl-head .onb-next.compact { margin: 0; }
.golive .gl-list { grid-area: auto; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.golive .gl-step { display: flex; flex-direction: column; gap: 12px; padding: 18px; min-width: 0; }
.golive .gl-step-head { display: flex; align-items: center; gap: 12px; }
.golive .gl-step h2 { font-size: 1.15rem; line-height: 1.25; }
.golive .gl-pin-form .field { max-width: none; }
.golive .gl-pin-form input { width: 100%; }
.golive .gl-pin-form .row { flex-wrap: wrap; }
.golive .gl-open { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.golive .gl-qr { width: 120px; height: 120px; }
.golive .gl-open-text .row { flex-wrap: wrap; }
.golive .gl-tablet { margin-top: auto; gap: 8px; }
.golive .gl-tablet .onb-device { max-width: 300px; padding: 10px; border-radius: 20px; }
.golive .gl-screen { min-height: 0; }
.golive .gl-lock { padding: 14px 10px; gap: 8px; }
.golive .gl-lock-icon { width: 40px; height: 40px; border-radius: 12px; }
.golive .gl-lock-icon svg { width: 22px; height: 22px; }
.golive .gl-lock b { font-size: 1rem; }
.golive .gl-dots i { width: 13px; height: 13px; }
.golive .gl-unlock { padding: 6px 18px; }
.golive .gl-tablet figcaption { font-size: .9rem; }
.golive .gl-more { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border: 1px dashed #b8c2cc; border-radius: var(--radius); color: var(--ink); }
.golive .gl-more a { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.golive .gl-more-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f1f3f5; color: #1f2933; font: 800 1.2rem/1 var(--display); }
.golive .gl-done { position: sticky; bottom: 0; z-index: 6; display: block; margin: 0 -4px; padding: 12px 4px calc(12px + env(safe-area-inset-bottom)); background: var(--surface, #fff); border-top: 1px solid var(--line); }
body.desk.in-setup .golive .gl-done { background: #fff; }
.golive .gl-done .setup-nav { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
.golive .gl-done .setup-nav > .btn:last-child { flex: 0 1 auto; min-width: 200px; }
@media (min-width: 900px) {
  .golive .gl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .golive .gl-open { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .golive .gl-open-text { justify-items: center; }
  .golive .gl-open-text .row { justify-content: center; }
}
@media (max-width: 899px) {
  .golive .gl-tablet .onb-device { max-width: 240px; }
}
@media (max-width: 480px) {
  .golive .gl-open { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .golive .gl-open-text { justify-items: center; }
  .golive .gl-open-text .row { justify-content: center; }
  .golive .gl-done .setup-nav > .btn:last-child { min-width: 0; flex: 1 1 auto; }
}
.golive .gl-open-text { display: grid; gap: 8px; }
.golive .gl-open-text > * + * { margin-top: 0; }
/* The older two column setup layout named grid areas; step 3 places its parts in one column instead */
.golive.onb > * { grid-area: auto; }
@media (max-width: 480px) { .golive .gl-done .btn.big { white-space: nowrap; padding-inline: 16px; font-size: 1rem; } }


/* First sign in, before there's a business: Settings shows only Sign out, and "Finish later" sits under the button. */
body.no-biz .acct-menu .owner-only, body.no-biz #acct-tour { display: none !important; }
.onb-later { display: grid; justify-items: center; gap: .25rem; text-align: center; margin-top: .25rem; }
.onb-later .linkish { font: inherit; font-weight: 700; color: var(--ink, #1f2933); background: none; border: 0; padding: 0 .5rem; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.onb-later .linkish:hover { color: var(--muted); }
.onb-later .linkish:focus-visible { outline: 3px solid var(--focus, #1f2933); outline-offset: 2px; border-radius: 3px; }
.onb-later .linkish:disabled { opacity: .6; cursor: default; }
.onb-later .hint { margin: 0; max-width: 34ch; }
/* ================= Command center (owner dashboard, Nov 13 2026) =================
   The look Jesus picked: warm white page, white top bar, the main menu always open on the left
   on laptops, plain numbers on top, Needs you today beside your tablets, then every tool with its
   own color. Phones keep the bottom quick menu and stack everything in one column. No charts. */
body.desk.cmd {
  --display: "Bricolage Grotesque", "Bricolage Fallback", "Figtree", "Figtree Fallback", system-ui, sans-serif;
  --line: #e3e0d9; --muted: #4b5768; --ink: #14202e;
  font-family: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.desk.cmd h1, body.desk.cmd h2, body.desk.cmd h3 { letter-spacing: -.015em; }

/* White top bar, like the home page */
body.desk.cmd .topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
body.desk.cmd .brand { color: var(--ink); }
body.desk.cmd .brand { --brand-check: #0a7457; }
body.desk.cmd .top-sep { color: #9aa3ad; }
body.desk.cmd .who, body.desk.cmd .loc-btn { color: var(--ink); }
body.desk.cmd .loc-btn { background: #fff; border-color: var(--line); }
body.desk.cmd .loc-btn:hover { background: var(--surface-2); }
body.desk.cmd .loc-btn[aria-expanded=true] { border-color: var(--ink); }
body.desk.cmd .topbar .avatar { background: #fde9a6; color: #5c3d00; border: 0; }
body.desk.cmd .topbar .menu-btn, body.desk.cmd .topbar .lang-btn { background: #fff; color: var(--ink); border-color: var(--line); }
body.desk.cmd .topbar .menu-btn:hover, body.desk.cmd .topbar .lang-btn:hover { background: var(--surface-2); }
body.desk.cmd .topbar :focus-visible { outline-color: #1a56db; }
body.desk.cmd .top-tabs a { color: var(--muted) !important; }
body.desk.cmd .top-tabs a:hover, body.desk.cmd .top-tabs a[aria-current=page] { color: var(--ink) !important; }
body.desk.cmd .top-tabs a[aria-current=page] { border-bottom-color: #0a7457; }

/* Main menu: colored tool icons, quiet group names, a green edge on the page you're on */
body.desk.cmd .side-nav .nav-group { font-size: .78rem; font-weight: 800; color: var(--muted); margin: 14px 10px 4px; }
body.desk.cmd .side-nav a { gap: .65rem; padding: 0 8px; border-radius: 12px; }
body.desk.cmd .side-nav a[aria-current=page] { background: var(--accent-soft); color: #064e3b; font-weight: 800; box-shadow: inset 3px 0 0 #0a7457; }
body.desk.cmd .side-nav .nav-ico { width: 30px; height: 30px; border-radius: 9px; }
body.desk.cmd .side-nav .nav-ico svg { width: 18px; height: 18px; }
body.desk.cmd .side-nav .nav-footer { background: transparent; }
body.desk.cmd .side-nav .nav-footer a:hover { background: var(--surface-2); }

/* Laptops: the menu stays open on the left of every page. Setup screens keep their own full width look. */
@media (min-width: 1100px) {
  body.desk.cmd:not(.in-setup) .topbar .wrap { max-width: 1440px; }
  body.desk.cmd:not(.in-setup) main.app-layout { max-width: 1440px; display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 0 32px; align-items: start; }
  body.desk.cmd:not(.in-setup) .side-nav:not([hidden]) { display: block; position: sticky; top: 84px; right: auto; width: auto; max-height: calc(100vh - 100px); overflow-y: auto; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; animation: none; z-index: 1; }
  body.desk.cmd:not(.in-setup) .menu-btn { display: none !important; }
  body.desk.cmd:not(.in-setup) .top-tabs { visibility: hidden; }
}

/* Greeting row: hello on the left, the two things owners do most on the right */
body.desk.cmd .home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
body.desk.cmd .home-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin: 0; }
.home-sub { margin: 4px 0 0; color: var(--muted); }
body.desk.cmd .quick-acts { display: flex; flex-wrap: wrap; gap: 10px; grid-auto-rows: auto; }
body.desk.cmd .quick-acts[hidden] { display: none; }
body.desk.cmd .quick-act { min-height: 48px; height: auto; padding: 6px 16px 6px 8px; border-radius: 999px; gap: 10px; }
body.desk.cmd .quick-act .tool-icon { width: 34px; height: 34px; border-radius: 50%; }
body.desk.cmd .quick-act .tool-icon svg { width: 18px; height: 18px; }
body.desk.cmd .quick-act .qa-sub { display: none; }

/* Colored icons everywhere on the dashboard (they were gray before) */
body.desk.cmd .tile .tool-icon[data-c], body.desk.cmd .quick-act .tool-icon[data-c], body.desk.cmd .need .tool-icon[data-c] { background: var(--tbg) !important; color: var(--ic) !important; }

/* Number row: the two COGS Genie money numbers, side by side on every screen */
body.desk.cmd .launchpad { gap: 22px; }
.home-nums { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.hn-top { display: flex; align-items: center; gap: 8px; }
.home-num .tool-icon { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--tbg, var(--accent-soft)); color: var(--ic, var(--accent-text)); }
.home-num .tool-icon svg { width: 18px; height: 18px; }
.home-num { display: grid; gap: 2px; height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.home-num:hover { border-color: var(--ink); }
.hn-label { font-weight: 700; font-size: .92rem; color: var(--muted); }
.hn-value { font: 800 2rem/1.15 var(--display); letter-spacing: -.01em; }
.home-num.bad .hn-value { color: #b42318; }
.home-num.good .hn-value { color: #0a7457; }
.hn-sub { font-size: .9rem; color: var(--muted); }

/* Needs you today beside Your tablets right now */
body.desk.cmd .needs { padding: 18px 20px; border-color: var(--line); border-radius: 16px; }
body.desk.cmd .needs h2 { font-size: 1.2rem; margin: 0 0 8px !important; }
body.desk.cmd .need { border: 0; border-radius: 10px; padding: 10px 6px; min-height: 60px; background: transparent; }
body.desk.cmd .need:hover { background: var(--surface-2); }
body.desk.cmd .needs.is-clear .needs-empty { color: #0a5c45; }

/* All your tools: four across on a laptop, each with its own color */
body.desk.cmd .section-title { font-size: 1.3rem; }
body.desk.cmd .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
@media (min-width: 1280px) { body.desk.cmd .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
body.desk.cmd .tile { border-radius: 16px; padding: 16px; gap: 6px; min-height: 128px; }
body.desk.cmd .tile .tool-icon { width: 40px; height: 40px; border-radius: 12px; }
body.desk.cmd .tile .tool-icon svg { width: 22px; height: 22px; }
body.desk.cmd .tile-name { font-weight: 800; font-size: 1.05rem; margin-top: 4px; }

/* Smaller laptops and tablets, then phones */
@media (max-width: 599px) {
  body.desk.cmd .home-head { margin-bottom: 12px; }
  body.desk.cmd .home-head h1 { font-size: 1.6rem; }
  body.desk.cmd .quick-acts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  body.desk.cmd .quick-act { padding-right: 10px; }
  .home-nums { gap: 10px; }
  .home-num { padding: 12px 14px; border-radius: 14px; }
  .hn-value { font-size: 1.6rem; }
  .hn-label, .hn-sub { font-size: .85rem; }
  body.desk.cmd .needs { padding: 14px 16px; }
  body.desk.cmd .need { flex-wrap: wrap; }
  body.desk.cmd .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.desk.cmd .tile { min-height: 0; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .home-num, body.desk.cmd .need { transition: none; } }

/* ===== Sample shop (046_sample_shop.sql): a made up shop for looking around ===== */
.sample-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.sample-note p { margin: 0; flex: 1 1 260px; font-weight: 600; }
.sample-note a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
.sample-note .sample-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
/* Sign in to your own shop: looks like the link beside it, but it's a button because it signs out the practice copy first. */
.sample-note .linkish { font: inherit; font-weight: 700; color: var(--accent-text); background: none; border: 0; padding: 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sample-note .linkish:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
body.sample-shop #role-note, body.sample-shop #loc-add, body.sample-shop #quick-acts { display: none !important; }
=======
/* ================= Setup list on the dashboard home =================
   Home page touches, kept quiet: the warm white page with two soft color circles in the corner,
   "set up" in the home page green, and each step led by its tool's colored icon. */
body.desk #start-card { position: relative; overflow: hidden; background:
    radial-gradient(520px 260px at 100% 0%, #f6f1e7, transparent 70%),
    radial-gradient(420px 220px at 0% 100%, #f1f4f8, transparent 70%), #fff; }
body.desk #start-card::before, body.desk #start-card::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
body.desk #start-card::before { width: 74px; height: 74px; top: -26px; right: 64px; background: #fde9a6; }
body.desk #start-card::after { width: 40px; height: 40px; top: 30px; right: 18px; background: #d3e5ff; }
body.desk #start-card > * { position: relative; z-index: 1; }
#start-title .w-set { color: #0a7457; font-weight: 800; white-space: nowrap; }
body.desk #start-card .progress span { background: #0a7457; }
/* Setup progress is a native <progress>. The track comes from the .progress rules above; the fill is set here.
   Each browser's fill rule stays separate, because a rule that mixes them is thrown away. */
progress.progress { display: block; inline-size: 100%; appearance: none; border: 0 solid; overflow: clip; --bar-fill: var(--accent); }
body.desk progress.progress { --bar-fill: var(--ink); }
body.desk #start-card progress.progress { --bar-fill: #0a7457; inline-size: calc(100% - 48px); }
progress.progress::-webkit-progress-bar { background: transparent; }
progress.progress::-webkit-progress-value { background: var(--bar-fill); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--bar-fill); border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  progress.progress::-webkit-progress-value { transition: inline-size .3s; }
  progress.progress::-moz-progress-bar { transition: inline-size .3s; }
}
.setup-list > li.step-row { grid-template-columns: 44px 1fr auto; }
.step-ico { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.step-ico .tool-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.step-ico .tool-icon svg { width: 24px; height: 24px; }
.step-ico .step-num { width: 34px; height: 34px; }
.step-check { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #0a7457; color: #fff; font-size: .7rem; font-weight: 800; border: 2px solid #fff; line-height: 1; }
.step-row[data-state=next] { background: #fffbf2; }
.step-row[data-state=next] .step-ico .tool-icon { box-shadow: 0 4px 12px rgb(20 32 46 / .1); }
.step-row[data-state=done] .step-ico .tool-icon { opacity: .75; }
@media (max-width: 599px) { .setup-list > li.step-row { grid-template-columns: 44px 1fr; } body.desk #start-card::before { right: 40px; } }

/* Sample shop: the tablet editor opens so visitors can see it; Save explains that nothing is kept. */
/* The sample shop shows each tablet's Edit button (data-keep, set in stations.js) and the editor's Save and Close. */
body.read-only.sample-shop #station-save, body.read-only.sample-shop #station-close { display: inline-flex !important; }
.station-edit { gap: .4rem; }
.station-edit .pencil { display: inline-grid; place-items: center; }

/* Kiosk setup help on the Tablets page */
.kiosk-help > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.kiosk-help > summary .hint { font-weight: 400; }
.kiosk-help > .stack { margin-top: .75rem; }
.kiosk-help h3 { font-size: 1.05rem; margin: .5rem 0 0; }
.kiosk-steps { margin: 0; padding-left: 1.4rem; max-width: 62ch; display: grid; gap: .5rem; line-height: 1.5; }


/* Sample shop and practice copy: a small label beside the shop name instead of a banner, so the dashboard
   looks the way a real one does. The sign in and email links sit at the bottom of the menu. */
.sample-chip { display: inline-flex; align-items: center; margin-left: 6px; flex: none; }
.sample-mark { display: inline-block; padding: 2px 8px; border: 1.5px solid #b42318; border-radius: 6px; background: #fff; color: #b42318;
  font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; white-space: nowrap; }
@media (forced-colors: active) { .sample-mark { border-color: CanvasText; color: CanvasText; } }
.sample-chip[hidden], .nav-sample[hidden] { display: none; }
.nav-sample .linkish { font: inherit; font-weight: 700; color: var(--accent-text); background: none; border: 0; padding: 0; min-height: 44px; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nav-sample .linkish:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
.nav-sample a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* A brighter frame: a thin brand green line across the top of every owner page, crisper cards on a cleaner
   page color. Text colors stay the same on every tool page; tool colors stay on the icons. */
body.desk.cmd .topbar { box-shadow: inset 0 3px 0 var(--accent); }
body.desk.cmd { --bg: #f2f6fa; --line: #d3dde8; --shadow: 0 1px 2px rgb(20 32 46 / .06), 0 8px 24px rgb(30 70 120 / .09); }
/* ================= Design audit, Nov 14 2026: items 6 to 9 =================
   No thick colored stripes down the side of cards. Where the color means a status, a small dot
   says it instead, next to words that already say it, so color is never the only sign. */
.item-row, .board-row, .pt-rest .board-row { border-left: 0; position: relative; padding-left: 22px; }
.item-row::before, .board-row::before { content: ""; position: absolute; left: 4px; top: 24px; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.item-row[data-status=red]::before, .item-row[data-status=expired]::before, .board-row[data-status=red]::before { background: var(--danger); }
.item-row[data-status=yellow]::before, .item-row[data-status=soon]::before, .board-row[data-status=yellow]::before { background: #b38600; }
.item-row[data-status=green]::before, .item-row[data-status=good]::before, .board-row[data-status=green]::before { background: #0a7457; }
.board-row[data-status=red] { background: none; }
.pt-rest .board-row { padding-left: 10px; }
.pt-rest .board-row::before { left: 4px; top: 26px; width: 8px; height: 8px; }
.cert-card, .cert-card[data-status] { border-left: 1px solid var(--line); position: relative; padding-left: 26px; }
.cert-card::before { content: ""; position: absolute; left: 10px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.cert-card[data-status=good]::before { background: #0a7457; }
.cert-card[data-status=soon]::before { background: #b38600; }
.cert-card[data-status=expired]::before { background: #c0261a; }
.insp-status, .insp-status[data-status=soon], .insp-status[data-status=overdue], .insp-status[data-status=none] { border-left: 1px solid var(--line); background: var(--surface); }
.cart-group { border-left: 1px solid var(--line); background: var(--surface-2); }
/* Build an order is the one place vendors get their own color, so a cart split four ways reads as four
   clear blocks. Each block still says its vendor's name, so the color is never the only sign. No red
   (red means broken or overdue here) and no purple. Each stripe is at least 3 to 1 against its block. */
.cart-group.tint-0 { background: #ecf8f2; border-left: 6px solid #13875f; }
.cart-group.tint-1 { background: #ecf3fc; border-left: 6px solid #2f6fb3; }
.cart-group.tint-2 { background: #fdf2e8; border-left: 6px solid #b8641a; }
.cart-group.tint-3 { background: #e8f6f7; border-left: 6px solid #0f7f88; }
.cart-group.tint-4 { background: #f8f5e4; border-left: 6px solid #8a7520; }
.cart-group.tint-5 { background: #eef1f5; border-left: 6px solid #56667a; }
.pt-group { border-left: 1px solid var(--line); }
.stat.hot, .stat.good { box-shadow: none; }
.onb-next li[data-state="current"], body.desk .onb-next li[data-state="current"], body.desk.in-setup .onb-next li[data-state="current"] { box-shadow: 0 6px 18px rgb(20 32 46 / .06); }
.step-row[data-state=next] { box-shadow: none; }

/* Dashboard tool cards: counts in dark text. Red only for an open staff alert, an expired
   certificate or an overdue inspection. */
body.desk.cmd .tile.hot .tile-status { color: var(--ink); font-weight: 700; }
body.desk.cmd .tile.hot.broken .tile-status { color: #b42318; }
.home-num.warn .hn-value { color: var(--ink); }

/* "Need help?" button: room under the last card so it never hides the end of a page,
   and a round ? on phones. The words stay for screen readers. */
main.app-layout { padding-bottom: 104px; }
@media (max-width: 959px) {
  .help-fab { width: 52px; height: 52px; min-height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .help-fab .help-fab-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .help-fab-ico { width: 36px; height: 36px; font-size: 1.2rem; }
  body.has-tabbar main.app-layout { padding-bottom: 96px; }
}

/* Tools as the to do list (Nov 14 2026): Needs you today is gone. Tiles that need the owner come first and say
   exactly what is waiting; red stays only for overdue or broken. Tablets live in the menu, not on the home page. */
.tools-sum { margin: 2px 0 0; color: var(--muted); font-size: .95rem; display: flex; align-items: center; gap: .45rem; }
.tools-sum:empty { display: none; }
.tools-sum.is-clear { color: #0a5c45; font-weight: 600; }

/* Text only main menu (Nov 14 2026): tool names with no icons, the same on every page. Icons stay on the dashboard tiles.
   Names line up with the group headings, and the page you're on keeps its gray fill and green edge. */
body.desk.cmd .side-nav a, body.desk.cmd .side-nav .nav-signout { padding: 0 10px; min-height: 42px; }
.side-nav .nav-ico { display: none; }

/* Account paused by SetDip (054_admin_console.sql): a calm notice in place of the dashboard. */
.paused-note { max-width: 560px; margin: 24px auto; }
.paused-note h1 { font-size: clamp(1.6rem, 3vw, 2rem); }
.paused-note .paused-name { font-weight: 700; color: var(--muted); margin-top: -.25rem; }

/* ---------- Inventory Tracker: Racks view ---------- */
/* List or Racks */
/* Segmented switch, the way iOS and Google Material draw it: a light gray track, the picked side a raised white tab. */
.view-seg { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #efeeeb; }
.view-seg button { min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #4a4945; font: inherit; font-weight: 600; cursor: pointer; }
.view-seg button:hover:not([aria-pressed="true"]) { background: rgba(255,255,255,.55); color: var(--ink); }
.view-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.view-seg button:focus-visible { outline: 3px solid #1d5fb8; outline-offset: 2px; }

.racks-tools { gap: .5rem; }
.racks { display: grid; gap: 12px; min-width: 0; }
.racks-pos { margin: 0; font-weight: 600; text-align: center; flex: 1; min-width: 0; }

/* Swipe rack to rack: one rack per screen on a phone, two side by side on a laptop or tablet */
.racks-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px 2px 12px; scrollbar-width: thin; }
.racks-track:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
.rack-card { flex: 0 0 min(100%, 560px); scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
@media (min-width: 900px) { .rack-card { flex-basis: calc(50% - 8px); } }
.rack-head { display: grid; gap: 2px; }
.rack-name { margin: 0; font-size: 1.25rem; }
.rack-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .95rem; }
.rack-low { color: var(--danger); font-weight: 600; }
.rack-worth { margin: 0; font-size: .95rem; color: var(--ink); }
.rack-counted { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .92rem; color: var(--muted); }
.stale-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; border: 1px dashed var(--muted); color: var(--ink); font-weight: 600; font-size: .85rem; }
.stale-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; }
/* The rack itself, drawn like a commercial stainless steel shelving unit: two brushed steel posts with
   adjustable feet, and a slatted shelf deck with a rounded front lip under each row of items. It is all CSS,
   so it stretches to however many shelves each rack has and the items always sit on their own shelf. */
.rack-frame { --post: 14px; --gap: 12px; position: relative; margin-bottom: 16px; padding: 6px calc(var(--post) + var(--gap)) 0;
  background: linear-gradient(180deg, #f7f9fa, #edf0f2); border-radius: 2px; }
.rack-frame::before, .rack-frame::after { content: ""; position: absolute; top: -6px; bottom: -16px; width: var(--post); z-index: 0; border-radius: 3px 3px 2px 2px;
  background:
    linear-gradient(180deg, transparent calc(100% - 16px), #5f6870 calc(100% - 16px), #8a939b calc(100% - 4px), #4d555c calc(100% - 4px)),
    linear-gradient(90deg, #77818a 0%, #c9d0d6 22%, #f8fafb 42%, #d5dbe0 58%, #a2abb3 80%, #6c757e 100%);
  box-shadow: 1px 0 0 rgb(0 0 0 / .06); }
.rack-frame::before { left: 0; }
.rack-frame::after { right: 0; }
.rack-shelves { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; }
.rack-shelf { position: relative; display: grid; gap: 6px; padding: 10px 0 28px; min-height: 104px; align-content: end; }
/* Slatted deck, seen a little from above, then the bright front lip that wraps onto the posts */
.rack-shelf::before, .rack-shelf::after { content: ""; position: absolute; left: calc(-1 * (var(--post) + var(--gap) - 2px)); right: calc(-1 * (var(--post) + var(--gap) - 2px)); pointer-events: none; }
.rack-shelf::before { bottom: 9px; height: 13px; clip-path: polygon(2.5% 0, 97.5% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / .35), rgb(0 0 0 / .12)),
    repeating-linear-gradient(90deg, #e9edf0 0 9px, #c2c9cf 9px 11px, #707a83 11px 14px); }
.rack-shelf::after { bottom: 0; height: 10px; border-radius: 2px 2px 3px 3px;
  background: linear-gradient(180deg, #ffffff 0%, #dde2e6 35%, #a9b2ba 75%, #7b858e 100%);
  box-shadow: 0 3px 4px rgb(20 32 46 / .18); }
.rack-shelf.is-over { background-color: var(--accent-soft); outline: 2px dashed var(--accent-text); outline-offset: -2px; border-radius: 6px; }
.shelf-name { font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.shelf-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.shelf-empty { margin: 0; color: var(--muted); font-size: .9rem; }
/* A rack nobody has fully counted in 2 days fades: the steel washes out, while its words stay readable */
.rack-card.is-stale .rack-frame { background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }
.rack-card.is-stale .rack-frame::before, .rack-card.is-stale .rack-frame::after,
.rack-card.is-stale .rack-shelf::before, .rack-card.is-stale .rack-shelf::after { opacity: .45; }
.rack-card.is-stale .rack-item { background: color-mix(in srgb, var(--surface) 70%, transparent); border-style: dashed; }

/* One item on a shelf: name, fill bar against its goal, and the count in words (never color alone) */
.rack-item { display: grid; gap: 4px; width: 138px; min-height: 44px; text-align: left; padding: 8px 10px; border-radius: 10px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--line); font: inherit; cursor: pointer; }
.rack-item:hover { border-color: var(--muted); }
.rack-item[data-status=red] { border-left-color: var(--danger); }
.rack-item[data-status=yellow] { border-left-color: #e0a800; }
.rack-item[data-status=green] { border-left-color: var(--accent); }
.rack-item.is-dragging { opacity: .5; }
.ri-name { font-weight: 700; font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
/* Spots on the shelf: filled for what's there, empty outlines for what's missing, so a low item looks bare */
.ri-spots { display: flex; flex-wrap: wrap; gap: 3px; }
span.spot { width: 12px; height: 14px; border-radius: 3px; border: 1.5px dashed #8a949e; background: transparent; }
span.spot.is-full { border: 1.5px solid transparent; background: var(--accent); }
.rack-item[data-status=yellow] span.spot.is-full { background: #e0a800; }
.rack-item[data-status=red] span.spot.is-full { background: var(--danger); }
.rack-item[data-status=none] span.spot { border-color: #b8c0c8; }
.ri-text { font-size: .85rem; color: var(--muted); line-height: 1.25; }
.ri-state { font-size: .8rem; font-weight: 700; line-height: 1.2; }
.rack-item[data-status=red] .ri-state { color: var(--danger); }
.rack-item[data-status=yellow] .ri-state { color: #7a5600; }
.rack-item[data-status=green] .ri-state { color: var(--ok); }
.rack-item[data-status=none] .ri-state { color: var(--muted); }

.rack-tray.is-over { outline: 2px dashed var(--accent-text); outline-offset: -2px; }
.tray-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tray-item { display: grid; gap: 4px; justify-items: start; }

/* Dialogs */
.rack-dlg { width: min(520px, calc(100vw - 32px)); }
.rack-item-state { margin: 0; font-weight: 700; }
.rack-item-state[data-status=red] { color: var(--danger); }
.rack-item-state[data-status=yellow] { color: #7a5600; }
.rack-item-state[data-status=green] { color: var(--ok); }
.rack-facts { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rack-fact { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 12px; padding: 10px 14px; }
.rack-fact + .rack-fact { border-top: 1px solid var(--line); }
.rack-fact dt { color: var(--muted); }
.rack-fact dd { margin: 0; font-weight: 600; }
.rack-setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rack-setup-row { display: grid; grid-template-columns: 1fr 96px; gap: 8px 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.rack-setup-btns { grid-column: 1 / -1; gap: .4rem; }

/* Rack labels print bigger than item labels, two across */
.lab-rack .lab-qr { width: 120px; height: 120px; }
.lab-rack .lab-text strong { font-size: 1.4rem; }
@media print {
  .lab-grid-racks { grid-template-columns: repeat(2, 1fr); }
  .lab-rack { padding: .3in; }
  .lab-rack .lab-qr { width: 1.6in; height: 1.6in; }
}
@media (prefers-reduced-motion: reduce) { .racks-track { scroll-behavior: auto; } }

/* Things to order: a button in the top row with the count on it, opening a side panel grouped by vendor */
.order-btn { display: inline-flex; align-items: center; gap: 8px; }
.order-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: .85rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.order-badge.is-red { background: var(--danger); color: #fff; }
.order-badge[hidden] { display: none; }
.order-sum-red { color: var(--danger); font-weight: 600; font-size: .95rem; }
.order-count { align-items: center; gap: 8px 12px; }
.order-vendor { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.order-send { gap: 8px; }
.order-send .btn { align-self: flex-start; }

dialog.drawer { margin: 0 0 0 auto; width: min(520px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
dialog.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .2s ease-out; }
dialog.drawer .dialog-head { flex: none; }
dialog.drawer .dialog-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } }
@media (max-width: 600px) {
  dialog.drawer { width: 100vw; max-width: 100vw; border-radius: 0; }
  @keyframes drawer-in { from { transform: translateY(24px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { dialog.drawer[open] { animation: none; } }

/* Items page: one compact card, a short heading per shelf, one line per item */
.inv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.inv-card { padding: 6px 0; display: grid; }
.inv-group + .inv-group { border-top: 1px solid var(--line); }
.inv-group-h { margin: 0; display: flex; align-items: center; gap: 8px; padding: 12px 18px 4px; font-size: .85rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.inv-group-n { font-weight: 600; }
.inv-list { list-style: none; margin: 0; padding: 0 0 6px; }
.inv-row { width: 100%; min-height: 52px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto 14px; align-items: center; gap: 4px 12px;
  padding: 8px 18px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.inv-row:hover { background: var(--surface-2); }
.inv-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 8px; }
.inv-list li + li .inv-row { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.inv-dot { width: 12px; height: 12px; border-radius: 50%; background: transparent; border: 2px dashed #8a949e; }
.inv-row[data-status=green] .inv-dot { border: 0; background: var(--ok); }
.inv-row[data-status=yellow] .inv-dot { border: 0; background: #e0a800; }
.inv-row[data-status=red] .inv-dot { border: 0; background: var(--danger); }
.inv-name { font-weight: 700; overflow-wrap: anywhere; }
.inv-qty { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-state { font-size: .85rem; font-weight: 700; white-space: nowrap; min-width: 96px; text-align: right; }
.inv-row[data-status=green] .inv-state { color: var(--ok); }
.inv-row[data-status=yellow] .inv-state { color: #7a5600; }
.inv-row[data-status=red] .inv-state { color: var(--danger); }
.inv-row[data-status=none] .inv-state { color: var(--muted); }
.inv-chev { color: var(--muted); font-size: 1.4rem; line-height: 1; }
@media (max-width: 560px) {
  .inv-row { grid-template-columns: 12px minmax(0, 1fr) auto 12px; grid-template-areas: "dot name state chev" "dot qty qty chev"; padding: 8px 14px; }
  .inv-dot { grid-area: dot; } .inv-name { grid-area: name; } .inv-qty { grid-area: qty; font-size: .92rem; } .inv-state { grid-area: state; min-width: 0; } .inv-chev { grid-area: chev; }
  .inv-group-h { padding: 12px 14px 4px; }
}

/* The item panel's summary on top: where the item stands, with Add to order and Move */
.prep-summary { padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* Racks: rename next to the name, and dragging an item between shelves */
.rack-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rack-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.shelf-items .rack-item.is-before { box-shadow: -6px 0 0 -2px var(--accent-text); }
.rack-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .92; box-shadow: 0 10px 24px rgb(20 32 46 / .3); transform: rotate(-2deg); }
.shelf-items .rack-item { box-shadow: 0 2px 0 rgb(20 32 46 / .12); }
@media (prefers-reduced-motion: reduce) { .rack-ghost { transform: none; } }

/* Items and Storage Map switch. Things to order (with its red count) sits in the page's top row. */
#prep-head-btns { flex: 1 1 100%; row-gap: 16px; }
.order-wrap { position: relative; display: inline-flex; }
.order-wrap[hidden] { display: none; }
.view-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
/* Rack shelves: Add or Remove a shelf on each rack. Add an item lives once, in the rack's header. */
.shelf-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }

/* Rack name: the name is the rename button. A light box and a pencil say it can be changed; tapping it turns
   it into a text box in the same spot, the way Google Drive and Trello rename things. */
.rack-name-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; margin: -4px 0 -4px -9px; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: text; }
.rack-name-btn:hover { background: var(--surface-2); border-color: var(--muted); }
.rack-name-btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.rack-name-text { overflow-wrap: anywhere; }
.rack-name-pen { display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.rack-name-btn:hover .rack-name-pen { color: var(--ink); }
.rack-name-input { width: min(100%, 22ch); min-height: 40px; margin: -4px 0 -4px -9px; padding: 3px 8px; font: inherit; color: inherit;
  border: 2px solid var(--accent-text); border-radius: 8px; background: var(--surface); }

/* Shelf height. Each shelf is drawn taller or shorter by what the owner set. No numbers show; it's a picture of
   the rack. The steel deck under each shelf is the handle: drag it up or down. Minus and plus do the same. */
.rack-shelf { min-height: calc(var(--in, 14) * var(--px-in, 7px) + 84px); }
/* Fit to screen: a short window gets shorter shelves first, then items drop their count line (color and Low stay). */
.rack-tight .rack-shelf { padding-top: 6px; }
.rack-tight .ri-text { display: none; }
.rack-tight .rack-item { min-height: 40px; padding: 6px 10px; }
.shelf-ht { display: inline-flex; align-items: center; gap: 2px; }
.shelf-ht { gap: 6px; }
.ht-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: 700 1.05rem/1 inherit; cursor: pointer; }
.ht-btn::before { content: ""; position: absolute; inset: -6px; }
.ht-btn { position: relative; }
.ht-btn:hover:not(:disabled) { background: var(--surface-2); }
.ht-btn:disabled { opacity: .4; cursor: default; }
.ht-btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.shelf-grip { position: absolute; z-index: 2; bottom: -4px; height: 30px; left: calc(-1 * (var(--post) + var(--gap) - 2px)); right: calc(-1 * (var(--post) + var(--gap) - 2px));
  display: grid; place-items: center; cursor: ns-resize; touch-action: none; border-radius: 6px; }
.shelf-grip-pill { display: inline-grid; place-items: center; min-width: 44px; height: 22px; padding: 0 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .85rem; line-height: 1; opacity: 0; transition: opacity .15s; }
.rack-shelf:hover .shelf-grip-pill, .shelf-grip:focus-visible .shelf-grip-pill, .rack-shelf.is-sizing .shelf-grip-pill { opacity: 1; }
@media (hover: none) { .shelf-grip-pill { opacity: 1; } }
.shelf-grip:hover, .rack-shelf.is-sizing .shelf-grip { box-shadow: 0 0 0 2px var(--accent-text); }
.shelf-grip:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 0; }
.rack-shelf.is-sizing { background-color: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .shelf-grip-pill { transition: none; } }
.rack-title .rack-name { margin-right: auto; }
.shelf-step { gap: 6px; align-items: center; margin-top: 4px; }
.shelf-step-n { font-size: .9rem; color: var(--muted); margin-right: 2px; }

/* Items sit side by side on a shelf, never stacked. Each square shrinks as more go on the shelf. */
.shelf-items { flex-wrap: nowrap; gap: 6px; }
.shelf-items > li { flex: 1 1 0; min-width: 0; max-width: 138px; display: flex; }
.shelf-items .rack-item { width: 100%; min-width: 0; }
.shelf-items[data-size=m] .rack-item { padding: 7px 8px; }
.shelf-items[data-size=m] .ri-name { font-size: .88rem; }
.shelf-items[data-size=s] .rack-item { padding: 6px 6px; gap: 3px; }
.shelf-items[data-size=s] .ri-name { font-size: .8rem; }
.shelf-items[data-size=s] .ri-text, .shelf-items[data-size=s] .ri-state { font-size: .72rem; }
.shelf-items[data-size=s] span.spot { width: 8px; height: 10px; }
.shelf-items[data-size=xs] .rack-item { padding: 5px 4px; gap: 2px; }
.shelf-items[data-size=xs] .ri-name { font-size: .72rem; }
.shelf-items[data-size=xs] .ri-text { display: none; }
.shelf-items[data-size=xs] .ri-state { font-size: .66rem; }
.shelf-items[data-size=xs] span.spot { width: 6px; height: 8px; border-width: 1px; }
.shelf-items[data-size=s] .ri-spots, .shelf-items[data-size=xs] .ri-spots { gap: 2px; }

/* Racks page: drag hint, a grab cursor on items that move, and the See tablet view button. */
.racks-hint { margin: 0; font-size: .95rem; }
.rack-item[draggable=true] { cursor: grab; }
.rack-item[draggable=true]:active { cursor: grabbing; }
.tablet-view-btn { display: inline-flex; align-items: center; gap: 8px; }
.tablet-ico { flex: none; }

/* See tablet view: the staff screen inside a 10 inch Fire tablet frame, same frame as Try it on the tablet. */
.tablet-dlg { width: min(1360px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.tv-stage { display: grid; place-items: center; min-width: 0; }
.tv-device { background: #2b333d; border-radius: 26px; padding: 16px; box-shadow: 0 14px 40px rgb(20 32 46 / .22); position: relative; }
.tv-device::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #4a5461; }
.tv-device[data-orient=landscape]::before { top: 50%; left: 5px; margin-top: -4px; }
.tv-device[data-orient=portrait]::before { left: 50%; top: 5px; margin-left: -4px; }
.tv-screen { position: relative; overflow: hidden; border-radius: 8px; background: #fff; }
.tv-screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.tv-size { margin: 0; text-align: center; font-size: .92rem; }
.tablet-dlg [aria-pressed=true] { background: var(--surface-2); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 600px) { .tv-device { padding: 10px; border-radius: 18px; } }

/* Storage Map full page (#storage): the left menu, the Dashboard link and the page header buttons step aside so the
   racks get the whole width. Back to Inventory Tracker sits on top, next to the Add to cart pill. */
body.racks-page #side-nav, body.racks-page #view-prep > .back, body.racks-page #prep-desc, body.racks-page #prep-head-btns { display: none !important; }
body.racks-page main.app-layout, body.desk.cmd.racks-page:not(.in-setup) main.app-layout { display: block; max-width: 1600px; }
body.racks-page #view-prep .page-head { margin-bottom: 4px; }
.racks-back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* One rack at a time (Nov 15). The rack keeps its usual size, about half a laptop screen, and sits centered with
   Previous and Next above it; swipe or the arrow keys go rack to rack. The one card at a time pattern Apple Wallet
   and Google Photos use. */
/* Nov 17: the rack fills the width under the buttons instead of sitting centered with empty sides. */
.racks { width: 100%; }
.rack-card, .racks-track .rack-card { flex: 0 0 100%; }
@media (min-width: 900px) { .rack-card { flex-basis: 100%; } }
/* How to arrange: tucked into a one line toggle so the rack gets the room */
details.racks-hint > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; color: var(--ink); }
details.racks-hint > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
details.racks-hint > p { margin: 6px 0 0; }

/* Storage Map top (Nov 17): a small link back, then one row of buttons, left aligned and close together. */
.racks-top { margin: -4px 0 -6px; }
.racks-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 2px; border: 0; background: none;
  color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.racks-link:hover { text-decoration: underline; }
.racks-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.racks-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.racks-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.racks-btns > .btn, .racks-btns .edit-menu-btn { min-height: 44px; padding: 0 16px; }
.edit-menu-h { margin: 6px 12px 2px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.edit-menu-h:first-child { margin-top: 4px; }
@media (max-width: 600px) { .racks-toolbar > .room-head { flex-basis: 100%; } }
/* Storage Map tips: a small "i" right after the title, opening a note that always fits the screen. */
body.racks-page #view-prep .page-head > div:first-child { display: flex; align-items: center; gap: 6px; }
.racks-tip-btn { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; }
.racks-tip-btn .tip-ico { width: 26px; height: 26px; font-size: 1rem; }
.racks-tip-btn:hover .tip-ico { background: var(--accent-text); }
.racks-tip-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.tip-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--surface);
  font: 700 .8rem/1 Georgia, "Times New Roman", serif; font-style: italic; }
.tip-dlg { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.tip-dlg .dialog-head { padding: 12px 12px 12px 20px; }
.tip-dlg .dialog-body { padding: 16px 20px 20px; }
.tip-x { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; font-size: 1.5rem; line-height: 1; }
.tip-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.45; overflow-wrap: anywhere; }
@media (forced-colors: active) { .tip-ico { border: 1px solid ButtonText; } }

/* Review your order: the pill's pop up. One row per item with its amount and Remove. */
.cart-review { width: min(620px, calc(100vw - 24px)); }
.cr-list { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cr-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px 12px; padding: 10px 12px; border-left: 4px solid var(--line); }
.cr-row + .cr-row { border-top: 1px solid var(--line); }
.cr-row[data-status=red] { border-left-color: var(--danger); }
.cr-row[data-status=yellow] { border-left-color: #e0a800; }
.cr-what { display: grid; gap: 2px; min-width: 0; }
.cr-what .muted, .cr-what .order-where { font-size: .9rem; }
.cr-amt { display: inline-flex; align-items: center; gap: 6px; }
dialog .dialog-body input.cr-qty[type=number], .cr-qty { width: 4.5em; min-width: 0; min-height: 44px; padding: 4px 6px; border-width: 1px; text-align: center; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.cr-qty:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.cr-unit { color: var(--muted); font-size: .9rem; }
.cr-amt .ht-btn { width: 44px; height: 44px; font-size: 1.1rem; }
.cr-amt .ht-btn::before { inset: 0; }
.cr-row.is-off { background: var(--surface-2); }
.cr-row.is-off .cr-what strong { text-decoration: line-through; }
.cr-row.is-off .cr-what, .cr-row.is-off .cr-amt { opacity: .6; }
.cr-left { margin: 0; min-height: 1.2em; }
.cr-foot { gap: 8px; flex-wrap: wrap; }
@media (max-width: 680px) {
  .cr-row { grid-template-columns: 1fr auto; }
  .cr-what { grid-column: 1 / -1; }
}

/* Prep Check: compact list with folding groups (tools.js renderPrep) */
.prep-head { align-items: center; }
.prep-count { margin: 0; font-weight: 700; }
.prep-tools { gap: 8px; align-items: center; }
.prep-fold > summary { list-style: none; cursor: pointer; min-height: 44px; padding-top: 10px; padding-bottom: 10px; border-radius: 8px; }
.prep-fold > summary::-webkit-details-marker { display: none; }
.prep-fold > summary:hover { background: var(--surface-2); }
.prep-fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.prep-fold-name { color: var(--ink); font-size: .95rem; }
.prep-fold-low { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-radius: 999px; padding: 2px 9px; }
.prep-fold-ok { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--muted); }
.prep-fold-chev { width: 9px; height: 9px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(-45deg); margin: 0 4px 0 6px; transition: transform .15s; flex: none; }
.prep-fold[open] .prep-fold-chev { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .prep-fold-chev { transition: none; } }
.prep-card .inv-state { min-width: 0; }

/* Email chip boxes (email-chips.js): Staff Alerts emails */
.chips-box { display: grid; gap: 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 2px 2px 2px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.chip-text { overflow-wrap: anywhere; }
.chip-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; flex: none; }
.chip-x:hover { background: var(--line); color: var(--ink); }
.chip-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.chips-type { display: flex; gap: 8px; align-items: stretch; }
.chips-type > input { flex: 1; min-width: 0; }
.chips-add[hidden] { display: none; }
.chips-msg { margin: 0; font-size: .92rem; font-weight: 600; color: var(--danger); }

/* Staff Alerts: tablets with extra people. One row each: tinted tablet name on the left (color on
   the label only, name always written), plain black and white email chips on the right. */
.ar-sum { display: grid; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.ar-sum[hidden] { display: none; }
.ar-sum-h { margin: 0; font-size: 1rem; }
.ar-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ar-row { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.ar-tab { display: flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 8px; border: 1px solid transparent; color: #1c1c1a; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.ar-tab-name { overflow-wrap: anywhere; }
.ar-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ar-tab[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #1c1c1a; }
.ar-tint-0 { background: #e3f1e6; border-color: #b9dcc1; }
.ar-tint-1 { background: #fbf1d0; border-color: #ead49a; }
.ar-tint-2 { background: #e2ecf7; border-color: #b8cde6; }
.ar-tint-3 { background: #fbe6da; border-color: #ecc3ab; }
.ar-tint-4 { background: #dff0ee; border-color: #b0d8d3; }
.ar-tint-5 { background: #ecebe8; border-color: #d2d0cb; }
.ar-chips .chip { background: #fff; color: #1c1c1a; }
.ar-undo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .92rem; }
.ar-undo:empty { display: none; }
@media (max-width: 560px) {
  .ar-row { grid-template-columns: 1fr; }
}
.chips-fix { font-weight: 700; color: var(--ink); text-decoration: underline; }

/* Items as storage spot tiles (Inventory Tracker). Neutral icons; the only color is the low badge. */
.spot-find input { width: min(100%, 26rem); min-height: 44px; }
.spot-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.spot-tile { width: 100%; min-height: 128px; display: grid; justify-items: start; align-content: start; gap: 4px; padding: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.spot-tile:hover { border-color: #8a8984; }
.spot-tile:focus-visible { outline: 3px solid #1d5fb8; outline-offset: 2px; }
.spot-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #efeeeb; color: #4a4945; margin-bottom: 4px; }
.spot-ico svg { width: 24px; height: 24px; }
.spot-name { font-weight: 700; font-size: 1.02rem; line-height: 1.25; overflow-wrap: anywhere; }
.spot-n { color: var(--muted); font-size: .92rem; }
.spot-low { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: #fbe4e1; color: #8f2318; font-size: .85rem; font-weight: 700; }
.spot-tile[data-kind="none"] { border-style: dashed; }
.spot-head { display: flex; }
.spot-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
/* Inside a list card the title and notes line up with the rows (18px in, 14px on a phone), never against the edge. */
.inv-card > .spot-title-row { padding: 10px 18px 8px; }
.inv-card > .inv-note { margin: 0; padding: 10px 18px 12px; }
@media (max-width: 560px) { .inv-card > .spot-title-row { padding: 10px 14px 8px; } .inv-card > .inv-note { padding: 8px 14px 10px; } }
.inv-name .inv-where { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
@media (max-width: 560px) { .spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .spot-tile { min-height: 116px; padding: 12px; } }

/* Inbox: Everything emailed in */
.inbox-history .hist-row { align-items: flex-start; }
.hist-where { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; }
.inbox-history .sort-q { margin-top: 6px; }

/* Per tablet rows: the add box sits right of the name, bubbles above it, all in black and white */
.ar-emails { min-width: 0; }
.ar-emails .chip { background: #fff; color: #1c1c1a; }
.ar-emails input { width: 100%; }
label.ar-tab { cursor: default; }
.ar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ar-head-h { font-weight: 700; }

/* Fill by voice inside Add an item (Nov 16). The panel opens above Save; fields it filled get a gray band and a
   "From your voice" tag until the owner checks them. Neutral colors only, so it never looks like a warning.
   The gray edge is 7:1 on white, and the tag text is dark ink, so the marks pass ADA without relying on color alone. */
.vf-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2, #f6f7f9); }
.vf-box h3 { margin: 0; font-size: 1.05rem; }
.vf-box .voice-example { margin: 0; font-size: .92rem; }
.field.vf-filled input, .field.vf-filled select { border-color: #5b6573; box-shadow: inset 3px 0 0 #5b6573; background: #f6f7f9; }
.vf-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #e7eaee; color: #2b3542; font-size: .78rem; font-weight: 700; vertical-align: middle; }
#prep-vf-btn svg, #prep-vf-go svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .vf-box { padding: 12px; } .vf-tag { margin-left: 0; margin-top: 4px; } }

/* Inventory Tracker top row: one filled main button (Add an item) and plain light gray outlines for the rest,
   instead of green outlines next to a green button. Google and Apple keep one filled action per row the same way. */
#prep-head-btns .btn.ghost { background: #fff; border-color: #c9ced6; color: var(--ink); }
#prep-head-btns .btn.ghost:hover { background: var(--surface-2, #f6f7f9); }

/* Several items by voice: the form swaps to one review card per item, then Save all. */
form.vf-many-on > [hidden] { display: none !important; }
.vf-many-list h3 { margin: 0; font-size: 1.1rem; }
.vf-row { margin: 0; border: 1px solid var(--line); border-left: 3px solid #5b6573; border-radius: 12px; padding: 10px 14px 12px; background: #fff; min-width: 0; }
.vf-row legend { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-weight: 800; }
.vf-row legend .vf-tag { margin-left: 0; }
.vf-row-grid { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.vf-row-grid .field { margin: 0; min-width: 0; }
.vf-row-grid input, .vf-row-grid select { width: 100%; }
@media (max-width: 560px) { .vf-row { padding: 8px 10px 10px; } .vf-row-grid { grid-template-columns: 1fr 1fr; } .vf-row-grid .field:first-child { grid-column: 1 / -1; } }

/* Rack fit, Nov 16: the rack's header packs onto fewer lines (name and shelves on one row on a laptop or tablet,
   then items, value and last count on the next), so a full rack fits a 13 inch Mac and a Fire tablet without scrolling. */
.rack-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.rack-head > .rack-title { flex: 1 1 auto; min-width: 0; }
.rack-head > .rack-meta, .rack-head > .rack-worth, .rack-head > .rack-counted { flex: 0 1 auto; }
.rack-tighter .rack-worth, .rack-tighter .rack-card:not(.is-stale) .rack-counted, .rack-tighter .shelf-ht, .rack-tighter .ri-spots { display: none; }
.rack-card.rack-tighter:not(.is-stale) .rack-counted { display: none; }
.rack-tighter .shelf-top { min-height: 22px; }
.rack-tighter .rack-shelf { padding-bottom: 24px; gap: 4px; min-height: calc(var(--in, 14) * var(--px-in, 7px) + 60px); }
.rack-tighter .rack-item { min-height: 34px; padding: 4px 8px; gap: 2px; }
.rack-card { padding: 12px 16px; gap: 8px; }

/* Rack and room names show in full (Nov 16): a long name wraps instead of ending in "…". */
.rack-name, .room-name { min-width: 0; max-width: 100%; }
/* No percentage max-width on the button itself: Chrome then sizes a button to its narrowest fit and a short name
   like "Dry storage" wraps with room to spare. The heading around it keeps it inside the row. */
.rack-name-btn { white-space: normal; text-align: left; max-width: none; }
.rack-name-text { overflow-wrap: anywhere; min-width: 0; }
.rack-name-input { width: min(100%, 26ch); }

/* Inventory Tracker home: room between the search box and the tiles. */
.spot-home { display: grid; gap: 16px; }
.spot-find { margin: 0; }
.inv-find { padding: 4px 18px 6px; }
.inv-find .spot-find input { width: 100%; max-width: 30rem; }
@media (max-width: 560px) { .inv-find { padding: 4px 14px 6px; } }
.spot-title-text { display: grid; min-width: 0; }
.spot-sub { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Storage Map rooms: tiles like Items, then the open room's name, its rack count and the racks one at a time. */
.rooms .spot-grid { margin: 0; }
.room-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.room-head > .spot-ico { margin: 0; }
.room-title { min-width: 0; flex: 0 1 auto; }
.room-name { margin: 0; font-size: 1.35rem; }
.room-count { color: var(--muted); font-weight: 600; white-space: nowrap; }
.room-add-nums { gap: 12px; align-items: flex-end; }
.room-add-nums .field { flex: 1 1 10rem; }
.room-setup-row .field .muted { display: block; margin-top: 4px; }

/* Edit racks and Edit shelves: one quiet button each, opening a short menu (same look as a checklist's Options). */
.edit-menu-wrap { position: relative; display: inline-flex; }
.edit-menu-btn { min-height: 44px; white-space: nowrap; }
.edit-menu-chev { font-size: .8em; }
.edit-menu { min-width: 210px; }
.edit-menu .cl-menu-item[disabled] { color: var(--muted); cursor: default; background: transparent; }

/* A rack's header row: full name, Previous and Next beside it, then Add an item and Edit shelves on the right. */
.rack-title .rack-name { margin-right: 0; }
.rack-arrows { display: inline-flex; align-items: center; gap: 6px; }
.rack-arrows .btn { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; font-size: 1.3rem; line-height: 1; }
.rack-arrows .btn[disabled] { opacity: .4; cursor: default; }
.rack-of { color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* Storage Map spacing (Nov 16 night): items get room to breathe. About 12px between each item square and the
   shelf bar under it, a little more room from the steel posts, 12px between squares, and the room's icon no
   longer touches the room name beside it. */
.rack-frame { --gap: 16px; }
.rack-shelf { padding-bottom: 34px; }
.rack-tighter .rack-shelf { padding-bottom: 30px; }
.shelf-items { gap: 12px; }
@media (max-width: 600px) { .shelf-items { gap: 10px; } }


/* Wider rack (Nov 17): item squares can grow a little on a laptop so a full width shelf doesn't look empty. */
@media (min-width: 900px) { .shelf-items > li { max-width: 176px; } }
.room-head { gap: 6px 10px; }
.room-name .rack-name-input { font: inherit; font-size: 1.1rem; }

/* ===== Inspections tiles and Maintenance Logs (compliance.js) =====
   Icons stay neutral gray like the dashboard, so the status dot is the only color that speaks. */
.comp-icon { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: #3c4a5c; }
.comp-grid-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; }
.comp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .85rem; }
.comp-tile {
  width: 100%; height: 100%; min-height: 9rem; display: grid; grid-template-rows: auto 1fr auto; align-items: start; gap: .55rem;
  padding: 1rem; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.comp-tile:hover { border-color: #b8c7d6; }
.comp-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.comp-tile[data-level=red] { border-left-color: var(--danger); }
.comp-tile[data-level=yellow] { border-left-color: #e0a800; }
.comp-tile[data-level=ok] { border-left-color: var(--ok); }
.comp-tile-name { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.comp-tile-line { display: flex; align-items: center; gap: .45rem; font-size: .95rem; color: var(--muted); }
.comp-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: #9aa7b6; }
[data-level=red] .comp-dot, .comp-tile-line[data-level=red] .comp-dot { background: var(--danger); }
[data-level=yellow] .comp-dot, .comp-tile-line[data-level=yellow] .comp-dot { background: #e0a800; }
[data-level=ok] .comp-dot, .comp-tile-line[data-level=ok] .comp-dot { background: var(--ok); }
.comp-tile[data-level=red] .comp-tile-line, .comp-tile-line[data-level=red] { color: var(--danger); font-weight: 600; }
/* A visit or service already asked for: a calm slate blue, not a warning. If it was overdue, the words still say so. */
.comp-tile[data-level=asked] { border-left-color: #5b7083; }
[data-level=asked] .comp-dot, .comp-tile-line[data-level=asked] .comp-dot { background: #5b7083; }
.comp-tile[data-level=asked] .comp-tile-line, .comp-tile-line[data-level=asked] { color: #3d4f60; font-weight: 600; }
/* The tiles sit as far below the header or the Coming due card as one row of tiles sits below the next.
   (.comp-grid's own margin: 0 used to cancel the page's spacing, so the card and the first row nearly touched.) */
.stack > * + .comp-grid { margin-top: .85rem; }

.comp-back { align-self: flex-start; }
.comp-detail-head { display: flex; align-items: center; gap: .9rem; }
.comp-detail-head .comp-icon { width: 56px; height: 56px; border-radius: 14px; }
.comp-facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .45rem 1rem; margin: 0; }
.comp-facts dt { font-weight: 700; }
.comp-facts dd { margin: 0; color: var(--muted); }
.comp-recs .item-row { align-items: flex-start; }

/* Picking what to turn on */
.comp-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.comp-group legend { font-weight: 700; font-size: 1.05rem; padding: 0; margin-bottom: .5rem; }
.comp-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .55rem; }
.comp-pick { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; min-height: 3.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.comp-pick input { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--accent-text); margin: 0; }
.comp-pick:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }
.comp-pick:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.comp-pick .comp-icon { width: 36px; height: 36px; border-radius: 10px; }
.comp-pick-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.comp-pick-name { font-weight: 600; }
.comp-pick-often { font-size: .88rem; color: var(--muted); }

/* Adding a record */
.comp-form { border-top: 1px solid var(--line); padding-top: 1rem; }
.comp-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .75rem; }
.comp-way { padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); gap: .4rem; }
.comp-way .muted { font-size: .93rem; line-height: 1.45; }
.comp-way { display: flex; flex-direction: column; }
.comp-way > * + * { margin-top: 0; }
.comp-way > .btn { align-self: flex-start; }
.comp-recs .item-row > .stack { display: flex; flex-direction: column; align-items: flex-start; }
.comp-recs .item-row > .stack > * + * { margin-top: 0; }
.comp-thumb { max-width: 100%; max-height: 12rem; border-radius: var(--radius-sm); border: 1px solid var(--line); object-fit: contain; background: #fff; }
.comp-address { display: block; overflow-wrap: anywhere; padding: .45rem .6rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.comp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .25rem 1rem; }
.comp-fields .field { margin: 0; }
/* Coming due: the two week heads up above the tiles, and the Request a visit email */
.comp-heads { border-left: 4px solid #e0a800; }
.comp-heads-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.comp-heads-row { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.comp-heads-row:first-child { border-top: 0; padding-top: 0; }
.comp-heads-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.comp-ask textarea { width: 100%; min-height: 12rem; resize: vertical; font: inherit; line-height: 1.5; }
.comp-ask .link-btn { min-height: 32px; }
@media (max-width: 560px) {
  .comp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stack > * + .comp-grid { margin-top: .6rem; }
  .comp-tile { min-height: 8rem; padding: .8rem; }
  .comp-icon { width: 38px; height: 38px; }
  .comp-tile-name { font-size: 1rem; }
  .comp-tile-line { font-size: .88rem; }
  .comp-facts { grid-template-columns: 1fr; gap: .1rem; }
  .comp-facts dd { margin-bottom: .45rem; }
  .comp-heads-row > .btn { width: 100%; }
}

/* An emailed repair or service paper waiting for its tile (Nov 17). Neutral frame, no alarm color. */
.comp-pending { border: 1px dashed var(--line); background: var(--surface-2); }
.comp-pending .row { flex-wrap: wrap; gap: .5rem; }
.comp-from-mail { gap: .35rem; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }

/* Five hubs (Nov 15 2026): Money, Stock, Kitchen, Team and Compliance hold every tool, in the menu and on the
   dashboard. Red is only for what needs the owner now (past due, broken or out). Amber is the to do list.
   Everything else stays gray, so the one red thing on the page stands out. */
:root { --now-ink: #b42318; --now-dot: #d92d20; --now-soft: #fee4e2; --now-badge: #912018;
        --todo-ink: #7a4500; --todo-dot: #d97706; --todo-soft: #fef0c7; }

/* ---------- Menu: each hub folds open and shut ---------- */
.side-nav h2.nav-group { margin: 2px 0 0; padding: 0; border-top: 0; font: inherit; text-transform: none; letter-spacing: 0; }
body.desk.cmd .side-nav h2.nav-group { margin: 2px 0 0; font-size: 1rem; color: var(--ink); }
.side-nav .nav-main + .nav-group { margin-top: 8px; }
.nav-hub { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 12px;
  background: none; color: var(--ink); font: inherit; font-weight: 700; font-size: 1rem; text-align: left; cursor: pointer; }
.nav-hub:hover { background: var(--surface-2); }
.nav-hub:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.nav-hub-name { flex: 1 1 auto; }
.nav-hub-dot:not([hidden]) { width: 9px; height: 9px; border-radius: 50%; background: var(--now-dot); flex: none; }
.nav-hub-chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.nav-hub[aria-expanded="true"] .nav-hub-chev { transform: rotate(90deg); }
.side-nav ul.nav-hub-list:not(.is-open) { display: none; }
.side-nav ul.nav-hub-list { margin: 0 0 6px; }
.side-nav ul.nav-hub-list a, body.desk.cmd .side-nav ul.nav-hub-list a { padding-left: 22px; font-weight: 500; min-height: 40px; }
body.desk.cmd .side-nav ul.nav-hub-list a[aria-current=page] { font-weight: 800; }

/* ---------- Dashboard: five hub cards ---------- */
/* Even rows (Nov 17): cards in a row share one height, and the last row splits the width evenly, so five groups
   read as three on top and two below with no empty space. Same on a Fire tablet; two across in between; one on a phone. */
.hubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: stretch; }
/* The 3 over 2 spans live only in the wide layout. Before, they also applied on phones and tablets (they outranked
   the narrow rules), so the last two cards asked for 3 columns in a 1 or 2 column grid and the page scrolled sideways. */
@media (min-width: 1100px) {
  .hubs > .hub { grid-column: span 2; }
  .hubs:has(> .hub:nth-child(4):last-child) > .hub,
  .hubs:has(> .hub:nth-child(2):last-child) > .hub,
  .hubs:has(> .hub:nth-child(5):last-child) > .hub:nth-child(n+4) { grid-column: span 3; }
  .hubs > .hub:only-child { grid-column: 1 / -1; }
}
@media (max-width: 1099px) {
  .hubs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hubs > .hub:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.hub { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 8px; display: flex; flex-direction: column; }
.hub.lv2 { border-color: #f1b8b2; }
.hub-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; }
/* Every group icon gets the same neutral box, Money included (it had no tint, so it showed with no box). */
.hub-head .tool-icon, .hub-head .tool-icon[data-c] { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: #f4f4f5 !important; color: var(--ink) !important; border: 1px solid var(--line); }
.hub-head .tool-icon svg { width: 22px; height: 22px; }
.hub-name { flex: 1 1 auto; margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
/* Your tools on the dashboard: a bigger heading, with how many tools and groups are on beside it. */
.toolbox .section-row h2.section-title, body.desk.cmd .toolbox .section-title { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .2rem; }
.tools-count { margin: 0 0 .25rem; color: var(--muted); font-weight: 600; }
@media (max-width: 599px) { .toolbox .section-row h2.section-title, body.desk.cmd .toolbox .section-title { font-size: 1.5rem; } }
.badge.is-now { background: var(--now-soft); color: var(--now-badge); }
.badge.is-todo { background: var(--todo-soft); color: var(--todo-ink); }
.hub-tools { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hub-tools > li + li { border-top: 1px solid #edf1f5; }
.hub-tool { display: grid; grid-template-columns: 10px minmax(0, 1fr) 18px; align-items: center; gap: 10px; min-height: 52px; padding: 8px 6px;
  margin: 0 -2px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.hub-tool:hover { background: var(--surface-2); }
.hub-tool:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.ht-dot { width: 9px; height: 9px; border-radius: 50%; }
.hub-tool.lv2 .ht-dot { background: var(--now-dot); }
.hub-tool.lv1 .ht-dot { background: var(--todo-dot); }
.ht-text { display: grid; gap: 1px; min-width: 0; }
.ht-name { font-weight: 700; line-height: 1.25; }
.ht-status { font-size: .9rem; color: var(--muted); line-height: 1.35; }
.need-part.lv2 { color: var(--now-ink); font-weight: 700; }
.need-part.lv1 { color: var(--todo-ink); font-weight: 600; }
.ht-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Food cost this month, first in the number row ---------- */
.home-nums:has(> li:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
.fc-note.is-over { color: var(--todo-ink); font-weight: 600; }
.fc-note.is-under { color: #0a5c45; font-weight: 600; }
.sales-form { display: grid; gap: 6px; margin-top: 6px; }
.sales-form label { font-weight: 700; font-size: .92rem; }
.sales-row { display: flex; gap: 8px; align-items: center; }
.sales-row input { flex: 1 1 auto; min-width: 0; max-width: 220px; min-height: 44px; }
.sales-form .hint { font-size: .85rem; color: var(--muted); }
.sales-form .status { margin: 0; }
.fc-month .sales-form { max-width: 420px; }

@media (max-width: 899px) {
  .home-nums:has(> li:nth-child(3)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-nums > li:first-child:nth-last-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .hubs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hubs > .hub, .hubs > .hub:last-child:nth-child(odd) { grid-column: auto; }
  .hub { padding: 12px 12px 6px; }
  .hub-tool { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .nav-hub-chev { transition: none; } }
@media (forced-colors: active) { .ht-dot, .nav-hub-dot:not([hidden]) { background: CanvasText; } }

/* Dashboard summary: one line when a safety email is urgent (Nov 17). */
.sum-urgent { display: inline-block; margin-top: .35rem; color: var(--now-ink); font-weight: 700; }
.sum-urgent:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }

/* ---------- Forms that line up ----------
   Each field is label, box, then help text under the box. Fields share their three rows with the
   fields beside them (subgrid), so every box in a row starts on the same line even when one label
   or help text runs longer. The form card is the container, so the columns follow the card's width. */
.insp-form, .comp-form { container-type: inline-size; }

.form-rows { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 1rem; }
.form-rows > .field { grid-column: span 6; }
@container (min-width: 34rem) {
  .form-rows > .field { grid-column: span 3; }
  .form-rows > .field.full-mid { grid-column: span 6; }
}
@container (min-width: 50rem) {
  .form-rows > .field, .form-rows > .field.full-mid { grid-column: span 2; }
  .form-rows > .field.half { grid-column: span 3; }
}

.comp-fields { grid-template-columns: minmax(0, 1fr); gap: 0 1rem; }
@container (min-width: 30rem) { .comp-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 50rem) { .comp-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.form-rows > .field, .comp-fields > .field {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start;
  margin: 0; padding-bottom: 1.1rem; min-width: 0;
}
.form-rows > .field > label, .comp-fields > .field > label { align-self: end; }
.form-rows .hint, .comp-fields .hint { margin-top: .4rem; }
.field > input + .hint, .field > select + .hint, .field > textarea + .hint { margin-top: .4rem; }
.field > .hint:empty { margin: 0; }

/* The upload button looks like the site's other buttons. The box still says how many files were picked. */
input[type=file] { color: var(--muted); font-size: .95rem; }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; font-size: .95rem; min-height: 44px; padding: 0 18px; margin-right: 12px;
  border-radius: 999px; border: 2px solid var(--accent-text); background: transparent; color: var(--accent-text); cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--surface-2); }
input[type=file]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 999px; }

/* Upload button with Email it in right beside it. */
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.upload-row > input[type=file] { flex: 0 1 auto; }
.upload-mail:empty { display: none; }
.upload-mail .mail-pop { justify-content: flex-start; }
.upload-mail .mail-pop-btn { min-height: 44px; }
.upload-mail .mail-pop-panel { left: 0; right: auto; }

/* Page buttons on the right of a page heading. */
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.page-actions > div:empty { display: none; }
.page-actions .mail-pop-btn { min-height: 48px; }

/* Spacing around the rows of boxes: a clear break after the upload part, and no doubled gap after the last row. */
.insp-form > .form-rows { margin-top: 1.5rem; }
.insp-form > .form-rows + * { margin-top: 0; }
.comp-form > .comp-fields + * { margin-top: 0; }

/* Date and number boxes on the record form match the other boxes (they were browser default before). */
.comp-form input[type=date], .comp-form input[type=number], .comp-form input[type=tel], .comp-form input[type=url] {
  width: 100%; min-height: 50px; padding: 11px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm);
}

/* COGS Genie header: three numbers on one row now that food cost is there too. Email it in sits with the page buttons. */
.cogs-nums { grid-template-columns: repeat(2, max-content); gap: 12px 36px; }
@container (max-width: 560px) { .cogs-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } }
#cogs-head-mail:empty { display: none; }
#cogs-head-mail .mail-pop-btn { min-height: 48px; }

/* Laptops: Need help? and Tablet view both sit bottom right. When Tablet view shows, Need help? moves up above it.
   (Phones and small tablets already put them side by side.) */

/* Certification Tracker: Email it in sits with Inspector view and Add a certificate. */
#cert-head-mail:empty { display: none; }
#cert-head-mail .mail-pop-btn { min-height: 44px; }

/* Lists drawn as one card (Team Tips, the guide): the same side padding as other cards, so buttons don't touch the edge. */
.item-list.card { padding: 8px 22px; }

/* Phones: the Email it in panel opens in place under its button, full width, instead of floating off the edge of the screen. */
@media (max-width: 600px) {
  .mail-pop { flex-wrap: wrap; }
  .mail-pop-panel, .upload-mail .mail-pop-panel { position: static; width: 100%; flex-basis: 100%; margin-top: 8px; box-shadow: none; }
  div:has(> .mail-pop > .mail-pop-panel:not([hidden])) { flex-basis: 100%; width: 100%; }
  .page-actions .mail-pop, #cogs-head-mail .mail-pop, #cert-head-mail .mail-pop { justify-content: flex-start; }
}

/* Inspections visit history: a table on laptops; on phones each visit stacks as its own block so nothing
   is cut off at the card edge (the way most big apps show tables on a phone). Labels only show when stacked. */
.insp-hist .hist-lab { display: none; }
@media (max-width: 600px) {
  .insp-hist thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .insp-hist, .insp-hist tbody, .insp-hist tr { display: block; width: 100%; }
  .insp-hist tbody tr { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 6px 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
  .insp-hist tbody tr:first-child { border-top: 0; padding-top: 4px; }
  .insp-hist tbody th, .insp-hist td { display: block; border: 0; padding: 0; }
  .insp-hist tbody th, .insp-hist td:nth-child(2), .insp-hist td.hist-actions { grid-column: 1 / -1; }
  .insp-hist td.hist-actions { padding-top: 4px; }
  .insp-hist .hist-lab { display: inline; color: var(--muted); font-size: .85rem; font-weight: 600; margin-right: 6px; }
}

/* Two or more boxes side by side (.grid): every box starts on the same line.
   .line-up forms keep label, box, help text under the box, sharing rows with the fields beside them.
   Older .grid forms keep a short hint in the label; the label grows so the boxes still line up. */
.grid.line-up { row-gap: 0; }
.grid.line-up > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; padding-bottom: 1rem; min-width: 0; }
.grid.line-up > .field > label { align-self: end; }
.grid.line-up > .field > .hint { margin-top: .4rem; }
.grid:not(.line-up) > .field { display: flex; flex-direction: column; min-width: 0; }
.grid:not(.line-up) > .field > label { flex: 1 0 auto; }
.grid:not(.line-up) > .field > input[type=checkbox], .grid:not(.line-up) > .field > input[type=radio] { align-self: flex-start; }

/* Checklists: How often in the list editor (075). Days are tap pills; From and Until share a row and stack on a phone. */
.cl-often { padding-top: 4px; }
.cl-days { border: 0; padding: 0; margin: 0; min-width: 0; }
.cl-days legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.cl-day-picks { gap: 8px; }
.cl-hours { gap: 12px; align-items: flex-end; }
.cl-hours .field { flex: 1 1 140px; }
/* History: how the rounds went, one short line, the round picker beside it. */
.cl-rounds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.cl-rounds select { min-height: 44px; max-width: 100%; }
.cl-missed { color: var(--danger); font-weight: 700; }
/* Get It Handled: service companies, equipment and service calls (handled.js). Neutral site colors; a status dot
   carries the only color, always next to a word. Also the service call box and Coming up on Maintenance Logs. */
.gih-title-row { display: flex; align-items: center; gap: .9rem; }
.gih-title-row .comp-icon { width: 52px; height: 52px; border-radius: 14px; }
.gih-title-row .comp-icon svg { width: 26px; height: 26px; }
.head-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.gih-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.gih-stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: flex; flex-direction: column; }
.gih-num { font: 800 1.6rem/1.1 var(--display); }
.gih-lbl { color: var(--muted); font-size: .95rem; }
.gih-tabs { margin-bottom: 0; }
.gih-panel { margin-top: 1rem; }
.gih-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.chip-f { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.chip-f[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gih-calls { list-style: none; margin: 0; padding: 0; }
.gih-call + .gih-call { border-top: 1px solid var(--line); }
.gih-call-btn { width: 100%; display: grid; grid-template-columns: 7.5rem 1fr; grid-template-areas: "st name" "st meta" "st has"; gap: .1rem 1rem; align-items: start; text-align: left; padding: .9rem .5rem; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--radius-sm); }
.gih-call-btn:hover { background: var(--surface-2); }
.gih-call-btn .gih-st { grid-area: st; margin-top: .1rem; }
.gih-call-name { grid-area: name; font-weight: 700; font-size: 1.05rem; }
.gih-call-meta { grid-area: meta; color: var(--muted); font-size: .95rem; }
.gih-call-has { grid-area: has; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.gih-call-has span { font-size: .82rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); color: #3c4a5c; }
.gih-st { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .92rem; }
.gih-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #9aa7b6; flex: none; }
.gih-st[data-st=open] { color: var(--danger); } .gih-st[data-st=open] .gih-dot { background: var(--danger); }
.gih-st[data-st=scheduled] { color: #6b4e00; } .gih-st[data-st=scheduled] .gih-dot { background: #e0a800; }
.gih-st[data-st=fixed] { color: var(--ok); } .gih-st[data-st=fixed] .gih-dot { background: var(--ok); }
@media (max-width: 560px) { .gih-call-btn { grid-template-columns: 1fr; grid-template-areas: "st" "name" "meta" "has"; } }

.gih-vendors { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .85rem; }
.gih-vendor { height: 100%; display: flex; flex-direction: column; gap: .5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.gih-vendor-top { display: flex; gap: .75rem; align-items: center; }
.gih-vendor-top .comp-icon { width: 40px; height: 40px; border-radius: 11px; }
.gih-vendor-top .comp-icon svg { width: 20px; height: 20px; }
.gih-cat { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.gih-vname { font-weight: 800; font-size: 1.1rem; margin: 0; line-height: 1.25; }
.gih-vendor .comp-facts { font-size: .95rem; grid-template-columns: max-content 1fr; }
.gih-vendor .comp-facts dd { overflow-wrap: anywhere; }
.gih-reach-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; padding-top: .4rem; }
.gih-reach-row .btn, .gih-reach .btn { min-height: 44px; padding: 0 14px; font-size: .95rem; }
.gih-add { border-style: dashed; box-shadow: none; align-items: flex-start; justify-content: center; }
.gih-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.gih-table th, .gih-table td { text-align: left; padding: .6rem .5rem; border-top: 1px solid var(--line); }
.gih-table thead th { border-top: 0; color: var(--muted); font-size: .85rem; }
.gih-table td { font-variant-numeric: tabular-nums; }
.gih-spend { overflow-x: auto; }
.gih-later { margin-top: 1rem; }
.gih-equip-facts { margin-top: .35rem; font-size: .93rem; }

.gih-callbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; border-left: 6px solid var(--ink); }
.gih-callbox h2 { font-size: 1.3rem; margin: 0 0 .25rem; }
.gih-callbox > div:first-child { flex: 1 1 22rem; }
.gih-callbox .row { display: flex; flex-wrap: wrap; gap: .6rem; }

.gih-vcard { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.gih-vcard p { margin: 0; }
.gih-vcard .gih-vname { font-size: 1rem; }
.gih-media { display: flex; flex-wrap: wrap; gap: .5rem; }
.gih-media .btn svg { width: 18px; height: 18px; }
.gih-file { cursor: pointer; }
.gih-file:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.gih-attached { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.gih-attached:empty { display: none; }
.gih-attached li { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: .9rem; }
.gih-attached img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.gih-urgent { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.gih-urgent legend { font-weight: 700; margin-bottom: .4rem; padding: 0; width: 100%; }
.gih-urgent label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--surface); }
.gih-urgent input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); margin: 0; }
.gih-urgent label:has(input:checked) { border-color: var(--ink); font-weight: 700; }
.gih-urgent label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.gih-msg h3 { margin: 0; font-size: 1rem; }
.gih-msg-text { margin: 0; padding: .75rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); white-space: pre-wrap; font-size: .95rem; }
.gih-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.gih-or { font-size: .92rem; }

.gih-status-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.gih-status-pick legend { font-weight: 700; padding: 0; margin-bottom: .4rem; width: 100%; }
.gih-status-pick label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.gih-status-pick input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); margin: 0; }
.gih-status-pick label:has(input:checked) { border-color: var(--ink); font-weight: 700; background: var(--surface-2); }
.gih-status-pick label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.gih-timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.gih-timeline li { position: relative; padding: 0 0 1rem .9rem; }
.gih-timeline li::before { content: ""; position: absolute; left: -1.55rem; top: .45rem; width: .7rem; height: .7rem; border-radius: 50%; background: #9aa7b6; box-shadow: 0 0 0 3px var(--surface); }
.gih-when { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); }
.gih-timeline p { margin: .15rem 0 0; }
.gih-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .45rem; }
.gih-photo { width: 88px; height: 88px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; background: var(--surface-2); }
.gih-fixbox { padding: 1rem; border: 1px dashed #b8c7d6; border-radius: var(--radius-sm); }
.gih-fixbox h3 { margin: 0 0 .3rem; font-size: 1.05rem; }

.gih-read { display: grid; gap: .6rem; }
.gih-read-note { margin: 0; font-weight: 600; }

.gih-next { border: 0; padding: 0; margin: 0; min-width: 0; }
.gih-next legend { font-weight: 700; padding: 0; margin-bottom: .4rem; }

.gih-ask { border: 1px solid var(--line, #d6dfda); border-left: 4px solid #8a6d1f; border-radius: 10px; padding: .75rem .9rem; margin: .5rem 0; background: var(--surface, #fff); }
.gih-ask-h { margin: 0 0 .15rem; font-weight: 700; }
.gih-ask-opts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .6rem; }
.gih-ask-opts label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; font-weight: 600; }
.gih-ask-opts input { width: 1.2rem; height: 1.2rem; }
.gih-mic[aria-pressed=true] { border-color: var(--danger); color: var(--danger); }
.gih-note-line { white-space: pre-wrap; }
.gih-label-img { max-width: min(100%, 22rem); border-radius: 10px; border: 1px solid var(--line); }

/* Menu: Get It Handled sits on its own line right after the Compliance hub, one tap away. */
.side-nav ul.nav-solo { margin: 2px 0 0; }
.side-nav ul.nav-solo a { padding: 0 10px; font-weight: 700; font-size: 1rem; }
.gih-dialog fieldset { border: 0; margin: 0; padding: 0; }
.gih-dialog legend { font-weight: 700; margin-bottom: 6px; }
.gih-status-pick label, .gih-ask-opts label, .gih-urgent label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: 16px; }
.head-actions + .gih-stats { margin-top: 1rem; }

/* Left menu icons (Nov 16 2026). Each hub and Get It Handled gets its own soft icon color so the menu reads
   at a glance instead of one long column of words. Notion, Slack and Google Workspace do the same.
   Only the small icon carries color; the names stay the same dark text. No red, yellow or green here,
   because those mean past due, running low and ready everywhere in SetDip. Dashboard, Inbox and Tablets
   keep a plain gray icon. Every icon color is at least 5:1 on its tile (ADA asks 3:1 for icons). */
.side-nav .nav-ico, body.desk.cmd .side-nav .nav-ico { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px;
  background: var(--hub-bg, transparent); color: var(--hub-ink, #5b6573); }
.side-nav .nav-ico svg, body.desk.cmd .side-nav .nav-ico svg { width: 18px; height: 18px; }
/* Money was blue until Nov 16. Blue is the color Mac, Windows and Google use for "selected", so a blue
   tile read as the page you were on. Gold reads as money and never as a selection. */
.side-nav .nav-ico[data-hub=money] { --hub-ink: #765708; --hub-bg: #f8efd6; }
.side-nav .nav-ico[data-hub=stock] { --hub-ink: #0a6b7c; --hub-bg: #ddf1f4; }
.side-nav .nav-ico[data-hub=kitchen] { --hub-ink: #8f4c1f; --hub-bg: #f7eadf; }
.side-nav .nav-ico[data-hub=team] { --hub-ink: #a3336a; --hub-bg: #f9e6ef; }
.side-nav .nav-ico[data-hub=compliance] { --hub-ink: #33506f; --hub-bg: #e6ecf2; }
.side-nav .nav-ico[data-hub=handled] { --hub-ink: #4048a6; --hub-bg: #e9eafb; }
/* The page you're on keeps its own icon color instead of turning green. */
.side-nav a[aria-current=page] .nav-ico { color: var(--hub-ink, #14202e); }

/* Names line up in one column: icon, a 10px gap, then the name. Tools inside an open hub sit under the name. */
.side-nav .nav-main a, .side-nav ul.nav-solo a, body.desk.cmd .side-nav .nav-main a, body.desk.cmd .side-nav ul.nav-solo a { gap: 10px; padding: 0 10px; }
.nav-hub { gap: 10px; }
.side-nav ul.nav-hub-list a, body.desk.cmd .side-nav ul.nav-hub-list a { padding-left: 48px; }

/* Where you are: a soft gray band with a dark edge, the same for every menu item, so color in the menu
   only ever means which section it is. Dark text on the gray band is about 15:1. */
.side-nav a[aria-current=page], body.desk.cmd .side-nav a[aria-current=page] { background: #eef1f5; color: #14202e; font-weight: 800; box-shadow: inset 3px 0 0 #14202e; }

@media (forced-colors: active) {
  .side-nav .nav-ico, body.desk.cmd .side-nav .nav-ico { background: Canvas; color: CanvasText; }
  .side-nav a[aria-current=page], body.desk.cmd .side-nav a[aria-current=page] { outline: 2px solid CanvasText; outline-offset: -2px; }
}

/* Tablet editor (Nov 16 2026). Tapping a tablet on the Tablets page opens its screen full size, like device setup
   in Square and Toast: the owner types the name where the team sees it and adds, removes and moves tools on the
   tool row. Black and white like the real tablet, with colored tool icons. Nothing saves until Save. */

/* The tablet drawing on each card is the way in. */
.mini-screen-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; border-radius: 18px; }
.mini-screen-btn .mini-screen { transition: box-shadow .15s ease; }
.mini-screen-btn:hover .mini-screen { box-shadow: 0 10px 24px -12px rgb(10 16 24 / .45); }
.mini-screen-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.ms-edit { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #14202e; color: #fff; font-weight: 800; font-size: .85rem; box-shadow: 0 4px 12px rgb(0 0 0 / .25); }
.ms-edit svg { width: 14px; height: 14px; }

/* Full screen, on every device. */
dialog.tab-studio { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: var(--bg, #f4f5f4); box-shadow: none; }
dialog.tab-studio[open] { display: block; }
.ts { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.ts-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ts-head h2 { margin: 0; font-size: 1.25rem; }
.ts-sub { margin: 2px 0 0; color: var(--muted); font-size: .92rem; max-width: 64ch; }
.ts-head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ts-lang button { min-height: 40px; }

.ts-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 16px 20px; min-height: 0; }
.ts-stage { container-type: size; display: grid; place-items: center; min-height: 0; min-width: 0; }
.ts-device { width: min(100cqw, calc(100cqh * 1.6)); aspect-ratio: 16 / 10; box-sizing: border-box; border: 12px solid #1b2430; border-radius: 24px; background: #fff; overflow: hidden; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .45); }

/* The tablet's own screen */
.ts-screen { height: 100%; display: flex; flex-direction: column; background: #fff; color: #14202e; font-size: 15px; overflow: hidden; }
.tsb-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 18px 8px; }
.tsb-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tsb-logo { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tsb-brand, #14202e); color: #fff; font-weight: 800; font-size: 1.2rem; }
.tsb-names { min-width: 0; }
.tsb-biz { margin: 0; font-weight: 800; font-size: 1.3rem; line-height: 1.2; }
.tsb-name-wrap { position: relative; display: inline-flex; align-items: center; margin-top: 4px; max-width: 100%; }
.tsb-name { box-sizing: border-box; width: 24ch; max-width: 100%; min-height: 38px; padding: 4px 34px 4px 12px; border-radius: 999px; border: 2px dashed #8a96a3; background: #f1f3f5; color: #14202e; font: inherit; font-weight: 700; font-size: .98rem; }
.tsb-name::placeholder { color: #5b6573; }
.tsb-name:hover { border-color: #14202e; }
.tsb-name:focus { outline: 3px solid var(--focus); outline-offset: 2px; border-style: solid; border-color: #14202e; background: #fff; }
.tsb-pen { position: absolute; right: 11px; display: grid; color: #4f5d6b; pointer-events: none; }
.tsb-langs { display: inline-flex; border: 1px solid #c9d1d9; border-radius: 999px; overflow: hidden; font-size: .85rem; font-weight: 700; }
.tsb-langs span { padding: 5px 11px; color: #4f5d6b; }
.tsb-langs span.on { background: #14202e; color: #fff; }

.tsb-dock { padding: 6px 18px 12px; }
.tsb-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tsb-tool { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 6px 6px 2px; box-sizing: border-box; border-radius: 16px; border: 2px solid #d6dde3; background: #fff; font-weight: 800; }
.tsb-tool.first { border-color: #14202e; box-shadow: inset 0 0 0 1px #14202e; }
.tsb-tool.pending { border-style: dashed; }
.tsb-tool.dragging { position: relative; z-index: 2; box-shadow: 0 10px 24px rgb(0 0 0 / .22); }
.tsb-label { white-space: nowrap; }
.tsb-grip { width: 26px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: #6b7785; cursor: grab; touch-action: none; display: grid; place-items: center; }
.tsb-tool.dragging .tsb-grip { cursor: grabbing; }
.tsb-badge { padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: #33506f; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.tsb-ctrl { display: inline-flex; gap: 3px; margin-left: 2px; }
.tsb-ctrl button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid #c9d1d9; background: #f7f8fa; color: #14202e; cursor: pointer; }
.tsb-ctrl button:hover:not(:disabled):not([aria-disabled=true]) { border-color: #14202e; background: #fff; }
.tsb-ctrl button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.tsb-ctrl button:disabled, .tsb-ctrl button[aria-disabled=true] { opacity: .35; cursor: not-allowed; }

/* Tool icons: the same colors the tablet uses. Each ink is at least 5:1 on its tile. */
.ts-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #eef1f5; color: #33506f; }
.ts-ico svg { width: 24px; height: 24px; }
.ts-ico[data-c=coral] { background: #ffe4d9; color: #7a2e12; }
.ts-ico[data-c=sky] { background: #e3f4ff; color: #0b4f7a; }
.ts-ico[data-c=teal] { background: #ddf1f4; color: #0a6b7c; }
.ts-ico[data-c=slate] { background: #e6ecf2; color: #33506f; }
.ts-ico[data-c=red] { background: #fde4e4; color: #9b1c1c; }
.ts-ico[data-c=plum] { background: #f3e6f5; color: #6b2a77; }

/* A peek at the tool that opens first. Decorative. */
.tsb-peek { flex: 1; min-height: 0; overflow: hidden; display: grid; align-content: start; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid #eef1f5; }
.tsp-search { padding: 10px 14px; border: 2px solid #d6dde3; border-radius: 12px; color: #5b6573; }
.tsp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tsp-chips span { padding: 4px 12px; border-radius: 999px; background: #f1f3f5; color: #4f5d6b; font-weight: 700; font-size: .88rem; }
.tsp-chips span.on { background: #14202e; color: #fff; }
.tsp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tsp-tiles span { height: 84px; padding: 10px; box-sizing: border-box; border-radius: 14px; background: #f4f5f7; display: grid; align-content: end; gap: 6px; }
.tsp-tiles i { height: 10px; width: 70%; border-radius: 4px; background: #dfe3e8; }
.tsp-tiles b { height: 8px; width: 45%; border-radius: 4px; background: #e9ecef; }
.tsp-rows { display: grid; gap: 8px; }
.tsp-rows > span { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 12px; background: #f4f5f7; }
.tsp-check i { width: 22px; height: 22px; box-sizing: border-box; border-radius: 6px; border: 2px solid #8a96a3; }
.tsp-check.done i { background: #14202e; border-color: #14202e; }
.tsp-rows b { flex: 1; height: 10px; max-width: 60%; border-radius: 4px; background: #dfe3e8; }
.tsp-count em { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid #c9d1d9; font-style: normal; font-weight: 800; }
.tsp-count em + strong + em { margin-left: 0; }
.tsp-count strong { width: 28px; text-align: center; }

/* Owner side panel */
.ts-side { display: grid; align-content: start; gap: 14px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ts-panel { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ts-panel[hidden] { display: none; }
.ts-panel h3 { margin: 0 0 8px; font-size: 1.02rem; }
.ts-panel legend { font-weight: 800; padding: 0 4px; }
.ts-add { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-add-btn { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.ts-add-btn:hover { border-color: var(--ink); }
.ts-add-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ts-add-text { flex: 1; display: grid; min-width: 0; }
.ts-add-note { font-size: .82rem; font-weight: 600; color: var(--muted); }
.ts-plus { padding: 4px 11px; border-radius: 999px; background: #eef1f5; color: #14202e; font-weight: 800; white-space: nowrap; }
/* Tools the shop hasn't turned on: grayed, with Turn on. */
.ts-add li.off .ts-add-btn { background: var(--surface-2, #f4f5f7); border-style: dashed; }
.ts-add li.off .ts-ico { filter: grayscale(1); opacity: .55; }
.ts-add li.off .ts-plus { background: #14202e; color: #fff; }

.ts-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.ts-foot .ts-delete { margin-left: auto; }
.ts-foot .ts-delete[hidden] { display: none; }

/* Phone and narrow windows: the tablet fills the width and the page scrolls. */
@media (max-width: 860px) {
  .ts { grid-template-rows: auto auto auto; height: auto; min-height: 100%; }
  dialog.tab-studio { overflow-y: auto; }
  .ts-head { padding: 12px 16px; }
  .ts-body { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  .ts-stage { container-type: normal; display: block; }
  .ts-device { width: 100%; aspect-ratio: auto; border-width: 8px; border-radius: 20px; }
  .ts-screen { height: auto; }
  .tsb-top { padding: 12px 12px 6px; }
  .tsb-dock { padding: 6px 12px 10px; }
  .tsb-tools { flex-direction: column; }
  .tsb-tool { width: 100%; }
  .tsb-ctrl { margin-left: auto; }
  .tsb-name { width: 100%; }
  .tsb-peek { max-height: 200px; padding: 10px 12px; }
  .tsp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-side { overflow: visible; }
  .ts-foot { position: sticky; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .mini-screen-btn .mini-screen { transition: none; } }
@media (forced-colors: active) {
  .tsb-tool.first { outline: 2px solid CanvasText; }
  .ts-ico, .tsb-badge, .ts-plus, .ms-edit { forced-color-adjust: auto; border: 1px solid CanvasText; }
}

/* Tablets page: one tidy row per tablet. Tap the row to open it; one open at a time. */
#view-tablets .station-list { grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 880px; }
.station-card { position: relative; display: block; height: auto; padding: 0; overflow: clip; }
.tr-head { margin: 0; font-size: inherit; }
.tr-toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 18px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-lg); }
.station-card.has-x .tr-toggle { padding-right: 64px; }
.tr-toggle:hover { background: var(--surface-2); }
.tr-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.tr-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tr-name { font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .9rem; font-weight: 400; }
.tr-pin { display: inline-flex; align-items: center; gap: 6px; }
.tr-pin::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1d7a46; }
.tr-pin.warn::before { background: #b54708; }
.tr-chev { display: inline-grid; place-items: center; flex: none; color: var(--muted); }
.tr-chev svg { transition: transform .15s ease; }
.tr-toggle[aria-expanded="true"] .tr-chev svg { transform: rotate(180deg); }
.station-card.open { box-shadow: 0 8px 24px -14px rgb(10 16 24 / .4); }
.tr-panel { padding: 4px 18px 18px; gap: 14px; }
.tr-panel .mini-screen-btn { max-width: 380px; }
.tr-panel .row { margin-top: 0; }

/* Red X on each added tablet's row: one tap, then a short confirm. 44px tap target around a 28px circle. */
.tablet-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.tablet-x::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--danger); transition: transform .12s ease; }
.tablet-x svg { position: relative; color: #fff; width: 14px; height: 14px; }
.tablet-x:hover::before { transform: scale(1.08); }
.tablet-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
body.read-only:not(.sample-shop) .tablet-x { display: none; }
body.read-only:not(.sample-shop) .station-card.has-x .tr-toggle { padding-right: 18px; }

/* Add a tablet: a slim dashed row at the end of the list. */
#view-tablets .add-tablet { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; min-height: 64px; height: auto; padding: 12px 18px; gap: 4px 12px; text-align: left; border-width: 2px; }
#view-tablets .add-tablet .add-plus { width: 36px; height: 36px; font-size: 1.4rem; }
#view-tablets .add-tablet .add-title { font-size: 1.05rem; }
#view-tablets .add-tablet .add-text { color: var(--muted); font-size: .9rem; max-width: none; }

/* Short confirm before a tablet is deleted. The delete button is solid red; Cancel takes focus first. */
dialog.confirm-dialog { width: min(440px, calc(100vw - 32px)); }
.confirm-dialog h2 { font-size: 1.25rem; }
.confirm-actions { justify-content: flex-end; gap: 10px; }
.confirm-dialog .btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.confirm-dialog .btn { min-height: 44px; }
@media (max-width: 480px) { .confirm-actions { flex-direction: column-reverse; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .tablet-x::before, .tr-chev svg { transition: none; } }
@media (forced-colors: active) {
  .tablet-x::before { forced-color-adjust: none; background: ButtonText; }
  .tr-pin::before { forced-color-adjust: none; background: CanvasText; }
  .tablet-x svg { color: ButtonFace; }
}

/* Older single shop code card (only before the per tablet PIN update): label, box and button on one line. */
#code-card { gap: 10px; padding: 16px 18px; }
#code-form.code-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
#code-form .field { flex: 1 1 200px; margin: 0; }
#code-form .btn { min-height: 44px; }
#code-note { flex-basis: 100%; font-size: .9rem; }

/* Recipes on this tablet: All recipes or Only some groups; the group boxes show under Only some groups. */
.ts-scope { display: flex; flex-wrap: wrap; gap: .5rem; }
.ts-scope label { margin: 0; font-weight: 600; }
.ts-groups { margin-top: 8px; padding: 8px 0 0 12px; border-left: 3px solid var(--line); }
.ts-groups[hidden] { display: none; }
/* Change PIN and Set up a new device sit side by side as a matched pair, wrapping on a narrow phone. */
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-actions .btn { min-height: 44px; }
@media (max-width: 420px) { .tr-actions .btn { flex: 1 1 100%; justify-content: center; } }
/* Link to Your tools under the Add a tool list, for a tool the shop hasn't turned on. */
.ts-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 600; }
/* Turn on more tools: a small pop up inside the editor with a checkbox per tablet tool the shop has off. */
.ts-more { border: 0; background: none; padding: 0 2px; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; font-weight: 600; }
.ts-more:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ts-quick-set { border: 0; margin: 0; padding: 0; }
.ts-quick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-quick-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; margin: 0; }
.ts-quick-item:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }
.ts-quick-item input { width: 24px; height: 24px; min-height: 0; margin: 2px 0 0; accent-color: var(--accent-text); }
.ts-quick-text { display: grid; gap: 2px; }
.ts-quick-name { font-weight: 700; }
.ts-quick-desc { color: var(--muted); font-size: .9rem; }
#tablets-status { margin: 0; }

/* Open tablet row: one even 16px rhythm between the drawing, tools, PIN, buttons and setup panel. */
.tr-panel { display: grid; gap: 16px; }
.tr-panel[hidden] { display: none; }
.tr-panel.stack > * + * { margin-top: 0; }
.tr-panel .shows { margin: 0; }
.tr-panel .tablet-code { gap: 12px; padding-top: 14px; }
/* Change or set a PIN: help text uses the full width; box, Save, Pick one for me and Cancel share one line. */
.tablet-code .code-form { display: grid; gap: 6px; width: 100%; }
.tablet-code .code-form label { font-weight: 700; margin: 0; }
.tablet-code .code-form .hint { max-width: 62ch; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.code-row input { width: 8em; min-height: 44px; letter-spacing: .12em; }
.code-row .btn { min-height: 44px; }
/* Setup panel: its own titled box with Hide setup in its corner; the scan text and link sit right beside the QR. */
.tr-actions:not(:has(> :not([hidden]))) { display: none; }
.tr-panel .station-setup { grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 10px 16px; padding: 14px 16px 16px; }
.tr-panel .station-setup .setup-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tr-panel .station-setup .setup-head h3 { margin: 0; font-size: .95rem; }
.tr-panel .station-setup .setup-hide { min-height: 44px; }
.tr-panel .station-setup .qr { grid-row: span 3; }
.tr-panel .station-setup .setup-hint { margin: 0; }
.tr-panel .station-setup .setup-hint, .tr-panel .station-setup code { max-width: 46ch; }
.tr-panel .station-setup code, .tr-panel .station-setup .row { grid-column: 2; }
.tr-panel .station-setup .row { gap: 8px; }
@media (max-width: 520px) {
  .tr-panel .station-setup { grid-template-columns: minmax(0, 1fr); }
  .tr-panel .station-setup .qr { grid-row: auto; justify-self: center; }
  .tr-panel .station-setup code, .tr-panel .station-setup .row { grid-column: 1; }
  .code-row input { flex: 1 1 100%; width: auto; }
  .code-row .btn { flex: 1 1 auto; justify-content: center; }
}

/* Laptop and Fire tablet sideways: the PIN area and its form open in the space beside the tablet drawing.
   Narrower rows (phone, Fire upright) keep one column, so the form drops below the tablet. */
#view-tablets .station-card { container-type: inline-size; }
.tr-cols, .tr-look, .tr-ctrl { display: grid; gap: 16px; align-content: start; min-width: 0; }
.tr-ctrl .tablet-code { border-top: 0; padding-top: 0; }
@container (min-width: 800px) {
  .tr-cols { grid-template-columns: 280px minmax(0, 1fr); gap: 28px; }
  .tr-ctrl { padding-top: 4px; }
  .tr-ctrl .tr-actions { padding-top: 16px; border-top: 1px solid var(--line); }
}
@container (max-width: 799px) {
  .tr-ctrl .tablet-code { border-top: 1px solid var(--line); padding-top: 14px; }
}

/* Tool tags under a tablet: one line, extra tags fold into "+2 more" */
.station-card .shows.one-line { flex-wrap: nowrap; overflow: hidden; gap: 6px; }
.shows.one-line > li { flex: none; white-space: nowrap; font-size: .78rem; padding: 2px 9px; }
.shows.one-line > li.over { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Pair a new tablet: code, which tablet, name and Pair in one row on a laptop, stacked on a phone. */
.pair-form { display: grid; grid-template-columns: minmax(130px, 160px) minmax(160px, 1fr) minmax(160px, 1fr) auto; gap: 10px 14px; align-items: end; }
.pair-form > .field, .pair-form > .field + .field { margin: 0; }
#pair-code { font-variant-numeric: tabular-nums; letter-spacing: .25em; font-weight: 700; }
.pair-list { list-style: none; margin: 0; padding: 0; }
.pair-list li { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.pair-list .pl-what { min-width: 0; }
.pair-list .pl-what strong { display: block; }
.pair-list .pl-sub { display: block; color: var(--muted); font-size: .9rem; }
.pair-list .pl-right { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.pair-list .pl-state { font-size: .88rem; font-weight: 600; color: var(--muted); }
.pair-list .pl-state.ok { color: var(--ok); }
@media (max-width: 720px) {
  .pair-form { grid-template-columns: 1fr; }
  .pair-form .btn { width: 100%; }
}

/* ===== Inbox page: one calm row per email (Nov 16) =====
   Like a mail app: who sent it, the subject and one short status. Tap to open the rest.
   No box around each row, one hairline between rows, neutral colors. Only the small dot carries color. */
.inbox-card { gap: 1.25rem; }
.mail-group { display: grid; gap: .25rem; }
.mail-group-h { margin: 0; font-size: .95rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.mail-count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: .05rem .5rem; min-width: 1.5rem; text-align: center; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-item + .mail-item { border-top: 1px solid var(--line); }
.mail-row { all: unset; box-sizing: border-box; width: 100%; min-height: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .75rem; padding: .7rem .5rem; cursor: pointer; border-radius: 10px; }
.mail-item.quiet .mail-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.mail-row:hover { background: var(--surface-2); }
.mail-row:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.mail-main { display: grid; gap: .1rem; min-width: 0; }
.mail-from, .mail-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-from { font-weight: 650; }
.mail-subj { color: var(--muted); font-size: .92rem; }
.mail-side { display: grid; justify-items: end; gap: .1rem; text-align: right; }
.mail-status { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.mail-when { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.mail-item.quiet .mail-from { font-weight: 500; }
.mail-item.quiet .mail-status { font-weight: 500; color: var(--muted); }
.mail-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.mail-row[aria-expanded="true"] .mail-chev { transform: rotate(180deg); }
.mail-row[aria-expanded="true"] { background: var(--surface-2); }
.mail-panel { display: grid; gap: .6rem; padding: .25rem .5rem 1rem 2rem; }
.mail-item.quiet .mail-panel { padding-left: .5rem; }
.mail-panel p { margin: 0; }
.mail-why { line-height: 1.45; }
.mail-meta { font-size: .88rem; color: var(--muted); }
.mail-snip { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: .75rem; white-space: pre-line; max-height: 9.5em; overflow: auto; }
.mail-acts { flex-wrap: wrap; gap: .5rem; }
.mail-empty { margin: 0; display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.mail-empty .ok-dot { width: 24px; height: 24px; font-size: .85rem; }
.mail-done > summary { color: var(--muted) !important; }
.mail-done > summary .mail-count { margin-left: .25rem; }
.mail-done[open] > .mail-list { margin-top: .25rem; }
/* Phone: status and date sit under the subject, so the sender and subject get the full width. */
@media (max-width: 560px) {
  .mail-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: .25rem; }
  .mail-item.quiet .mail-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mail-side { grid-column: 2; grid-row: 2; display: flex; gap: .5rem; justify-items: start; text-align: left; }
  .mail-item.quiet .mail-side { grid-column: 1; }
  .mail-chev { grid-column: 3; grid-row: 1; }
  .mail-item.quiet .mail-chev { grid-column: 2; }
  .mail-panel { padding-left: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .mail-chev { transition: none; } }

/* ===== Look only: every pop up still closes ===== */
/* The look only sample shop and view only managers hide Save and Add buttons (03-tools.css). The Close or Cancel at
   the top of a pop up always stays, so nobody is stuck in one. common.js turns its fields read only with a note. */
body.read-only dialog .dialog-head .btn.btn { display: inline-flex !important; }
.look-only-note { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
body.read-only dialog [readonly]:not([type=search]) { background: var(--surface-2); }

/* An email with several files (Nov 17): its files sit in a framed list inside the open row, so the
   Inbox shows one row per email however many invoices it brought. */
.mail-files { border: 1px solid var(--line); border-radius: 10px; padding: 0 .25rem; }
.mail-files .mail-panel { padding-left: .5rem; }
.skip-list { margin: .25rem 0 0; padding-left: 1.1rem; }
.skip-list li + li { margin-top: .15rem; }
/* "Move it" on a tool's list: the choices open on their own line under the buttons. */
.move-wrap { display: contents; }
.move-box { flex-basis: 100%; }

/* Needs you, in parts (Nov 17): Urgent first, then Compliance and safety, then To sort or confirm.
   Neutral headings; only the Urgent heading takes the red used for "needs you now". */
.mail-sub { margin: .75rem 0 .1rem; font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: none; }
.mail-sub:first-child { margin-top: 0; }
.mail-sub.is-urgent { color: var(--now-ink); }
.mail-sub.is-urgent::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--now-dot); margin-right: .45rem; vertical-align: .05rem; }
/* Just so you know: vendor notes and empty emails, folded, nothing to do. */
.mail-fyi-note { margin: .25rem 0 .5rem; }

/* Ignore all asks first (Nov 17): a quiet box under the buttons with the question and Remove or Cancel. */
.ignore-ask { border: 1px solid var(--danger); border-radius: 10px; padding: .6rem .75rem; }
.stack > .ignore-ask, .ignore-ask > * + * { margin-top: .6rem; }
.ignore-ask-q { margin: 0; font-weight: 600; }
.ignore-ask-q:focus { outline: none; }
.ignore-ask-q:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
/* ===== Food Fights: weekly price requests (price-fights.js) =====
   Neutral like the rest of the dashboard. The only color is each vendor's bubble, in the same six colors
   Build an order uses for that vendor, so a vendor looks the same everywhere. */
#fight-page-body .linkish { font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 0; min-height: 44px; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Setup steps: a calm checklist, the next step is the only link that stands out. */
.pf-setup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px; }
.pf-setup h2 { margin: 0 0 6px; font-size: 1.05rem; }
.pf-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.pf-steps li { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); }
.pf-steps li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: #b8c2cc; }
.pf-steps li.now { color: var(--ink); }
.pf-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b8c2cc; display: grid; place-items: center; font-size: .75rem; font-weight: 800; flex: none; }
.pf-steps li.done .pf-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.pf-steps li.now .pf-dot { border-color: var(--ink); }

/* Tabs */
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pf-tab { font: 600 1rem/1 Figtree, system-ui, sans-serif; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 12px 14px; min-height: 48px; white-space: nowrap; cursor: pointer; }
.pf-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.pf-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* This week */
.pf-head-row { justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pf-vlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pf-vrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; border-top: 1px solid var(--line); }
.pf-vrow:first-child { border-top: 0; }
.pf-vmain { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pf-vmain strong { overflow-wrap: anywhere; }
.pf-state { font-weight: 600; }
.pf-answered { color: var(--ok); }
.pf-allsent { margin: 0; font-weight: 600; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.pf-again { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pf-late, .pf-noemail { color: #8a4b00; }
.pf-qitems { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-qrow { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.pf-qrow:first-child { border-top: 0; }
.pf-qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pf-qlist li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-qprice { font-variant-numeric: tabular-nums; font-weight: 600; }

/* The bubbles. Empty is a gray ring with the vendor's initials; filled takes the vendor's color. */
.pf-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #c3ccd5; background: #fff; color: #8592a0; font: 800 .8rem/1 Figtree, system-ui, sans-serif; letter-spacing: .02em; flex: none; }
.pf-badge.on { color: #fff; }
.pf-badge.tint-0.on { background: #13875f; border-color: #13875f; }
.pf-badge.tint-1.on { background: #2f6fb3; border-color: #2f6fb3; }
.pf-badge.tint-2.on { background: #b8641a; border-color: #b8641a; }
.pf-badge.tint-3.on { background: #0f7f88; border-color: #0f7f88; }
.pf-badge.tint-4.on { background: #8a7520; border-color: #8a7520; }
.pf-badge.tint-5.on { background: #56667a; border-color: #56667a; }
.pf-bubble { width: 44px; height: 44px; padding: 0; cursor: pointer; }
.pf-bubble:not(.on):hover { border-color: #8592a0; }
.pf-bubble:focus-visible, .pf-colbtn:focus-visible, .pf-grid-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pf-bubble[disabled] { cursor: default; }
@media (prefers-reduced-motion: no-preference) { .pf-bubble { transition: background-color .12s, border-color .12s, color .12s; } }

.pf-gridcard { gap: 12px; }
.pf-gridtools { gap: 10px; flex-wrap: wrap; align-items: center; }
.pf-gridtools input[type=search] { flex: 1 1 220px; min-height: 48px; }
.pf-gridtools select { flex: 0 1 220px; min-height: 48px; }
.pf-note { margin: 0; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* Items stay pinned on the left while many vendors scroll sideways. */
.pf-grid-wrap { overflow: auto; max-height: min(70vh, 640px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overscroll-behavior: contain; }
.pf-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.pf-grid th, .pf-grid td { padding: 4px 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pf-grid thead th { position: sticky; top: 0; z-index: 2; vertical-align: top; }
.pf-grid thead th.pf-item-h { vertical-align: middle; }
.pf-grid .pf-item, .pf-grid .pf-item-h { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 600; min-width: 150px; max-width: 220px; padding-left: 14px; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.pf-grid .pf-item-h { z-index: 3; }
.pf-grid tbody tr:last-child > * { border-bottom: 0; }
.pf-cell { text-align: center; }
.pf-colbtn { display: grid; grid-template-rows: 44px calc(2 * 1.15 * .78rem) auto; justify-items: center; align-items: start; gap: 4px; width: 76px; margin: 0 auto; padding: 8px 2px; min-height: 44px; background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); }
.pf-colbtn:hover:not([disabled]) { background: var(--surface-2); }
.pf-colbtn[disabled] { cursor: default; }
.pf-vname { font-size: .78rem; font-weight: 700; line-height: 1.15; max-width: 72px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pf-colbtn > .pf-badge { width: 44px; height: 44px; }
.pf-vname { align-self: start; }
.pf-vcount { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Start from scratch: three ways in */
.pf-start { gap: 10px; }
.pf-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pf-way { display: grid; gap: 4px; text-align: left; padding: 16px; min-height: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font: inherit; cursor: pointer; }
.pf-way:hover:not([disabled]) { border-color: #9aa6b2; background: var(--surface-2); }
.pf-way span { color: var(--muted); font-size: .95rem; }
.pf-way[disabled] { cursor: default; opacity: .7; }
.pf-way:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Order guides that came in */
.pf-guides { border-color: #9aa6b2; }
.pf-glist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-grow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Vendors and reps */
.pf-replist { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-reprow { display: grid; grid-template-columns: 2.25rem minmax(120px, 1fr) minmax(140px, 1fr) minmax(180px, 1.4fr) 5.5rem; gap: 10px 14px; align-items: end; padding: 14px 0; border-top: 1px solid var(--line); }
.pf-reprow:first-child { border-top: 0; }
.pf-reprow > .pf-badge, .pf-reprow > .pf-repname { align-self: center; }
.pf-reprow .field, .pf-newv-fields .field { margin: 0; }
.pf-reprow .field + .field, .pf-newv-fields .field + .field { margin-top: 0; }
.pf-reprow .status { grid-column: 1 / -1; margin: 0; }
.pf-addv summary { font-weight: 700; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.pf-newv-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; align-items: end; }
.pf-reprow > .btn { min-height: 50px; }

/* Schedule */
.pf-plan fieldset { border: 0; margin: 0; padding: 0; }
.pf-plan legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.pf-days .row { gap: 6px; flex-wrap: wrap; }
.pf-day { position: relative; }
.pf-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-day span[aria-hidden] { display: grid; place-items: center; min-width: 52px; min-height: 48px; padding: 0 10px; border: 1px solid #b8c2cc; border-radius: 999px; font-weight: 700; cursor: pointer; background: var(--surface); }
.pf-day input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pf-day input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pf-day input:disabled + span { cursor: default; opacity: .6; }
.pf-plan-row { gap: 14px; flex-wrap: wrap; }
.pf-plan-row .field { flex: 0 1 200px; margin: 0; }
.pf-modes { display: grid; gap: 8px; }
.pf-mode { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.pf-mode input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.pf-mode span { display: grid; gap: 2px; }
.pf-mode:has(input:checked) { border-color: var(--ink); }
.pf-mode:has(input:disabled) { cursor: default; opacity: .65; }
.pf-approve { padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); display: grid; gap: 8px; }

/* Phone: rows stack, bubbles stay big enough to tap. About five vendors fit before the grid scrolls sideways. */
@media (max-width: 640px) {
  .pf-vrow { flex-wrap: wrap; }
  .pf-vrow > .btn, .pf-vrow > .pf-again { margin-left: 52px; }
  .pf-reprow { grid-template-columns: auto 1fr; }
  .pf-reprow .field, .pf-reprow > .btn { grid-column: 1 / -1; }
  .pf-grid .pf-item, .pf-grid .pf-item-h { min-width: 120px; max-width: 140px; font-size: .95rem; }
  .pf-colbtn { width: 56px; }
  .pf-vname { max-width: 54px; }
  .pf-grid th, .pf-grid td { padding: 3px 2px; }
  .pf-grid .pf-item { padding-left: 10px; }
  .pf-grid-wrap { max-height: 64vh; }
}

/* Close matches the owner confirms: one row each, the question first, three plain choices. */
.pf-review { border-color: #9aa6b2; }
.pf-rvlist { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-rvrow { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.pf-rvrow:first-child { border-top: 0; }
.pf-rvq { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.pf-rvq strong { overflow-wrap: anywhere; }
.pf-rvask { font-weight: 600; }
.pf-rvbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-rvbtns .btn { min-height: 44px; }
.pf-rvhead { justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.pf-rvhead h2 { display: flex; align-items: center; gap: 8px; }
.pf-rvall { gap: 8px; flex-wrap: wrap; }
.pf-rvall .btn, .pf-heads .btn { min-height: 44px; }
.pf-heads { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .pf-rvbtns { width: 100%; } .pf-rvbtns .btn { flex: 1 1 auto; } }

/* Copy chip (copy-chip.js): the address with a copy icon; a tap shows a check and "Copied" for two seconds. */
.copy-chip-wrap { display: inline-flex; max-width: 100%; }
.copy-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.copy-chip:hover { background: var(--surface-2); border-color: var(--muted); }
.copy-chip:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.copy-chip-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; overflow-wrap: anywhere; min-width: 0; background: none; padding: 0; }
.copy-chip-ico { display: inline-grid; place-items: center; flex: none; color: var(--muted); }
.copy-chip:hover .copy-chip-ico { color: var(--ink); }
.copy-chip-word { flex: none; font-size: .88rem; font-weight: 700; }
.copy-chip.is-copied { border-color: #067647; }
.copy-chip.is-copied .copy-chip-ico, .copy-chip.is-copied .copy-chip-word { color: #05603a; }
.copy-chip.is-manual .copy-chip-word { color: var(--muted); }
@media (forced-colors: active) { .copy-chip { border: 1px solid ButtonText; } }

/* ---------- Forward an email (COGS Genie first visit): who can send, the address, waiting line ---------- */
.cs-email { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.cs-email h3 { margin: 0; font-size: 1.1rem; }
.cs-email h3:focus { outline: none; }
.cs-email h3:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.cs-email-steps { margin: 0; padding: 0; list-style: none; counter-reset: cse; display: grid; gap: 16px; }
.cs-email-steps > li { counter-increment: cse; display: flex; flex-direction: column; gap: 8px; padding-left: 40px; position: relative; }
.cs-email-steps > li::before { content: counter(cse); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.cs-step-name { margin: 0; font-weight: 700; }
.sender-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sender-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.sender-addr { overflow-wrap: anywhere; font-weight: 600; }
.sender-tag { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.sender-row .btn { margin-left: auto; }
.sender-add { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; }
.sender-add .field { flex: 1 1 240px; margin: 0; }
.sender-add .btn { min-height: 48px; }
.cs-sent-row { border-top: 1px solid var(--line); padding-top: 12px; }
@keyframes cs-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes cn-ring { 0% { box-shadow: 0 0 0 0 rgb(24 196 143 / .45); } 70%, 100% { box-shadow: 0 0 0 12px rgb(24 196 143 / 0); } }

/* ---------- COGS Genie: the notice while the first invoice is on its way (Nov 16 2026) ----------
   Neutral card under the page header. A pulsing dot while something is being read; it holds still for
   anyone who turns motion off. The next step button and its sentence show only while the setup bar does. */
#cogs-notice:empty { display: none; }
.cogs-notice { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.cogs-notice .cn-dot { flex: none; width: 14px; height: 14px; margin: 5px 4px 0; border-radius: 50%; background: var(--accent); animation: cs-pulse 1.6s ease-in-out infinite, cn-ring 1.6s ease-out infinite; }
.cogs-notice .ok-dot { width: 26px; height: 26px; font-size: .85rem; }
.cogs-notice .ok-dot.is-warn { background: #fde8e6; color: var(--danger); }
.cn-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }
.cn-title { margin: 0; font-size: 1.05rem; }
.cn-text { margin: 0; color: var(--muted); }
.cn-count { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cogs-notice progress { width: 100%; max-width: 420px; height: 8px; accent-color: var(--accent); }
.cn-actions { gap: 10px; flex-wrap: wrap; align-items: center; }
.cn-free { display: none; }
body:not(.has-step-bar) .cogs-notice .cn-step { display: none; }
body:not(.has-step-bar) .cogs-notice .cn-free { display: inline; }
@media (prefers-reduced-motion: reduce) { .cogs-notice .cn-dot { animation: none; } }
@media (max-width: 520px) { .cogs-notice { padding: 14px; gap: 10px; } .cn-actions .btn { flex: 1 1 100%; justify-content: center; } }

/* ---------- Add an invoice: the drop box, and matching spreadsheet columns ---------- */
.drop-zone { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.drop-zone.is-over, .cs-tile.main.is-over { border-color: var(--accent-text); background: var(--accent-soft); }
.drop-zone .dz-ico { color: var(--muted); }
.dz-title { margin: 0; font-weight: 700; }
.drop-zone .hint { display: block; max-width: 46ch; margin: 0; }
.dz-touch { display: none; }
@media (hover: none), (pointer: coarse) { .dz-desk { display: none; } .dz-touch { display: inline; } }
/* The real file input stays in the tab order under its label button, so keyboards and screen readers use it as is. */
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dz-btn { margin-top: 4px; cursor: pointer; }
.dz-input:focus-visible + .dz-btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.sheet-match { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.sheet-match h3 { margin: 0; overflow-wrap: anywhere; }
/* Match the columns: label, box, then help under the box, three shared rows, so the boxes in each row line up. */
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.sheet-grid > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; margin: 0; padding-bottom: 10px; min-width: 0; }
.sheet-grid > .field > label { align-self: end; }
.sheet-grid .hint { margin-top: .3rem; }
.sheet-grid .hint:empty { margin: 0; }
.sheet-preview { display: grid; gap: 6px; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sheet-table th, .sheet-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sheet-table th:not(:first-child), .sheet-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-table td:first-child { overflow-wrap: anywhere; }
.sheet-again .link-btn { font-weight: 700; }
@media (max-width: 520px) { .cs-email { padding: 14px; } .cs-email-steps > li { padding-left: 36px; } .sender-row .btn { margin-left: 0; } }

/* ---------- Allow this sender? (COGS Genie, owner only) ---------- */
.blocked-card { border-left: 4px solid var(--danger); }
.blocked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.blocked-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.blocked-list > .blocked-row:first-child { border-top: 0; padding-top: 0; }
.blocked-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.blocked-row .mail-acts { margin: 0; gap: 8px; }
.sender-row .ok-dot { width: 24px; height: 24px; font-size: .85rem; }

/* ===== Feel pass (Nov 17): small motion that confirms a tap =====
   Rules: a third of a second or less, only transform and opacity (smooth on the shop's Fire tablets),
   nothing waits on hover, no tap is slowed down, nothing floats over other controls.
   People who turn motion off see every change at once (02-pages.css turns all motion off for them,
   and every animation here also sits inside no-preference). */

/* 1. Every button gives a little when pressed and springs back. */
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s ease, transform .22s cubic-bezier(.3, .7, .4, 1.6); }
  .btn:active:not([disabled]):not([aria-disabled="true"]) { transform: scale(.96); transition-duration: .15s, .06s; }
}

/* 3. Tap to pick (tools on and off, chips, picked cards): the check or the card pops once.
   common.js adds .just-on for a moment when a box gets ticked, so nothing pops when a page loads. */
@media (prefers-reduced-motion: no-preference) {
  .pick-tile.just-on .pt-check,
  .choice.just-on > span,
  .opt-check.just-on > input { animation: feel-pop .28s cubic-bezier(.3, .7, .4, 1.4); }
  .pick.just-on, .way.just-on, .comp-pick.just-on, .ts-quick-item.just-on, .cl-pick.just-on { animation: feel-settle .24s cubic-bezier(.3, .7, .4, 1.3); }
}
@keyframes feel-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes feel-settle { 0% { transform: scale(.97); } 100% { transform: scale(1); } }

/* 4. Saving: a new message rises in, and the Save button shows a check for a second (common.js, showStatus).
   The button keeps its name for screen readers; only the look changes. */
.btn.is-saved { position: relative; color: transparent !important; }
.btn.is-saved > * { opacity: 0; }
.btn.is-saved::after { content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--tick, var(--accent-ink)); font-size: 1.25em; font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .btn.is-saved::after { animation: feel-pop .28s cubic-bezier(.3, .7, .4, 1.4); }
  .status.st-in:not(.status-empty), .look-save-msgs .status:not([hidden]) { animation: feel-rise .22s ease-out; }
}
@keyframes feel-rise { from { opacity: 0; transform: translateY(6px); } }
