/* ==========================================================================
   BoatPortal MOBILE components — the `bpm-` library (Mobile M0).
   --------------------------------------------------------------------------
   Built only on static/app/mobile/tokens.css (which is built only on
   static/app/tokens.css). No raw colour. Every class is `bpm-` prefixed.
   The contract — markup, variants, JS — is docs/mobile/components.md.

   Sections
     1  document + app frame (stacks, screens, content)
     2  press states (iOS highlight / Android ripple)
     3  app bar (small, large + collapse, search variant, back)
     4  tab bar
     5  type helpers, section header, visually-hidden
     6  lists + cells
     7  cards, key-value rows, money rows, timeline, photo tiles
     8  status badge
     9  buttons, icon buttons, text links
    10  segmented control, chips, search field
    11  form fields, help, switch, stepper
    12  sheets, action sheets, dialogs
    13  snackbar, loading overlay, pull-to-refresh
    14  empty state, full-screen states, skeleton, offline banner
    15  bottom action bar
    16  sign-in layout
   ========================================================================== */

/* 1 ─ document + app frame ─────────────────────────────────────────────── */

html.bpm { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.bpm-ios, html.bpm-android { font-family: var(--bpm-font); }

.bpm-body {
  margin: 0;
  height: 100%;
  overflow: hidden;               /* the app scrolls inside .bpm-content */
  overscroll-behavior: none;
  background: var(--bpm-bg);
  color: var(--bpm-ink);
  font-family: var(--bpm-font);
  font-size: var(--bpm-type-body);
  line-height: var(--bpm-lh);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.bpm-body *, .bpm-body *::before, .bpm-body *::after { box-sizing: border-box; }
/* `hidden` must win over every component's own `display` (a hidden loader
   with `display: grid` still covers the screen and swallows every tap). */
.bpm-body [hidden] { display: none !important; }
.bpm-body :focus-visible { outline: 2px solid var(--bpm-focus); outline-offset: 2px; }
.bpm-body img, .bpm-body svg { max-width: 100%; }
.bpm-body h1, .bpm-body h2, .bpm-body h3, .bpm-body p { margin: 0; }

.bpm-app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: clip;
}
.bpm-stacks { position: relative; flex: 1 1 auto; min-height: 0; overflow: clip; }
.bpm-stack { position: absolute; inset: 0; }
.bpm-stack.is-inactive { visibility: hidden; }

.bpm-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bpm-bg);
  overflow: clip;
}
.bpm-screen.is-covered { visibility: hidden; }
.bpm-ios .bpm-screen.is-moving { box-shadow: var(--bpm-elev-3); }
.bpm-screen--dark { background: var(--bpm-device); color: var(--bpm-device-ink); }

.bpm-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 calc(var(--bpm-gutter) + var(--bpm-safe-right)) var(--bpm-space-6)
           calc(var(--bpm-gutter) + var(--bpm-safe-left));
}
/* No tab bar under the screen: the content owns the bottom inset. */
.bpm-app--bare .bpm-content,
/* A BAND UNDER THE BAR IS A SURFACE, NOT A RULE. Owner, 2026-11-13:
   *"needs to be spacing between the clocked in bar and the main frame /
   current job."* With no band the content starts under the app bar's own
   stripe and the first card can sit against it, which reads as one piece;
   with a band in between, a card touching it reads as part of the band. So
   a screen that HAS one opens its content a gap lower. */
.bpm-screen:has(> .bpm-understrip) > .bpm-content { padding-top: var(--bpm-space-4); }

.bpm-app.is-tabbar-hidden .bpm-content {
  padding-bottom: calc(var(--bpm-safe-bottom) + var(--bpm-space-6));
}
.bpm-content > * + * { margin-top: var(--bpm-space-4); }
.bpm-content > .bpm-largetitle + * { margin-top: var(--bpm-space-2); }
.bpm-content > .bpm-ptr + * { margin-top: 0; }
/* A small bar: breathing room under it. No bar at all (sign-in): the content
   owns the top inset, or it runs under the Dynamic Island / status bar. */
.bpm-appbar:not(.bpm-appbar--large) + .bpm-content { padding-top: var(--bpm-space-4); }
.bpm-screen > .bpm-content:first-child { padding-top: var(--bpm-safe-top); }

.bpm-only-ios, .bpm-only-android { display: none !important; }
.bpm-ios .bpm-only-ios, .bpm-android .bpm-only-android { display: revert !important; }
.bpm-ios svg.bpm-only-ios, .bpm-android svg.bpm-only-android { display: inline-block !important; }

/* `.bp-i` is the class tools/gen_icons.py puts on every glyph. */
.bp-i { flex: none; display: inline-block; vertical-align: middle; }

/* 2 ─ press states ─────────────────────────────────────────────────────── */
/* One selector list, so a new pressable only has to be added here.
   iOS (HIG): a highlight — the row greys, a filled button dims.
   Android (M3): a state layer plus a CSS-only ripple from the centre. */

.bpm-press, .bpm-btn, .bpm-iconbtn, .bpm-cell--link, .bpm-tab, .bpm-chip,
.bpm-seg__btn, .bpm-actions__item, .bpm-actions__cancel, .bpm-stepper__btn,
.bpm-dialog__btn, .bpm-back, .bpm-textlink, .bpm-photo, .bpm-help {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bpm-ios .bpm-cell--link:active, .bpm-ios .bpm-actions__item:active,
.bpm-ios .bpm-actions__cancel:active, .bpm-ios .bpm-dialog__btn:active {
  background-color: var(--bpm-press-strong);
}
.bpm-ios .bpm-btn:active, .bpm-ios .bpm-iconbtn:active, .bpm-ios .bpm-back:active,
.bpm-ios .bpm-textlink:active, .bpm-ios .bpm-tab:active, .bpm-ios .bpm-chip:active,
.bpm-ios .bpm-stepper__btn:active, .bpm-ios .bpm-photo:active, .bpm-ios .bpm-help:active {
  opacity: 0.55;
  transition: opacity 0ms;
}
.bpm-ios .bpm-btn, .bpm-ios .bpm-iconbtn, .bpm-ios .bpm-back, .bpm-ios .bpm-textlink,
.bpm-ios .bpm-tab, .bpm-ios .bpm-chip, .bpm-ios .bpm-stepper__btn {
  transition: opacity var(--bpm-dur-press) var(--bpm-ease-standard);
}

.bpm-android :is(.bpm-btn, .bpm-iconbtn, .bpm-cell--link, .bpm-chip, .bpm-seg__btn,
  .bpm-actions__item, .bpm-stepper__btn, .bpm-dialog__btn, .bpm-back, .bpm-textlink,
  .bpm-photo) { overflow: hidden; }
.bpm-android :is(.bpm-btn, .bpm-iconbtn, .bpm-cell--link, .bpm-chip, .bpm-seg__btn,
  .bpm-actions__item, .bpm-stepper__btn, .bpm-dialog__btn, .bpm-back, .bpm-textlink,
  .bpm-photo, .bpm-tab__icon)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(circle, currentColor 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 1000% 1000%;
  opacity: 0;
  transition: background-size 500ms var(--bpm-ease-standard), opacity 700ms var(--bpm-ease-standard);
}
.bpm-android :is(.bpm-btn, .bpm-iconbtn, .bpm-cell--link, .bpm-chip, .bpm-seg__btn,
  .bpm-actions__item, .bpm-stepper__btn, .bpm-dialog__btn, .bpm-back, .bpm-textlink,
  .bpm-photo):active::after,
.bpm-android .bpm-tab:active .bpm-tab__icon::after {
  background-size: 0% 0%;
  opacity: 0.14;
  transition: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .bpm-android :is(.bpm-btn, .bpm-iconbtn, .bpm-cell--link, .bpm-chip, .bpm-seg__btn,
    .bpm-actions__item, .bpm-stepper__btn, .bpm-dialog__btn, .bpm-back, .bpm-textlink,
    .bpm-photo, .bpm-tab__icon)::after {
    background-image: none;
    background-color: currentColor;
    transition: none;
  }
  .bpm-android :is(.bpm-btn, .bpm-iconbtn, .bpm-cell--link, .bpm-chip, .bpm-seg__btn,
    .bpm-actions__item, .bpm-stepper__btn, .bpm-dialog__btn, .bpm-back, .bpm-textlink,
    .bpm-photo):active::after { opacity: 0.1; }
}

/* 3 ─ app bar ──────────────────────────────────────────────────────────── */

/* THE STRIPE. The bar wears the owner's four-band navy->teal top bar, and its
   padding carries it up THROUGH the status-bar safe area, so the bands run to
   the top of the phone instead of stopping under the notch. Everything drawn
   on it is white (--bpm-bar-ink); everything below it is dark ink on the
   canvas grey. That is the one rule to keep when adding to this section. */
.bpm-appbar {
  position: relative;
  z-index: var(--bpm-z-bar);
  flex: none;
  padding: var(--bpm-safe-top) var(--bpm-safe-right) 0 var(--bpm-safe-left);
  background: var(--bpm-bar-bg);
  color: var(--bpm-bar-ink);
  transition: box-shadow var(--bp-dur) var(--bpm-ease-standard);
}
.bpm-appbar .bpm-iconbtn, .bpm-appbar .bpm-back { color: var(--bpm-bar-ink); }
.bpm-appbar .bpm-iconbtn .bp-i { width: var(--bpm-glyph-bar); height: var(--bpm-glyph-bar); }
.bpm-appbar__row {
  display: grid;
  align-items: center;
  min-height: var(--bpm-appbar-h);
  padding: 0 var(--bpm-space-1);
  column-gap: var(--bpm-space-1);
}
.bpm-appbar__lead, .bpm-appbar__trail {
  display: flex;
  align-items: center;
  gap: var(--bpm-target-gap);
  min-width: 0;
}
.bpm-appbar__trail { justify-content: flex-end; gap: 0; }
/* THE TITLE IS THE SCREEN'S NAME. Owner, 2026-11-11: *"title needs to be
   bigger."* Five tab roots put their name here in white — Parts, Inbox, More,
   Home's yard name and every back-navigable screen — and at Headline (18px)
   the name was the same size as the body text under it, which made it read as
   a label rather than a title. Title (22px on both platforms) is the next step
   up the owner's own scale. It still ellipsises inside its grid track, so a
   long yard name cannot push the page sideways. */
.bpm-appbar__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--bpm-type-title);
  font-weight: var(--bpm-fw-title);
  color: var(--bpm-bar-ink);
}

/* The BRAND variant: the yard's mark and name, left-aligned, always visible.
   Customer Home uses it so the first thing after sign-in is the yard, on the
   stripe. The mark inverts (white disc, navy initials) because the owner's
   navy mark would disappear into the navy bands. */
.bpm-appbar--brand .bpm-appbar__row { grid-template-columns: auto minmax(0, 1fr) auto; }
.bpm-appbar--brand .bpm-appbar__lead { padding-left: var(--bpm-space-2); }
.bpm-ios .bpm-appbar--brand .bpm-appbar__title { text-align: left; max-width: none; padding-left: var(--bpm-space-3); }
/* A brand bar's title is a NAME and can be any length, and Wave CR2 put a
   shift pill in the trail beside it. Without this the two overlapped —
   the yard's name ran under the pill and the pill wrapped to two lines. */
.bpm-appbar--brand .bpm-appbar__title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bpm-appbar .bpm-yardmark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--bpm-on-primary);
  color: var(--bpm-primary-ink);
}

/* iOS: centred title between equal-width sides. */
.bpm-ios .bpm-appbar__row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.bpm-ios .bpm-appbar__title { text-align: center; max-width: 56vw; }
/* ...but a BRAND bar on iOS is left-aligned and had its cap removed, and
   `.bpm-ios .bpm-appbar__row` above resets the title column to `auto`.
   That was harmless while every brand bar had an EMPTY trail. Wave CR2
   put a shift pill there and the yard's name ran straight under it. The
   brand template is restated here, at the specificity that wins, so the
   name ellipsises in its track instead of over its neighbour. */
.bpm-ios .bpm-appbar--brand .bpm-appbar__row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.bpm-appbar { box-shadow: inset 0 -1px 0 var(--bpm-tabbar-edge); }
.bpm-appbar--large .bpm-appbar__title { opacity: 0; transition: opacity var(--bp-dur) var(--bpm-ease-standard); }
.bpm-appbar--large.is-collapsed .bpm-appbar__title { opacity: 1; }

/* Android: left-aligned title after the navigation icon; the bar lifts once
   the content scrolls under it (M3 "on scroll"). The stripe stays. */
.bpm-android .bpm-appbar__row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 var(--bpm-space-1); }
/* (the size and weight are the base rule's now — both platforms are Title) */
.bpm-android .bpm-appbar__title { padding-left: var(--bpm-space-3); }
.bpm-android .bpm-appbar__lead:empty + .bpm-appbar__title { padding-left: var(--bpm-space-3); }
.bpm-appbar.is-scrolled { box-shadow: var(--bpm-elev-2); }

.bpm-largetitle {
  display: flex;
  align-items: center;
  gap: var(--bpm-space-3);
  /* Owner, 2026-11-19: *"more space between title and top bar"*. Was
     `space-1`, which put the heading almost against the stripe above it.
     GLOBAL on purpose: every large title in the app wears this, so scoping
     the change to one screen would leave the first-run steps sitting
     differently from the tab roots they hand over to. */
  padding: var(--bpm-space-4) 0 var(--bpm-space-3);
  font-size: var(--bpm-type-largetitle);
  font-weight: var(--bpm-fw-largetitle);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--bpm-ink-strong);
  scroll-margin-top: 0;
}
.bpm-android .bpm-largetitle { padding-top: var(--bpm-space-2); padding-bottom: var(--bpm-space-4); }
.bpm-largetitle:focus { outline: none; }
.bpm-largetitle:focus-visible { outline: 2px solid var(--bpm-focus); }

/* Yard mark beside a large title (customer Home) and in role rows. */
.bpm-yardmark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bpm-primary);
  color: var(--bpm-on-primary);
  font-size: var(--bpm-type-callout);
  font-weight: var(--bpm-fw-semibold);
  letter-spacing: 0.02em;
}

/* Back: iOS chevron + previous title; Android arrow in a 48px icon button. */
.bpm-back {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: var(--bpm-target);
  min-width: var(--bpm-target);
  padding: 0 var(--bpm-space-2) 0 0;
  border: 0;
  background: none;
  color: var(--bpm-primary-ink);
  font: inherit;
  font-size: var(--bpm-type-body);
  text-decoration: none;
  cursor: pointer;
}
.bpm-back__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
.bpm-ios .bpm-back .bp-i { margin-right: -2px; }
.bpm-android .bpm-back { justify-content: center; padding: 0; border-radius: 50%; }

/* Search field variant: a full-width field under the bar row. */
.bpm-appbar__search { padding: 0 var(--bpm-gutter) var(--bpm-space-3); }
/* Wave CA1 — the `prebar` slot: markup the caller puts ABOVE the search
   field, inside the stripe. Only the shop uses it today (Cart · Your
   orders). It carries the gutter and nothing else; what goes in it brings its
   own look, and on the stripe that means matching the search field's light
   well rather than inventing a third treatment. */
.bpm-appbar__prebar { padding: 0 var(--bpm-gutter) var(--bpm-space-2); }

/* 4 ─ tab bar ──────────────────────────────────────────────────────────── */

/* THE DARK BAR. The tab bar wears the desktop SIDEBAR's family: #2C3539,
   white labels on every tab (an inactive destination is still something you
   must read), muted-white inactive glyphs, and teal over the sidebar's own
   translucent teal tint for the active one — plus a teal edge above it, so
   the active tab is never told by colour alone.
   ONE TAB BAR FOR BOTH PLATFORMS: the owner's theme outranks the platform
   default here, and M3's active-indicator pill is what it looks like anyway
   (docs/mobile/platform-guidelines.md §3 writes the collision down). */
.bpm-tabbar {
  position: relative;
  z-index: var(--bpm-z-tabbar);
  flex: none;
  display: flex;
  align-items: stretch;
  min-height: calc(var(--bpm-tabbar-h) + var(--bpm-safe-bottom));
  padding: 0 var(--bpm-safe-right) var(--bpm-safe-bottom) var(--bpm-safe-left);
  background: var(--bpm-tabbar-bg);
  color: var(--bpm-tabbar-ink);
  box-shadow: inset 0 1px 0 var(--bpm-tabbar-edge);
}
.bpm-app.is-tabbar-hidden .bpm-tabbar { display: none; }
.bpm-tab {
  position: relative;
  flex: 1 1 0;
  min-width: var(--bpm-target);
  min-height: var(--bpm-target);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--bpm-space-2) 2px;
  border: 0;
  background: none;
  color: var(--bpm-tabbar-ink);
  font: inherit;
  font-size: var(--bpm-type-tab);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.bpm-tab__icon {
  position: relative;
  display: inline-grid; place-items: center;
  /* Wave CR1 — 32px in an 84px bar left the glyph floating. 38px fills the
     active pill properly and widens the press target with it. */
  width: 58px; height: 38px;
  border-radius: 16px;
  color: var(--bpm-tabbar-ink-muted);
}
.bpm-tab__icon .bp-i { width: var(--bpm-glyph-tab); height: var(--bpm-glyph-tab); }
.bpm-tab__label { white-space: nowrap; }
.bpm-tab[aria-current='page'] .bpm-tab__icon { background: var(--bpm-tabbar-active-bg); color: var(--bpm-tabbar-active-ink); }
/* never colour alone: weight, a tinted pill, and an edge above the tab */
.bpm-tab[aria-current='page'] .bpm-tab__label { font-weight: var(--bpm-fw-semibold); }
.bpm-tab[aria-current='page']::before {
  content: '';
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--bpm-tabbar-active-ink);
}

/* THE DOCKED ACTION — a raised circle in the centre slot. It is a BUTTON,
   not a destination: it opens a sheet and never changes which tab is
   current, which is why it carries no aria-current and is not a .bpm-tab. */
.bpm-tabdock {
  position: relative;
  flex: 1 1 0;
  min-width: var(--bpm-target);
  min-height: var(--bpm-target);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: var(--bpm-space-2) 2px;
  border: 0;
  background: none;
  color: var(--bpm-tabbar-ink);
  font: inherit;
  font-size: var(--bpm-type-tab);
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bpm-tabdock__disc {
  display: inline-grid; place-items: center;
  width: var(--bpm-dock-size); height: var(--bpm-dock-size);
  margin-top: calc(-1 * var(--bpm-space-6));
  border-radius: 50%;
  background: var(--bpm-primary);
  color: var(--bpm-on-primary);
  box-shadow: var(--bpm-elev-3), 0 0 0 5px var(--bpm-tabbar-bg);
  transition: transform var(--bpm-dur-press) var(--bpm-ease-standard);
}
.bpm-tabdock__disc .bp-i { width: var(--bpm-glyph-dock); height: var(--bpm-glyph-dock); }
.bpm-tabdock__label { white-space: nowrap; font-weight: var(--bpm-fw-medium); }
/* A DOCK WITH NO LABEL STICKS OUT JUST AS FAR AS ONE WITH A LABEL.
   Owner, 2026-11-13: *"have the qr scan button stick out just like request
   service on customer portal."*
   The column is `justify-content: flex-end`, so the labelled dock's disc is
   pushed up by the label sitting under it. Take the label away and the disc
   drops to the floor of the bar: MEASURED at 390x844, the customer's Request
   disc cleared the bar by 9px and the crew scanner sat 12px INSIDE it.
   So the bare one gets the label's own height back as a lift — the same
   numbers the label is drawn with, not a magic offset — and the matching
   bottom margin keeps the bar exactly the height it was. */
.bpm-tabdock--bare .bpm-tabdock__disc {
  --bpm-dock-labelspace: calc(var(--bpm-type-tab) * 1.2 + 4px);
  margin-top: calc(-1 * var(--bpm-space-6) - var(--bpm-dock-labelspace));
  margin-bottom: var(--bpm-dock-labelspace);
}
/* The disc is raised ABOVE the bar, so it sits over the last thing on the
   screen. Give the scroller that height back, or the final row is covered. */
.bpm-app:has(.bpm-tabdock) .bpm-content { padding-bottom: var(--bpm-space-8); }
.bpm-tabdock:active .bpm-tabdock__disc { transform: scale(0.94); }
@media (prefers-reduced-motion: reduce) { .bpm-tabdock:active .bpm-tabdock__disc { transform: none; } }

.bpm-badge {
  position: absolute;
  top: -2px;
  left: calc(50% + 10px);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--bpm-tabbar-active-ink);
  color: var(--bpm-tabbar-bg);
  font-size: var(--bpm-type-caption);
  font-weight: var(--bpm-fw-semibold);
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bpm-tabbar-bg);
}

/* Static tab bar for the Components screen: not fixed, no safe inset. */
.bpm-tabbar--static { padding-bottom: 0; min-height: var(--bpm-tabbar-h) !important; border-radius: var(--bpm-radius-card); overflow: hidden; }

/* 5 ─ type helpers ─────────────────────────────────────────────────────── */

.bpm-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.bpm-title { font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-title); line-height: 1.25; color: var(--bpm-ink-strong); }
.bpm-headline { font-size: var(--bpm-type-headline); font-weight: var(--bpm-fw-headline); }
.bpm-callout { font-size: var(--bpm-type-callout); }
.bpm-footnote { font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }
.bpm-caption { font-size: var(--bpm-type-caption); color: var(--bpm-ink-2); }
.bpm-num { font-variant-numeric: tabular-nums; }

.bpm-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--bpm-space-2);
  margin: var(--bpm-space-6) 0 var(--bpm-space-2);
  padding: 0 var(--bpm-space-4);
  /* Tinted, so a section header helps someone FIND the group they want
     (owner: "use colour where it helps"). Navy on the canvas grey is 8.7:1. */
  font-size: var(--bpm-type-subhead);
  font-weight: var(--bpm-fw-medium);
  color: var(--bpm-primary-ink);
}
.bpm-content > .bpm-section { margin-top: var(--bpm-space-6); }
.bpm-ios .bpm-section { text-transform: uppercase; letter-spacing: 0.03em; font-size: var(--bpm-type-caption); }
.bpm-android .bpm-section { padding: 0 var(--bpm-space-1); }
.bpm-section + .bpm-list, .bpm-section + .bpm-card, .bpm-section + * { margin-top: 0 !important; }
.bpm-sectionfoot { margin-top: var(--bpm-space-2) !important; padding: 0 var(--bpm-space-4); font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }

/* A section header may carry a state badge and its own `?`. The header is
   already a space-between row, so the trail is one flex child of it. The help
   button keeps the field head's negative margin: the target stays 48px while
   the header stays the height of its words. */
.bpm-section__trail { display: inline-flex; align-items: center; gap: var(--bpm-space-2); }
.bpm-section .bpm-help { margin: -12px -12px -12px 0; }
.bpm-ios .bpm-section__trail .bpm-status { text-transform: none; letter-spacing: 0; }

/* The detail behind that `?`. The rule everywhere else in this layer is a
   label and a control, with the explanation one tap away — this is where the
   explanation goes, so nothing has to be written under a labelled row. */
.bpm-sectionhelp {
  margin: 0 0 var(--bpm-space-3);
  padding: 0 var(--bpm-space-4);
  font-size: var(--bpm-type-footnote);
  color: var(--bpm-ink-2);
}
.bpm-sectionhelp + * { margin-top: 0 !important; }
.bpm-sectionhelp p { margin: 0; }
.bpm-sectionhelp__list {
  list-style: none;
  display: grid;
  gap: 2px;
  margin: var(--bpm-space-1) 0;
  padding: 0;
}
.bpm-sectionhelp__list li { display: flex; align-items: center; gap: var(--bpm-space-2); }
.bpm-sectionhelp__list .bp-i { color: var(--bpm-ink-3); }

/* 6 ─ lists + cells ────────────────────────────────────────────────────── */

.bpm-list { list-style: none; margin: 0; padding: 0; background: var(--bpm-surface); }
.bpm-list > li { position: relative; }
.bpm-list--inset { border-radius: var(--bpm-radius-cell-group); overflow: hidden; }
/* Plain lists run edge to edge, out through the content gutter. */
.bpm-list--plain {
  margin-left: calc(-1 * var(--bpm-gutter));
  margin-right: calc(-1 * var(--bpm-gutter));
}

.bpm-cell {
  display: flex;
  align-items: center;
  gap: var(--bpm-space-3);
  width: 100%;
  min-height: var(--bpm-target);
  padding: var(--bpm-space-2) var(--bpm-space-4);
  border: 0;
  background: transparent;
  color: var(--bpm-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.bpm-cell--link { cursor: pointer; min-height: var(--bpm-target); }
.bpm-cell--tall { min-height: 64px; }
.bpm-cell__lead { flex: none; display: inline-grid; place-items: center; color: var(--bpm-ink-2); }
.bpm-cell__lead--icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bpm-primary-tint);
  color: var(--bpm-primary-ink);
}
/* The tinted icon well stays on Android too: it is the cheapest colour in the
   app and it is what someone scans a long list by. */
.bpm-cell__lead--avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bpm-primary);
  color: var(--bpm-on-primary);
  font-size: var(--bpm-type-footnote);
  font-weight: var(--bpm-fw-semibold);
}
.bpm-cell__lead--thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--bpm-surface-sunken);
  color: var(--bpm-ink-2);
  overflow: hidden;
}
.bpm-cell__lead--thumb img { width: 100%; height: 100%; object-fit: cover; }
/* A BRAND'S MARK. `contain` and a white tile, never `cover`: these files are
   logos with their own margins, and `object-fit` fits the FILE rather than
   the ink — cropping one to fill a square cuts the wordmark in half. The
   same rule the brand grid and the landing animation already follow. */
.bpm-cell__lead--logo {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  flex: none;
  border-radius: 8px;
  padding: 4px;
  background: var(--bpm-surface-sunken);
  overflow: hidden;
}
.bpm-cell__lead--logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bpm-cell__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bpm-cell__title { font-size: var(--bpm-type-body); color: var(--bpm-ink); overflow-wrap: anywhere; }
.bpm-cell__sub { font-size: var(--bpm-type-subhead); color: var(--bpm-ink-2); overflow-wrap: anywhere; }
/* `min-width: 0` so a row carrying BOTH a value and a status badge shrinks the
   title side rather than clipping the badge mid-word (found by the admin
   screens, where money + status ride together). */
.bpm-cell__trail { flex: none; display: inline-flex; align-items: center; gap: var(--bpm-space-2); min-width: 0; max-width: 48%; color: var(--bpm-ink-2); }
/* A value is read in order to act on it — full contrast, never grey. */
.bpm-cell__value { font-size: var(--bpm-type-body); font-variant-numeric: tabular-nums; color: var(--bpm-ink); white-space: nowrap; }
.bpm-cell__chev { color: var(--bpm-ink-3); }
.bpm-cell--destructive .bpm-cell__title { color: var(--bpm-destructive); font-weight: var(--bpm-fw-medium); }

/* iOS: hairlines inset to where the text starts. Android: no dividers. */
.bpm-ios .bpm-list > li + li::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  left: var(--bpm-space-4);
  height: 1px;
  background: var(--bpm-hairline);
  z-index: 1;
}
.bpm-ios .bpm-list--leading > li + li::before { left: calc(var(--bpm-space-4) + 32px + var(--bpm-space-3)); }
.bpm-ios .bpm-list--avatars > li + li::before { left: calc(var(--bpm-space-4) + 40px + var(--bpm-space-3)); }
.bpm-android .bpm-cell { padding-top: var(--bpm-space-3); padding-bottom: var(--bpm-space-3); gap: var(--bpm-space-4); }
.bpm-android .bpm-list--plain { background: transparent; }

/* Swipe actions (visual). The row slides to reveal buttons behind it. */
.bpm-swipe { position: relative; overflow: hidden; }
.bpm-swipe__actions { position: absolute; inset: 0 0 0 auto; display: flex; }
.bpm-swipe__action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-width: 76px; min-height: var(--bpm-target);
  border: 0;
  background: var(--bpm-secondary-ink);
  color: var(--bpm-on-destructive);
  font: inherit; font-size: var(--bpm-type-caption);
}
.bpm-swipe__action--primary { background: var(--bpm-primary); }
.bpm-swipe__row { position: relative; background: var(--bpm-surface); transform: translateX(-152px); }

/* 7 ─ cards, kv, money, timeline, photos ───────────────────────────────── */

.bpm-card {
  background: var(--bpm-surface);
  border-radius: var(--bpm-radius-card);
  overflow: hidden;
}
.bpm-android .bpm-card { box-shadow: var(--bpm-elev-1); }
.bpm-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--bpm-space-3);
  padding: var(--bpm-space-4) var(--bpm-space-4) 0;
}
.bpm-card__title { font-size: var(--bpm-type-headline); font-weight: var(--bpm-fw-headline); }
.bpm-card__body { padding: var(--bpm-space-3) var(--bpm-space-4) var(--bpm-space-4); }
.bpm-card__body > * + * { margin-top: var(--bpm-space-3); }
.bpm-card__foot { padding: 0 var(--bpm-space-4) var(--bpm-space-4); display: flex; gap: var(--bpm-target-gap); flex-wrap: wrap; }

.bpm-kv { margin: 0; }
.bpm-kv__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--bpm-space-4);
  min-height: 44px;
  padding: var(--bpm-space-2) 0;
}
.bpm-kv__row + .bpm-kv__row { border-top: 1px solid var(--bpm-hairline); }
.bpm-kv dt { flex: none; max-width: 45%; color: var(--bpm-ink-2); font-size: var(--bpm-type-subhead); }
.bpm-kv dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }

.bpm-money { margin: 0; font-variant-numeric: tabular-nums; }
.bpm-money__row { display: flex; justify-content: space-between; gap: var(--bpm-space-4); padding: var(--bpm-space-1) 0; }
.bpm-money__row dt { min-width: 0; color: var(--bpm-ink-2); }
.bpm-money__row dd { margin: 0; white-space: nowrap; }
.bpm-money__row--total {
  margin-top: var(--bpm-space-2);
  padding-top: var(--bpm-space-3);
  border-top: 1px solid var(--bpm-hairline);
  font-size: var(--bpm-type-headline);
  font-weight: var(--bpm-fw-semibold);
}
.bpm-money__row--total dt { color: var(--bpm-ink); }
.bpm-money__row--due dd { font-weight: var(--bpm-fw-semibold); }

.bpm-timeline { list-style: none; margin: 0; padding: 0; }
.bpm-timeline__item { position: relative; display: flex; gap: var(--bpm-space-3); padding-bottom: var(--bpm-space-4); }
.bpm-timeline__item:last-child { padding-bottom: 0; }
.bpm-timeline__dot {
  flex: none; position: relative;
  width: 12px; height: 12px; margin-top: 6px;
  border-radius: 50%;
  border: 2px solid var(--bpm-hairline-strong);
  background: var(--bpm-surface);
}
.bpm-timeline__item:not(:last-child) .bpm-timeline__dot::after {
  content: ''; position: absolute; left: 3px; top: 12px;
  width: 2px; height: calc(100% + 40px);
  background: var(--bpm-hairline);
}
.bpm-timeline__item.is-current .bpm-timeline__dot { border-color: var(--bpm-state); background: var(--bpm-state); }
.bpm-timeline__body { min-width: 0; }
.bpm-timeline__title { font-size: var(--bpm-type-body); }
.bpm-timeline__item.is-current .bpm-timeline__title { font-weight: var(--bpm-fw-semibold); }
.bpm-timeline__meta { font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }

.bpm-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bpm-target-gap); }
.bpm-photo {
  display: grid; place-items: center; align-content: center; gap: var(--bpm-space-1);
  aspect-ratio: 1;
  min-height: var(--bpm-target);
  padding: var(--bpm-space-2);
  border: 0;
  border-radius: 10px;
  background: var(--bpm-surface-sunken);
  color: var(--bpm-ink-2);
  font: inherit;
  font-size: var(--bpm-type-caption);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}
.bpm-photo img { width: 100%; height: 100%; object-fit: cover; }
.bpm-photo--add { background: var(--bpm-surface); border: 1.5px dashed var(--bpm-hairline-strong); color: var(--bpm-primary-ink); font-weight: var(--bpm-fw-medium); }

/* 8 ─ status badge ─────────────────────────────────────────────────────── */

.bpm-status {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 100%;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: var(--bpm-status-bg);
  color: var(--bpm-status-ink);
  font-size: var(--bpm-type-caption);
  font-weight: var(--bpm-fw-medium);
  line-height: 1.4;
  white-space: nowrap;
}
.bpm-status .bp-i { width: 14px; height: 14px; }
.bpm-status__label { overflow: hidden; text-overflow: ellipsis; }

/* 9 ─ buttons ──────────────────────────────────────────────────────────── */

.bpm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--bpm-space-2);
  min-height: var(--bpm-target);
  min-width: var(--bpm-target);
  padding: 0 var(--bpm-space-5);
  border: 0;
  border-radius: var(--bpm-radius-btn);
  background: var(--bpm-secondary-bg);
  color: var(--bpm-secondary-ink);
  font: inherit;
  font-size: var(--bpm-type-body);          /* 18px on both platforms */
  font-weight: var(--bpm-fw-medium);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
/* iOS's ORDINARY button sits a little lower than Android's. `:not()` keeps
   this off the primary trio below: `.bpm-ios .bpm-btn` is two classes and beat
   their one, so every primary on iOS — and on desktop, which renders as iOS —
   was being silently capped at 50px instead of the 56px the owner asked for.
   Measured with a real pointer at 393px before the fix: 50, not 56, on every
   iOS screen including the prototype. The three SIGN-IN buttons are thumb-zone
   actions too and are excluded by name: `:not(.bpm-btn--onwater)` does NOT
   cover `--onwater-line` (a class is a whole token, never a prefix), so the
   first version of this rule quietly re-capped them at 50px. */
.bpm-ios .bpm-btn:not(.bpm-btn--primary):not(.bpm-btn--onwater):not(.bpm-btn--destructive):not(.bpm-btn--apple):not(.bpm-btn--google):not(.bpm-btn--onwater-line) { min-height: 50px; }
.bpm-btn--block { display: flex; width: 100%; }
/* THE primary action is 56px tall, on both platforms: it is the thing an
   older hand has to hit first time, in a moving boat, in sunlight. */
.bpm-btn--primary, .bpm-btn--onwater, .bpm-btn--destructive {
  min-height: var(--bpm-target-primary);
  font-weight: var(--bpm-fw-semibold);
}
.bpm-btn--primary { background: var(--bpm-primary); color: var(--bpm-on-primary); }
/* The one INVERTED button: on the welcome screen's navy water the owner's
   navy button would vanish, so it flips — white disc, navy label, the same
   two tokens, the same 9.15:1. Never used on a light ground. */
.bpm-btn--onwater { background: var(--bpm-on-primary); color: var(--bpm-primary-ink); }
.bpm-android .bpm-btn--primary:active { background: var(--bpm-primary-pressed); }
.bpm-btn--secondary { background: var(--bpm-secondary-bg); color: var(--bpm-secondary-ink); }
.bpm-btn--text { background: transparent; color: var(--bpm-primary-ink); padding: 0 var(--bpm-space-3); }
.bpm-btn--destructive { background: var(--bpm-destructive); color: var(--bpm-on-destructive); }
.bpm-btn[disabled], .bpm-btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }
.bpm-btnrow { display: flex; gap: var(--bpm-target-gap); flex-wrap: wrap; }
.bpm-btnstack { display: flex; flex-direction: column; gap: var(--bpm-target-gap); }

.bpm-iconbtn {
  display: inline-grid; place-items: center;
  width: var(--bpm-target); height: var(--bpm-target);
  min-width: var(--bpm-target); min-height: var(--bpm-target);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bpm-primary-ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.bpm-android .bpm-iconbtn { color: var(--bpm-ink-2); }
.bpm-iconbtn--labelled {
  width: auto; height: auto;
  min-width: 72px;
  display: inline-flex; flex-direction: column; gap: 4px;
  padding: var(--bpm-space-2);
  border-radius: 12px;
  font-size: var(--bpm-type-caption);
  color: var(--bpm-primary-ink);
}
.bpm-iconbtn--labelled .bpm-iconbtn__disc {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bpm-primary-tint);
}

.bpm-textlink {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--bpm-space-1);
  min-height: var(--bpm-target);
  min-width: var(--bpm-target);
  padding: 0 var(--bpm-space-2);
  border: 0;
  background: none;
  color: var(--bpm-primary-ink);
  font: inherit;
  font-size: var(--bpm-type-callout);
  text-decoration: none;
  cursor: pointer;
}
/* The quiet link: no fill, no border, small grey type. Deliberately NOT a
   button style — the staff sign-in link at the foot of customer sign-in. */
.bpm-quietlink {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--bpm-target);
  padding: 0 var(--bpm-space-3);
  color: var(--bpm-ink-2);
  font-size: var(--bpm-type-footnote);
  text-decoration: underline;
  text-decoration-color: var(--bpm-hairline-strong);
  text-underline-offset: 3px;
}

/* 10 ─ segmented, chips, search ────────────────────────────────────────── */

.bpm-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--bpm-surface-sunken);
}
.bpm-seg__btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--bpm-target);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--bpm-space-1);
  padding: 0 var(--bpm-space-2);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bpm-ink);
  font: inherit;
  font-size: var(--bpm-type-subhead);
  cursor: pointer;
  white-space: nowrap;
}
.bpm-seg__btn .bpm-seg__check { display: none; }
.bpm-ios .bpm-seg__btn[aria-checked='true'] { background: var(--bpm-surface); box-shadow: var(--bpm-elev-1); font-weight: var(--bpm-fw-semibold); }
.bpm-android .bpm-seg { padding: 0; gap: 0; border: 1px solid var(--bpm-hairline-strong); border-radius: 999px; background: transparent; overflow: hidden; }
.bpm-android .bpm-seg__btn { border-radius: 0; font-weight: var(--bpm-fw-medium); }
.bpm-android .bpm-seg__btn + .bpm-seg__btn { border-left: 1px solid var(--bpm-hairline-strong); }
.bpm-android .bpm-seg__btn[aria-checked='true'] { background: var(--bpm-state-tint); color: var(--bpm-ink); }
.bpm-android .bpm-seg__btn[aria-checked='true'] .bpm-seg__check { display: inline-block; }

.bpm-chips {
  display: flex;
  gap: var(--bpm-target-gap);
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: calc(-1 * var(--bpm-gutter));
  margin-right: calc(-1 * var(--bpm-gutter));
  padding: 0 var(--bpm-gutter);
}
.bpm-chips::-webkit-scrollbar { display: none; }
.bpm-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--bpm-target);
  padding: 0 var(--bpm-space-2);
  border: 0;
  background: transparent;
  color: var(--bpm-ink);
  font: inherit;
  font-size: var(--bpm-type-subhead);
  cursor: pointer;
  white-space: nowrap;
  z-index: 0;
}
/* The drawn pill is 34px inside the 48px target (M3 chips are 32dp with a
   48dp touch target). */
.bpm-chip::before {
  content: '';
  position: absolute;
  inset: 7px 0;
  z-index: -1;
  border-radius: 999px;
  background: var(--bpm-surface);
  box-shadow: inset 0 0 0 1px var(--bpm-hairline-strong);
}
.bpm-android .bpm-chip::before { border-radius: 8px; }
.bpm-android .bpm-chip::after { inset: 7px 0 !important; border-radius: 8px !important; }
.bpm-chip { padding: 0 var(--bpm-space-4); }
.bpm-chip[aria-pressed='true']::before { background: var(--bpm-primary-tint); box-shadow: inset 0 0 0 1px var(--bpm-primary); }
.bpm-chip[aria-pressed='true'] { color: var(--bpm-primary-ink); font-weight: var(--bpm-fw-medium); }
.bpm-chip .bpm-chip__check { display: none; }
.bpm-chip[aria-pressed='true'] .bpm-chip__check { display: inline-block; }

.bpm-search {
  position: relative;
  display: flex; align-items: center;
  min-height: var(--bpm-target);
  border-radius: 12px;
  background: var(--bpm-surface-sunken);
  color: var(--bpm-ink-2);
}
.bpm-android .bpm-search { border-radius: 28px; min-height: 56px; background: var(--bpm-surface); box-shadow: var(--bpm-elev-1); }
.bpm-search > .bp-i { position: absolute; left: 12px; pointer-events: none; }
.bpm-android .bpm-search > .bp-i { left: 16px; }
.bpm-search__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--bpm-target);
  padding: 0 var(--bpm-target) 0 40px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--bpm-ink);
  font: inherit;
  font-size: var(--bpm-type-body);
  -webkit-appearance: none;
  appearance: none;
}
.bpm-android .bpm-search__input { padding-left: 52px; }
.bpm-search__input::placeholder { color: var(--bpm-ink-2); opacity: 1; }
.bpm-search__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.bpm-search__input:focus { outline: none; }
.bpm-search:focus-within { box-shadow: 0 0 0 2px var(--bpm-focus); }
.bpm-search__clear { position: absolute; right: 0; color: var(--bpm-ink-2); }

/* THE FIELD IN THE APP BAR IS THE PROMINENT THING. Owner, 2026-11-11:
   *"search bar should be prominent."* Said in the same breath as "the buttons
   above it go darker", so it is one instruction about which element wins: with
   the pair above it sunk into the stripe, the field is the only LIGHT object
   on the bar, and it is the one the eye lands on.
     · card white instead of the page's sunken grey — on the stripe a grey well
       is just a slightly paler piece of bar;
     · the hairline is what still says FIELD once the fill is white, and it is
       what carries this treatment onto the desktop composition's white page
       header, where a borderless white field would vanish;
     · --bpm-target-primary tall: the same height as the screen's primary
       action, the owner's floor for the control that matters most. (Desktop
       redefines that token to its own 48px, so the page header stays a header.)
   Scoped to the app bar: on a white page the base sunken well is still right.
   Ink #212529 on white is 16.1:1, the placeholder's #495057 is 8.0:1. */
.bpm-appbar__search .bpm-search {
  min-height: var(--bpm-target-primary);
  background: var(--bpm-surface);
  box-shadow: inset 0 0 0 1px var(--bpm-hairline-strong);
}
.bpm-appbar__search .bpm-search > .bp-i { color: var(--bpm-primary); }
.bpm-appbar__search .bpm-search__input {
  min-height: var(--bpm-target-primary);
  color: var(--bpm-ink-strong);
}
/* The ring goes INSIDE: a navy ring drawn outside a white field on the navy
   stripe is a ring nobody can see. */
.bpm-appbar__search .bpm-search:focus-within { box-shadow: inset 0 0 0 2px var(--bpm-focus); }

/* 11 ─ form fields ─────────────────────────────────────────────────────── */

.bpm-form > * + * { margin-top: var(--bpm-space-4); }
.bpm-field { display: flex; flex-direction: column; gap: var(--bpm-space-1); min-width: 0; }
.bpm-field__head { display: flex; align-items: center; justify-content: space-between; gap: var(--bpm-space-2); min-height: 24px; }
.bpm-field__label { font-size: var(--bpm-type-subhead); font-weight: var(--bpm-fw-medium); color: var(--bpm-ink); }
.bpm-field__head .bpm-help { margin: -12px -12px -12px 0; }
.bpm-input {
  width: 100%;
  min-height: var(--bpm-target);
  padding: 0 var(--bpm-space-4);
  /* The owner's grey edge (4.69:1): a field has to be findable on a white
     card in sunlight, and WCAG 1.4.11 wants 3:1 for a control's boundary. */
  border: 1px solid var(--bpm-ink-3);
  border-radius: var(--bpm-radius-field);
  background: var(--bpm-surface);
  color: var(--bpm-ink);
  font: inherit;
  font-size: max(16px, var(--bpm-type-body));   /* <16px makes iOS zoom the page */
  -webkit-appearance: none;
  appearance: none;
}
.bpm-ios .bpm-input { min-height: 50px; }
.bpm-android .bpm-input { min-height: 56px; }
textarea.bpm-input { min-height: 112px; padding-top: var(--bpm-space-3); line-height: var(--bpm-lh); resize: vertical; }
.bpm-input:focus { outline: none; border-color: var(--bpm-focus); box-shadow: 0 0 0 1px var(--bpm-focus); }
.bpm-field.is-invalid .bpm-input { border-color: var(--bpm-destructive); box-shadow: 0 0 0 1px var(--bpm-destructive); }
.bpm-field__withbtn { position: relative; }
.bpm-field__withbtn .bpm-input { padding-right: calc(var(--bpm-target) + 4px); }
.bpm-field__withbtn .bpm-iconbtn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--bpm-ink-2); }
.bpm-field__help { font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }
.bpm-field__error {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: var(--bpm-type-footnote);
  font-weight: var(--bpm-fw-medium);
  color: var(--bpm-destructive);
}
.bpm-field__error .bp-i { margin-top: 1px; }

/* The `?` — progressive disclosure (owner rule). A 48px target around a
   small glyph; the detail it reveals sits under the field. */
.bpm-help {
  display: inline-grid; place-items: center;
  width: var(--bpm-target); height: var(--bpm-target);
  min-width: var(--bpm-target); min-height: var(--bpm-target);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--bpm-ink-2);
  cursor: pointer;
}
.bpm-help[aria-expanded='true'] { color: var(--bpm-primary-ink); }

.bpm-switch {
  flex: none;
  position: relative;
  display: inline-grid; place-items: center;
  min-width: 56px;
  min-height: var(--bpm-target);
  cursor: pointer;
}
.bpm-switch input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
/* Off track: a sunken fill with a ring in the owner's grey. Stock iOS draws a
   pale track (#CED4DA here would be 1.49:1 on white); the ring keeps the
   control's edge at 4.69:1 for WCAG 1.4.11 and for reading in sunlight. */
.bpm-switch__track {
  position: relative;
  /* THE TRACK MUST NOT EAT THE TAP. The real control is the invisible
     <input> stretched across the whole 56x48 box; this span is painted on
     top of it and, without this line, intercepts every pointer event — so
     the switch only toggled when you hit its text label, never when you hit
     the switch. Found by Playwright, which could not click #stOffline at
     all. Pinned by test_the_switch_track_never_swallows_its_own_tap. */
  pointer-events: none;
  width: 51px; height: 31px;
  border-radius: 999px;
  background: var(--bpm-surface-sunken);
  box-shadow: inset 0 0 0 1.5px var(--bpm-ink-3);
  transition: background var(--bp-dur) var(--bpm-ease-standard);
}
.bpm-switch__track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--bpm-surface);
  box-shadow: var(--bpm-elev-2);
  transition: transform var(--bp-dur) var(--bpm-ease-standard);
}
.bpm-switch input:checked + .bpm-switch__track { background: var(--bpm-primary); }
.bpm-switch input:checked + .bpm-switch__track::after { transform: translateX(20px); }
.bpm-switch input:focus-visible + .bpm-switch__track { outline: 2px solid var(--bpm-focus); outline-offset: 2px; }
/* A switch that cannot be moved from here. The track dims and the pointer
   stops promising a tap; the row's WORDS stay at full strength, because what
   a setting says should read the same whether or not it can be changed on
   this screen. (Nothing shipped is disabled today — the notification rows
   post their own answer and a refusal puts them back — so this is the base
   the layer falls back on, not a pattern to reach for.) */
.bpm-switch input:disabled, .bpm-switch:has(input:disabled) { cursor: default; }
.bpm-switch input:disabled + .bpm-switch__track { opacity: 0.45; }
.bpm-android .bpm-switch__track { width: 52px; height: 32px; background: var(--bpm-surface-sunken); box-shadow: inset 0 0 0 2px var(--bpm-ink-3); }
.bpm-android .bpm-switch__track::after { top: 8px; left: 8px; width: 16px; height: 16px; background: var(--bpm-ink-3); box-shadow: none; }
.bpm-android .bpm-switch input:checked + .bpm-switch__track { background: var(--bpm-primary); box-shadow: none; }
.bpm-android .bpm-switch input:checked + .bpm-switch__track::after { top: 4px; left: 4px; width: 24px; height: 24px; transform: translateX(20px); background: var(--bpm-on-primary); }

.bpm-stepper { display: inline-flex; align-items: center; gap: var(--bpm-target-gap); }
.bpm-stepper__btn {
  display: inline-grid; place-items: center;
  width: var(--bpm-target); height: var(--bpm-target);
  min-width: var(--bpm-target); min-height: var(--bpm-target);
  border: 1px solid var(--bpm-hairline-strong);
  border-radius: 12px;
  background: var(--bpm-surface);
  color: var(--bpm-primary-ink);
  cursor: pointer;
}
.bpm-android .bpm-stepper__btn { border-radius: 50%; }
.bpm-stepper__btn[disabled] { opacity: 0.4; pointer-events: none; }
.bpm-stepper__value {
  width: 4ch;
  min-height: var(--bpm-target);
  border: 0;
  background: transparent;
  color: var(--bpm-ink);
  font: inherit;
  font-size: var(--bpm-type-title);
  font-weight: var(--bpm-fw-semibold);
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}
.bpm-stepper__value::-webkit-inner-spin-button, .bpm-stepper__value::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 12 ─ sheets, action sheets, dialogs ──────────────────────────────────── */

.bpm-overlays { position: fixed; inset: 0; z-index: var(--bpm-z-overlay); pointer-events: none; }
.bpm-overlays > * { pointer-events: auto; }

.bpm-sheet, .bpm-dialog { position: fixed; inset: 0; z-index: var(--bpm-z-overlay); }
.bpm-sheet__scrim, .bpm-dialog__scrim {
  position: absolute; inset: 0;
  background: var(--bpm-scrim);
  opacity: 0;
  transition: opacity var(--bpm-dur-sheet) var(--bpm-ease-standard);
}
.bpm-sheet.is-open .bpm-sheet__scrim, .bpm-dialog.is-open .bpm-dialog__scrim { opacity: 1; }

.bpm-sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: calc(100% - var(--bpm-safe-top) - 24px);
  display: flex; flex-direction: column;
  padding: 0 var(--bpm-safe-right) var(--bpm-safe-bottom) var(--bpm-safe-left);
  border-radius: var(--bpm-radius-sheet) var(--bpm-radius-sheet) 0 0;
  background: var(--bpm-surface);
  box-shadow: var(--bpm-elev-4);
  transform: translateY(100%);
  transition: transform var(--bpm-dur-sheet) var(--bpm-ease-push);
  outline: none;
}
.bpm-ios .bpm-sheet__panel { background: var(--bpm-bg); }
.bpm-android .bpm-sheet__panel { background: var(--bpm-surface-2); }
.bpm-sheet.is-open .bpm-sheet__panel { transform: translateY(0); }
.bpm-sheet.is-dragging .bpm-sheet__panel { transition: none; }

.bpm-sheet__grab {
  flex: none;
  display: grid; place-items: center;
  height: 24px;
  touch-action: none;
  cursor: grab;
}
.bpm-sheet__grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--bpm-hairline-strong); }
.bpm-android .bpm-sheet__grab { height: 36px; }
.bpm-android .bpm-sheet__grabber { width: 32px; height: 4px; background: var(--bpm-ink-3); }
.bpm-sheet__head {
  flex: none;
  display: grid; grid-template-columns: var(--bpm-target) minmax(0, 1fr) var(--bpm-target);
  align-items: center;
  padding: 0 var(--bpm-space-2);
  touch-action: none;
}
.bpm-sheet__title { grid-column: 2; text-align: center; font-size: var(--bpm-type-headline); font-weight: var(--bpm-fw-headline); overflow-wrap: anywhere; }
.bpm-sheet__head .bpm-iconbtn { grid-column: 3; color: var(--bpm-ink-2); }
.bpm-android .bpm-sheet__head { grid-template-columns: minmax(0, 1fr) var(--bpm-target); padding-left: var(--bpm-space-6); }
.bpm-android .bpm-sheet__title { grid-column: 1; text-align: left; font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-title); }
.bpm-android .bpm-sheet__head .bpm-iconbtn { grid-column: 2; }
.bpm-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--bpm-space-2) var(--bpm-gutter) var(--bpm-space-5);
}
.bpm-sheet__body > * + * { margin-top: var(--bpm-space-4); }
.bpm-android .bpm-sheet__body { padding-left: var(--bpm-space-6); padding-right: var(--bpm-space-6); }

/* A sheet with TWO HEIGHTS (Wave RD1). Owner, 2026-11-11: "the modal top bar
   thing should expand if the user swipes up, revealing presets of what jobs to
   request."

   There is no second `max-height` and no fixed detent height: collapsed, the
   revealed region carries `hidden`, so the panel's own content is the compact
   detent; expanded, the region is in flow and the panel grows to fit it, still
   capped by `.bpm-sheet__panel`'s max-height, with the body scrolling past
   that. app.js animates the two measured heights (and does not under
   prefers-reduced-motion), which is why nothing here transitions `height`.

   `.bpm-sheet__pull` is the handle as a BUTTON, so the gesture has a keyboard
   and a mouse equivalent. It keeps `.bpm-sheet__grab`'s geometry and only
   raises the target to 48px, which the swipe wants anyway. */
.bpm-sheet__pull {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--bpm-space-1);
  width: 100%;
  min-height: var(--bpm-target);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bpm-ink-3);
  cursor: grab;
}
.bpm-sheet__pull:active { cursor: grabbing; }
.bpm-sheet__pullchev { transition: transform var(--bpm-dur-sheet) var(--bpm-ease-standard); }
.bpm-sheet.is-expanded .bpm-sheet__pullchev { transform: rotate(180deg); }
.bpm-sheet__more { min-width: 0; }

/* Permission pre-prompt: a sheet whose body leads with one glyph + one line. */
.bpm-permission { text-align: center; }
.bpm-permission__glyph {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bpm-primary-tint);
  color: var(--bpm-primary-ink);
}
.bpm-permission__title { margin-top: var(--bpm-space-3) !important; font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-title); }
.bpm-permission__text { color: var(--bpm-ink-2); }

/* Action sheet. iOS (HIG): floating inset group + separate Cancel.
   Android (M3): a bottom-sheet menu, full width, icons leading, no Cancel. */
.bpm-sheet--actions .bpm-sheet__panel { background: transparent; box-shadow: none; }
.bpm-actions__group { background: var(--bpm-surface); overflow: hidden; }
.bpm-actions__head { padding: var(--bpm-space-3) var(--bpm-space-4); text-align: center; }
.bpm-actions__title { font-size: var(--bpm-type-footnote); font-weight: var(--bpm-fw-semibold); color: var(--bpm-ink-2); }
.bpm-actions__message { font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }
.bpm-actions__item, .bpm-actions__cancel {
  display: flex; align-items: center; justify-content: center; gap: var(--bpm-space-3);
  width: 100%;
  min-height: 56px;
  padding: 0 var(--bpm-space-4);
  border: 0;
  background: transparent;
  color: var(--bpm-primary-ink);
  font: inherit;
  font-size: var(--bpm-type-title);
  cursor: pointer;
}
.bpm-actions__item--destructive { color: var(--bpm-destructive); font-weight: var(--bpm-fw-semibold); }
.bpm-ios .bpm-sheet--actions .bpm-sheet__panel { padding-left: calc(8px + var(--bpm-safe-left)); padding-right: calc(8px + var(--bpm-safe-right)); padding-bottom: calc(8px + var(--bpm-safe-bottom)); }
.bpm-ios .bpm-actions__group { border-radius: 14px; }
.bpm-ios .bpm-actions__item { font-size: 1.176rem; }
.bpm-ios .bpm-actions__item .bp-i { display: none; }
.bpm-ios .bpm-actions__group > * + * { box-shadow: inset 0 1px 0 var(--bpm-hairline); }
.bpm-ios .bpm-actions__cancel { margin-top: 8px; border-radius: 14px; background: var(--bpm-surface); font-size: 1.176rem; font-weight: var(--bpm-fw-semibold); }
.bpm-ios .bpm-sheet--actions .bpm-sheet__grab { display: none; }
.bpm-android .bpm-sheet--actions .bpm-sheet__panel { background: var(--bpm-surface-2); box-shadow: var(--bpm-elev-4); }
.bpm-android .bpm-actions__group { background: transparent; padding-bottom: var(--bpm-space-2); }
.bpm-android .bpm-actions__head { text-align: left; padding: 0 var(--bpm-space-6) var(--bpm-space-2); }
.bpm-android .bpm-actions__item { justify-content: flex-start; gap: var(--bpm-space-4); padding: 0 var(--bpm-space-6); font-size: var(--bpm-type-body); color: var(--bpm-ink); }
.bpm-android .bpm-actions__item .bp-i { color: var(--bpm-ink-2); }
.bpm-android .bpm-actions__item--destructive { color: var(--bpm-destructive); }
.bpm-android .bpm-actions__cancel { display: none; }

/* Dialog — "choose to destroy" confirmations only. */
.bpm-dialog { display: grid; place-items: center; padding: var(--bpm-space-6); }
.bpm-dialog__panel {
  position: relative;
  width: min(100%, 320px);
  border-radius: var(--bpm-radius-dialog);
  background: var(--bpm-surface);
  box-shadow: var(--bpm-elev-4);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity var(--bp-dur) var(--bpm-ease-standard), transform var(--bp-dur) var(--bpm-ease-standard);
  outline: none;
  overflow: hidden;
}
.bpm-dialog.is-open .bpm-dialog__panel { opacity: 1; transform: none; }
.bpm-dialog__text { padding: var(--bpm-space-5) var(--bpm-space-4) var(--bpm-space-4); text-align: center; }
.bpm-dialog__title { font-size: var(--bpm-type-headline); font-weight: var(--bpm-fw-semibold); }
.bpm-dialog__message { margin-top: var(--bpm-space-1) !important; font-size: var(--bpm-type-footnote); color: var(--bpm-ink); }
.bpm-dialog__actions { display: flex; }
.bpm-dialog__btn {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--bpm-target);
  padding: 0 var(--bpm-space-3);
  border: 0;
  background: transparent;
  color: var(--bpm-primary-ink);
  font: inherit;
  font-size: var(--bpm-type-body);
  cursor: pointer;
}
.bpm-dialog__btn--destructive { font-weight: var(--bpm-fw-semibold); color: var(--bpm-destructive); }
.bpm-ios .bpm-dialog__panel { width: min(100%, 290px); background: var(--bpm-surface-2); }
.bpm-ios .bpm-dialog__actions { box-shadow: inset 0 1px 0 var(--bpm-hairline); }
.bpm-ios .bpm-dialog__btn + .bpm-dialog__btn { box-shadow: inset 1px 0 0 var(--bpm-hairline); }
.bpm-ios .bpm-dialog__btn .bp-i { display: none; }
.bpm-android .bpm-dialog__panel { width: min(100%, 312px); background: var(--bpm-surface-2); transform: scale(0.94); }
.bpm-android .bpm-dialog.is-open .bpm-dialog__panel { transform: none; }
.bpm-android .bpm-dialog__text { padding: var(--bpm-space-6) var(--bpm-space-6) var(--bpm-space-4); text-align: left; }
.bpm-android .bpm-dialog__title { font-size: 1.5rem; font-weight: var(--bpm-fw-regular); }
.bpm-android .bpm-dialog__message { margin-top: var(--bpm-space-4) !important; font-size: var(--bpm-type-callout); }
.bpm-android .bpm-dialog__actions { justify-content: flex-end; gap: var(--bpm-target-gap); padding: 0 var(--bpm-space-6) var(--bpm-space-6); }
.bpm-android .bpm-dialog__btn { flex: 0 0 auto; border-radius: 999px; font-size: var(--bpm-type-subhead); font-weight: var(--bpm-fw-medium); }
.bpm-android .bpm-dialog__btn--destructive { background: var(--bpm-destructive); color: var(--bpm-on-destructive); padding: 0 var(--bpm-space-5); }

/* 13 ─ snackbar, loading, pull-to-refresh ──────────────────────────────── */

.bpm-snackhost {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: var(--bpm-z-snack);
  display: flex; flex-direction: column; align-items: center; gap: var(--bpm-space-2);
  padding: 0 calc(var(--bpm-space-3) + var(--bpm-safe-right)) calc(var(--bpm-safe-bottom) + var(--bpm-space-3)) calc(var(--bpm-space-3) + var(--bpm-safe-left));
  pointer-events: none;
}
.bpm-has-tabbar .bpm-snackhost { bottom: calc(var(--bpm-tabbar-h)); }
.bpm-snack {
  position: relative;
  display: flex; align-items: center; gap: var(--bpm-space-3);
  width: min(100%, 560px);
  min-height: var(--bpm-target);
  padding: var(--bpm-space-2) var(--bpm-space-2) var(--bpm-space-2) var(--bpm-space-4);
  border-radius: 12px;
  background: var(--bpm-toast-bg);
  color: var(--bpm-ink);
  box-shadow: var(--bpm-elev-3);
  font-size: var(--bpm-type-callout);
  pointer-events: auto;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--bp-dur) var(--bpm-ease-standard), transform var(--bp-dur) var(--bpm-ease-standard);
}
.bpm-android .bpm-snack { border-radius: 4px; }
.bpm-snack.is-in { opacity: 1; transform: none; }
.bpm-snack__text { flex: 1 1 auto; min-width: 0; padding: var(--bpm-space-1) 0; }
.bpm-snack__glyph { color: var(--bpm-status-ink); }
.bpm-snack .bpm-btn--text { min-height: var(--bpm-target); font-size: var(--bpm-type-callout); }
.bpm-snack__timer {
  position: absolute; left: 0; bottom: 0;
  height: 3px; width: 100%;
  background: var(--bpm-state);
  transform-origin: left;
}

.bpm-loading {
  position: fixed; inset: 0;
  z-index: var(--bpm-z-loading);
  display: grid; place-items: center;
  background: var(--bpm-scrim);
  opacity: 0;
  transition: opacity 200ms var(--bpm-ease-standard);
}
.bpm-loading.is-in { opacity: 1; }
.bpm-loading__card {
  display: grid; place-items: center; gap: var(--bpm-space-2);
  padding: var(--bpm-space-5);
  border-radius: 20px;
  background: var(--bpm-surface);
  box-shadow: var(--bpm-elev-3);
}
.bpm-loading__gif { width: 88px; height: 88px; }

.bpm-progress {
  position: fixed; left: 0; right: 0; top: 0;
  z-index: var(--bpm-z-loading);
  height: 3px;
  background: var(--bpm-state);
  transform-origin: left;
  animation: bpm-progress 1.2s var(--bpm-ease-standard) infinite;
}
@keyframes bpm-progress { 0% { transform: scaleX(0.05); } 60% { transform: scaleX(0.7); } 100% { transform: scaleX(0.95); } }

.bpm-ptr {
  position: absolute; left: 0; right: 0; top: 0;
  display: grid; place-items: center;
  height: 0;
  color: var(--bpm-state-ink);
  pointer-events: none;
  z-index: 3;
}
.bpm-ptr__disc {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  transform: translateY(var(--bpm-ptr-y, -48px)) rotate(var(--bpm-ptr-turn, 0deg));
}
.bpm-android .bpm-ptr__disc { background: var(--bpm-surface); box-shadow: var(--bpm-elev-2); }
.bpm-ptr.is-refreshing .bpm-ptr__disc .bp-i { animation: bpm-spin 800ms linear infinite; }
@keyframes bpm-spin { to { transform: rotate(360deg); } }
.bpm-content.is-pulling > :not(.bpm-ptr) { transform: translateY(var(--bpm-ptr-shift, 0px)); }
.bpm-android .bpm-content.is-pulling > :not(.bpm-ptr) { transform: none; }

/* 14 ─ empty, states, skeleton, offline ────────────────────────────────── */

.bpm-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--bpm-space-2);
  padding: var(--bpm-space-6) var(--bpm-space-4) var(--bpm-space-4);
  text-align: center;
}
.bpm-empty .bp-empty__art { width: min(220px, 70%); height: auto; margin-bottom: var(--bpm-space-2); }
.bpm-empty__title { font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-title); color: var(--bpm-ink-strong); }
.bpm-empty__text { max-width: 30ch; color: var(--bpm-ink); }
.bpm-empty .bpm-btn { margin-top: var(--bpm-space-3); }

.bpm-state {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--bpm-space-2);
  padding: var(--bpm-space-6) var(--bpm-space-4);
  text-align: center;
}
.bpm-state__glyph {
  display: inline-grid; place-items: center;
  width: 72px; height: 72px;
  margin-bottom: var(--bpm-space-2);
  border-radius: 50%;
  background: var(--bpm-status-bg);
  color: var(--bpm-status-ink);
}
.bpm-state__title { font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-title); }
.bpm-state__text { max-width: 30ch; color: var(--bpm-ink); }
.bpm-state .bpm-btn { margin-top: var(--bpm-space-4); min-width: 200px; }

.bpm-skel { list-style: none; margin: 0; padding: 0; background: var(--bpm-surface); border-radius: var(--bpm-radius-cell-group); overflow: hidden; }
.bpm-skel__row { display: flex; align-items: center; gap: var(--bpm-space-3); min-height: 64px; padding: var(--bpm-space-3) var(--bpm-space-4); }
.bpm-skel__block, .bpm-skel__line {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bpm-skeleton) 0%, var(--bpm-skeleton-sheen) 50%, var(--bpm-skeleton) 100%);
  background-size: 200% 100%;
  animation: bpm-sheen 1.4s linear infinite;
}
.bpm-skel__block { flex: none; width: 40px; height: 40px; border-radius: 10px; }
.bpm-skel__lines { flex: 1 1 auto; display: grid; gap: 8px; }
.bpm-skel__line { height: 12px; }
.bpm-skel__line:first-child { width: 62%; }
.bpm-skel__line:last-child { width: 38%; }
.bpm-skel__title { height: 28px; width: 50%; margin: var(--bpm-space-2) 0 var(--bpm-space-4); }
@keyframes bpm-sheen { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .bpm-skel__block, .bpm-skel__line, .bpm-progress, .bpm-ptr.is-refreshing .bpm-ptr__disc .bp-i { animation: none; }
}

.bpm-offline {
  flex: none;
  display: flex; align-items: center; gap: var(--bpm-space-2);
  min-height: 40px;
  padding: var(--bpm-space-2) calc(var(--bpm-gutter) + var(--bpm-safe-right)) var(--bpm-space-2) calc(var(--bpm-gutter) + var(--bpm-safe-left));
  background: var(--bpm-toast-bg);
  color: var(--bpm-ink);
  font-size: var(--bpm-type-footnote);
  box-shadow: inset 0 1px 0 var(--bpm-hairline);
}
.bpm-offline--inline { border-radius: 12px; box-shadow: none; }
.bpm-app--bare > .bpm-offline { padding-bottom: calc(var(--bpm-space-2) + var(--bpm-safe-bottom)); }

/* 15 ─ bottom action bar (thumb zone) ──────────────────────────────────── */

.bpm-actionbar {
  flex: none;
  display: flex; gap: var(--bpm-target-gap);
  padding: var(--bpm-space-3) calc(var(--bpm-gutter) + var(--bpm-safe-right)) var(--bpm-space-3) calc(var(--bpm-gutter) + var(--bpm-safe-left));
  background: var(--bpm-surface);
  box-shadow: inset 0 1px 0 var(--bpm-hairline);
}
.bpm-actionbar > .bpm-btn { flex: 1 1 0; }
.bpm-app--bare .bpm-actionbar, .bpm-app.is-tabbar-hidden .bpm-actionbar { padding-bottom: calc(var(--bpm-space-3) + var(--bpm-safe-bottom)); }
/* The docked + rises ABOVE the tab bar and lands on whatever sits there — it
   was overlapping the bottom edge of every action-bar control by a few pixels.
   Give the bar back the height the disc takes (its raise plus the ring). */
.bpm-app:has(.bpm-tabdock) .bpm-actionbar { padding-bottom: calc(var(--bpm-space-3) + var(--bpm-space-6)); }
/* A screen with an action bar: the content no longer owns the bottom inset. */
.bpm-screen:has(> .bpm-actionbar) .bpm-content { padding-bottom: var(--bpm-space-6); }
.bpm-fab {
  position: absolute;
  right: calc(var(--bpm-gutter) + var(--bpm-safe-right));
  bottom: var(--bpm-space-4);
  z-index: 4;
  min-height: 56px;
  padding: 0 var(--bpm-space-5);
  border-radius: 16px;
  box-shadow: var(--bpm-elev-3);
}

/* 16 ─ sign-in layout ──────────────────────────────────────────────────── */

.bpm-auth { display: flex; flex-direction: column; min-height: 100%; }
.bpm-auth > * + * { margin-top: var(--bpm-space-4); }
.bpm-auth__brand { display: flex; flex-direction: column; align-items: center; gap: var(--bpm-space-2); padding-top: var(--bpm-space-7); text-align: center; }
.bpm-auth__mark { width: 64px; height: auto; }
.bpm-auth__word { font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-semibold); letter-spacing: -0.01em; color: var(--bpm-ink-strong); }
.bpm-auth__line { max-width: 28ch; color: var(--bpm-ink-2); }
.bpm-auth__head { padding-top: var(--bpm-space-5); }
.bpm-auth__head .bpm-title { font-size: var(--bpm-type-largetitle); font-weight: var(--bpm-fw-largetitle); line-height: 1.15; }
.bpm-auth__head p { margin-top: var(--bpm-space-2); color: var(--bpm-ink-2); }
.bpm-auth__glyph { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--bpm-space-4); border-radius: 50%; background: var(--bpm-primary-tint); color: var(--bpm-primary-ink); }
.bpm-auth__form { margin-top: var(--bpm-space-6) !important; }
.bpm-auth__alt { display: flex; flex-direction: column; align-items: center; gap: 0; }
.bpm-auth__legal { font-size: var(--bpm-type-caption); color: var(--bpm-ink-2); text-align: center; }
.bpm-auth__legallinks { display: flex; justify-content: center; gap: var(--bpm-target-gap); margin-top: 0 !important; }
.bpm-auth__legallinks .bpm-textlink { font-size: var(--bpm-type-footnote); }
.bpm-auth__spacer { flex: 1 1 auto; min-height: var(--bpm-space-6); }
.bpm-auth__foot { display: flex; justify-content: center; margin-top: 0 !important; }
.bpm-auth__signing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--bpm-space-3); flex: 1 1 auto; text-align: center; }
.bpm-auth__signing img { width: 96px; height: 96px; }

.bpm-auth__mark--small { width: 40px; margin-bottom: var(--bpm-space-3); }
.bpm-roles__yard { display: flex; align-items: center; gap: var(--bpm-space-3); padding: var(--bpm-space-2) 0; }
.bpm-brandfoot {
  display: flex; align-items: center; justify-content: center; gap: var(--bpm-space-2);
  padding-top: var(--bpm-space-6);
  color: var(--bpm-ink-2);
  font-size: var(--bpm-type-footnote);
}
.bpm-brandfoot img { width: 20px; height: auto; }

/* 17 ─ small helpers the screens share ─────────────────────────────────── */

.bpm-center { text-align: center; }
.bpm-note { display: flex; align-items: center; justify-content: center; gap: 0; color: var(--bpm-ink-2); font-size: var(--bpm-type-footnote); }
.bpm-note + [id] { margin-top: 0 !important; text-align: center; }
.bpm-detailhead { display: flex; align-items: center; justify-content: space-between; gap: var(--bpm-space-3); flex-wrap: wrap; }
.bpm-statuslist { display: flex; flex-wrap: wrap; gap: var(--bpm-space-2); }
.bpm-statuslist > * + * { margin-top: 0 !important; }
.bpm-money__row--rule { margin-top: var(--bpm-space-2); padding-top: var(--bpm-space-3); border-top: 1px solid var(--bpm-hairline); }

.bpm-reveal__hide { display: none; }
.is-revealed .bpm-reveal__show { display: none; }
.is-revealed .bpm-reveal__hide { display: inline-block; }

/* A component shown on its own inside a Components screen. */
.bpm-demo { border-radius: var(--bpm-radius-card); overflow: hidden; background: var(--bpm-surface); }
.bpm-appbar--demo { padding: 0; }

/* Scanner viewfinder (dark on purpose: a camera feed sits behind it). */
.bpm-viewfinder {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 3 / 4;
  max-height: 56vh;
  margin: 0 auto;
  border-radius: 20px;
  background: var(--bpm-device);
  overflow: hidden;
}
.bpm-viewfinder__reticle {
  width: 72%; height: 34%;
  border-radius: 14px;
  box-shadow: 0 0 0 2px var(--bpm-device-ink), 0 0 0 999px var(--bpm-scrim);
}
.bpm-viewfinder__line { position: absolute; left: 18%; right: 18%; top: 50%; height: 2px; background: var(--bpm-state); }

/* 18 ─ the welcome screen: the water, the mark, one button ─────────────── */
/* Owner, 2026-09-11: "i like mobile apps that have the login button at the
   bottom with a graphic filling the rest of the view, we could do a same
   thing with the waves we did with the landing page, with boat portals logo."
   The graphic IS the landing page's water: the same generated canvas, the
   same script (static/marketing/waves.js, reused, not copied) and the same
   navy -> teal palette. Under prefers-reduced-motion the script draws one
   still frame and never starts a loop. */

.bpm-screen--water {
  /* The ground the water sits in: the owner's top-bar bands, top to bottom,
     as one soft ramp instead of four hard stops. */
  background: linear-gradient(180deg, var(--bp-band-1) 0%, var(--bp-band-3) 62%, var(--bp-band-4) 100%);
  color: var(--bpm-bar-ink);
}
/* Full bleed: the water runs into all four safe areas, and the pieces on top
   of it carry their own insets. Written at the same specificity as the
   "screen with no app bar owns the top inset" rule above, and after it. */
.bpm-screen--water > .bpm-content,
.bpm-screen--water > .bpm-content:first-child { padding: 0; }

.bpm-welcome {
  /* The four layers waves.js fills, back to front — the same four tokens the
     landing page's hero uses (static/marketing/site.css §11). They inherit
     down to the canvas, which is where the script reads them. */
  --bpm-wave-1: var(--bp-band-4);
  --bpm-wave-2: var(--bp-primary);
  --bpm-wave-3: var(--bp-accent-ink);
  --bpm-wave-4: var(--bp-accent);

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.bpm-welcome__waves {
  position: absolute;
  left: 0; bottom: 0;
  /* WIDTH IS EXPLICIT, and must stay that way. A <canvas> is a REPLACED
     element: absolutely positioned with `width: auto`, CSS resolves it to the
     element's INTRINSIC width and ignores `right`. waves.js sets
     `canvas.width` every time it measures, which changes that intrinsic
     width — so `left:0; right:0` fed a growth loop (300 -> 1056 -> 1147 CSS
     px on a 393px phone), clipped out of sight by .bpm-content's
     overflow-x, with the wave field scaled to a box three times too wide. */
  width: 100%;
  height: 62%;
  z-index: 0;
  pointer-events: none;               /* never eats the button's tap */
  /* A stencil, not a colour: the top edge of the water dissolves into the
     navy so the canvas never ends on a visible seam. */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 46%);
          mask-image: linear-gradient(180deg, transparent 0%, black 46%);
}
.bpm-welcome__brand {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--bpm-space-4);
  padding: calc(var(--bpm-safe-top) + var(--bpm-space-8))
           calc(var(--bpm-gutter) + var(--bpm-safe-right))
           var(--bpm-space-6)
           calc(var(--bpm-gutter) + var(--bpm-safe-left));
  text-align: center;
}
.bpm-welcome__mark { width: min(150px, 42vw); height: auto; }
.bpm-welcome__word {
  font-size: var(--bpm-type-largetitle);
  font-weight: var(--bpm-fw-largetitle);
  letter-spacing: -0.01em;
  color: var(--bpm-bar-ink);
}
.bpm-welcome__word:focus { outline: none; }
.bpm-welcome__foot {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bpm-space-2);
  padding: var(--bpm-space-4)
           calc(var(--bpm-gutter) + var(--bpm-safe-right))
           calc(var(--bpm-safe-bottom) + var(--bpm-space-5))
           calc(var(--bpm-gutter) + var(--bpm-safe-left));
}
/* The staff door, on water: the quiet link's grey would be unreadable on
   navy, so it takes the bar's muted white. Still not a button. */
.bpm-quietlink--onwater { color: var(--bpm-bar-ink-muted); text-decoration-color: var(--bpm-bar-ink-muted); }

/* 19 ─ boat card and big tappable choices ──────────────────────────────── */

.bpm-boatcard {
  display: flex;
  align-items: center;
  gap: var(--bpm-space-4);
  padding: var(--bpm-space-3);
  border-radius: var(--bpm-radius-card);
  background: var(--bpm-surface);
}
.bpm-android .bpm-boatcard { box-shadow: var(--bpm-elev-1); }
/* The photo well. Until there is a photo it is a tinted tile with the boat
   glyph — colour that says "this is your boat", not decoration. */
.bpm-boatcard__photo {
  flex: none;
  display: grid;
  place-items: center;
  width: 92px;
  height: 78px;
  border-radius: 12px;
  background: var(--bpm-state-tint);
  color: var(--bpm-state-ink);
}
/* The one number on a card that has to be readable across a cockpit. */
.bpm-largeamount {
  font-size: var(--bpm-type-largetitle);
  font-weight: var(--bpm-fw-largetitle);
  line-height: 1.1;
  color: var(--bpm-ink-strong);
}
.bpm-choicefield { min-width: 0; }
.bpm-boatcard__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.bpm-boatcard__name { font-size: var(--bpm-type-title); font-weight: var(--bpm-fw-title); color: var(--bpm-ink-strong); overflow-wrap: anywhere; }
.bpm-boatcard__line { font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }

/* "What do you need?" — one tap, no typing, nothing small. */
.bpm-choices { display: flex; flex-direction: column; gap: var(--bpm-target-gap); }
.bpm-choices__label { display: block; margin-bottom: var(--bpm-space-2); font-size: var(--bpm-type-subhead); font-weight: var(--bpm-fw-medium); color: var(--bpm-ink); }
.bpm-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--bpm-space-3);
  width: 100%;
  min-height: 64px;
  padding: var(--bpm-space-2) var(--bpm-space-4);
  border: 1px solid var(--bpm-hairline-strong);
  border-radius: var(--bpm-radius-card);
  background: var(--bpm-surface);
  color: var(--bpm-ink);
  font: inherit;
  font-size: var(--bpm-type-body);
  font-weight: var(--bpm-fw-medium);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bpm-choices--compact .bpm-choice { min-height: 56px; }
.bpm-choice__glyph {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bpm-primary-tint);
  color: var(--bpm-primary-ink);
}
.bpm-choice__label { flex: 1 1 auto; min-width: 0; }
.bpm-choice__check { flex: none; color: var(--bpm-on-primary); opacity: 0; }
.bpm-choice:active { background: var(--bpm-press); }
.bpm-choice[aria-checked='true'] {
  border-color: var(--bpm-primary);
  box-shadow: inset 0 0 0 1px var(--bpm-primary);
  background: var(--bpm-primary-tint);
}
.bpm-choice[aria-checked='true'] .bpm-choice__glyph { background: var(--bpm-primary); color: var(--bpm-on-primary); }
.bpm-choice[aria-checked='true'] .bpm-choice__check { opacity: 1; color: var(--bpm-primary-ink); }

/* The request sheet's presets — the yard's own services, one tap each. A
   preset SENDS, so it is not a `.bpm-choice` (which only picks): no check
   mark, no pressed state to leave behind, and never an amount beside it. */
.bpm-presets { min-width: 0; }
.bpm-presets__label {
  display: block;
  margin-bottom: var(--bpm-space-2);
  font-size: var(--bpm-type-subhead);
  font-weight: var(--bpm-fw-medium);
  color: var(--bpm-ink);
}
.bpm-presets__list { display: flex; flex-direction: column; gap: var(--bpm-target-gap); }
.bpm-preset {
  display: flex;
  align-items: center;
  gap: var(--bpm-space-3);
  width: 100%;
  min-height: var(--bpm-target-primary);
  padding: var(--bpm-space-2) var(--bpm-space-4) var(--bpm-space-2) var(--bpm-space-2);
  border: 1px solid var(--bpm-hairline-strong);
  border-radius: var(--bpm-radius-card);
  background: var(--bpm-surface);
  color: var(--bpm-ink);
  font: inherit;
  font-size: var(--bpm-type-body);
  font-weight: var(--bpm-fw-medium);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bpm-preset:active { background: var(--bpm-press); }
.bpm-preset__glyph {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bpm-primary-tint);
  color: var(--bpm-primary-ink);
}
.bpm-preset__label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* 20 ─ the sign-in providers: Apple, Google, email ──────────────────────── */
/* Owner, 2026-09-21: "lets add a few new login options. sign in with google,
   sign in with apple (only ios and desktop), and sign in with email. use the
   correct logos."

   Two of these three buttons are TRADEMARKS and the third is ours. The two
   brand marks are their own files (static/app/mobile/brand/*.svg) drawn with
   <img>, never through the Lucide macro and never recoloured — CLAUDE.md's
   never-a-fill-glyph rule is about OUR icons and does not reach a company's
   logo. Their colours are the `--bpm-brand-*` tokens, the only literal
   colours in the mobile layer (tokens.css says why).

   Rules followed, from the two published guidelines:
     Apple  (developer.apple.com HIG > Sign in with Apple > Buttons)
       · black button, white logo, white title — or the exact inverse;
       · at least 44pt tall (ours is 56px) with a clear margin around the
         button of at least 1/10 of its height;
       · the title is the system font, and only Apple's own wording;
       · "You can adjust the space between the logo and the button's leading
         edge if you need to horizontally align the Apple logo with other
         authentication logos" — which is exactly what the shared mark column
         below does.
     Google (developers.google.com/identity/branding-guidelines, light theme)
       · fill #FFFFFF, 1px INSIDE stroke #747775, title #1F1F1F;
       · the standard four-colour "G", never recoloured, never alone without
         the button and the words;
       · Google Sans Medium, falling back to Roboto (Android's system face).
   Both specify a smaller button than the owner's 56px floor for older hands,
   so the whole button is scaled UP and the mark and title keep their
   proportion to it. Nothing about either mark itself is altered. */

.bpm-btn--apple, .bpm-btn--google, .bpm-btn--onwater-line {
  /* One grid for all three, so the marks line up down the stack and the
     words sit on one axis: [mark] [title] [mirror of the mark column]. */
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  align-items: center;
  gap: var(--bpm-space-3);
  width: 100%;
  min-height: var(--bpm-target-primary);
  padding: 0 var(--bpm-space-4);
  font-size: var(--bpm-type-body);
  font-weight: var(--bpm-fw-medium);
}
.bpm-btn--apple .bpm-providermark,
.bpm-btn--google .bpm-providermark,
.bpm-btn--onwater-line .bpm-providermark {
  justify-self: center;
  pointer-events: none;            /* the mark never eats the button's tap */
}
.bpm-providermark--apple { width: auto; height: 23px; }
.bpm-providermark--google { width: 24px; height: 24px; }

.bpm-btn--apple {
  background: var(--bpm-brand-apple-bg);
  color: var(--bpm-brand-apple-ink);
  font-family: var(--bpm-brand-apple-font);
}
.bpm-btn--google {
  background: var(--bpm-brand-google-bg);
  color: var(--bpm-brand-google-ink);
  font-family: var(--bpm-brand-google-font);
  /* INSIDE stroke, per the guideline: an inset shadow, so the button's box
     stays exactly 56px and the three buttons keep one height. */
  box-shadow: inset 0 0 0 1px var(--bpm-brand-google-stroke);
}
/* Ours. On the water the two brand buttons are already black and white, so a
   third filled button would read as a fourth brand. This one is the app's
   own: the water shows through, the edge and the words are the bar's white. */
.bpm-btn--onwater-line {
  background: transparent;
  color: var(--bpm-bar-ink);
  box-shadow: inset 0 0 0 2px var(--bpm-bar-ink);
}
.bpm-btn--onwater-line:active { background: var(--bpm-bar-press); }

/* The stack of ways in, in the thumb zone. 8px apart (the target gap), with
   the quiet staff door held off the last button so it is never mis-tapped. */
.bpm-welcome__ways { display: flex; flex-direction: column; gap: var(--bpm-target-gap); width: 100%; }
.bpm-welcome__foot .bpm-quietlink { margin-top: var(--bpm-space-1); }

/* 21 ─ the accounts screen ─────────────────────────────────────────────── */
/* Owner, 2026-09-21: "once you login, it should show your accounts (employee,
   customer, admin, etc)" and "they shouldnt have to select client type after
   every time they open the app too." One tap per account, the yard's name
   under it, and the row is as big as the thing it decides. */
.bpm-accounts .bpm-cell--link { min-height: 76px; }
.bpm-accounts .bpm-cell__title { font-size: var(--bpm-type-headline); font-weight: var(--bpm-fw-headline); color: var(--bpm-ink-strong); }
.bpm-accounts .bpm-cell__sub { font-size: var(--bpm-type-body); color: var(--bpm-ink-2); }
/* The screen fills the phone: the accounts at the top, the mark at the foot,
   and the empty space between the two rather than piled under everything. */
.bpm-screen--accounts > .bpm-content { display: flex; flex-direction: column; }
.bpm-screen--accounts .bpm-brandfoot { margin-top: auto; }

/* Who is signed in, above the list: the address, once, quietly. */
.bpm-signedin { display: flex; flex-direction: column; gap: 2px; padding: var(--bpm-space-2) var(--bpm-space-1) 0; }
.bpm-signedin__who { font-size: var(--bpm-type-body); color: var(--bpm-ink-strong); font-weight: var(--bpm-fw-medium); overflow-wrap: anywhere; }
.bpm-signedin__note { font-size: var(--bpm-type-footnote); color: var(--bpm-ink-2); }

/* 22 ─ the first-run asks: a password, and notifications ───────────────── */
/* Both are OFFERED, never forced, so both end in a full-width primary and a
   plain Not now under it. The notifications one puts its pair in the action
   bar at the bottom of the screen, because the button is what reaches the
   system prompt and the reasons above it are what earn the tap. */
.bpm-actionbar--stack { flex-direction: column; }
.bpm-actionbar--stack > .bpm-btn { flex: none; width: 100%; }
.bpm-reasons { margin-top: var(--bpm-space-2); }

/* ── Wave ES1c — the yard's LOGO in the mark's slot ────────────────────────
   Owner, 2026-11-14: *"Riverfront needs the logo, same at top bar in
   admin."* The initials square stays for a yard that has uploaded nothing,
   so the two have to occupy the SAME box — otherwise the bar's layout moves
   depending on whose yard it is.

   `contain`, never `cover`: a wordmark is wider than it is tall and cropping
   it to a square is cropping the name. No background and no radius either —
   the square tile belongs to the initials, which need a surface to sit on;
   a logo IS the mark and a tile around it is a second frame. */
.bpm-yardmark--logo {
  background: none;
  border-radius: 0;
  object-fit: contain;
  object-position: left center;
  width: auto;
  max-width: 132px;
}
/* AND THE TILE HAS TO BE CLEARED WHERE IT IS SET, which is not here.
   `.bpm-appbar .bpm-yardmark` gives the mark a white rounded square — right
   for two letters, which need a surface to sit on — and it is TWO classes,
   so it outranked the one-class `--logo` rule above and the square survived.
   Owner, 2026-11-15: *"why is there the white background for logo."*

   Worse than cosmetic: a yard uploads `logo_dark` precisely because it is a
   LIGHT file for a dark header, so a white tile under it hid the mark
   completely — his bar showed an empty white box.

   The initials keep their tile; only the logo variant clears it, at the
   specificity the tile was set at. */
.bpm-appbar .bpm-yardmark--logo,
.bpm-sidebar .bpm-yardmark--logo {
  background: none;
  border-radius: 0;
  width: auto;
}
.bpm-appbar .bpm-yardmark--logo { height: 30px; max-width: 120px; }
.bpm-sidebar .bpm-yardmark--logo { height: 28px; }
