/* Charley Family team app. One plain stylesheet per area, no build step (docs/mobile_contract.md §3).
   Phone first (390 wide): 18 px text that follows the phone's own text size, headline numbers 40 px+, a bottom tab bar with Scan
   raised in the middle; the desktop (900 px+) is the same page widened with a left rail. The logo's red (#CC2620) for the primary
   action and the active state; good / bad on a number is an arrow + a word + green / a darker red, never the brand red alone; the
   logo's six harvest dots are the top rule and the loading bar. Dark mode follows the phone. System fonts only: nothing loads from
   another host. */

:root {
  --red: #CC2620; --red-ink: #FFFFFF; --red-soft: #FCEBEA; --red-line: #EBA7A3;      /* the logo's red: brand, primary action, active */
  --red-btn: #CC2620;                                                                   /* a red fill under white text (dark mode: deeper, so white reads) */
  --bad: #A4161A; --bad-soft: #FBE7E7;                                                  /* a bad number (with an arrow and a word) */
  --dot1: #CDA333; --dot2: #8E8E2A; --dot3: #72641D; --dot4: #BB451F; --dot5: #7B1C16; --dot6: #8F3A1D;   /* the logo's six dots */
  --dots: linear-gradient(90deg, var(--dot1) 0 16.66%, var(--dot2) 0 33.33%, var(--dot3) 0 50%, var(--dot4) 0 66.66%, var(--dot5) 0 83.33%, var(--dot6) 0);
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F4F4F5; --ink: #17181B; --muted: #5F6269; --line: #E2E3E7; --line-strong: #B9BBC3;
  --good: #1B7A3F; --good-soft: #E3F3E8; --warn: #96540A; --warn-soft: #FFF0D8; --info: #2A5A8C; --info-soft: #E3ECF6;
  --body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Helvetica Neue", "Segoe UI", Roboto, -apple-system, Arial, sans-serif;
  --gutter: 16px; --rail: 236px; --tabbar: 64px; --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 18px rgba(20, 20, 30, .05);
  /* 155 (Tom 2026-11-02 Q17): one type scale for the whole app - six steps in rem (so they follow the phone's text size) plus the
     headline-number size; every font-size in app/*.css is one of these (tools/app_audit/style_lint.mjs). 12 / 13 / 15 / 17 / 20 / 26 / 40 px */
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.25rem; --fs-hero: 1.625rem; --fs-big: 2.5rem;
  /* 155 (Q17): the theme-fixed colours - the printed sheets (paper is white in both themes), the camera stage, a chart's print ink */
  --black: #000000; --white: #FFFFFF; --grey: #8A8A8A; --grey-soft: #EFEFEF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red: #F2554A; --red-soft: #3A1513; --red-line: #7A2A26; --bad: #FF9E97; --red-btn: #D6342C; --bad-soft: #3A1513; --bg: #121214; --surface: #1B1B1F; --surface-2: #242429; --ink: #EDEDF0; --muted: #A4A6AF; --line: #2F3037; --line-strong: #4B4D57;
    --good: #5ED08F; --good-soft: #15301F; --warn: #F2B24C; --warn-soft: #3A2C12; --info: #8DB8E8; --info-soft: #18283A; --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 18px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --red: #F2554A; --red-soft: #3A1513; --red-line: #7A2A26; --bad: #FF9E97; --red-btn: #D6342C; --bad-soft: #3A1513; --bg: #121214; --surface: #1B1B1F; --surface-2: #242429; --ink: #EDEDF0; --muted: #A4A6AF; --line: #2F3037; --line-strong: #4B4D57;
  --good: #5ED08F; --good-soft: #15301F; --warn: #F2B24C; --warn-soft: #3A2C12; --info: #8DB8E8; --info-soft: #18283A; --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 18px rgba(0, 0, 0, .4); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); -webkit-text-size-adjust: 100%; min-height: 100vh; }   /* lint-off: the base size */ /* lint-on */
/* the phone: 18 px text (Q35) that follows the phone's text size - iOS: the root takes Dynamic Type's body size (17 px at the
   default), so 1.0588rem = 18 px and grows with it; elsewhere 1.125rem of the browser's 16 */
/* lint-off: the phone's base size (Q35: 18 px) is set here once */
@media (max-width: 599px) { body { font-size: 1.125rem; } }
@supports (font: -apple-system-body) { @media (max-width: 599px) { html { font: -apple-system-body; } body { font-family: var(--body); font-size: 1.0588rem; } } }
/* lint-on */
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.num, td.n, th.n, .big, .amt, .dollars { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; }
h2 { font-size: var(--fs-xl); line-height: 1.15; margin: 28px 0 8px; font-weight: 700; }
h3 { font-size: var(--fs-lg); margin: 18px 0 8px; font-weight: 700; }
.lead { color: var(--muted); margin: 0 0 12px; max-width: 72ch; }
.note { font-size: var(--fs-sm); color: var(--muted); margin: 8px 0 0; max-width: 90ch; }
@media (max-width: 599px) { .note { font-size: var(--fs-md); } }
.signin .si-sms { margin-top: 14px; }
.method { font-size: var(--fs-sm); color: var(--muted); border-left: 3px solid var(--line-strong); padding: 4px 10px; margin: 14px 0; max-width: 90ch; }
.mini { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
td.n .mini { white-space: normal; max-width: 220px; margin-left: auto; }   /* a note under a number wraps; the number itself never does */
.mini-inline { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.hot { color: var(--red); font-weight: 700; }
.up { color: var(--good); } .down { color: var(--bad); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.hint { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }

/* ---- top bar ---------------------------------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: calc(6px + env(safe-area-inset-top, 0px)) var(--gutter) 6px; }
/* the logo's six dots under the top bar; they run while a read is out (app.js: body.loading) */
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--dots); }
body.loading .topbar::after { background-size: 200% 100%; animation: dotsrun 1.1s linear infinite; background-image: linear-gradient(90deg, var(--dot1) 0 8.33%, var(--dot2) 0 16.66%, var(--dot3) 0 25%, var(--dot4) 0 33.33%, var(--dot5) 0 41.66%, var(--dot6) 0 50%, var(--dot1) 0 58.33%, var(--dot2) 0 66.66%, var(--dot3) 0 75%, var(--dot4) 0 83.33%, var(--dot5) 0 91.66%, var(--dot6) 0); }
@keyframes dotsrun { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { body.loading .topbar::after { animation: none; } }
.topbar-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
/* the weather line under the logo (Tom 2026-10-17 Q13-Q14): Rt 66's forecast, the next three days, one line on every page; no store name (Tom 2026-11-05) */
.topwx { font-size: var(--fs-xs); color: var(--muted); line-height: 1.3; padding: 2px 0 0; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.topwx::-webkit-scrollbar { display: none; }
.topwx-in { display: inline-flex; align-items: baseline; gap: 6px; }
.topwx-d b { color: var(--ink); font-weight: 600; }
.topwx-d i { font-style: normal; margin: 0 2px; }
.topwx-d small { font-size: var(--fs-xs); }
.topwx-d .pc { color: var(--info); }
.topwx-sep { opacity: .5; }
.wordmark { display: flex; align-items: center; text-decoration: none; color: var(--ink); min-width: 0; }
.wordmark img { height: 28px; width: auto; display: block; }
/* Tom 2026-11-03 18:27 (7): on a phone the wordmark gives way instead of sliding under the demo's "view as" pill (a tap on the logo hit
   the pill, so Home did nothing in the demo): it shrinks with the row, never overlapped */
@media (max-width: 599px) { .wordmark { flex: 1 1 auto; overflow: hidden; } .wordmark img { height: auto; max-height: 28px; width: 100%; max-width: 210px; } }
.wordmark .dk, .logo-full .dk { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark .lt, :root:not([data-theme="light"]) .logo-full .lt { display: none; } :root:not([data-theme="light"]) .wordmark .dk, :root:not([data-theme="light"]) .logo-full .dk { display: block; } }
:root[data-theme="dark"] .wordmark .lt, :root[data-theme="dark"] .logo-full .lt { display: none; }
:root[data-theme="dark"] .wordmark .dk, :root[data-theme="dark"] .logo-full .dk { display: block; }
@media (min-width: 900px) { .wordmark img { height: 32px; } }
.topbar select { padding: 6px 28px 6px 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 8px; max-width: 170px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; }
.who b { color: var(--ink); font-weight: 600; }
.demo-pill { background: var(--warn-soft); color: var(--warn); font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 99px; }
@media (max-width: 899px) { .who span { display: none; } .who .btn { display: none; } }

/* ---- layout: rail on desktop, tab bar on phones ---------------------------------------------------------------- */
.frame { display: block; }
.rail { display: none; }
.main { padding: 14px var(--gutter) calc(var(--tabbar) + 28px + env(safe-area-inset-bottom, 0px)); max-width: 1180px; margin: 0 auto; min-width: 0; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
.tabbar a, .tabbar button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; background: none; border: 0; text-decoration: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; padding: 6px 0; min-width: 0; -webkit-tap-highlight-color: transparent; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar [aria-current="page"] { color: var(--red); }
.tabbar [aria-current="page"] svg { stroke-width: 2.3; }
/* Scan: a 60 px red circle raised out of the bar */
.tabbar .tab-scan { color: var(--ink); }
.tabbar .tab-scan .scan-dot { display: grid; place-items: center; width: 60px; height: 60px; margin-top: -26px; border-radius: 50%; background: var(--red-btn); color: var(--red-ink); box-shadow: 0 4px 14px rgba(204, 38, 32, .35), 0 0 0 4px var(--surface); }
.tabbar .tab-scan .scan-dot svg { width: 30px; height: 30px; stroke-width: 2.1; }
.tabbar .tab-badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red-btn); color: var(--red-ink); font-size: var(--fs-xs); font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
@media (min-width: 900px) {
  .frame { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: calc(100vh - 60px); }
  /* Tom 2026-11-03 18:27 (6): "the vendor money tab on the bottom left is cut off by my screen" - the rail assumed a 59 px header; a
     taller one (a zoomed browser, a second weather line) pushed its bottom off the screen with no way to scroll there. app.js measures
     the header into --topbar-h; the rail ends above the screen's bottom and keeps room under its last link */
  .rail { display: block; border-right: 1px solid var(--line); padding: 12px 10px 72px; position: sticky; top: var(--topbar-h, 59px); height: calc(100vh - var(--topbar-h, 59px)); overflow-y: auto; background: var(--surface); box-sizing: border-box; }
  .rail h6 { margin: 12px 10px 3px; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
  .rail h6:first-child { margin-top: 4px; }
  .rail a { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: var(--fs-md); }
  .rail a:hover { background: var(--surface-2); }
  .rail-n { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red-btn); color: var(--red-ink); font-size: var(--fs-xs); font-weight: 800; line-height: 22px; text-align: center; }
  .rail a[aria-current="page"] { background: var(--red-soft); color: var(--red); font-weight: 700; }
  .rail a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .rail .kbd { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; font-family: inherit; }
  .rail-note { font-size: var(--fs-xs); color: var(--muted); margin: 14px 10px; }
  .main { padding: 22px 28px 48px; max-width: 1180px; margin: 0; }
  .tabbar { display: none; }
}

/* ---- the screen frame ------------------------------------------------------------------------------------------ */
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 4px; }
.crumbs a { color: var(--muted); }
.screen-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; margin-bottom: 12px; }
.screen-head h1 { grid-column: 1; margin: 0; font-size: var(--fs-hero); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.screen-head .asof { grid-column: 1; font-size: var(--fs-sm); color: var(--muted); }
.screen-head .actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) { .screen-head h1 { font-size: var(--fs-big); } }
.stamp { font-size: var(--fs-xs); color: var(--muted); margin-top: 28px; border-top: 1px solid var(--line); padding-top: 8px; }

/* narrative: the 3 lines from /narrative */
.narrative { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; margin: 0 0 14px; background: var(--surface-2); border-left: 4px solid var(--red); border-radius: 0 8px 8px 0; }
.narrative .ai { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; color: var(--red); margin-top: 3px; }
.narrative ol { margin: 0; padding-left: 18px; font-size: var(--fs-md); }
.narrative ol li + li { margin-top: 2px; }
.narrative .off { background: none; border: 0; color: var(--muted); font-size: var(--fs-sm); cursor: pointer; text-decoration: underline; padding: 0 12px 0 0; min-height: 44px; min-width: 44px; grid-column: 1 / -1; justify-self: start; }
.narrative .skel { grid-column: 2; }

/* ---- buttons, chips, pills -------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; border-radius: 8px; white-space: nowrap; line-height: 1.2; }
@media (hover: hover) { .btn:hover { background: var(--surface-2); } .btn.primary:hover { filter: brightness(1.08); } }
.btn.primary { background: var(--red-btn); border-color: var(--red-btn); color: var(--red-ink); }
.btn.quiet { border-color: transparent; background: none; color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: var(--fs-sm); }
/* a finger needs 40 px: buttons (the small ones too) grow to 40 px on a phone; the desktop keeps them compact */
@media (max-width: 599px) {
  .btn { min-height: 44px; } .btn.sm { min-width: 44px; min-height: 44px; }
  .sheet .close { width: 44px; height: 44px; }
  .sheet .form .btnrow .btn, .sheet .btnrow .btn { flex: 1 1 auto; min-height: 52px; font-size: var(--fs-lg); }
}
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.info { background: var(--surface-2); color: var(--muted); }   /* Q7 (U13): no blue meaning */
.pill { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.p-bad { background: var(--red-soft); color: var(--red); } .p-warn { background: var(--warn-soft); color: var(--warn); } .p-good { background: var(--good-soft); color: var(--good); } .p-info { background: var(--surface-2); color: var(--ink); } .p-mute { background: var(--surface-2); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.item-meta { margin: 0 0 14px; }

/* segmented control, filters, forms */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-weight: 600; white-space: nowrap; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }        /* review U13: the one switch look (ux-way) */
.seg button b { font-weight: 700; opacity: .8; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; margin: 4px 0 14px; }
.filters label { display: grid; gap: 3px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.filters select, .filters input { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 500; min-width: 150px; font-size: var(--fs-md); }
.form { display: grid; gap: 10px; max-width: 560px; }
.form label { display: grid; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.form input, .form select, .form textarea { padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 400; font-size: var(--fs-md); width: 100%; }
.form textarea { min-height: 80px; resize: vertical; }
.form .check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink); }
.form .check input { width: auto; }
.askbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 8px 0 8px; }
.askbox input { padding: 12px 14px; border: 2px solid var(--line-strong); border-radius: 8px; font-size: var(--fs-lg); background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
.askbox input:focus { border-color: var(--red); outline: none; }
.sql { font: var(--fs-xs)/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 8px 0; }
details summary { cursor: pointer; color: var(--muted); font-size: var(--fs-md); margin: 6px 0; }
.pins { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pin { border: 1px solid var(--red-line); background: var(--red-soft); color: var(--red); border-radius: 99px; padding: 6px 12px; font-weight: 600; cursor: pointer; font-size: var(--fs-md); }

/* ---- tiles: the big numbers ----------------------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 18px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; position: relative; }
.tile .lbl { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
/* a big number never breaks; a big made of words ("65 hrs under earned", "not enough posts") wraps at its spaces */
.tile .big { font-family: var(--display); font-weight: 800; font-size: var(--fs-hero); line-height: 1.05; margin-top: 4px; overflow: hidden; overflow-wrap: normal; letter-spacing: -.02em; }
.tile .big small { font-size: var(--fs-md); font-weight: 600; color: var(--muted); letter-spacing: 0; white-space: normal; }
.tile .sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.tile.behind { border-color: var(--red); }
/* 155 (Tom 2026-11-02 Q17, A-11 item 6): a tile's one line, its detail folded under "More" (the Status AI tile) */
.tile .tile-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tile-more { margin-top: 4px; }
.tile .tile-more > summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; min-height: 28px; display: inline-flex; align-items: center; }
.tile .tile-more > summary::-webkit-details-marker { display: none; }
.tile .tile-more > summary::after { content: " ▾"; }
.tile .tile-more[open] > summary::after { content: " ▴"; }
.tile .tile-more > ul { margin: 4px 0 0; padding-left: 1.1em; white-space: normal; }   /* one short line each: the exams, the bank, the thumbs */
.tile.behind::after { content: ""; position: absolute; top: -1px; right: -1px; width: 20px; height: 20px; background: var(--red); clip-path: polygon(0 0, 100% 0, 100% 100%); border-radius: 0 var(--radius) 0 0; }
.tiles.small .tile .big { font-size: var(--fs-hero); }
/* a tile whose big slot holds a sentence instead of a figure (the P&L's "purchases look incomplete (23% of sales)") */
.tile.words .big { font-size: var(--fs-lg); line-height: 1.25; overflow-wrap: anywhere; letter-spacing: 0; }
@media (min-width: 900px) { .tile .big { font-size: var(--fs-big); } .tiles.small .tile .big { font-size: var(--fs-hero); } .tile.words .big { font-size: var(--fs-xl); } }

/* ---- exception cards --------------------------------------------------------------------------------------------- */
.xlist { display: grid; gap: 10px; }
.xcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.xcard:hover { border-color: var(--line-strong); }
.xcard .meta { grid-column: 1; }
.xcard .title { font-weight: 600; font-size: var(--fs-md); overflow-wrap: anywhere; grid-column: 1; }
.xcard .detail { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; grid-column: 1; }
.xcard .dollars, .xhero .dollars { grid-column: 2; grid-row: 1 / span 3; font-family: var(--display); font-weight: 800; font-size: var(--fs-hero); color: var(--red); text-align: right; white-space: nowrap; line-height: 1; letter-spacing: -.02em; }
.xcard .dollars small, .xhero .dollars small { display: block; font-family: var(--body); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-top: 3px; letter-spacing: 0; }
.xcard.assigned .dollars { color: var(--ink); }
.who-chip { color: var(--ink); font-weight: 600; }
.xhero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; margin: 0 0 14px; }
.xhero h2 { grid-column: 1; margin: 2px 0 0; font-size: var(--fs-hero); }
.xhero .lead { grid-column: 1 / -1; }
.xhero .dollars { font-size: var(--fs-big); }
/* the kind chips: visible filters that wrap, so none scrolls off a phone */
.by-kind { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.by-kind button { flex: 1 1 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 7px 10px; text-align: left; cursor: pointer; min-width: 0; max-width: 220px; }
.by-kind button b { display: block; font-family: var(--display); font-size: var(--fs-xl); line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.by-kind button span { font-size: var(--fs-xs); color: var(--muted); display: block; margin-top: 3px; white-space: normal; }
.by-kind button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }   /* U13 */
@media (max-width: 599px) { .by-kind button { flex: 1 1 calc(50% - 8px); max-width: none; } }
.xcard.mine { border-color: var(--line-strong); }
.xcard.dcard .title { font-size: var(--fs-lg); }
.nodollar { font-size: var(--fs-md); color: var(--muted); font-weight: 700; }
.dated-cards { margin-bottom: 4px; }
.reason { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; white-space: nowrap; }   /* why a cell has no number */
.tbl.cards .reason { white-space: normal; }
h2 .h-sub, h3 .h-sub { display: inline-block; margin-left: 10px; font-size: var(--fs-md); font-weight: 600; color: var(--muted); letter-spacing: 0; vertical-align: 2px; }
.more-row { display: flex; justify-content: center; margin: -4px 0 16px; }
.more-row .btn small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.row-hdr { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: var(--fs-md); }
.row-hdr:first-child { border-top: 0; }
.row-hdr span { color: var(--muted); font-size: var(--fs-sm); }
.row-hdr + .row { border-top: 0; }
.check-row { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); font-size: var(--fs-md); }
details.codes { margin-top: 4px; }
details.codes summary { font-size: var(--fs-xs); color: var(--red); font-weight: 600; cursor: pointer; margin: 0; }
details.codes ul { margin: 4px 0 0; padding-left: 16px; font-size: var(--fs-xs); font-weight: 400; }
details.codes li { margin: 2px 0; }
details.codes .mini-inline { display: block; }
.lifecycle { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-sm); color: var(--muted); margin: 0 0 12px; }
.lifecycle span { background: var(--surface-2); padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.lifecycle i { font-style: normal; }
.rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red-btn); color: var(--red-ink); font-weight: 800; font-size: var(--fs-sm); margin-right: 8px; vertical-align: middle; }

/* ---- tables ----------------------------------------------------------------------------------------------------- */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 8px 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-md); }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); background: var(--surface-2); }
td a { font-weight: 600; }
td.wrap { min-width: 210px; }
td.wrap-sm { min-width: 150px; }
td .acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
td select.inline, td input.inline { padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 170px; font-size: var(--fs-sm); display: block; margin-bottom: 4px; }
td input.note { width: 170px; }
.saved { border-color: var(--good) !important; box-shadow: 0 0 0 2px var(--good-soft); }
.bad { border-color: var(--red) !important; }
.green-cell { background: var(--good-soft); color: var(--good); font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.qtys { display: flex; gap: 6px; flex-wrap: wrap; }
td.qtycell { min-width: 232px; }

/* Phone tables (under 600 px). "cards": each row is a card — the first cell its title, an `act` cell (the cases boxes, Approve,
   the reason code) right under it, the rest as label: value pairs in two columns — so nothing is off-screen and the page never
   scrolls sideways. "sticky": the first column stays put while the rest scroll inside the table. */
@media (max-width: 599px) {
  .tbl.sticky th:first-child, .tbl.sticky td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line); width: 38vw; max-width: 38vw; min-width: 38vw !important; overflow-wrap: anywhere; white-space: normal; }
  .tbl.sticky th:first-child { z-index: 3; background: var(--surface-2); }
  .tbl.sticky tr.total td:first-child { background: var(--surface-2); }
  .tbl.sticky td.n .mini, .tbl.sticky td .reason { white-space: normal; }
  .tbl.sticky td.n .mini { max-width: 160px; }
  .tbl.cards table, .tbl.cards tbody { display: block; }
  .tbl.cards thead { display: none; }
  .tbl.cards tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tbl.cards tr:last-child { border-bottom: 0; }
  .tbl.cards td { display: block; border: 0; padding: 1px 0; text-align: left; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  .tbl.cards td:first-child { grid-column: 1 / -1; order: -2; font-size: var(--fs-md); padding-bottom: 3px; }
  .tbl.cards td.act { grid-column: 1 / -1; order: -1; padding: 4px 0 6px; }
  /* the one number a table exists for (a labor row's over / under, a P&L row's GP %): full width under the title, bigger, its label kept */
  .tbl.cards td.key { grid-column: 1 / -1; order: -1; font-size: var(--fs-lg); font-weight: 700; padding: 2px 0 4px; }
  .tbl.cards td.key::before { font-weight: 400; }
  .tbl.cards td.key .mini { font-size: var(--fs-xs); font-weight: 400; }
  .tbl.cards td.wide { grid-column: 1 / -1; }
  .tbl.cards td:not(:first-child):not(.act)::before { content: attr(data-l) ": "; color: var(--muted); font-size: var(--fs-xs); }
  .tbl.cards td[data-l=""]::before { content: none; }
  .tbl.cards td:not(:first-child) .mini { display: inline; margin-left: 4px; }
  .tbl.cards tr.total td { border-top: 0; background: none; }
  .tbl.cards tr.total { background: var(--surface-2); border-top: 2px solid var(--ink); }
  .tbl.cards tr.total td:empty { display: none; }
  .tbl.cards td.qtycell { min-width: 0; }
  .tbl.cards td select.inline, .tbl.cards td input.inline { display: inline-block; margin: 2px 4px 2px 0; max-width: 100%; }
  .tbl.cards td input.note { width: 100%; }
}
.qty-lbl { display: grid; gap: 2px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.qty { width: 64px; padding: 5px 6px; border: 1px solid var(--line-strong); border-radius: 8px; text-align: right; background: var(--surface); color: var(--ink); font-size: var(--fs-md); }
table.alerts td { vertical-align: middle; }
.switch { display: inline-flex; align-items: center; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; display: inline-block; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.btn.req { font-size: var(--fs-xs); padding: 2px 6px; margin-left: 4px; }
.weeks { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- collapsible sections of a long page (SNS.section): a chevron beside the title, folded past the first ------------ */
details.sec { border-top: 1px solid var(--line); margin: 18px 0 0; }
details.sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 0; margin: 0; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: ""; width: 9px; height: 9px; border-right: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg); flex: none; margin: 0 4px 0 2px; transition: transform .15s; }
details.sec[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
details.sec > summary h2 { margin: 0; font-size: var(--fs-xl); }
details.sec > summary:hover h2 { color: var(--red); }
details.sec > .sec-body { padding-bottom: 8px; }
details.sec > .sec-body > .lead:first-child { margin-top: 2px; }

/* ---- panels, rows, kv -------------------------------------------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; margin: 8px 0 14px; }
.panel h3:first-child { margin-top: 0; }
.grid2 { display: grid; gap: 12px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rows { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 8px 0 14px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: start; }
.row:first-child { border-top: 0; }
.row .t { font-weight: 600; overflow-wrap: anywhere; grid-column: 1; }
.row .d { color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; grid-column: 1; }
.row .amt { font-family: var(--display); font-size: var(--fs-xl); font-weight: 800; text-align: right; white-space: nowrap; grid-row: 1 / span 2; grid-column: 2; letter-spacing: -.02em; }
.row .amt small { display: block; font-family: var(--body); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.row .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: var(--fs-md); margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---- weather strip ------------------------------------------------------------------------------------------------ */
.wx { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 6px; margin: 8px 0 14px; }
.wx div { text-align: center; font-size: var(--fs-xs); color: var(--muted); min-width: 0; }
.wx b { display: block; font-family: var(--display); font-size: var(--fs-lg); color: var(--ink); line-height: 1.1; font-weight: 800; }
.wx i { display: block; font-style: normal; font-size: var(--fs-lg); line-height: 1.2; }
.wx small { display: block; font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- charts (inline SVG) ------------------------------------------------------------------------------------------ */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: var(--fs-xs); font-family: var(--body); }
.chart .v { fill: var(--ink); font-weight: 600; }
.chart rect { fill: var(--line-strong); }
.chart rect.hi { fill: var(--red); }
.chart rect.alt { fill: var(--red); opacity: .55; }
.chart line.axis { stroke: var(--line); }
.chart .legend { display: flex; gap: 14px; font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.chart .sw { display: inline-block; width: 12px; height: 12px; background: var(--line-strong); margin-right: 5px; vertical-align: -1px; border-radius: 4px; }
.chart .sw.alt { background: var(--red); opacity: .55; }
.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.spark line { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 2; }
.spark circle { fill: var(--ink); }

/* ---- uploads, verdicts, drafts ----------------------------------------------------------------------------------- */
.drop { display: block; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 26px 16px; text-align: center; color: var(--muted); margin: 10px 0; cursor: pointer; background: var(--surface); }
.drop.over { border-color: var(--red); background: var(--red-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop b { display: block; color: var(--ink); font-size: var(--fs-lg); margin-bottom: 4px; }
.verdict-box { background: var(--surface); border: 1px solid var(--good); border-radius: var(--radius); padding: 14px; margin: 10px 0 18px; }
.verdict-box.bad { border-color: var(--red); }
.verdict-box.part { border-color: var(--warn); }
/* a scanned stack of DSD invoices: one fold per invoice, the overcharged and failed ones open */
details.inv-part { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 8px 0; padding: 0 12px; }
details.inv-part.over, details.inv-part.bad { border-color: var(--red); }
details.inv-part > summary { color: var(--ink); font-size: var(--fs-md); padding: 10px 0; margin: 0; }
details.inv-part > summary .mini { display: inline; margin-left: 6px; }
details.inv-part .verdict { font-size: var(--fs-xl); }
details.inv-part > .inv-body { padding-bottom: 10px; }
.verdict { font-family: var(--display); font-weight: 800; font-size: var(--fs-hero); margin: 6px 0; letter-spacing: -.01em; }
.checks { margin: 8px 0; padding-left: 18px; font-size: var(--fs-sm); }
.drafts { display: grid; gap: 10px; }
@media (min-width: 900px) { .drafts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.draft { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.draft .caption { font-size: var(--fs-md); margin: 8px 0; }
.draft .why { color: var(--info); }

/* ---- sheet (modal) ------------------------------------------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-height: 88vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); position: relative; }
.sheet h2 { margin: 0 0 10px; padding-right: 40px; }
.sheet .close { position: absolute; top: 10px; right: 10px; }
@media (min-width: 900px) { .scrim { align-items: center; } .sheet { width: min(640px, 92vw); border-radius: var(--radius); max-height: 86vh; } }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: rise .18s ease-out; } @keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } } }
.menu { display: grid; gap: 6px; }
.menu button { text-align: left; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; display: block; width: 100%; }
.menu button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -2px; margin-right: 4px; }
.menu button small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.menu button:hover { background: var(--surface-2); }
video.scan { display: block; width: 100%; max-height: 46vh; object-fit: cover; border-radius: 8px; background: var(--black); }
/* 074: Scan - One item / Batch, the aiming line, a green flash per item read (red when it cannot be added), the batch's count */
.scan-h { margin-bottom: 8px; }
.scan-mode { margin: 0 0 10px; }
.scan-mode button { min-height: 40px; padding: 8px 18px; font-size: var(--fs-md); }
.scanbox { position: relative; border-radius: 8px; overflow: hidden; background: var(--black); }
.scanaim { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: rgba(255, 64, 64, .85); box-shadow: 0 0 6px rgba(255, 64, 64, .8); pointer-events: none; }
.scanbox::after { content: ""; position: absolute; inset: 0; border: 4px solid transparent; border-radius: 8px; pointer-events: none; }
.scanbox.hit::after { animation: scanhit .45s ease-out; }
.scanbox.miss::after { animation: scanmiss .45s ease-out; }
@keyframes scanhit { from { border-color: var(--good); background: rgba(31, 157, 85, .28); } to { border-color: transparent; background: transparent; } }
@keyframes scanmiss { from { border-color: var(--red); background: rgba(200, 16, 46, .22); } to { border-color: transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { .scanbox.hit::after { animation: none; border-color: var(--good); } .scanbox.miss::after { animation: none; border-color: var(--red); } }
.scanbatch { margin: 8px 0 4px; }
.scanbatch-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.scancount { font-size: var(--fs-hero); line-height: 1; color: var(--red); }
.scanrecent { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.scanrecent li { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; background: var(--surface-2); }
.scanrecent li b { margin-left: 4px; }
.scan-see { width: 100%; min-height: 46px; font-size: var(--fs-md); margin-top: 4px; }
.scan-hint { margin-top: 0; }
.scanlist-bar { align-items: flex-end; }
.scan-empty { padding: 22px 16px; }
.sl-rm { float: right; margin: -2px 0 2px 8px; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: var(--fs-lg); line-height: 1; cursor: pointer; }
.sl-rm:hover { color: var(--red); border-color: var(--red); }
@media print { .sl-rm { display: none; } }

/* ---- states ------------------------------------------------------------------------------------------------------- */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; min-height: 14px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shimmer 1.2s infinite; }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-list { display: grid; gap: 10px; }
.msg { padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); margin: 12px 0; }
.msg.err { border-color: var(--red); background: var(--red-soft); color: var(--ink); }
.empty { color: var(--muted); padding: 22px 12px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin: 8px 0 14px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 40px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; font-size: var(--fs-md); z-index: 50; max-width: calc(100% - 32px); border-radius: 8px; box-shadow: var(--shadow); }
.toast.err { background: var(--red-btn); color: var(--red-ink); }
.toast.act { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 6px 6px 16px; width: min(360px, calc(100% - 32px)); }
.toast-btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: none; color: var(--bg); font-weight: 800; text-decoration: underline; cursor: pointer; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.card { max-width: 440px; margin: 40px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h1 { font-size: var(--fs-hero); margin: 0 0 6px; font-weight: 800; }
.card label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.card input { width: 100%; padding: 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); margin: 6px 0 12px; font-size: var(--fs-md); }

/* ---- print: the tables, nothing else --------------------------------------------------------------------------- */
@media print {
  .topbar, .rail, .tabbar, .actions, .narrative .off, .btnrow, .filters, .scrim, .toast, .drop, .by-kind, .seg, .pins, .more-row { display: none !important; }
  .frame { display: block; }
  .main { padding: 0; max-width: none; }
  body { font-size: 12px; color: #000; background: #fff; }
  .tbl { overflow: visible; border: 0; }
  table { font-size: 10.5px; }
  th { position: static; }
  .xcard, .tile, .panel, .rows, .row { box-shadow: none; break-inside: avoid; }
  details.sec > summary::before { display: none; }   /* app.js opens every folded section before printing */
  a { color: #000; text-decoration: none; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Dated orders v3 + Great Deals (069; screens.js SC.dated, greatdeals.js) ---------------------------------------------------- */
.dated-day { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; font-size: var(--fs-md); }
.dated-day span { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.dated-none { margin: 6px 0; padding: 9px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.dated-none b { color: var(--ink); }
.gd-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gd-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 4px 14px; padding: 11px 12px; border-top: 1px solid var(--line); align-items: start; }
.gd-row:first-child { border-top: 0; }
.gd-pct { text-align: center; background: var(--red-soft); color: var(--red); border-radius: 8px; padding: 6px 2px; }
.gd-pct b { display: block; font-family: var(--display); font-size: var(--fs-hero); line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.gd-pct small { display: block; font-size: var(--fs-xs); font-weight: 600; margin-top: 3px; }
.gd-t { font-weight: 700; overflow-wrap: anywhere; }
.gd-d { color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; margin-top: 2px; }
.gd-d b { color: var(--ink); }
.gd-tags { display: block; margin-top: 4px; }
.gd-amt { font-family: var(--display); font-size: var(--fs-xl); font-weight: 800; text-align: right; white-space: nowrap; letter-spacing: -.02em; }
.gd-amt small { display: block; font-family: var(--body); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.gd-off { opacity: .72; }
.gd-off .gd-pct { background: var(--surface-2); color: var(--muted); }
@media (max-width: 599px) {
  .gd-row { grid-template-columns: 58px minmax(0, 1fr); }
  .gd-pct b { font-size: var(--fs-xl); }
  .gd-amt { grid-column: 2; text-align: left; font-size: var(--fs-xl); }
  .gd-amt small { display: inline; margin-left: 6px; }
}

/* ---- 092 (Tom 2026-10-17 Q44-Q47): the Great Deals and Credit calls trees - the Overview's lines (scorecard.css .sc-n) holding
   deal / claim rows (.gd-row) in their kids; sizes in rem so the phone's text size scales the rows with the lines ---- */
.gd-neg .gd-pct { background: var(--surface-2); color: var(--bad); }
/* a claim: item | credit, the invoice / cases / reason / status under it */
.cr-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 8px 0 10px; font-size: var(--fs-md); }
.cr-top b { font-family: var(--display); font-size: var(--fs-xl); }
.cr-claim .gd-pct { background: var(--surface-2); color: var(--ink); }
.cr-claim .gd-pct b { font-size: var(--fs-md); line-height: 1.2; }
.cr-claim .gd-pct small { font-size: var(--fs-xs); }
/* ---- Export: Download / Share (Tom 2026-10-17 Q1-Q5; app.js section 7) ------------------------------------------------------
   one check box per data block (ticked), two big actions, then the Share step: the subject, a search box, the people who may see
   the data as check boxes. Every control 44 px+ on a phone; the tokens carry dark mode. */
.ex-blocks { display: grid; gap: 6px; margin: 4px 0 14px; }
.ex-block, .ex-person { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.ex-block input, .ex-person input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--red-btn); }
.ex-block span, .ex-person span { display: grid; gap: 2px; min-width: 0; }
.ex-block b, .ex-person b { font-weight: 700; overflow-wrap: anywhere; }
.ex-block small, .ex-person small { color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.ex-block:has(input:checked), .ex-person:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.ex-acts { display: grid; gap: 8px; margin: 6px 0 4px; }
@media (min-width: 600px) { .ex-acts { grid-template-columns: 1fr 1fr; } }
.ex-act { display: grid; justify-items: start; text-align: left; white-space: normal; min-height: 56px; padding: 10px 14px; gap: 0; font-size: var(--fs-lg); }
.ex-act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; margin-right: 2px; }
.ex-act small { display: block; font-weight: 400; font-size: var(--fs-sm); opacity: .85; }
.ex-act:disabled { opacity: .5; cursor: default; }
.ex-off { font-size: var(--fs-md); color: var(--muted); margin: 8px 0 0; }
.ex-subject { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-2); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; font-weight: 600; }
.ex-subject small { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ex-q { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); margin: 0 0 8px; }
.ex-people { display: grid; gap: 6px; margin: 0 0 12px; }                /* the sheet scrolls as a whole: no box inside a box */
.ex-people .empty { margin: 0; }

/* ---- pages-a (2026-10-18 UX cleanup: Labor, Dated orders, Great deals, Credits, DSD, Cost comparison, items, Status, Settings) ----
   Q22: rows on the phone, the full table on a computer (screens.js listRows draws both; one shows). The drill and the boxes are ux.css. */
@media (max-width: 599.98px) { .pa-dt { display: none; } }
@media (min-width: 600px) { .pa-ph { display: none; } }
.pa-rows { display: block; }
.pa-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; }
.pa-top .ux-pill select { max-width: 70vw; }
.pa-chart { margin: 10px 0 4px; }
.pa-chart h3 { font-size: var(--fs-md); margin: 0 0 4px; color: var(--muted); }
.ux-kids .rows { margin: 6px 0 4px; }
.ux-kids .row .t { font-size: var(--fs-md); }
.ux-kids .row .amt { font-size: var(--fs-lg); }
.pa-code { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.pa-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
/* the Labor day chart: worked = the ink bar, earned = the light bar beside it (red is "worse" on these pages, Q7, so not a series colour) */
.pa-chart .chart rect { fill: var(--ink); opacity: .78; }
.pa-chart .chart rect.alt { fill: var(--line-strong); opacity: 1; }
.pa-chart .chart .sw { background: var(--ink); opacity: .78; }
.pa-chart .chart .sw.alt { background: var(--line-strong); opacity: 1; }
details.ux-n.t-warn { border-left: 4px solid var(--warn); }
/* the deal / claim rows inside the drill (Great deals, Negative cost, Credits) */
.ux-kids .gd-list, .ux-kids .more-row { margin: 6px 0 4px; }
.ux-kids .gd-row { grid-template-columns: 4.25rem minmax(0, 1fr) auto; font-size: var(--fs-md); }
.ux-kids .gd-pct b { font-size: var(--fs-xl); }
.ux-kids .gd-pct small { font-size: var(--fs-xs); }
.ux-kids .gd-d { font-size: var(--fs-sm); }
.ux-kids .gd-amt { font-size: var(--fs-lg); }
.ux-kids .gd-amt small { font-size: var(--fs-xs); }
@container (max-width: 22em) { .ux-kids .gd-row { grid-template-columns: 3.5rem minmax(0, 1fr); } .ux-kids .gd-row .gd-amt { grid-column: 2; text-align: left; } }
a.btn.dsd-scan { text-decoration: none; margin: 0 0 10px; }
.x-detail { color: var(--muted); margin: 0 0 12px; }

/* ==== from hr.css (2026-10-24): hr.css loads with its page now (pages.js); these of its rules also style what the shell or other
   pages draw, so they load with the first paint, at the end of styles.css - where hr.css sat in the cascade ==== */
/* the file and settings routes are nav entries only so app.js lets them open: never shown as links */
#tabbar:has(> a[href="#/hr/settings"]) { grid-template-columns: repeat(2, 1fr); }   /* Rick's tab bar: Associates + More */
/* ---- Associates --------------------------------------------------------------------------------------------------------- */
.btn svg { flex: none; }
/* ---- Notes, documents, certificates ------------------------------------------------------------------------------------- */
.row[data-kudos] { background: var(--good-soft); }
.row[data-kudos] .t { font-weight: 500; }
.panel h3 .ux-i, h3 .ux-i, .btnrow .ux-i { margin-left: 8px; vertical-align: middle; }

/* ==== from schedule.css (2026-10-24): schedule.css loads with its page now (pages.js); these of its rules also style what the shell or other
   pages draw, so they load with the first paint, at the end of styles.css - where schedule.css sat in the cascade ==== */
.sch { min-width: 0; }
.flash { animation: schflash 1.6s ease-out 1; }
@media (prefers-reduced-motion: reduce) {
  .flash { animation: none; box-shadow: inset 0 0 0 3px var(--red) !important; }
}
/* the schedule screens' header: link buttons (Print week / coverage) read as buttons; on a phone the title gets the full width */
.screen-head .actions a.btn { text-decoration: none; }
@media (max-width: 599px) {
  body:has(.sch) .screen-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  body:has(.sch) .screen-head .actions { grid-column: 1; grid-row: auto; flex-wrap: wrap; margin-top: 6px; }
}
.pc-note { color: var(--muted); }
/* ---- 088 (Tom 2026-10-17 Q24, Q25, Q30-Q33): the 4-week lists (laborlists.js) on the Labor page and Schedule vs actuals ---------
   The lines are the Overview's (scorecard.css .sc-n: a caret, the name, the number, the small words); a department opens to the two
   categories, a category to its people, a person to the instances (one line each). Sizes in rem; the container query stacks a
   narrow line. The read-only ticket of a manager's past week, and the (?) that opens the method, live here too. ------------------ */
.ll, .ll .sc-kids { container-type: inline-size; }
.ll .sc-n.d1 .sc-nm { font-size: var(--fs-md); }
.ll .sc-n.d3, .ll .sc-n.d4 { background: var(--surface); border-style: solid; }
.ll .sc-n.d3 .sc-v, .ll .sc-n.d4 .sc-v { font-size: var(--fs-md); }
.ll .sc-n.ll-cat .sc-nm { font-weight: 700; }
.ll .sc-n.off .sc-nm, .ll .sc-n.off .sc-v { color: var(--muted); font-weight: 600; }
.ll .sc-n.ll-person .sc-nm { font-weight: 600; }
.ll .sc-n.ll-inst { min-height: 0; margin: 4px 0; font-size: var(--fs-md); }
.ll .sc-n.ll-inst > .sc-flat, .ll .sc-flat.ll-inst { padding: 7px 10px; min-height: 40px; }
.ll .ll-inst .sc-nm { font-weight: 500; }
.ll .ll-inst .sc-nm .ll-detail { font-weight: 400; }
.ll .ll-inst .sc-v { font-family: inherit; font-weight: 600; font-size: var(--fs-md); }
.ll .ll-inst.decided .sc-nm { color: var(--muted); }
.ll .ll-inst .sc-c { white-space: normal; max-width: none; }
.ll .ll-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ll .ll-acts .btn.sm { min-height: 40px; }
.ll-open { color: var(--warn); font-weight: 700; font-size: var(--fs-sm); }
.ll .sc-n.d3 > .sc-kids, .ll .sc-n.d2 > .sc-kids { padding-left: .75rem; }
/* the (?) beside a count: a small round button, 28 px, 44 px to tap on a phone */
.ll-help { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-left: 6px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font: 700 var(--fs-sm)/1 var(--display); cursor: pointer; vertical-align: middle; padding: 0; }
.ll-help:hover, .ll-help:focus-visible { border-color: var(--red); color: var(--red); outline: none; }
.ll-wait { margin-top: 8px; }
/* an instance line: the words, the status at the right, the two buttons under them on a phone (never beside the status) */
.ll .sc-flat.ll-inst { grid-template-columns: 1rem minmax(0, 1fr) auto; grid-template-areas: "car nm v" "car c c"; }
.ll .ll-inst .sc-c { justify-self: end; }
@media (min-width: 700px) {
  .ll .sc-flat.ll-inst { grid-template-columns: 1rem minmax(0, 1fr) auto auto; grid-template-areas: "car nm v c"; }
}
@media (max-width: 599px) {
  .ll-help { width: 2rem; height: 2rem; }
}
@container (max-width: 26em) {
  .ll .sc-n > summary, .ll .sc-flat { grid-template-columns: 1rem minmax(0, 1fr) auto; grid-template-areas: "car nm nm" "car v c"; }
}
@container (max-width: 26em) {
  .ll .sc-v { text-align: left; white-space: normal; }
}
@container (max-width: 26em) {
  .ll .sc-c { max-width: none; }
}
@container (max-width: 26em) {
  .ll .sc-kids { padding-left: .75rem; padding-right: 4px; }
}
@container (max-width: 26em) {
  .ll .sc-flat.ll-inst { grid-template-areas: "car nm nm" "car v v" "car c c"; }
}
@container (max-width: 26em) {
  .ll .ll-inst .sc-c { justify-self: start; }
}
/* 2026-10-19 (review U2): the 4-week lists in the ux.css look (.ux-n) on both pages; an instance line = the words | its state, and
   Confirm / Excuse on a row of their own under them (44 px on a phone) */
.ll .ux-flat.ll-inst { grid-template-areas: "car nm v" "car acts acts"; min-height: 0; padding: 10px 12px; }
.ll .ux-flat.ll-inst .ux-nm b { font-size: var(--fs-md); font-weight: 600; }
.ll .ux-flat.ll-inst.decided .ux-nm b { color: var(--muted); }
.ll .ux-flat.ll-inst .ll-acts { grid-area: acts; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 8px; }
.ll .ux-flat.ll-inst .ll-acts .btn.sm { min-height: 44px; min-width: 6.5rem; }
.ll .ll-st { font-family: var(--body); font-size: var(--fs-md); font-weight: 700; }
.ll .ux-n.ll-person .ux-nm b { font-weight: 600; }
@container (max-width: 19em) {
  .ll .ux-flat.ll-inst { grid-template-areas: "car nm" "car v" "car acts"; }
}
@container (max-width: 19em) {
  .ll .ux-flat.ll-inst .ll-acts { justify-content: flex-start; }
}
#actions a.btn svg { flex: none; }
h2 .ux-i { margin-left: 8px; vertical-align: middle; }
/* ---- fix-pages 2026-10-19: two shared pieces (screens.js SNS.pa.weekPill / SNS.pa.way), used on the pages of this pass ---------
   The week pill beside the title (review U10): as wide as its longest week, never clipped; the one switch look (U13) = ux.css's
   .ux-way (ink when on); a switch with many or long choices wraps, each choice its own pill in the same colours. */
.ux-pill.ux-weekpill { max-width: none; overflow: visible; padding: 0 10px 0 14px; }
.ux-pill.ux-weekpill select { max-width: none; font-weight: 700; cursor: pointer; }
#hweek { display: inline-flex; }
@media (max-width: 599px) {
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 599px) {
  .crumbs { margin-bottom: -6px; }
}
.pa-lyb { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.ux-way.pa-way { max-width: 100%; }
.ux-way.pa-way button { white-space: nowrap; }
.ux-way.pa-way button b.num { font-weight: 800; margin-left: 4px; }
.ux-way.pa-way.wrap { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; }
.ux-way.pa-way.wrap button { border: 1px solid var(--line-strong); border-radius: 99px; }
.ux-way.pa-way button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (hover: hover) {
  .ux-way.pa-way button[aria-pressed="false"]:hover { background: var(--surface-2); }
}
@keyframes schflash { 0%, 100% { background-color: transparent; } 15%, 55% { background-color: var(--red-soft); box-shadow: inset 0 0 0 3px var(--red); } }

/* 129: an associate's item and arriving dated orders */
.ib-head h2 { margin: 0; } .ib-head .lead { margin: 4px 0 12px; color: var(--muted); }
.ib-rows { display: grid; gap: 0; margin: 0; }
.ib-rows > div { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ib-rows > div:first-child { border-top: 0; }
.ib-rows dt { color: var(--muted); font-weight: 600; } .ib-rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; } .ib-rows small { color: var(--muted); }
.da-list { list-style: none; margin: 0; padding: 0; display: grid; }
.da-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.da-list li:first-child { border-top: 0; }
.da-list li span { grid-column: 1; color: var(--muted); font-size: var(--fs-md); } .da-list li em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 700; }
/* 132: "Pick up where you left off" - one bar over the page, from any page */
.resumebar { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar, 0px) + 12px + env(safe-area-inset-bottom, 0px)); width: min(680px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.resumebar .rb-t { display: grid; flex: 1 1 auto; min-width: 0; }
.resumebar .rb-t span { overflow: hidden; text-overflow: ellipsis; }
.resumebar .rb-t small { color: var(--muted); font-size: var(--fs-xs); }
.resumebar .rb-x { min-width: 44px; padding: 0; }
@media (min-width: 900px) { .resumebar { bottom: 18px; } }
@media print { .resumebar { display: none; } }

/* 145: the Face ID / fingerprint lock and sign-in (passkey.js) */
.pk-lock { position: fixed; inset: 0; z-index: 1000; background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.pk-lock-in { max-width: 360px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pk-lock-in img { align-self: center; border-radius: var(--radius); }
.pk-lock-in h1 { margin: 0; font-size: var(--fs-hero); }
.pk-note { color: var(--bad); margin: 0; }
.pk-signin { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.pk-signin small { color: var(--muted); text-align: center; }
.pk-devs { list-style: none; padding: 0; margin: 8px 0; }
.pk-devs li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pk-devs li small { color: var(--muted); flex: 1 1 140px; }

/* 147: Multi Item Groups - the + that opens a group's varieties, the varieties indented, the count chip on a phone line */
.ig-tog { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; margin-right: .45em; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: 600 1em/1 inherit; cursor: pointer; vertical-align: middle; }
.ig-tog[aria-expanded="true"] { background: var(--surface-2); }
tr.ig-p td { font-weight: 600; }
tr.ig-kid td { background: var(--soft, rgba(0, 0, 0, .025)); font-weight: 400; }
tr.ig-kid td:first-child { padding-left: 2.6em; }
.ig-n { display: inline-block; margin-left: .4em; padding: 0 .4em; border-radius: 8px; background: var(--surface-2); font-size: .8em; font-weight: 600; }
.ig-box .ig-list { margin: .3em 0 .6em 1.2em; padding: 0; }
.ig-box .ig-fix { display: flex; flex-wrap: wrap; gap: .5em; align-items: flex-end; }
.ig-box .ig-fix label { display: flex; flex-direction: column; font-size: .85em; }
.ig-box .ig-fix input { min-width: 12em; max-width: 100%; }
/* 148: the price check's "Also send to ownership" box */
.pc-own { display: flex; align-items: center; gap: .5em; margin: .4em 0 0; font-size: .95em; }
.pc-own input { width: 1.2em; height: 1.2em; }
/* 148: ownership's quiet list of store alerts on To do */
.td-quiet { margin-top: 1em; }
.td-quiet summary { cursor: pointer; font-weight: 600; }
.td-quiet summary small { font-weight: 400; opacity: .75; margin-left: .4em; }
.td-qlist { list-style: none; padding: 0; margin: .5em 0 0; }
.td-qa { padding: .45em 0; border-top: 1px solid var(--line); }
.td-qa small { display: block; opacity: .8; }
.fx-mark { display: inline-block; margin-left: .35em; padding: 0 .4em; border-radius: 8px; background: var(--surface-2); font-size: .75em; font-weight: 600; cursor: help; }   /* 152: a corrected number */

/* 154: a dated line we may not be able to cancel or change (pallet, mod, show booking) - still listed and counted, call UNFI */
.lock-note { display: block; margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--warn); border-radius: 4px; background: var(--warn-soft); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
/* 160 (Tom 2026-11-03): the other way for the same order line - the move behind a Better-deal line, the other code behind a move */
.alt-note { display: block; margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--info); border-radius: 4px; background: var(--info-soft); color: var(--ink); font-size: var(--fs-sm); }
.fx-item.locked { border-color: var(--warn); }

/* lint-off: wave 1's 155 shell block below is left as it landed (shell155_checks covers it) */
/* ---- 155 (Tom 2026-11-02): the shell rebuild - the header icons, the one Scan door's modes, More's All pages, the offline bar ---- */
/* Q2 / Q14: Find and Messages (with its unread count) beside the name at the top right */
.hd-icons { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.who .ux-me { flex: none; }
.who .demo-pill { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* the demo's "view as" pill gives way to the icons on a phone */
@media (max-width: 899px) { .who { gap: 6px; } .hd-icons { gap: 0; } }
.hd-ic { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.hd-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hd-ic[aria-current="page"] { color: var(--red); }
.hd-ic:hover { background: var(--surface-2); }
.hd-ic:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; }
.hd-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red-btn); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
/* Q14: the Find sheet's groups */
.find-sheet .find-h { margin: 14px 0 6px; font-size: .8125rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.find-sheet .find-out { min-height: 60px; }
/* Q9: the Scan sheet's mode row (Item · Price check · Shelf life / Go-backs · Inventory · Invoice), on the Scanner tab's hub too */
.scan-kinds { display: flex; gap: 0; margin: 0 0 10px; border-radius: 10px; }
.scan-kinds a, .scan-kinds button { flex: 1 1 auto; min-height: 44px; padding: 8px 10px; font-size: .9375rem; font-weight: 700; text-decoration: none; color: var(--ink); text-align: center; border: 0; background: none; cursor: pointer; white-space: nowrap; }
.scan-kinds [aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.scan-dock .scan-kinds { margin: 0; border-radius: 14px; overflow: hidden; }
.scan-dock .scan-kinds a, .scan-dock .scan-kinds button { padding: 8px 6px; font-size: .875rem; white-space: normal; line-height: 1.15; }
.scan-stage.scan-inv { display: grid; align-content: center; justify-items: center; gap: 14px; padding: 24px var(--gutter); text-align: center; background: var(--surface); color: var(--ink); }
.scan-stage.scan-inv .btn { text-decoration: none; }
.scan-stage.scan-inv .lead { max-width: 420px; }
/* Q1: More - the role's tiles, then "All pages" folded */
.mo-all { margin-top: 18px; }
.mo-all-s { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .9375rem; font-weight: 700; color: var(--muted); }
.mo-all-s::-webkit-details-marker { display: none; }
.mo-all-s::after { content: "›"; display: inline-block; transform: rotate(90deg); transition: transform .15s; }
.mo-all[open] > .mo-all-s::after { transform: rotate(-90deg); }
/* Q13: the To do count is the tab badge on a phone; the Overview's pill shows on the desktop (its menu badge is there) */
@media (max-width: 899px) { #main .ov-todo { display: none; } }   /* #main: scorecard.css loads after this file */
/* Q15: the Corrections group at the top of the owner's To do (fixes.js SNS.fixesCard) */
.td-fixes .mf-body { padding: 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius, 12px) var(--radius, 12px); background: var(--surface); }
.td-fixes .fx-q { margin: 0; }
.fx-all-link { margin: 10px 0 0; font-weight: 700; }
.fx-all-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--red); text-decoration: none; }
/* Q20: "Offline · numbers from 7:02 AM" - a slim bar under the header while the phone has no signal or runs on kept answers */
.offbar { margin: 4px calc(-1 * var(--gutter)) -6px; padding: 5px var(--gutter); background: var(--warn-soft, #fff4e0); color: var(--warn, #8a5300); font-size: .8125rem; font-weight: 700; text-align: center; }
@media print { .offbar, .hd-icons { display: none !important; } }
/* 174 (Tom 2026-11-05): the item page's last purchases, each opening its invoice (invoiceview.js) */
.it-invs .it-inv { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.it-invs .it-inv:last-child { border-bottom: 0; }
.it-invs .it-inv b { color: var(--ink); }
.it-invs .it-inv .mini { display: block; }
@media (hover: hover) { .it-invs .it-inv:hover { background: var(--surface-2); } }
/* 175: New Hire's hand-over (app.js nhLock): a new associate fills their paperwork on the manager's device - no menus, no way out but
   the manager's PIN (newhire.js) */
body.nh-lock #rail, body.nh-lock #tabbar, body.nh-lock #who, body.nh-lock #topwx, body.nh-lock #storepick, body.nh-lock #datebar,
body.nh-lock .hd-ic, body.nh-lock #hmenu, body.nh-lock #hstore, body.nh-lock .crumbs { display: none !important; }
body.nh-lock .wordmark { pointer-events: none; }
body.nh-lock .frame { display: block; }
body.nh-lock .main { padding-bottom: 40px; }
.pw-cover { text-align: left; }
.pw-cover h1 { text-align: center; }
/* 2026-11-17: an order line listed under Moves to save AND Better deal, other code - blue in both lists */
.row.in-both, .fx-item.in-both { background: var(--info-soft); border-color: var(--info); box-shadow: inset 4px 0 0 var(--info); }
.alt-note.both-note { background: transparent; border-left: 0; padding: 0; color: var(--info); }
.alt-note.both-note b { display: block; }
/* 266 (Tom 2026-11-26): Dated orders - Today / Tomorrow on top, a done saving stepped back, the Price and signs list */
.dt-soon { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 0 0 12px; }
.dt-day { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; }
.dt-day > summary, .dt-day.none { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; cursor: pointer; }
.dt-day.none { cursor: default; color: var(--muted); }
.dt-day b { font-size: var(--fs-md); }
.dt-day span { color: var(--muted); font-size: var(--fs-sm); }
.dt-old { margin: 0 0 10px; }
.dt-plink { margin: 10px 0; }
.dt-psum { margin: 4px 0 10px; font-size: var(--fs-md); }
.row.dt-done { opacity: .62; }
/* the export's own picks (Dated orders: which stores, timeframes, departments - Tom 2026-11-28) */
.ex-pick { margin: 12px 0 0; padding: 8px 12px 10px; border: 1.5px solid var(--line); border-radius: var(--radius); min-width: 0; }
.ex-pick legend { padding: 0 6px; font-weight: 700; }
.ex-all { position: relative; margin-left: 8px; padding: 2px 10px; min-height: 32px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--fs-sm); cursor: pointer; }
.ex-all::after { content: ""; position: absolute; inset: -6px -4px; }      /* a 44px touch area around the small pill */
.ex-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 8px; }
.ex-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.ex-one .ex-block input { display: none; }                                   /* one block with its own pick lists: said, not ticked */
.ex-pick ~ .ex-acts { position: sticky; bottom: 0; z-index: 1; margin-bottom: 0; padding: 8px 0 env(safe-area-inset-bottom, 0px); background: var(--surface); }   /* Download stays in view under long lists */
.dt-plink .btn { white-space: normal; max-width: 100%; }
.ex-opt input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--red-btn); }
.ex-opt small { display: block; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.ex-pick ~ .ex-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex-pick ~ .ex-acts .ex-act small { display: none; }
