@charset "UTF-8";
/* app.scss
   Outline: single entry point; partial order matters — tokens first,
     print last so its overrides win.
   Purpose: `npm run css` → sass src/styles/app.scss public/css/app.css.
     The compiled file is a committed build artifact — never hand-edit
     it; rerun the script after any change here. */
/* _tokens.scss
   Outline: every design token as a CSS custom property — light palette on
     :root, dark palette as an override on [data-theme="dark"]. Type, spacing,
     radii, shadows, focus, touch-target, layout widths.
   Purpose: single source of truth; no raw values anywhere else.
   Why custom properties: dark mode is a property swap, not a 2nd stylesheet.
     When the manual toggle ships, mirror the dark block inside
     `@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) }`
     (an SCSS mixin keeps the two in sync). */
:root {
  /* type ------------------------------------------------------------ */
  --font-ui: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --text-xs: 0.75rem; /* 12 — captions, th labels. Floor; never smaller */
  --text-sm: 0.84375rem; /* 13.5 — secondary UI, numerics */
  --text-base: 0.9375rem; /* 15 — body */
  --text-md: 1.0625rem; /* 17 — section headings */
  --text-lg: 1.375rem; /* 22 — sub-page titles, big numerals */
  --text-xl: 1.75rem; /* 28 — page h1 */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.25;
  --leading-base: 1.5;
  /* spacing (4px base) ---------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3.5rem;
  /* radii ------------------------------------------------------------ */
  --radius-sm: 6px; /* inputs, cell-edit */
  --radius-md: 9px; /* buttons */
  --radius-lg: 12px; /* cards, dialogs */
  --radius-full: 999px; /* badges */
  /* layout ----------------------------------------------------------- */
  --content-narrow: 45rem;
  --content-wide: 60rem;
  /* The Production Calendar's two-column grid+rail needs more room than the
     widest resource page (Feature 3.1); body.xwide opts into it. */
  --content-xwide: 75rem;
  --touch-target: 44px; /* min hit size on kitchen surfaces */
  /* light palette ------------------------------------------------------
     Butter & Ink: near-black warm ink on paper white; butter accent.
     accent       = fills (primary buttons, focus) — pair with on-accent ink
     accent-strong= text-safe accent (links, ghost buttons) — AA on surface
     accent-soft  = washes (active nav, hovers, highlights) */
  --color-bg: #fbfaf7;
  --color-surface: #ffffff;
  --color-surface-sunken: #f6f3ec; /* add-form strips, tfoot, page wells */
  --color-text: #17140f;
  --color-text-muted: #6e675c;
  --color-border: #e8e4db;
  --color-border-strong: #d3cdc0;
  --color-accent: #f0b429;
  --color-accent-hover: #e2a61c;
  --color-accent-strong: #7d5b04;
  --color-accent-soft: #faf0d0;
  --color-on-accent: #241a04;
  --color-success: #2e7d43;
  --color-success-soft: #e3f1e6;
  --color-warn: #a06c0a;
  --color-warn-soft: #f6ecd2;
  --color-danger: #b3362b;
  --color-danger-hover: #9c2c22;
  --color-danger-soft: #f9e7e4;
  /* Chart baseline series (§8c-108 delivery-log chart): the neutral "sent"
     mark that --color-danger stacks on. Validated with the dataviz palette
     checker against --color-danger in each theme (light: CVD ΔE 10.0,
     normal 17.3, both ≥3:1 on the surface). Deliberately gray — it is the
     baseline, not an identity. */
  --color-chart-neutral: #8a8170;
  --color-on-danger: #ffffff;
  /* effects ------------------------------------------------------------ */
  --shadow-1: 0 1px 2px rgba(23, 20, 15, 0.05);
  --shadow-2: 0 1px 2px rgba(23, 20, 15, 0.05), 0 4px 16px rgba(23, 20, 15, 0.06);
  --focus-ring: 2px solid var(--color-accent-strong);
  --focus-ring-offset: 2px;
}

/* dark palette — warm dark (hint of brown in the blacks), per direction.
   accent-strong flips to a LIGHT butter so links/ghosts stay readable.
   One mixin, two emission sites (U11): the explicit [data-theme=dark]
   attribute (manual toggle) and the OS preference when the user hasn't
   chosen — :root:not([data-theme=light]) inside the media query, so an
   explicit light choice always beats a dark OS. */
[data-theme=dark] {
  --color-bg: #1a1712;
  --color-surface: #241f18;
  --color-surface-sunken: #1f1b14;
  --color-text: #f1ede4;
  --color-text-muted: #a79e8e;
  --color-border: #363026;
  --color-border-strong: #4b4334;
  --color-accent: #f3c14b;
  --color-accent-hover: #eeb838;
  --color-accent-strong: #f7d077;
  --color-accent-soft: #3b321a;
  --color-on-accent: #241a04;
  --color-success: #6cc183;
  --color-success-soft: #23362a;
  --color-warn: #d9a83e;
  --color-warn-soft: #3a2f18;
  --color-danger: #e2766b;
  --color-danger-hover: #e98c82;
  --color-danger-soft: #422522;
  /* dark step of the chart baseline (vs #e2766b: CVD ΔE 10.3, ≥3:1) */
  --color-chart-neutral: #736a59;
  --color-on-danger: #2b0f0b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --focus-ring: 2px solid var(--color-accent-strong);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --color-bg: #1a1712;
    --color-surface: #241f18;
    --color-surface-sunken: #1f1b14;
    --color-text: #f1ede4;
    --color-text-muted: #a79e8e;
    --color-border: #363026;
    --color-border-strong: #4b4334;
    --color-accent: #f3c14b;
    --color-accent-hover: #eeb838;
    --color-accent-strong: #f7d077;
    --color-accent-soft: #3b321a;
    --color-on-accent: #241a04;
    --color-success: #6cc183;
    --color-success-soft: #23362a;
    --color-warn: #d9a83e;
    --color-warn-soft: #3a2f18;
    --color-danger: #e2766b;
    --color-danger-hover: #e98c82;
    --color-danger-soft: #422522;
    /* dark step of the chart baseline (vs #e2766b: CVD ΔE 10.3, ≥3:1) */
    --color-chart-neutral: #736a59;
    --color-on-danger: #2b0f0b;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --focus-ring: 2px solid var(--color-accent-strong);
  }
}
/* _base.scss
   Outline: minimal reset, element defaults, typography, focus ring,
     visually-hidden utility, .no-print marker class.
   Purpose: everything an unclassed element gets for free. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}

h2 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* one focus treatment everywhere — never remove, only restyle */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* numerals: mono everywhere a number column appears */
.num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--color-text-muted);
}

/* A NEGATIVE margin — a product priced below what it costs to make (the
   storefront list's Margin column and the editor's price hint, 2026-11-01).
   Color is a second signal, never the only one: the value itself carries a
   minus sign, so the loss reads without color vision. */
.is-loss {
  color: var(--color-danger);
  font-weight: var(--weight-semibold);
}

/* a11y — load-bearing, do not restyle away */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* _nav.scss
   Outline: app shell top nav — wordmark, links w/ active state, identity +
     logout, theme toggle slot. Wraps to two rows under 760px with a
     horizontally scrollable link row (no JS). Plus .subnav, the
     second-level tab row a section shows under its page title (§8c-121).
   Purpose: replaces today's plain-links nav; brand presence via wordmark. */
.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  padding: 0 var(--space-6);
  min-height: 56px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.app-nav__wordmark {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.app-nav__wordmark:hover {
  text-decoration: none;
}

/* the butter dot — entire brand mark; cheap, scales, works in print-none */
.app-nav__wordmark::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-left: 3px;
}

.app-nav__links {
  display: flex;
  gap: var(--space-1);
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-nav__links::-webkit-scrollbar {
  display: none;
}

.app-nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.app-nav__link:hover {
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface-sunken);
}

.app-nav__link.is-active {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  background: var(--color-accent-soft);
}

.app-nav__user {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.app-nav__company {
  opacity: 0.75;
}

/* User menu — the display-name dropdown (markup: partials/nav.hbs, behaviour:
   public/js/user-menu.js). The wrapper anchors the absolutely-positioned
   panel. */
.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  white-space: nowrap;
}

.user-menu__trigger:hover,
.user-menu__trigger[aria-expanded=true] {
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
}

.user-menu__caret {
  font-size: 0.7em;
  color: var(--color-text-muted);
  transition: transform 0.12s ease;
}

.user-menu__trigger[aria-expanded=true] .user-menu__caret {
  transform: rotate(180deg);
}

.user-menu__panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 20;
  min-width: 12rem;
  /* `relative`-equivalent positioning context for the floating close button;
     `absolute` already establishes one, so its X anchors to this panel. */
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

/* The panel toggles via the `hidden` attribute (set by user-menu.js). Author
   `display: flex` above outranks the UA stylesheet's `[hidden]{display:none}`,
   so we must re-assert it here — otherwise the panel is permanently visible.
   This selector is more specific than `.user-menu__panel`, so hidden wins. */
.user-menu__panel[hidden] {
  display: none;
}

/* Menu rows live in their own flow container so the floating close button
   (taken out of flow below) can't claim a row or disturb their spacing.
   The top padding reserves a clear corner band for the X. */
.user-menu__items {
  display: flex;
  flex-direction: column;
}

/* Close (X) floats in the panel's top-right corner, out of normal flow. */
.user-menu__close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: var(--text-md);
  line-height: 1;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.user-menu__close:hover {
  background: var(--color-surface-sunken);
  color: var(--color-text);
}

.user-menu__form {
  margin: 0;
}

.user-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font: inherit;
  white-space: nowrap;
}

.user-menu__item:hover {
  background: var(--color-surface-sunken);
}

/* The logout item is a submit button; strip the native chrome so it reads as
   a menu row identical to the links beside it. */
.user-menu__item--button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* ---- subnav — a section's own second-level tabs (§8c-121) --------------
   Markup: partials/storefront-tabs.hbs — a <nav class="subnav"> of plain
   links under the page title, the current one .is-active. An underline row
   rather than the top nav's filled pills, so the two levels never read as
   one bar. Scrolls sideways instead of wrapping when the row is too long
   (same no-JS treatment as .app-nav__links). */
.subnav {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav::-webkit-scrollbar {
  display: none;
}

.subnav__link {
  padding: var(--space-2) var(--space-3);
  /* the active underline sits ON the row's border, not above it */
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.subnav__link:hover {
  text-decoration: none;
  color: var(--color-text);
  border-bottom-color: var(--color-border-strong);
}

.subnav__link.is-active {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  border-bottom-color: var(--color-accent);
}

/* small screens: wordmark+user on row 1, links scroll on row 2 */
@media (max-width: 760px) {
  .app-nav {
    padding: var(--space-2) var(--space-4);
  }
  .app-nav__links {
    order: 3;
    flex-basis: 100%;
    margin: 0 calc(-1 * var(--space-4));
    padding: 0 var(--space-4) var(--space-2);
  }
  .app-nav__user {
    margin-left: auto;
  }
  .app-nav__company {
    display: none;
  } /* identity shrinks to name */
}
/* _buttons.scss
   Outline: .button + variants (primary / secondary / ghost / danger),
     sizes (sm / kitchen-tall), icon-only buttons, block. Applies identically
     to <button>, <a class="button">, and <button> inside POST <form>s.
   Purpose: one button system; kills today's ad-hoc sizing + inline-styled
     POST forms (give the form .inline-form instead of style attrs). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  padding: 0 var(--space-4);
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  text-decoration: none;
}

.button--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.button--primary:hover {
  background: var(--color-accent-hover);
}

.button--secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}

.button--secondary:hover {
  background: var(--color-surface-sunken);
}

.button--ghost {
  color: var(--color-accent-strong);
}

.button--ghost:hover {
  background: var(--color-accent-soft);
}

/* destructive: soft by default; solid reserved for dialog confirm */
.button--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.button--danger:hover {
  background: var(--color-danger);
  color: var(--color-on-danger);
}

.button--danger-solid {
  background: var(--color-danger);
  color: var(--color-on-danger);
}

.button--danger-solid:hover {
  background: var(--color-danger-hover);
}

/* Apple Pay — a COSMETIC storefront checkout button (payment-methods build,
   Chunk 4): it submits the checkout form to the SAME path as the card button
   and redirects to Stripe Checkout, which presents the real Apple Pay wallet
   on supported devices. There is no wallet integration behind it. Rendered in
   Apple's familiar black-with-white-mark chrome, HELD to that look in both
   light and dark themes (the mark is a fixed brand asset, not a themed
   control) so buyers recognise it. */
.button--apple-pay {
  background: #000;
  color: #fff;
}

.button--apple-pay:hover {
  background: #1a1a1a;
}

/* Apple's "Apple Pay" wordmark (apple glyph + "Pay" as one vector) centred in
   the button, so it matches the system Apple Pay button rather than pairing a
   glyph with our own font. Sized taller than a text cap-height because the
   wordmark's own type sits within its viewBox; width auto keeps the 105:43
   aspect ratio. */
.apple-pay-mark {
  width: auto;
  height: 1.45em;
  display: block;
}

/* Venmo & PayPal — COSMETIC brand-styled buttons used only in the settings
   LIVE PREVIEW (payment-methods build). The real storefront Venmo/PayPal
   buttons are drawn by PayPal's JS SDK in a later chunk (brand-compliant
   official assets); these approximate each brand's look — held to the brand
   colour in BOTH themes, like .button--apple-pay — so a baker previewing their
   checkout sees the button, not a generic chip. */
.button--venmo {
  background: #008cff;
  color: #fff;
}

.button--venmo:hover {
  background: #0a7fe0;
}

/* "Venmo" wordmark: Venmo sets its mark in a bold rounded sans — approximated
   with our heaviest UI weight, slightly tightened. */
.venmo-mark {
  font-weight: var(--weight-bold);
  font-size: 1.05em;
  letter-spacing: -0.01em;
}

.button--paypal {
  background: #ffc439;
  color: #003087; /* the "Pay" dark blue; the "Pal" half is re-coloured below */
}

.button--paypal:hover {
  background: #f0b72e;
}

/* "PayPal" wordmark lockup: "Pay" dark blue (inherited), "Pal" light blue,
   italic — matching PayPal's logo. */
.paypal-mark {
  font-style: italic;
  font-weight: var(--weight-bold);
  font-size: 1.05em;
}

.paypal-mark__pal {
  color: #009cde;
}

.button[disabled],
.button.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* sizes */
.button--sm {
  height: 30px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.button--block {
  width: 100%;
}

/* kitchen height — production run / calculator primary actions */
.button--tall {
  height: var(--touch-target);
  font-size: var(--text-base);
}

/* icon-only (↑ ↓ ×) — always with aria-label; ghost until hovered */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--color-text);
  background: var(--color-surface-sunken);
}

.icon-button--danger:hover {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

/* POST-action forms sit inline next to links/buttons without style attrs */
.inline-form {
  display: inline-flex;
}

/* button clusters (page actions, card header controls) */
.button-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

@media (pointer: coarse) {
  .icon-button {
    width: 36px;
    height: 36px;
  }
}
/* _google-button.scss
   Outline: a CSS replica of Google's RENDERED "Sign in with Google" button
     (pill shape, outline/light theme, large size, 4-colour G logo on the
     left) for the login page.
   Purpose: people recognize Google's own button, so we match its look — but
     it stays a plain <a> into our existing authorization-code flow
     (GET /auth/google). We deliberately do NOT load Google's GIS client
     library (that would swap us onto Google's ID-token credential flow);
     we only borrow the appearance.

   Design notes (a deliberate exception to the Butter & Ink tokens, UI.MD):
     - Google's brand spec: white fill, 1px #747775 border, fully-rounded
       pill, 40px tall, #1f1f1f label at 14px/500 in Google's own
       'Roboto', arial, sans-serif fallback chain (we don't bundle Roboto).
     - The button sizes to its CONTENT and is centred in the card (the .p
       wrapper centres it) — exactly how Google renders it. We do NOT stretch
       it full-width; stretching is what made an earlier attempt look broken. */
/* Centring wrapper: the button is inline-level, so text-align centres it. */
.google-signin {
  text-align: center;
}

.gsi-material-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px 0 12px; /* a touch more breathing room after the label */
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #747775;
  border-radius: 20px; /* == half the height -> full pill */
  color: #1f1f1f;
  font-family: "Roboto", arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.25px;
  line-height: 1;
  text-decoration: none; /* it's a link, not a button element */
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
}

/* The 4-colour G logo, sized to Google's 20px icon box. */
.gsi-material-button-icon {
  display: inline-flex;
  height: 20px;
  width: 20px;
}

.gsi-material-button-icon svg {
  display: block;
  height: 20px;
  width: 20px;
}

/* Google's subtle hover/active feedback: a faint grey wash + lift. */
.gsi-material-button:hover {
  background-color: #f7f8f8;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:active {
  background-color: #f1f3f4;
}

.gsi-material-button:focus-visible {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}

/* _badges.scss
   Outline: .badge + tone modifiers; .badge-list (a wrapping row of them).
     Used for run status, roles, multi / bake-together markers, read-only
     flag, and a recipe's special tags (§8c-105).
   Purpose: status is data from the presenter (label) + one class. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  line-height: 1;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Planned, roles, informational highlights */
.badge--accent {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

/* Completed */
.badge--success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

/* Read only, caution states */
.badge--warn {
  background: var(--color-warn-soft);
  color: var(--color-warn);
}

.badge--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* A wrapping row of badges rendered as a <ul> — a recipe's special tags on
   the recipe page and the product form's read-only summary (§8c-105). A list
   because a screen reader should announce "3 items", not one run-on phrase. */
.badge-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* _tables.scss
   Outline: .table — the dominant surface. Numeric columns (.num), sortable
     headers (aria-sort driven), row hover, empty / no-matches rows, tfoot
     summary rows, kitchen density via .page--kitchen or coarse pointers.
   Purpose: comfortable desktop density, finger-sized kitchen rows. */
.table-wrap {
  overflow-x: auto; /* long ingredient tables survive narrow screens */
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  /* The containing block for a screen-reader-only header label
     (`<th><span class="visually-hidden">Row actions</span></th>` — the
     action column on most tables). .visually-hidden is position: absolute,
     and an absolute box answers to its nearest POSITIONED ancestor, not to
     the .table-wrap scroller. With none inside the scroller, a label in a
     column that had scrolled off the right edge escaped it and widened the
     whole page: the recipe editor scrolled 14px sideways on a phone
     (found in the §8c-124 phone check). Anchoring it to its own cell keeps
     it inside the scroller. Header cells only, on purpose: body cells hold
     pop-ups (typeaheads, the unit picker) that must not be re-anchored. */
  position: relative;
}

.table td {
  font-size: var(--text-base);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

/* numeric columns right-align; .num sets mono (see _base) */
.table th.num,
.table td.num {
  text-align: right;
}

/* edge cells pick up the card's inner padding */
.table th:first-child,
.table td:first-child {
  padding-left: var(--space-5);
}

.table th:last-child,
.table td:last-child {
  padding-right: var(--space-5);
}

.table tbody tr:hover > td {
  background: color-mix(in oklab, var(--color-accent-soft) 35%, transparent);
}

/* summary rows (batch weight, totals) */
.table tfoot td {
  font-weight: var(--weight-semibold);
  background: var(--color-surface-sunken);
  border-bottom: none;
}

/* sortable headers — real <button> inside th, state via aria-sort on th */
th.sortable {
  padding: 0;
}

th.sortable .sort-button {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: var(--space-3) var(--space-3) var(--space-2);
  cursor: pointer;
}

th.sortable .sort-button:hover {
  color: var(--color-text);
}

th.sortable .sort-button::after {
  content: "↕";
  opacity: 0.4;
  font-size: var(--text-xs);
}

th.sortable[aria-sort=ascending] .sort-button::after {
  content: "↑";
  opacity: 1;
}

th.sortable[aria-sort=descending] .sort-button::after {
  content: "↓";
  opacity: 1;
}

th.sortable[aria-sort=ascending] .sort-button,
th.sortable[aria-sort=descending] .sort-button {
  color: var(--color-accent-strong);
}

/* empty + no-matches rows */
.table .empty-row td {
  padding: var(--space-7) var(--space-5);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* free-form notes column (ingredients / supplies lists): pre-wrap
   preserves user-entered newlines, max-width keeps long notes from
   blowing the table out, muted keeps primary columns dominant */
.table td.notes {
  white-space: pre-wrap;
  max-width: 20rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* A long note in a list's Notes column, held to two lines so one wordy row
   can't stretch the table (§8c-123). On an inner span, not the <td>: the
   clamp needs display:-webkit-box, which would stop a cell being a cell. */
.notes__clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* row controls column (move/delete) */
.table .row-controls {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}

/* The same column when it LEADS the row (the Storefront product list's
   reorder handle + ↑ ↓, §8c-121): left-aligned so the handle sits on the
   row's leading edge, where a grab affordance is expected. */
.table .row-controls--lead {
  text-align: left;
}

/* Secondary controls cluster inside a reorderable row's .row-controls — the
   ↑ ↓ × buttons, wrapped so they can be decluttered as ONE unit while the
   primary .sort-handle stays visible (shared convention, System Design §8c-66).
   Visually neutral today: inline-flex reproduces the buttons' current
   side-by-side flow exactly, so this wrapper changes nothing on its own.

   The single hook for a future "show on hover/focus" pass — when we're ready,
   it becomes roughly (do NOT enable without a keyboard/touch fallback, since
   pointer: coarse has no hover):
     .row-controls__secondary { opacity: 0; transition: opacity 120ms ease; }
     tr:hover .row-controls__secondary,
     tr:focus-within .row-controls__secondary { opacity: 1; } */
.row-controls__secondary {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* row-level data-completeness flag — sits under an ingredient name when its
   line can't be costed (missing price and/or weight conversion). Warn-toned
   and small so it reads as a heads-up, not an error; renders as a link to the
   ingredient editor for owners (a plain span for read-only members). */
.row-warning {
  display: flex; /* block-level container -> drops to its own line under the name */
  width: fit-content; /* but only as wide as its text, so the link target is tight */
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-warn);
  text-decoration: none;
}

a.row-warning:hover {
  text-decoration: underline;
}

/* production hint — sits under a recipe name on the order builder when the
   ordered count doesn't fill whole batches ("5 ordered · full batch yields
   12 · 7 surplus"). Same under-the-name placement as .row-warning but
   deliberately muted, not warn-toned: it's planning information (the line is
   already priced at batch scale), not a problem to fix. */
.production-hint {
  display: block; /* its own line under the recipe name */
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* A deal whose margin has slipped under target (§8c-117). Follows the base
   rule so its color wins at equal specificity. */
.production-hint--warn {
  color: var(--color-warn);
}

/* The order builder's lines on a phone. position: relative makes this scroller
   the containing block for each row's visually-hidden (absolute) labels, which
   otherwise escape it and widen the page. The min-width stops the auto table
   layout squeezing the Qty and price boxes to nothing to fit the notes in the
   Item column; the row scrolls instead. */
.table-wrap--order-lines {
  position: relative;
}

.table-wrap--order-lines .input--num {
  min-width: 4.5rem;
}

/* ---- ingredient quantity-unit toggle (Original units / Grams) -----------
   Sits atop the ingredient list on the recipe show page + edit builder. A
   small segmented control (same shape as the labor Simple/Advanced swap).
   Every row renders BOTH its original-unit value (.qty-original) and its
   grams value (.qty-grams); the toggle just flips which shows by adding
   .show-grams to the page <main> (driven by /js/recipe-unit-toggle.js), so
   there is no server round-trip and no client-side state to sync. */
.ingredients-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.ingredients-head .page-section-title {
  margin: 0;
}

.unit-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.unit-toggle__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.unit-toggle__btn {
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: var(--space-1) var(--space-3);
  cursor: pointer;
}

/* segment seams: round only the outer corners, drop the shared inner border */
.unit-toggle__btn:first-of-type {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.unit-toggle__btn:last-of-type {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
}

.unit-toggle__btn.is-active {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}

/* The grams view is the hidden twin until the toggle turns it on. */
.qty-grams {
  display: none;
}

main.show-grams .qty-original {
  display: none;
}

main.show-grams .qty-grams {
  display: inline;
}

/* Unit click-to-edit affordance: shows a word ("cups"), not a number, so it
   uses the UI font + muted tone (vs the mono numeric .cell-edit). */
.cell-edit--unit {
  font-family: var(--font-ui);
  font-variant-numeric: normal;
  color: var(--color-text-muted);
  margin-left: var(--space-1);
}

/* Inline <select> the unit picker swaps in (mirrors .cell-edit-input). */
.cell-edit-select {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1px var(--space-1);
  outline: 2px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
  outline-offset: 1px;
}

/* kitchen density — production run, calculator, mix screens */
.page--kitchen .table td {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  font-size: var(--text-md);
}

@media (pointer: coarse) {
  .table td {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
}
/* The Prep card (§8c-118). A stacked list so its controls stay on screen at
   phone width, where a table would scroll them out of reach. */
.prep-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prep-row {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
}

.prep-row:first-child {
  border-top: none;
}

.prep-row__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.prep-row__name {
  flex: 1 1 12rem;
}

.prep-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* Reuses the add-form's row layout, minus its sunken band. Two classes because
   _forms.scss loads later and would win a tie. */
.builder-add-form.prep-form {
  flex-wrap: wrap;
  padding: 0;
  background: none;
  border-top: none;
}

.prep-form .input {
  flex: 0 1 11rem;
  width: auto;
}

/* _cell-edit.scss
   Outline: click-to-edit numeric cells. <button class="cell-edit"
     data-edit="..."> swaps to <input class="cell-edit-input"> on click
     (Enter/blur commits, Esc cancels) — mechanic unchanged, affordance new.
   States: idle (dashed butter underline), hover (butter wash), editing
     (input + ring), .cell-edit--static (non-editable: reference rows,
     read-only users — honest plain text, no fake affordance).
   Purpose: replaces the bare dotted underline with something that reads
     "tap me" at arm's length without shouting on a 30-row table. */
.cell-edit {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: none;
  border: none;
  border-bottom: 1.5px dashed color-mix(in oklab, var(--color-accent) 55%, transparent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 2px var(--space-1);
  cursor: pointer;
}

.cell-edit:hover {
  background: var(--color-accent-soft);
  border-bottom-color: var(--color-accent);
  border-bottom-style: solid;
}

.cell-edit-input {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  width: 5.5em;
  text-align: right;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1px var(--space-1);
  outline: 2px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
  outline-offset: 1px;
}

/* text variant (staff display names) — same affordance, but names are
   words, not numbers: UI face, left-aligned, room to breathe */
.cell-edit--text,
.cell-edit-input--text {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-variant-numeric: normal;
  text-align: left;
}

.cell-edit-input--text {
  width: 14rem;
}

/* non-editable variant — same metrics, zero affordance */
.cell-edit--static {
  border-bottom-color: transparent;
  cursor: default;
}

.cell-edit--static:hover {
  background: none;
  border-bottom-color: transparent;
}

/* kitchen variant — bordered pill, full touch target */
.page--kitchen .cell-edit,
.cell-edit--kitchen {
  min-height: var(--touch-target);
  min-width: 56px;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  border: 1.5px dashed color-mix(in oklab, var(--color-accent) 55%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-accent-soft) 50%, transparent);
  padding: var(--space-1) var(--space-3);
}

.page--kitchen .cell-edit:hover,
.cell-edit--kitchen:hover {
  border-style: solid;
  background: var(--color-accent-soft);
}

.page--kitchen .cell-edit-input,
.cell-edit-input--kitchen {
  min-height: var(--touch-target);
  font-size: var(--text-md);
  width: 4.5em;
}

.page--kitchen .cell-edit--static,
.cell-edit--static.cell-edit--kitchen {
  border-color: transparent;
  background: none;
}

/* _sortable.scss
   Outline: styling for lists made drag-reorderable by the shared BFSortable
     engine (public/js/sortable.js) — the grab handle plus the drag-state
     transforms. Currently applied to recipe ingredient rows; any future
     sortable list reuses the same classes.
   Purpose: give the handle a "grab" affordance and make non-dragged items
     glide when they slide out of the way, while the dragged item tracks the
     pointer with NO transition (it must be pinned to the finger, not lag it).
   Logic / invariants:
     - The engine toggles three classes: `.is-sorting` on the container while a
       drag is live, `.is-sorting-item` on the row being dragged, and
       `.is-sorting-active` on <body>. Transforms themselves are set inline by
       the engine; this file only governs cursor, transition, and stacking. */
/* The grab handle. `touch-action: none` is essential: it stops the browser
   from claiming a vertical touch-drag for page scrolling, so Pointer Events
   see the whole gesture on a phone. */
.sort-handle {
  cursor: grab;
  touch-action: none;
}

.sort-handle:active,
.is-sorting-item .sort-handle {
  cursor: grabbing;
}

/* Non-dragged items glide to their shifted position. The engine sets the
   transform; this transition is what turns the jump into a slide that opens a
   visible gap. Kept off the dragged item, which must not lag the pointer. */
.is-sorting > *:not(.is-sorting-item),
.is-sorting-flow {
  transition: transform 160ms ease;
}

/* The item under the finger: lifted above its neighbors and de-emphasised
   just enough to read as "picked up", with no transition so it stays glued to
   the pointer. `position: relative` is what lets z-index apply to a <tr>. */
.is-sorting-item {
  position: relative;
  z-index: 2;
  transition: none;
  opacity: 0.9;
  box-shadow: var(--shadow-2);
  cursor: grabbing;
}

/* While any drag is live, kill text selection everywhere and keep the grab
   cursor even as the pointer strays off the handle. */
body.is-sorting-active {
  user-select: none;
  cursor: grabbing;
}

/* Users who prefer reduced motion get the reorder without the slide — the gap
   still opens, it just doesn't animate. */
@media (prefers-reduced-motion: reduce) {
  .is-sorting > *:not(.is-sorting-item),
  .is-sorting-flow {
    transition: none;
  }
}
/* _forms.scss
   Outline: stacked labeled fields, hints, required marks, validation error
     list, large Markdown textarea, callouts (derived-pricing notice, cycle
     warning), inline builder add-forms, list-page search input, the
     field-disclosure link toggle.
   Purpose: forms read as one calm column; errors are one obvious block. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
}

.field > label,
.field__heading {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.field .required {
  color: var(--color-danger);
  font-weight: var(--weight-bold);
}

.field .hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* A labeled group of fields inside a longer form (e.g. the bakery-config
   page's "Contact information" block, migration 039) — a light divider and
   heading, not a full card, so it reads as one section of the same form. */
.settings-section {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.settings-section__title {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.settings-section .hint {
  display: block;
  margin-bottom: var(--space-4);
}

/* Planned-mode pickup-date list (Session 4.2.5, bakery-configuration.hbs):
   one row per offered date, the remove form flush right. */
.pickup-dates-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}
.pickup-dates-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-variant-numeric: tabular-nums;
}

/* Inline checkbox + label (e.g. the sign-up "I agree to the Terms" row).
   Overrides the stacked-column default so the box sits beside its text. */
.field--check > label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-weight: var(--weight-normal);
}

.field--check input[type=checkbox] {
  flex: none;
}

/* Inline row of controls (the ingredient form's "amount + unit" buy size and
   the "1 cup = 120 g" conversion line). .input/.select default to full width,
   so shrink them to sit side by side. */
.input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.input-row .input,
.input-row .select {
  width: auto;
}

.input-row .input--num {
  flex: 0 1 7rem;
}

.input-row__label {
  color: var(--color-text-muted);
}

/* A row of stacked .field blocks (label + input) sharing one line, e.g.
   first/last name or city/state/ZIP. Wraps to stacked on narrow screens.
   Inputs fill their column rather than the default max-width cap. */
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.field-row > .field {
  flex: 1 1 8rem;
  min-width: 0;
}

.field-row > .field .input,
.field-row > .field .select {
  max-width: none;
}

.input,
.select,
.textarea {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  min-height: 38px;
  width: 100%;
  max-width: 28rem;
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
  border-color: var(--color-accent-strong);
}

.input--num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  max-width: 9rem;
  /* These are qty/price boxes, not counters — the browser's native up/down
     spin buttons add visual noise nobody uses. Keeps type="number"'s mobile
     numeric keypad and validation; only the stepper affordance is hidden. */
  -moz-appearance: textfield;
}

.input--num::-webkit-inner-spin-button,
.input--num::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Markdown preparation editor */
.textarea--markdown {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  min-height: 16rem;
  max-width: 100%;
  resize: vertical;
}

/* validation errors — one block above the form */
.form-errors {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-danger-soft);
  border: 1px solid color-mix(in oklab, var(--color-danger) 30%, transparent);
  border-radius: var(--radius-md);
  color: var(--color-danger);
  font-size: var(--text-sm);
}

.form-errors ul {
  margin: 0;
  padding-left: var(--space-4);
}

/* positive confirmation — same shape as .form-errors but success-coloured
   (e.g. the "password reset" notice above the login form) */
.form-notice {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-success-soft);
  border: 1px solid color-mix(in oklab, var(--color-success) 30%, transparent);
  border-radius: var(--radius-md);
  color: var(--color-success);
  font-size: var(--text-sm);
}

/* callouts — derived pricing (info) and cycle warning (danger) */
.callout {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
  margin-bottom: var(--space-5);
}

/* `display: flex` above outranks the UA stylesheet's `[hidden]{display:none}`,
   so callouts toggled via the `hidden` attribute (e.g. the labor-time warning,
   shown/hidden server-side and kept live by recipe-create.js) need this guard
   to actually disappear. */
.callout[hidden] {
  display: none;
}

.callout strong {
  font-weight: var(--weight-semibold);
}

.callout--danger {
  background: var(--color-danger-soft);
  border-color: color-mix(in oklab, var(--color-danger) 30%, transparent);
  color: var(--color-danger);
}

/* success confirmation (e.g. admin "plan limits saved") */
.callout--success {
  background: var(--color-success-soft);
  border-color: color-mix(in oklab, var(--color-success) 30%, transparent);
  color: var(--color-success);
}

/* non-blocking heads-up (e.g. a recipe with no labor time set) */
.callout--warn {
  background: var(--color-warn-soft);
  border-color: color-mix(in oklab, var(--color-warn) 30%, transparent);
  color: var(--color-warn);
}

/* downgrade trim wizard: dense keep/drop checkbox list (tiered plans) */
.trim-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-1) var(--space-4);
}

.trim-list__item label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  cursor: pointer;
}

/* inline add-forms under builder tables */
.builder-add-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface-sunken);
  border-top: 1px solid var(--color-border);
}

.builder-add-form .input {
  min-width: 0;
}

.builder-add-form .input--num {
  flex: 0 0 6rem;
}

/* …but only as a ROW child. Inside a labelled `.field` (a flex COLUMN — the
   product page's tier and option add forms) that same basis became the
   input's HEIGHT, drawing 96px-tall number boxes. There the field's own
   flex basis sets the width, so the input sizes like any other. */
.builder-add-form .field > .input--num {
  flex: none;
}

/* The per-line unit dropdown (units & conversions Chunk 4b) sits next to the
   amount; keep it compact rather than full width. */
.builder-add-form .select {
  width: auto;
  flex: 0 0 auto;
}

/* Muted "(2 cups)" note next to a row's canonical grams. */
.entered-unit {
  margin-left: var(--space-1);
  font-size: var(--text-xs);
}

/* the add-section form is a card of its own (no table above it), so
   the strip's separating border would double the card edge */
.builder-add-form.builder-add-section {
  border-top: none;
}

/* Admin plan pricing form (021/admin): stacks a title + a row per interval
   (label + price-id + amount) + the save button, inside the tier card. */
.admin-price-form {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}

.admin-price-form__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
}

.admin-price-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.admin-price-form__row .input {
  width: auto;
  flex: 1 1 12rem;
}

.admin-price-form__row .input--num {
  flex: 0 0 7rem;
}

.admin-price-form__row .input-row__label {
  flex: 0 0 4rem;
}

@media (max-width: 560px) {
  .builder-add-form {
    flex-wrap: wrap;
  }
  .builder-add-form .typeahead {
    flex-basis: 100%;
  }
}
/* list-page search */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.list-toolbar .input {
  max-width: 20rem;
}

/* A toolbar that carries more than the search box (the ingredients list's
   quick filters, §8c-123): let the pieces wrap onto a second line on a
   narrow screen instead of squeezing the search box. */
.list-toolbar--wrap {
  flex-wrap: wrap;
}

/* Quick filters beside a list's search box — a row of small buttons, one
   pressed at a time (list-search-sort.js). The count rides in the button,
   muted, so the label stays the thing you read. `[hidden]` guard: the strip
   is rendered hidden and revealed by the script, and display:flex would
   otherwise beat the UA's [hidden] rule. */
.list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.list-filters[hidden] {
  display: none;
}

.list-filters__count {
  margin-left: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* The ingredient form's live "that's $X per gram" line (§8c-123,
   /js/ingredient-form.js). Sits under the package-size boxes; empty — and
   therefore taking no space — until the script has something to say. */
.cost-readout {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cost-readout:empty {
  display: none;
}

.cost-readout strong {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

/* Inline email-fix field — the admin members table + the cross-tenant user
   directory (/admin/users). Its wrapper is .inline-form (display: inline-flex,
   which shrink-wraps to content), so a bare width:100% .input resolves against
   a shrink-to-fit container and collapses to min-content, hiding all but the
   first few characters of the address. Pin an explicit basis that shows a
   typical email and don't let flex shrink it below that; it still caps at the
   cell width and the row scrolls (.table-wrap) on truly narrow viewports. */
.input--email {
  flex: 0 0 auto;
  width: 22rem;
  max-width: 100%;
}

/* field-disclosure: a plain <details>/<summary> link toggle for an optional
   field group (e.g. the new-order form's "Or add a new customer"). Styled as
   clickable text, not a boxed section — .detail-group (_recipe-create.scss)
   is the heavier card variant used for the recipe form's collapsed groups. */
.field-disclosure {
  margin-bottom: var(--space-5);
}

.field-disclosure > summary {
  cursor: pointer;
  list-style: none;
  width: fit-content;
  font-size: var(--text-sm);
  color: var(--color-accent-strong);
}

.field-disclosure > summary::-webkit-details-marker {
  display: none;
}

.field-disclosure > summary:hover {
  text-decoration: underline;
}

/* Fields revealed inside the disclosure keep the standard .field rhythm;
   just add breathing room below the summary when open. */
.field-disclosure[open] > summary {
  margin-bottom: var(--space-4);
}

.field-disclosure[open] > .field:last-child {
  margin-bottom: 0;
}

/* --- Sub-ingredient list (ingredient edit page, ingredient-labels L2) ------
   The ordered components a compound ingredient discloses on a label. Not a
   table: each row is one text input plus its controls, and a table would add
   header chrome to what is really a list of words. Rows carry the standard
   reorderable-row furniture (§8c-66) — a .sort-handle first, then the
   ↑ ↓ × cluster in .row-controls__secondary — so it reads and behaves like
   every other draggable list even though its markup is a <ul>. */
.sub-ingredient-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.sub-ingredient-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  /* The drag engine transforms rows to open a gap; a positioned row is what
     lets .is-sorting-item's z-index lift the dragged one above its siblings
     (the same reason _sortable.scss positions <tr>s). */
  position: relative;
  background: var(--color-surface);
}

/* The rename box and its Save button share the row's free space; the button
   shrink-wraps so long names get the width. */
.sub-ingredient-row__form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}

.sub-ingredient-row__form .input {
  flex: 1 1 auto;
  min-width: 0;
}

/* Each of the ↑ ↓ × is its own one-button <form> (they post to different
   URLs), so the cluster's children are forms rather than buttons — keep them
   from stacking. */
.sub-ingredient-row .row-controls__secondary {
  display: inline-flex;
  align-items: center;
}

.sub-ingredient-row .row-controls__secondary .inline-form {
  margin: 0;
}

.sub-ingredient-add {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sub-ingredient-add .input {
  flex: 1 1 auto;
  max-width: 20rem;
}

/* The allergen checkbox group inside the ingredient form's Label fieldset.
   .choice-list zeroes its own margin (it's normally the only thing in its
   section), which collapses the gap to whatever follows it — here, the
   calories row. Restore the standard .field rhythm for this one use, scoped
   so the storefront product form (the other .choice-list) is untouched. */
.field-group--label .choice-list {
  margin-bottom: var(--space-5);
}

.sub-ingredient-empty {
  margin: 0 0 var(--space-4);
}

/* --- Print-an-ingredient-label control (recipe show page, labels L4) -------
   A <details> disclosure holding a GET form: size picker, "Contains" toggle,
   submit. Collapsed by default because most visits to a recipe aren't about
   printing. The inner form lays out as a column so the three controls read
   as one short sequence rather than a row that wraps awkwardly on a phone. */
.label-print__form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 26rem;
}

.label-print__form .field {
  margin-bottom: 0;
}

.label-print {
  margin-bottom: var(--space-5);
}

/* The compact "Label" link beside a recipe name on the bake-run sheet. Sized
   and toned down so it reads as a secondary action next to the recipe link,
   not a second name. */
.label-print-link {
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.label-print-link:hover {
  color: var(--color-accent-strong);
}

/* _settings.scss
   Outline: the long-settings-page kit (§8c-121), first used by the Storefront
     settings page —
       .settings-layout   two columns: a sticky section list + the cards
       .settings-toc      the "On this page" list (in-page links)
       .settings-card     a .section-block card with a titled header + padded
                          body, plus __group / __subtitle for a sub-section
       .save-bar          the page's one Save button, stuck to the bottom of
                          the window
       .row-list          thumbnail rows with their controls (banner slides,
                          About photos)
   Purpose: a settings page with many groups should read as a short list of
     named things, with the way between them and the Save button both always
     in reach. Everything here is layout over existing tokens — no new colour,
     no raw values — so dark mode stays a token swap.
   Invariants:
     - The section list is plain anchor links: the page works with no script.
       /js/storefront-settings.js only adds the "you are here" highlight.
     - Under 760px (the top nav's own breakpoint) the list becomes one
       horizontally scrollable row above the cards rather than a column
       beside them; it stays sticky either way.
     - .save-bar is position: sticky, not fixed: it sits in normal flow at the
       end of the cards (so it can never cover the last field) and only floats
       while the cards run past the bottom of the window. */
.settings-layout {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}

.settings-layout__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0; /* let wide children (tables, file inputs) shrink, not overflow */
}

/* ---- "On this page" ---------------------------------------------------- */
.settings-toc {
  position: sticky;
  top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-toc__link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.settings-toc__link:hover {
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface-sunken);
}

/* The section currently in view (set by script; absent without it). */
.settings-toc__link.is-active {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  background: var(--color-accent-soft);
}

/* ---- a settings card --------------------------------------------------- */
/* Anchor jumps land with the card's top edge clear of the window edge (and of
   the sticky section row on small screens). */
.settings-card {
  scroll-margin-top: var(--space-5);
}

.settings-card__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.settings-card__header h2 {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
}

.settings-card__header .hint {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.settings-card__body {
  padding: var(--space-5) var(--space-5) var(--space-1);
}

/* A radio-card group used as a field. .choice-list zeroes its own margin (it
   is also used bare, inside tighter layouts), which beat .field's bottom
   margin and left the next field touching the last card. Restore the field
   rhythm inside a settings card. */
.settings-card__body > .choice-list {
  margin-bottom: var(--space-5);
}

/* A sub-section inside a card (Social media under Look & sharing, the
   planned dates under Pickup): a divider and a small heading, so it reads as
   part of the card it is in rather than a card of its own. */
.settings-card__group {
  margin: 0 0 var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  scroll-margin-top: var(--space-5);
}

.settings-card__subtitle {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.settings-card__group > .hint {
  display: block;
  margin: 0 0 var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- the sticky Save bar ------------------------------------------------ */
.save-bar {
  position: sticky;
  bottom: var(--space-3);
  z-index: 5; /* above card content it slides over, below dialogs/menus */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.save-bar__status {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Unsaved edits (set by script): the status line becomes the prompt. */
.save-bar.is-dirty {
  border-color: var(--color-accent);
}

.save-bar.is-dirty .save-bar__status {
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

/* ---- thumbnail rows (banner slides, About photos) ----------------------- */
.row-list {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.row-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.row-list__item:last-child {
  border-bottom: none;
}

.row-list__item .row-controls__secondary {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ---- small screens ------------------------------------------------------ */
@media (max-width: 760px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  /* One scrollable row, stuck to the top, bleeding to the page gutters. */
  .settings-toc {
    top: 0;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--space-4));
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }
  .settings-toc::-webkit-scrollbar {
    display: none;
  }
  /* Clear the sticky row when an anchor jump lands. */
  .settings-card,
  .settings-card__group {
    scroll-margin-top: var(--space-9);
  }
  .save-bar {
    bottom: var(--space-2);
    padding: var(--space-3);
  }
  /* The explanatory line is a luxury at this width; the dirty prompt stays. */
  .save-bar:not(.is-dirty) .save-bar__status {
    display: none;
  }
  .save-bar:not(.is-dirty) {
    justify-content: flex-end;
  }
}
/* _typeahead.scss
   Outline: combobox-pattern picker — input + absolutely-positioned results
     list. ARIA wiring (role=combobox/listbox, aria-expanded) is in the JS;
     these styles key off those attributes where possible.
   Purpose: style only — keyboard behavior and data-typeahead hook stay. */
.typeahead {
  position: relative;
  flex: 1;
  max-width: 22rem;
}

.typeahead .input {
  width: 100%;
  max-width: none;
}

.typeahead__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  max-height: 16rem;
  overflow-y: auto;
}

.typeahead__option {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  cursor: pointer;
}

.typeahead__option .num {
  color: var(--color-text-muted);
}

/* The optional note on a row: the order builder's prices. */
.typeahead__hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* keyboard highlight — aria-selected on the option */
.typeahead__option:hover,
.typeahead__option[aria-selected=true] {
  background: var(--color-accent-soft);
}

.typeahead__empty {
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

@media (pointer: coarse) {
  .typeahead__option {
    padding: var(--space-3);
  }
}
/* _power-search.scss
   Outline: the reusable search bar (partials/power-search.hbs): form row,
     chips, notices, presets, the "How to search" panel.
   Purpose: layout for §8c-116. Suggestions reuse .typeahead__results /
     .typeahead__option, and chips sit on .badge, so the bar looks like the
     pickers and tags already in the app. */
.power-search {
  margin-bottom: var(--space-4);
}

.power-search__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

/* Takes the row's spare width; the 16rem basis is what makes the button and
   sort menu wrap under it on a phone instead of squeezing it. */
.power-search__field {
  position: relative;
  flex: 1 1 16rem;
  min-width: 0;
}

.power-search__input {
  width: 100%;
  max-width: none;
}

.power-search__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.power-search__sort .select {
  width: auto;
}

.power-search__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.power-search__count {
  font-size: var(--text-sm);
}

.power-search__chip {
  /* A search term can be long; wrap inside the chip, never widen the page. */
  max-width: 100%;
  overflow-wrap: anywhere;
}

.power-search__remove {
  margin-left: var(--space-1);
  padding: 0 var(--space-1);
  color: inherit;
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.power-search__remove:hover {
  text-decoration: underline;
}

.power-search__notice {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.power-search__extras {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-3);
}

.power-search__help summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-accent-strong);
}

.power-search__help-body {
  max-width: 44rem;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.power-search__help-body p {
  margin: 0 0 var(--space-3);
}

.power-search__fields {
  margin: 0;
}

.power-search__fields > div {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-1) 0;
}

.power-search__fields dt {
  flex: 0 0 7.5rem;
}

.power-search__fields dd {
  margin: 0;
}

/* Server-sorted lists use links in their headers; _tables.scss styles
   .sort-button for both, and only a link needs its underline taken away. */
th.sortable a.sort-button {
  text-decoration: none;
}

/* Orders list: the muted second line inside the Order and Customer cells. */
.table .cell-sub {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.list-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (max-width: 560px) {
  .power-search__fields > div {
    flex-direction: column;
    gap: 0;
  }
  .power-search__fields dt {
    flex: none;
  }
}
/* _cards.scss
   Outline: .section-block (builder section card), .recipe-meta definition
     list, page header (h1 + back + actions), bottom page-actions row.
   Purpose: the builder becomes a stack of cards with real rhythm — the
     <hr>-as-spacer dies here. */
.section-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden; /* table edges + sunken add-form clip to the radius */
}

/* A card that hosts a typeahead add-form can't keep overflow:hidden: the
   results list is position:absolute and opens just below the input (past
   the card's bottom edge), so the clip would swallow it. Let it escape,
   and re-create the only thing overflow:hidden was doing here — rounding
   the trailing sunken add-form's bottom corners to the card radius — by
   hand, so nothing pokes past the rounded border. */
.section-block--popover {
  overflow: visible;
}

.section-block--popover > .builder-add-form:last-of-type {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* card whose content sits directly inside (no __header/__body split, e.g.
   the trim wizard's keep/drop sections) — pad it to the same rhythm as a
   card body so the content clears the rounded edge */
.section-block--pad {
  padding: var(--space-5);
}

.section-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

/* A quiet secondary link at the far end of a flex header — .page-header__top
   or .section-block__header — e.g. the order pages' link to the pricing help
   article. Same treatment as .back-link, generalized past a "go back" meaning. */
.header-action {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.header-action:hover {
  color: var(--color-text);
}

.section-block__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.section-block__count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* padded free-form content inside a card (prose, empty-state lines) —
   tables and add-forms manage their own edge padding instead */
.section-block__body {
  padding: var(--space-5) var(--space-6);
  margin: 0;
}

/* accent variant — a soft butter wash + accent border. Used for the
   read-only preparation card on the recipe show page so the method reads
   as the page's anchor content, set apart from the data tables above. */
.section-block--accent {
  background: var(--color-accent-soft);
  border-color: color-mix(in oklab, var(--color-accent) 35%, transparent);
}

/* recipe show-page summary — a single card holding the per-batch cost
   stats (yield / ingredients / supplies / labor) plus a labor-breakdown
   note. Mirrors .recipe-meta's labeled-stat grid, with a trailing note
   line for the static/dynamic split + bake. */
.recipe-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: var(--space-4) var(--space-5);
}

/* The headline row above the component breakdown (§8c-124): cost per item,
   suggested price per item, batch cost — the numbers a baker opens the page
   for, a size up from the breakdown and ruled off from it. */
.recipe-summary__headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, max-content));
  justify-content: start;
  gap: var(--space-3) var(--space-8);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.recipe-summary__headline dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

.recipe-summary__headline dd {
  margin: 0;
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
}

/* the small qualifier beside a headline figure ("at your 50% margin") */
.recipe-summary__aside {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.recipe-summary__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, max-content));
  justify-content: start;
  gap: var(--space-3) var(--space-8);
  margin: 0;
}

.recipe-summary__stats dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

.recipe-summary__stats dd {
  margin: 0;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

.recipe-summary__note {
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
}

/* meta block — 2-col+ dl under the page title */
.recipe-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, max-content));
  justify-content: start;
  gap: var(--space-3) var(--space-8);
  margin: 0;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.recipe-meta dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

.recipe-meta dd {
  margin: 0;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

/* page header */
.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.page-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* released-version tag beside a page title (admin console header) — small,
   mono, and de-emphasised so it reads as metadata next to the heading. */
.page-header__version {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
}

/* list-header action cluster: usage meter beside the "New" button
   (tiered plans Chunk 6) */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.usage-meter {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.back-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  align-self: flex-start;
}

.back-link:hover {
  color: var(--color-text);
}

/* bottom action cluster on detail pages — destructive actions live here,
   visually separated, never beside the primary action */
.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.page-actions__spacer {
  flex: 1;
}

@media (max-width: 560px) {
  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .page-actions__spacer {
    display: none;
  }
  .page-actions .button {
    height: var(--touch-target);
  }
}
/* _recipe-image.scss
   Outline: .recipe-image (the reference photo on the recipe show page) +
     .recipe-image--edit (the smaller preview in the edit form's image card),
     and .checkbox-label (the admin plan editor's entitlement toggle).
   Purpose: keep a reference photo bounded and on-brand (rounded, bordered,
     never wider than the column) — the upload is already resized to ≤1200px
     by sharp (Chunk 7), this just constrains display. */
.recipe-image {
  margin: 0 0 var(--space-5);
}
.recipe-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28rem; /* tall portraits don't dominate the page */
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

/* Show page: a small CLICKABLE thumbnail (the <a> opens the full image in a new
   tab) instead of a full-width hero — keeps the photo from dominating the
   read-only recipe page. The figure shrinks to the thumbnail so it doesn't
   reserve a full-width block. */
.recipe-image--thumb {
  width: fit-content;
}
.recipe-image--thumb a {
  display: inline-block;
}
.recipe-image--thumb img {
  width: auto; /* override the base width:100% */
  max-width: 16rem;
  max-height: 12rem;
  cursor: zoom-in; /* signals it enlarges on click */
}

/* The in-editor preview is a thumbnail, not the hero image — cap it small so
   the replace/remove controls stay above the fold. Spacing is handled by the
   .recipe-image-card rhythm below, so the figure carries no margin of its own. */
.recipe-image--edit {
  margin: 0;
}
.recipe-image--edit img {
  max-width: 18rem;
  max-height: 14rem;
}

/* The reference-image card body on the recipe edit form (Chunk 7). It lives in
   a padded .section-block__body; this just gives the stacked children (preview,
   upload row, hint, remove button — or the upgrade nudge) even vertical rhythm.
   Reset default block margins first so the gap is fully controlled here. */
.recipe-image-card > * {
  margin-block: 0;
}

.recipe-image-card > * + * {
  margin-top: var(--space-3);
}

/* Upload row: the file input and its submit button on one line, wrapping to
   two on a narrow screen. (Not the sunken .builder-add-form — that's for forms
   under builder tables; here the padded card body already sets the edges.) */
.image-upload {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* The size hint isn't inside a .field, so style it as the muted helper text it
   is (the .field .hint rule wouldn't reach it). */
.recipe-image-card .hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Inline checkbox + caption used by the admin plan-limits editor's
   per-feature entitlement toggle. */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
}

/* _feedback.scss
   Outline: toast (replaces window.alert for errors/saves), confirm + input
     dialogs on native <dialog> (replaces confirm/prompt), super-admin
     acting-as banner.
   Purpose: feedback stays vanilla-JS-friendly — a toast helper and
     dialog.showModal(), nothing more. */
/* toast — fixed bottom-center, safe on phones; role="status" in markup */
/* `display: flex` below would override the UA's [hidden] { display:
   none }, leaving an empty pill visible at rest — restate it stronger.
   (feedback.js toggles the hidden attribute, never inline styles.) */
.toast[hidden] {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: min(26rem, 100vw - 2rem);
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  font-size: var(--text-sm);
}

.toast::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
}

.toast--error::before {
  background: var(--color-danger);
}

.toast--error {
  color: var(--color-danger);
}

/* inline Undo action (the shared autosave-undo primitive) — a link-styled
   button so it reads as part of the sentence, not a second toast. */
.toast__undo {
  flex: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
  text-decoration: underline;
  cursor: pointer;
}

.toast__undo:hover {
  color: var(--color-accent-hover);
}

.toast__undo:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* dialogs — native <dialog>, small card */
.dialog {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-2);
  padding: var(--space-6);
  width: min(22rem, 100vw - 2rem);
}

.dialog::backdrop {
  background: rgba(23, 20, 15, 0.45);
}

.dialog h2 {
  margin-bottom: var(--space-2);
}

.dialog p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.dialog .field {
  margin-bottom: var(--space-5);
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* acting-as banner — pinned above nav, impossible to miss in both themes.
   Read-only acting: warn tones. Editing enabled: danger solid. */
.admin-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-2) var(--space-6);
  background: var(--color-warn-soft);
  border-bottom: 2px solid var(--color-warn);
  color: var(--color-warn);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.admin-banner--editing {
  background: var(--color-danger);
  border-bottom-color: var(--color-danger-hover);
  color: var(--color-on-danger);
}

.admin-banner .button {
  height: 28px;
  font-size: var(--text-xs);
}

.admin-banner__spacer {
  flex: 1;
}

/* _prose.scss
   Outline: rendered Markdown (recipe preparation — the only raw-HTML
     interpolation, sanitized server-side).
   Purpose: readable instructions; never competes with the builder tables. */
.prose {
  font-size: var(--text-base);
  line-height: 1.65;
  max-width: 42rem;
}

.prose h1,
.prose h2,
.prose h3 {
  margin: 1.4em 0 0.5em;
}

.prose h1:first-child,
.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose h1 {
  font-size: var(--text-lg);
}

.prose h2 {
  font-size: var(--text-md);
}

.prose h3 {
  font-size: var(--text-base);
}

.prose p {
  margin: 0 0 0.9em;
}

.prose ul,
.prose ol {
  margin: 0 0 0.9em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.3em;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

.prose pre {
  background: var(--color-surface-sunken);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  overflow: auto;
  margin: 0 0 0.9em;
}

.prose table {
  border-collapse: collapse;
  margin: 0 0 0.9em;
}

.prose th,
.prose td {
  border: 1px solid var(--color-border);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}

.prose th {
  background: var(--color-surface-sunken);
  font-weight: var(--weight-semibold);
}

.prose strong {
  font-weight: var(--weight-semibold);
}

/* _pages.scss
   Outline: content column (45rem; 60rem on body.wide), vertical rhythm via
     .page > gap, the few true page-specific rules (calculator quote, oven
     plan, run lines on small screens, auth card).
   Purpose: layout rhythm replaces <hr> spacers. */
.page {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-9);
}

body.wide .page {
  max-width: var(--content-wide);
}

body.xwide .page {
  max-width: var(--content-xwide);
}

/* wrapper divs that must not break the .page column rhythm (builder
   roots carrying data-api-base etc.) — same flow + gap as .page */
.page-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* group title between card stacks (Ingredients / Supplies / Preparation) */
.page-section-title {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

/* ---- home dashboard --------------------------------------------------- */
/* Section heading + a right-aligned "through to the full page" link. The
   Production calendar block is the at-a-glance widget; the link opens the
   full Month/Week/Day calendar (Feature 3.1). Baseline-aligned so the link
   sits on the heading's text baseline. */
.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.home-section-head .page-section-title {
  margin-bottom: 0;
}

.home-section-head__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
  text-decoration: none;
  white-space: nowrap;
}

.home-section-head__link:hover {
  text-decoration: underline;
}

/* quick-create action cards: a responsive grid of full-card links. One
   --primary (New recipe) per the one-primary-per-view rule. */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-4);
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  color: var(--color-text);
  text-decoration: none;
}

.action-card:hover {
  text-decoration: none;
  border-color: var(--color-border-strong);
  background: var(--color-surface-sunken);
}

.action-card__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

/* arrow affordance — a glyph, not an icon asset (Rationale do-not list) */
.action-card__title::after {
  content: " →";
  color: var(--color-text-muted);
}

.action-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* at-a-glance stat cards: count + label, link into each section */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: var(--space-4);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
}

.stat-card:hover {
  text-decoration: none;
  border-color: var(--color-border-strong);
  background: var(--color-surface-sunken);
}

.stat-card__count {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1;
}

.stat-card__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.stat-card__sub {
  font-size: var(--text-xs);
  color: var(--color-accent-strong);
}

/* batch-weight strip under the last ingredient section */
.batch-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-5);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
}

.batch-line strong {
  font-weight: var(--weight-semibold);
}

.batch-line__spacer {
  flex: 1;
}

/* ---- calculator ----------------------------------------------------- */
/* The card is itself the 3-track grid (label, total, per-item); the header
   and every line are subgrids spanning all three tracks. Defining the tracks
   ONCE here — rather than per row — is what keeps the columns aligned: a
   `max-content` track measured per row would size the header's value columns
   to its long "Total (1.5 batches)" / "Per item (24 items)" text and the
   money rows to their short "$0.03", landing the column boundaries at
   different x positions. As a parent grid, the tracks resolve across every
   subgrid row at once, so the headers sit directly above their numbers. */
.quote {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr minmax(4.5rem, max-content) minmax(4.5rem, max-content);
}

/* Each row spans the full 3-track width and borrows the parent's columns via
   subgrid. Horizontal padding is identical on every row, so the (padding-
   offset) subgrid tracks still line up row-to-row. */
.quote__head,
.quote__line {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: subgrid;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-2) var(--space-6);
}

.quote__head {
  padding-top: var(--space-4);
  padding-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.quote__head .num,
.quote__line .num {
  text-align: right;
}

.quote__line-label .muted {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
}

/* component-cost rows (ingredients / labor / supplies / tax): quieter */
.quote__line--sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.quote__line--sub .num {
  font-size: var(--text-sm);
}

/* cost subtotal: divider + emphasis */
.quote__line--cost {
  font-weight: var(--weight-semibold);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
}

/* price: the answer — accent band, both columns loud so the batch price
   reads next to the per-item price */
.quote__line--price {
  background: var(--color-accent-soft);
  border-top: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
  font-weight: var(--weight-semibold);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.quote__line--price .num {
  font-size: var(--text-lg);
}

/* total with tax */
.quote__line--total {
  font-weight: var(--weight-semibold);
  padding-bottom: var(--space-3);
}

/* "Bake this recipe!" — the primary call to action right under the quote,
   handing the priced batch off to the production-run staging page. Spaced
   off the quote card; the button keeps its own (tall, primary) styling. */
.bake-cta {
  margin: var(--space-6) 0;
}

/* the calculator's detailed breakdown — emphasis rows keyed off the
   presenter's `emphasis` class (subtotal / price / total) */
.calc-table tr.subtotal td {
  font-weight: var(--weight-semibold);
  border-top: 1px solid var(--color-border-strong);
}

.calc-table tr.price td {
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
}

.calc-table tr.total td {
  font-weight: var(--weight-semibold);
  background: var(--color-surface-sunken);
}

/* ---- production run on phones: lines collapse to cards --------------- */
@media (max-width: 640px) {
  .run-lines thead {
    display: none;
  }
  .run-lines tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-1) var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  .run-lines td {
    display: block;
    border: none;
    padding: 0;
  }
  .run-lines td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
  }
  .run-lines .row-controls {
    grid-column: 2;
    grid-row: 1;
  }
}
/* ---- production run: "Orders in this run" + Ready boxes (§8c-115) ------ */
/* One row per order. The Ready box reuses the packing checklist's
   .pack-check button (_storefront-admin.scss) so a tick looks the same on
   both kitchen surfaces; here it sizes to its word instead of the full row.
   Tokens only, so dark mode is a palette swap. */
.run-orders__summary {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
}

.run-orders__summary--done {
  color: var(--color-success);
}

.run-orders__intro {
  margin: 0;
  /* Inset like .section-block__header above it (_cards.scss). */
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
}

.run-orders__check {
  width: auto;
  min-width: 9.5rem;
}

/* The packing list strikes a packed line through ("done, move on"). On a
   Ready box — here and on the drop's Pickup & delivery page — that reads as
   "not ready", so the word stays plain; the green fill and ✓ already say
   it's set. */
/* Scoped under .run-orders so it outranks the packing rule, which ties on
   specificity and loads later (_storefront-admin.scss after this file). */
.run-orders .run-orders__check[aria-pressed=true] .pack-check__name,
.ready-orders .ready-order__check[aria-pressed=true] .pack-check__name {
  text-decoration: none;
}

.run-orders__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.run-orders__text {
  font-size: var(--text-sm);
}

.run-orders__text--muted {
  color: var(--color-text-muted);
}

.run-orders__text--success {
  color: var(--color-success);
}

.run-orders__text--danger {
  color: var(--color-danger);
}

/* Phones: the same card collapse as the run lines above — the Ready box
   leads each card, the remove × sits top-right. */
@media (max-width: 640px) {
  .run-orders__table thead {
    display: none;
  }
  .run-orders__table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2) var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  .run-orders__table td {
    display: block;
    border: none;
    padding: 0;
  }
  .run-orders__table td[data-label]:not(.run-orders__ready)::before {
    content: attr(data-label);
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
  }
  .run-orders__table .row-controls {
    grid-column: 2;
    grid-row: 1;
  }
}
/* ---- printable sheets (mix lists / ingredient totals) ----------------- */
/* per-section label inside a sheet card — quieter than the card title */
.mix-sheet__section {
  padding: var(--space-4) var(--space-5) 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

/* ---- invoice sheet (order invoice, Session 1.5.1) ---------------------- */
/* quiet document-type label opposite the company name in the sheet head —
   same treatment as .mix-sheet__section, but it lives in the card header */
.invoice-sheet__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

/* the bakery's address/email/phone under its name in the sheet head
   (migration 039) — secondary to the name, one line per span */
.invoice-sheet__seller-contact {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}

/* the order/issued/due/bill-to dl reuses .recipe-meta's grid but sits INSIDE
   the sheet card, so it sheds its own card chrome — no card-in-card */
.invoice-sheet__meta {
  background: transparent;
  border: none;
  border-radius: 0;
}

/* the customer email under the bill-to name — secondary to the name */
.invoice-sheet__email {
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}

/* settled-state note (Paid / No payment due) under the totals */
.invoice-sheet__note {
  margin: 0;
  padding: var(--space-4) var(--space-5);
  font-weight: var(--weight-semibold);
}

/* the homemade add-to-run mini-form inside the totals table */
.totals-table .inline-form {
  gap: var(--space-2);
  align-items: center;
}

.totals-table .input--num {
  max-width: 5.5rem;
}

/* ---- auth ------------------------------------------------------------ */
.auth-card {
  max-width: 22rem;
  margin: 10vh auto 0;
  padding: var(--space-7);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.auth-card .app-nav__wordmark {
  font-size: var(--text-lg);
  display: block;
  margin-bottom: var(--space-6);
}

/* the card manages its own rhythm — base zeroes element margins */
.auth-card h1 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-5);
}

.auth-card p {
  margin: 0 0 var(--space-4);
}

.auth-card p:last-child {
  margin-bottom: 0;
}

/* "or" divider between the Google button and the email/password form. A
   centred label sitting on a horizontal rule (the rule is drawn with a
   border on the ::before/::after pseudo-elements either side of the text). */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--color-border);
}

/* The "Forgot your password?" link under the login form. */
.auth-card__forgot {
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}

/* A sub-heading inside an auth card (e.g. "Change password" on the account
   page) — the base zeroes element margins, so restore a little top space. */
.auth-card__section {
  font-size: var(--text-base);
  margin: var(--space-2) 0 var(--space-4);
}

/* _calendar.scss
   Outline: the Production Calendar grid (partials/production-calendar.hbs)
     — caption, weekday header row, week rows of day cells with count
     entries. BEM under .calendar.
   Purpose: a fixed, NEVER horizontally scrollable 7-column week grid for
     the dashboard (and the Phase 3 week view, which reuses the partial).
   Logic / invariants:
     - repeat(7, minmax(0, 1fr)) is the load-bearing rule: minmax(0,·)
       lets cells shrink below their content's min-width, so the grid
       compresses instead of overflowing — no overflow-x, no .table-wrap,
       per the feature's "not scrollable" requirement.
     - The phone breakpoint swaps the weekday header from "Mon" to "M"
       (both are in the markup; CSS picks one) and hides the entry word
       ("orders"/"runs"), leaving the count beside its kind-colored dot.
     - --text-xs is the type floor (UI.MD §4); below that we drop words,
       never shrink them. */
.calendar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /* Clip children so day-cell backgrounds respect the rounded corners. */
  overflow: hidden;
}

.calendar__caption {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Header + every week row share the one column template — that's what
   keeps all rows in lockstep without a <table>. */
.calendar__head,
.calendar__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar__wd {
  padding: var(--space-1) var(--space-2);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Desktop shows "Mon"; the single letter is phone-only. */
.calendar__wd-min {
  display: none;
}

.calendar__day {
  /* min-width: 0 backs up the minmax(0,1fr) columns: without it a long
     entry word could still prop the cell open and overflow the page. */
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  border-top: 1px solid var(--color-border);
  min-height: 4.5rem;
}

/* Vertical hairlines between columns (skip the first, or it doubles the
   container's own border). */
.calendar__day:not(:first-child),
.calendar__wd:not(:first-child) {
  border-left: 1px solid var(--color-border);
}

.calendar__day--today {
  background: var(--color-accent-soft);
  /* An inset ring marks today even for color-blind users to whom the
     soft butter tint reads close to the paper background. */
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.calendar__daynum {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
}

.calendar__month {
  margin-right: var(--space-1);
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
}

/* One count line: "3 orders" / "1 run". Zero-count days carry no entries
   at all (see the presenter), so every entry rendered here is a link. */
.calendar__entry {
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  font-size: var(--text-xs);
  line-height: var(--leading-tight);
  text-decoration: none;
  color: var(--color-text);
}

.calendar__entry-count {
  font-weight: var(--weight-semibold);
}

/* The kind dot: hidden on desktop (the word carries the meaning), shown
   on phones when the word is dropped. Color pairs with the entry kind. */
.calendar__entry-count::before {
  content: "";
  display: none;
  width: 0.45em;
  height: 0.45em;
  border-radius: var(--radius-full);
  flex: none;
}

.calendar__entry--orders .calendar__entry-count::before {
  background: var(--color-accent);
}

.calendar__entry--runs .calendar__entry-count::before {
  background: var(--color-success);
}

a.calendar__entry:hover .calendar__entry-label {
  text-decoration: underline;
}

.calendar__entry--orders .calendar__entry-count {
  color: var(--color-accent-strong);
}

.calendar__entry--runs .calendar__entry-count {
  color: var(--color-success);
}

.calendar__entry-label {
  color: var(--color-text-muted);
}

/* Phone: cells compress hard — drop the entry words, show the kind dots,
   single-letter weekday header, tighter padding. The grid still never
   scrolls sideways. */
@media (max-width: 640px) {
  .calendar__wd-short {
    display: none;
  }
  .calendar__wd-min {
    display: inline;
  }
  .calendar__day {
    padding: var(--space-1);
    min-height: 3.25rem;
  }
  .calendar__entry-label {
    display: none;
  }
  .calendar__entry {
    align-items: center;
  }
  .calendar__entry-count {
    display: flex;
    align-items: center;
    gap: 0.3em;
  }
  .calendar__entry-count::before {
    display: inline-block;
  }
}
/* _calendar-page.scss
   Outline: the full Production Calendar page (pages/calendar/index.hbs,
     Feature 3.1) — header + view segment, the two-column layout (active view
     + sticky day-detail rail), the month grid, week columns, day agenda, and
     the shared day-detail panel (partials/calendar-day-detail.hbs). BEM under
     .cal-*. Distinct from _calendar.scss, which styles the small dashboard
     widget (.calendar).
   Purpose: a wide (body.xwide), never-horizontally-scrolling planning surface
     with kitchen-legible chips and warnings.
   Logic / invariants:
     - Colors come entirely from tokens, so light/dark both work with no
       per-theme rules here (the tokens flip under [data-theme]).
     - Month grid uses repeat(7, minmax(0,1fr)) — same non-overflowing trick
       as the dashboard widget: minmax(0,·) lets cells shrink below content.
     - Warn = --color-warn, never --color-danger (the feature reserves danger
       for destructive actions).
     - The rail collapses under the grid below 60rem (single column). */
.cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.cal-head__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}

.cal-head__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Segmented Month·Week·Day control. */
.cal-seg {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cal-seg__btn {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-decoration: none;
  background: var(--color-surface);
}

.cal-seg__btn + .cal-seg__btn {
  border-left: 1px solid var(--color-border);
}

.cal-seg__btn:hover {
  background: var(--color-surface-sunken);
}

.cal-seg__btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
}

.cal-seg__btn.is-active {
  background: var(--color-accent);
  color: var(--color-accent-strong);
}

/* Two columns: the view, then the sticky rail. */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: var(--space-5);
  align-items: start;
}

.cal-layout--day {
  grid-template-columns: minmax(0, 1fr);
}

.cal-rail {
  position: sticky;
  top: var(--space-4);
}

@media (max-width: 60rem) {
  .cal-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cal-rail {
    position: static;
  }
}
/* --- month grid --------------------------------------------------------- */
.cal-month {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cal-month__head,
.cal-month__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-month__wd {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
}

.cal-day {
  position: relative;
  min-width: 0;
  min-height: 6rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.cal-day:not(:first-child),
.cal-month__wd:not(:first-child) {
  border-left: 1px solid var(--color-border);
}

/* Full-cell click target behind the (currently non-interactive) chips. */
.cal-day__hit {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cal-day__hit:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
}

.cal-day > :not(.cal-day__hit) {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.cal-day__num {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.cal-day__month {
  margin-right: var(--space-1);
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
}

.cal-day__chips {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cal-day__more {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cal-day__orders {
  margin-top: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cal-day__orders.is-over {
  color: var(--color-warn);
  font-weight: var(--weight-semibold);
}

.cal-day.is-today {
  background: var(--color-accent-soft);
}

.cal-day.is-today .cal-day__num {
  color: var(--color-accent-strong);
}

.cal-day.is-outside {
  background: var(--color-surface-sunken);
}

.cal-day.is-outside .cal-day__num {
  color: var(--color-text-muted);
}

.cal-day.is-closed {
  background: var(--color-surface-sunken);
}

.cal-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--color-accent-strong);
}

/* --- chips -------------------------------------------------------------- */
.cal-chip {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: var(--text-xs);
  line-height: var(--leading-tight);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip__dot {
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-radius: var(--radius-full);
  background: var(--color-text-muted);
}

.cal-chip--run .cal-chip__dot {
  background: var(--color-accent);
}

.cal-chip--drop .cal-chip__dot {
  background: var(--color-success);
}

.cal-chip--closure .cal-chip__dot {
  background: var(--color-text-muted);
}

.cal-chip.is-warn .cal-chip__dot {
  background: var(--color-warn);
}

.cal-chip.is-warn {
  color: var(--color-warn);
}

/* --- week columns ------------------------------------------------------- */
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cal-week__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
  min-height: 12rem;
  background: var(--color-surface);
}

.cal-week__col.is-today {
  background: var(--color-accent-soft);
}

.cal-week__col.is-closed {
  background: var(--color-surface-sunken);
}

.cal-week__col.is-selected {
  box-shadow: inset 0 0 0 2px var(--color-accent-strong);
}

.cal-week__colhead {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  text-decoration: none;
  color: var(--color-text);
}

.cal-week__colhead:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.cal-week__wd {
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cal-week__num {
  font-weight: var(--weight-semibold);
}

.cal-week__chips {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cal-week__foot {
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cal-week__foot.is-over {
  color: var(--color-warn);
  font-weight: var(--weight-semibold);
}

/* --- day-detail panel (rail + day view) --------------------------------- */
.cal-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cal-detail__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cal-detail__date {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

/* ＋New is the panel's one primary button; push it to the right of the date. */
.cal-detail__new {
  margin-left: auto;
}

/* ＋New dialog: the three choice cards, stacked with a little air. */
.cal-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.cal-detail__warn {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-warn-soft);
  color: var(--color-warn);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.cal-detail__orders {
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
}

.cal-detail__orders:hover {
  text-decoration: underline;
}

.cal-detail__orders.is-over {
  color: var(--color-warn);
}

.cal-detail__orders-flag {
  margin-left: var(--space-1);
  font-weight: var(--weight-semibold);
}

.cal-detail__empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.cal-agenda {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cal-agenda__item {
  display: grid;
  grid-template-columns: 4rem auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-2);
}

/* ⋯ per-item menu — native <details> disclosure, no JS to open. */
.cal-menu {
  position: relative;
  justify-self: end;
}

.cal-menu__toggle {
  list-style: none;
  cursor: pointer;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.cal-menu__toggle::-webkit-details-marker {
  display: none;
}

.cal-menu__toggle:hover {
  background: var(--color-surface-sunken);
}

.cal-menu__list {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  padding: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
}

.cal-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.cal-menu__item:hover {
  background: var(--color-surface-sunken);
}

.cal-menu__item--danger {
  color: var(--color-danger);
}

.cal-agenda__time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cal-agenda__time--allday {
  font-style: italic;
}

.cal-agenda__dot {
  align-self: center;
  width: 0.55em;
  height: 0.55em;
  border-radius: var(--radius-full);
  background: var(--color-text-muted);
}

.cal-agenda__item--run .cal-agenda__dot {
  background: var(--color-accent);
}

.cal-agenda__item--drop .cal-agenda__dot {
  background: var(--color-success);
}

.cal-agenda__item.is-warn .cal-agenda__dot {
  background: var(--color-warn);
}

.cal-agenda__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cal-agenda__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.cal-agenda__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cal-agenda__item.is-warn .cal-agenda__meta {
  color: var(--color-warn);
}

.cal-agenda__done {
  margin-left: var(--space-1);
}

/* Day view: the panel is the whole view, at kitchen density. */
.cal-day-view .cal-detail {
  font-size: var(--text-base);
}

.cal-day-view .cal-agenda__item {
  grid-template-columns: 5rem auto minmax(0, 1fr);
  min-height: 2.75rem;
}

.cal-day-view .cal-agenda__title {
  font-size: var(--text-base);
}

/* _onboarding.scss
   Outline: the setup wizard's input adornment row ($ / % / "/ hour" beside
     the field) and the Back/Next action row.
   Purpose: keep the focused onboarding steps visually calm and aligned with
     the rest of the form system; only a couple of layout helpers are needed
     on top of the shared .input / .button styles. */
/* A field input flanked by small unit adornments ("$" before, "%" after). */
.onboard-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* The input inside the row shouldn't stretch full-width — these steps ask
   for one short value, so cap it and let the adornments sit close. */
.onboard-input .input {
  max-width: 14rem;
}

.onboard-input__addon {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Back (ghost) on the left, the primary advance/finish button on the right.
   The slug step adds a "Skip for now" between them; flex-wrap keeps the three
   comfortable on a narrow screen. */
.onboard-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* The storefront-slug step's field: the base-URL adornment is long ("…/shop/"),
   so let the input grow rather than capping it at the 14rem the short numeric
   steps use. */
.onboard-input--slug .input {
  max-width: none;
  flex: 1;
}

/* Live availability verdict beneath the slug field (public/js/onboarding-slug.js
   toggles the modifier). Colour-coded but still leads with a glyph in the text
   so it reads without relying on colour alone. */
.slug-status--ok {
  color: var(--color-success);
}

.slug-status--warn {
  color: var(--color-danger);
}

/* _register.scss
   Outline: the sign-up page (GET /register) — a single calm column under the
     standard app nav: header → Step 1 "Choose a plan" (compact selectable
     radio rows) → Step 2
     "Create your account" (one Google button, an "or" divider, the email form,
     a Terms checkbox, and ONE plan-aware "Create account" CTA).
   Purpose: replaces the old asymmetric plan-card grid with four competing CTAs.
     Plan choice and account creation read as one continuous decision; the full
     feature comparison lives behind "See full comparison" (the pricing page).
     Reuses existing tokens + the .button / .field / .input / .badge classes;
     this file only styles the register-specific chrome. Handoff reference:
     Register.html at the repo root. */
/* The registration column is a touch wider than .auth-card (login) so a plan
   row's name + price + description sit comfortably, but it's still one column. */
.register {
  max-width: 30rem;
  margin: 8vh auto 0;
  padding: 0 var(--space-4) var(--space-9);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Both steps live in one <form> (so the chosen plan posts with the account),
   so the form — not .register — is the flex parent of the two steps + their
   groups. Mirror the column's rhythm here so the numbered step labels keep
   their spacing (their negative margin-bottom offsets this gap). */
.register > form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.register__header {
  text-align: center;
}

.register__header h1 {
  margin: 0 0 var(--space-2);
}

.register__header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* numbered step label between the two sections */
.register__step {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: calc(-1 * var(--space-3)); /* sit close to its group */
}

.register__step-num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
}

.register__step-title {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
}

.register__step-aside {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- billing-period toggle (monthly / yearly) ----------------------- */
/* The SAME pill control as the pricing page (.pricing-toggle, styled in
   _pricing.scss); here it just needs centering above the plan rows. Its "Save
   N%" badge sits inside the Yearly button. */
/* `.register` prefix outranks _pricing's later `.pricing-toggle` (inline-flex)
   so the flex + auto margins actually centre the pill above the plan rows. */
.register .register__toggle {
  display: flex;
  width: fit-content;
  margin: 0 auto var(--space-4);
}

.pricing-toggle__save {
  margin-left: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
}

/* Reveal the price matching the page's billing cadence, like the pricing cards:
   both cadences are in the DOM; show only the one whose data-interval matches
   the nearest data-plan-interval ancestor (set by the toggle / the server). */
.plan-option__price [data-interval] {
  display: none;
}

[data-plan-interval=month] .plan-option__price [data-interval=month] {
  display: block;
}

[data-plan-interval=year] .plan-option__price [data-interval=year] {
  display: block;
}

/* ---- plan selector: compact selectable rows ------------------------- */
.plan-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.plan-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.plan-option:hover {
  border-color: var(--color-text-muted);
}

/* selected — butter ring + wash, driven by the native radio */
.plan-option:has(input:checked) {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
  background: var(--color-accent-soft);
}

.plan-option input[type=radio] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-accent-strong);
}

.plan-option__main {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.plan-option__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.plan-option__desc {
  grid-column: 2;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.plan-option__price {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.plan-option__price small {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}

/* coming-soon row — present but inert */
.plan-option--soon {
  cursor: default;
  background: var(--color-surface-sunken);
  border-style: dashed;
  opacity: 0.85;
}

.plan-option--soon:hover {
  border-color: var(--color-border-strong);
}

.plan-option--soon .plan-option__name,
.plan-option--soon .plan-option__desc {
  color: var(--color-text-muted);
}

/* ---- account step --------------------------------------------------- */
.register__google {
  /* a plain .button .button--secondary .button--block + a G mark */
  gap: var(--space-3);
}

.register__google svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.register__or {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.register__or::before,
.register__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* TOS checkbox row */
.register__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-1) 0 var(--space-2);
}

.register__consent input {
  margin-top: 2px;
  accent-color: var(--color-accent-strong);
}

.register__footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.register__account {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.register__account .field {
  margin-bottom: 0;
}

.register__account .input {
  max-width: 100%;
}

/* _recipe-create.scss
   Outline: the Create-a-Recipe flow — shared by step 1 (the "start" card,
     pages/recipes/new.hbs) and step 2 (the build workspace,
     pages/recipes/form.hbs). Components: .flow-steps progress indicator,
     .start card, .unit-input (number + trailing unit chip), .capacity-field
     (in-batches stepper + live worked example), .field--error inline marks,
     .recipe-basics confirm strip, .labor-mode (Simple/Advanced swap),
     .detail-group disclosures, .image-slot / .upgrade-nudge, .finish-bar,
     .empty-catalog first-run guidance.
   Purpose: implement the design hand-off (design/inbox/BakeFlow/) — keep
     ingredients primary on the build page (builder first & dominant, the
     optional meta recessed in disclosures), and make "capacity in batches"
     legible with a worked example. Adapted from the delivered
     recipe-create.css; preview chrome (.demo-switch), the demo body[data-*]
     state toggles, and the employee read-only twin are dropped — the build
     route is owner-only, and the real states (validation, empty catalog,
     plan tier) are decided server-side by the presenter.
   Logic/invariants: tokens only, no raw values, so the dark-theme swap is
     free. JS hooks (data-capacity-*, data-labor*, data-title-edit) are
     additive and distinct from styling classes (see public/js/recipe-create.js).
   Supersedes the interim _wizard.scss (.wizard-steps), removed 2026-06-28. */
/* ---- flow steps ---------------------------------------------------- */
.flow-steps {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.flow-steps__step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

.flow-steps__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-strong);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: var(--color-surface);
}

.flow-steps__step.is-current {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.flow-steps__step.is-current .flow-steps__dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

.flow-steps__step.is-done {
  color: var(--color-text);
}

.flow-steps__step.is-done .flow-steps__dot {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent-strong);
}

a.flow-steps__step {
  text-decoration: none;
}

a.flow-steps__step:hover {
  color: var(--color-text);
}

a.flow-steps__step:hover .flow-steps__dot {
  border-color: var(--color-text-muted);
}

.flow-steps__sep {
  flex: 1 1 1.5rem;
  max-width: 2.5rem;
  height: 1.5px;
  background: var(--color-border-strong);
  border-radius: 2px;
}

@media (max-width: 520px) {
  .flow-steps__label {
    display: none;
  }
  .flow-steps__sep {
    max-width: none;
  }
}
/* step-2 lead-in line under the flow strip (wizard framing only) */
.wizard-intro {
  margin: 0 0 var(--space-5);
  max-width: 46rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ---- start card (step 1) ------------------------------------------- */
.start {
  max-width: 34rem;
}

.start__intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 30rem;
}

.start__card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.start__card .field:last-of-type {
  margin-bottom: 0;
}

.start__submit {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.start__submit .hint {
  font-size: var(--text-sm);
}

/* number input with a trailing unit chip */
.unit-input {
  display: flex;
  align-items: stretch;
  max-width: 16rem;
}

.unit-input .input--num {
  max-width: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  flex: 1;
}

.unit-input__unit {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border-strong);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  white-space: nowrap;
}

/* ---- capacity-in-batches: stepper + live worked example ------------ */
.capacity-field .stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}

.capacity-field .stepper__btn {
  width: 40px;
  flex: none;
  border: none;
  background: var(--color-surface-sunken);
  color: var(--color-text);
  font-size: var(--text-md);
  cursor: pointer;
}

.capacity-field .stepper__btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.capacity-field .stepper__btn:first-child {
  border-right: 1px solid var(--color-border-strong);
}

.capacity-field .stepper__btn:last-child {
  border-left: 1px solid var(--color-border-strong);
}

.capacity-field .stepper input {
  width: 4.5rem;
  border: none;
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-base);
  background: var(--color-surface);
  color: var(--color-text);
}

.capacity-field .stepper input:focus-visible {
  outline-offset: -2px;
}

.capacity-example {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

.capacity-example__icon {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: var(--weight-bold);
}

.capacity-example .num {
  color: var(--color-accent-strong);
  font-weight: var(--weight-semibold);
}

/* ---- inline field errors ------------------------------------------- */
.field--error > label {
  color: var(--color-danger);
}

.field--error .input,
.field--error .unit-input__unit,
.field--error .stepper {
  border-color: var(--color-danger);
}

.field-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-danger);
  font-weight: var(--weight-medium);
}

.form-errors a {
  color: inherit;
  text-decoration: underline;
}

.form-errors strong {
  display: block;
  margin-bottom: var(--space-1);
}

/* =====================================================================
   BUILD WORKSPACE (step 2 — pages/recipes/form.hbs)
   ===================================================================== */
/* header heading row: recipe name + the Draft chip sit inline */
.page-header__heading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* editable title beside the Draft chip */
.title-edit {
  background: none;
  border: none;
  border-bottom: 1.5px dashed color-mix(in oklab, var(--color-accent) 55%, transparent);
  font: inherit;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.015em;
  color: var(--color-text);
  cursor: pointer;
  padding: 0 var(--space-1) 2px;
}

.title-edit:hover {
  background: var(--color-accent-soft);
}

/* ---- secondary / optional meta: recessed so it never competes ------- */
.detail-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.detail-group + .detail-group {
  margin-top: var(--space-4);
}

.detail-group > summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
}

.detail-group > summary::-webkit-details-marker {
  display: none;
}

.detail-group > summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
}

.detail-group[open] > summary::after {
  transform: rotate(90deg);
}

.detail-group > summary:hover {
  background: var(--color-surface-sunken);
}

.detail-group__hint {
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}

.detail-group__body {
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-5);
}

.detail-grid .field {
  margin-bottom: 0;
}

/* ---- labor: Simple / Advanced segmented swap ------------------------ */
.labor-mode__seg {
  display: inline-flex;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.labor-mode__seg button {
  border: none;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}

.labor-mode__seg button + button {
  border-left: 1px solid var(--color-border-strong);
}

.labor-mode__seg button.is-active {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.labor-mode__panel[hidden] {
  display: none;
}

.labor-note {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.labor-note .num {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

/* ---- reference image: dropzone (paid) + upgrade nudge (free) -------- */
.image-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  min-height: 9rem;
  padding: var(--space-5);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  background: var(--color-surface-sunken);
  cursor: pointer;
}

.image-slot:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
}

.image-slot__mark {
  font-size: var(--text-lg);
}

.image-slot__hint {
  font-size: var(--text-xs);
}

.upgrade-nudge {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
  min-height: 9rem;
  justify-content: center;
  padding: var(--space-5);
  border: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  font-size: var(--text-sm);
}

.upgrade-nudge strong {
  font-weight: var(--weight-semibold);
}

.upgrade-nudge p {
  color: var(--color-text-muted);
}

/* ---- finish hand-off ------------------------------------------------ */
.finish-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

/* The "You have unsaved changes." line beside the header's Done button
   (unsaved-guard.js fills it, §8c-124). Empty — and taking no room — until a
   detail field is edited. */
.save-hint {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-warn);
}

.save-hint:empty {
  display: none;
}

.finish-bar__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.finish-bar__text strong {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.finish-bar__text span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.finish-bar__spacer {
  flex: 1;
}

.finish-bar .button-row {
  flex-wrap: nowrap;
}

@media (max-width: 560px) {
  .finish-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .finish-bar__spacer {
    display: none;
  }
  .finish-bar .button-row {
    flex-direction: column;
  }
  .finish-bar .button {
    width: 100%;
    height: var(--touch-target);
  }
}
/* ---- first-run empty catalog --------------------------------------- */
.empty-catalog {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-6);
  padding: var(--space-7) var(--space-6);
  text-align: left;
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}

.empty-catalog h3 {
  font-size: var(--text-md);
}

.empty-catalog p {
  color: var(--color-text-muted);
  max-width: 34rem;
}

.empty-catalog ol {
  margin: 0;
  padding-left: 1.3em;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* empty add-form: the catalog has nothing to offer yet */
.builder-add-form .add-empty {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* _import-review.scss
   Outline: the two import review screens —
     (a) the recipe paste-import (pages/recipes/import-review.hbs): the
         .import-review page wrapper, the .import-table of parsed lines, and the
         per-row .import-row__choice control with its just-in-time
         .import-row__create fields, plus the start card's paste box;
     (b) the customer-list import (pages/customers/import.hbs and
         import-review.hbs), which reuses .import-review / .import-table and
         adds the .import-summary count tiles, .import-notice, .import-formats,
         and the per-row .import-row__changes / __problems detail lists.
   Purpose: present one parsed line per row so a baker can confirm the catalogue
     match, fix the amount/unit, or create a new ingredient before anything is
     saved. Low-confidence lines (couldn't read amount/unit) are tinted so they
     draw the eye. Tokens only — no raw values — so the dark-theme swap is free.
   Logic/invariants: JS hooks (data-import-row/choice/create) are additive and
     distinct from these styling classes (see public/js/recipe-import.js). */
/* ---- start-card paste box ----------------------------------------- */
.start__paste-box {
  width: 100%;
  resize: vertical;
  min-height: 7rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

.optional {
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
  font-size: var(--text-sm);
}

/* ---- review page -------------------------------------------------- */
.import-review {
  max-width: var(--content-wide);
}

.import-review__intro {
  color: var(--color-text-muted);
  max-width: var(--content-narrow);
  margin: 0 0 var(--space-3);
}

.import-review__counts {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-5);
}
.import-review__counts .num {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.import-review__section {
  font-size: var(--text-md);
  margin: var(--space-6) 0 var(--space-2);
}

/* ---- review table ------------------------------------------------- */
.import-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-5);
}
.import-table th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  font-weight: var(--weight-semibold);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.import-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.import-table__amt {
  width: 6rem;
}
.import-table__unit {
  width: 6rem;
}
.import-table__match {
  width: 22rem;
}

/* Low-confidence rows: amount/unit couldn't be read — tint to draw attention. */
.import-row--low td {
  background: var(--color-warn-soft);
}

.import-row__raw {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.import-row__note {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.import-row__flag {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-warn);
}

/* The per-row choice control + its just-in-time cards (create new / pick an
   existing ingredient / name a section). All three share the sunken-card look
   and are revealed just-in-time by recipe-import.js as the choice changes. */
.import-row__choice {
  width: 100%;
}

.import-row__create,
.import-row__pick,
.import-row__section {
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface-sunken);
  border-radius: var(--radius-sm);
  /* Hidden until the row's choice selects this card (server-rendered initial
     state + recipe-import.js). `display: flex` above would otherwise defeat the
     HTML `hidden` attribute, so restore it explicitly — the attribute wins. */
}
.import-row__create[hidden],
.import-row__pick[hidden],
.import-row__section[hidden] {
  display: none;
}

.import-review__submit {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Narrow screens: let the table scroll rather than crush the controls. */
@media (max-width: 40rem) {
  .import-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
/* ---- customer-list import ----------------------------------------- */
/* The dry-run screen leads with four big counts, because "what is about to
   happen to my customer list" is the only question a baker has at that
   moment. Tiles rather than a sentence so the numbers survive a glance. */
.import-summary {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.import-summary__tile {
  flex: 1 1 8rem;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
  border-left: 3px solid var(--color-border);
}

.import-summary__num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.import-summary__label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Tone is set by the presenter, never by the template guessing from a count. */
.import-summary__tile--good {
  border-left-color: var(--color-success);
}

.import-summary__tile--info {
  border-left-color: var(--color-accent);
}

.import-summary__tile--warn {
  border-left-color: var(--color-warn);
}

/* File-level warnings, and the post-import confirmation on the list page. */
.import-notice {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
  border-left: 3px solid var(--color-accent);
  font-size: var(--text-sm);
}
.import-notice ul {
  margin: 0;
  padding-left: var(--space-4);
}
.import-notice li + li {
  margin-top: var(--space-2);
}

/* The supported-export list on the upload page. */
.import-formats {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.import-formats__item + .import-formats__item {
  margin-top: var(--space-3);
}

.import-formats__describes {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Per-row detail inside the "What happens" cell. Small and muted: the badge
   carries the verdict, these explain it only when the eye stops on a row. */
.import-row__muted {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.import-row__changes,
.import-row__problems {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  font-size: var(--text-sm);
}

.import-row__problems {
  color: var(--color-warn);
}

/* A denser table for the summary/mapping tables, which are read, not edited. */
.import-table--compact td, .import-table--compact th {
  padding: var(--space-1) var(--space-2);
}

.import-mapping {
  margin: var(--space-3) 0 var(--space-5);
  font-size: var(--text-sm);
}
.import-mapping summary {
  cursor: pointer;
  color: var(--color-text-muted);
}

/* _help.scss
   Outline: the Help article footer pager (prev / next links).
   Purpose: the Help index reuses .quick-actions + .action-card and the
     article body reuses .prose, so the only Help-specific rule is the
     two-ended pager row at the foot of an article. */
.help-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* When there's no previous article, an empty <span> holds the left slot so
   the "next" link still sits flush right. */
.help-pager > span:empty {
  flex: 1;
}

/* _splash.scss
   Outline:
     1. Shared marketing chrome — `.splash` wrapper, `.splash-bar*` top bar,
        `.splash-hero__eyebrow`/`__title`, `.splash-steps*`, `.splash-footer__muted`.
        Still used by pricing.hbs AND compare/bake-diary.hbs (both keep their
        original, pre-2026-07-13 look) — load-bearing on pages this file's
        second half does not touch. Don't repurpose these names.
     2. Home page (`pages/splash.hbs`, route `/`) — the 2026-07-13 Claude
        Design redesign (`design/BakeFlow/Home.html`, System-first hero +
        soft differentiation tone: the one variant Lenny picked out of the
        mockup's three hero directions and two tones). Most class names are
        copied verbatim from the mockup (unique, no collision risk). Six are
        NOT: `.splash-hero*`/`.splash-footer*` already mean something
        different in section 1 above, so this page's hero and footer use
        `.home-hero*`/`.home-footer*` instead — the only deviation from the
        mockup's literal class names, forced by that collision, not a
        redesign choice.
   Purpose: the public, logged-out surfaces — home, pricing header, and the
     Bake Diary comparison page all sit on this one partial. Reuses the
     design tokens throughout; no new tokens, no raw hex. */
/* ===========================================================================
   1. Shared marketing chrome (pricing.hbs, compare/bake-diary.hbs)
   =========================================================================== */
.splash {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Top bar */
.splash-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}

.splash-bar__brand {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-decoration: none;
}

.splash-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Hero (compare/bake-diary.hbs only — home's own hero is `.home-hero` below) */
.splash-hero {
  text-align: center;
  padding: clamp(var(--space-7), 8vw, 6rem) 0 var(--space-8);
  max-width: 48rem;
  margin: 0 auto;
}

.splash-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong, var(--color-text-muted));
  margin: 0 0 var(--space-3);
}

.splash-hero__title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 var(--space-4);
}

.splash-hero__lede {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0 auto var(--space-6);
  max-width: 38rem;
}

.splash-hero__cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.splash-hero__note {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* How it works (compare/bake-diary.hbs only) */
.splash-steps {
  text-align: center;
  padding: var(--space-7) 0 var(--space-8);
}

.splash-steps__title {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-6);
}

.splash-steps__list {
  list-style: none;
  margin: 0 auto var(--space-6);
  padding: 0;
  max-width: 44rem;
  display: grid;
  gap: var(--space-4);
  text-align: left;
}

.splash-steps__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
}

.splash-steps__n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

/* Footer (compare/bake-diary.hbs only — home's own footer is `.home-footer` below) */
.splash-footer__muted {
  flex: 1;
}

/* ===========================================================================
   2. Home page (`/`) — Butter & Ink redesign, system-first hero + soft tone
   =========================================================================== */
/* ---- top bar ---------------------------------------------------------- */
.splash-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  background: color-mix(in oklab, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.splash-nav__wordmark {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  white-space: nowrap;
}

.splash-nav__wordmark:hover {
  text-decoration: none;
}

.splash-nav__wordmark::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-left: 3px;
}

.splash-nav__spacer {
  flex: 1;
}

.splash-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.splash-nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

.splash-nav__link:hover {
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface-sunken);
}

/* ---- section scaffold -------------------------------------------------- */
.splash-section {
  padding: var(--space-9) var(--space-5);
}

.splash-inner {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
}

.splash-band {
  background: var(--color-surface-sunken);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.splash-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-strong);
  margin-bottom: var(--space-3);
}

.splash-h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.splash-lead {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 54ch;
  margin-top: var(--space-4);
}

/* ---- hero (system-first direction, the only one shipped) -------------- */
.home-hero {
  padding: calc(var(--space-9) + var(--space-6)) var(--space-5) var(--space-9);
}

.home-hero__inner {
  max-width: 54rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.splash-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.home-hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 17ch;
  margin-top: var(--space-4);
}

.home-hero h1 .accent {
  color: var(--color-accent-strong);
}

.home-hero__lede {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 48ch;
}

.home-hero__cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--space-1);
}

.home-hero__cta .button {
  height: var(--touch-target);
  font-size: var(--text-base);
  padding: 0 var(--space-6);
}

.home-hero__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.home-hero__note::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-right: var(--space-2);
  vertical-align: 1px;
}

/* ---- three pillars ------------------------------------------------------ */
.splash-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-7);
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.pillar__index {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
}

.pillar h3 {
  font-size: var(--text-lg);
  letter-spacing: -0.015em;
}

.pillar p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.pillar em {
  font-style: normal;
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

.splash-support {
  margin: var(--space-6) auto 0;
  max-width: 60ch;
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ---- differentiation beat (soft tone, the only one shipped) ------------ */
.diff-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.diff-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.diff-col__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
}

.diff-col p {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
}

.diff-col--bf {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.diff-col--bf .diff-col__label {
  color: var(--color-accent-strong);
}

.diff-col--bf p {
  color: var(--color-text);
}

/* "one true number" figure — reuses the app's cost + shop-card vocabulary */
.connected {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-7);
}

.conn-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.conn-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.conn-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.conn-row .num {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.conn-row--sub {
  color: var(--color-text-muted);
}

.conn-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-4) var(--space-5);
  background: var(--color-accent-soft);
  border-top: 1px solid color-mix(in oklab, var(--color-accent) 35%, transparent);
}

.conn-price__label {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

.conn-price .num {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.conn-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-align: center;
}

.conn-link__arrow {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-accent-strong);
}

.conn-shop {
  max-width: none;
}

.conn-caption {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.conn-caption strong {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

/* ---- how it works -------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.step h3 {
  font-size: var(--text-base);
}

.step p {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
}

.step--last .step__num {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

/* ---- tier teaser bridge --------------------------------------------------- */
.teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
  border-radius: var(--radius-lg);
}

.teaser__head {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.teaser__body {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text);
  max-width: 50ch;
}

.teaser__body strong {
  font-weight: var(--weight-semibold);
}

/* ---- footer ---------------------------------------------------------------- */
.home-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.splash-footer__inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.home-footer__brand {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.home-footer__brand::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-left: 3px;
}

.splash-footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Business identity + contact line — full-width under the brand/links row.
   Required visible on-site for the toll-free SMS carrier verification (the
   operating LLC + a reachable contact); flex-basis:100% drops it to its own
   row beneath the inline brand/tagline/links. */
.home-footer__legal {
  flex-basis: 100%;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.home-footer__legal a {
  color: inherit;
}

.splash-footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  font-size: var(--text-sm);
}

@media (max-width: 820px) {
  .splash-pillars, .diff-cols {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .connected {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .conn-link__arrow {
    transform: rotate(90deg);
  }
}
@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .splash-footer__links {
    margin-left: 0;
    flex-basis: 100%;
  }
}
/* _pricing.scss
   Outline: the public pricing page (pages/pricing.hbs) — header + monthly/yearly
     toggle + a grid of plan cards (one featured), and the toggle's show/hide of
     per-interval prices.
   Purpose: an on-brand, prospect-facing plans page. Reuses the design tokens,
     the splash top bar (.splash-bar*), and .button styles; everything else is
     pricing-scoped. The toggle is CSS-driven off the container's data-interval
     (set by /js/pricing.js), so prices switch with no re-render. */
.pricing {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--space-5) var(--space-8);
}

/* Header */
.pricing-head {
  text-align: center;
  padding: clamp(var(--space-7), 6vw, 4rem) 0 var(--space-6);
}

.pricing-head__title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 var(--space-3);
}

.pricing-head__lede {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  line-height: 1.55;
  max-width: 34rem;
  margin: 0 auto var(--space-6);
}

/* Monthly / yearly toggle */
.pricing-toggle {
  display: inline-flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.pricing-toggle__btn {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.pricing-toggle__btn.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-1);
}

/* Card grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-5);
  align-items: start;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: var(--space-6);
}

/* The recommended tier: accent border + lift. */
.pricing-card--featured {
  border-color: var(--color-accent);
  border-width: 2px;
  box-shadow: var(--shadow-2);
}

/* The viewer's current tier (logged in). */
.pricing-card--current {
  border-color: var(--color-border-strong);
}

/* A paid tier that isn't on sale yet (Coming soon): de-emphasised, with a
   neutral flag and the "Coming soon" text read as muted copy rather than a
   giant mono price. */
.pricing-card--soon {
  opacity: 0.85;
}

.pricing-card--soon .pricing-card__num {
  font-family: inherit;
  font-size: var(--text-md);
  color: var(--color-text-muted);
}

.pricing-card__flag {
  position: absolute;
  top: 0;
  right: var(--space-5);
  transform: translateY(-50%);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

/* The "Coming soon" flag is informational, not a sell — neutral, not accent. */
.pricing-card__flag--soon {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
}

.pricing-card__name {
  font-size: var(--text-md);
  margin: 0 0 var(--space-3);
}

.pricing-card__price {
  margin-bottom: var(--space-1);
  min-height: 2.5rem;
}

.pricing-card__amount {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
}

.pricing-card__num {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  font-family: "JetBrains Mono", monospace;
}

/* A word-label in the price slot (e.g. the sign-up picker's "Paid plan"
   fallback): read it as muted copy, not a giant mono number. */
.pricing-card__num--label {
  font-family: inherit;
  font-size: var(--text-md);
  color: var(--color-text-muted);
}

.pricing-card__per {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.pricing-card__subprice {
  margin: 0 0 var(--space-2);
  color: var(--color-accent-strong);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* "Everything in <tier>, plus:" intro above a paid tier's added-features list. */
.pricing-card__features-lede {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
}

.pricing-card__features-lede + .pricing-card__features {
  margin-top: 0;
}

.pricing-card__features {
  list-style: none;
  margin: var(--space-4) 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-2);
  flex: 1;
}

.pricing-card__features li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.45;
}

/* A check mark, drawn with a border so it needs no icon asset. */
.pricing-card__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 0.95rem;
  height: 0.55rem;
  border-left: 2px solid var(--color-success);
  border-bottom: 2px solid var(--color-success);
  transform: rotate(-45deg);
}

.pricing-card__cta {
  margin-top: auto;
}

/* The CTA slot may hold a form/button-row (Billing) or the Google sign-up
   button (sign-up picker); make those fill the card's width like .button--block
   does for the pricing-page links. */
.pricing-card__cta .gsi-material-button,
.pricing-card__cta .button-row {
  width: 100%;
}

.pricing-card__cta .gsi-material-button {
  justify-content: center;
}

.pricing-card__cta .button-row {
  display: grid;
  gap: var(--space-2);
}

.pricing-foot {
  text-align: center;
  margin: var(--space-7) 0 0;
  font-size: var(--text-sm);
}

/* --- Interval show/hide ---------------------------------------------------
   Per-interval price elements inside a card are hidden by default; the one
   matching the nearest ancestor's [data-plan-interval] is revealed. The server
   always sets data-plan-interval on the card grid (defaultInterval), so the
   right price shows even before /js/pricing.js runs; pages without a toggle
   (sign-up, Billing) just leave it fixed. Keyed off [data-plan-interval] rather
   than a specific page class so any surface that uses the plan-card partial
   works. */
.pricing-card [data-interval] {
  display: none;
}

[data-plan-interval=month] [data-interval=month] {
  display: inline-flex;
}

[data-plan-interval=year] [data-interval=year] {
  display: inline-flex;
}

/* The yearly per-month subprice is a block paragraph, not inline-flex. */
[data-plan-interval=year] .pricing-card__subprice[data-interval=year] {
  display: block;
}

/* _compare.scss
   Outline: the public comparison landing pages (/compare/*, Session 0.5.1) —
     section blocks, the two-column comparison table with live/coming badges,
     the dated roadmap strip, and the candor callout.
   Purpose: extends the splash chrome (_splash.scss provides the bar, hero,
     steps, footer) with the comparison-specific pieces. Same tokens, same
     card language; nothing here leaks into the app shell. */
.compare-section {
  max-width: 52rem;
  margin: 0 auto;
  padding: var(--space-7) 0;
}

.compare-section__title {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-2);
  text-align: center;
}

.compare-section__lede {
  margin: 0 auto var(--space-6);
  max-width: 38rem;
  text-align: center;
  color: var(--color-text-muted);
}

.compare-section__body {
  margin: 0 auto;
  max-width: 44rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ---- comparison table -------------------------------------------------- */
/* Own table styling rather than the app's .table: this page has no app
   chrome, and the cells hold sentences, not numerals. */
.compare-table-wrap {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare-table th,
.compare-table td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table th {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

/* the "you used it for" column stays narrow so the answer gets the room */
.compare-table td:first-child {
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.compare-table td:last-child {
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* live/coming status — leads the answer cell so the truth is scannable */
.compare-badge {
  display: inline-block;
  margin-right: var(--space-2);
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.compare-badge--live {
  background: var(--color-success-soft, var(--color-accent-soft));
  color: var(--color-success, var(--color-text));
}

.compare-badge--soon {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ---- dated roadmap strip ------------------------------------------------ */
.compare-roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-5);
}

.compare-roadmap__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: var(--space-5) var(--space-6);
}

.compare-roadmap__when {
  margin: 0 0 var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-strong, var(--color-text-muted));
}

.compare-roadmap__what {
  margin: 0 0 var(--space-2);
  font-size: var(--text-md);
}

.compare-roadmap__desc {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ---- candor callout ----------------------------------------------------- */
/* visually quieter than a feature card on purpose: it reads as a straight
   answer, not a sell */
.compare-candor {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* narrow screens: let the first column wrap rather than force a scroll */
@media (max-width: 40rem) {
  .compare-table td:first-child {
    white-space: normal;
  }
}
/* _shop.scss
   Outline: the public buyer surface (Phase 4) — deliberately NOT the app
     shell. The bakery's own name up top (no BakeFlow wordmark / butter dot),
     an editorial hero, a product-card menu, cart + buyer-details, the
     post-payment confirmation, and the no-account order-status page.
   Namespaces: .shop-* (buyer chrome + menu + cart) and .status-* (the
     order-status page). Reuses the shared .table / .table-wrap, .button,
     .badge, .field / .input / .select / .textarea, .section-block — only the
     ARRANGEMENT is bespoke here (brief §2). Every color/type/space value is a
     token; no raw hex, so dark mode is still a pure token swap.
   Purpose: a stranger should feel they're on the *bakery's* page. Warmth
     comes from scale, whitespace and the butter accent — never new type or
     ornament (Rationale "Do not"). Mobile-first: this is the one surface a
     buyer meets on a phone far more than a kitchen tablet. */
/* ---- THE SHOP TOKEN CONTRACT (Storefront Site S7) ---------------------
   A storefront's LOOK is a set of custom properties, and a "style" is one
   block that re-declares them. That is the whole swap mechanism: no per-style
   templates, no per-style partial for the markup, nothing in the presenter.
   It clones the pattern _tokens.scss already uses for dark mode — one mixin,
   emitted under a selector — applied to a per-company attribute instead of a
   per-visitor one.

   Everything below is declared on :root with the APP token as its fallback
   value, so the default storefront looks exactly as it did before this
   contract existed. A style (src/styles/_shop-style-*.scss) re-declares any
   subset under [data-shop-style="<slug>"] and inherits the rest.

   Rules for adding to this contract:
     - A value only belongs here if a STYLE might reasonably want it
       different. Spacing and layout mostly don't; colour, type, and the
       shape of a card mostly do.
     - Never reference a raw hex in the rules below — go through a token, so
       dark mode stays a pure token swap and a style stays a pure token swap.
     - Adding a property here is free; removing one breaks every style that
       set it. Prefer adding. */
:root {
  /* Surface + ink */
  --shop-bg: var(--color-bg);
  --shop-surface: var(--color-surface);
  --shop-ink: var(--color-text);
  --shop-ink-muted: var(--color-text-muted);
  --shop-accent: var(--color-accent);
  --shop-accent-strong: var(--color-accent-strong);
  --shop-accent-soft: var(--color-accent-soft);
  --shop-border: var(--color-border);
  /* The rest of the app palette a shop page paints with (§8c-92). Without
     these a style could recolour the page but not its wells, strong borders,
     button hovers, or the ink ON a filled button — see the bridge below. */
  --shop-surface-sunken: var(--color-surface-sunken);
  --shop-border-strong: var(--color-border-strong);
  --shop-accent-hover: var(--color-accent-hover);
  --shop-on-accent: var(--color-on-accent);
  /* Type. The default storefront uses the app's UI face for both; a style
     can give the display face something with more personality without
     touching the body copy a buyer actually has to read. */
  --shop-font-display: var(--font-ui);
  --shop-font-body: var(--font-ui);
  /* The face for FIGURES — prices, quantities, the cart count, tip chips.
     The default sets them in the app's mono so columns of money line up; a
     style with a proportional brand face (Hearth and Tart) points this at
     its body face instead. Bridged onto --font-mono below, so the dozen-odd
     rules that name the mono face directly all follow it. */
  --shop-font-figures: var(--font-mono);
  --shop-hero-size: var(--text-xl);
  --shop-hero-tracking: -0.02em;
  --shop-hero-transform: none;
  /* Heading weights (§8c-92). Two, because the page/section titles and the
     card names sit at different steps in the default (bold vs semibold), and
     a variable face like Inter wants its own in-between value for both. */
  --shop-heading-weight: var(--weight-bold);
  --shop-card-name-weight: var(--weight-semibold);
  /* Buttons. The default keeps the app's soft rectangle; a style can make
     every storefront button a pill without a rule of its own. */
  --shop-button-radius: var(--radius-md);
  /* Home banner slider (S10). A style can make the banner taller, reshape it,
     re-scrim it, or re-colour the overlaid name — all without touching the
     slider's markup or its JS. */
  --shop-hero-slide-height: clamp(14rem, 30vw, 19rem);
  --shop-hero-radius: var(--shop-radius-card);
  /* The banner's words (§8c-94, after hearthandtart.com): a kicker between
     two rules over a big headline, centred on a photo darkened EVENLY (the
     words sit in the middle now, not along the bottom edge, so the scrim is
     a flat wash rather than a bottom-weighted gradient). A style can give
     the headline its own face, case, and spacing — Hearth and Tart sets it
     in spaced serif capitals. */
  --shop-banner-scrim: rgba(0, 0, 0, 0.42);
  --shop-banner-font: var(--shop-font-display);
  --shop-banner-size: clamp(2rem, 6vw, 3.75rem);
  --shop-banner-weight: var(--weight-bold);
  --shop-banner-transform: none;
  --shop-banner-tracking: -0.02em;
  --shop-banner-kicker-tracking: 0.08em;
  --shop-hero-scrim: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.58),
    rgba(0, 0, 0, 0.18) 45%,
    rgba(0, 0, 0, 0.04));
  --shop-hero-overlay-ink: #fff;
  /* The drop page's PHONE hero (§8c-92) carries a whole block of facts on
     the photo, not just a name, so its scrim is darker and climbs higher
     than the banner's. */
  --shop-drop-scrim: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.74),
    rgba(0, 0, 0, 0.5) 55%,
    rgba(0, 0, 0, 0.22));
  /* Card shape */
  --shop-radius-card: var(--radius-lg);
  --shop-card-bg: var(--color-surface);
  --shop-card-border: 1px solid var(--color-border);
  --shop-card-shadow: var(--shadow-1);
  --shop-card-shadow-hover: var(--shadow-2);
  --shop-card-border-hover: var(--color-border-strong, var(--color-border));
  /* Card anatomy (§8c-92): the photo's shape and divider, the body's
     padding, the grid's gutter, and how the blurb and price read. */
  --shop-card-photo-ratio: 4 / 3;
  --shop-card-photo-border: 1px solid var(--color-border);
  --shop-card-pad: var(--space-5);
  --shop-menu-gap: var(--space-5);
  --shop-card-desc-style: normal;
  --shop-card-desc-lines: none; /* a number clamps the blurb to N lines */
  --shop-price-font: var(--font-mono);
  --shop-price-weight: var(--weight-semibold);
  /* The low-stock line ("Only 3 left"). A plain accent-coloured line by
     default; the box values let a style turn it into an outlined pill. */
  --shop-stock-ink: var(--color-accent-strong);
  --shop-stock-bg: transparent;
  --shop-stock-border: 0 solid transparent;
  --shop-stock-radius: 0;
  --shop-stock-pad: 0;
  /* Nav */
  --shop-nav-bg: color-mix(in oklab, var(--color-surface) 92%, transparent);
  --shop-nav-ink: var(--color-text);
  --shop-nav-link-ink: var(--color-text-muted);
  --shop-nav-border: 1px solid var(--color-border);
  --shop-nav-shadow: none;
  /* Special-tag badges (S5) and the gluten-free card treatment. Declared
     here rather than beside the tag rules so a style author finds every
     swappable value in one block. Every tag pill wears the gluten-free
     pill's green border + green ink (Lenny's ask, 2026-11-01: the markers
     read as one uniform set, each told apart by its own emoji). */
  --shop-tag-border: var(--color-success);
  --shop-tag-bg: var(--color-surface-sunken);
  --shop-tag-ink: var(--color-success);
  --shop-gf-border: var(--color-success);
  --shop-gf-bg: var(--color-success-soft);
  --shop-gf-mark: "\1F33E"; /* 🌾 */
}

/* ---- the token bridge (§8c-92) ----------------------------------------
   Most shop rules were written against the APP tokens (--color-text,
   --color-accent, ...), not the shop contract above — so before this bridge
   a style could change the page background and the card shape, but every
   button, badge, link, and line of muted text stayed butter-and-ink. The
   bridge points the app tokens back at the contract INSIDE a storefront page,
   which makes the contract the whole palette without rewriting a few hundred
   rules one by one.

   Why this can't loop: a custom property's var() resolves where it is
   DECLARED. :root computes --shop-ink from --color-text at :root; .shop-body
   inherits that computed value, so re-declaring --color-text from it here
   reads the parent's number, not itself. The default style therefore maps
   every token to the value it already had — byte-identical pixels — and a
   style's re-declarations (on <html>) flow through to everything.

   On .shop-body (the <body> of shop-layout.hbs) rather than .shop so dialogs
   appended to <body> are covered too. Status colours (success/warn/danger)
   are deliberately NOT bridged: they carry meaning, and a style that wants
   them different is asking for a different meaning. */
.shop-body {
  --color-bg: var(--shop-bg);
  --color-surface: var(--shop-surface);
  --color-surface-sunken: var(--shop-surface-sunken);
  --color-text: var(--shop-ink);
  --color-text-muted: var(--shop-ink-muted);
  --color-border: var(--shop-border);
  --color-border-strong: var(--shop-border-strong);
  --color-accent: var(--shop-accent);
  --color-accent-hover: var(--shop-accent-hover);
  --color-accent-strong: var(--shop-accent-strong);
  --color-accent-soft: var(--shop-accent-soft);
  --color-on-accent: var(--shop-on-accent);
  --font-ui: var(--shop-font-body);
  --font-mono: var(--shop-font-figures);
  /* the focus ring is built from --color-accent-strong at :root, so it has
     to be rebuilt here or it would keep the default's colour */
  --focus-ring: 2px solid var(--shop-accent-strong);
}

/* Every storefront button takes the style's shape (see the contract). */
.shop-body .button {
  border-radius: var(--shop-button-radius);
}

/* ---- shell ----------------------------------------------------------- */
.shop {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--shop-bg);
  font-family: var(--shop-font-body);
}

/* ---- the bakery site's nav (Storefront Site S1) ----------------------
   Two rows in one sticky header: the brand + cart bar, and beneath it the
   category links that make a storefront a SITE. The old single-page topbar
   below is kept because the tokenized order-status page still uses it — that
   page is a buyer's receipt, not part of the bakery's website, and giving it
   the site nav would invite a buyer holding a capability-token URL to wander
   off into a shop they may not have come from. */
.shop-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--shop-nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: var(--shop-nav-border);
  box-shadow: var(--shop-nav-shadow);
}

.shop-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
}

.shop-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  text-decoration: none;
}

.shop-nav__brand:hover {
  text-decoration: none;
}

.shop-nav__brand-name {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--shop-nav-ink);
  font-family: var(--shop-font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-nav__cart {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.shop-nav__cart:hover {
  color: var(--color-text);
  text-decoration: none;
}

.shop-nav__cart-icon {
  flex: 0 0 auto;
}

/* Social profile icons (§8c-101): a small row in the brand bar, pushed right
   so it sits beside the cart (the bar's space-between would otherwise
   centre it). Same muted ink as the cart, so a storefront style's colours
   carry through currentColor. Each link is a 36px tap target around an 18px
   glyph — comfortable on a phone without growing the bar. */
.shop-nav__social {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.shop-nav__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.shop-nav__social-link:hover {
  color: var(--color-text);
}

/* The category row. Scrolls sideways on a narrow screen rather than opening
   behind a JS toggle — a bakery has a handful of categories, and a menu that
   needs JavaScript to open is a menu that sometimes doesn't. */
.shop-nav__links {
  display: flex;
  gap: var(--space-1);
  padding: 0 var(--space-4) var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-nav__links::-webkit-scrollbar {
  display: none;
}

.shop-nav__link {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--shop-nav-link-ink);
  text-decoration: none;
  white-space: nowrap;
}

.shop-nav__link:hover {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  text-decoration: none;
}

/* Page heading for a category page — the site's inner pages announce
   themselves where the home page has its hero. */
.shop-pagehead {
  padding: var(--space-6) var(--space-5) var(--space-4);
}

.shop-pagehead__title {
  font-size: var(--text-xl);
  font-weight: var(--shop-heading-weight);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.shop-pagehead__sub {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* The uploaded logo, in the nav and in the hero (Storefront Site S2). Bounded
   by HEIGHT with width:auto so a wide wordmark and a square badge both behave
   — a bakery uploads whatever shape it has. */
.shop-nav__logo {
  height: 32px;
  width: auto;
  flex: 0 0 auto;
}

.shop-hero__logo {
  display: block;
  height: 88px;
  width: auto;
  margin: 0 auto var(--space-4);
}

.shop-hero__tagline {
  margin-top: var(--space-2);
  font-size: var(--text-md);
  color: var(--color-accent-strong);
  font-weight: var(--weight-medium);
}

/* Subscribe (Storefront Site S3/S11). Since §8c-94 the trigger is a button
   in the home intro's action row (below) rather than a tinted box of its
   own; these rules style the capture dialog it opens and the "on the list"
   line that replaces it after a sign-up. */
.shop-subscribe__done {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.shop-subscribe__error {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-danger);
  font-weight: var(--weight-medium);
}

.shop-subscribe__form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.shop-subscribe__form .input {
  flex: 1 1 12rem;
  max-width: 16rem;
}

.shop-subscribe__consent {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* The SMS consent checkbox row (§8c-80): full flex-row width inside the
   wrapping subscribe form, box top-aligned beside its multi-line disclosure
   label. Left-aligned on purpose — centering legalese hurts scanning. */
.shop-subscribe__consent-check {
  flex: 1 1 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  text-align: left;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  cursor: pointer;
}

/* Nudge the box onto the first text line; never let flex stretch/shrink it. */
.shop-subscribe__consent-check input[type=checkbox] {
  flex: 0 0 auto;
  margin-top: 0.2em;
}

/* ---- home intro (§8c-94) ---------------------------------------------- */
/* The bakery's blurb, centred, the way hearthandtart.com introduces itself:
   paragraphs, a small heading ("How it works:") between them, then the two
   actions side by side. pre-line keeps a baker's single line breaks inside a
   paragraph (escaped text; no markup involved). */
.shop-intro {
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.shop-intro__text {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--color-text);
  white-space: pre-line;
  text-wrap: pretty;
}

.shop-intro__heading {
  margin-top: var(--space-2);
  font-family: var(--shop-font-display);
  font-size: var(--text-lg);
  font-weight: var(--shop-heading-weight);
  color: var(--shop-ink);
}

.shop-intro__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.shop-intro__actions .button {
  min-width: 9rem;
}

/* The nav's "Get notified" link reads as an action among the plain links. */
.shop-nav__link--cta {
  color: var(--shop-accent-strong, var(--color-accent-strong));
  font-weight: var(--weight-semibold);
}

/* ---- subscribe dialog (Storefront Site S11) --------------------------------
   A native <dialog>: modal via showModal() with JS, server-rendered `open`
   (inline, non-modal) on the no-JS ?subscribe=1 path. Same panel either way;
   :modal is what tells the two states apart for positioning. */
.shop-dialog {
  border: 0;
  padding: 0;
  max-width: min(28rem, 92vw);
  background: transparent;
  color: inherit;
}

.shop-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* Inline-open (no-JS) sits in the normal flow, centred; the modal state keeps
   the UA's top-layer centring untouched. */
.shop-dialog[open]:not(:modal) {
  position: static;
  margin: var(--space-5) auto;
}

.shop-dialog__panel {
  position: relative;
  padding: var(--space-6) var(--space-5) var(--space-5);
  border: 1px solid var(--shop-border, var(--color-border));
  border-radius: var(--shop-radius-card);
  background: var(--shop-surface, var(--color-surface));
  text-align: center;
}

.shop-dialog__close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  border: 0;
  background: transparent;
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--shop-ink-muted, var(--color-text-muted));
  cursor: pointer;
}

.shop-dialog__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--shop-ink, var(--color-text));
}

.shop-dialog__lede {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--shop-ink-muted, var(--color-text-muted));
}

/* Inside the dialog the fields stack full-width instead of wrapping in a row.
   The row layout gives each input `flex: 1 1 12rem`; in a column that would
   make them grow to fill the panel's height, so reset it to natural height. */
.shop-dialog .shop-subscribe__form {
  flex-direction: column;
  align-items: stretch;
}

.shop-dialog .shop-subscribe__form .input {
  flex: 0 0 auto;
  max-width: none;
}

/* ---- special tags (Storefront Site S5) -------------------------------
   Badges for the POSITIVE claims a baker makes about a product. Every tag
   also puts `shop-card--tag-<slug>` on its card, so giving any of them a
   full card treatment later is a stylesheet change with no code behind it.
   Only gluten-free has one at launch (§8c-74).

   The PILLS themselves are uniform (2026-11-01, §8c-76 amendment 1): every
   tag uses the green border + green ink the gluten-free pill introduced, and
   the per-tag emoji from product-tags.js#badge is what tells them apart.
   There is deliberately no `.shop-tag--<slug>` color rule any more — one
   would put the set back out of step. (The `shop-tag--<slug>` class still
   rides each <li> as a hook.)

   Every value here is a --shop-tag-* custom property with a token fallback.
   That indirection is what Session S7's style swap will re-declare, so a
   `hearth` storefront can go full green-and-wheat while the default stays
   quiet — without either style needing its own markup. */
.shop-card__tags {
  list-style: none;
  padding: 0;
  margin-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.shop-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0.1rem var(--space-2);
  border: 1px solid var(--shop-tag-border, var(--color-success, #4caf50));
  border-radius: var(--radius-full);
  background: var(--shop-tag-bg, var(--color-surface-sunken));
  color: var(--shop-tag-ink, var(--color-success, #4caf50));
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

/* The one tag with a card treatment at launch: the reference site's green
   border and tinted background, plus a 🌾 corner mark. Deliberately quiet
   under the default palette — a menu where one product shouts is a menu
   where the others look neglected. The `hearth` style (S7) turns it up.

   The mark sits INSIDE the card's corner, over the photo. It was first
   drawn overhanging the corner (-0.5rem), but .shop-card clips its overflow
   (that's what rounds the photo's top corners), so all a buyer ever saw was
   a green sliver (found in the D8.b hand test, §8c-92). pointer-events: none
   lets a tap on it fall through to the card's stretched link. */
.shop-card--tag-gluten-free {
  position: relative;
  border-color: var(--shop-gf-border, var(--color-success, #4caf50));
  background: var(--shop-gf-bg, var(--color-success-soft));
}

.shop-card--tag-gluten-free::after {
  content: var(--shop-gf-mark, "🌾");
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  pointer-events: none;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
  font-size: var(--text-sm);
  line-height: 1;
}

/* Product gallery (Storefront Site S6). Scroll-snap, not a library: with no
   JS this is a native horizontal scroller, which is a perfectly good way to
   look at five photos and costs the storefront no third-party bytes. */
.shop-gallery {
  position: relative;
  width: 100%;
}

.shop-gallery__track {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  border-radius: var(--shop-radius-card);
}

.shop-gallery__img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
  scroll-snap-align: center;
  border-radius: var(--shop-radius-card);
}

/* Dot indicators, added by /js/shop.js — absent without JS, where the
   scrollbar already says the same thing. */
.shop-gallery__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.shop-gallery__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shop-border);
  border: 0;
  padding: 0;
}

.shop-gallery__dot[aria-current=true] {
  background: var(--shop-accent);
}

/* Contact Us (S4): the details list, then the form. */
.shop-contact__list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-base);
}

.shop-contact__label {
  display: inline-block;
  min-width: 5rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.shop-contact__form-block {
  margin-top: var(--space-6);
}

.shop-contact__form {
  margin-top: var(--space-3);
}

/* Request mode's drop-alert tick (2026-10-30): the dialog's consent-check
   style, with room before the Send button it would otherwise sit on. */
.shop-contact__form .shop-subscribe__consent-check {
  margin: var(--space-2) 0 var(--space-4);
}

/* "We're not baking X this week" + its two ways forward (shop-next-drop.hbs,
   2026-10-30): request it for the next drop, or get notified. Replaces S4's
   single "Request a custom item" link. margin-top:auto pins the block to the
   card's foot in a grid row, like the add form, so cards line up. */
.shop-next-drop {
  margin-top: auto;
  /* Raised above the card's stretched-link overlay, like the add form: a
     second interactive control inside a card needs this or it is silently
     un-clickable (see the card partial's note). */
  position: relative;
  z-index: 1;
}

.shop-next-drop__options {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
}

.shop-next-drop__options a {
  color: var(--color-accent-strong);
  font-weight: var(--weight-medium);
}

/* About Us: a column of plain paragraphs, then the photos. */
.shop-about__text p {
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed, 1.7);
  color: var(--color-text);
}

.shop-about__photos {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: var(--space-6);
}

.shop-about__photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* "Keep shopping" — the cart page's way back, which used to live in its
   topbar before the nav took that job. */
.shop-backlink {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

/* quiet top bar — the bakery's identity, not the app's. Retained for the
   tokenized order-status page (see .shop-nav above). */
.shop-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: color-mix(in oklab, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.shop-topbar__name {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-topbar__name:hover {
  text-decoration: none;
}

.shop-topbar__cart {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.shop-topbar__cart:hover {
  color: var(--color-text);
  text-decoration: none;
}

.shop-topbar__cart-icon {
  flex: 0 0 auto;
}

/* live item-count badge on the cart link — EMPTY and [hidden] in server
   markup (the browse page is shared-cacheable; per-buyer state never
   renders server-side), filled by /js/shop.js from the count endpoint */
.shop-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 var(--space-1);
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-accent-strong);
  font-family: var(--font-mono);
  font-size: var(--text-2xs, 0.6875rem);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* re-triggered by JS on every count change (remove + reflow + add) */
.shop-cart-badge--bump {
  animation: shop-badge-bump 0.35s ease;
}

@keyframes shop-badge-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shop-cart-badge--bump {
    animation: none;
  }
}
/* content column — wider for the menu grid, narrow for cart/status prose */
.shop-main {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: var(--space-8) var(--space-5) var(--space-9);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.shop-main--narrow {
  max-width: 40rem;
}

/* ---- hero ------------------------------------------------------------ */
.shop-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-hero__name {
  font-family: var(--shop-font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: var(--weight-bold);
  letter-spacing: var(--shop-hero-tracking, -0.03em);
  text-transform: var(--shop-hero-transform);
  line-height: 1.05;
  text-wrap: balance;
  color: var(--shop-ink);
}

/* the butter dot returns here as a full stop after the name — the one bit of
   ornament the system allows, reused as the bakery's own flourish */
.shop-hero__name::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.12em;
  border-radius: 50%;
  background: var(--color-accent);
  vertical-align: 0.06em;
}

/* The small line over the name or the banner headline (§8c-94), flanked by
   two short rules — hearthandtart.com's "—— MORGAN HILL'S FINEST ——". The
   rules are pseudo-elements in currentColor, so they follow the ink on a
   photo and off it. */
.shop-hero__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--shop-banner-font);
  font-size: var(--text-md);
  letter-spacing: var(--shop-banner-kicker-tracking);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.shop-hero__kicker::before,
.shop-hero__kicker::after {
  content: "";
  flex: 0 0 auto;
  width: clamp(1.5rem, 6vw, 5rem);
  border-top: 2px solid currentColor;
  opacity: 0.85;
}

/* Off a photo the panel is left-aligned, so only the trailing rule. */
.shop-hero:not(.shop-hero--slider) .shop-hero__kicker::before {
  display: none;
}

/* ---- hero banner (S10, full-width since §8c-94) ------------------------ */
/* With banner slides on file the hero is a full-width band of photo directly
   under the nav, outside the page's centred column, with the kicker and
   headline centred on an even dark wash. Built from the same scroll-snap
   primitive the S6 product gallery uses: no-JS shows a native scroll-snap
   strip, /js/shop.js adds dots + autoplay only when there is more than one
   slide. */
.shop-hero--slider {
  position: relative;
  isolation: isolate; /* keep the overlay's stacking local to the hero */
  display: flex;
  align-items: stretch;
  min-height: var(--shop-hero-slide-height);
  overflow: hidden;
}

.shop-hero__slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.shop-hero__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* the banner is decorative; the dots do the wayfinding, so hide the bar */
  scrollbar-width: none;
}

.shop-hero__track::-webkit-scrollbar {
  display: none;
}

.shop-hero__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.shop-hero__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The words sit centred over the slides on an even wash, so they stay
   legible whatever the photo is. Extra bottom padding keeps the headline
   clear of the dots. */
.shop-hero__overlay {
  position: relative;
  z-index: 1;
  /* .shop-hero is a column, so the overlay grows to the banner's full height
     (min-height above) — the wash covers the photo and the words centre. */
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-5) var(--space-7);
  background: var(--shop-banner-scrim);
  text-align: center;
  color: var(--shop-hero-overlay-ink);
}

.shop-hero--slider .shop-hero__kicker {
  color: var(--shop-hero-overlay-ink);
}

/* The logo over the photo (§8c-94 amendment): top of the stack, above the
   kicker. Sized by HEIGHT so a wide wordmark and a square badge read at the
   same weight; max-width keeps a very wide one inside a phone. The banner's
   min-height is a floor, not a box, so a logo makes it taller rather than
   cropping anything. A soft shadow lifts a dark-edged logo off a dark photo
   without boxing it. */
.shop-hero__overlay-logo {
  display: block;
  height: var(--shop-banner-logo-size, clamp(4.5rem, 11vw, 8rem));
  width: auto;
  max-width: min(70%, 20rem);
  object-fit: contain;
  margin-bottom: var(--space-1);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.shop-hero__headline {
  max-width: 60rem;
  font-family: var(--shop-banner-font);
  font-size: var(--shop-banner-size);
  font-weight: var(--shop-banner-weight);
  letter-spacing: var(--shop-banner-tracking);
  text-transform: var(--shop-banner-transform);
  line-height: 1.1;
  text-wrap: balance;
  color: var(--shop-hero-overlay-ink);
}

/* Dot indicators, added by /js/shop.js — absent without JS, where the native
   scroll position already shows where you are. */
.shop-hero__dots {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: var(--space-3);
  display: flex;
  justify-content: center;
  gap: var(--space-1);
}

.shop-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.shop-hero__dot[aria-current=true] {
  background: #fff;
}

/* section heading inside the storefront (Menu, Pickup, Your cart…) */
.shop-section-title {
  font-size: var(--text-lg);
  font-weight: var(--shop-heading-weight);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-5);
}

/* ---- notice (paused / not taking orders / menu-only tier) ------------ */
.shop-notice {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  background: var(--color-warn-soft);
  border: 1px solid color-mix(in oklab, var(--color-warn) 30%, transparent);
  color: var(--color-warn);
}

.shop-notice strong {
  font-weight: var(--weight-semibold);
}

.shop-notice__body {
  color: var(--color-text);
}

/* ---- empty cart (a real state the static mockup doesn't demo) -------- */
.shop-cart__empty {
  padding: var(--space-6) 0;
  font-size: var(--text-md);
  color: var(--color-text-muted);
}

/* ---- menu grid ------------------------------------------------------- */
.shop-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr));
  gap: var(--shop-menu-gap);
}

/* ---- menu panel (§8c-92's drop menu, shared since §8c-94) -------------- */
/* A rounded panel holding a menu's grid(s). With a photo (--menu-backdrop, a
   url() the template sets inline only when there is one) the panel shows it
   blurred and saturated under a surface-coloured wash — the drop reference's
   40px blur / 2x saturation / 75% wash — so the white cards sit on a tint
   drawn from the food. Without one it is the sunken surface. Used by the
   drop page, the home Current Menu, and the category pages. */
.shop-menu-panel {
  position: relative;
  /* its own stacking context, so the backdrop's negative z-index stays
     inside the panel instead of sliding under the page */
  isolation: isolate;
  overflow: hidden;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--shop-hero-radius);
  background: var(--color-surface-sunken);
  box-shadow: var(--shop-card-shadow-hover);
}

.shop-menu-panel--tinted {
  background: var(--color-surface);
}

/* The blurred photo. Oversized and clipped so the blur's fade-out edge
   never shows as a hard line at the panel's border. */
.shop-menu-panel--tinted::before {
  content: "";
  position: absolute;
  inset: -60px;
  z-index: -2;
  background-image: var(--menu-backdrop);
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(2);
}

/* The wash over it: three quarters surface, so cards and text sit on a
   tint, not on a photo. */
.shop-menu-panel--tinted::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--color-surface) 75%, transparent);
}

.shop-menu-panel .shop-section-title {
  margin-bottom: var(--space-4);
}

.shop-menu-panel .shop-menu + .shop-subsection-title {
  margin-top: var(--space-6);
}

/* A drop's menu sections (§8c-103), on the drop page and on Home's Current
   menu (2026-11-01). Lenny: the bare <h3> was too small to show where one
   group ends and the next begins. Each section is now its own box: the
   card surface lifted off the panel's wash, a border, and a heading in the
   style's display face with an accent rule under it, so the grouping reads
   at a glance even on a long menu. Tokens only, so every storefront style
   re-tints it. */
.shop-menu-group {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

/* the first group right under the panel title needs no extra gap */
.shop-section-title + .shop-menu-group {
  margin-top: 0;
}

.shop-menu-group__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  font-family: var(--shop-font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* the accent rule that runs from the name to the box's edge */
.shop-menu-group__title::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: var(--color-accent);
  opacity: 0.6;
}

@media (max-width: 640px) {
  .shop-menu-group {
    padding: var(--space-3);
  }
}
/* The Current menu between drops (Lenny's ask, 2026-10-30): the same
   panel, holding a centred sign-up ask instead of a grid, so the menu keeps
   its place on the page in a week with no drop. Untinted on purpose: there
   is no menu photo to draw a tint from. */
.shop-menu-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.shop-menu-empty .shop-section-title {
  margin-bottom: 0;
}

.shop-menu-empty__lead {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.shop-menu-empty__body {
  max-width: 32rem;
  color: var(--color-text-muted);
}

.shop-menu-empty .button {
  margin-top: var(--space-2);
}

/* The compact grid: two cards across on a phone, then as many ~15rem cards
   as fit — the drop reference's density, denser than the old full menu
   grid. A grid can narrow its cards through --shop-compact-card-min (the
   drop's narrower right-hand column does). */
.shop-menu--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 40rem) {
  .shop-menu--compact {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--shop-compact-card-min, 15rem)), 1fr));
  }
}
/* On a phone the panel runs edge to edge, out through the page gutter. */
@media (max-width: 40rem) {
  .shop-menu-panel {
    margin: 0 calc(-1 * var(--space-5));
    border-radius: 0;
    padding: var(--space-5) var(--space-3);
  }
}
.shop-card {
  /* positioning context for the stretched product link below — without it
     the ::after would size itself against the page, not the card */
  position: relative;
  display: flex;
  flex-direction: column;
  /* Shape routed through the shop token contract (S7), so a style can change
     how a menu FEELS — soft and shadowed, or flat and bordered — without
     touching a template. Defaults resolve to exactly what was here before. */
  background: var(--shop-card-bg);
  border: var(--shop-card-border);
  border-radius: var(--shop-radius-card);
  box-shadow: var(--shop-card-shadow);
  overflow: hidden;
  transition: box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}

/* The whole card is a link to the product page, but ONLY the name is an
   actual <a> — its ::after is stretched over the card to catch the clicks.
   Wrapping the card in an <a> instead would nest the quantity <select> and
   the Add button inside a link: invalid HTML, and browsers break both.

   Consequences to keep in mind when touching this block:
     - anything interactive on the card must sit ABOVE the overlay (see
       .shop-card__add below) or it stops being clickable;
     - the overlay swallows text selection over the card body. That is the
       accepted trade for a card-sized hit target; the description is a
       one-line blurb, not something anyone copies. The detail page shows the
       same text selectable. */
.shop-card__link {
  color: inherit;
  text-decoration: none;
}

.shop-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  /* below the add form's stacking context, above the card's own painting */
  z-index: 0;
}

.shop-card:hover,
.shop-card:focus-within {
  border-color: var(--shop-card-border-hover);
  box-shadow: var(--shop-card-shadow-hover);
}

.shop-card__link:hover {
  text-decoration: underline;
}

/* The card is a navigation target now, so keyboard users need to SEE which
   card they are on. The ring is drawn on the stretched overlay, i.e. around
   the whole card, not just the few words of the title. */
.shop-card__link:focus-visible {
  outline: none;
}

.shop-card__link:focus-visible::after {
  outline: 2px solid var(--color-focus, currentColor);
  outline-offset: -3px;
  border-radius: var(--shop-radius-card);
}

/* Every card gets this block — real photo or the placeholder icon — so
   cards line up (name/desc/price starting at the same offset) regardless
   of which products have a photo. Placeholder is an honest striped well
   with a schematic icon, never stock-photo illustration. */
.shop-card__photo {
  position: relative;
  aspect-ratio: var(--shop-card-photo-ratio);
  background: var(--color-surface-sunken);
  display: grid;
  place-items: center;
  border-bottom: var(--shop-card-photo-border);
}

.shop-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-card__photo--empty {
  background-image: repeating-linear-gradient(-45deg, var(--color-surface-sunken) 0, var(--color-surface-sunken) 11px, var(--color-bg) 11px, var(--color-bg) 22px);
  color: var(--color-text-muted);
}

.shop-card__photo-icon {
  opacity: 0.6;
}

.shop-card__photo-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px var(--space-2);
}

.shop-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--shop-card-pad);
  flex: 1;
}

.shop-card__name {
  font-size: var(--text-md);
  font-weight: var(--shop-card-name-weight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.shop-card__desc {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
  font-style: var(--shop-card-desc-style);
  /* The line clamp is a token so a style can cut long blurbs to N lines (the
     full text is one click away on the product page). With the default
     `none` the -webkit-box display lays out exactly like the block it was. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--shop-card-desc-lines);
  line-clamp: var(--shop-card-desc-lines);
  overflow: hidden;
}

.shop-card__price {
  font-family: var(--shop-price-font);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-md);
  font-weight: var(--shop-price-weight);
  margin-top: var(--space-1);
}

.shop-card__price .shop-card__unit {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  margin-left: var(--space-1);
}

/* Bundles (§8c-128): a small "Bundle" kicker over the name, the "Includes …"
   line under the description, and the saving beside the price. The saving
   uses the success token so it reads as good news in both themes; the kicker
   stays muted so a bundle card is still a card, not an ad. */
.shop-card__kicker {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold, 600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: calc(-1 * var(--space-1));
}

.shop-card__includes {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.shop-card__saving {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-success);
  margin-left: var(--space-2);
  white-space: nowrap;
}

/* A bundle's contents under its cart row (§8c-128). */
.shop-cart-item__includes {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* The product page's "What's inside" list, beside the price. */
.shop-bundle {
  margin: var(--space-3) 0;
  padding: var(--space-3) 0;
  border-top: 1px dashed var(--color-border);
  border-bottom: 1px dashed var(--color-border);
}

.shop-bundle__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold, 600);
  margin: 0 0 var(--space-2);
}

.shop-bundle__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
}

.shop-bundle__list li::before {
  content: "·";
  color: var(--color-text-muted);
  margin-right: var(--space-2);
}

/* quantity-price tiers ("6 for $16.50 — Half dozen") */
.shop-tiers {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px dashed var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.shop-tier {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.shop-tier__qty {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.shop-tier__label {
  color: var(--color-text-muted);
}

/* the per-card add-to-cart mini form (POST; not the page's form)

   position + z-index are LOAD-BEARING, not decoration: they lift the quantity
   <select> and the Add button above .shop-card__link's stretched ::after. Drop
   them and the card still looks right while the cart controls quietly stop
   responding — the exact failure this pattern invites. */
.shop-card__add {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* In a compact grid (above) a narrow card's add form wraps its quantity
   select over the button rather than squeezing both onto one line. Grid rows
   stretch every card to the tallest one, so a card with a tier list or a long
   name would leave its neighbours' add rows floating at different heights:
   `auto` pins each add row to the card's foot, lining them up across the row.
   (After the base rule on purpose: the stretched-link guard in
   tests/shop-product-page.test.js reads the FIRST .shop-card__add block.) */
.shop-menu--compact .shop-card__add {
  flex-wrap: wrap;
  margin-top: auto;
}

.shop-menu--compact .shop-card__add .button {
  min-width: 7rem;
}

.shop-qty {
  flex: 0 0 auto;
  width: auto;
  min-width: 4.5rem;
  min-height: 38px;
  max-width: none;
}

.shop-card__add .button {
  flex: 1;
}

/* the fetch-add confirmation flash (/js/shop.js): a quiet success state on
   the same button — no toast, no layout shift, gone in ~1.4s */
.shop-card__add .button.is-added {
  background: var(--color-success-soft);
  border-color: var(--color-success);
  color: var(--color-success);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* menu-closed variant: no add control, so pin a quiet line instead */
.shop-card__closed {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- availability states (Catalog & Windows Session 4) --------------- */
/* Sold out: same slot as the closed line, but it must read as a STATE,
   not an apology — bolder, warn-toned. */
.shop-card__soldout {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-warn);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* The "Only 3 left" urgency line — quiet size, accent-strong tone. */
.shop-card__remaining {
  /* flex-start so a pill-shaped style hugs its text instead of spanning the
     card; for the default (no box) the line looks exactly as before */
  align-self: flex-start;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--shop-stock-ink);
  background: var(--shop-stock-bg);
  border: var(--shop-stock-border);
  border-radius: var(--shop-stock-radius);
  padding: var(--shop-stock-pad);
}

/* ---- the open ordering window's card (Catalog & Windows 4b) ---------- */
/* §8c-92 decision 17: with a cover the card leads with that photo (the same
   one the drop page shows), name and tagline on it under the hero scrim
   token — the drop page's own cover treatment (_shop-drop.scss), so the card
   previews the page it opens. No cover = the original tinted text card.
   Decision 18 (2026-11-01): the card is an <article> whose one link is the
   "Order now" button; the button's ::after covers the whole card (the
   stretched-link pattern), so the card stays one tap target, as decision 17
   asked, with a real button in it and no nested interactive content. */
.shop-window-wrap {
  margin-bottom: var(--space-6);
  /* "Order now" scrolls here when several drops are open; clear the two-row
     sticky nav. */
  scroll-margin-top: 7rem;
}

/* Several open drops (§8c-110): cards share a row where each still fits, and
   stack on a phone. The card and body become columns so the buttons line up
   along the bottom however long each description runs. */
.shop-window-wrap--several {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-4);
}

.shop-window-wrap--several .shop-window {
  display: flex;
  flex-direction: column;
}

.shop-window-wrap--several .shop-window__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.shop-window-wrap--several .shop-window__meta {
  margin-top: auto;
  padding-top: var(--space-3);
}

.shop-window {
  position: relative; /* the containing block for the button's ::after */
  display: block;
  overflow: hidden; /* clips the photo to the rounded corners */
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* the product card's hover tokens, so a storefront style re-tints both */
.shop-window:hover {
  box-shadow: var(--shop-card-shadow-hover);
  transform: translateY(-1px);
}

/* Keyboard focus lands on the button (which keeps its own ring); the card it
   stands for gets one too, since the ::after makes the card the target. */
.shop-window:has(.shop-window__order:focus-visible) {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .shop-window, .shop-window:hover {
    transition: none;
    transform: none;
  }
}
/* The cover: a wide banner on a desktop, taller on a phone (below) so the
   food still reads at 375px. */
.shop-window__cover {
  position: relative;
  aspect-ratio: 21/9;
  background: var(--color-surface-sunken);
}

.shop-window__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-window__cover-text {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-7) var(--space-5) var(--space-4);
  background: var(--shop-hero-scrim);
  color: var(--shop-hero-overlay-ink);
}

.shop-window__body {
  padding: var(--space-5);
}

.shop-window--cover .shop-window__body {
  padding-block: var(--space-4);
}

.shop-window__name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.015em;
}

.shop-window--cover .shop-window__name {
  font-family: var(--shop-font-display);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: var(--shop-hero-tracking);
  text-wrap: balance;
}

.shop-window__tagline {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
}

.shop-window--cover .shop-window__tagline {
  font-size: var(--text-base);
}

/* The drop's description (decision 18): the drop page's paragraphs, in the
   card's body text size. Full length — the baker wrote it to be read, and
   the button sits right under it. */
.shop-window__description {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.shop-window--cover .shop-window__description {
  margin-top: 0;
}

.shop-window__meta {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-accent-strong);
  font-weight: var(--weight-semibold);
}

/* tabular digits so the ticking seconds don't make the line jitter */
.shop-window__countdown {
  font-variant-numeric: tabular-nums;
}

.shop-window__order {
  margin-top: var(--space-3);
  min-width: 9rem; /* the intro's "Order now" width */
  min-height: var(--touch-target);
}

/* the stretched link: the whole card opens the drop (see the block comment) */
.shop-window__order::after {
  content: "";
  position: absolute;
  inset: 0;
}

@media (max-width: 640px) {
  .shop-window__cover {
    aspect-ratio: 4/3;
  }
  .shop-window__cover-text {
    padding-inline: var(--space-4);
  }
  .shop-window__body {
    padding: var(--space-4);
  }
}
/* Storefront Site S1 retired the banner's item ROWS (.shop-window__items and
   friends): an open window's products render as ordinary cards in the home
   page's Current Menu grid now, so the window contributes only the heading and
   the deadline above. */
/* The cart row's "window order" tag (Session 5a). */
.shop-cart-window-tag {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 0 var(--space-2);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  font-size: var(--text-xs);
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  white-space: nowrap;
}

/* Storefront Site S1 retired .shop-catnav (the in-page #cat-<slug> anchor
   jump links): categories are real pages now, reached from .shop-nav__links
   above, which every page of the site carries. */
/* Section heading inside a category (Breads -> Sourdough). */
.shop-subsection-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  margin: var(--space-5) 0 var(--space-4);
}

/* ---- pickup info block (shop + status page) -------------------------- */
/* ---------------------------------------------------------------------------
   Product detail page (pages/shop/product.hbs)

   Reuses the card's type scale and the page's existing surface tokens on
   purpose — the buyer arrives here from a card and should feel like they
   zoomed in, not like they landed on a different site. Only the layout
   changes: side-by-side photo/buy on wide screens, stacked on narrow.
   --------------------------------------------------------------------------- */
.shop-crumb {
  margin-bottom: var(--space-4);
}

.shop-crumb__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.shop-crumb__link:hover {
  text-decoration: underline;
}

.shop-product {
  display: grid;
  /* One column until there is genuinely room for two — a 3:2 split below
     ~46rem gives a photo too small to judge a cake by and a buy column too
     narrow for the price and Add button to share a line. */
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 46rem) {
  .shop-product {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--space-7);
  }
}
.shop-product__media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* The single-photo case only: a DIRECT child. Written as a descendant
   selector (`.shop-product__media img`), this also caught every gallery
   photo and out-ranked .shop-gallery__img, so the photos left the flow, the
   scroll track collapsed to 0px, and .shop-gallery (position: relative)
   became their containing block, about 15px tall (the dots row): a sliver
   of photo, all slides stacked on one another. */
.shop-product__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* A gallery (S6) inside the 4:3 frame: the gallery fills the frame, the
   track and each slide take its full height (cropped by object-fit, like
   the single photo), and the dots float over the bottom edge rather than
   sitting under the track, where the frame's overflow: hidden would cut
   them off. */
.shop-product__media > .shop-gallery {
  position: absolute;
  inset: 0;
}

.shop-product__media .shop-gallery__track {
  height: 100%;
  border-radius: 0;
}

.shop-product__media .shop-gallery__img {
  height: 100%;
  border-radius: 0;
}

.shop-product__media .shop-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-2);
  margin-top: 0;
}

/* Over a photo the dots need their own contrast: a white rim on the
   inactive ones, which otherwise vanish against a pale crumb. */
.shop-product__media .shop-gallery__dot {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}

/* Same striped well as the card placeholder — deliberate, not broken. */
.shop-product__media--empty {
  background-image: repeating-linear-gradient(-45deg, var(--color-surface-sunken) 0, var(--color-surface-sunken) 11px, var(--color-bg) 11px, var(--color-bg) 22px);
  color: var(--color-text-muted);
}

.shop-product__media-icon {
  opacity: 0.6;
}

.shop-product__buy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.shop-product__name {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.shop-product__lede {
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-text-muted);
}

.shop-product__price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-top: var(--space-2);
}

/* No stretched-link overlay on this page, so the add form needs no z-index
   lift here — the class is shared with the card purely so /js/shop.js's
   existing submit handler binds to it. */
.shop-product__add {
  margin-top: var(--space-5);
}

.shop-product__details {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  max-width: 42rem;
}

.shop-product__details h2 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
}

.shop-product__para,
.shop-product__ingredients {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text-muted);
}

.shop-product__para + .shop-product__para {
  margin-top: var(--space-3);
}

.shop-allergens {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Chips, not a bullet list: this is a scan-in-one-second safety line, and a
   buyer checking for "Peanuts" should find it without reading a sentence. */
.shop-allergen {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill, 999px);
  background: var(--color-surface-sunken);
}

.shop-product__allergen-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.shop-pickup {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.shop-pickup h2 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.shop-pickup__body {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
  white-space: pre-line;
}

/* ---- footer (powered-by credit) -------------------------------------- */
.shop-footer {
  margin-top: auto;
  padding: var(--space-6) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.shop-footer__credit {
  letter-spacing: 0.01em;
}

.shop-footer__credit strong {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

/* The credit became a link (the storefront's growth loop — launch review S3)
   and the footer gained a Privacy link (B3). Both stay quiet footer text,
   not accent-colored links; hover reveals the affordance. */
a.shop-footer__credit,
.shop-footer__legal {
  color: var(--color-text-muted);
  text-decoration: none;
}

a.shop-footer__credit:hover,
.shop-footer__legal:hover {
  text-decoration: underline;
}

/* ===================================================================== *
 * CART                                                                  *
 * ===================================================================== */
/* line-item table reuses .table; this makes it collapse to cards on phones */
@media (max-width: 640px) {
  .shop-cart-table thead {
    display: none;
  }
  .shop-cart-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-1) var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
  }
  .shop-cart-table td {
    border: none;
    padding: 0;
  }
  .shop-cart-table td[data-label]::before {
    content: attr(data-label) " ";
    color: var(--color-text-muted);
    font-size: var(--text-xs);
  }
  .shop-cart-table .shop-cart-item {
    grid-column: 1/-1;
    font-weight: var(--weight-semibold);
  }
  .shop-cart-table .shop-cart-remove {
    grid-column: 2;
    text-align: right;
  }
}
/* editable quantity: number input + Update, a real JS-free mini form */
.shop-qty-form {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.shop-qty-form .input--num {
  width: 3.75rem;
  min-height: 34px;
}

/* cart / order money summary — subtotal, tax, total */
.shop-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.shop-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
}

.shop-summary__row .num {
  font-size: var(--text-base);
}

/* ---- tip section (migration 051) -------------------------------------- */
/* lives inside the buyer-details form: preset chips over ONE real field */
.shop-tip {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-tip__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.shop-tip__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.shop-tip__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* chips are type="button" conveniences that fill the field via /js/tip-picker.js;
   without JS they do nothing and the field still takes a typed amount */
.shop-tip__chip {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.shop-tip__chip:hover {
  border-color: var(--color-accent);
}

.shop-tip__chip.is-selected {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent-strong);
}

.shop-tip__field {
  margin: 0;
}

/* "$" prefix sits inside the field row so the input itself stays a plain
   numeric text input (the posted `tip` value carries no currency sign) */
.shop-tip__input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.shop-tip__currency {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.shop-tip__input .input--num {
  width: 7rem;
}

.shop-summary__row--muted {
  color: var(--color-text-muted);
}

.shop-summary__row--muted .num {
  font-size: var(--text-sm);
}

/* A one-line explanation under a summary row (the Service fee's "goes to
   BakeFlow", §8c-93): indented to the row's text, smaller and quieter, and
   tucked up against the row it explains. */
.shop-summary__note {
  margin: calc(-1 * var(--space-2)) 0 0;
  padding: 0 var(--space-5) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.shop-summary__row--total {
  font-weight: var(--weight-semibold);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-sunken);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.shop-summary__row--total .num {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

/* buyer-details form */
.shop-details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: var(--space-6) var(--space-6) var(--space-5);
}

.shop-details .field:last-of-type {
  margin-bottom: 0;
}

.shop-details .input,
.shop-details .select,
.shop-details .textarea {
  max-width: 100%;
}

/* two-up rows on wider screens (name / email, date / phone) */
.shop-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--space-4);
}

@media (max-width: 520px) {
  .shop-field-row {
    grid-template-columns: 1fr;
  }
}
/* The checkout's buyer fields (§8c-97): rows size to their tallest field and
   each field starts at the top of its cell, so labels share a line and
   inputs share a line; hints hang below the input (see cart.hbs), spaced
   by .field's own gap. */
.shop-field-row--buyer {
  align-items: start;
}

/* "Remember my details on this device" — a plain checkbox line under the
   fields, quieter than the fields themselves. */
.shop-remember {
  /* its own line (flex, not inline-flex), or the step's Continue button
     wraps up beside it on a wide screen */
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-1) 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}

.shop-remember input {
  width: 1rem;
  height: 1rem;
  margin: 0; /* the UA margin would push the box off the fields' left edge */
  accent-color: var(--shop-accent);
}

/* the checkout row — big reassuring Continue + the pay-first framing */
.shop-checkout {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-checkout .button {
  min-height: var(--touch-target);
}

.shop-reassure {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.shop-reassure::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-1px);
}

/* The checkout's browsewrap consent line (S12): quieter than the reassurance
   above it — it is fine print, not a selling point. */
.shop-checkout__consent {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--shop-ink-muted, var(--color-text-muted));
  line-height: 1.5;
}

/* honeypot — present in the DOM, invisible to sighted AND AT users, never
   focusable. Do NOT surface this in any redesign (brief §3b). */
.shop-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* the three pickup-date shapes (freeform / planned / baker-contacts) */
.pickup-note {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
}

.pickup-empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
}

/* ===================================================================== *
 * ORDER CONFIRMED                                                        *
 * ===================================================================== */
.shop-confirm {
  max-width: 32rem;
  margin: var(--space-6) auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.shop-confirm__mark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: 1.75rem;
  line-height: 1;
}

.shop-confirm__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.shop-confirm__body {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.shop-confirm__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===================================================================== *
 * ORDER STATUS (no-account tracking page)                               *
 * ===================================================================== */
.status-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
}

.status-head__badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* larger status badge for the top-of-page state */
.status-badge {
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-4);
}

.status-head__note {
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
}

/* canceled: drop the butter warmth for a plain, sober treatment */
.status-head--canceled {
  background: var(--color-danger-soft);
  border-color: color-mix(in oklab, var(--color-danger) 28%, transparent);
}

.status-head--ready {
  background: var(--color-success-soft);
  border-color: color-mix(in oklab, var(--color-success) 30%, transparent);
}

/* payment-status line under the totals */
.status-payment {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.status-payment strong {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

/* bakery contact details (email / phone / address — whichever are set) */
.status-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, max-content));
  gap: var(--space-3) var(--space-7);
  margin: 0;
}

.status-contact dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

.status-contact dd {
  margin: 0;
  font-size: var(--text-sm);
}

/* ---- the option picker (S8.c, §8c-75) ------------------------------------
   "Options · Select 1 · Required" over a list of radio rows, the Hotplate
   shape. It lives INSIDE the add form (.shop-card__add), which is what lifts
   it above the card's stretched link. The form wraps so the picker takes a
   full row above the quantity and the button. Every colour is a bridged
   token, so each storefront style draws it in its own palette. */
.shop-card__add--options {
  flex-wrap: wrap;
}

.shop-options {
  flex: 1 0 100%;
  min-width: 0;
  margin: 0 0 var(--space-1);
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.shop-options__legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  /* In a two-up phone card "Options" and the badge don't fit side by side;
     the badge drops under the title instead of running off the card. */
  flex-wrap: wrap;
  row-gap: var(--space-1);
}

.shop-options__rule {
  padding: 2px var(--space-2);
  border-radius: 999px;
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

/* Once something is chosen the requirement is met, and the badge says so
   (Hotplate's green "Required"). Pure CSS: no JS, nothing to keep in sync. */
.shop-options:has(input:checked) .shop-options__rule {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.shop-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--shop-radius-card, var(--radius-md));
  font-size: var(--text-sm);
  cursor: pointer;
  /* A narrow card (two-up on a phone) can't fit radio, name, "N left" and
     "+$6.00" on one line; squeezed, the name broke at its hyphen ("8- /
     pack") and the pill wrapped inside itself. Instead the meta moves to a
     second line, right-aligned. See __name for why it wraps as a unit. */
  flex-wrap: wrap;
  row-gap: var(--space-1);
}

.shop-option:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.shop-option:has(input:focus-visible) {
  outline: var(--focus-ring);
  outline-offset: 1px;
}

.shop-option input {
  margin: 0;
  accent-color: var(--color-accent);
}

/* Line breaking is decided on each item's natural width clamped by its
   min/max, so the max-width (the line minus the radio and its gap) is what
   keeps a long name from wrapping onto a line of its own and stranding the
   radio: radio + name always fit line one, and only the meta can move. A
   short name keeps its natural width, so a row that fits stays one line. */
.shop-option__name {
  flex: 1 1 auto;
  max-width: calc(100% - 1.5rem);
}

.shop-option__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  /* right-aligned when it wraps; a no-op on one line (the name grows) */
  margin-left: auto;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* the per-option "N left": the same pill the card's count uses */
.shop-option__left {
  color: var(--shop-stock-ink);
  background: var(--shop-stock-bg);
  border: var(--shop-stock-border);
  border-radius: var(--shop-stock-radius);
  padding: var(--shop-stock-pad);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.shop-option__left,
.shop-option__delta {
  white-space: nowrap;
}

.shop-option.is-soldout {
  cursor: not-allowed;
  opacity: 0.6;
}

.shop-option__soldout {
  font-size: var(--text-xs);
}

/* ---- the − qty + stepper (§8c-92 D5) -------------------------------------
   On the product page's add form (and so inside the quick-view, which lifts
   that form). The − / + buttons ship hidden and /js/shop.js reveals them; the
   number input works alone without JS. The spin arrows are suppressed, since
   the buttons replace them. */
.shop-stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.shop-stepper__btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-md);
  line-height: 1;
  cursor: pointer;
}

.shop-stepper__btn:hover {
  border-color: var(--color-accent);
}

.shop-stepper__input {
  width: 3.5rem;
  min-height: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.shop-stepper__input::-webkit-outer-spin-button,
.shop-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* the product page's Add takes the rest of the row (the Hotplate wide pill;
   its radius is the style's --shop-button-radius via .shop-body .button) */
.shop-product__add-btn {
  flex: 1 1 10rem;
}

/* ---- the product quick-view dialog (§8c-92 D5) ---------------------------
   public/js/shop-quickview.js lifts the product page's [data-product-detail]
   region into this <dialog>. Desktop: a centred panel. Phone: a sheet that
   fills the screen, with the add form pinned to its foot so the button is
   always one thumb away, Hotplate's layout. */
.shop-qv {
  width: min(100% - 2rem, 60rem);
  max-height: min(100% - 2rem, 52rem);
  padding: 0;
  border: 0;
  border-radius: var(--shop-radius-card, var(--radius-lg));
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.shop-qv::backdrop {
  background: rgba(20, 16, 12, 0.45);
  backdrop-filter: blur(2px);
}

.shop-qv[open] {
  display: flex;
  flex-direction: column;
}

.shop-qv__body {
  overflow-y: auto;
  padding: var(--space-6);
  overscroll-behavior: contain;
}

.shop-qv__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
}

/* Inside the dialog the details sit tighter than on their own page. */
.shop-qv .shop-product__details {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
}

@media (max-width: 640px) {
  .shop-qv {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }
  .shop-qv__body {
    padding: var(--space-4) var(--space-4) 0;
  }
  /* the add form stays pinned to the bottom of the sheet while the photo
     and copy scroll under it. shop-quickview.js moves the form to the end
     of the lifted region at this width, because sticky only holds inside
     its containing block, and in place that is the buy column. */
  .shop-qv .shop-product__add {
    position: sticky;
    bottom: 0;
    margin: var(--space-4) calc(-1 * var(--space-4)) 0;
    padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
  }
}
/* ---- floating cart bar + cart sheet (§8c-92 D6) --------------------------
   The bar: a pill fixed to the bottom centre, in the style's accent, shown by
   /js/shop.js once the cart holds anything ("Cart · 3 items · $32.00").
   Safe-area aware, and the body gains bottom room while it shows so it never
   covers the footer's last line. The sheet: a <dialog> that is a centred
   panel on desktop and a bottom sheet on a phone. */
.shop-cartbar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: min(100% - 2rem, 28rem);
}

.shop-cartbar[hidden] {
  display: none;
}

.shop-cartbar__button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font: inherit;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}

.shop-cartbar__button:hover {
  background: var(--color-accent-hover);
}

.shop-cartbar__button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.shop-cartbar__label {
  margin-right: auto;
}

.shop-cartbar__count {
  opacity: 0.85;
  font-weight: var(--weight-normal);
}

.shop-cartbar__total {
  font-variant-numeric: tabular-nums;
}

.shop-body.has-cartbar {
  padding-bottom: 5.5rem;
}

.shop-sheet {
  width: min(100% - 2rem, 32rem);
  max-height: min(100% - 2rem, 44rem);
  padding: 0;
  border: 0;
  border-radius: var(--shop-radius-card, var(--radius-lg));
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.shop-sheet::backdrop {
  background: rgba(20, 16, 12, 0.45);
}

.shop-sheet[open] {
  display: flex;
  flex-direction: column;
}

.shop-sheet__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.shop-sheet__title {
  font-size: var(--text-lg);
  font-weight: var(--shop-heading-weight, var(--weight-semibold));
}

.shop-sheet__pickup {
  padding: 2px var(--space-2);
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.shop-sheet__pickup:empty {
  display: none;
}

.shop-sheet__close {
  top: var(--space-4);
  right: var(--space-4);
  box-shadow: none;
}

.shop-sheet__lines {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-5);
  overflow-y: auto;
  flex: 1 1 auto;
}

.shop-sheet__line {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.shop-sheet__thumb {
  flex: 0 0 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
  overflow: hidden;
}

.shop-sheet__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-sheet__info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-sheet__name {
  font-weight: var(--shop-card-name-weight, var(--weight-semibold));
}

.shop-sheet__variant {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.shop-sheet__stepper {
  margin-top: var(--space-2);
}

.shop-sheet__stepper .shop-stepper__btn {
  width: 1.9rem;
  height: 1.9rem;
  font-size: var(--text-sm);
}

.shop-sheet__qty {
  min-width: 1.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.shop-sheet__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.shop-sheet__total {
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
}

.shop-sheet__remove {
  border: 0;
  background: none;
  padding: 0;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-xs);
  text-decoration: underline;
  cursor: pointer;
}

.shop-sheet__foot {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-sheet__subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.shop-sheet__checkout {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .shop-sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: var(--shop-radius-card, var(--radius-lg)) var(--shop-radius-card, var(--radius-lg)) 0 0;
    max-height: 85%;
  }
  .shop-sheet__foot {
    padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
  }
}
/* ---- the stepped checkout (§8c-92 D7) ------------------------------------
   Info → Pickup → Pay as titled sections of the ONE checkout form. Without
   JS every section is open and the header is a plain map of the steps.
   /js/checkout-steps.js adds `.is-stepped` to the form and moves the
   is-current / is-done / is-folded classes; Pay is never folded, only dimmed
   (and made inert) until the steps before it are done. */
.shop-cart-items {
  margin-bottom: var(--space-4);
}

.shop-cart-items__summary {
  cursor: pointer;
  padding: var(--space-2) 0;
  font-weight: var(--shop-heading-weight, var(--weight-semibold));
}

.shop-cart-items__count {
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
}

/* Each step is its own card now, so the form drops the single card the
   buyer-details form used to be (.shop-details, above). */
.shop-details.shop-checkout-steps {
  margin-top: var(--space-6);
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.shop-steps {
  z-index: 5;
  display: flex;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: var(--space-2) 0;
  list-style: none;
  background: var(--color-bg);
}

/* The header sticks only once /js/checkout-steps.js is stepping, and just
   under the shop's own sticky nav: the script measures the nav (its height
   changes as it wraps) into --shop-sticky-top. */
.is-stepped .shop-steps {
  position: sticky;
  top: var(--shop-sticky-top, 0);
}

.shop-steps__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 0;
  justify-content: center;
  padding: var(--space-2);
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.shop-steps__tab.is-current {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.shop-steps__tab.is-done {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent-soft);
}

.shop-steps__num {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.shop-steps__tab.is-current .shop-steps__num,
.shop-step.is-current .shop-steps__num {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.shop-step {
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--shop-radius-card, var(--radius-lg));
  background: var(--color-surface);
}

.shop-step__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-md);
  font-weight: var(--shop-heading-weight, var(--weight-semibold));
}

.shop-step__title[role=button] {
  cursor: pointer;
}

.shop-step__title[role=button]::after {
  content: "Edit";
  margin-left: auto;
  color: var(--color-accent-strong);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.shop-step__recap {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.shop-step__next {
  margin-top: var(--space-4);
}

.is-stepped .shop-step.is-folded .shop-step__body {
  display: none;
}

.is-stepped .shop-step.is-folded .shop-step__title {
  margin-bottom: 0;
}

.is-stepped .shop-step.is-done .shop-step__title {
  margin-bottom: var(--space-1);
}

.is-stepped .shop-step.is-upcoming {
  opacity: 0.55;
}

/* ---- The drop checkout's slot choice (§8c-98 P5.a) -----------------------
   One soft card per pickup location (and one for Delivery), its days/hours
   as radio rows inside. Every value is a token, so a storefront style
   re-tints it like the rest of the checkout (§8c-74). */
.shop-slots {
  border: 0;
  margin: 0 0 var(--space-2);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-slot-group {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
}

.shop-slot-group__title {
  font-weight: var(--weight-semibold);
  margin: 0;
}

.shop-slot-group__fee {
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

.shop-slot-group__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.shop-slot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  cursor: pointer;
}

.shop-slot > input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
  accent-color: var(--color-accent-strong);
}

/* The delivery address, under the choices. Visible without JS ("only
   needed for delivery"); /js/checkout-fulfillment.js hides it for pickup. */
.shop-delivery {
  border: 0;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.shop-delivery[hidden] {
  display: none;
}

.shop-delivery__title {
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

/* City / state / ZIP on one line where it fits; state and ZIP are short.
   A phone stacks them, as every other field row does at this width (this
   rule comes later in the file, so it must restate the breakpoint). */
.shop-field-row--address {
  grid-template-columns: 2fr 1fr 1fr;
}

@media (max-width: 520px) {
  .shop-field-row--address {
    grid-template-columns: 1fr;
  }
}
/* _shop-drop.scss
   Outline: the public DROP page (pages/shop/drop.hbs, §8c-92 D3) — a back /
     share bar, then two columns on wide screens: a sticky event card (cover
     with the name over it, tagline, order-by line, pickup date/time/place)
     and the drop's menu on a blurred, washed-out copy of the cover. On a
     phone the card runs edge to edge and the menu stacks under it; with a
     cover, the facts ride on the photo (the reference's hero).
   Purpose: the Hotplate drop layout every bakery gets. It's a LAYOUT, so it
     lives here as structure. Every colour, radius, and face comes through the
     shop token contract (the bridge in _shop.scss), so Butter & Ink and
     Hearth and Tart render the same page in their own looks (§8c-74's rule:
     styles are CSS, layouts are pages).
   Logic / invariants:
     - The menu panel itself (the blurred, washed-out backdrop) and its
       compact card grid are SHARED since §8c-94 — .shop-menu-panel and
       .shop-menu--compact in _shop.scss — because the home and category
       pages wear the same treatment. Only what is drop-specific stays here.
     - No raw colours: everything below is a token, so dark mode (where a
       style allows it) is still a pure token swap. */
.shop-drop {
  /* The drop page wants more room than the 62rem site column: two columns
     side by side, the menu itself three cards wide. */
  max-width: 76rem;
  gap: var(--space-5);
}

/* ---- back + share bar ---------------------------------------------------- */
.shop-drop__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.shop-drop__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.shop-drop__back:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* The reference's soft-peach button: the accent wash, accent-strong ink. */
.shop-drop__share {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.shop-drop__share:hover {
  background: color-mix(in oklab, var(--color-accent-soft) 80%, var(--color-accent));
}

/* ---- the two columns ------------------------------------------------------ */
.shop-drop__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 56rem) {
  .shop-drop__layout {
    grid-template-columns: minmax(18rem, 22rem) 1fr;
    gap: var(--space-7);
  }
  /* The event card stays in view while the menu scrolls past it. The offset
     clears the sticky site nav (brand row + category row). */
  .shop-drop__event {
    position: sticky;
    top: 7.5rem;
  }
}
/* ---- event card ------------------------------------------------------------ */
.shop-drop__event {
  background: var(--color-surface);
  border-radius: var(--shop-hero-radius);
  box-shadow: var(--shop-card-shadow-hover);
  overflow: hidden;
}

.shop-drop__cover {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-surface-sunken);
}

.shop-drop__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The name sits on the photo under the hero scrim token, so a style that
   re-tints its banner scrim re-tints this one too. */
.shop-drop__cover-text {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-7) var(--space-4) var(--space-4);
  background: var(--shop-hero-scrim);
}

.shop-drop__cover--plain .shop-drop__cover-text {
  /* No photo: no scrim, and the name in ordinary ink on the sunken panel. */
  background: none;
}

.shop-drop__title {
  font-family: var(--shop-font-display);
  font-size: clamp(1.5rem, 3.4vw, 1.75rem);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: var(--shop-hero-tracking);
  text-wrap: balance;
  color: var(--shop-hero-overlay-ink);
}

.shop-drop__cover--plain .shop-drop__title {
  color: var(--color-text);
}

.shop-drop__badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text);
}

.shop-drop__facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}

.shop-drop__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.shop-drop__status {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-strong);
}

.shop-drop__status--closed {
  color: var(--color-text-muted);
}

/* A fact row: round icon bubble, the fact, a chevron. Used as a <details>
   summary (pickup) and as a link (the place). */
.shop-drop__fact {
  border-radius: var(--radius-md);
}

.shop-drop__fact > summary,
.shop-drop__fact--link,
div.shop-drop__fact {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  margin: 0 calc(-1 * var(--space-2));
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
}

.shop-drop__fact > summary {
  cursor: pointer;
  list-style: none;
}

.shop-drop__fact > summary::-webkit-details-marker {
  display: none;
}

.shop-drop__fact > summary:hover,
.shop-drop__fact--link:hover,
.shop-drop__fact[open] > summary {
  background: var(--color-surface-sunken);
  text-decoration: none;
}

.shop-drop__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.shop-drop__fact-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-weight: var(--shop-card-name-weight);
}

.shop-drop__address {
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-drop__chevron {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  transition: transform var(--dur-2, 0.15s) var(--ease-out, ease-out);
}

.shop-drop__fact[open] .shop-drop__chevron {
  transform: rotate(180deg);
}

.shop-drop__days {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0 0 0 calc(2.5rem + var(--space-3));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.shop-drop__days li {
  display: flex;
  flex-direction: column;
}

/* one line per pickup or delivery time on that day (§8c-98) */
.shop-drop__days-slot {
  color: var(--color-text-muted);
}

/* The description is the facts block's SIBLING (so the phone hero can leave
   it off the photo), but on a wide screen it must look as if it were still
   the facts' last row: the facts give up the bottom padding a gap would
   have been, and the description takes the facts' side + bottom padding. */
.shop-drop__facts:has(+ .shop-drop__description) {
  padding-bottom: var(--space-2);
}

.shop-drop__description {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 var(--space-4) var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* ---- the menu panel --------------------------------------------------------- */
/* The panel and its grid are .shop-menu-panel / .shop-menu--compact in
   _shop.scss (shared with the home and category menus since §8c-94). The
   drop's grid differs in one way: it sits in the narrow right-hand column,
   so its cards may be a touch narrower than a full-width menu's. */
.shop-menu--drop {
  --shop-compact-card-min: 13rem;
}

.shop-drop__empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---- phone: the cover runs edge to edge ------------------------------------- */
@media (max-width: 40rem) {
  .shop-drop__event {
    margin: 0 calc(-1 * var(--space-5));
    border-radius: 0;
    box-shadow: none;
  }
  .shop-drop__cover {
    aspect-ratio: 5/4;
  }
  .shop-drop__facts {
    padding: var(--space-4) var(--space-5);
  }
  .shop-drop__description {
    margin-inline: var(--space-5);
  }
  /* -- the reference's phone hero (D8.b hand test) --------------------------
     With a cover, the photo fills the whole head of the card and the name,
     tagline, order-by line, pickup row and place all ride on it, so the
     menu starts about one screen higher than when the facts stacked below
     the photo. The cover wrapper steps aside (display: contents) so its
     photo and name join the card's grid: the photo and a scrim span rows
     1–3 (a spacer, the name, the facts), and the description, if any,
     lands in row 4, on the card's own surface below the photo. */
  .shop-drop__event--photo {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(7rem, auto) auto auto;
  }
  .shop-drop__event--photo .shop-drop__cover {
    display: contents;
  }
  .shop-drop__event--photo .shop-drop__cover img {
    position: static;
    grid-area: 1/1/4/2;
    align-self: stretch;
    height: 100%;
  }
  .shop-drop__event--photo::before {
    content: "";
    grid-area: 1/1/4/2;
    z-index: 1;
    background: var(--shop-drop-scrim);
  }
  .shop-drop__event--photo .shop-drop__cover-text {
    position: static;
    grid-area: 2/1;
    z-index: 2;
    padding: 0 var(--space-5);
    background: none;
  }
  .shop-drop__event--photo .shop-drop__facts {
    grid-area: 3/1;
    z-index: 2;
    padding: var(--space-2) var(--space-5) var(--space-5);
  }
  .shop-drop__event--photo .shop-drop__description {
    grid-row: 4;
    margin-top: var(--space-4);
    padding-top: 0;
    border-top: 0;
  }
  /* Everything on the photo reads in the hero's overlay ink, with the
     quieter lines (tagline, address, the place) a step softer. */
  .shop-drop__event--photo .shop-drop__status,
  .shop-drop__event--photo .shop-drop__fact > summary,
  .shop-drop__event--photo .shop-drop__fact--link,
  .shop-drop__event--photo div.shop-drop__fact,
  .shop-drop__event--photo .shop-drop__chevron,
  .shop-drop__event--photo .shop-drop__days {
    color: var(--shop-hero-overlay-ink);
  }
  .shop-drop__event--photo .shop-drop__tagline,
  .shop-drop__event--photo .shop-drop__address,
  .shop-drop__event--photo .shop-drop__days-slot {
    color: color-mix(in srgb, var(--shop-hero-overlay-ink) 85%, transparent);
  }
  .shop-drop__event--photo .shop-drop__fact > summary:hover,
  .shop-drop__event--photo .shop-drop__fact--link:hover,
  .shop-drop__event--photo .shop-drop__fact[open] > summary {
    background: color-mix(in srgb, var(--shop-hero-overlay-ink) 14%, transparent);
  }
}
/* _shop-style-hearth.scss
   Outline: the "Hearth and Tart" storefront style (stored slug `hearth`) — one
     block of shop-token re-declarations under [data-shop-style="hearth"],
     plus the one decorative rule the contract can't express as a value.
   Purpose: §8c-92 (D1 of docs/plans/storefront-drops-plan.md). Hearth & Tart
     is moving its drops off Hotplate, and its buyers already know that look:
     a white page, Inter at an in-between 550 weight, near-black ink, soft
     white cards on a faint teal-grey shadow, square photos, italic two-line
     blurbs, a red outlined "N left" pill, and pill-shaped buttons in a muted
     mocha. This file REPLACES the earlier "Hearth" style (S7, Georgia + crust
     tones modelled on hearthandtart.com); the slug stays `hearth` so stored
     settings rows need no migration — only the look behind the name changed.
   Logic: everything here re-declares a property from the shop token contract
     at the top of _shop.scss, which (via the token bridge there) also drives
     every button, badge, link, and muted line on the page. If a style ever
     needs a rule that ISN'T a token re-declaration, the contract is missing
     something — add the property there instead.

     Two things live in the style REGISTRY rather than here, because CSS
     can't say them (src/storefront-styles.js): the Inter webfont link, and
     `scheme: 'light'` — this palette has no dark variant, so the layout pins
     data-theme="light" rather than let a dark OS flip the app tokens under
     a page whose shop tokens are all light hex values.

     Colours vs. the Hotplate reference (observed 2026-10-26): the reference
     mocha (#a2806f) gives white button text only 3.6:1, under the AA 4.5:1
     body-text bar UI.MD holds us to, so the fill is one step deeper
     (#8a6756, 5.05:1) and the text-safe accent deeper again (#7a5a4b). The
     stock-pill red is #c5221f (5.4:1 on its tint). Everything else is the
     reference's value. */
[data-shop-style=hearth] {
  /* Surface + ink — a white page, warm-neutral wells, near-black ink. */
  --shop-bg: #ffffff;
  --shop-surface: #ffffff;
  --shop-surface-sunken: #f7f5f3;
  --shop-ink: #211f26;
  --shop-ink-muted: #6f6c74;
  --shop-border: #ebe8e6;
  --shop-border-strong: #d6d1cd;
  /* Mocha fills (buttons, the cart bar) and a peach wash (the Share button,
     icon bubbles, active states) — see the contrast note in the header. */
  --shop-accent: #8a6756;
  --shop-accent-hover: #7a5a4b;
  --shop-accent-strong: #7a5a4b;
  --shop-accent-soft: #fbebe4;
  --shop-on-accent: #ffffff;
  /* Type: Inter for everything (loaded by the registry's webfont link, with
     system-ui behind it so the page never waits on it), at 550 for card
     names and section titles — the reference's in-between weight, which a
     variable face can actually render. */
  --shop-font-display: "Inter", system-ui, -apple-system, sans-serif;
  --shop-font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shop-hero-tracking: -0.02em;
  --shop-heading-weight: 550;
  --shop-card-name-weight: 550;
  --shop-button-radius: 999px;
  /* Cards: borderless white on a wide, faint shadow; square photos with no
     divider; tighter padding; italic two-line blurbs; the price in the body
     face rather than the default's mono. */
  --shop-radius-card: 8px;
  --shop-card-bg: #ffffff;
  --shop-card-border: 1px solid transparent;
  --shop-card-border-hover: transparent;
  --shop-card-shadow: 0 8px 24px 2px rgba(35, 52, 52, 0.05);
  --shop-card-shadow-hover: 0 8px 24px 2px rgba(35, 52, 52, 0.12);
  --shop-card-photo-ratio: 1 / 1;
  --shop-card-photo-border: 0 solid transparent;
  --shop-card-pad: 0.75rem;
  --shop-menu-gap: 1rem;
  --shop-card-desc-style: italic;
  --shop-card-desc-lines: 2;
  --shop-price-font: var(--shop-font-body);
  /* Hotplate sets every figure (tiers, cart count, tip chips) in Inter, so
     no mono anywhere; tabular-nums on those rules still aligns the digits. */
  --shop-font-figures: var(--shop-font-body);
  --shop-price-weight: 400;
  /* "N left": a small red outlined pill. */
  --shop-stock-ink: #c5221f;
  --shop-stock-bg: #fff5f4;
  --shop-stock-border: 1px solid #f4c7c3;
  --shop-stock-radius: 4px;
  --shop-stock-pad: 1px 6px;
  /* Nav: plain white with a soft drop shadow instead of a rule. */
  --shop-nav-bg: #ffffff;
  --shop-nav-ink: #211f26;
  --shop-nav-link-ink: #6f6c74;
  --shop-nav-border: 0 solid transparent;
  --shop-nav-shadow: 0 2px 12px rgba(35, 52, 52, 0.06);
  /* Every tag pill wears the same green border + green ink (uniform set,
     2026-11-01 — each tag told apart by its emoji), on the warm-grey pill
     fill. The gluten-free CARD keeps the treatment H&T asked for under the
     old style (a real green border + the 🌾 mark), on a white card so the
     menu still reads as one family. */
  --shop-tag-border: #4caf50;
  --shop-tag-bg: #f7f5f3;
  --shop-tag-ink: #4caf50;
  --shop-gf-border: #4caf50;
  --shop-gf-bg: #ffffff;
  /* Rounded covers and menu panels (the drop reference's 12px), with a
     neutral scrim under words laid on a photo. */
  --shop-hero-radius: 12px;
  --shop-hero-scrim: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.15) 45%,
    rgba(0, 0, 0, 0));
  /* Home banner (§8c-94): hearthandtart.com's own header, the one place
     this style leaves the Hotplate look — Merriweather in spaced capitals
     (loaded by the registry's webfont link, Georgia behind it) on a photo
     under a cool, ink-blue wash, about 300px tall on a desktop. */
  --shop-hero-slide-height: clamp(13rem, 24vw, 19rem);
  --shop-banner-scrim: rgba(18, 20, 38, 0.55);
  --shop-banner-font: "Merriweather", Georgia, "Times New Roman", serif;
  --shop-banner-size: clamp(1.75rem, 5.5vw, 3.75rem);
  --shop-banner-weight: 700;
  --shop-banner-transform: uppercase;
  --shop-banner-tracking: 0.1em;
  --shop-banner-kicker-tracking: 0.08em;
}

/* The one non-token rule (see the header). The default style ends the bakery
   name with a butter dot — the app's own flourish. It belongs to a different
   design language than this one, so it goes. */
[data-shop-style=hearth] .shop-hero__name::after {
  display: none;
}

/* _storefront-admin.scss
   Outline: the few genuinely-new controls the Phase 4 owner surface adds on
     top of the existing portal vocabulary — the pickup-date-policy radio
     cards (.choice-list), the accepting-orders pause switch (.switch), and
     the two-step publish-flow indicator (.step-flow). Everything else on the
     admin storefront screens (tables, buttons, badges, fields, callouts,
     section cards) is the shared Butter & Ink system, unchanged.
   Purpose: keep new surface area minimal and tokenised; these three are
     reusable beyond Phase 4 (any policy radio, any on/off setting, any
     JS-free multi-step form). No raw values — dark stays a token swap. */
/* ---- choice-list — stacked radio cards (pickup-date policy §4c) ------ */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: 0;
  margin: 0;
  padding: 0;
}

.choice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.choice:hover {
  background: var(--color-surface-sunken);
}

.choice > input {
  margin: 2px 0 0;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--color-accent-strong);
}

.choice__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choice__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.choice__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Compact + grid variants (§8c-123). `.choice--compact` was on the allergen
   and tag checkboxes' markup since they shipped but had no rule, so nine
   allergens rendered as nine full-height, full-width cards — a screen of
   scrolling for nine ticks. Compact tightens the card; `.choice-list--grid`
   lays short choices out in columns that fill the row (three across in a
   settings card, fewer on a phone) while the legend and any hint keep the
   full width above them. Used by the ingredient form and the recipe
   editor's Allergens group. */
.choice--compact {
  padding: var(--space-2) var(--space-3);
  align-items: center;
}

.choice--compact > input {
  margin-top: 0;
}

.choice-list--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
}

.choice-list--grid > legend,
.choice-list--grid > .hint,
.choice-list--grid > .callout {
  grid-column: 1/-1;
}

/* An option that can't be picked right now (a customer who opted out of a
   channel, §8c-82). It stays visible with its reason, so it's dimmed rather
   than removed, and hovering doesn't suggest it can be clicked. */
.choice:has(> input:disabled) {
  cursor: not-allowed;
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

/* selected card lifts to the butter wash */
.choice:has(> input:checked) {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-soft);
}

.choice:has(> input:focus-visible) {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* nested reveal — offered-dates list shown under the Planned choice */
.choice-reveal {
  margin: 0 0 var(--space-2) var(--space-7);
  padding: var(--space-3) 0 0;
}

/* ---- switch — accepting-orders pause toggle (JS-free checkbox) ------- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.switch > input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px; /* stays in the tab order + focusable, just invisible */
}

.switch__track {
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-border-strong);
  transition: background 0.15s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
  transition: transform 0.15s ease;
}

.switch > input:checked + .switch__track {
  background: var(--color-accent);
}

.switch > input:checked + .switch__track::after {
  transform: translateX(18px);
}

.switch > input:focus-visible + .switch__track {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.switch__label {
  font-size: var(--text-sm);
}

/* Disabled switch — e.g. a payment button whose provider isn't connected yet
   (Payments settings): dim the track + label and show it's not interactive,
   while the checkbox stays a real (disabled) control. */
.switch:has(> input:disabled) {
  cursor: not-allowed;
}

.switch > input:disabled + .switch__track {
  opacity: 0.45;
}

.switch > input:disabled ~ .switch__label {
  opacity: 0.55;
}

/* ---- pay-preview — the live "what buyers see at checkout" button strip ----
   (Payments settings). A non-interactive preview: the spans are styled as
   buttons but do nothing. Stacked full-width in a checkout-width column so it
   mirrors the storefront's actual layout (block buttons, top to bottom) rather
   than a horizontal chip row. */
.pay-preview {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 22rem; /* a phone-ish checkout column, like the real cart */
}

.pay-preview__btn {
  width: 100%;
  cursor: default;
}

/* `.button`'s `display: inline-flex` above outranks the UA stylesheet's
   `[hidden]{display:none}` regardless of specificity (author beats UA), so a
   toggled-off preview button would render anyway without this — same fix as
   .callout[hidden] / .toast[hidden] / .user-menu__panel[hidden] elsewhere. */
.pay-preview__btn[hidden] {
  display: none;
}

/* ---- pay-creds — the PayPal BYO-credentials form (payment-methods Chunk 5).
   A plain stacked-field form inside the PayPal provider card; constrained so
   the inputs don't run the full card width. The .field rhythm comes from
   _forms.scss; this only bounds the column. */
.pay-creds {
  max-width: 26rem;
}

/* ---- pay-creds__how — the "where do I get these" walkthrough (Chunk 7).
   Sits above .pay-creds; same max-width so the numbered steps don't run
   wider than the form they explain. Styled like .empty-catalog's numbered
   list (_recipe-create.scss) — muted, small, own marker gutter. */
.pay-creds__how {
  max-width: 26rem;
  margin-bottom: var(--space-4);
}

.pay-creds__steps {
  margin: var(--space-2) 0 0;
  padding-left: 1.3em;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ---- step-flow — the two JS-free publish steps (§4b) ----------------- */
.step-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.step-flow__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.step-flow__num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
}

.step-flow__item--done .step-flow__num {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.step-flow__item--current {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.step-flow__item--current .step-flow__num {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.step-flow__sep {
  color: var(--color-border-strong);
}

/* The window editor's cover-photo preview (§8c-92 D2): the drop page shows
   the cover wide, so the preview is wide too — capped so a tall upload
   can't push the form off the screen. */
.window-cover-preview {
  display: block;
  width: 100%;
  max-width: 24rem;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* The cover library (§8c-99): "Or choose from your photos" under the
   upload form. A grid of thumbnails, each a whole-tile <label> around a
   radio, so a tap anywhere on the photo picks it. The radio itself is
   hidden but stays in the tab order (and keeps `required` working); the
   tile shows selection and keyboard focus instead. */
.cover-library {
  margin-top: var(--space-4);
}

.cover-library summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cover-library__group {
  border: 0;
  margin: var(--space-3) 0 0;
  padding: 0;
}

.cover-library__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.cover-library__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: var(--space-3);
  /* a big product list shouldn't push the button off the page */
  max-height: 26rem;
  overflow-y: auto;
}

.cover-library__choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-1);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.cover-library__choice img {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.cover-library__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-library__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cover-library__choice:has(.cover-library__radio:checked) {
  border-color: var(--color-accent);
}

.cover-library__choice:has(.cover-library__radio:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.cover-library .button {
  margin-top: var(--space-3);
}

/* ---- offered-dates mini list (Planned policy) + tier rows ------------ */
/* a compact date chip list reusing the sunken add-form footer for its CRUD */
.date-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.date-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.date-list li:last-child {
  border-bottom: none;
}

.date-list .num {
  color: var(--color-text);
}

/* Style-picker swatch chips (Storefront Site S7). Approximations of each
   style's palette, drawn from the registry — the stylesheet stays the source
   of truth for what a style really looks like, and these exist only so the
   picker isn't three identical radio buttons. */
.style-swatches {
  display: inline-flex;
  gap: 4px;
  margin-top: var(--space-2);
}

.style-swatch {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* ---- product options editor (S8.b, §8c-75) ---------------------------
   One row per live option: drag handle, an inline edit form (name, price,
   uses, Save), and the ↑ ↓ × cluster. Same row-controls anatomy as the
   ingredient page's sub-ingredient list (§8c-66), laid out wider because
   each row edits three fields, not one. The fields wrap under the name on
   a phone rather than squeezing the inputs. */
.variant-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0 var(--space-5);
}

.variant-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  /* positioned + opaque so the drag engine's lifted row covers its
     neighbours as they slide (the reason _forms.scss gives for
     .sub-ingredient-row) */
  position: relative;
  background: var(--color-surface);
}

.variant-row:last-child {
  border-bottom: 0;
}

/* the handle and the ↑ ↓ × sit level with the inputs, not the labels */
.variant-row > .sort-handle,
.variant-row > .row-controls__secondary {
  margin-bottom: 2px;
}

.variant-row__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}

.variant-row__form .field {
  margin: 0;
}

.variant-row__name {
  flex: 1 1 10rem;
  min-width: 0;
}

.variant-row__name .input {
  max-width: none;
}

.variant-row__num {
  flex: 0 0 5.5rem;
}

/* each of ↑ ↓ × is its own one-button form; keep them in a row */
.variant-row .row-controls__secondary {
  display: inline-flex;
  align-items: center;
}

.variant-row .row-controls__secondary .inline-form {
  margin: 0;
}

.variant-archived summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.variant-archived__list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}

.variant-archived__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

/* ---- location-list — the pickup-location library (§8c-98 P1.b) ------
   The options-list row (.variant-row above), widened for three text
   fields: name, address, and buyer-facing notes wrap onto a second line
   on a phone instead of shrinking to unreadable widths. */
.location-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0 var(--space-5);
}

.location-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  /* positioned + opaque so the drag engine's lifted row covers its
     neighbours as they slide (the .variant-row reasoning) */
  position: relative;
  background: var(--color-surface);
}

.location-row:last-child {
  border-bottom: 0;
}

.location-row > .sort-handle,
.location-row > .row-controls__secondary {
  margin-bottom: 2px;
}

.location-row__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}

.location-row__form .field {
  margin: 0;
}

.location-row__name {
  flex: 1 1 14rem;
  min-width: 0;
}

.location-row__address {
  flex: 2 1 18rem;
  min-width: 0;
}

.location-row__notes {
  flex: 2 1 18rem;
  min-width: 0;
}

.location-row__form .input {
  max-width: none;
}

.location-row .row-controls__secondary {
  display: inline-flex;
  align-items: center;
}

.location-row .row-controls__secondary .inline-form {
  margin: 0;
}

/* the read-only row a non-owner member sees */
.location-row__read {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* the add form + archived fold, on the sunken strip the options section
   uses, so "add" reads as a separate act from editing the rows above */
.location-add {
  background: var(--color-surface-sunken);
  border-top: 1px solid var(--color-border);
  padding: var(--space-5);
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ---- slot-days — a drop's pickup & delivery times (§8c-98 P3.a) ------
   Grouped by day: a small day heading, then one row per slot with its
   place, hours and a remove button. */
.slot-days {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4); /* clear of the section's intro line */
}

.slot-day__title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.slot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.slot-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.slot-row:last-child {
  border-bottom: 0;
}

.slot-row__place {
  flex: 1 1 auto;
  min-width: 0;
}

.slot-row__hours {
  flex: none;
  font-size: var(--text-sm);
}

.slot-row .inline-form {
  margin: 0;
}

/* the add form wraps to two lines on a phone rather than squeezing four
   inputs into 360px */
.slot-add {
  flex-wrap: wrap;
}

/* ---- window-menu — the drop editor's Menu & limits (§8c-102) ----------
   Two panes: "Your products" (search, category chips, + Add) beside "On
   this drop" (limit, sold, drag/↑ ↓ ×). Side by side from tablet width,
   the menu pane a little wider since its rows carry more controls; stacked
   on a phone, picker first (adding is what the section is for). A
   read-only viewer gets the menu pane alone, full width. */
.window-menu {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

@media (min-width: 48rem) {
  .window-menu--editing {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: start;
  }
}
.window-menu__pane {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  min-width: 0;
}

.window-menu__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-2);
}

.window-menu__search {
  margin-bottom: var(--space-2);
}

.window-menu__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.window-menu__chip {
  font: inherit;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
}

.window-menu__chip:hover {
  color: var(--color-text);
}

.window-menu__chip.is-active {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.window-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The picker scrolls inside itself, so a 60-product catalogue doesn't push
   the menu pane (or the page's Publish button) a screen away. */
.window-menu__list--available {
  max-height: 26rem;
  overflow-y: auto;
}

.window-menu__item,
.window-menu__line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  /* positioned + opaque so the drag engine's lifted line covers its
     neighbours as they slide (the .location-row reasoning) */
  position: relative;
  background: var(--color-surface);
}

.window-menu__item:last-child,
.window-menu__line:last-child {
  border-bottom: 0;
}

.window-menu__item[hidden] {
  display: none;
}

.window-menu__name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-2);
}

.window-menu__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* The drop's running sales line above the menu ("$312.00 in sales · 47
   items sold") — body size so the dollar figure reads as the headline the
   baker came for; the per-line figures stay in the muted meta above. */
.window-menu__sales {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
}

.window-menu__cap .input {
  width: 5.5rem;
}

.window-menu__line .row-controls__secondary {
  display: inline-flex;
  align-items: center;
}

.window-menu__line .row-controls__secondary .inline-form {
  margin: 0;
}

.window-menu__add-all {
  margin-top: var(--space-3);
}

/* "Add to" section choice above the picker's search (§8c-103). */
.window-menu__add-to {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.window-menu__add-to .input {
  flex: 1 1 auto;
  min-width: 0;
}

.window-menu__add-to .hint {
  white-space: nowrap;
}

/* ---- menu groups — sections inside "On this drop" (§8c-103) ----------
   The unsectioned lines, then each section: a head (handle, name field,
   ↑ ↓ ×) over its lines. Heads are positioned + opaque like the lines,
   because in the line drag (BFSortable group mode) they slide out of the
   way too. */
.menu-group__head {
  position: relative;
  background: var(--color-surface);
}

/* The unsectioned group's head is just an anchor until sections exist;
   then it's a small muted label. */
.menu-group--loose .menu-group__head:not(:empty) {
  padding: var(--space-1) 0;
}

.menu-group__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-group--section {
  margin-top: var(--space-3);
  background: var(--color-surface);
  position: relative;
}

.menu-group--section .menu-group__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 2px solid var(--color-border-strong);
}

.menu-group__rename {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: var(--space-2);
}

.menu-group__name-input {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: var(--weight-semibold);
}

.menu-group__name {
  font-weight: var(--weight-semibold);
}

.menu-group--section .menu-group__head .row-controls__secondary {
  display: inline-flex;
  align-items: center;
}

.menu-group--section .menu-group__head .row-controls__secondary .inline-form {
  margin: 0;
}

/* Lines inside a section sit a step in, so the heading reads as theirs. */
.menu-group--section .menu-group__lines {
  padding-left: var(--space-3);
}

/* An empty section still needs height to read as a place to drop into. */
.menu-group__empty {
  margin: 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.menu-add-section {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
}

.menu-add-section .input {
  flex: 1 1 auto;
  min-width: 0;
}

/* Controls window-menu.js hides (the limit's Set button, the JS-only
   search/chips/Add all before the script runs): .button / .input set their
   own display, which would otherwise beat the [hidden] attribute. */
[data-window-menu] [hidden] {
  display: none !important;
}

.window-menu__empty {
  margin: var(--space-2) 0;
}

/* A line that just arrived (window-menu.js) flashes once so the eye finds
   it; reduced-motion users get the tint without the fade. */
.window-menu__line.is-new {
  animation: window-menu-new 1.6s ease-out;
}

@keyframes window-menu-new {
  from {
    background: var(--color-accent-soft);
  }
  to {
    background: var(--color-surface);
  }
}
@media (prefers-reduced-motion: reduce) {
  .window-menu__line.is-new {
    animation: none;
    background: var(--color-accent-soft);
  }
}
/* While a change is in flight, dim the section a touch so a second click
   reads as "wait" (the queue would handle it anyway). */
[data-window-menu][aria-busy=true] .window-menu {
  opacity: 0.7;
  transition: opacity 0.15s;
}

/* ---- drop packing page (§8c-109) ----------------------------------------
   packing.hbs: a pickup-day checklist used on a tablet at the packing
   bench. Each order is a <details> card (packed = collapsed); each line is
   one big .pack-check button (box + count + name) that fills green when
   checked. Sized for floury fingers: the whole row is the target, never
   less than 44px tall. Tokens only, so dark mode is a palette swap. */
.packing-summary {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-4);
}

.packing-summary--done {
  color: var(--color-success);
}

.packing-group {
  margin-bottom: var(--space-5);
}

/* Keep "1 of 2 packed" whole when a long slot title wraps on a phone. */
.packing-group .section-block__title {
  flex-wrap: wrap;
}

.packing-group .section-block__count {
  white-space: nowrap;
}

.packing-orders {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.packing-order {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* A packed card recedes: quieter border, sunken fill. */
.packing-order.is-packed {
  border-color: var(--color-border);
  background: var(--color-surface-sunken);
}

.packing-order__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}

/* display: flex drops <summary>'s native disclosure marker, and a collapsed
   packed card must still read as openable, so draw one that turns when open. */
.packing-order__head::-webkit-details-marker {
  display: none;
}

.packing-order__head::after {
  content: "›";
  flex: none;
  color: var(--color-text-muted);
  font-size: var(--text-md);
  line-height: 1;
}

.packing-order[open] > .packing-order__head::after {
  transform: rotate(90deg);
}

.packing-order__name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  margin-right: auto;
}

.packing-order__done {
  color: var(--color-success);
  margin-right: var(--space-1);
}

.packing-order__body {
  padding: 0 var(--space-4) var(--space-4);
}

.packing-order__meta,
.packing-order__notes,
.packing-order__where {
  margin: 0 0 var(--space-3);
}

.packing-lines {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* The whole row is the checkbox: .inline-form shrink-wraps by default, which
   would leave the button only as wide as its text. */
.packing-line .inline-form {
  display: block;
  width: 100%;
}

.pack-check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pack-check:hover {
  background: var(--color-surface-sunken);
}

.pack-check:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.pack-check__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
}

.pack-check__count {
  flex: none;
  min-width: 3ch;
  font-weight: var(--weight-semibold);
}

.pack-check__name {
  flex: 1;
}

.pack-check[aria-pressed=true] {
  background: var(--color-success-soft);
  border-color: var(--color-success);
}

.pack-check[aria-pressed=true] .pack-check__box {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-surface);
}

.pack-check[aria-pressed=true] .pack-check__name {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

/* The drop's name inside the <h1>, for paper only (_print.scss shows it): on
   screen the back link above the heading already names the drop. */
.packing-print-drop {
  display: none;
}

/* In flight (drop-packing.js): dimmed until the server's answer swaps in. */
[data-packing][aria-busy=true] .pack-check,
[data-packing][aria-busy=true] .packing-order__all .button {
  opacity: 0.7;
}

/* ---- Drop Pickup & delivery page (§8c-115 amendment 1) --------------------
   One row per order under the packing page's group headings (.packing-group
   / .packing-summary are reused as-is). Each row: the Ready box (the packing
   .pack-check button, sized to its word), who it's for, what's in the bag,
   and a status column (packed badge + the Text note, whose colors are the
   run page's .run-orders__text tones in _pages.scss). Desktop: four columns;
   phones: the box and name on top, items and status below. Tokens only. */
.ready-orders {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ready-order {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.ready-order:last-child {
  border-bottom: none;
}

.ready-order.is-ready {
  background: var(--color-surface-sunken);
}

.ready-order__check {
  width: 100%;
}

.ready-order__name {
  font-weight: var(--weight-semibold);
}

.ready-order__meta {
  font-size: var(--text-sm);
}

.ready-order__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ready-order__status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

@media (max-width: 640px) {
  .ready-order {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    padding: var(--space-3) var(--space-4);
  }
  .ready-order__items,
  .ready-order__status {
    grid-column: 1/-1;
  }
  .ready-order__status {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}
/* A bundle's ingredients, read-only on its edit page (§8c-128): each item's
   own statement on its own line. */
.bundle-ingredients {
  list-style: none;
  margin: 0 0 var(--space-2);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
}

/* _organizer.scss
   Outline: the menu-organizer outline editor (pages/storefront/
     organize.hbs) — one WYSIWYG tree of category / section / product rows
     (.org-row), indent guides, drag handles, per-row ⋯ popover menu
     (native <details>), inline ghost add-rows, the featured strip, and the
     "Not on your menu" tray rail.
   Purpose: replaces the old per-category card stack (Chunk 4.6.1.b). One
     outline IS the public page; everything else here is the shared Butter
     & Ink system (.section-block, .badge, .choice, .dialog, buttons).
   Logic / invariants:
     - Lands here byte-for-byte from the Claude Design deliverable
       (design/BakeFlow/src/styles/_organizer.scss) — the handoff spec is
       "Menu Organizer - Rationale.md"; this file is the shared contract
       every 4.6.x chunk styles against, not just 4.6.1.b's own markup.
     - Drag-state classes (.is-dragging, .org-drop-line, .org-drop-into)
       and the featured strip/tray/star rules are defined here ahead of the
       chunks that make them interactive (4.6.1.c, 4.6.2.*) — nothing ad
       hoc gets added when those land; unused selectors simply don't match
       anything in the DOM yet. */
/* ---- two-column shell: outline + sticky tray rail ------------------- */
.org-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: var(--space-6);
  align-items: start;
}

.org-rail {
  position: sticky;
  top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (max-width: 920px) {
  .org-layout {
    grid-template-columns: 1fr;
  }
  .org-rail {
    position: static;
  }
}
/* ---- outline tree ---------------------------------------------------- */
.org-outline,
.org-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* nested lists draw the indent guide; nesting compounds naturally */
.org-children {
  margin-left: 1.7rem;
  border-left: 2px solid var(--color-border);
}

.org-cat {
  border-top: 1px solid var(--color-border);
}

.org-cat:first-child {
  border-top: 0;
}

/* ---- rows ------------------------------------------------------------ */
.org-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
}

.org-row:hover {
  background: var(--color-surface-sunken);
}

.org-row--category {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.org-row--category .org-name {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.org-row--section .org-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.org-row--product .org-name {
  font-size: var(--text-sm);
}

.org-name {
  min-width: 0;
}

.org-count {
  flex: none;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.org-price {
  flex: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.org-spacer {
  flex: 1;
}

/* drag handle — grab affordance, muted at rest, never disappears */
.org-handle {
  flex: none;
  width: 22px;
  text-align: center;
  border: 0;
  background: none;
  padding: var(--space-1) 0;
  cursor: grab;
  color: var(--color-border-strong);
  font-size: var(--text-sm);
  letter-spacing: -1px;
  user-select: none;
  touch-action: none;
}

.org-row:hover .org-handle,
.org-tray-row:hover .org-handle {
  color: var(--color-text-muted);
}

.org-handle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
  border-radius: var(--radius-sm);
}

/* collapse chevron on category rows */
.org-disclose {
  flex: none;
  width: 22px;
  height: 22px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
}

.org-cat.is-collapsed > .org-row .org-disclose {
  transform: rotate(-90deg);
}

.org-cat.is-collapsed > .org-children,
.org-cat.is-collapsed > .org-add {
  display: none;
}

.org-disclose:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
  border-radius: var(--radius-sm);
}

/* featured star — flag, not a placement; butter when on */
.org-star {
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.org-star:hover {
  color: var(--color-warn);
  background: var(--color-accent-soft);
}

.org-star[aria-pressed=true] {
  color: var(--color-accent-hover);
}

.org-star:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
}

/* text variant of click-to-edit — names, not numbers: UI face, text keypad */
.cell-edit--text {
  font-family: var(--font-ui);
  letter-spacing: 0;
  font-variant-numeric: normal;
}

/* ---- ghost add-rows --------------------------------------------------- */
.org-add {
  padding: 0 var(--space-2) var(--space-1);
}

.org-add__button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.org-add__button:hover {
  color: var(--color-accent-strong);
  background: var(--color-surface-sunken);
}

.org-add__button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
}

/* Progressive-enhancement collapse (Chunk 4.6.2.d): organizer.js toggles the
   ghost button and its inline form via the `hidden` attribute. Both the button
   (display:block above) and the form (.builder-add-form is display:flex)
   outrank the UA stylesheet's `[hidden]{display:none}`, so restate it — the
   house pattern (see _forms.scss/_nav.scss). Scoped to a marked form so the
   add-product typeahead's form, which never gets `hidden`, is untouched. */
.org-add__button[hidden] {
  display: none;
}

.org-add > form[data-org=add-form][hidden] {
  display: none;
}

/* new-category ghost is bigger — it ends the whole outline */
.org-add--category {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border);
}

.org-add--category .org-add__button {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-2);
}

/* ---- featured strip (auto shelf, not draggable) ----------------------- */
.org-featured {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent-soft);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.org-featured strong {
  color: var(--color-accent-strong);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

/* ---- per-row ⋯ menu — native <details> popover ------------------------ */
.row-menu {
  position: relative;
  flex: none;
}

.row-menu > summary {
  list-style: none;
}

.row-menu > summary::-webkit-details-marker {
  display: none;
}

.row-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  padding: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
}

.row-menu__item {
  text-align: left;
  border: 0;
  background: none;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.row-menu__item:hover {
  background: var(--color-surface-sunken);
}

.row-menu__item--danger {
  color: var(--color-danger);
}

.row-menu__sep {
  height: 1px;
  margin: var(--space-1) 0;
  background: var(--color-border);
}

/* a form embedded in the popover (e.g. Chunk 4.6.1.b's interim rename
   field, ahead of 4.6.1.e's inline click-to-edit) fills the row width
   instead of stacking like a .row-menu__item button. */
.row-menu__list form {
  width: 100%;
}

.row-menu__list button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- tray ("Not on your menu") ----------------------------------------
   Scales to many products: filter on top, newest-published first, list
   capped + scrollable so the sticky rail never outgrows the viewport. */
.org-tray-note {
  padding: var(--space-3) var(--space-4) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.org-tray-search {
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.org-tray-search .input {
  width: 100%;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
}

.org-tray-list {
  max-height: 19rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--color-border);
}

.org-tray-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
  font-size: var(--text-sm);
}

.org-tray-row + .org-tray-row {
  border-top: 1px solid var(--color-border);
}

.org-tray-row .org-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-tray-empty {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- legend card ------------------------------------------------------- */
.org-legend {
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-4) var(--space-7);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.org-legend li + li {
  margin-top: var(--space-1);
}

/* ---- drag states (contract for the DnD implementation) ----------------- */
.is-dragging {
  opacity: 0.45;
}

/* Set on <body> for the duration of an active drag (organizer.js) — a
   fast pointer move would otherwise select row text along the way. */
body.is-organizer-dragging,
body.is-organizer-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.org-drop-line {
  height: 2px;
  margin: -1px var(--space-3);
  background: var(--color-accent-strong);
  border-radius: 1px;
  /* Never the elementFromPoint hit under a moving pointer — organizer.js
     computes drop zones from real rows only, not this indicator. */
  pointer-events: none;
}

.org-drop-into {
  box-shadow: inset 0 0 0 2px var(--color-accent-strong);
  border-radius: var(--radius-sm);
}

/* _short-links.scss
   Outline: the super-admin URL-shortener console (§8c-85) —
     pages/admin/links.hbs (create form + link table) and
     pages/admin/link.hbs (one link's analytics + edit form):
     .short-link-form padding, the read-only .short-link-copy URL box,
     the long-URL wrap rule, the per-day .short-link-bar, the two-column
     countries/referrers block, and the deactivate row.
   Purpose: everything else on these pages reuses the shared table, field,
     badge, and recipe-meta styles; this file only adds what a link console
     needs that nothing else did.
   Logic/invariants: tokens only, so the dark-theme swap is free. The bar's
     length arrives as a --bar custom property the template sets from the
     presenter's precomputed percentage — no logic in the template, no
     script, and a zero-click day simply draws nothing. */
.short-link-form {
  padding: var(--space-5);
}

/* A copyable short URL. Monospace so look-alike characters read clearly
   (generated codes avoid them, custom codes may not). */
.short-link-copy {
  margin-top: var(--space-1);
  min-width: 16rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.short-link-copy--big {
  font-size: var(--text-md);
}

.short-link-summary {
  padding: var(--space-5);
}

/* Destinations are long, unbroken URLs; let them wrap instead of
   stretching the page. */
.short-link-url {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* Clicks-per-day bar, scaled to the busiest day in the window. */
.short-link-daily td:last-child {
  width: 50%;
}

.short-link-bar {
  display: block;
  height: 0.6rem;
  width: var(--bar, 0%);
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.short-link-breakdowns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-6);
}

.short-link-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* _communications.scss
   Outline: the Communications pages (§8c-82, §8c-91) —
     pages/communications/index.hbs + blast.hbs + message.hbs: the panel
       column and form spacing (.comms-panel, .comms-form);
     pages/communications/blast.hbs + message.hbs: the live SMS readout's
       size and over-the-limit warning (.sms-readout, .is-over);
     pages/communications/log.hbs: the selected blast's summary panel
       (.blast-summary), the preserved-whitespace message text
       (.message-body), the bounded message column (.message-cell, still
       used by the admin log), and — §8c-108 — the search bar + chips, People
       results + person card, stat tiles, the activity chart, and the
       day-grouped feed (.log-*, .stat-tile*, .activity-chart*,
       .delivery-bar*). Chart colour --color-chart-neutral lives in tokens.
   Purpose: everything else on these pages reuses the shared form, table,
     badge, and callout styles; this file only adds what a message log and
     an SMS cost warning need that nothing else did.
   Logic/invariants: tokens only, so the dark-theme swap is free. The
     warning is a colour + weight change on the same hint line, never a new
     element — public/js/sms-counter.js only toggles the class. */
/* The hub and compose pages: one column inside the section card, so a callout,
   an intro line, tiles and a form are spaced by one rule. */
.comms-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}

/* The tiles' own margin is for the log's flow; here the column's gap spaces
   them. A <dd> also brings the browser's default indent. */
.comms-panel > .stat-tiles {
  margin: 0;
}

.comms-panel dd.stat-tile__value {
  margin: 0;
}

/* Compose forms use the full card width: a message is the point of the page,
   and full-width fields line up with the channel cards above them. */
.comms-form .input,
.comms-form .select,
.comms-form .textarea {
  max-width: none;
}

/* .choice-list zeroes its margin and a <legend> ignores the fieldset's flex
   gap, so restore the .field rhythm around the channel cards. */
.comms-form .choice-list {
  margin-bottom: var(--space-5);
}

.comms-form .choice-list > legend {
  padding: 0;
  margin-bottom: var(--space-2);
}

.comms-form .callout {
  margin-bottom: var(--space-5);
}

.comms-panel > .callout {
  margin: 0;
}

/* Amber link on an amber callout is nearly invisible; colour alone can't mark it. */
.comms-panel .callout a {
  text-decoration: underline;
}

/* .field > label is bold for ordinary labels, and a .choice is a label. Only
   the card's title should be: its description has to read as secondary. */
.comms-form .choice {
  font-weight: var(--weight-normal);
}

/* A cost readout is worth reading: one size up from .field .hint. This file
   loads after _forms, so it wins the equal-specificity tie, and so does the
   warning colour below. */
.field .sms-readout {
  font-size: var(--text-sm);
}

/* Body + "Reply STOP" footer no longer fit one segment: every recipient
   costs 2x+. Warn colour, like the calendar's over-capacity counts. */
.sms-readout.is-over {
  color: var(--color-warn);
  font-weight: var(--weight-semibold);
}

/* The one-blast panel above the filtered log. */
.blast-summary {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.blast-summary__meta,
.blast-summary__subject {
  margin: 0 0 var(--space-2);
}

.blast-summary__subject {
  font-weight: var(--weight-semibold);
}

/* Message text exactly as composed/sent: keep the baker's line breaks, and
   wrap a long unbroken URL instead of widening the table. */
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: var(--space-2) 0;
}

/* Keep the message column readable rather than letting a long excerpt push
   the status columns off-screen. */
.message-cell {
  max-width: 28rem;
  overflow-wrap: anywhere;
}

.message-cell summary {
  cursor: pointer;
}

/* ===========================================================================
   §8c-108 — the redesigned delivery log
   Search bar + filter chips, People results and the person card, the 30-day
   overview (stat tiles + activity chart), and the day-grouped feed.
   Logic/invariants:
     - Outcome tones (ok / bad / skip / wait / none) are ONE vocabulary across
       the row edge, the blast delivery bar and the chart, so red always means
       "did not reach them" (messages.notDeliveredSql) wherever it appears.
     - Colour never carries meaning alone: every coloured mark sits beside its
       words (status labels, counts, legend, tooltip, table view).
     - Chart marks follow the dataviz spec: thin bars anchored to the
       baseline, 4px rounded data-end, a 2px surface gap between stacked
       segments, recessive axes, hatch texture under forced-colors only.
   =========================================================================== */
/* ---- search + filters --------------------------------------------------- */
.log-search {
  margin: var(--space-4) 0 var(--space-3);
}

.log-search__bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.log-search__input {
  flex: 1 1 16rem;
  min-width: 0;
}

.log-search__channel {
  flex: 0 0 auto;
  width: auto;
}

.log-search__more {
  margin-top: var(--space-2);
}

.log-search__more summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.log-search__more .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-2);
}

.log-search__more select {
  width: auto;
  max-width: 100%;
}

/* Removable chips: each is the link that drops that one narrowing. */
.log-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: 0 0 var(--space-4);
}

.log-chip {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-surface-sunken);
  color: var(--color-text);
  font-size: var(--text-sm);
  text-decoration: none;
}

.log-chip:hover,
.log-chip:focus-visible {
  border-color: var(--color-text-muted);
}

.log-chips__clear {
  font-size: var(--text-sm);
}

/* ---- people results + person card ---------------------------------------- */
.log-people {
  margin-bottom: var(--space-5);
}

.person-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.person-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
}

.person-result:hover,
.person-result:focus-visible {
  border-color: var(--color-accent-strong);
}

.person-result__name {
  font-weight: var(--weight-semibold);
}

.person-result__contact,
.person-result__count {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.person-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-sunken);
}

.person-card__name {
  margin: 0 0 var(--space-1);
  font-size: var(--text-lg);
}

.person-card__contact {
  margin: 0 0 var(--space-2);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.person-card .badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}

.person-card .muted {
  margin: 0;
}

/* ---- overview: stat tiles ------------------------------------------------ */
.log-overview {
  margin-bottom: var(--space-6);
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

/* The tone is a small marker before the label — the number itself stays in
   text ink, per the "text wears text tokens" rule. */
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.stat-tile__label {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.stat-tile__label::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  background: var(--tone, var(--color-chart-neutral));
}

.stat-tile__value {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.stat-tile__hint {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

a.stat-tile__hint {
  color: var(--color-accent-strong);
}

/* ---- tones (shared by tiles, row edges, delivery bars) -------------------- */
.stat-tile--ok, .log-entry--ok, .delivery-bar__seg--ok {
  --tone: var(--color-success);
}

.stat-tile--bad, .log-entry--bad, .delivery-bar__seg--bad {
  --tone: var(--color-danger);
}

.stat-tile--skip, .log-entry--skip, .delivery-bar__seg--skip {
  --tone: var(--color-warn);
}

.log-entry--wait {
  --tone: var(--color-accent);
}

.stat-tile--none, .log-entry--none, .delivery-bar__seg--none {
  --tone: var(--color-chart-neutral);
}

/* ---- overview: activity chart ---------------------------------------------- */
.activity-chart {
  margin: 0;
}

.activity-chart__plot {
  position: relative;
  height: 9rem;
  padding: 0 0 1.5rem 2rem; /* room for the y labels and the day ticks */
}

/* Recessive axis: two labels and a hairline baseline, no gridlines. */
.activity-chart__max,
.activity-chart__zero {
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.activity-chart__max {
  top: 0;
}

.activity-chart__zero {
  bottom: 1.5rem;
}

.activity-chart__bars {
  display: flex;
  gap: 2px;
  align-items: stretch;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-border-strong);
}

.activity-chart__day {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

/* The hit target is the whole column, far bigger than a thin bar. */
.activity-chart__hit {
  display: flex;
  justify-content: center;
  height: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.activity-chart__hit:hover,
.activity-chart__hit:focus-visible,
.activity-chart__day.is-selected .activity-chart__hit {
  background: var(--color-surface-sunken);
}

.activity-chart__day.is-selected .activity-chart__hit {
  box-shadow: inset 0 -2px 0 var(--color-accent-strong);
}

.activity-chart__stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px; /* the surface gap between stacked segments */
  width: min(100%, 0.875rem);
  height: 100%;
}

.activity-chart__seg {
  flex: 0 0 auto;
  width: 100%;
}

/* 4px rounded data-end on whichever segment is on top. */
.activity-chart__stack > :first-child {
  border-radius: 4px 4px 0 0;
}

.activity-chart__seg--ok {
  background: var(--color-chart-neutral);
}

.activity-chart__seg--bad {
  background: var(--color-danger);
}

.activity-chart__tick {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}

/* Hover/focus tooltip — CSS only, so it works without JS. Pinned to the
   chart's inner edge for the outermost bars so it never clips. */
.activity-chart__tip {
  display: none;
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  width: max-content;
  max-width: 16rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-2);
  color: var(--color-text);
  font-size: var(--text-sm);
  pointer-events: none;
}

.activity-chart__tip strong {
  display: block;
}

.activity-chart__day:nth-child(-n+5) .activity-chart__tip {
  left: 0;
  transform: none;
}

.activity-chart__day:nth-last-child(-n+5) .activity-chart__tip {
  right: 0;
  left: auto;
  transform: none;
}

.activity-chart__hit:hover .activity-chart__tip,
.activity-chart__hit:focus-visible .activity-chart__tip {
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.chart-legend__item {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
}

.chart-legend__swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
}

.chart-legend__swatch--ok {
  background: var(--color-chart-neutral);
}

.chart-legend__swatch--bad {
  background: var(--color-danger);
}

.activity-chart__table {
  margin-top: var(--space-3);
}

.activity-chart__table summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Forced colours (Windows high contrast) flattens fills to one system
   colour: the failure segment then needs texture to stay distinguishable. */
@media (forced-colors: active) {
  .activity-chart__seg--ok,
  .chart-legend__swatch--ok {
    background: CanvasText;
  }
  .activity-chart__seg--bad,
  .chart-legend__swatch--bad,
  .delivery-bar__seg--bad {
    background: repeating-linear-gradient(45deg, CanvasText 0 2px, Canvas 2px 5px);
    forced-color-adjust: none;
  }
}
/* ---- the feed ------------------------------------------------------------- */
.log-feed,
.log-day__entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-day + .log-day {
  margin-top: var(--space-5);
}

.log-day__label {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 0 var(--space-2);
  padding: var(--space-1) 0;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* One entry: time | what + who | the two status labels. The left edge is
   the outcome tone, so a scan down the day finds the failures. */
.log-entry {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--tone, var(--color-border));
  border-radius: var(--radius-md);
}

.log-entry + .log-entry {
  margin-top: var(--space-2);
}

.log-entry--blast {
  background: var(--color-surface-sunken);
  grid-template-columns: 4.75rem minmax(0, 1fr);
}

.log-entry__time {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.log-entry__main > * {
  margin: 0;
}

.log-entry__main > * + * {
  margin-top: var(--space-1);
}

.log-entry__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  align-items: baseline;
}

.log-entry__who {
  font-weight: var(--weight-semibold);
}

.log-entry__addr {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.log-entry__who + .log-entry__addr {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.log-entry__meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.log-entry__subject {
  font-weight: var(--weight-semibold);
}

.log-entry__text {
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.log-entry__text summary {
  cursor: pointer;
}

.log-entry__error {
  color: var(--color-danger);
  font-size: var(--text-sm);
}

.log-entry__status {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  align-items: flex-end;
}

.status-pair {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  white-space: nowrap;
}

.status-pair__key {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

/* On a phone the status labels drop under the message instead of squeezing
   it into a sliver. */
@media (max-width: 40rem) {
  .log-entry {
    grid-template-columns: minmax(0, 1fr);
  }
  .log-entry__status {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
  }
}
/* A blast's delivery mix, proportional, beside its counts in words. */
.delivery-bar {
  display: flex;
  gap: 2px;
  height: 0.5rem;
  max-width: 24rem;
  overflow: hidden;
  border-radius: var(--radius-full);
}

.delivery-bar__seg {
  height: 100%;
  background: var(--tone);
}

/* ---------------------------------------------------------------------------
   src/styles/_customer-dashboard.scss

   Outline:
     - filter row    : preset buttons and custom dates, in one row above the page
     - tiles         : .stat-tile without its outcome marker
     - charts        : a grid of small .activity-chart multiples

   Purpose:
     Layout for pages/customers/dashboard.hbs (§8c-111). The tiles' and bars' own
     appearance is reused from _communications.scss (§8c-108), so the dashboard and
     the delivery log read as one chart system.

   Logic / invariants:
     - The bars use --color-chart-neutral for every chart: the title names each
       chart's one series, so hue would encode nothing.
     - The charts are small multiples rather than one chart with several y-scales:
       dollars and counts must never share an axis.
   --------------------------------------------------------------------------- */
.customer-dash__filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.customer-dash__presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.customer-dash__custom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  font-size: var(--text-sm);
}

.customer-dash__custom label {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
}

.customer-dash__custom .input {
  width: auto;
}

.customer-dash__range {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
}

/* Whole rows at every width: auto-fit would strand the sixth tile on a row of its
   own. Six tiles go 3 / 2 across, which also leaves their comparison lines room in
   the page's 60rem column; five go 5 / 3 / 2, where a short last row on a small
   screen is unavoidable and harmless. */
.customer-dash__tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 40rem) {
  .customer-dash__tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 60rem) {
  .customer-dash__tiles--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
/* The drop table is the widest thing on the page. Short cells stay on one line, so
   "38 of 120" can't stack into three rows and push columns off the edge. */
.customer-dash__drops td.num,
.customer-dash__drops th,
.customer-dash__drops .customer-dash__dates {
  white-space: nowrap;
}

/* The marker before a tile's label means a delivery outcome on the log. It would
   read as a meaningless legend swatch here, so it goes. */
.customer-dash__tiles .stat-tile__label::before {
  display: none;
}

/* dt/dd default margins would push the numbers out of line with their labels. */
.customer-dash__tiles dd {
  margin: 0;
}

.customer-dash__charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-5);
}

.customer-dash__chart-title {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.customer-dash__chart-empty {
  margin: 0;
  font-size: var(--text-sm);
}

/* Room for a dollar label like "$1,250" beside the axis, wider than the log's
   small counts. */
.customer-dash__chart .activity-chart__plot {
  padding-left: 3rem;
}

.customer-dash__chart-hint {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
}

.customer-dash__footnote {
  margin-top: var(--space-5);
}

/* The drop editor's one line of view counts, under its heading. */
.window-views {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
}

/* _print.scss
   Outline: print sheets (mix lists, ingredient totals, Production Calendar
     week, drop packing sheet) — ink-cheap, black-on-white regardless of
     theme, page break per mix.
   Purpose: must not regress; paper stays plain, never themed. */
@media print {
  :root,
  [data-theme=dark] {
    /* force paper palette regardless of theme */
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-sunken: #ffffff;
    --color-text: #000000;
    --color-text-muted: #444444;
    --color-border: #999999;
    --color-accent-soft: #ffffff;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .app-nav,
  .admin-banner,
  .page-actions,
  .toast,
  .no-print {
    display: none !important;
  }
  .page {
    max-width: none;
    padding: 0;
  }
  .section-block,
  .recipe-meta,
  .quote {
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  .table th,
  .table td {
    border-bottom: 1px solid #999999;
    padding: 4pt 6pt;
  }
  /* on screen the edge cells absorb the card's inner padding; on
     paper there is no card, so flush the edges */
  .table th:first-child,
  .table td:first-child {
    padding-left: 0;
  }
  .table th:last-child,
  .table td:last-child {
    padding-right: 0;
  }
  .section-block__header,
  .section-block__body,
  .mix-sheet__section {
    padding-left: 0;
    padding-right: 0;
  }
  .table tbody tr:hover > td {
    background: none;
  }
  /* never split an ingredient / invoice line across two pages */
  .mix-table tr,
  .totals-table tr,
  .invoice-table tr {
    break-inside: avoid;
  }
  /* one sheet per mix */
  .mix-sheet {
    break-after: page;
  }
  .mix-sheet:last-child {
    break-after: auto;
  }
  .mix-sheet h2 {
    font-size: 14pt;
    margin-bottom: 6pt;
  }
  /* click-to-edit prints as plain numbers */
  .cell-edit {
    border: none;
    background: none;
    padding: 0;
  }
  /* Production Calendar week sheet (Feature 3.1): the week columns ARE the
     printable kitchen sheet, so drop the rail, the header controls (view
     segment / Today / ‹ › / Print), and let the grid use the full page.
     Only the week view carries the Print control, so this is the week case
     by construction. */
  .cal-head__controls,
  .cal-rail {
    display: none !important;
  }
  .cal-layout {
    display: block;
  }
  .cal-week__col {
    border: 1px solid #999999;
  }
  /* ---- drop packing sheet (§8c-109 amendment 1) ---------------------------
     packing.hbs on screen is a tablet checklist: 48px tap rows, one card per
     order down a single column, packed cards collapsed. Printed as-is that
     is a few orders per page with half of them hidden. On paper it becomes
     a pen checklist for US Letter:
       - its own named page (`page: packing`), so the tighter margins don't
         leak into the other sheets in this file;
       - the drop's name joins the <h1>, the screen intro and back link drop;
       - order cards flow in two columns and never split across a page or a
         column, so a whole bag's list is always in one place;
       - EVERY card prints open — a packed order's items are still what's in
         its bag. ::details-content does it in CSS where supported;
         public/js/drop-packing.js opens them on beforeprint for the rest;
       - each line's big button becomes a small box to tick by hand (already
         packed lines keep their ✓ and strike-through), and the
         "Mark all packed" / "Unpack" buttons and the disclosure arrow go.
     Type is set in pt so it reads the same whatever the screen scale. */
  @page packing {
    size: letter portrait;
    margin: 0.45in;
  }
  .packing-page {
    page: packing;
    font-size: 10pt;
    line-height: 1.3;
  }
  .packing-page .page-header {
    margin-bottom: 4pt;
  }
  .packing-page .page-header__top {
    margin: 0;
  }
  .packing-page h1 {
    font-size: 16pt;
    margin: 0;
  }
  .packing-print-drop {
    display: inline;
  }
  .packing-page a {
    color: inherit;
    text-decoration: none;
  }
  .packing-summary {
    font-size: 10pt;
    margin: 0 0 8pt;
    color: #000000;
  }
  .packing-page .callout {
    margin: 0 0 8pt;
    padding: 4pt 6pt;
    border: 0.75pt solid #999999;
    background: none;
    color: #000000;
    font-size: 9pt;
  }
  /* "Review orders" is a screen link; on paper it's noise. */
  .packing-page .callout a {
    display: none;
  }
  .packing-group {
    margin-bottom: 10pt;
  }
  /* The group's heading (place · day · hours) stays with its first cards. */
  .packing-group .section-block__header {
    padding: 0 0 2pt;
    border-bottom: 1pt solid #000000;
    break-after: avoid;
  }
  .packing-group h2 {
    font-size: 12pt;
  }
  .packing-group .section-block__count {
    font-size: 9pt;
    color: #444444;
  }
  /* Two columns of cards. Column flow (not grid) so short and long orders
     pack tight without leaving row-height gaps. */
  .packing-orders {
    display: block;
    column-count: 2;
    column-gap: 0.25in;
    padding: 6pt 0 0;
  }
  .packing-order,
  .packing-order.is-packed {
    break-inside: avoid;
    margin: 0 0 6pt;
    padding: 4pt 6pt;
    border: 0.75pt solid #999999;
    border-radius: 0;
    background: none;
  }
  .packing-order::details-content {
    content-visibility: visible;
    display: block;
  }
  .packing-order__head {
    min-height: 0;
    padding: 0 0 2pt;
    gap: 2pt 6pt;
  }
  .packing-order__head::after {
    content: none;
  }
  .packing-order__name {
    font-size: 11pt;
  }
  .packing-order__done {
    color: #000000;
  }
  .packing-order .badge {
    padding: 1pt 4pt;
    border: 0.75pt solid #000000;
    border-radius: 0;
    background: none;
    color: #000000;
    font-size: 7.5pt;
  }
  .packing-order__progress {
    font-size: 8.5pt;
  }
  .packing-order__body {
    padding: 0;
  }
  .packing-order__meta,
  .packing-order__notes,
  .packing-order__where {
    margin: 0 0 3pt;
    font-size: 9pt;
  }
  .packing-lines {
    gap: 0;
    margin: 2pt 0 0;
  }
  .pack-check,
  .pack-check[aria-pressed=true] {
    min-height: 0;
    gap: 5pt;
    padding: 1.5pt 0;
    border: none;
    border-radius: 0;
    background: none;
    font-size: 10pt;
  }
  .pack-check__box,
  .pack-check[aria-pressed=true] .pack-check__box {
    width: 10pt;
    height: 10pt;
    border: 0.75pt solid #000000;
    border-radius: 0;
    background: none;
    color: #000000;
    font-size: 8pt;
    line-height: 1;
  }
  .pack-check__count {
    min-width: 2.5em;
  }
  .pack-check[aria-pressed=true] .pack-check__name {
    color: #444444;
  }
  .packing-order__all {
    display: none;
  }
}
