/* ChezPluieOps components (UX Layout Specification v1.2 §2-§4): the storefront look of the design of record
   (docs/spec/ux/design-v3/), rebuilt as plain CSS over static/ops/tokens.css. White ground, Montserrat capitals,
   Nunito Sans text, one deep green, square corners. Breakpoints (§2.3): phone < 600 px, tablet 600-1023 px,
   PC >= 1024 px. Touch targets >= 44 px; nothing scrolls sideways at 320 px.
   Old phones (D-012 R8): iOS 15 Safari and Android 8 Chrome, down to 320 x 568. No container query (cqi, @container)
   and no :has(): media queries and vw instead, and a class the script sets; dvh always after a vh fallback. A word is
   never split across lines (D-012 D9): text wraps between words, and a button keeps its label on one line. */

/* --- Base ------------------------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--color-bg); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: var(--cp-link); text-underline-offset: 2px; }
a:hover { color: var(--color-accent); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); font-weight: 500; text-transform: uppercase; overflow-wrap: normal; word-break: normal; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: var(--color-accent-200); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; padding: 12px 16px; background: var(--color-accent); color: var(--color-bg); font-family: var(--font-heading); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 8px; color: var(--color-bg); }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--cp-muted); }
.num { font-variant-numeric: tabular-nums; }
.caps { font-family: var(--font-heading); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }

/* --- Shell (§3 "App shell (staff)") ------------------------------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(20px, 4vw, 48px) clamp(16px, 4.5vw, 56px) clamp(32px, 6vw, 72px); }
.content.flush { max-width: none; padding: 0; }

/* The left rail: 256 px with labels on PC, a 64 px icon rail with short labels on tablet, hidden on phone. */
.rail { position: sticky; top: 0; flex: none; width: 256px; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--color-bg); border-right: 1px solid var(--color-divider); overflow-x: hidden; overflow-y: auto; }
.rail-logo { display: block; padding: 30px 28px 26px; border-bottom: 1px solid var(--color-divider); }
.rail-logo img { display: block; width: 150px; height: auto; }
.rail-mono { display: none; height: 72px; place-items: center; text-decoration: none; }
/* The CP monogram from the supplied mask, in the accent colour of the scheme (never typed in a font, §2.2). */
.monogram { display: block; width: 34px; aspect-ratio: 512 / 326; background: var(--color-accent); -webkit-mask: url("../brand/monogram-mask.8724e44a1afb.png") center / contain no-repeat; mask: url("../brand/monogram-mask.8724e44a1afb.png") center / contain no-repeat; }
.rail ul { list-style: none; margin: 0; padding: 20px 0; display: flex; flex-direction: column; }
.rail-link { position: relative; display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 28px; text-decoration: none; font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cp-muted); }
.rail-link:hover { color: var(--color-accent); }
.rail-link[aria-current="page"] { color: var(--color-accent); box-shadow: inset 3px 0 0 var(--color-accent); }
.rail-link .long { flex: 1; min-width: 0; padding: 6px 0; line-height: 1.35; }
.rail-link .short { display: none; }
.count { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.count { flex: none; min-width: 20px; height: 20px; padding: 0 6px; line-height: 20px; text-align: center; white-space: nowrap; }
.count.late { min-width: 20px; height: 20px; padding: 0 6px; background: var(--cp-error); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
[data-theme="dark"] .count.late { color: #121411; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .count.late { color: #121411; } }
.rail-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 18px 20px 18px 28px; border-top: 1px solid var(--color-divider); }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--color-accent); color: var(--color-bg); display: grid; place-items: center; font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .1em; text-indent: .1em; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.who .name { font-weight: 600; }
.who .role, .who a { font-size: 12px; color: var(--cp-muted); }
.who a { width: max-content; }
.icon-btn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 0; background: none; color: var(--cp-muted); cursor: pointer; text-decoration: none; }
.icon-btn:hover { color: var(--color-accent); }
.icon-btn.boxed { border: 1px solid var(--color-divider); color: var(--cp-link); }
.icon-btn.boxed:hover { border-color: var(--color-accent); }
.admin-icon { display: none; }
.logout-form { margin: 0; display: contents; }

/* The phone app bar and bottom tab bar. */
.appbar { display: none; }
.tabbar { display: none; }

@media (min-width: 600px) and (max-width: 1023.98px) {
  .rail { width: 64px; align-items: stretch; }
  .rail-logo { display: none; }
  .rail-mono { display: grid; }
  .rail ul { padding: 0; }
  .rail-link { flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; padding: 6px 0; font-size: 11px; letter-spacing: .02em; text-align: center; }
  .rail-link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--color-accent); }
  .rail-link .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* D-015 item 34 (F2): between the phone and PC widths the rail is icons only, the name in the link's tooltip and
     read out from .long; never a label cut to one or two letters. */
  .rail-link .short { display: none; }
  .rail-link { min-height: 56px; }
  .rail-link .count { position: absolute; top: 6px; left: auto; right: max(2px, calc(50% - 24px)); }
  .rail-link .count:not(.late) { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; background: var(--cp-sand); color: var(--color-text); }
  .rail-link .count.late { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  .rail-foot { flex-direction: column; padding: 12px 0; gap: 4px; border-top: 0; }
  .rail-foot .who { display: none; }
  .rail-foot .admin-icon { display: inline-grid; }
}

@media (max-width: 599.98px) {
  .rail { display: none; }
  .appbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 60px; padding: 4px 8px; background: var(--color-bg); border-bottom: 1px solid var(--color-divider); }
  .appbar .appmid { justify-self: center; max-width: 100%; }
  .appbar .apptitle { justify-self: center; max-width: 100%; text-align: center; line-height: 1.25; font-family: var(--font-heading); font-weight: 500; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
  .appbar .applogo img { display: block; width: 104px; height: auto; }
  .appbar .applogo { justify-self: center; display: flex; }
  .acct { position: relative; }
  .acct summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
  .acct summary::-webkit-details-marker { display: none; }
  .acct .avatar { width: 32px; height: 32px; font-size: 10px; }
  .menu { position: absolute; top: 48px; left: 0; z-index: 30; min-width: 220px; padding: 8px 0; background: var(--cp-raised); border: 1px solid var(--color-divider); box-shadow: var(--shadow-lg); }
  .menu p { padding: 8px 16px; line-height: 1.3; }
  .menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px; border: 0; background: none; text-align: left; text-decoration: none; color: var(--color-text); font-family: var(--font-heading); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
  .menu a:hover, .menu button:hover { background: var(--color-accent-100); color: var(--color-text); }
  .tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: block; background: var(--color-bg); border-top: 1px solid var(--color-divider); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar > ul { list-style: none; margin: 0; padding: 0 0 4px; display: grid; grid-template-columns: repeat(var(--tabs, 5), minmax(0, 1fr)); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px; padding: 4px 0 0; border: 0; background: none; text-decoration: none; font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .02em; text-transform: uppercase; color: var(--cp-muted); cursor: pointer; width: 100%; list-style: none; overflow-wrap: normal; word-break: normal; }
  .tab::-webkit-details-marker { display: none; }
  .tab[aria-current="page"] { color: var(--color-accent); box-shadow: inset 0 2px 0 var(--color-accent); }
  .tab .count { position: absolute; top: 6px; left: auto; right: max(2px, calc(50% - 24px)); }
  .tab .count:not(.late) { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; background: var(--cp-sand); color: var(--color-text); }
  .tab .count.late { min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  .tabbar details { position: relative; }
  /* Capped under the top bar and scrollable (S19b: a tenth queue made the list reach the TEST DATA pill at 320 × 568). */
  .tabbar .more { position: absolute; bottom: 66px; right: 0; min-width: 220px; width: max-content; max-width: calc(100vw - 16px); max-height: calc(100vh - 66px - 72px); overflow-y: auto; list-style: none; margin: 0; padding: 8px 0; background: var(--cp-raised); border: 1px solid var(--color-divider); box-shadow: var(--shadow-lg); }
  .tabbar .more a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; text-decoration: none; color: var(--color-text); font-family: var(--font-heading); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
  .tabbar .more a .count { margin-left: auto; }
  .tabbar .more a > span:not(.count) { min-width: 0; }
  body.ops.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.sheet-page .tabbar { display: none; }
  .appbar .back { color: var(--color-text); }
  .on-phone-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* --- Page head ----------------------------------------------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: clamp(16px, 3vw, 28px); }
.page-head h1 { font-size: clamp(22px, 2.4vw + 12px, 26px); letter-spacing: .1em; line-height: 1.25; }
.page-head .sub { margin-top: 6px; color: var(--cp-muted); font-size: 14px; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Ops home (§3) ------------------------------------------------------------------------------------------- */
.hero { position: relative; height: clamp(220px, 30vw, 320px); overflow: hidden; background: var(--cp-sand); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .3)); }
.hero-text { position: absolute; z-index: 1; left: clamp(20px, 5vw, 64px); right: clamp(20px, 5vw, 64px); bottom: clamp(22px, 4.5vw, 48px); display: flex; flex-direction: column; gap: 10px; color: #fff; }
.hero-text .date { font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.hero-text h1 { font-size: clamp(22px, 3.4vw, 34px); line-height: 1.2; letter-spacing: .11em; }
.hero-text p { font-size: 15px; }
.home-body { max-width: 1200px; margin: 0 auto; padding: clamp(24px, 4.5vw, 56px) clamp(16px, 5vw, 64px) clamp(32px, 6vw, 72px); display: flex; flex-direction: column; gap: clamp(24px, 3.4vw, 40px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--color-accent); }
.section-head h2 { font-size: clamp(15px, 1.9vw, 18px); letter-spacing: .11em; }
.section-head .caption { font-size: 12.5px; color: var(--cp-muted); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(12px, 2vw, 20px); }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tiles > li { grid-column: span 2; } .tiles > li:nth-child(-n+2) { grid-column: span 3; } .tiles.n4 > li { grid-column: span 3; } .tiles.n3 > li { grid-column: span 2; } .tiles.n1 > li { grid-column: span 6; } }
/* D-015 item 34 (F1): on a PC the tiles wrap, four to a row at most (five from 1600 px), never squeezed into one row;
   fewer tiles than that keep one row of their own width. */
@media (min-width: 1160px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.n1 { grid-template-columns: minmax(0, 1fr); }
  .tiles > li, .tiles > li:nth-child(-n+2), .tiles.n4 > li, .tiles.n3 > li, .tiles.n1 > li { grid-column: auto; }
}
@media (min-width: 1600px) { .tiles:not(.n1):not(.n2):not(.n3):not(.n4) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { height: 100%; display: flex; flex-direction: column; gap: 18px; padding: 20px 18px; border: 1px solid var(--color-divider); background: var(--color-bg); color: var(--color-text); text-decoration: none; }
.tile:hover { border-color: var(--color-accent); color: var(--color-text); }
.tile-name { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 8px; }
.tile-name .icon:first-child { color: var(--color-accent); }
.tile-name h2 { flex: 1 1 100%; min-width: 0; min-height: 2.8em; display: flex; align-items: flex-start; font-size: 11px; letter-spacing: .08em; line-height: 1.4; }
.tile-count { display: flex; align-items: baseline; gap: 8px; }
.tile-count .n { font-family: var(--font-heading); font-weight: 500; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--color-accent); }
.tile-facts { margin: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--color-divider); font-size: 13.5px; }
.tile-facts div { display: flex; justify-content: space-between; gap: 8px; }
.tile-facts dt { color: var(--cp-muted); white-space: nowrap; overflow-wrap: normal; }
.tile-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tile-facts dd.age { font-weight: 600; }
.tile-facts dd.red { color: var(--cp-error); display: inline-flex; align-items: center; gap: 4px; }

/* --- Buttons (style sheet: primary, secondary, ghost, destructive) ------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid rgba(28, 28, 28, .28); border-radius: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-heading); font-weight: 500; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { border-color: var(--color-accent); background: var(--color-accent-100); color: var(--color-text); }
.btn-primary { min-height: 48px; background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); border-color: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-800); }
/* The dark set has no accent-800: pressed is the lighter accent-700 there, keeping the dark label at 4.5:1. */
[data-theme="dark"] .btn-primary:active { background: var(--color-accent-700); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary:active { background: var(--color-accent-700); } }
.btn-ghost { border-color: transparent; background: none; color: var(--color-accent); }
.btn-danger { border-color: var(--cp-error); color: var(--cp-error); }
.btn-danger:hover { background: var(--cp-error-bg); border-color: var(--cp-error); color: var(--cp-error); }
.btn-ok { border-color: var(--cp-success); color: var(--cp-success); background: var(--color-bg); }
/* « Change agreed price » (owner feedback G5, F29a): the « Accepted with issues » pill's colours (.pill.warn). */
.btn-warn, .btn-warn:hover { border-color: var(--cp-warning-bg); background: var(--cp-warning-bg); color: var(--cp-warning); }
.btn-warn:hover { border-color: var(--cp-warning); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }
/* Owner feedback K10 (next-run 2a): on the public link pages a long button label (the T7 « I confirm the sale — … »)
   wraps inside its tile, between words only (D-012 D9), down to the old phone's 320 px (D-012 R8). */
.public-form .btn-block { white-space: normal; overflow-wrap: break-word; max-width: 100%; height: auto; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn { flex: 1 1 140px; }
[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-ok):not(.btn-ghost):not(.btn-warn) { border-color: rgba(237, 237, 234, .3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.btn-primary):not(.btn-danger):not(.btn-ok):not(.btn-ghost):not(.btn-warn) { border-color: rgba(237, 237, 234, .3); } }

/* --- Status pills and the clock (§3): colour + icon + words ---------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; line-height: 1.3; background: var(--cp-sand); color: var(--color-text); white-space: nowrap; }
.pill.ok { background: var(--cp-success-bg); color: var(--cp-success); }
.pill.warn { background: var(--cp-warning-bg); color: var(--cp-warning); }
.pill.err { background: var(--cp-error-bg); color: var(--cp-error); }
.pill.info { background: var(--cp-link-bg); color: var(--cp-link); }
.pill.clock { font-variant-numeric: tabular-nums; }
.pill.clock.red { background: var(--cp-error); color: #fff; }
[data-theme="dark"] .pill.clock.red { color: #121411; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.clock.red { color: #121411; } }

/* --- Refusal, notices, empty state, toasts (§3) ---------------------------------------------------------------- */
.refusal { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 14px 16px; background: var(--cp-error-bg); border: 1px solid var(--cp-error); color: var(--color-text); }
.refusal .icon { color: var(--cp-error); margin-top: 2px; }
.refusal strong { color: var(--cp-error); }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: var(--color-surface); border-left: 3px solid var(--color-accent); }
.notice.warn { background: var(--cp-warning-bg); border-left-color: var(--cp-warning); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; text-align: center; color: var(--cp-muted); }
.empty .icon { color: var(--color-accent); }
.toasts { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
body.has-tabbar .toasts { bottom: calc(78px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .toasts { left: auto; right: 24px; top: 24px; bottom: auto; width: 420px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 8px 8px 16px; background: var(--color-text); color: var(--color-bg); box-shadow: var(--shadow-lg); }
.toast > span { flex: 1; }
.toast.error { background: var(--cp-error); color: #fff; }
.toast .btn { min-height: 40px; border-color: rgba(255, 255, 255, .45); background: transparent; color: inherit; }
.toast .btn:hover { background: rgba(255, 255, 255, .12); color: inherit; }

/* --- Forms ------------------------------------------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.field > label, .field > .label, legend.label { font-size: 12.5px; color: var(--cp-muted); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date], .field input[type=number], .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid rgba(28, 28, 28, .28); border-radius: 0; background: var(--color-bg); color: var(--color-text); font-size: 16px; }
[data-theme="dark"] .field input, [data-theme="dark"] .field select, [data-theme="dark"] .field textarea, [data-theme="dark"] .input { border-color: rgba(237, 237, 234, .3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field input, :root:not([data-theme="light"]) .field select, :root:not([data-theme="light"]) .field textarea, :root:not([data-theme="light"]) .input { border-color: rgba(237, 237, 234, .3); } }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.field.invalid input, .field.invalid textarea, .field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--cp-error); }
.field .error { display: flex; align-items: center; gap: 6px; color: var(--cp-error); font-size: 12.5px; }
.field .hint { font-size: 12.5px; color: var(--cp-muted); }
fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--color-divider); cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--color-accent); margin: 0; flex: none; }
.choice.is-checked { border-color: var(--color-accent); background: var(--color-accent-100); box-shadow: inset 0 0 0 1px var(--color-accent); }
.choice .t { font-weight: 600; }
.choice .d { display: block; font-size: 12.5px; color: var(--cp-muted); font-weight: 400; }
/* F14: four ways the merchant confirmed (Phone, E-mail, WhatsApp, In person) share the row; a column is wide enough
   for « En personne », so no label breaks inside a word (« E-mail » kept whole). */
.choices.seg { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.choices.seg .t { white-space: nowrap; }

/* --- Item image, card, groups (§3) ----------------------------------------------------------------------------- */
/* F1 (owner feedback 28 Oct): every product photo is a portrait 3:4 frame, the image covering it (the store's
   first photo is always portrait); the frame is sized before the image loads, so nothing shifts. */
.ph { position: relative; flex: none; width: 72px; aspect-ratio: 3 / 4; overflow: hidden; background: var(--cp-sand); display: grid; place-items: center; color: var(--cp-muted); font-size: 11px; line-height: 1.2; text-align: center; padding: 4px; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) { .ph { width: 96px; } }
.card { position: relative; background: var(--color-bg); border: 1px solid var(--color-divider); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.card-main { display: flex; gap: 14px; min-width: 0; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--color-text); text-decoration: none; }
a.card-title:hover { color: var(--color-accent); text-decoration: underline; }
.meta { font-size: 12.5px; color: var(--cp-muted); font-variant-numeric: tabular-nums; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 12px; padding-top: 6px; }
.amount { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount s { font-size: 14px; color: var(--cp-muted); margin-right: 6px; }
.amount-label { font-size: 12.5px; color: var(--cp-muted); }
.card .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.card-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.lock { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--cp-sand); font-size: 13px; }
.group { margin: 0 0 28px; }
.group-head { position: sticky; top: 0; z-index: 5; background: var(--color-bg); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 0 10px; margin-bottom: 14px; border-bottom: 1px solid var(--color-divider); }
@media (max-width: 599.98px) { .group-head { top: 60px; } }
.group-head h2 { font-size: clamp(16px, 1.2vw + 12px, 19px); letter-spacing: .1em; }
.group-head .sub { flex-basis: 100%; order: 3; font-size: 13px; color: var(--cp-muted); }
.group-head .n { font-size: 13px; color: var(--cp-muted); font-variant-numeric: tabular-nums; }
.group.today .group-head h2::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; vertical-align: middle; background: var(--color-accent); border-radius: 50%; }
.loc { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.loc .n { margin-left: auto; font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 12.5px; color: var(--cp-muted); }
.merchant-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.merchant-head .who-m { flex: 1; min-width: 0; }
.merchant-head .who-m strong { display: block; font-size: 16px; font-weight: 400; }
.subtotal { font-size: 18px; font-variant-numeric: tabular-nums; }
details.group > summary { list-style: none; cursor: pointer; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary h2::before { content: "▸ "; }
details.group[open] > summary h2::before { content: "▾ "; }

/* --- Filter bar and tabs (§3, §4.4) ---------------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 20px; }
.filters .search { flex: 1 1 220px; position: relative; }
.filters .search input { width: 100%; min-height: 44px; padding: 0 12px 0 40px; border: 1px solid rgba(28, 28, 28, .28); border-radius: 0; background: var(--color-bg); font-size: 16px; }
.filters .search .icon { position: absolute; left: 12px; top: 12px; color: var(--cp-muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-divider); background: var(--color-bg); color: var(--color-text); font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--color-accent); color: var(--color-text); }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
@media (max-width: 599.98px) { .filters.sticky { position: sticky; top: 60px; z-index: 6; background: var(--color-bg); padding: 8px 0; } }
.tabs { display: flex; gap: 4px; margin: 0 0 20px; overflow-x: auto; border-bottom: 1px solid var(--color-divider); scrollbar-width: thin; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; color: var(--cp-muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--color-text); box-shadow: inset 0 -2px 0 var(--color-text); }
.tabs .n { min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--color-divider); font-size: 11.5px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.tabs a[aria-current="page"] .n { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }

/* --- Tables (PC/tablet) ------------------------------------------------------------------------------------------ */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { position: sticky; top: 0; background: var(--color-bg); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-text); font-family: var(--font-heading); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--cp-muted); }
.table td { padding: 12px; border-bottom: 1px solid var(--color-divider); vertical-align: middle; }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Sheets (§3 "Detail sheet"): opened by URL fragment; phone full-screen or bottom, tablet/PC side panel ------ */
.sheet { display: none; position: fixed; inset: 0; z-index: 50; }
.has-vv .sheet { top: var(--vv-top, 0px); bottom: auto; height: var(--vv-height, 100vh); }
.sheet:target { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet-panel { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--cp-raised); box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet.bottom .sheet-panel { top: auto; max-height: 88vh; max-height: 88dvh; }
@media (min-width: 600px) { .sheet-panel, .sheet.bottom .sheet-panel { left: auto; top: 0; width: min(480px, 100%); max-height: none; } }
.sheet-head { flex: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 60px; padding: 0 8px; border-bottom: 1px solid var(--color-divider); }
.sheet-head h2 { justify-self: center; font-size: 13px; letter-spacing: .12em; line-height: 1.3; text-align: center; max-width: 100%; padding: 6px 0; }
.sheet-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px clamp(16px, 4vw, 28px); }
.sheet-foot { flex: none; padding: 12px clamp(16px, 4vw, 28px) calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--color-divider); background: var(--cp-raised); display: flex; flex-direction: column; gap: 8px; }
/* A sheet's foot as one row: the primary action, then a secondary one beside it (frame s03). */
.sheet-foot.foot-row { flex-direction: row; align-items: stretch; }
/* When the two labels do not fit side by side (« Accepter et collecter » at 320 px), the second goes under the first. */
.sheet-foot.foot-row { flex-wrap: wrap; }
.foot-row > form, .foot-row > .btn-primary { flex: 100 1 auto; display: flex; }
.foot-row > .btn:not(.btn-primary) { flex: 1 0 auto; }
.foot-row .btn { letter-spacing: .1em; padding-left: 14px; padding-right: 14px; }
.planned { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--cp-link); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.facts div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-divider); }
.facts dt { color: var(--cp-muted); font-size: 13px; }
.facts dd { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 12px 0; }
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--cp-sand); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sticky-bar { position: sticky; bottom: 0; z-index: 8; background: var(--color-bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--color-divider); }
body.has-tabbar .sticky-bar { bottom: calc(66px + env(safe-area-inset-bottom)); }

/* --- Merchant shell (§3 "App shell (merchant)") ------------------------------------------------------------------ */
.m-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px clamp(16px, 4.5vw, 56px); background: var(--color-bg); border-bottom: 1px solid var(--color-divider); }
.m-top .brand img { display: block; width: 112px; height: auto; }
.m-top .m-name { flex: 1; min-width: 0; text-align: right; font-size: 13.5px; line-height: 1.3; color: var(--cp-muted); overflow-wrap: anywhere; }
.merchant .content { max-width: 1120px; }

/* The two logo files: dark artwork on light surfaces, light artwork on dark surfaces (tokens --logo-on-*). */
.logo-on-light { display: var(--logo-on-light, block) !important; }
.logo-on-dark { display: var(--logo-on-dark, none) !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .rail, .tabbar, .appbar, .toasts { display: none !important; } }

/* --- Collections (§4.1, §4.2) ---------------------------------------------------------------------------------- */
.merchant-group { margin: 0 0 20px; }
.group-action { margin: 0 0 12px; }
.card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card .btn-row > .btn-block { flex: 1 1 100%; }
.card .btn-row form.btn-block { display: flex; }
.type-b-head { margin: 32px 0 16px; font-size: 18px; letter-spacing: .1em; }
.type-b-head .muted { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 14px; }
.swipe-hint { display: none; }
@media (max-width: 599.98px) { .swipe-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--cp-muted); } }
.ph.large { width: 100%; aspect-ratio: 3 / 4; font-size: 13px; }
.hero-photo { margin: 0 0 16px; }
.detail-title { font-family: var(--font-heading); font-weight: 500; text-transform: uppercase; overflow-wrap: normal; word-break: normal; font-size: 20px; letter-spacing: .08em; line-height: 1.3; margin: 8px 0 2px; }
.detail-fr { font-style: italic; font-size: 17px; color: var(--cp-muted); margin-bottom: 12px; }
.detail-sub { margin: 24px 0 4px; font-size: 12px; letter-spacing: .1em; color: var(--color-accent); }
.detail-merchant { font-size: 17px; font-weight: 600; }
.contact { list-style: none; margin: 0; padding: 0; }
.contact a, .contact .none { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--color-divider); color: inherit; text-decoration: none; }
.contact .none { color: var(--cp-muted); }
.contact .what { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; }
.contact .go { font-size: 13.5px; color: var(--cp-link); white-space: nowrap; }
.round { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--cp-link-bg); color: var(--cp-link); }
.lock .icon { color: var(--cp-muted); margin-top: 2px; }
.lock { align-items: flex-start; }

/* Capture: three outcome cards, French notes, camera tile with thumbnails, sticky Submit. */
.capture { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.item-head { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--color-divider); }
.item-head .ph { width: 72px; }
.item-head .t { font-size: 17px; font-weight: 600; line-height: 1.2; }
.outcomes legend, .capture .field > label.big, .photos-head { font-size: 18px; font-weight: 600; color: var(--color-text); margin-bottom: 10px; padding: 0; }
.outcome { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; margin: 0 0 10px; border: 1px solid var(--color-divider); background: var(--cp-raised); cursor: pointer; }
.outcome:hover { border-color: var(--color-accent); }
.outcome input { width: 22px; height: 22px; margin: 0; flex: none; order: 3; accent-color: var(--fg); }
.outcome .badge-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--fg); color: var(--fg); }
.outcome .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.outcome .t { font-size: 17px; font-weight: 600; }
.outcome .d { font-size: 13px; color: var(--cp-muted); }
.outcome.ok { --fg: var(--cp-success); --bg: var(--cp-success-bg); }
.outcome.warn { --fg: var(--cp-warning); --bg: var(--cp-warning-bg); }
.outcome.err { --fg: var(--cp-error); --bg: var(--cp-error-bg); }
.outcome.is-checked { border: 2px solid var(--fg); background: var(--bg); padding: 11px 15px; }
.outcome.is-checked .badge-icon { background: var(--fg); color: var(--color-bg); }
.outcome.is-checked .t { color: var(--fg); }
.outcome:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.capture .field > label.big .fr { font-weight: 400; font-style: italic; color: var(--cp-muted); }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photo-grid li { position: relative; aspect-ratio: 1; background: var(--cp-sand); }
.photo-grid li img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--color-accent); background: var(--color-accent-100); color: var(--color-accent); font-size: 13.5px; cursor: pointer; text-align: center; }
.camera input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.camera:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.camera.dragging { background: var(--color-accent); color: var(--color-bg); }  /* K12: a drop target */
.thumb-row { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; margin-left: 6px; }  /* K11 */
.piece-thumb { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--color-divider); display: block; }
.remove-photo { position: absolute; top: -3px; right: -3px; width: 44px; height: 44px; display: grid; place-items: start end; padding: 4px; border: 0; background: none; cursor: pointer; }
.remove-photo span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--color-text); color: var(--color-bg); }
.capture progress { width: 100%; accent-color: var(--color-accent); }
.capture .sticky-bar { margin-top: 4px; }
/* A button's label stays on one line, never split inside a word (D-012 D9). */
.btn { text-align: center; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 599.98px) { .btn { letter-spacing: .12em; padding-left: 14px; padding-right: 14px; } }
@media (max-width: 599.98px) { .hide-phone { display: none !important; } }
.phone-tools { display: none; }
.phone-tools-note { display: none; }
@media (max-width: 599.98px) {
  .phone-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
  .phone-tools-note { display: block; margin: -8px 0 16px; }
}
.phone-tools .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }
/* The pilot's TEST DATA pill sits in the top bar of every shell, never over content or controls (owner, 21 Oct). */
.test-pill { display: inline-block; flex: none; padding: 1px 7px; background: #B00020; color: #FFFFFF; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; line-height: 1.4; letter-spacing: .06em; white-space: nowrap; }
.rail > .test-pill { align-self: flex-start; margin: 14px 0 0 28px; }
.appmid { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.appmid .test-pill { font-size: 9.5px; padding: 0 6px; }
.m-top .test-pill { margin-right: auto; }
.login-head .test-pill, .login-brand .test-pill { align-self: center; }
@media (min-width: 600px) and (max-width: 1023.98px) {
  .rail > .test-pill { align-self: center; margin: 0 0 8px; padding: 1px 3px; font-size: 9px; white-space: normal; text-align: center; width: 52px; }
}

/* --- Queues (§4.3-§4.6) ------------------------------------------------------------------------------------------- */
.empty-title { font-size: 16px; letter-spacing: .1em; color: var(--color-text); }
.notes { margin: 0; padding: 10px 14px; border-left: 3px solid var(--color-divider); background: var(--color-surface); font-size: 14px; }
.notes .by { display: block; margin-top: 4px; font-size: 12.5px; color: var(--cp-muted); }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.lightbox-in { position: absolute; inset: 0; display: grid; place-items: center; padding: 56px 12px 12px; pointer-events: none; }
.lightbox-in img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: auto; }
.lightbox-in .icon-btn { position: absolute; top: 8px; right: 8px; color: #fff; pointer-events: auto; }
.total { display: flex; flex-direction: column; align-items: flex-end; }
.total .amount { font-size: 26px; }
.sub-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-divider); }
/* Approve for Payment with Set back under it on phone, beside it on PC (frame s07). */
.card-actions { display: flex; flex-direction: column; gap: 8px; }
.card-actions > form { display: flex; }
@media (min-width: 600px) and (max-width: 1023.98px) { .card-actions { flex-direction: row-reverse; } .card-actions > * { flex: 1 1 0; } }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form .field { flex: 1 1 200px; margin: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--color-accent); margin: 0; }
.group-title { font-size: clamp(15px, 1vw + 12px, 17px); letter-spacing: .1em; }
/* The item list (§3): a table on a wide PC, one card per row below 1280 px (beside the rail a 1024 px PC leaves
   ~700 px, too narrow for the French columns, D-012 D2), from the same markup. */
/* D-015 item 36 (F7, F8): the cell itself stays a table cell, so every cell of a row shares its baseline; the image
   and text are laid out by the wrapper inside it. */
.rtable td.item { vertical-align: middle; }
.rtable .item-in { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.rtable .item-in > span { display: flex; flex-direction: column; min-width: 0; }
.rtable .item-in .ph { width: 56px; }
.rtable td.act { text-align: right; white-space: nowrap; }
@media (max-width: 1279.98px) {
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rtable tr { border: 1px solid var(--color-divider); padding: 12px; margin: 0 0 12px; }
  .rtable td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: left; }
  .rtable td.r { text-align: right; }
  .rtable td[data-label]::before { content: attr(data-label); color: var(--cp-muted); font-size: 13px; }
  .rtable td.item { min-width: 0; padding-bottom: 8px; }
  .rtable .item-in { min-width: 0; }  /* the card's item never sets a width of its own (UXL §8: no sideways scroll) */
  .rtable td.item .ph { width: 72px; }
  .rtable td.act { padding-top: 10px; }
  .rtable td.act .btn { width: 100%; }
}
/* Tables never break a word in two; short columns stay on one line (§3 "Item list"). */
.table th, .table td { overflow-wrap: normal; word-break: normal; }
.table th, .rtable td[data-label], .rtable td.act { white-space: nowrap; }
.rtable td.item { white-space: normal; }
.rtable td.act .btn { white-space: nowrap; }
/* A table's row action on a PC may take two lines, wrapping between words, never inside one (D-012 D9). */
.rtable td.act .btn { white-space: normal; max-width: 15em; }
/* A long sentence in a table cell (the pilot table's « Reason at drain », F29a) wraps between words, so the row action
   added beside it (« Simulate this sale », G1) never pushes the table sideways on a PC. */
.rtable td.wrap { white-space: normal; min-width: 10em; }
.total { align-items: flex-start; }
@media (min-width: 600px) { .total { align-items: flex-end; } }
@media (max-width: 1279.98px) { .rtable td[data-label] { white-space: normal; } }

/* --- Merchant portal (§4.7) ----------------------------------------------------------------------------------------- */
.merchant .content { padding-top: clamp(22px, 5vw, 60px); }
.m-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 32px; padding-bottom: clamp(22px, 3vw, 32px); margin-bottom: clamp(22px, 3vw, 32px); border-bottom: 1px solid var(--color-divider); }
.m-intro { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.m-intro h1 { font-size: clamp(19px, 4vw, 30px); letter-spacing: .1em; line-height: 1.3; }
.m-intro .muted { font-size: 16px; max-width: 48ch; }
.m-last { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 16px; font-variant-numeric: tabular-nums; }
.confirm-btn { min-height: 60px; padding: 0 30px; font-size: 12px; }
.m-count { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.m-count h2 { font-size: 15px; letter-spacing: .1em; }
.m-grid { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2.6vw, 28px); }
@media (min-width: 600px) { .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .m-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.m-card { display: flex; flex-direction: column; gap: 10px; }
/* F3 (owner feedback 28 Oct): the title block is three lines tall on every tile, the title cut after its third
   line, so the price and the button sit at the same height across a row of tiles. */
.m-title { font-weight: 600; font-size: 18px; line-height: 1.2; height: calc(3 * 1.2em); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; word-break: break-word; overflow-wrap: anywhere; }
.m-card .btn-block { margin-top: auto; }
/* F2 (owner feedback 28 Oct): a tap on a product photo of the merchant list opens the full image. */
button.ph { border: 0; font: inherit; color: inherit; margin: 0; }
.m-card .ph.zoomable { cursor: zoom-in; }
.m-card .ph.zoomable:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.lightbox { position: fixed; inset: 0; z-index: 60; display: none; background: rgba(20, 24, 18, .94); }
.lightbox[open] { display: block; }
.lightbox .lightbox-scroll { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pinch-zoom pan-x pan-y; display: grid; place-items: center; padding: 16px; }
.lightbox img { display: block; max-width: 100%; max-height: 96vh; max-height: 96dvh; width: auto; height: auto; object-fit: contain; }
.lightbox .lightbox-close { position: fixed; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); z-index: 61; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .92); color: #1f261b; cursor: pointer; }
.lightbox .lightbox-caption { position: fixed; left: 16px; right: 72px; top: max(8px, env(safe-area-inset-top)); color: #fff; font-size: 14px; line-height: 1.3; min-height: 48px; display: flex; align-items: center; }
body.lightbox-open { overflow: hidden; }
.m-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.m-help { font-size: 14.5px; }
.confirm-sheet .sheet-body { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.confirm-sheet h2 { font-size: 17px; letter-spacing: .1em; line-height: 1.3; }
.confirm-actions { flex-direction: row; gap: 10px; }
.confirm-actions > * { flex: 1; min-height: 56px; }
@media (min-width: 600px) { .sheet.bottom .sheet-panel.confirm-sheet { inset: auto; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); height: auto; max-height: none; } }
@media (max-width: 599.98px) {
  .has-confirm-bar .confirm-bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--color-bg); border-top: 1px solid var(--color-divider); }
  .has-confirm-bar .confirm-btn { width: 100%; }
  body.has-confirm-bar { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  /* F6: with the merchant tab bar under it, « Ma liste est à jour » sits just above the tabs. */
  .has-confirm-bar.has-tabbar .confirm-bar { bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.has-confirm-bar.has-tabbar { padding-bottom: calc(158px + env(safe-area-inset-bottom)); }
  body.has-confirm-bar.has-tabbar .toasts { bottom: calc(170px + env(safe-area-inset-bottom)); }
}
.confirm-page { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.confirm-page h1 { font-size: 18px; letter-spacing: .1em; }
.confirm-page .confirm-actions { display: flex; }

/* Login: phone, the landscape header then the form; tablet and PC, a white card over the landscape. */
.login-page { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.login-scene { position: relative; height: 300px; overflow: hidden; background: var(--cp-sand); }
.login-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25)); }
.login-head { position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #fff; }
.login-head img { width: 200px; height: auto; }
.login-head .caps { letter-spacing: .24em; }
.login-card { flex: 1; padding: 28px 22px 32px; background: var(--color-bg); }
.login-brand { display: none; }
.login-form { display: flex; flex-direction: column; gap: 20px; max-width: 460px; margin: 0 auto; }
.login-form h1 { font-size: 20px; letter-spacing: .12em; }
.login-form .muted { font-size: 15.5px; margin-top: 6px; }
.login-form .field { margin: 0; }
.login-form .field > label { font-size: 14.5px; color: var(--color-text); }
.login-form input { min-height: 52px; font-size: 17px; }
.pw { position: relative; }
.pw input { padding-right: 112px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; height: 44px; padding: 0 12px; border: 0; background: none; color: var(--cp-link); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.login-submit { min-height: 54px; font-size: 13px; margin-top: 4px; }
.forgot { align-self: center; text-align: center; }
.forgot summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--cp-link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; list-style: none; font-size: 15px; }
.forgot summary::-webkit-details-marker { display: none; }
.forgot p { font-size: 14.5px; }
.help-line { padding-top: 16px; border-top: 1px solid var(--color-divider); text-align: center; font-size: 14px; color: var(--cp-muted); line-height: 1.5; }
@media (min-width: 600px) {
  .login-page { display: grid; place-items: center; padding: 40px 24px; }
  .login-scene { position: fixed; inset: 0; height: auto; }
  .login-scene::after { background: rgba(0, 0, 0, .32); }
  .login-head { display: none; }
  .login-card { position: relative; z-index: 1; flex: none; width: min(460px, 100%); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-lg); }
  .login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--color-divider); }
  .login-brand img { width: 180px; height: auto; }
  .login-brand .caps { font-size: 10.5px; letter-spacing: .24em; color: var(--color-accent); }
}
.m-meta .ref { white-space: nowrap; }

/* --- The FR | EN switch (D-009): two square buttons, the current language filled; each is a 44 px target. ------ */
.lang-switch { display: inline-flex; flex: none; margin: 0; }
.lang-switch button { min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--color-divider); background: var(--color-bg); color: var(--color-text); font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: .12em; cursor: pointer; }
.lang-switch button + button { border-left: 0; }
.lang-switch button[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.lang-switch button:focus-visible { outline-offset: -2px; }
.lang-switch.in-menu { padding: 4px 16px 8px; }
.lang-switch.in-rail { margin-left: auto; }
.lang-switch.on-login { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
.rail-foot { flex-wrap: wrap; }
.rail-foot .lang-switch.in-rail { order: 9; flex-basis: 100%; justify-content: flex-start; margin: 8px 0 0; }
@media (min-width: 600px) and (max-width: 1023.98px) {
  .rail-foot .lang-switch.in-rail { flex-direction: column; flex-basis: auto; margin: 4px 0 0; }
  .rail-foot .lang-switch.in-rail button + button { border-left: 1px solid var(--color-divider); border-top: 0; }
}
.m-top .lang-switch button { min-width: 40px; }
@media (max-width: 599.98px) { .lang-switch.in-rail { display: none; } }
.en-tag { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px solid var(--color-divider); font-family: var(--font-heading); font-size: 9.5px; font-weight: 500; letter-spacing: .1em; line-height: 1.5; color: var(--cp-muted); text-decoration: none; vertical-align: middle; }
/* French labels are longer (D-009): table headings and a card's pills wrap between words rather than push the
   page sideways at 320 px or past the PC column. */
.table th { white-space: normal; }
.card .pill { white-space: normal; }
@media (min-width: 1280px) { .rtable .item-in { min-width: 220px; } }
/* A tile's facts wrap between words, never inside one (« Responsable fournisseurs »). */
.tile-facts div { flex-wrap: wrap; }
.tile-facts dd { overflow-wrap: normal; word-break: normal; hyphens: manual; margin-left: auto; }
/* The merchant top bar with the FR | EN switch (D-009): on phone the logo, the switch and logout on the first row,
   the TEST DATA pill and the merchant's name on the second, so the name is never squeezed into a column. */
.m-top { flex-wrap: wrap; row-gap: 4px; }
.m-top .lang-switch { margin-left: auto; }
.m-top .m-name { min-width: 8em; }
@media (max-width: 599.98px) {
  .m-top .test-pill { order: 8; margin-right: 0; }
  .m-top .m-name { order: 9; flex: 1 1 auto; }
  .m-top .m-name:empty { display: none; }
}

/* --- Swipe (§1.7): the page scrolls up and down under a card; sideways is the card's gesture (D-012 D5). --------- */
[data-swipe-left], [data-swipe-right] { touch-action: pan-y; }

/* --- PC rows (D-012 D3; frames s07, s08): on a PC each payable is one full-width row, the image, the title and its
   facts, then the amount and the actions on the right. Same markup as the phone's cards, laid out by grid; phone and
   tablet unchanged. -------------------------------------------------------------------------------------------- */
.resolve-panel { display: none; }
@media (min-width: 1024px) {
  .card-grid.rows { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .card-grid.rows > .card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: repeat(5, auto); column-gap: 20px; row-gap: 0; align-items: center; padding: 16px 0; border: 0; border-bottom: 1px solid var(--color-divider); }
  .card-grid.rows > .card > .card-main, .card-grid.rows > .card .card-body { display: contents; }
  .card-grid.rows > .card .ph { grid-column: 1; grid-row: 1 / 6; align-self: start; width: 76px; }
  .card-grid.rows > .card .card-body > * { grid-column: 2; justify-self: start; }
  .card-grid.rows > .card .card-foot { grid-column: 3; grid-row: 1 / 6; justify-self: end; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 2px; margin: 0; padding: 0; text-align: right; }
  .card-grid.rows > .card > .card-actions, .card-grid.rows > .card > .inline-form, .card-grid.rows > .card > .btn, .card-grid.rows > .card > .btn-row { grid-column: 4; grid-row: 1 / 6; }
  /* Collections on PC (D-015 item 35, F4): one row per piece, the tick and image first, the actions on the right. */
  .card-grid.rows > .card > .btn-row { flex-wrap: wrap; justify-content: flex-end; max-width: 340px; }  /* wraps in French at 1024 px */
  .card-grid.rows > .card > .btn-row > .btn, .card-grid.rows > .card > .btn-row > form { flex: none; width: auto; }
  .card-grid.rows > .card .tick { grid-column: 1; grid-row: 1 / 6; align-self: center; }
  .card-grid.rows.ticks > .card { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
  .card-grid.rows.ticks > .card .ph { grid-column: 2; }
  .card-grid.rows.ticks > .card .card-body > * { grid-column: 3; }
  .card-grid.rows.ticks > .card .card-foot { grid-column: 4; }
  .card-grid.rows.ticks > .card > .btn-row, .card-grid.rows.ticks > .card > .lock, .card-grid.rows.ticks > .card > .card-actions, .card-grid.rows.ticks > .card > .inline-form, .card-grid.rows.ticks > .card > .btn { grid-column: 5; }
  .card-grid.rows.ticks > .card > .gallery, .card-grid.rows.ticks > .card > .notice, .card-grid.rows.ticks > .card > .row-actions { grid-column: 3 / -1; }
  /* F29a (G6): Approvals has three actions; in French at 1024 px they wrap, Approve for payment staying first. */
  .card-grid.rows > .card > .card-actions { flex-direction: row-reverse; flex-wrap: wrap; align-items: center; max-width: 360px; }
  .card-grid.rows > .card > .card-actions > form { flex: none; }
  .card-grid.rows > .card > .card-actions .btn { width: auto; }
  .card-grid.rows > .card > .gallery, .card-grid.rows > .card > .notice, .card-grid.rows > .card > .lock { grid-column: 2 / -1; margin-top: 10px; }
  .card-grid.rows > .card > .gallery { grid-template-columns: repeat(auto-fill, 72px); }
  .card-grid.rows > .card > .inline-form { flex-wrap: nowrap; align-items: flex-end; }
  .card-grid.rows > .card > .inline-form .field { flex: 0 0 220px; }

  /* The Payment Queue's merchant header carries Copy total and Mark all as paid (frame s08). */
  .pay-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
  .pay-group > * { grid-column: 1 / -1; }
  .pay-group > .group-head { grid-column: 1; grid-row: 1; }
  .pay-group > .group-action { grid-column: 2; grid-row: 1; align-self: stretch; align-items: flex-end; flex-wrap: nowrap; margin: 0 0 14px; padding: 8px 0 10px; border-bottom: 1px solid var(--color-divider); }

  /* Condition issues (frame s05): large photos, and the Resolve panel beside them instead of a sheet. */
  .ci-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ci-item { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); border: 1px solid var(--color-divider); }
  .ci-item > .card { border: 0; padding: 16px; }
  .ci-item .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ci-item .gallery a:first-child { grid-column: span 2; grid-row: span 2; }
  .ci-item .resolve-open { display: none; }
  .resolve-panel { display: flex; flex-direction: column; padding: 16px 0 0; border-left: 1px solid var(--color-divider); background: var(--cp-raised); }
  .resolve-panel h3 { padding: 0 clamp(16px, 2vw, 24px); font-size: 14px; letter-spacing: .1em; }
  .resolve-panel .sheet-body { padding-top: 12px; overflow: visible; }
  .resolve-panel .sheet-foot { border-top: 0; padding-bottom: 16px; }
  .resolve-sheet { display: none !important; }
}
/* G6 (F29a): from 1280 px Approve for payment and Set back stand side by side as before, and « Change agreed price »
   wraps onto the line below, right-aligned; three in one row squeezed the title (ui sweep, PR #103). Below 1280 px the
   360 px row above wraps as French needs at 1024 px. After the 1024 px block, so it wins there. */
@media (min-width: 1280px) { .card-grid.rows > .card > .card-actions { max-width: 400px; } }
.has-vv .sheet.bottom .sheet-panel { max-height: 88%; }

/* The item detail's photo strip (frame s03; D-012 D11): four to a row under the large photo; the one shown is outlined. */
.photo-strip { list-style: none; margin: -8px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-strip a { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--cp-sand); border: 2px solid transparent; }
.photo-strip a[aria-current="true"] { border-color: var(--color-text); }
.photo-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-settings { margin: 0; } .home-settings .link-btn svg { flex: none; }

/* Slice S8: a payable's exits, opened in place (Set agreed price, Cancel payable). */
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inline-action > summary { list-style: none; cursor: pointer; }
.inline-action > summary::-webkit-details-marker { display: none; }
.inline-action[open] > form { display: grid; gap: 8px; margin-top: 8px; width: 100%; }

/* --- Bulk actions (D-015 item 35): tick pieces, « Select all of this merchant », then one action. ----------------- */
.merchant-group .card-grid.rows { grid-template-columns: minmax(0, 1fr); }  /* Collections: one column (P-095) */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.bulk-bar .bulk-n:empty { display: none; }
.bulk-bar .btn { white-space: normal; text-align: left; }
.tick { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; flex: none; cursor: pointer; }
.tick input { width: 22px; height: 22px; margin: 0; accent-color: var(--color-accent); }

/* Shipment Pipeline (RRV v1.6 §5.1; slice S15): one column per state; the columns stack on a phone. */
.section-title { font-size: 15px; letter-spacing: .08em; margin: 24px 0 12px; }
.board { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .board { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (min-width: 600px) and (max-width: 1023.98px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.board-col { min-width: 0; background: var(--cp-sand); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.board-head { font-size: 13px; line-height: 1.3; display: flex; justify-content: space-between; gap: 6px; }
.board-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-cards .card { gap: 4px; }
.board-cards .pill { white-space: normal; }
/* D-018 G11 (F29c): a tile's orders, each with « complete » or « partial »; wraps at 320 px, never scrolls sideways. */
.tile-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tile-orders li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.tile-order { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
/* D-018 G15–G17 (F29c): the per-package capture on the packing page reuses the collection capture's outcome cards. */
.package-capture-form { display: flex; flex-direction: column; gap: 8px; }
.shipment-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 0 0 16px; }
.shipment-facts dt { color: var(--cp-muted); font-size: 12.5px; }
.shipment-facts dd { margin: 0; font-weight: 600; }
/* --- Slice S14: the Purchase Invoice Worklist's form foot; the merchant pages' home tiles and reports. ------------ */
.invoice-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 12px 0 4px; }
.invoice-foot .field { flex: 1 1 200px; min-width: 0; margin: 0; }
.invoice-foot input[type="file"] { width: 100%; max-width: 100%; min-width: 0; }
.invoice-form { min-width: 0; max-width: 100%; }
.invoice-foot .meta { flex-basis: 100%; margin: 0; }
/* The merchant home's tiles: as many columns as fit, never wider than the page (no sideways scroll at any width). */
.tiles.m-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tiles.m-tiles > li, .tiles.m-tiles > li:nth-child(-n+2) { grid-column: auto; min-width: 0; }
.m-tiles .tile h2 { overflow-wrap: anywhere; }
.forgot > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cp-link); text-underline-offset: 2px; font-size: 15px; }
.m-tiles { margin-bottom: 24px; }
.m-back { margin: 0 0 8px; }

/* Slice S20 — the Condition Report compose view (RRV §5.5) and the client's agreement page (Arch §8). */
.notice.ok { background: var(--cp-success-bg, var(--color-surface)); border-left-color: var(--cp-success, var(--color-accent)); }
.photo-select li { aspect-ratio: auto; background: none; }
.photo-select label { display: block; position: relative; aspect-ratio: 1; background: var(--cp-sand); cursor: pointer; }
.photo-select label img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-select label input { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; margin: 0; }
.photo-select label input:checked + img { outline: 3px solid var(--color-accent); outline-offset: -3px; }
.photo-select input[type="text"] { width: 100%; margin-top: 4px; font-size: 12px; padding: 4px 6px; }
.pool legend { font-weight: 600; margin-bottom: 8px; }
.login-card.wide { width: min(920px, 100%); }
.document-frame { margin: 16px 0; border: 1px solid var(--color-border, #cdd3cc); background: #fff; }
.document-frame iframe { display: block; width: 100%; height: min(70vh, 900px); border: 0; }
.field.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
/* Slice S22: the T3–T5 photo page (P-285): one column on a phone, two from a tablet; each photo whole, never cropped. */
.photo-page { max-width: 920px; margin: 0 auto; padding: 16px; }
.photo-page .photo-list { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.photo-page figure { margin: 0; }
.photo-page img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: var(--cp-sand); }
.photo-page figcaption { margin-top: 6px; font-size: .875rem; color: var(--cp-muted); }
@media (min-width: 720px) { .photo-page .photo-list { grid-template-columns: 1fr 1fr; } }
/* Slice S25: the Director's four tiles (an amount may be long: it wraps, never scrolls), the Tasks queue's Resolve, and
   the oversight page's short lists. */
.stat-tiles { margin-bottom: 8px; }
.stat-tiles .tile-name h3 { flex: 1 1 auto; min-width: 0; font-size: 11px; letter-spacing: .08em; line-height: 1.4; }
.stat-tiles .tile-count { flex-wrap: wrap; }
.stat-tiles .tile-count .n { font-size: clamp(28px, 4vw, 36px); overflow-wrap: anywhere; }
.stat-tiles .meta { margin: 0; }
.resolve-here { margin-top: 8px; }
.resolve-here form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; min-width: 0; }
.resolve-here textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
.task-detail { white-space: pre-line; overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* S25 tables: their text cells wrap at every width (notes, what a row is about, how a task closes), each cell's
   content is one block beside its label on a phone, and a filter's list never sets the bar's width. */
.s25-table td[data-label], .s25-table td.act, .s25-table td.act .meta { white-space: normal; }
.s25-table .about-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; overflow-wrap: anywhere; }
.s25-table .about-in .pill { white-space: normal; }
.s25-table td[data-notes] { min-width: 14em; }
.s25-table td.act { min-width: 12em; max-width: 22em; }
.filters select.chip { max-width: 100%; min-width: 0; }
.s25-table td > .about-in { flex: 0 1 auto; }

/* Slice F29b — the customs worklist (D-018 G19): a long French label (« Confirmer les données douanières ») wraps
   inside its button at 320 px instead of pushing the card sideways. */
[data-worklist] .btn-row > .btn { white-space: normal; min-width: 0; }
