:root {
  --red: #E30613;
  --red-deep: #A8000A;
  --silver: #A7A9AC;
  --steel: #4A4D52;
  --ink: #111111;
  /* The faint red glow from the top-right corner of the dark surfaces at the top of a page: the header, the phone
     menu and, on the home page, the hero, which continues the header's glow (--site-header-h, set by home-hero.js). */
  --ink-glow-colour: rgba(227, 6, 19, .16);
  --ink-glow: radial-gradient(120% 520px at 100% 0%, var(--ink-glow-colour), transparent 60%);
  /* A fine grey grain laid over the glow so its few colour steps dither instead of showing as bands. About 4%:
     invisible as texture, and it lifts the black by under 2%. */
  --ink-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.04'/%3E%3C/svg%3E");
  --charcoal: #1C1D20;
  --surface: #F7F7F5;
  --panel: #FFFFFF;
  --line: #D9DADB;
  --muted: #6B6E72; /* at least 4.5:1 on white and on --surface at small sizes, staff and public alike */
  --ok: #23733C;
  --warn: #B85C00;
  /* Background for representative artwork retained in staff image-review tools. */
  --fallback-image-bg: #E5E6E3;
  --font: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Semi Condensed", var(--font);
  /* Line icons used as CSS masks, so they take the text colour. */
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-2.5 1.5a11 11 0 0 0 6 6L16 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2'/%3E%3C/svg%3E");
  --icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14'/%3E%3Cpath d='m3 6 9 7 9-7'/%3E%3C/svg%3E");
  --icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22c-4-5-7-8.5-7-12a7 7 0 0 1 14 0c0 3.5-3 7-7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

/* Deliveries: operational cards stay scannable on a driver's phone and use
   columns rather than a dense table when more width is available. */
.deliveries-workspace {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

/* The same shape as every staff page header: eyebrow and title left, the one action right, the description
   under them. */
.deliveries-head {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  margin-bottom: 18px;
}

.deliveries-head > p {
  grid-column: 1 / -1;
}

.deliveries-head > a {
  justify-self: end;
}

.deliveries-head h1,
.deliveries-head p,
.deliveries-card h3,
.deliveries-card p {
  margin: 0;
}

.deliveries-head > p {
  max-width: 520px;
  color: var(--muted);
}

.deliveries-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 12px;
}

.deliveries-tabs a {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.deliveries-tabs a[aria-current="page"] {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.deliveries-view-title {
  margin: 8px 0 14px;
}

.deliveries-grid {
  display: grid;
  gap: 14px;
}

.deliveries-group + .deliveries-group {
  margin-top: 24px;
}

.deliveries-group > h3 {
  margin: 0 0 10px;
}

.deliveries-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  background: #fff;
}

.deliveries-card__top,
.deliveries-card__utilities,
.deliveries-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deliveries-card__reference {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.deliveries-state {
  flex: 0 0 auto;
  max-width: 55%;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface);
  font-size: .78rem;
  font-weight: 800;
  text-align: center;
}

.deliveries-state--issue {
  color: #7a1616;
  background: #fbe4e4;
}

.deliveries-card h3 {
  margin-top: 14px;
  overflow-wrap: anywhere;
}

.deliveries-card__place {
  margin-top: 3px !important;
  font-weight: 700;
}

.deliveries-card__overdue {
  margin-top: 8px !important;
  color: #7a1616;
}

.stock-holders {
  display: block;
  overflow-wrap: anywhere;
}

.deliveries-card__stock {
  margin-top: 8px !important;
  color: #7a1616;
  overflow-wrap: anywhere;
}

.deliveries-card__overdue strong {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #7a1616;
  font-size: .78rem;
  text-transform: uppercase;
}

.deliveries-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 16px 0;
}

.deliveries-facts div,
.deliveries-facts dt,
.deliveries-facts dd {
  min-width: 0;
  margin: 0;
}

.deliveries-facts dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.deliveries-facts dd,
.deliveries-wrap {
  overflow-wrap: anywhere;
}

.deliveries-facts__wide {
  grid-column: 1 / -1;
}

.deliveries-proof-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 10px;
  border-radius: 6px;
  background: var(--surface);
  font-size: .88rem;
}

.deliveries-proof-compact strong {
  flex-basis: 100%;
}

.deliveries-card__utilities {
  justify-content: flex-start;
  margin-top: 14px;
}

.deliveries-card__utilities a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 750;
  text-transform: uppercase;
}

.deliveries-card__actions {
  align-items: stretch;
  flex-direction: column;
  margin-top: 14px;
}

.deliveries-card__actions .btn-primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.deliveries-empty {
  max-width: none;
}

/* Run sheet (templates/ops/deliveries/run.html): one driver's day in stop order, and a clean printed sheet. */
.delivery-run__head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.delivery-run__days { align-items: stretch; display: flex; gap: 6px; margin: 16px 0 8px; }
.delivery-run__step { align-items: center; flex: none; border: 1px solid var(--line); display: flex; justify-content: center; min-width: 44px; }
.delivery-run__week { display: grid; flex: 1; gap: 6px; grid-template-columns: repeat(7, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.delivery-run__week a { background: var(--panel); border: 1px solid var(--line); color: var(--ink); display: grid; gap: 2px; min-height: 44px; padding: 6px 4px; text-align: center; }
.delivery-run__week a[aria-current] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
.delivery-run__weekday { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.delivery-run__date { font-size: 13px; }
.delivery-run__count { color: var(--steel); font-size: 11px; }
.delivery-run__title { font-size: 20px; margin: 16px 0 4px; }
.delivery-run__unscheduled a { color: var(--red-deep); font-weight: 700; }
.delivery-run__driver { margin-top: 20px; }
.delivery-run__driver-head { align-items: center; border-bottom: 2px solid var(--ink); display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding-bottom: 8px; }
.delivery-run__driver-head h3 { margin: 0; }
.delivery-run__driver-head h3 span { color: var(--steel); font-size: 14px; font-weight: 500; }
.delivery-run__stops { list-style: none; margin: 0; padding: 0; }
.delivery-run__stop { border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 36px minmax(0, 1fr); padding: 14px 0; }
.delivery-run__stop.is-done { opacity: .6; }
.delivery-run__number { align-items: center; background: var(--ink); color: #fff; display: flex; font-weight: 700; height: 32px; justify-content: center; width: 32px; }
.delivery-run__stop.is-done .delivery-run__number { background: var(--ok); }
.delivery-run__body { display: grid; gap: 6px; min-width: 0; }
.delivery-run__line { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.delivery-run__address { font-style: normal; overflow-wrap: anywhere; }
.delivery-run__meta { color: var(--steel); font-size: 14px; margin: 0; }
.delivery-run__items { font-size: 14px; margin: 0; padding-left: 18px; }
.delivery-run__note { font-size: 14px; margin: 0; }
.delivery-run__note--issue { color: var(--red-deep); }
.delivery-run__actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.delivery-run__actions .btn-primary, .delivery-run__actions .staff-secondary-link,
.delivery-run__route { align-items: center; display: inline-flex; justify-content: center; min-height: 44px; }
.delivery-run__move { display: flex; gap: 4px; margin-left: auto; }
.delivery-run__move button { justify-content: center; min-width: 44px; }
.delivery-run__move button:disabled { opacity: .35; }
.delivery-run__sign { display: none; }

/* Phones: seven days must fit, so the strip shows weekday, day number and count only. */
@media (max-width: 719px) {
  .delivery-run__days { gap: 4px; }
  .delivery-run__step { min-width: 32px; }
  .delivery-run__week { gap: 3px; }
  .delivery-run__week a { padding: 6px 0; }
  .delivery-run__month, .delivery-run__stops-word { display: none; }
  .delivery-run__weekday { font-size: 10px; }
  .delivery-run__date { font-size: 15px; font-weight: 700; }
}

@media print {
  .staff-header, .staff-nav, .staff-back, .delivery-run__head-actions, .delivery-run__days, .delivery-run__unscheduled,
  .delivery-run__actions, .delivery-run__route, .staff-notice { display: none !important; }
  body.staff-app { background: #fff !important; }
  body.staff-app { display: block !important; }
  body.staff-app .staff-main { grid-column: auto !important; margin: 0 !important; max-width: none !important; padding: 0 !important; }
  .delivery-run { padding: 0; }
  .delivery-run__stop { break-inside: avoid; }
  .delivery-run__driver { break-before: page; }
  .delivery-run__driver:first-of-type { break-before: auto; }
  .delivery-run__number { border: 2px solid #000; background: #fff; color: #000; }
  .delivery-run__sign { color: #000; display: block; margin: 8px 0 0; }
  .delivery-run__stop.is-done { opacity: 1; }
}

@media (min-width: 720px) {
  .deliveries-workspace { padding-bottom: 40px; }
  .deliveries-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .deliveries-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .deliveries-head { display: block; }
  .deliveries-head > p { margin-top: 6px; }
  .deliveries-card { padding: 15px; }
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

body {
  background: var(--surface);
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.site-shell {
  margin: 0 auto;
  max-width: 1280px;
  padding: 0 16px;
  width: 100%;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Skip links (base.html, listings): hidden until keyboard focus reaches them, then a fixed, high-contrast tab. */
.skip-link {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link:focus {
  background: var(--ink);
  clip: auto;
  color: #FFFFFF;
  font-weight: 700;
  height: auto;
  left: 16px;
  margin: 0;
  outline: 3px solid var(--red);
  outline-offset: 2px;
  padding: 12px 18px;
  position: fixed;
  text-decoration: none;
  top: 12px;
  width: auto;
  z-index: 1000;
}

/* Inside a box that clips (the breadcrumb and department rows scroll sideways; a card name is clamped to two
   lines), the focus ring is drawn just inside the link so it is never cut off. */
.crumbs a:focus-visible,
.subcategory-links a:focus-visible,
.product-card h3 a:focus-visible {
  outline-offset: -2px;
}

/* A skip target takes focus without drawing a box around the whole page or result list. */
#main:focus,
#results:focus {
  outline: none;
}

.enquiry-form__noscript {
  border-left: 4px solid var(--red);
  margin: 12px 0;
  padding: 8px 12px;
}

.stripe {
  background: linear-gradient(90deg, var(--red) 0 72%, var(--silver) 72% 100%);
  height: 4px;
  width: 100%;
}

.eyebrow {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-heading h2 {
  border-bottom: 2px solid var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 30px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  padding-bottom: 8px;
}

.section-heading > a {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 40px;
  padding: 0 16px;
  text-transform: uppercase;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  background: var(--steel);
  border-color: var(--steel);
  cursor: not-allowed;
}

.utility-bar {
  background: var(--charcoal);
  color: #fff;
  font-size: 13px;
}

.utility-inner {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 36px;
}

.utility-contact,
.utility-controls,
.utility-services {
  align-items: center;
  display: flex;
}

.utility-contact,
.utility-controls {
  white-space: nowrap;
}

.utility-controls {
  gap: 12px;
  justify-self: end;
}

/* The promises: one quiet line, a red dot between each, the whole line a
   link to Delivery & Collection. */
.utility-services {
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

.utility-inner .utility-services {
  color: #d6d7d8;
}

.utility-inner .utility-services:hover,
.utility-inner .utility-services:focus-visible {
  color: #fff;
}

.utility-services .utility-promo + .utility-promo::before {
  color: var(--red);
  content: "•";
  margin: 0 12px;
}

.utility-inner a {
  color: #fff;
  padding-block: 2px; /* a little more to tap inside the thin bar, still one line (tested) */
}

/* The phone number with a small line icon, drawn by a mask in the text colour. */
.utility-phone {
  align-items: center;
  display: inline-flex;
  font-weight: 600;
  gap: 7px;
}

.utility-phone::before {
  background: var(--silver);
  content: "";
  flex: none;
  height: 14px;
  -webkit-mask: var(--icon-phone) center / contain no-repeat;
  mask: var(--icon-phone) center / contain no-repeat;
  width: 14px;
}

/* A slim segmented pill; the chosen side is red. The menu's copy (.vat-switch)
   shares the look. */
.vat-toggle,
.vat-switch {
  align-items: center;
  border: 1px solid var(--steel);
  border-radius: 999px;
  display: inline-flex;
  gap: 0;
  padding: 2px;
  /* Above the header that follows, so the buttons' taller targets (below)
     reach into its empty top padding instead of being covered by it. */
  position: relative;
  z-index: 1;
}

.vat-toggle button,
.vat-switch button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--silver);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  min-height: 24px;
  min-width: 44px;
  padding: 0 11px;
  position: relative;
}

/* The target is 44 px tall whatever the button's drawn height (24 px from
   720 px, 36 px on phones): an invisible extension above and below, so the
   bar keeps its height. */
.vat-toggle button::after {
  content: "";
  inset: calc((100% - 44px) / 2) 0;
  position: absolute;
}


/* The active button follows the root preference that base.html's head script
   sets before first paint, so a returning ex-VAT visitor never sees "inc VAT"
   highlighted first. aria-pressed is kept in step by the footer script. */
:root:not([data-vat="ex"]) .vat-toggle [data-vat-choice="inc"],
:root[data-vat="ex"] .vat-toggle [data-vat-choice="ex"],
:root:not([data-vat="ex"]) .vat-switch [data-vat-choice="inc"],
:root[data-vat="ex"] .vat-switch [data-vat-choice="ex"] {
  background: var(--red);
  color: #fff;
}

/* Without JavaScript the head script never sets data-vat and the buttons could
   not work, so leave them out; prices still show inc VAT. */
:root:not([data-vat]) .vat-toggle,
:root:not([data-vat]) .site-nav__vat {
  display: none;
}

/* Product prices: _vat_price.html renders both VAT states and the root
   preference shows exactly one. The default, with no preference or no
   JavaScript, is inc VAT: the full price a consumer pays. Context rules style
   .vat-price but must never set its display, or they would override this. */
:root:not([data-vat="ex"]) [data-vat-price="ex"],
:root[data-vat="ex"] [data-vat-price="inc"] {
  display: none;
}

.utility-link span {
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}

.site-header {
  background: var(--ink-glow), var(--ink);
  color: #fff;
}

.header-inner {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 40px;
  padding-bottom: 12px;
  padding-top: 12px;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.header-icon {
  align-items: center;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  position: relative;
  width: 40px;
}

.header-menu-toggle span[aria-hidden="true"],
.header-menu-toggle span[aria-hidden="true"]::before,
.header-menu-toggle span[aria-hidden="true"]::after {
  background: #fff;
  content: "";
  display: block;
  height: 2px;
  width: 22px;
}

.header-menu-toggle span[aria-hidden="true"]::before {
  transform: translateY(-6px);
}

.header-menu-toggle span[aria-hidden="true"]::after {
  transform: translateY(4px);
}

/* Search is the main way into a part-number catalogue, so it is always on
   screen: its own full-width row on phones, beside the logo from 720 px. */
.site-search {
  display: flex;
  gap: 0;
  grid-column: 1 / -1;
}

/* The field and a red magnifier square read as one control. */
.site-search .btn-primary {
  flex: 0 0 auto;
  min-height: 44px;
}

.site-search .site-search__submit {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 52px;
}

.site-nav {
  display: none;
  grid-column: 1 / -1;
}

.site-nav.is-open {
  display: flex;
}

.site-search input {
  background: #fff;
  border: 1px solid #fff;
  border-radius: 0;
  color: var(--ink);
  flex: 1;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.site-nav {
  flex-direction: column;
  gap: 4px;
}

.site-nav a {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0;
  text-transform: uppercase;
}

.site-main > h1,
.site-main > h2,
.site-main > p,
.site-main > form,
.site-main > table,
.site-main > .crumbs,
.site-main > .products,
.site-main > .row {
  margin-left: auto;
  margin-right: auto;
  max-width: 1280px;
  padding-left: 16px;
  padding-right: 16px;
}

/* Homepage hero: catalogue leads, then job routes and seasonal content. */
.hero-stage {
  background:
    radial-gradient(120% 520px at 100% calc(-1 * var(--site-header-h, 0px)), var(--ink-glow-colour), transparent 60%),
    var(--ink);
  color: #fff;
  overflow-x: clip;
}

.hero-stage__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 20px;
  padding-top: 4px;
  position: relative;
}

.hero-showcase {
  min-width: 0;
}

.hero-identity {
  margin-bottom: 6px;
}

.hero-panels {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.hero-panel {
  min-width: 0;
}

/* Keep one clean panel before JavaScript starts and when it is unavailable. */
.hero-panels:not(.is-rotating) > .hero-panel:not(:first-child) {
  display: none;
}

/* Overlap the panels without removing them from layout: the tallest panel
   reserves the height, so automatic rotation never shifts the page below. */
.hero-panels.is-rotating {
  gap: 0;
}

.hero-panels.is-rotating > .hero-panel {
  display: block;
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.hero-panels.is-rotating > .hero-showcase {
  display: flex;
  flex-direction: column;
}

.hero-panels.is-rotating > .hero-panel--jobs {
  display: flex;
  flex-direction: column;
}


.hero-panels.is-rotating > .hero-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.hero-panels.is-rotating > .hero-panel.is-leaving {
  opacity: 1;
  visibility: visible;
}

.hero-panels__controls {
  align-items: center;
  display: flex;
  gap: 0;
  justify-content: flex-end;
  position: absolute;
  right: 16px;
  bottom: 20px;
}

.hero-panels__controls[hidden] {
  display: none;
}

.hero-panels__controls button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 21px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 8px;
}

.hero-panels__controls button:hover,
.hero-panels__controls button:focus-visible {
  color: var(--red);
}

.hero-panels__controls [data-hero-pause] {
  color: var(--silver);
  min-width: 44px;
}

.hero-panels__controls [data-hero-pause]:hover,
.hero-panels__controls [data-hero-pause]:focus-visible {
  color: #fff;
}

.hero-panels__controls [data-hero-pause] svg {
  fill: currentColor;
}

.hero-control__play-icon,
.hero-panels__controls [data-hero-pause].is-paused .hero-control__pause-icon {
  display: none;
}

.hero-panels__controls [data-hero-pause].is-paused .hero-control__play-icon {
  display: block;
}











@media (prefers-reduced-motion: no-preference) {
  .hero-panels.is-rotating > .hero-panel.is-active {
    animation: hero-panel-enter 450ms ease-out both;
  }

  .hero-panels.is-rotating > .hero-panel.is-leaving {
    animation: hero-panel-exit 260ms ease-in both;
  }
}

@keyframes hero-panel-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-panel-exit {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-10px); }
}

.brands-band .eyebrow {
  color: var(--silver);
}

.hero-showcase__head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

/* What we are, then where: a restrained eyebrow (the page's H1) on the left
   and a location link to the map on the right, one quiet row above a hairline
   that separates it from the rotating panels. */
.hero-identity {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-wrap: nowrap;
  gap: 0 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.hero-showcase__title {
  color: var(--silver);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.3;
  margin: 0;
  text-transform: uppercase;
}

/* A full 44 px tall target, its words compact inside it. */
.hero-location {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 6px;
  min-height: 44px;
}

.hero-location .delivery-icon {
  background: none;
  border: 0;
  height: 18px;
  padding: 0;
  width: 18px;
}

.hero-location .delivery-icon__body {
  stroke: #fff;
}

.hero-location .delivery-icon svg {
  stroke-width: 2.5;
}

.hero-location {
  white-space: nowrap;
}

.hero-location__cta {
  color: var(--silver);
  font-size: 13px;
  font-weight: 500;
  margin-left: 6px;
}

/* A red chevron closes the link. */
.hero-location::after {
  border-right: 2px solid var(--red);
  border-top: 2px solid var(--red);
  content: "";
  height: 6px;
  margin-left: 2px;
  transform: rotate(45deg);
  width: 6px;
}

.hero-location:hover .hero-location__cta,
.hero-location:focus-visible .hero-location__cta {
  color: #fff;
}

/* Phones: "Find us" stays the link's name but only the place and chevron show. */
@media (max-width: 719px) {
  .hero-identity {
    column-gap: 12px;
    margin-bottom: 16px;
  }

  .hero-showcase__title {
    font-size: 11px;
    letter-spacing: .1em;
  }

  .hero-location {
    font-size: 13px;
    gap: 5px;
  }

  .hero-location__cta {
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }
}

/* Homepage splash (home.html): the full-screen intro on a visitor's first homepage of a browser session.
   Hidden unless home.html's head script set .van-splash-on, and never with reduced motion. The van fades up
   from black over 0.7 s once it is moving and speeds past under a vignette (storefront/splash.py), then sinks into frosted glass. A glass
   panel opens from a hairline, the logo pulls into focus, a red loading line fills, one soft light passes
   across the glass, and the splash dissolves to the page, already loaded underneath. 2.9 s in all, ended at
   once by any tap, key or scroll (.van-splash-skip, static/js/home-hero.js).
   A deliberate exception to "no blur, no shadows" for this splash only: the backdrop blur, the focus pull
   and the glass's hairline edge and light. Transform, clip-path, filter and opacity only. */
.van-splash {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .van-splash-on .van-splash {
    align-items: center;
    animation: van-splash-out 420ms cubic-bezier(.4, 0, .2, 1) 2430ms forwards;
    background: #08080a;
    display: flex;
    inset: 0;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    position: fixed;
    z-index: 1000;
  }

  /* Held on its first frame (black) until the van is moving: home.html adds .van-splash-go. */
  .van-splash-on:not(.van-splash-go):not(.van-splash-skip) .van-splash,
  .van-splash-on:not(.van-splash-go):not(.van-splash-skip) .van-splash *,
  .van-splash-on:not(.van-splash-go):not(.van-splash-skip) .van-splash *::after {
    animation-play-state: paused;
  }

  /* Skipped: a quick fade, and nothing under it is blocked meanwhile. */
  .van-splash-on.van-splash-skip .van-splash {
    animation: van-splash-fade 160ms ease-out forwards;
    pointer-events: none;
  }

  /* Up from black, sharp while the van passes, then sinking into frosted glass as the panel takes over.
     Phones blur less (below). */
  .van-splash-on .van-splash__video {
    animation: van-splash-push 2850ms linear both;
  }

  .van-splash-on .van-splash__shade::after {
    animation: van-splash-dim 2850ms linear both;
  }

  .van-splash-on .van-splash__glass {
    animation:
      van-splash-open 800ms cubic-bezier(.16, 1, .3, 1) 500ms both,
      van-splash-glass-out 300ms cubic-bezier(.4, 0, .2, 1) 2170ms forwards;
  }

  .van-splash-on .van-splash__glass::after {
    animation: van-splash-sheen 900ms cubic-bezier(.45, 0, .25, 1) 1300ms both;
  }

  .van-splash-on .van-splash__logo {
    animation:
      van-splash-focus 800ms cubic-bezier(.16, 1, .3, 1) 630ms both,
      van-splash-defocus 300ms cubic-bezier(.4, 0, 1, 1) 2170ms forwards;
  }

  .van-splash-on .van-splash__bar {
    animation: van-splash-appear 300ms ease-out 850ms both;
  }

  .van-splash-on .van-splash__fill {
    animation: van-splash-load 1250ms cubic-bezier(.65, 0, .35, 1) 900ms both;
  }

  .van-splash-on .van-splash__line {
    animation: van-splash-track 900ms cubic-bezier(.16, 1, .3, 1) 1000ms both;
  }
}

.van-splash__video,
.van-splash__shade,
.van-splash__shade::after {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.van-splash__video {
  object-fit: cover;
  object-position: 50% 55%;
}

/* Phones upright: van-tall is already framed (it travels along the van); keep the panel clear of the notch. */
@media (max-aspect-ratio: 4/5) {
  .van-splash-on .van-splash {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding-top: max(16px, env(safe-area-inset-top, 0px));
  }

  .van-splash__video {
    object-position: 50% 60%;
  }
}

/* A cinematic vignette that holds the eye in the middle, over an even shade that deepens as the van blurs. */
.van-splash__shade {
  background: radial-gradient(ellipse 120% 95% at 50% 48%, rgba(8, 8, 10, .1) 30%, rgba(8, 8, 10, .72) 100%);
}

.van-splash__shade::after {
  background: rgb(8, 8, 10);
  content: "";
  opacity: .3;
}

/* Glass: a faint top-lit tint and a hairline edge, brighter along the top where the light catches it. */
.van-splash__glass {
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .015) 60%),
    rgba(12, 12, 14, .38);
  border: 1px solid rgba(255, 255, 255, .12);
  border-image: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .05)) 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;  /* the logo's natural 1881 px must not stretch the panel past its width */
  overflow: hidden;
  padding: clamp(32px, 5.5vw, 56px) clamp(28px, 6.5vw, 72px) clamp(26px, 4.2vw, 44px);
  position: relative;
  width: min(100%, 660px);
}

/* The light that crosses the glass once. */
.van-splash__glass::after {
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .1) 50%, transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-100%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .van-splash__glass {
    background: rgba(17, 17, 17, .8);
  }
}

.van-splash__logo {
  display: block;
  height: auto;
  width: 100%;
}

/* The loading line: a hairline track and a solid red line filling it, left to right. */
.van-splash__bar {
  align-items: center;
  display: flex;
  height: 2px;
  margin-top: clamp(22px, 3.2vw, 32px);
  position: relative;
  width: 100%;
}

.van-splash__bar::before {
  background: rgba(255, 255, 255, .14);
  content: "";
  height: 1px;
  inset: 50% 0 auto;
  position: absolute;
}

.van-splash__fill {
  background: var(--red);
  display: block;
  height: 100%;
  position: relative;
  width: 100%;
}

.van-splash__line {
  --track: .34em;
  color: rgba(255, 255, 255, .74);
  font-size: clamp(10.5px, 1.4vw, 12px);
  font-weight: 500;
  letter-spacing: var(--track);
  line-height: 1.4;
  margin: 18px 0 0;
  margin-right: calc(-1 * var(--track));  /* the last letter's tracking would push the line off centre */
  text-align: center;
  text-transform: uppercase;
}

/* Narrow phones: lighter blurs (cheaper over a playing video) and a tighter line, one row from 360 px. */
@media (max-width: 479px) {
  .van-splash-on .van-splash__video {
    animation-name: van-splash-push-phone;
  }

  .van-splash__glass {
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    backdrop-filter: blur(14px) saturate(1.35);
    padding: 30px 24px 22px;
  }

  .van-splash__bar {
    margin-top: 20px;
  }

  .van-splash__line {
    --track: .18em;
    font-size: 10px;
    margin-top: 14px;
    text-wrap: balance;
  }
}

/* Phones held sideways: a compact panel sized by the short screen (the logo at most 30vh tall). */
@media (max-height: 500px) and (orientation: landscape) {
  .van-splash-on .van-splash {
    padding: 12px max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }

  .van-splash__glass {
    padding: 24px 36px 18px;
    width: min(100%, 134vh + 72px, 560px);
  }

  .van-splash__bar {
    margin-top: 16px;
  }

  .van-splash__line {
    margin-top: 12px;
  }
}

/* The scale grows with the blur so its soft edge never shows at the sides of the screen. */
/* The van fades up (0.6 s) and passes sharp; its blur starts as the panel opens (0.5 s), quickly at first so the
   logo never sits over the van's own livery, keeping some colour so the glass glows rather than greys. */
@keyframes van-splash-push {
  0% { filter: blur(0) saturate(1); opacity: 0; transform: scale(1.04); }
  18% { filter: blur(0) saturate(1); }
  21% { opacity: 1; }
  45% { filter: blur(14px) saturate(.95); }
  100% { filter: blur(30px) saturate(.9); opacity: 1; transform: scale(1.18); }
}

@keyframes van-splash-push-phone {
  0% { filter: blur(0) saturate(1); opacity: 0; transform: scale(1.04); }
  18% { filter: blur(0) saturate(1); }
  21% { opacity: 1; }
  45% { filter: blur(8px) saturate(.95); }
  100% { filter: blur(16px) saturate(.9); opacity: 1; transform: scale(1.18); }
}

@keyframes van-splash-dim {
  0%, 18% { opacity: .3; }
  100% { opacity: .52; }
}

/* The panel opens outward from a hairline across the middle. */
@keyframes van-splash-open {
  0% { clip-path: inset(50% 50% 50% 50%); opacity: 0; }
  12% { clip-path: inset(50% 30% 50% 30%); opacity: 1; }
  45% { clip-path: inset(50% 0 50% 0); }
  100% { clip-path: inset(0); opacity: 1; }
}

@keyframes van-splash-glass-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: scale(1.015); }
}

/* A lens pulling focus: soft and slightly large, settling sharp. */
@keyframes van-splash-focus {
  from { filter: blur(10px); opacity: 0; transform: scale(1.04); }
  to { filter: blur(0); opacity: 1; transform: none; }
}

@keyframes van-splash-defocus {
  from { filter: blur(0); }
  to { filter: blur(6px); }
}

@keyframes van-splash-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes van-splash-load {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* The strapline settles in from wide tracking. */
@keyframes van-splash-track {
  from { letter-spacing: calc(var(--track) + .3em); opacity: 0; }
  to { letter-spacing: var(--track); opacity: 1; }
}

@keyframes van-splash-sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes van-splash-out {
  to { opacity: 0; visibility: hidden; }
}

@keyframes van-splash-fade {
  to { opacity: 0; visibility: hidden; }
}

/* Homepage entrance (home.html, static/js/home-hero.js): never with reduced motion, and only while the head
   script's html.home-reveal stands. The hero rises in as the splash dissolves (at once on a later visit): the
   identity row, the panel heading, each card in turn, then its link and controls. It is released after 1.8 s
   (.home-reveal-done), so the panel rotation keeps its own motion. Below, each item rises in as it scrolls into
   view (.is-in), a row at a time, 60 ms apart; the selectors match REVEAL in home-hero.js. Opacity and
   transform only: nothing below ever moves. */
@media (prefers-reduced-motion: no-preference) {
  .home-reveal:not(.home-reveal-done) :is(.hero-identity, .hero-showcase__head, .hero-rail > li,
    .hero-showcase__cta, .job-paths .section-heading, .job-paths__grid > li, .hero-panels__controls) {
    opacity: 0;
  }

  /* The navbar drops in first: the utility bar, the logo (unless the splash logo flew into it), the search,
     the links and icons a beat apart, then the red stripe draws across. */
  .home-reveal:not(.home-reveal-done) :is(.utility-inner > *, .site-logo, .site-search, .header-icon,
    .header-basket, .header-promos__row) {
    opacity: 0;
  }

  .home-reveal.home-reveal-go:not(.home-reveal-done) :is(.utility-inner > *, .site-logo, .site-search,
    .header-icon, .header-basket, .header-promos__row) {
    animation: home-drop 650ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms) both;
  }

  .home-reveal:not(.home-reveal-done) .site-header .stripe {
    transform: scaleX(0);
    transform-origin: left;
  }

  .home-reveal.home-reveal-go:not(.home-reveal-done) .site-header .stripe {
    animation: home-draw 900ms cubic-bezier(.65, 0, .35, 1) 220ms both;
  }

  .home-reveal.logo-flown .site-logo {
    animation: none;
    opacity: 1;
  }

  .logo-in-flight .site-logo img {
    visibility: hidden;
  }

  .home-reveal .utility-inner > :nth-child(2) { --reveal-delay: 40ms; }
  .home-reveal .utility-inner > :nth-child(3) { --reveal-delay: 80ms; }
  .home-reveal .site-logo { --reveal-delay: 60ms; }
  .home-reveal .site-search { --reveal-delay: 120ms; }
  .home-reveal :is(.header-icon, .header-basket) { --reveal-delay: 160ms; }
  .home-reveal .header-promos__row { --reveal-delay: 220ms; }

  .home-reveal.home-reveal-go:not(.home-reveal-done) :is(.hero-identity, .hero-showcase__head, .hero-rail > li,
    .hero-showcase__cta, .job-paths .section-heading, .job-paths__grid > li, .hero-panels__controls) {
    animation: home-rise 750ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms) both;
  }

  .home-reveal .hero-showcase__head { --reveal-delay: 90ms; }
  .home-reveal :is(.hero-rail, .job-paths__grid) > li:nth-child(1) { --reveal-delay: 180ms; }
  .home-reveal :is(.hero-rail, .job-paths__grid) > li:nth-child(2) { --reveal-delay: 240ms; }
  .home-reveal :is(.hero-rail, .job-paths__grid) > li:nth-child(3) { --reveal-delay: 300ms; }
  .home-reveal :is(.hero-rail, .job-paths__grid) > li:nth-child(4) { --reveal-delay: 360ms; }
  .home-reveal :is(.hero-rail, .job-paths__grid) > li:nth-child(5) { --reveal-delay: 420ms; }
  .home-reveal :is(.hero-rail, .job-paths__grid) > li:nth-child(n + 6) { --reveal-delay: 480ms; }
  .home-reveal :is(.hero-showcase__cta, .hero-panels__controls) { --reveal-delay: 560ms; }

  .home-reveal :is(.section-heading:not(.hero-stage *), .category-grid > li, .all-products-button, .featured-products__grid > li,
    .section-intro, .trade-chips > a, .brands-copy, .brand-showcase > *, .brands-all, .trust-inner > span,
    .delivery-grid > div):not(.is-in) {
    opacity: 0;
  }

  /* Backwards fill only: once risen, each item is back to its own styles, hover transforms included. */
  .home-reveal :is(.section-heading:not(.hero-stage *), .category-grid > li, .all-products-button, .featured-products__grid > li,
    .section-intro, .trade-chips > a, .brands-copy, .brand-showcase > *, .brands-all, .trust-inner > span,
    .delivery-grid > div).is-in {
    animation: home-rise 750ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms) backwards;
  }
}

/* Navbar links: only where they sit in the header (from 720 px); on phones they are in the closed menu. */
@media (prefers-reduced-motion: no-preference) and (min-width: 720px) {
  .home-reveal:not(.home-reveal-done) .site-nav > :is(a, details) {
    opacity: 0;
  }

  .home-reveal.home-reveal-go:not(.home-reveal-done) .site-nav > :is(a, details) {
    animation: home-drop 650ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms) both;
  }

  .home-reveal .site-nav > :nth-child(2) { --reveal-delay: 150ms; }
  .home-reveal .site-nav > :nth-child(3) { --reveal-delay: 190ms; }
  .home-reveal .site-nav > :nth-child(4) { --reveal-delay: 230ms; }
  .home-reveal .site-nav > :nth-child(5) { --reveal-delay: 270ms; }
  .home-reveal .site-nav > :nth-child(6) { --reveal-delay: 310ms; }
  .home-reveal .site-nav > :nth-child(n + 7) { --reveal-delay: 350ms; }
}

/* The splash logo on its way to the navbar (static/js/home-hero.js), above the dissolving splash. */
.van-splash-flyer {
  pointer-events: none;
  position: fixed;
  transform-origin: 0 0;
  will-change: transform;
  z-index: 1001;
}

@keyframes home-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes home-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes home-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-showcase__heading {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}

.hero-showcase__title-group {
  display: grid;
  gap: 0;
  min-width: 0;
}

.hero-showcase__title-group .eyebrow {
  color: var(--silver);
}

.hero-showcase__heading h2 {
  border-bottom: 2px solid var(--red);
  font-family: var(--font-display);
  font-size: 30px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  padding-bottom: 8px;
}

.hero-showcase__cta {
  align-items: center;
  border: 1px solid var(--red);
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  margin: 12px auto 0;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  text-transform: uppercase;
  width: fit-content;
}

.hero-panels.is-rotating > .hero-showcase .hero-rail {
  margin-bottom: 12px;
}

.hero-panels.is-rotating > .hero-showcase .hero-showcase__cta {
  margin-top: auto;
}

.hero-panels.is-rotating > .hero-panel--jobs .job-paths__grid {
  margin-bottom: 12px;
}

@media (max-width: 719px) {
  .hero-showcase__cta {
    font-size: 11px;
    gap: 5px;
    margin-left: 0;
    margin-right: 0;
    padding: 0 10px;
  }
}

@media (max-width: 359px) {
  .hero-showcase__cta {
    font-size: 10px;
    gap: 4px;
    padding: 0 6px;
  }
}

.hero-showcase__cta:hover,
.hero-showcase__cta:focus-visible {
  background: var(--red);
}

@media (max-width: 359px) {
  .hero-showcase__heading h2 {
    font-size: 25px;
  }
}

/* A manually scrolled row below desktop: proximity snap, a visible slice of
   the next card, no auto-scroll, no dots. Six columns from 1040 px. */
.hero-rail {
  display: grid;
  gap: 12px;
  grid-auto-columns: clamp(176px, calc((100% - 12px) / 1.75), 220px);
  grid-auto-flow: column;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 4px 10px;
  /* Keeps anything absolutely positioned inside a card within the scroller,
     so it can never widen the page. */
  position: relative;
  scroll-padding: 0 4px;
  /* Proximity, not mandatory: mandatory snapping can pull a keyboard-focused
     card back out of view after the browser scrolls it in. */
  scroll-snap-type: x proximity;
  scrollbar-color: var(--steel) transparent;
}

.hero-rail > li {
  min-width: 0;
  scroll-snap-align: start;
}

.hero-rail .empty-state {
  border-color: var(--steel);
  color: var(--silver);
}

/* Hero showcase card: every product sits in the same fixed white mount and
   is contained, never cropped or stretched, so a tiny part on white, a photo
   on black, a tall tube and a wide reel all take the same footprint. The
   source pixels are untouched; the mount and padding do the evening out. */
.hero-card__link {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  height: 100%;
}

.hero-card__mount {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 132px;
  justify-content: center;
  padding: 16px 18px;
}

.hero-card__mount > img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.product-image-placeholder {
  align-items: center;
  align-self: stretch;
  background: var(--surface);
  color: var(--steel);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  padding: 16px;
  text-align: center;
  width: 100%;
}

.product-image-placeholder__logo,
.product-card__image img.product-image-placeholder__logo,
.hero-card__mount img.product-image-placeholder__logo,
.product-media-panel img.product-image-placeholder__logo {
  height: auto;
  max-height: 150px;
  max-width: 180px;
  width: min(72%, 180px);
}

.product-image-placeholder__message {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .02em;
  line-height: 1.3;
}

.hero-card__mount .product-image-placeholder {
  gap: 7px;
  padding: 10px;
}

.hero-card__mount img.product-image-placeholder__logo {
  max-height: 68px;
  max-width: 96px;
  width: 64%;
}

.hero-card__mount .product-image-placeholder__message {
  font-size: 10px;
}

.hero-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* The height of a body with a brand line: an unbranded product has none, and its card keeps the
     same footprint (the price stays on the bottom line), even in a rail with no branded products. */
  min-height: 107px;
  padding: 10px 12px 12px;
}

.hero-card__brand {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-card__name {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6em;
  overflow: hidden;
}

.hero-card__price {
  color: var(--red);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.1;
  margin-top: auto;
  padding-top: 6px;
}

.hero-card__price small {
  font-size: 11px;
  font-weight: 600;
}

.hero-card__link:hover {
  border-color: var(--red);
}

.hero-card__link:hover .hero-card__name {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.section {
  padding: 36px 0;
}

.section--panel {
  background: var(--panel);
}

.section--tight {
  background: var(--surface);
  padding-bottom: 28px;
  padding-top: 28px;
}

/* Hero job routes: real departments, shown only while they contain products. */
.job-paths {
  align-content: center;
  display: grid;
}

.job-paths .section-heading {
  margin-bottom: 16px;
}

.job-paths .eyebrow {
  color: var(--silver);
}

.job-paths__grid {
  display: grid;
  gap: 12px;
  grid-auto-columns: clamp(176px, calc((100% - 12px) / 1.75), 220px);
  grid-auto-flow: column;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 4px 10px;
  scroll-padding: 0 4px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--steel) transparent;
}

.job-paths__grid li {
  border: 1px solid var(--line);
  min-width: 0;
  scroll-snap-align: start;
}

.job-paths__grid a {
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 4px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 120px auto auto 1fr;
  height: 100%;
  min-height: 240px;
  text-decoration: none;
}

.job-paths__media {
  align-items: center;
  background: #fff;
  display: flex;
  border-bottom: 1px solid var(--line);
  grid-column: 1 / -1;
  grid-row: 1;
  justify-content: center;
  min-width: 0;
  padding: 16px;
}

.job-paths__media img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
}

.job-paths__label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  grid-column: 1 / -1;
  grid-row: 2;
  line-height: 1.15;
  overflow-wrap: anywhere;
  padding: 10px 12px 0;
}

.job-paths__description {
  color: var(--steel);
  font-size: 13px;
  grid-column: 1 / -1;
  grid-row: 3;
  line-height: 1.3;
  padding: 0 12px;
}

.job-paths__count {
  color: var(--steel);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  grid-column: 1;
  grid-row: 4;
  align-self: end;
  padding: 0 0 12px 12px;
}

.job-paths__arrow {
  color: var(--red);
  font-size: 21px;
  grid-column: 2;
  grid-row: 4;
  align-self: end;
  justify-self: end;
  line-height: 1;
  padding: 0 12px 10px 0;
}

.job-paths__grid a:hover,
.job-paths__grid a:focus-visible {
  background: var(--ink);
  color: #fff;
}

.job-paths__grid a:hover .job-paths__count,
.job-paths__grid a:focus-visible .job-paths__count,
.job-paths__grid a:hover .job-paths__description,
.job-paths__grid a:focus-visible .job-paths__description {
  color: var(--silver);
}

.job-paths__grid a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

@media (max-width: 719px) {
  .job-paths__label {
    font-size: 16px;
  }
}

@media (min-width: 1040px) {
  .job-paths__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .job-paths__grid li {
    flex: 1 1 150px;
    max-width: 210px;
  }
}

.category-grid,
.products,
.grid,
.row {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* "View all N products" under the department cards and on All departments. */
.all-products-button {
  display: inline-flex;
  margin-top: 20px;
}

.category-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-tile {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.category-tile a {
  background: #fff;
  display: grid;
  grid-template-rows: 120px auto;
  height: 100%;
}

.category-media {
  align-items: center;
  background: #fff;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.category-media img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
}

.category-bar {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: grid;
  gap: 4px 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 56px;
  padding: 12px;
}

.category-bar span {
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.category-bar small {
  color: var(--silver);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  grid-column: 1;
}

.category-bar b {
  color: var(--red);
  grid-column: 2;
  grid-row: 1 / span 2;
}

.category-tile a:hover .category-bar,
.category-tile a:focus .category-bar {
  background: var(--red);
}

.category-tile a:hover .category-bar b,
.category-tile a:focus .category-bar b,
.category-tile a:hover .category-bar small,
.category-tile a:focus .category-bar small {
  color: #fff;
}

/* Homepage: the one short paragraph saying who Fynepax is, where, and for whom. */
.section-intro {
  color: var(--steel);
  font-size: 15px;
  line-height: 1.55;
  margin: -4px 0 18px;
  max-width: 68ch;
}

.trade-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trade-chips a {
  border: 1px solid var(--silver);
  color: var(--ink);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  text-transform: uppercase;
}

.trade-chips a:hover,
.trade-chips a:focus {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.product-grid,
.products {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card__image {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
}

.product-card__image > img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  object-fit: contain;
  width: 100%;
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.product-card__brand {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.product-card h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.pack-size {
  color: var(--steel);
  font-size: 12px;
  margin: 0;
}

.price {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
  gap: 2px;
  margin-top: auto;
}

.price .vat-price {
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.price .vat-price small {
  font-size: 12px;
}

.product-card__actions {
  display: grid;
  gap: 8px;
}

.product-card__actions form {
  display: flex;
  gap: 8px;
}

.product-card__actions input {
  border: 1px solid var(--line);
  border-radius: 0;
  height: 40px;
  padding: 0 4px;
  text-align: center;
  width: 40px;
}

.product-card__actions .btn-primary {
  flex: 1;
}

.badge {
  border: 1px solid currentColor;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  text-transform: uppercase;
}

.badge--in_stock,
.stock-in_stock {
  color: var(--ok);
}

.badge--low,
.stock-low {
  color: var(--warn);
}

.badge--to_order,
.stock-to_order {
  color: var(--steel);
}

/* Options with different availability: a neutral summary, not a warning.
   The product page shows each option's own state. */
.badge--mixed {
  color: var(--steel);
}

/* "From" in a price that is the lowest of several option prices: part of the
   price, smaller than the amount. */
.vat-price__from {
  font-size: .72em;
  font-weight: 700;
}

.badge--contact,
.stock-contact {
  color: var(--red);
}

.catalogue-page {
  background: var(--panel);
  padding-bottom: 40px;
}

.category-heading {
  padding-bottom: 24px;
  padding-top: 28px;
}

.category-heading h1 {
  border-bottom: 2px solid var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 40px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  padding-bottom: 8px;
}

.category-heading p:last-child {
  color: var(--muted);
  margin: 12px 0 0;
}

/* Listing pages (All products, departments, search, brands, clearance) are task
   pages: a title sized for work, not a poster, and one line saying how many.
   The breadcrumb above already says where the page sits, so no eyebrow. */
.category-heading.category-heading--compact {
  padding-bottom: 12px;
  padding-top: 12px;
}

.category-heading.category-heading--compact h1,
.brand-heading.brand-heading--compact h1 {
  font-size: 28px;
  padding-bottom: 6px;
}

.category-heading--compact .results-meta,
.brand-heading--compact .results-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}

.category-heading--compact .results-meta + .results-meta {
  margin-top: 2px;
}

.results-meta__note {
  white-space: nowrap;
}

@media (min-width: 720px) {
  .category-heading.category-heading--compact {
    padding-bottom: 16px;
    padding-top: 18px;
  }

  .category-heading.category-heading--compact h1,
  .brand-heading.brand-heading--compact h1 {
    font-size: 36px;
  }
}

/* Links inside running copy: links are otherwise unstyled, so mark these. */
.brands-page .category-heading p a,
.brands-copy a,
.enquiry-unavailable a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brands-page .category-heading--compact p:last-child {
  line-height: 1.45;
  margin-top: 8px;
  max-width: 65ch;
}

.brands-copy a {
  color: #fff;
}

.category-grid--children {
  margin-bottom: 28px;
}

.filter-drawer {
  flex: 1;
}

.filter-drawer summary {
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  min-height: 40px;
  padding: 10px 12px;
  text-transform: uppercase;
}

.filter-drawer summary::-webkit-details-marker {
  display: none;
}

.filter-rail {
  display: none;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 16px;
}

.filter-drawer .filter-panel {
  border-top: 0;
}

.filter-group {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.filter-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.filter-group h2 {
  color: var(--steel);
  font-size: 12px;
  margin: 0;
  text-transform: uppercase;
}

.filter-group p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.filter-option {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

.filter-option input {
  accent-color: var(--red);
  height: 16px;
  margin: 3px 0 0;
  width: 16px;
}

/* A long value (a part number, a code) wraps inside its option rather than
   pushing the filter rail over the product grid. */
.filter-option span {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.filter-option small {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.price-band {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-band label {
  display: grid;
  gap: 4px;
}

.price-band span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.price-band input {
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 40px;
  min-width: 0;
  padding: 0 8px;
}

.filter-actions {
  display: grid;
  gap: 8px;
}

.filter-actions a {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.view-toggle {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
}

.view-toggle a {
  background: #fff;
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  min-height: 40px;
  padding: 11px 12px;
  text-transform: uppercase;
}

.view-toggle a + a {
  border-left: 1px solid var(--line);
}

.view-toggle a[aria-current="true"] {
  background: var(--red);
  color: #fff;
}

.browse-layout {
  display: grid;
  gap: 20px;
}

.product-results {
  min-width: 0;
}

.active-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.active-filters > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.filter-chip {
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.filter-chip span[aria-hidden="true"] {
  color: var(--red);
  font-weight: 700;
}

.filter-chip--clear {
  border-color: var(--red);
  color: var(--red);
  font-weight: 700;
}

.empty-state--results {
  background: var(--surface);
  display: block;
}

.empty-state--results p {
  margin: 0;
}

.empty-state--results a {
  color: var(--red);
  display: inline-block;
  font-weight: 700;
  margin-top: 12px;
}

.product-grid--list {
  grid-template-columns: 1fr;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  min-height: 40px;
  min-width: 40px;
  padding: 10px 12px;
  text-align: center;
}

.pagination span[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.brands-band {
  background: var(--ink);
  color: #fff;
}

.brands-inner {
  display: grid;
  gap: 20px;
  padding-bottom: 32px;
  padding-top: 28px;
}

.brands-inner h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  margin: 0;
}

.brands-copy > p:not(.eyebrow) {
  color: #D9DADB;
  font-size: 15px;
  margin: 10px 0 0;
  max-width: 620px;
}

.brand-showcase {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brand-showcase__item,
.brand-showcase__empty {
  align-items: center;
  background: #fff;
  border: 2px solid #fff;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 86px;
  padding: 16px;
  text-align: center;
  text-transform: uppercase;
}

.brand-showcase__item {
  min-width: 0;
}

.brand-showcase__item[href] {
  transition: border-color .16s ease, transform .16s ease;
}

.brand-showcase__item[href]:hover {
  border-color: var(--red);
  transform: translateY(-1px);
}

.brand-showcase__item--static {
  cursor: default;
}

.brand-showcase__empty {
  grid-column: 1 / -1;
}

.brand-showcase img {
  display: block;
  height: auto;
  max-height: 58px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.brand-showcase__fallback {
  display: block;
  font-size: 12px;
  line-height: 1.15;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: normal;
  text-align: center;
  text-transform: none;
  white-space: normal;
  width: auto;
  word-break: normal;
}

.brands-all {
  /* The brand red is 3.9:1 on the black band; this lighter red keeps the look at 5.8:1 (WCAG AA). */
  color: #FF4D57;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.trust-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.trust-inner {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  padding-top: 14px;
}

.trust-inner span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.delivery-band {
  background: var(--charcoal);
  color: #fff;
  padding: 32px 0;
}

.delivery-grid {
  display: grid;
  gap: 20px;
}

.delivery-grid div {
  border-top: 1px solid var(--steel);
  padding-top: 16px;
}

.delivery-grid h2 {
  font-size: 17px;
  margin: 12px 0 4px;
}

.delivery-grid p,
.mobile-sales {
  color: var(--silver);
  margin-bottom: 0;
  margin-top: 0;
}

/* The delivery-option icons (templates/storefront/_delivery_icon.html) drawn straight onto the dark band:
   white lines, red accents, no tile. */
.delivery-band .delivery-icon {
  background: none;
  border: 0;
  height: 40px;
  padding: 0;
  width: 40px;
}

.delivery-band .delivery-icon__body {
  stroke: #fff;
}

.delivery-band .delivery-icon svg {
  stroke-width: 1.75;
}

.mobile-sales {
  border-top: 1px solid var(--steel);
  color: var(--silver);
  font-size: 13px;
  margin-top: 20px;
  padding-top: 16px;
}

.site-footer {
  background: var(--surface);
  color: var(--ink);
}

.footer-grid {
  display: grid;
  gap: 24px;
  padding-bottom: 28px;
  padding-top: 32px;
}

.footer-brand {
  background: var(--ink);
  color: #fff;
  padding: 16px;
}

.footer-brand img {
  display: block;
  height: auto;
  max-width: 280px;
  width: 100%;
}

.footer-brand p {
  color: var(--silver);
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.footer-grid h2 {
  color: var(--steel);
  font-size: 12px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.footer-grid a {
  display: block;
  margin-top: 4px;
  padding: 4px 0; /* 24 px minimum target on a phone */
}

.footer-small .footer-legal {
  overflow-wrap: anywhere;
}

.footer-small .footer-credits {
  color: inherit;
  text-decoration: underline;
}

.footer-small {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 16px;
  padding-top: 16px;
}

.empty-state {
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  grid-column: 1 / -1;
  list-style: none;
  padding: 16px;
}

.button {
  border: 1px solid var(--red);
  color: var(--red);
  display: inline-block;
  font-weight: 700;
  margin: 12px 0;
  padding: 12px 16px;
}

.crumbs {
  color: var(--muted);
  font-size: 13px;
  margin-top: 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row a {
  background: #fff;
  border: 1px solid var(--line);
  display: block;
  padding: 12px 16px;
}

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

td,
th {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.search-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.search-panel input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.search-start {
  display: grid;
  gap: 24px;
}

.search-start-categories {
  min-width: 0;
}

.search-no-results-categories {
  margin-top: 24px;
}

.search-empty-state {
  display: grid;
  gap: 10px;
}

.search-empty-state h2,
.brands-page .empty-state h2 {
  color: var(--ink);
  font-size: 18px;
  margin: 0;
}

.search-empty-state a {
  margin-top: 0;
}

.not-found-page .category-heading {
  max-width: 760px;
}

.not-found-search {
  max-width: 760px;
}

.recovery-links {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin-top: 20px;
  max-width: 760px;
}

.recovery-links a {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  text-transform: uppercase;
}

.recovery-links a:hover,
.recovery-links a:focus {
  border-color: var(--red);
  color: var(--red);
}

.az-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.az-index a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 8px;
}

.az-index a:hover,
.az-index a:focus {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.brand-groups {
  display: grid;
  gap: 28px;
}

.brand-group {
  min-width: 0;
}

.brand-group h2 {
  border-bottom: 2px solid var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  margin: 0 0 12px;
  padding-bottom: 6px;
}

.brand-directory {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.brand-card {
  min-width: 0;
}

.brand-card a {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  height: 100%;
  padding: 12px;
}

.brand-card__media {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 84px;
  padding-bottom: 12px;
}

.brand-card__media img {
  max-height: 48px;
  object-fit: contain;
}

.brand-card__name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-card__count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  grid-column: 1;
}

.brand-card b {
  color: var(--red);
  grid-column: 2;
  grid-row: 2 / span 2;
}

.brand-card a:hover,
.brand-card a:focus {
  background: var(--surface);
}

.established-brands,
.more-catalogue-brands {
  display: grid;
  gap: 16px;
}

.more-catalogue-brands {
  margin-top: 32px;
}

.established-brands h2,
.more-catalogue-brands h2 {
  border-bottom: 2px solid var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  padding-bottom: 6px;
}

.established-brand-grid,
.additional-brand-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.established-brand-card,
.additional-brand-card {
  background: #fff;
  border: 1px solid var(--line);
  min-width: 0;
}

.established-brand-card__body,
.additional-brand-card a {
  align-items: center;
  color: var(--ink);
  display: grid;
  gap: 8px;
  height: 100%;
  min-height: 128px;
  min-width: 0;
  padding: 16px;
  position: relative;
  text-align: center;
}

a.established-brand-card__body,
.additional-brand-card a {
  border-bottom: 2px solid transparent;
  transition: background .16s ease, border-color .16s ease;
}

a.established-brand-card__body:hover,
a.established-brand-card__body:focus,
.additional-brand-card a:hover,
.additional-brand-card a:focus {
  background: var(--surface);
  border-bottom-color: var(--red);
}

.established-brand-card__body--static {
  cursor: default;
}

.established-brand-card__media,
.additional-brand-card__media {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 62px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.established-brand-card__media img,
.additional-brand-card__media img {
  display: block;
  height: auto;
  margin: auto;
  max-height: 58px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.established-brand-card__fallback,
.additional-brand-card__fallback,
.established-brand-card__name,
.additional-brand-card__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: normal;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  width: 100%;
  word-break: normal;
}

.established-brand-card__name,
.additional-brand-card__name {
  color: var(--steel);
  font-size: 12px;
}

.established-brand-card__fallback,
.additional-brand-card__fallback {
  text-transform: none;
  width: auto;
}

.established-brand-card__count,
.additional-brand-card__count {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.established-brand-card b,
.additional-brand-card b {
  color: var(--red);
  font-size: 16px;
  line-height: 1;
}

.brand-heading {
  align-items: start;
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
  padding-top: 28px;
}

.brand-heading h1 {
  border-bottom: 2px solid var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 40px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  padding-bottom: 8px;
}

.brand-heading p:last-child {
  color: var(--muted);
  margin: 12px 0 0;
}

.brand-heading__logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
  min-height: 112px;
  padding: 20px;
}

.brand-heading__logo img {
  max-height: 72px;
  object-fit: contain;
}

.brand-heading.brand-heading--compact {
  align-items: center;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 12px;
  padding-top: 12px;
}

.brand-heading--compact .brand-heading__logo {
  min-height: 0;
  padding: 8px 12px;
  width: 120px;
}

.brand-heading--compact .brand-heading__logo img {
  max-height: 40px;
}

@media (min-width: 720px) {
  .brand-heading.brand-heading--compact {
    grid-template-columns: minmax(0, 1fr) 180px;
    padding-bottom: 16px;
    padding-top: 18px;
  }

  .brand-heading--compact .brand-heading__logo {
    width: auto;
  }

  .brand-heading--compact .brand-heading__logo img {
    max-height: 48px;
  }
}

.brand-toolbar {
  align-items: stretch;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.brand-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-category-nav a {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  min-height: 40px;
  padding: 10px 12px;
}

.brand-category-nav a[aria-current="true"],
.brand-category-nav a:hover,
.brand-category-nav a:focus {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.brand-category-nav span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.brand-category-nav a[aria-current="true"] span,
.brand-category-nav a:hover span,
.brand-category-nav a:focus span {
  color: #fff;
}

.info-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.info-panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px;
}

.info-panel h2 {
  font-size: 18px;
  margin: 12px 0 4px;
}

.info-panel p {
  color: var(--steel);
  margin: 0;
}

.info-list {
  color: var(--steel);
  margin: 0;
  padding-left: 20px;
}

.info-list li + li {
  margin-top: 8px;
}

/* Delivery & Collection page ------------------------------------------- */

.btn-secondary,
.btn-ghost {
  align-items: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
  text-transform: uppercase;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--ink);
  color: #fff;
}

.btn-ghost {
  border-color: #fff;
  color: #fff;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: #fff;
  color: var(--ink);
}

.delivery-hero__lede {
  color: var(--steel);
  margin: 10px 0 0;
  max-width: 56ch;
}

.delivery-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.delivery-hero__actions .btn-primary {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.delivery-hero.has-map {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .delivery-hero.has-map {
    align-items: stretch;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

.delivery-section-title,
.delivery-spec h2,
.delivery-steps h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  margin: 24px 0 12px;
}

.delivery-option {
  display: grid;
  align-content: start;
  gap: 8px;
  justify-items: start;
  min-width: 0;
}

.delivery-option h3 {
  font-size: 17px;
  margin: 8px 0 0;
}

.delivery-option p,
.delivery-option__address {
  color: var(--steel);
  margin: 0;
  overflow-wrap: anywhere;
}

.delivery-option .delivery-icon {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
}

.delivery-option .delivery-option__price {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.delivery-option__price span {
  display: block;
  font-size: 13px;
  font-weight: 400;
}

.delivery-option .delivery-option__detail {
  font-size: 13px;
}

.delivery-option__address {
  font-style: normal;
  font-weight: 700;
}

.delivery-icon {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--red);
  display: block;
  height: 54px;
  padding: 9px;
  width: 54px;
}

.delivery-icon svg {
  display: block;
  fill: none;
  height: 100%;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2;
  width: 100%;
}

.delivery-icon__body {
  stroke: var(--charcoal);
}

.delivery-icon__accent {
  stroke: var(--red);
}

.delivery-spec {
  margin-bottom: 28px;
}

.delivery-spec__grid {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.delivery-spec__item {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 0;
}

.delivery-spec__item dt {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.delivery-spec__item dd {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.collection-panel {
  background: var(--ink);
  color: #fff;
  margin-bottom: 28px;
  padding: 20px 16px;
}

.collection-panel h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  margin: 2px 0 0;
}

.collection-panel .eyebrow {
  color: var(--silver);
}

.collection-panel__address {
  font-size: 16px;
  font-style: normal;
  margin: 10px 0 0;
  max-width: 44ch;
  overflow-wrap: anywhere;
}

.collection-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.collection-panel__actions .btn-primary {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.delivery-steps {
  margin-bottom: 28px;
}

.delivery-steps__list {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.delivery-steps__item {
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  min-width: 0;
  padding: 14px 16px;
}

.delivery-steps__number {
  background: var(--red);
  color: #fff;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  height: 26px;
  line-height: 26px;
  text-align: center;
  width: 26px;
}

.delivery-steps__item h3 {
  font-size: 17px;
  margin: 10px 0 4px;
}

.delivery-steps__item p {
  color: var(--steel);
  margin: 0;
}

.delivery-cta {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 32px;
  padding: 20px 16px;
}

.delivery-cta h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  margin: 0;
}

.delivery-cta p {
  color: var(--steel);
  margin: 8px 0 0;
  max-width: 54ch;
}

.delivery-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delivery-cta__actions .btn-primary,
.delivery-cta__actions .btn-ghost {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.delivery-cta__actions .btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.delivery-cta__actions .btn-ghost:hover,
.delivery-cta__actions .btn-ghost:focus {
  background: var(--ink);
  color: #fff;
}

/* Contact & visit us page ---------------------------------------------- */

.contact-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-option h2 {
  margin-top: 0;
}

.contact-option__value {
  color: var(--ink);
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.info-panel .contact-option__value {
  color: var(--ink);
}

.contact-option__action,
.contact-product__actions a {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  text-align: center;
}

/* Each panel's action sits on its bottom edge, so the three line up. */
.contact-option__action {
  align-self: flex-start;
  margin-top: auto;
}

.contact-option > :nth-last-child(2) {
  margin-bottom: 8px;
}

.contact-product {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.contact-product h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

.contact-product p {
  color: var(--steel);
  margin: 0;
  max-width: 62ch;
}

.contact-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Search suggestions (static/js/search-suggest.js): a plain list under the field, above the page, no shadow.
   Each option is a full 44 px row; the highlighted one is marked by a red edge, not colour alone. */
.has-search-suggest {
  position: relative;
}

.search-suggest {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 2px solid var(--red);
  color: var(--ink);
  left: 0;
  list-style: none;
  margin: 0;
  max-height: min(60vh, 440px);
  overflow-y: auto;
  padding: 4px 0;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
}

.search-suggest__option {
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 9px 12px;
}

.search-suggest__option[aria-selected="true"],
.search-suggest__option:hover {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--red);
}

.search-suggest__main {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.search-suggest__detail {
  color: var(--muted);
  font-size: 12px;
}

.search-suggest__option--search {
  border-top: 1px solid var(--line);
}

.search-suggest__option--search .search-suggest__main {
  color: var(--red);
  font-weight: 700;
}

/* Contact hero: title and counter details beside the premises map. */
.contact-location {
  display: grid;
  gap: 16px;
  /* One track no wider than the page: the map's ratio and minimum height must
     not push a 320 px phone sideways. */
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 24px;
  scroll-margin-top: 12px;
}

.contact-location__copy {
  min-width: 0;
}

.contact-location h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.contact-location__details p {
  color: var(--steel);
  margin: 0 0 8px;
}

.contact-location__details p a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-location__address {
  color: var(--ink);
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.contact-location__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.contact-location__actions a {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
}

/* The premises map (_location_map.html): our own drawing, shown at its true size and centred on the pin, so a
   bigger panel shows more streets rather than bigger ones and the labels stay readable on any screen. The whole
   map is the Get directions link; the OpenStreetMap credit sits in its top corner, outside that link, clear of the button on a 320 px phone. */
.location-map {
  background: #F2F1ED; /* the map's own land colour, so a panel larger than the drawing has no seam */
  border: 1px solid var(--line);
  height: 260px;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.location-map__link {
  color: var(--ink);
  inset: 0;
  position: absolute;
  text-decoration: none;
}

.location-map__link img {
  display: block;
  height: 100%;
  object-fit: none;
  object-position: 50% 50%;
  width: 100%;
}

.location-map__action {
  background: #fff;
  bottom: 12px;
  left: 12px;
  min-height: 44px;
  position: absolute;
}

.location-map__link:hover .location-map__action,
.location-map__link:focus-visible .location-map__action {
  background: var(--ink);
  color: #fff;
}

.location-map__link:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

.location-map__credit {
  background: rgba(255, 255, 255, .85);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  padding: 2px 6px;
  position: absolute;
  right: 0;
  top: 0;
}

.location-map__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 720px) {
  .info-grid.contact-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Only one of phone and email confirmed: it takes the whole row. */
  .contact-option:only-child {
    grid-column: 1 / -1;
  }

  /* Two columns only when the premises map is there (has-map, set by the template). */
  .contact-location.has-map {
    align-items: stretch;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .location-map {
    height: auto;
    min-height: 320px;
  }
}

.product-page {
  background: var(--panel);
  padding-bottom: 40px;
}

.product-identity {
  padding-bottom: 20px;
  padding-top: 28px;
}

.product-identity h1 {
  border-bottom: 2px solid var(--red);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 40px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  padding-bottom: 8px;
}

.product-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  gap: 8px 12px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.product-meta a,
.product-meta span {
  color: var(--ink);
  font-weight: 700;
}

.product-detail-grid {
  display: grid;
  gap: 20px;
}

.product-media-panel {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
  min-height: 280px;
  padding: 24px;
}

.product-media-panel > img {
  max-height: 420px;
  object-fit: contain;
}

.product-media-panel .product-image-placeholder {
  gap: 18px;
}

.product-media-panel img.product-image-placeholder__logo {
  max-height: 210px;
  max-width: 250px;
}

.product-media-panel .product-image-placeholder__message {
  font-size: 16px;
}

.product-buybox {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding: 16px;
}

.product-price {
  display: grid;
  font-variant-numeric: tabular-nums;
  gap: 4px;
}

.product-price .vat-price {
  color: var(--red);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.product-price .vat-price small {
  font-size: 15px;
}

.product-pack {
  color: var(--steel);
  font-weight: 700;
  margin: 0;
}

.product-stock {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.product-stock > span:not(.badge) {
  color: var(--muted);
  font-size: 13px;
}

.product-action {
  display: grid;
  gap: 8px;
}

.product-action label {
  display: grid;
  gap: 4px;
}

.product-action label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-action input {
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 40px;
  padding: 0 8px;
}

.product-action .btn-primary,
.product-help-link {
  text-align: center;
  width: 100%;
}

/* One red action in the buybox: the help link is a text link under it, never a second outlined button. */
.product-help-link {
  background: none;
  border: 0;
  color: var(--ink);
  display: inline-block;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: 100%;
}

.product-help-link:hover,
.product-help-link:focus-visible {
  color: var(--red-deep);
}

/* A product's options, in the buybox of its product and enquiry pages: native
   radios, one square row per option. The row is the label, so the whole row
   is the tap target; the chosen row gets a heavier red border as well as the
   filled radio, so the state never relies on colour alone. */
.product-options {
  display: grid;
  gap: 14px;
}

.variation-options {
  border: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.variation-options__legend {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 0;
  text-transform: uppercase;
}

.variation-options__filter {
  color: var(--steel);
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  text-transform: uppercase;
}

.variation-options__filter[hidden],
.variation-option[hidden] {
  display: none;
}

.variation-options__filter input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-size: 16px;
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

.variation-options__status,
.variation-options__empty {
  color: var(--steel);
  font-size: 12px;
  line-height: 1.3;
  margin: 0;
}

.variation-options__list {
  display: grid;
  gap: 6px;
  grid-auto-rows: max-content;
  max-height: clamp(260px, 42vh, 420px);
  overflow-y: auto;
  padding: 2px 8px 2px 2px;
  scrollbar-color: var(--steel) #fff;
}

.variation-option {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  column-gap: 10px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 52px;
  padding: 8px 10px;
  row-gap: 4px;
}

.variation-option input {
  accent-color: var(--red);
  align-self: center;
  grid-column: 1;
  grid-row: 1 / span 2;
  height: 18px;
  margin: 0;
  width: 18px;
}

.variation-option__main,
.variation-option__state {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.variation-option__main {
  grid-column: 2;
  grid-row: 1;
}

.variation-option__label {
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.variation-option__sku {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.variation-option__state {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  grid-column: 2;
  grid-row: 2;
  text-align: left;
}

.variation-option__price .vat-price {
  color: var(--red);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.variation-option__price .vat-price small {
  font-size: 11px;
}

.variation-option .badge {
  font-size: 10px;
  padding: 2px 6px;
  white-space: normal;
}

.variation-option:hover {
  border-color: var(--steel);
}

.variation-option:has(input:checked) {
  background: var(--surface);
  border: 2px solid var(--red);
  padding: 7px 9px;
}

.variation-option:has(input:focus-visible) {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.variation-option:has(input:disabled) {
  cursor: default;
}

.variation-options .errorlist {
  color: var(--red-deep);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}

.product-action-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.product-help-link {
  margin: 0;
}

.product-stripe {
  margin: 28px 0;
}

.product-section {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.product-section .section-heading {
  margin-bottom: 16px;
}

.product-copy {
  color: var(--steel);
  max-width: 820px;
}

.product-copy p {
  margin-top: 0;
}

.product-empty-note {
  color: var(--muted);
  margin: 0;
}

.variant-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.spec-table {
  background: #fff;
  width: 100%;
}

.spec-table th,
.spec-table td {
  vertical-align: top;
}

.spec-table tbody,
.spec-table tr,
.spec-table th,
.spec-table td {
  display: block;
}

.spec-table tr {
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.spec-table th {
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--line);
}

.spec-table td {
  border: 0;
}

.spec-table th {
  color: var(--steel);
}

.spec-table td {
  overflow-wrap: anywhere;
}

.product-section--split {
  display: grid;
  gap: 20px;
}

.product-section--split h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.product-section--split p {
  color: var(--steel);
  margin: 0;
}

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

.staff-app {
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}

.staff-shell {
  margin: 0 auto;
  max-width: 1280px;
  padding-left: 16px;
  padding-right: 16px;
  width: 100%;
}

.staff-header {
  background: var(--ink);
  color: #fff;
}

.staff-header__inner {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 40px;
  min-height: 64px;
  padding-bottom: 10px;
  padding-top: 10px;
}

.staff-brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  min-width: 0;
}

.staff-brand img {
  height: 36px;
  width: 36px;
}

.staff-brand span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.staff-brand strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
}

.staff-brand small {
  color: var(--silver);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-nav-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--steel);
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.staff-nav-toggle span[aria-hidden="true"],
.staff-nav-toggle span[aria-hidden="true"]::before,
.staff-nav-toggle span[aria-hidden="true"]::after {
  background: #fff;
  content: "";
  display: block;
  height: 2px;
  width: 18px;
}

.staff-nav-toggle span[aria-hidden="true"]::before {
  transform: translateY(-6px);
}

.staff-nav-toggle span[aria-hidden="true"]::after {
  transform: translateY(4px);
}

.staff-header__actions {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.staff-header__actions > a {
  background: transparent;
  border: 1px solid var(--steel);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 9px 10px;
  text-transform: uppercase;
}

.staff-header__actions > a:hover,
.staff-header__actions > a:focus {
  border-color: var(--red);
  color: #fff;
}

.staff-header__actions form {
  margin: 0;
}

.staff-user {
  align-items: center;
  color: var(--silver);
  display: inline-flex;
  font-size: 13px;
  min-height: 36px;
  overflow-wrap: anywhere;
}

.staff-nav {
  background: var(--charcoal);
  border-top: 1px solid var(--steel);
  color: #fff;
  display: block;
}

.staff-nav.is-enhanced:not(.is-open),
.staff-js .staff-nav:not(.is-open) {
  display: none;
}

.staff-nav__inner {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
  padding-top: 8px;
}

.staff-nav a {
  border-left: 3px solid transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  text-transform: uppercase;
}

.staff-nav a[aria-current="page"],
.staff-nav a:hover,
.staff-nav a:focus {
  background: #fff;
  border-left-color: var(--red);
  color: var(--ink);
}

.staff-main {
  min-height: calc(100vh - 64px);
}

.staff-page {
  display: grid;
  gap: 20px;
  padding-bottom: 40px;
  padding-top: 28px;
}

.staff-page__header {
  min-width: 0;
}

/* The installed app's own Back (templates/ops/base.html), in a row with the page's heading: page navigation, so it
   sits on the page beside what it leaves, not in the bar above. Only placed in the installed app. */
.staff-page-title {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.staff-page-title h1 {
  min-width: 0;
}

.staff-back {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.staff-back:hover,
.staff-back:focus-visible {
  border-color: var(--red);
  color: var(--ink);
}

.staff-page__header h1,
.staff-auth h1 {
  border-bottom: 2px solid var(--red);
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-style: italic;
  line-height: 1;
  margin: 0;
  max-width: min(100%, calc(100vw - 32px));
  overflow-wrap: break-word;
  padding-bottom: 8px;
  width: 100%;
}

.staff-page__header p:last-child,
.staff-auth__panel > p:last-of-type {
  color: var(--steel);
  margin: 12px 0 0;
  max-width: min(720px, calc(100vw - 32px));
}

.staff-panel {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
}

.staff-panel__heading h2,
.staff-empty h2 {
  font-size: 18px;
  margin: 0;
}

.staff-panel__heading p,
.staff-empty p {
  color: var(--muted);
  margin: 4px 0 0;
}

.staff-panel__heading--split {
  align-items: start;
  display: grid;
  gap: 12px;
}

/* Orders: one workflow shell on every viewport. The five-section nav becomes
   the installed-app bottom dock on phones and compact tabs above it. */
.orders-page,
.order-detail {
  min-width: 0;
}

.order-cards {
  display: grid;
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.order-filter-nav a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--steel);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 44px;
  padding: 9px 11px;
  text-decoration: none;
}

.order-filter-nav a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.order-source-filter {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.order-source-filter label {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
}

.order-source-filter select {
  border: 1px solid var(--line);
  font: inherit;
  min-height: 44px;
  padding: 0 10px;
}

.order-cards a {
  border: 1px solid var(--line);
  border-radius: .45rem;
  color: inherit;
  display: grid;
  gap: .3rem;
  min-width: 0;
  padding: .9rem;
  text-decoration: none;
}

.order-card__head,
.order-workflow__header,
.order-next-action__heading {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.order-workflow__header > div {
  flex: 1 1 auto;
  min-width: 0;
}

.staff-page__header.order-workflow__header h1 {
  max-width: 100%;
  width: auto;
}

.order-card__next {
  color: var(--muted);
}

.order-mode {
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: .16rem .42rem;
  width: fit-content;
}

.order-mode--test {
  background: #fff0bd;
  color: #634900;
}

.order-mode--live {
  background: #ffd8d5;
  color: #811c16;
}

.order-warning,
.order-danger {
  color: #8a201a;
  font-weight: 700;
}

.order-workflow__status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.order-workflow__status span {
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 7px;
}

.order-workflow__body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.order-section-nav {
  background: #fff;
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -5px 18px rgb(0 0 0 / 12%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  left: 0;
  padding: 0 0 env(safe-area-inset-bottom);
  position: fixed;
  right: 0;
  z-index: 40;
}

.order-section-nav a {
  align-items: center;
  border-top: 3px solid transparent;
  color: var(--steel);
  display: flex;
  flex-direction: column;
  font-size: 10px;
  font-weight: 700;
  gap: 2px;
  justify-content: center;
  min-height: 58px;
  min-width: 0;
  padding: 4px 1px;
  position: relative;
  text-decoration: none;
}

.order-section-nav a[aria-current="page"] {
  background: var(--surface);
  border-top-color: var(--red);
  color: var(--ink);
}

.order-section-nav svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.order-section-nav__badge {
  align-items: center;
  background: var(--red);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 9px;
  height: 16px;
  justify-content: center;
  min-width: 16px;
  padding: 0 4px;
  position: absolute;
  right: calc(50% - 22px);
  top: 3px;
}

.order-detail {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.order-summary-grid,
.order-facts,
.order-action-facts {
  display: grid;
  gap: .75rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.order-summary-grid div,
.order-facts div,
.order-action-facts div {
  min-width: 0;
}

.order-summary-grid dt,
.order-facts dt,
.order-action-facts dt,
.order-line-list dt {
  color: var(--muted);
  font-size: .78rem;
}

.order-summary-grid dd,
.order-facts dd,
.order-action-facts dd,
.order-line-list dd {
  margin: .2rem 0 0;
  overflow-wrap: anywhere;
}

.order-summary-grid div:nth-child(5),
.order-summary-grid div:last-child:nth-child(9) {
  grid-column: span 2;
}

.order-next-action {
  border-top: 4px solid var(--red);
}

/* A blocking decision must fit above the mobile dock, not follow its detail. */
.order-next-action > .order-next-action__heading { order: -3; }
.order-next-action > form,
.order-next-action > .btn-primary,
.order-next-action > .order-next-action__buttons { order: -2; }
.order-next-action button,
.order-next-action .btn-primary,
.order-next-action .btn-secondary { min-height: 44px; }
/* Review steps open from links styled as buttons (FS-25): centred like the buttons they replaced. */
.order-next-action a.btn-primary,
.order-next-action a.btn-secondary {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-align: center;
}

@media (max-width: 719px) {
  .order-detail[data-order-section="home"] { padding-top: 16px; gap: 12px; }
  .order-detail[data-order-section="home"] .order-workflow__header h1 { font-size: 30px; }
  .order-next-action { gap: 12px; }
  .order-next-action__heading { flex-wrap: wrap; gap: 6px; }
  .order-next-action__heading h2 { font-size: 20px; line-height: 1.2; }
}

.order-next-action--none,
.order-next-action--checkout,
.order-next-action--waiting-payment {
  border-top-color: var(--ok);
}

.order-next-action h2,
.order-next-action p,
.order-next-action .staff-eyebrow {
  margin: 0;
}

.order-attention-mark {
  background: #fff0f0;
  color: var(--red-deep);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
  text-transform: uppercase;
}

.order-next-action__buttons,
.order-dispatch-form,
.order-next-action form {
  display: grid;
  gap: 10px;
}

.order-fulfilment-form form,
.order-fulfilment-form form > div {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.order-fulfilment-form form > div:has(input[type="radio"]),
.order-fulfilment-form form > div:has(input[type="checkbox"]) {
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr);
}

.order-fulfilment-form form > div:has(input[type="radio"]) > label,
.order-fulfilment-form form > div:has(input[type="checkbox"]) > label {
  grid-column: 1 / -1;
}

.order-fulfilment-form form ul {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-fulfilment-form form ul label {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 44px;
}

.order-fulfilment-form input:not([type="radio"]):not([type="checkbox"]),
.order-detail input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.stock-history input,
.stock-history select,
.order-fulfilment-form select,
.order-fulfilment-form textarea {
  min-height: 44px;
  min-width: 0;
  width: 100%;
}

.order-fulfilment-form textarea {
  min-height: 96px;
}

.order-fulfilment-form button,
.order-entry button {
  min-height: 44px;
}

.order-detail label:has(input[type="checkbox"]),
.stock-history label {
  display: block;
  min-height: 44px;
}

.order-entry form,
.stock-history form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.order-entry,
.stock-history {
  overflow-wrap: anywhere;
}

.stock-history .stock-movements {
  list-style: none;
  padding: 0;
}

.order-fulfilment-form .helptext {
  color: var(--muted);
  font-size: 12px;
}

.order-next-action__buttons .btn-secondary,
.order-next-action > .btn-primary,
.order-next-action > .btn-secondary {
  width: fit-content;
}

.order-line-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-line-list > li {
  border: 1px solid var(--line);
  min-width: 0;
  padding: 12px;
}

.order-line-list h3 {
  font-size: 15px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.order-line-list h3 span {
  color: var(--steel);
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 2px;
}

.order-line-list dl {
  display: grid;
  gap: 9px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.safe-id {
  font-family: ui-monospace, monospace;
  font-size: .82rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-payment-link {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.order-payment-link input {
  min-width: 0;
  width: 100%;
}

.order-payment-problem {
  border-left: 3px solid var(--red);
  padding-left: 8px;
}

.order-history {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-history li {
  border-left: 3px solid var(--line);
  padding: 6px 0 6px 12px;
}

.order-history li div {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-history span {
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 720px) {
  .order-detail {
    padding-bottom: 40px;
  }

  .order-section-nav {
    border: 1px solid var(--line);
    box-shadow: none;
    position: static;
  }

  .order-section-nav a {
    border-left: 1px solid var(--line);
    border-top: 3px solid transparent;
    flex-direction: row;
    font-size: 12px;
    gap: 7px;
    min-height: 48px;
    padding: 7px 10px;
  }

  .order-section-nav a:first-child {
    border-left: 0;
  }

  .order-section-nav a[aria-current="page"] {
    border-top-color: var(--red);
  }

  .order-section-nav__badge {
    position: static;
  }

  .order-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .order-summary-grid div:nth-child(5) {
    grid-column: span 2;
  }

  .order-summary-grid div:last-child:nth-child(9) {
    grid-column: auto;
  }

  .order-line-list dl {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .order-section-nav a {
    font-size: 9px;
  }

  .order-section-nav svg {
    height: 18px;
    width: 18px;
  }
}

.staff-action-link,
.staff-secondary-link {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 10px;
  text-transform: uppercase;
  width: fit-content;
}

.staff-action-link:hover,
.staff-action-link:focus,
.staff-secondary-link:hover,
.staff-secondary-link:focus {
  border-color: var(--red);
  color: var(--red);
}

.staff-metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-metric {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  min-height: 112px;
  min-width: 0;
  padding: 12px;
}

.staff-metric span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-metric strong {
  font-family: var(--font-display);
  font-size: 34px;
  font-style: italic;
  line-height: 1;
}

.staff-metric__links {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-metric__links a {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.staff-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merchandising-homepage__links {
  margin-top: 16px;
}

.merchandising-homepage__list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.merchandising-homepage__item {
  overflow-wrap: anywhere;
}

.merchandising-homepage__item form {
  margin: 0;
}

.staff-search-form {
  display: grid;
  gap: 8px;
}

.staff-filter-form {
  align-items: end;
  display: grid;
  gap: 10px;
}

.staff-filter-field {
  display: grid;
  gap: 6px;
}

.staff-filter-field label {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-search-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.staff-filter-field input,
.staff-filter-field select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

.staff-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.staff-filter-tabs a {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  gap: 6px;
  padding: 7px 10px;
  text-decoration: none;
}

.staff-filter-tabs a[aria-current="true"] {
  border-color: var(--red);
  color: var(--red);
}

.staff-filter-tabs span {
  color: var(--steel);
  font-size: 0.85rem;
}

.staff-inline-decision-form {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
}

.staff-inline-decision-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  min-height: 40px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.staff-alert-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-alert-list li {
  align-items: center;
  border: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
}

.staff-alert-list span {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
}

.staff-alert-list strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.staff-results-bar span,
.staff-empty-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.staff-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.staff-table {
  background: #fff;
  min-width: 720px;
}

.staff-table th {
  color: var(--steel);
  font-size: 12px;
  text-transform: uppercase;
}

.staff-table td {
  color: var(--ink);
  font-size: 13px;
  vertical-align: top;
}

.staff-table td span {
  display: block;
}

.staff-table a {
  color: var(--red);
  font-weight: 700;
}

.staff-table--review {
  min-width: 980px;
}

.staff-table--products {
  min-width: 1120px;
}

.staff-table--categories,
.staff-table--brands {
  min-width: 880px;
}

.staff-table--bulk-logos {
  min-width: 760px;
}

.staff-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.staff-summary-grid > div {
  border: 1px solid var(--line);
  padding: 12px;
}

.staff-summary-grid dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-summary-grid dd {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 0;
}

.staff-summary-grid--compact dd {
  font-size: 15px;
}

.staff-import-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.staff-import-grid h3,
.staff-import-issues h3 {
  color: var(--steel);
  font-size: 13px;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.staff-import-issues {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

/* Category classification: four counts in a row, wrapping on phones. */
.staff-classification-counts {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0 0 16px;
}

.staff-classification-counts div {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.staff-classification-counts dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-classification-counts dd {
  font-size: 24px;
  font-weight: 700;
  margin: 2px 0 0;
}

.staff-classification-group {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.staff-classification-group summary {
  cursor: pointer;
  font-weight: 700;
}

.staff-inline-heading {
  display: inline;
  font-size: inherit;
}

.staff-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-inline-list li {
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: break-word;
  padding: 6px 8px;
}

.staff-subheading {
  color: var(--steel);
  font-size: 13px;
  margin: 0;
  text-transform: uppercase;
}

.staff-logo-current {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

/* One thumbnail size for every staff record table (products, brands, drafts): a picture cell is never allowed
   to set the row height. The record-row (phone) size is below. */
.staff-table .staff-logo-thumb {
  align-items: center;
  border: 1px solid var(--line);
  display: flex;
  height: 52px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.staff-table .staff-logo-thumb img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.staff-logo-current img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.staff-table--brands .staff-logo-thumb img {
  display: block;
  height: auto;
  margin: 0;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: auto;
}

.staff-logo-current {
  border: 1px solid var(--line);
  min-height: 76px;
  padding: 10px;
}

.staff-logo-current img {
  height: 56px;
  width: 96px;
}

.staff-logo-current span,
.staff-logo-fallback {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-flag {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

.staff-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-module-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-module {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 14px;
}

.staff-module:hover,
.staff-module:focus {
  border-color: var(--red);
}

.staff-module span {
  color: var(--ink);
  font-weight: 700;
}

.staff-module small {
  color: var(--steel);
  font-size: 13px;
}

.staff-auth {
  align-items: center;
  display: grid;
  min-height: calc(100vh - 64px);
  padding: 28px 16px;
}

.staff-auth__panel {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 440px;
  padding: 20px;
  width: 100%;
}

.staff-login-form,
.staff-edit-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.staff-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.staff-field label,
.staff-field__label {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-field input {
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

.staff-field select,
.staff-field textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  max-width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.staff-field select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-field textarea {
  resize: vertical;
}

.staff-field input[type="file"] {
  padding: 10px 12px;
}

.staff-help {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.staff-checkbox-field {
  align-items: center;
  display: flex;
  gap: 8px;
}

.staff-checkbox-field input {
  height: 18px;
  width: 18px;
}

.staff-checkbox-field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.product-merchandising__form { display: grid; gap: 14px; margin-top: 16px; }
.product-merchandising__fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.product-merchandising__fieldset legend { font-weight: 700; margin-bottom: 10px; }
.product-merchandising__choices,
.product-merchandising__assigned { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.product-merchandising__choice { max-width: 100%; min-width: 0; }
.product-merchandising__choice label,
.product-merchandising__assigned li {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 14px;
}
.product-merchandising__choice label:has(input:checked) { border-color: var(--ink); background: var(--surface); font-weight: 700; }
.product-merchandising__choice input { flex: none; height: 20px; margin: 0; width: 20px; }
.product-merchandising__form .btn-primary { justify-self: start; }

.staff-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.staff-form-errors,
.staff-field .errorlist {
  color: var(--red);
  font-size: 13px;
}

/* The review wizard's inline product edit. Short fields pair up so the panel
   stays a band rather than a column of eight rows; name and description take
   the full width because they are the two anyone actually types into. */
.staff-review-edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.staff-review-edit-grid .staff-field--wide {
  grid-column: 1 / -1;
}

/* An invalid field has to be findable without reading every label, and
   colour alone is not enough for that. */
.staff-review-edit-form .staff-field--invalid > input,
.staff-review-edit-form .staff-field--invalid > select,
.staff-review-edit-form .staff-field--invalid > textarea {
  border-color: var(--red);
  border-width: 2px;
}

.staff-review-edit-form .staff-field--invalid > label {
  color: var(--red);
}

.staff-form-errors .errorlist,
.staff-field .errorlist {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 719px) {
  .staff-page__header {
    max-width: calc(100vw - 32px);
    width: calc(100vw - 32px);
  }

  .staff-page__header h1,
  .staff-page__header p:last-child {
    max-width: calc(100vw - 32px);
    white-space: normal;
    width: calc(100vw - 32px);
  }
}

.staff-metric-grid--review {
  grid-template-columns: 1fr;
}

.staff-review-breakdown,
.staff-review-layout,
.staff-review-fields,
.staff-review-reason-grid,
.staff-review-confirmations,
.staff-review-brand-search {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.staff-review-breakdown h3,
.staff-review-reason-grid h3 {
  color: var(--steel);
  font-size: 12px;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.staff-review-reason-count {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  padding: 0 5px;
}

.staff-review-reasons {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-review-reasons li {
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.staff-review-reasons--blocking > li {
  border-left: 3px solid var(--red);
}

.staff-review-reasons--advisory > li {
  border-left: 3px solid var(--line);
}

.staff-review-reasons strong {
  font-size: 13px;
}

.staff-review-reasons span {
  color: var(--muted);
  font-size: 13px;
}

.staff-review-reasons small {
  color: var(--steel);
  font-size: 12px;
  line-height: 1.45;
}

.staff-table--variations {
  min-width: 940px;
}

.staff-table--variations input,
.staff-table--variations select {
  border: 1px solid var(--line);
  min-height: 38px;
  min-width: 120px;
  padding: 6px 8px;
  width: 100%;
}

/* Review wizard: one home per action ------------------------------------ */

/* Queue navigation. Ghost buttons so they read as movement, not as saving. */
.btn-ghost-staff {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.04em;
  min-height: 34px;
  padding: 0 12px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-ghost-staff:hover,
.btn-ghost-staff:focus-visible {
  border-color: var(--ink);
}

/* One action per reason, inside its own card. */
.staff-review-reason-action {
  align-self: start;
  border: 1px solid var(--red);
  color: var(--red-deep);
  font-size: 11px;
  font-weight: 700;
  justify-self: start;
  letter-spacing: 0.04em;
  margin-top: 6px;
  padding: 3px 9px;
  text-decoration: none;
  text-transform: uppercase;
  width: fit-content;
}

.staff-review-reason-action:hover,
.staff-review-reason-action:focus-visible {
  background: var(--red);
  color: #fff;
}

/* The acknowledge form sits in the card: button first, note behind a
   disclosure so the common case stays one click. */
.staff-review-ack {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.staff-review-ack__note {
  font-size: 12px;
  margin-top: 6px;
  order: 2;
  width: 100%;
}

.staff-review-ack__note summary {
  color: var(--steel);
  cursor: pointer;
  text-decoration: underline;
}

.staff-review-ack__note label {
  color: var(--steel);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 6px;
  text-transform: uppercase;
}

.staff-review-ack__note textarea {
  border: 1px solid var(--line);
  font: inherit;
  margin-top: 4px;
  padding: 6px 8px;
  width: 100%;
}

.staff-review-reason-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.staff-review-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-review-actions__secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-height: 34px;
  padding: 0 12px;
  text-transform: uppercase;
}

.staff-review-actions__secondary:hover,
.staff-review-actions__secondary:focus-visible {
  border-color: var(--ink);
}

.staff-review-actions {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding: 10px;
  position: sticky;
  z-index: 10;
}

.staff-review-complete {
  border-color: var(--red);
}

@media (min-width: 720px) {
  .site-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .staff-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .staff-header__inner {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .staff-header__actions {
    grid-column: auto;
    justify-content: end;
  }

  .staff-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .staff-panel__heading--split {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .staff-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .staff-search-form {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .staff-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto auto;
  }

  .staff-filter-form--review {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Search, status, brand, date, then the actions. */
  .staff-filter-form--enquiries {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(140px, 180px)) auto auto;
  }

  .staff-filter-form--review .staff-filter-field--wide {
    grid-column: 1 / -1;
  }

  .staff-filter-form .staff-filter-field--wide:last-of-type,
  .staff-filter-form .staff-filter-field--wide:only-of-type {
    grid-column: auto;
  }

  .staff-metric-grid--review {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .staff-review-layout {
    align-items: start;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  }

  .staff-review-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-field--wide {
    grid-column: 1 / -1;
  }

  .staff-review-reason-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .staff-page__header h1,
  .staff-auth h1 {
    font-size: 56px;
  }

  .section-heading {
    align-items: end;
    flex-direction: row;
  }

  .header-inner {
    grid-template-columns: 220px minmax(280px, 1fr);
  }

  .header-icon {
    display: none;
  }

  .site-search,
  .site-nav {
    display: flex;
  }

  .site-search {
    flex-direction: row;
    grid-column: 2;
    grid-row: 1;
  }

  .site-nav {
    flex-direction: row;
    gap: 20px;
    grid-column: 1 / -1;
  }

  .hero-stage__inner {
    padding-bottom: 20px;
    padding-top: 6px;
  }

  .hero-showcase__head {
    align-items: end;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-showcase__heading {
    grid-column: 1 / -1;
  }

  .section {
    padding: 48px 0;
  }

  .category-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .delivery-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .delivery-icon {
    height: 60px;
    padding: 10px;
    width: 60px;
  }

  .delivery-spec__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 24px;
  }

  .delivery-steps__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-panel,
  .delivery-cta {
    padding: 24px;
  }

  .delivery-cta {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .category-tile a {
    grid-template-rows: 150px auto;
  }

  .product-grid,
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid.product-grid--list,
  .products.product-grid--list {
    grid-template-columns: 1fr;
  }

  /* Beside the 260 px filter rail, three columns leave cards too narrow for
     their quantity and Enquire (139 px at 768). Two columns until 920 px. */
  .browse-layout .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-layout .product-grid--list {
    grid-template-columns: 1fr;
  }

  .category-heading h1 {
    font-size: 56px;
  }

  .search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .recovery-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brand-directory {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-heading {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .brand-heading h1 {
    font-size: 56px;
  }

  .brand-toolbar {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-identity h1 {
    font-size: 56px;
  }

  .product-detail-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  /* Exactly the panel a full-height image fills (420 + padding + border), so it never grows as one loads. */
  .product-media-panel {
    min-height: 470px;
  }

  .product-section--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-table {
    min-width: 560px;
  }

  .spec-table tbody {
    display: table-row-group;
  }

  .spec-table tr {
    border: 0;
    display: table-row;
    margin-bottom: 0;
  }

  .spec-table th,
  .spec-table td {
    border: 1px solid var(--line);
    display: table-cell;
  }

  .spec-table th {
    background: #fff;
    width: 220px;
  }

  .filter-drawer {
    display: none;
  }

  .filter-rail {
    display: block;
  }

  .browse-layout {
    align-items: start;
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .filter-panel {
    position: sticky;
    top: 16px;
  }

  .product-grid--list .product-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .product-grid--list .product-card__image {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .brand-showcase,
  .established-brand-grid,
  .additional-brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .delivery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Three confirmed claims; a placeholder never fills a fourth column. */
  .trust-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: minmax(360px, 2fr) repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  .browse-layout .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .browse-layout .product-grid--list {
    grid-template-columns: 1fr;
  }

  .staff-filter-form--review {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto auto;
  }

  .staff-filter-form--review .staff-filter-field--wide {
    grid-column: auto;
  }
}

/* The one-row desktop header (logo | search | nav) needs 260 + 360 + a
   509 px nav + gaps + padding: it fits whole from 1201 px. Below that it
   overflowed the page (1040–1095 px) or squeezed the nav until a label
   wrapped, so it starts at 1220 px; until then the two-row header from 720 px
   (logo and search, nav beneath) carries on. Everything else still switches
   at 1040 px. A wider system font (DejaVu Sans on Linux: about 483 px of
   labels) does not fit with 20 px gaps at 1220 px, so the gaps open from
   10 px there to 20 px at 1260 px, keeping every label on one line. */
@media (min-width: 1220px) {
  .header-inner {
    grid-template-columns: 260px minmax(360px, 1fr) auto;
  }

  .site-search {
    grid-column: 2;
  }

  .site-nav {
    align-items: center;
    column-gap: clamp(10px, calc(10px + (100vw - 1220px) / 4), 20px);
    grid-column: 3;
    grid-row: 1;
  }
}

@media (min-width: 1040px) {
  .product-grid,
  .products {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .hero-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: visible;
    padding: 0;
  }

  .product-grid.product-grid--list,
  .products.product-grid--list {
    grid-template-columns: 1fr;
  }

  .browse-layout .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .browse-layout .product-grid--list {
    grid-template-columns: 1fr;
  }

  .product-detail-grid {
    grid-template-columns: minmax(0, 2fr) 380px;
  }

  .brands-inner {
    align-items: start;
    column-gap: 28px;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .brand-showcase {
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .brands-all {
    align-self: start;
    grid-column: 1;
  }

  .brand-directory {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .established-brand-grid,
  .additional-brand-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .staff-metric-grid--review {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.staff-review-wizard {
  gap: 8px;
  overflow-x: hidden;
  padding-bottom: 0;
  padding-top: 10px;
}

.staff-review-workspace {
  display: grid;
  gap: 16px;
  grid-template-rows: auto;
  min-width: 0;
  /* The page scrolls, not a panel inside it. The action bar is fixed over the
     bottom of the viewport, so the last content needs room to clear it. */
  padding-bottom: 104px;
}

.staff-review-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.staff-review-header-meta span,
.staff-review-approval-note,
.staff-review-collision {
  border: 1px solid var(--line);
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  padding: 5px 7px;
  text-transform: uppercase;
}

.staff-review-approval-note {
  flex: 1 1 220px;
  text-transform: none;
}

.staff-review-collision {
  align-items: center;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  text-transform: none;
}

.staff-review-collision span {
  color: var(--steel);
}

.staff-review-nav,
.staff-review-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-detail-grid {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  margin: 16px 0 0;
}

.staff-detail-grid > div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 0;
}

.staff-detail-grid dt {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-detail-grid dd {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.staff-detail-block {
  margin-top: 18px;
}

.staff-detail-block h3 {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.staff-enquiry-message {
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 0;
  max-width: 76ch;
  overflow-wrap: anywhere;
  padding: 12px 14px;
}

@media (min-width: 720px) {
  .staff-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 24px;
  }
}

.staff-review-notice {
  background: #fff;
  border: 1px solid var(--red);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}

.staff-review-price-required {
  align-items: center;
  background: #fff8f3;
  border: 2px solid var(--warn);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  padding: 14px 16px;
}

.staff-review-price-required h2 {
  font-size: 18px;
  margin: 0;
}

.staff-review-price-required p {
  color: var(--steel);
  margin: 3px 0 0;
}

.staff-review-price-required .btn-primary {
  flex: 0 0 auto;
}

.staff-review-wizard .staff-panel {
  gap: 10px;
  padding: 12px;
}

.staff-review-wizard .staff-panel__heading h2 {
  font-size: 16px;
}

.staff-review-wizard .staff-panel__heading p {
  font-size: 13px;
  line-height: 1.3;
}

.staff-review-main {
  min-width: 0;
}

/* Review status is a section, not a card: a rule above it and its heading
   are enough. The decision cards inside it are the units. */
.staff-review-status-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 14px;
}

/* Only the groups that exist are rendered, and auto-fit collapses any track
   nothing fills: one group takes the whole width, two or three share it where
   each gets a readable measure, and a narrow screen stacks them. min() keeps
   the minimum from exceeding a phone's width. Groups keep their own height. */
.staff-review-status-panel .staff-review-reason-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.staff-review-action-grid {
  align-content: start;
}

.staff-review-action-grid .staff-action-link {
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.staff-review-notes {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-top: 10px;
}

.staff-review-notes h3,
.staff-review-dialog-form h3 {
  color: var(--steel);
  font-size: 12px;
  margin: 0;
  text-transform: uppercase;
}

.staff-review-notes ul {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.staff-review-actions {
  align-items: center;
  /* Translucent so the content behind stays readable as it scrolls under.
     Falls back to near-opaque white where backdrop-filter is unsupported. */
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--line);
  bottom: 0;
  column-gap: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  left: 0;
  margin-top: 0;
  padding: 10px 20px;
  position: fixed;
  right: 0;
  row-gap: 4px;
  z-index: 30;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .staff-review-actions {
    background: rgba(255, 255, 255, 0.97);
  }
}

.staff-review-actions .staff-review-approval-note {
  border: 0;
  color: var(--steel);
  flex: 1 1 100%;
  font-size: 12px;
  line-height: 1.25;
  margin: 0;
  order: 2;
  padding: 0;
  text-align: left;
}

.staff-review-actions > button {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.staff-review-actions > button,
.staff-review-actions > .btn-primary {
  min-height: 34px;
  padding: 6px 10px;
}

.staff-review-dialog {
  background: transparent;
  border: 0;
  color: var(--ink);
  margin: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  width: min(760px, calc(100vw - 32px));
}

.staff-review-dialog--wide {
  width: min(1040px, calc(100vw - 32px));
}

/* A form, not a table: narrower than the variations dialog so the fields
   keep a readable measure, and wide enough that none of them is a slot. */
.staff-review-dialog--form {
  width: min(680px, calc(100vw - 24px));
}

.staff-new-brand-form {
  display: grid;
  gap: 14px;
}

/* The two fields most brands do not need, set together and set back, so the
   name and the note read as the form and these read as detail. */
.staff-new-brand-form__optional {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.staff-new-brand-form__legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.staff-new-brand-form__pair {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-new-brand-form__collision {
  border-left: 3px solid var(--red);
  margin: 0;
  padding-left: 10px;
}

.staff-new-brand-form__actions {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.staff-review-dialog::backdrop {
  background: rgba(18, 18, 18, 0.58);
}

.staff-review-dialog__panel {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-width: 0;
}

.staff-review-dialog__header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 16px;
}

.staff-review-dialog__header h2 {
  font-size: 20px;
  margin: 0;
}

.staff-review-dialog__header p {
  color: var(--steel);
  margin: 4px 0 0;
}

.staff-dialog-close {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.staff-dialog-close:hover,
.staff-dialog-close:focus {
  border-color: var(--red);
  color: var(--red);
}

.staff-review-dialog-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow: auto;
  padding: 16px;
}

.staff-field-help {
  color: var(--steel);
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.staff-brand-choice,
.staff-brand-warning {
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  padding: 12px;
}

.staff-brand-choice span,
.staff-brand-choice small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-brand-choice strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.staff-brand-warning {
  border-color: var(--red);
  font-weight: 700;
  line-height: 1.45;
}

@media (min-width: 720px) {

  .staff-review-nav {
    justify-content: end;
  }
}

@media (min-width: 1000px) {
  .staff-review-workspace {
    padding-bottom: 88px;
  }

  .staff-review-main {
    align-self: start;
  }

  .staff-review-reasons {
    gap: 6px;
  }

  .staff-review-reasons li {
    gap: 3px;
    padding: 8px 12px;
  }
}

@media (max-width: 719px) {
  .staff-review-wizard,
  .staff-review-workspace {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .staff-review-wizard {
    padding-bottom: 132px;
  }

  .staff-review-main {
    max-width: 100%;
    width: 100%;
  }

  .staff-review-workspace {
    min-height: 0;
  }

  /* The action bar is fixed over the page, so the last panel needs room to
     clear it or its final rows can never be scrolled into view. */
  .staff-review-workspace {
    padding-bottom: 120px;
  }

  .staff-review-actions {
    padding: 8px 12px;
  }

  .staff-review-actions__buttons {
    width: 100%;
  }

  .staff-review-actions__buttons > * {
    flex: 1 1 0;
  }

  .staff-review-actions > button {
    padding-left: 8px;
    padding-right: 8px;
    width: 100%;
  }

  .staff-review-approval-note,
  .staff-review-actions > .btn-primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .staff-review-actions .staff-review-approval-note {
    border: 1px solid var(--line);
    padding: 6px 8px;
    text-align: left;
  }

  .staff-review-dialog {
    max-height: calc(100vh - 18px);
    max-height: calc(100dvh - 18px);
    width: calc(100vw - 18px);
  }

  .staff-review-dialog__panel {
    max-height: calc(100vh - 18px);
    max-height: calc(100dvh - 18px);
  }
}

/* ---------------------------------------------------------------------------
   Staff record pattern: list, detail and audit history shared by every module.
   Flat and opaque, zero radius, hairline borders — as the rest of the app.
   --------------------------------------------------------------------------- */

.staff-bulk-bar {
  align-items: center;
  border: 1px solid var(--line);
  border-bottom: 0;
  column-gap: 12px;
  display: flex;
  flex-wrap: wrap;
  padding: 8px 12px;
  row-gap: 8px;
}

.staff-bulk-bar select {
  border: 1px solid var(--line);
  font: inherit;
  padding: 5px 8px;
}

.staff-table__select {
  width: 36px;
}

.staff-sort {
  color: inherit;
  text-decoration: none;
}

.staff-sort:hover,
.staff-sort:focus-visible {
  text-decoration: underline;
}

.staff-sort--active {
  color: var(--red-deep);
}

.staff-record-detail {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}

.staff-record-detail--single {
  grid-template-columns: minmax(0, 1fr);
}

.staff-record-detail__main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

@media (max-width: 900px) {
  .staff-record-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

.staff-record-facts {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  margin: 0;
}

.staff-record-facts > div {
  background: var(--panel);
  padding: 8px 10px;
}

.staff-record-facts dt {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-record-facts dd {
  font-size: 14px;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.staff-record-related {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-record-related li {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding-bottom: 6px;
}

.staff-audit-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-audit-list li {
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

.staff-audit-list__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.staff-audit-list p {
  font-size: 13px;
  margin: 4px 0 0;
}

.staff-audit-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.staff-audit-changes li span {
  border: 1px solid var(--line);
  color: var(--steel);
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
}

/* Child records edited beside their parent: one bordered block per row so a
   long variation list still reads as separate records. */
.staff-inline-formset {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
}

.staff-inline-formset__intro {
  margin: 0 0 8px;
}

.staff-variation-sale {
  align-content: start;
}

.staff-variation-row label.staff-checkbox-field {
  justify-self: start;
  min-height: 44px;
}

.staff-variation-state {
  border: 1px solid var(--line);
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  justify-self: start;
  padding: 1px 6px;
  text-transform: uppercase;
}

.staff-variation-row.is-not-sold {
  background: var(--surface);
}

.staff-variation-imported,
.staff-variation-delete {
  border-top: 1px dashed var(--line);
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 6px;
}

.staff-variation-delete {
  display: grid;
  gap: 2px;
}

.staff-variation-delete label {
  color: var(--red-deep);
}

.staff-inline-formset h3 {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.staff-inline-row {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: 10px;
}

/* Work waiting, beside a nav item. Not a total: a badge that never reaches
   zero stops being read. */
.staff-nav-badge {
  background: var(--red);
  color: #fff;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
  padding: 2px 5px;
}

/* The category tree. Indentation is padding on a flat table, so the branch
   mark and the level are what carry the structure visually. */
.staff-tree-name {
  align-items: baseline;
  display: inline-flex;
  gap: 6px;
}

.staff-tree-branch {
  color: var(--silver);
}

.staff-tree-row--context td {
  color: var(--muted);
}

.staff-tree-row--context .staff-tree-name a {
  color: var(--muted);
}

.staff-tree-move {
  display: inline;
}

.staff-tree-move button {
  background: none;
  border: 0;
  color: var(--red-deep);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

/* A consequence a reviewer should read before saving, not after. */
.staff-slug-warning {
  border: 1px solid var(--warn);
  border-left-width: 3px;
  padding: 10px 12px;
}

.staff-slug-warning p {
  font-size: 13px;
  margin: 4px 0 0;
}

/* A note is prose someone typed; keep their line breaks. */
.staff-note-body {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

/* Settings, grouped. A legend rather than a heading so the grouping is in
   the markup, not only in the look. */
/* Business settings: seven sections, one at a time. Two columns of 44px
   tabs on a phone, one row on a wide screen. */
.staff-settings-nav {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 14px;
}

.staff-settings-nav a {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 44px;
  padding: 6px 10px;
  text-decoration: none;
}

.staff-settings-nav a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Three across once there is room for whole words. */
@media (min-width: 560px) {
  .staff-settings-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* As many across as fit whole words: eight sections never wrap seven and one. */
@media (min-width: 900px) {
  .staff-settings-nav {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }
}

/* View-first settings: finished values live in quiet cards. The same cards
   reserve space for an empty state, while the existing form only enters the
   flow after a deliberate Configure/Edit action. */
.staff-settings-panel {
  gap: 20px;
}

.settings-summary-grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 820px) {
  .settings-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-card {
  align-content: start;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  display: grid;
  gap: 14px;
  min-height: 176px;
  min-width: 0;
  padding: 16px;
}

.settings-card__title {
  color: var(--steel);
  font-size: 12px;
  letter-spacing: .06em;
  margin: 0;
  text-transform: uppercase;
}

.settings-card__subheading {
  font-size: 14px;
  margin: 4px 0 0;
}

.settings-values {
  display: grid;
  gap: 12px;
  margin: 0;
  min-width: 0;
}

.settings-value {
  min-width: 0;
}

.settings-value dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 2px;
}

.settings-value dd {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.settings-value__multiline {
  white-space: pre-line;
}

.settings-value__detail,
.settings-value__source {
  color: var(--steel);
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.settings-value--unconfirmed {
  border-left: 3px solid var(--warn);
  padding-left: 10px;
}

.settings-empty {
  align-content: start;
  display: grid;
  gap: 6px;
  min-height: 86px;
}

.settings-empty p {
  color: var(--steel);
  margin: 0;
}

.settings-empty .settings-empty__title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.settings-card__action {
  justify-self: start;
  margin-top: auto;
  min-height: 44px;
}

.settings-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-summary-actions .btn-secondary {
  min-height: 44px;
}

.settings-save .btn-secondary {
  min-height: 44px;
}

.settings-editor {
  min-width: 0;
}

.settings-editor__heading {
  font-size: 17px;
  margin: 0 0 4px;
}

.settings-editor:focus,
.settings-editor__heading:focus {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.staff-settings-form {
  display: grid;
  gap: 14px;
  max-width: 640px;
}

/* Editable sections: short related fields in pairs on a desktop (the view orders them so each
   pair is one row), free text and the form's warnings, errors and Save across both columns.
   One column below 900px. */
.settings-grid {
  max-width: 960px;
}

@media (min-width: 900px) {
  .settings-grid {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid > .settings-grid__wide {
    grid-column: 1 / -1;
  }
}

.settings-grid > .staff-field {
  min-width: 0;
}

/* Phones: the section's one Save stays at the bottom of the screen while its fields scroll
   past, clear of the home indicator. It sits in the form's flow, so the last field and any
   error above it are never underneath it once scrolled to; scroll-padding keeps a focused
   field clear of it too. */
@media (max-width: 719px) {
  html:has(.settings-save) {
    scroll-padding-bottom: 96px;
  }

  .settings-save {
    background: var(--panel);
    border-top: 1px solid var(--line);
    bottom: 0;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    position: sticky;
    z-index: 5;
  }

  .settings-save .btn-primary {
    width: 100%;
  }
}

/* VAT & tax: the standard rate's own control. What is in force now first, then any scheduled
   change, then the change form; the VAT number form follows under its own heading. */
.vat-rate {
  display: grid;
  gap: 14px;
  margin: 0;
  max-width: none;
}

.vat-rate__now {
  padding: 0;
}

.vat-rate__now p {
  margin: 0;
}

.vat-rate__label {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vat-rate__value {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
}

.vat-rate__since {
  color: var(--steel);
  font-size: 14px;
}

.vat-rate__scheduled {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.vat-rate__scheduled p,
.vat-rate__none {
  margin: 0;
}

.vat-rate__cancel {
  min-height: 44px;
}

.vat-rate__form {
  display: grid;
  gap: 14px;
}

.vat-rate__form-heading {
  font-size: 15px;
  margin: 4px 0 0;
}

.vat-rate__percent input {
  max-width: 160px;
}

.vat-rate__date input {
  max-width: 220px;
}

.vat-rate__date[hidden] {
  display: none;
}

.vat-rate__when {
  font-weight: 700;
}

.vat-rate__form .btn-primary {
  min-height: 44px;
}

.staff-settings-warning {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  font-size: 14px;
  padding: 12px;
}

.staff-settings-warning p,
.staff-settings-warning ul {
  margin: 0 0 8px;
}

.staff-settings-warning ul {
  padding-left: 18px;
}

.staff-settings-confirm {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 10px;
  min-height: 44px;
}

.staff-settings-confirm input {
  flex: none;
  height: 22px;
  width: 22px;
}

.staff-settings-status {
  display: grid;
  gap: 0;
  margin: 0 0 14px;
}

.staff-settings-status > div,
.staff-settings-features li {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.staff-settings-status dt,
.staff-settings-features__label {
  color: var(--steel);
  font-size: 13px;
}

.staff-settings-status dd {
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-settings-subheading {
  font-size: 15px;
  margin: 14px 0 6px;
}

.staff-settings-blockers {
  font-size: 14px;
  margin: 0 0 12px;
  padding-left: 18px;
}

.staff-settings-features {
  list-style: none;
  margin: 0 0 12px;
  max-width: 640px;
  padding: 0;
}

.staff-settings-button,
.staff-settings-form .btn-primary {
  min-height: 44px;
}

/* Business settings → Plan & features. The plan in force (and, for a platform administrator,
   the deployment's ceiling), then the three cumulative tiers side by side from 900px and
   stacked below, the optional modules, and the developer's form. Tiers that are not active are
   quiet, never styled as something to buy. */
.plan {
  display: grid;
  gap: 10px;
}

.plan-now {
  display: grid;
  gap: 10px;
  max-width: 960px;
}

@media (min-width: 720px) {
  .plan-now {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan-now__item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  padding: 12px 14px;
}

.plan-now__item--ceiling {
  border-left-color: var(--ink);
}

.plan-now__item p {
  margin: 0;
}

.plan-now__value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
}

.plan-now__tagline {
  color: var(--steel);
  font-size: 14px;
}

.plan-progression {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  margin: 0;
}

.plan-progression span {
  color: var(--steel);
}

.plan-progression span.is-active {
  border-bottom: 2px solid var(--red);
  color: var(--ink);
}

.plan-progression b {
  color: var(--silver);
}

.plan-tiers {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 4px 0 8px;
  max-width: 1120px;
  padding: 0;
}

@media (min-width: 900px) {
  .plan-tiers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.plan-tier {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 14px;
}

.plan-tier--included {
  border-top-color: var(--ink);
}

.plan-tier--active {
  border-color: var(--ink);
  border-top-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.plan-tier--available,
.plan-tier--beyond {
  background: var(--surface);
  color: var(--steel);
}

.plan-tier p,
.plan-tier h4 {
  margin: 0;
}

.plan-tier__head {
  align-items: center;
  display: flex;
  gap: 10px;
}

.plan-tier__number {
  align-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: flex;
  flex: none;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.plan-tier--active .plan-tier__number {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.plan-tier__name {
  font-size: 18px;
  line-height: 1.2;
}

.plan-tier__tagline {
  color: var(--steel);
  font-size: 13px;
}

.plan-tier__state {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-tier--active .plan-tier__state {
  color: var(--red);
}

.plan-tier__plus {
  font-size: 13px;
  font-weight: 700;
}

.plan-tier__adds {
  display: grid;
  font-size: 14px;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-tier__adds li {
  align-items: baseline;
  column-gap: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 22px;
  position: relative;
}

.plan-feature__label {
  min-width: 0;
}

/* Development status (platform administrators only): small and outlined, so it never competes with
   the plan's own state (Current plan, Included, Not active). */
.plan-impl {
  border: 1px solid;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 0 5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-impl--complete {
  border-color: #B9D6C2;
  color: var(--ok);
}

.plan-impl--partial {
  border-color: #E7C6A3;
  color: var(--warn);
}

.plan-impl--planned {
  border-color: var(--line);
  border-style: dashed;
  color: var(--muted);
}

.plan-feature__note {
  color: var(--steel);
  display: block;
  font-size: 12px;
  grid-column: 1 / -1;
  line-height: 1.35;
}

/* Completeness (platform administrators only): one line per tier, the capabilities on demand. Statuses are
   told apart by shape and word, never by colour alone. */
.plan-complete {
  border: 1px solid var(--line);
  max-width: 960px;
  padding: 10px 14px 4px;
}

.plan-complete__heading,
.plan-complete__future {
  color: var(--steel);
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.plan-complete__future {
  font-size: 12px;
}

.plan-legend {
  color: var(--steel);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 2px 14px;
  margin: 0 0 6px;
}

.plan-complete__tier {
  border-top: 1px solid var(--line);
}

.plan-complete__tier > summary {
  align-items: baseline;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  list-style: none;
  padding: 11px 0;
}

.plan-complete__tier > summary::-webkit-details-marker {
  display: none;
}

.plan-complete__tier > summary::before {
  color: var(--steel);
  content: "\25B8";
  width: 0.8em;
}

.plan-complete__tier[open] > summary::before {
  content: "\25BE";
}

.plan-complete__name {
  font-weight: 700;
}

.plan-complete__counts {
  color: var(--steel);
  font-size: 13px;
}

.plan-status {
  border: 1px solid;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding: 0 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-status--complete {
  border-color: #B9D6C2;
  color: var(--ok);
}

.plan-status--partial {
  border-color: #E7C6A3;
  color: var(--warn);
}

.plan-status--planned {
  border-color: var(--line);
  border-style: dashed;
  color: var(--muted);
}

.plan-capabilities {
  display: grid;
  font-size: 14px;
  gap: 5px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.plan-capability {
  align-items: baseline;
  column-gap: 6px;
  display: grid;
  grid-template-columns: 1.2em minmax(0, 1fr);
}

.plan-capability__mark {
  text-align: center;
}

.plan-capability--complete .plan-capability__mark {
  color: var(--ok);
}

.plan-capability--partial .plan-capability__mark {
  color: var(--warn);
}

.plan-capability--planned .plan-capability__mark,
.plan-capability--future .plan-capability__mark,
.plan-capabilities--future {
  color: var(--steel);
}

.plan-capability__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.plan-capability__text a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.plan-capability__note {
  color: var(--steel);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

/* A tick only where the plan actually includes it; elsewhere a quiet dash. */
.plan-tier__adds li::before {
  color: var(--silver);
  content: "–";
  left: 4px;
  position: absolute;
}

.plan-tier--included .plan-tier__adds li::before {
  color: var(--ok);
  content: "✓";
  font-weight: 800;
}

/* Listed by the tier but not usable in full yet: never a tick, whatever the plan (core.features.AVAILABILITY). */
.plan-tier__adds li.plan-tier__add--partial::before,
.plan-tier__adds li.plan-tier__add--planned::before {
  color: var(--steel);
  font-weight: 400;
}

.plan-tier__adds li.plan-tier__add--partial::before {
  content: "\25B3";
}

.plan-tier__adds li.plan-tier__add--planned::before {
  content: "\25CB";
}

.plan-feature__availability {
  color: var(--steel);
  font-size: 12px;
  white-space: nowrap;
}

.plan-modules {
  list-style: none;
  margin: 0 0 8px;
  max-width: 960px;
  padding: 0;
}

.plan-module {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px 16px;
  justify-content: space-between;
  padding: 10px 0;
}

.plan-module p {
  margin: 0;
}

.plan-module__text {
  min-width: 0;
}

.plan-module__name {
  font-weight: 700;
}

.plan-module__purpose,
.plan-module__entitlement {
  color: var(--steel);
  font-size: 13px;
}

.plan-module__entitlement span {
  overflow-wrap: anywhere;
}

.plan-module__status {
  display: grid;
  flex: none;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.plan-module__status--on {
  color: var(--ok);
}

.plan-module__status small {
  color: var(--steel);
  font-size: 12px;
  font-weight: 400;
}

.plan-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 8px;
  max-width: 640px;
  padding-top: 4px;
}

.plan-form__tiers {
  border: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.plan-form__tiers legend {
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.plan-form__choice {
  align-items: center;
  border: 1px solid var(--line);
  display: flex;
  font-weight: 700;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
}

.plan-form__choice:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.plan-form__choice input {
  flex: none;
  height: 20px;
  margin: 0;
  width: 20px;
}

.plan-form__confirm[hidden] {
  display: none;
}

.plan-form__module select {
  height: 44px; /* WebKit's native select does not honour min-height alone. */
  min-height: 44px;
}

.plan-form .btn-primary {
  min-height: 44px;
}

/* The link panel: the thing staff come to this page to copy. */
.staff-link-panel {
  border-color: var(--red);
}

.staff-link-copy {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-link-copy input {
  border: 1px solid var(--line);
  flex: 1 1 320px;
  font: inherit;
  min-width: 0;
  padding: 8px 10px;
}

.staff-link-copy input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

/* The image viewer. Nothing but the photo, as large as the viewport allows. */
.staff-image-dialog {
  background: transparent;
  border: 0;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  padding: 0;
  width: 100%;
}

.staff-image-dialog::backdrop {
  background: rgba(18, 18, 18, 0.85);
}

.staff-image-dialog__panel {
  align-items: center;
  display: grid;
  gap: 12px;
  height: 100%;
  justify-items: center;
  padding: 16px;
  place-content: center;
}

.staff-image-dialog__panel img {
  background: #fff;
  display: block;
  height: auto;
  /* Room for the Close control beneath it, and the padding either side. */
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  max-width: calc(100vw - 32px);
  object-fit: contain;
  width: auto;
}

.staff-image-dialog__actions {
  margin: 0;
}

.staff-image-dialog__actions button {
  background: #fff;
}

/* Inline pickers: the choice happens in the card that raised the problem. */
.staff-picker {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  position: relative;
}

.staff-picker__row {
  display: flex;
  gap: 6px;
}

.staff-picker__input {
  border: 1px solid var(--line);
  flex: 1 1 auto;
  font: inherit;
  min-width: 0;
  padding: 6px 8px;
}

.staff-picker__results {
  background: var(--panel);
  border: 1px solid var(--line);
  list-style: none;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 0;
  position: absolute;
  top: 100%;
  width: 100%;
  z-index: 5;
}

.staff-picker__option {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  justify-content: space-between;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.staff-picker__option:hover,
.staff-picker__option:focus-visible {
  background: var(--surface);
}

.staff-picker__option--fallback {
  color: var(--red-deep);
}

.staff-picker__fallbacks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.staff-picker-create {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
}

/* Bulk review: one row per group, one decision per row. */
.staff-table--bulk td {
  vertical-align: top;
}

.staff-bulk-picker {
  margin-top: 0;
  min-width: 280px;
}

.staff-bulk-row--active {
  background: var(--surface);
}

.staff-bulk-confirm {
  font-size: 12px;
}

.staff-bulk-apply[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.staff-picker__server-results {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

/* Review decisions: state, the decision taken, and the action that changes
   it. A resolved card names the outcome ("Unbranded / generic"), never the
   problem it answered. */
.staff-review-decision__label {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-review-decision strong {
  font-size: 15px;
}

.staff-review-decision__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.staff-review-decision__actions .staff-review-reason-action {
  margin-top: 4px;
}

/* Reset: quieter than choosing a brand, because it goes backwards. The
   disclosure is the confirmation; the button inside it is the answer. */
.staff-review-reset {
  font-size: 12px;
}

.staff-review-reset summary {
  color: var(--steel);
  cursor: pointer;
  margin-top: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.staff-review-reset summary:hover,
.staff-review-reset summary:focus-visible {
  color: var(--red-deep);
}

.staff-review-reset__confirm {
  border-left: 3px solid var(--red);
  display: grid;
  gap: 6px;
  justify-items: start;
  margin-top: 6px;
  padding: 4px 0 4px 10px;
}

.staff-review-reset__confirm p {
  color: var(--ink);
  font-size: 13px;
  margin: 0;
}

.staff-review-reset__button {
  background: #fff;
  border: 1px solid var(--red);
  color: var(--red-deep);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  text-transform: uppercase;
}

.staff-review-reset__button:hover,
.staff-review-reset__button:focus-visible {
  background: var(--red);
  color: #fff;
}

/* The brand dialog: one pane at a time. `hidden` has to win over the grid
   display the pane shares with every other dialog body. */
.staff-brand-pane[hidden] {
  display: none;
}

.staff-brand-pane__heading {
  font-size: 15px;
  margin: 0;
}

.staff-brand-pane__footer {
  align-items: start;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  padding-top: 12px;
}

.staff-review-dialog__current {
  color: var(--ink);
}

.staff-picker__label {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* In the dialog the results are part of the form, not a dropdown floating
   over it: the dialog body already scrolls, and a second scroll box inside
   it is the nested panel this layout exists to remove. */
.staff-review-dialog .staff-picker__results {
  max-height: none;
  overflow: visible;
  position: static;
}

.staff-review-dialog .staff-picker {
  margin-top: 0;
}

/* Secondary actions look the same whether they are links or buttons. */
.staff-review-dialog button.staff-secondary-link {
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

/* Brands the product's own text names: one click each, with the reason
   beside it so a false match is visible before it is used. */
.staff-brand-suggestions {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 6px 0 2px;
  padding: 0;
}

.staff-brand-suggestions li {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.staff-brand-suggestions form {
  margin: 0;
}

.staff-brand-suggestions__use {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  text-transform: uppercase;
}

.staff-brand-suggestions__use:hover,
.staff-brand-suggestions__use:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.staff-brand-suggestions__why {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.staff-review-reasons .staff-brand-suggestions li {
  border: 0;
  padding: 0;
}

/* ---------------------------------------------------------------------------
   Product review page: queue bar, hero (image + summary), decisions,
   supporting information. The page reads in the order a reviewer works, and
   the fixed footer is the only place a product leaves review.
   --------------------------------------------------------------------------- */

.staff-review-queuebar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.staff-review-queuebar__position {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 2px 10px;
  margin: 0;
  min-width: 0;
}

.staff-review-queuebar__position .eyebrow {
  margin: 0;
}

.staff-review-queuebar__position .muted {
  font-size: 13px;
}

/* The hero: the product on the left, what it is and what can be done to it
   on the right. One column until there is room for the image to be useful
   beside the facts rather than squeezed by them. */
.staff-review-hero {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.staff-review-hero__media {
  display: flex;
  min-width: 0;
}

/* A mount, not a gallery: the photo sits centred on a quiet ground, at its
   own proportions, never stretched or cropped. */
.staff-review-hero__image {
  align-items: center;
  background: var(--panel);
  border: 1px solid transparent;
  display: flex;
  justify-content: center;
  min-height: 200px;
  padding: 12px;
  position: relative;
  width: 100%;
}

.staff-review-hero__image img {
  display: block;
  height: auto;
  max-height: 320px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.staff-review-hero__placeholder {
  border-color: var(--line);
  padding: 0;
}

a.staff-review-hero__image {
  cursor: zoom-in;
}

a.staff-review-hero__image:hover,
a.staff-review-hero__image:focus-visible {
  border-color: var(--red);
}

a.staff-review-hero__image:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.staff-review-hero__image-hint {
  background: rgba(18, 18, 18, 0.72);
  bottom: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  position: absolute;
  right: 8px;
  text-transform: uppercase;
}

/* A missing image is a fact among the state chips, not an empty image-sized
   box: it is already a blocker in Review status, and the height is worth
   more to the decisions below. */
.staff-review-header-meta .staff-review-header-meta__missing {
  border-style: dashed;
  color: var(--red-deep);
}

.staff-review-summary {
  align-content: start;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 2px 0;
}

.staff-review-summary h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  line-height: 1.08;
  margin: 0;
  overflow-wrap: anywhere;
}

.staff-review-summary .staff-review-header-meta {
  margin-top: 0;
}

.staff-review-summary__sku {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 2px 8px;
  margin: 0;
}

.staff-review-summary__label,
.staff-review-summary__facts dt,
.staff-review-support__facts dt {
  color: var(--steel);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-review-summary__facts,
.staff-review-support__facts {
  display: grid;
  gap: 0 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  margin: 0;
}

.staff-review-summary__facts div,
.staff-review-support__facts div {
  align-content: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 0;
}

.staff-review-summary__facts dd,
.staff-review-support__facts dd {
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.staff-review-summary__facts dd[data-brand-state="undecided"] {
  color: var(--muted);
  font-style: italic;
}

.staff-review-summary__actions {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.staff-review-summary__action {
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.staff-review-summary__action--primary {
  border-color: var(--red);
  color: var(--red-deep);
}

.staff-review-summary__action:hover,
.staff-review-summary__action:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

/* Supporting information: below the decision, quieter than it. */
.staff-review-support {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 14px;
}

.staff-review-wizard .staff-review-support h2 {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.staff-review-support__facts dd {
  font-size: 14px;
}

.staff-review-support__empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.staff-review-disclosure {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.staff-review-disclosure summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.staff-review-disclosure summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.staff-review-disclosure__body {
  font-size: 14px;
  line-height: 1.5;
  max-width: 80ch;
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  .staff-review-hero {
    align-items: stretch;
    column-gap: 24px;
    grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr);
  }

  /* Big enough to read a label, small enough that the decisions below
     still start within a laptop's first screen. The cap follows the
     viewport's height, not its width: about 300px on an 800px-tall laptop,
     growing to 360px on a taller desktop, never below 260px. */
  .staff-review-hero__image img {
    max-height: clamp(260px, 38vh, 360px);
  }

  /* No image, nothing to sit beside: the summary takes the full width. */
  .staff-review-hero--no-image {
    grid-template-columns: minmax(0, 1fr);
  }

  .staff-review-summary h1 {
    font-size: 30px;
  }
}

.staff-review-summary__price {
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Catalogue list: search first, filters behind a button, active filters as
   removable chips, and a bulk bar only while something is selected.
   --------------------------------------------------------------------------- */

.staff-action-link--primary {
  border-color: var(--red);
  color: var(--red-deep);
}

/* More: occasional actions, one click away but not beside the daily ones. */
.staff-more-menu {
  position: relative;
}

.staff-more-menu > summary {
  cursor: pointer;
  list-style: none;
}

.staff-more-menu > summary::-webkit-details-marker {
  display: none;
}

.staff-more-menu > summary::after {
  content: " ▾";
}

.staff-more-menu__list {
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  min-width: 180px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
}

.staff-more-menu__list a {
  color: var(--ink);
  font-size: 13px;
  padding: 9px 12px;
  text-decoration: none;
}

.staff-more-menu__list a:hover,
.staff-more-menu__list a:focus-visible {
  background: var(--surface);
  color: var(--red-deep);
}

.staff-catalogue-toolbar {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-catalogue-search {
  display: flex;
  flex: 1 1 320px;
  gap: 8px;
  min-width: 0;
}

.staff-catalogue-search input[type="search"] {
  border: 1px solid var(--line);
  flex: 1 1 auto;
  font: inherit;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
  /* It grows to fill the row; its font-sized default width must not widen a 320px page. */
  width: 0;
}

.staff-filter-button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.04em;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.staff-filter-button:hover,
.staff-filter-button:focus-visible,
.staff-filter-button--active {
  border-color: var(--red);
  color: var(--red-deep);
}

.staff-filter-button__count {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
}

.staff-catalogue-summary {
  align-items: baseline;
  color: var(--steel);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 4px 8px;
  margin: 0;
}

.staff-catalogue-summary a {
  color: var(--steel);
  text-decoration: none;
}

.staff-catalogue-summary a strong {
  color: var(--ink);
}

/* The separator travels with the item after it, so a wrapped line never ends with a dangling "·". */
.staff-catalogue-summary__item {
  align-items: baseline;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.staff-catalogue-summary a:hover,
.staff-catalogue-summary a:focus-visible,
.staff-catalogue-summary a[aria-current="true"] {
  color: var(--red-deep);
  text-decoration: underline;
}

.staff-active-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.staff-active-filter {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--red);
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 8px;
  text-decoration: none;
}

.staff-active-filter__group {
  color: var(--steel);
  font-size: 12px;
}

.staff-active-filter:hover,
.staff-active-filter:focus-visible {
  background: var(--surface);
  color: var(--red-deep);
}

.staff-active-filters__clear {
  color: var(--steel);
  font-size: 13px;
}

/* The filter panel: a drawer on the right on a desktop, the whole width on
   a phone. The drawer scrolls as one; there is no inner scroll box. */
.staff-filter-drawer {
  border: 0;
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
  margin: 0 0 0 auto;
  max-height: none;
  max-width: 100vw;
  padding: 0;
  width: min(420px, 100vw);
}

.staff-filter-drawer::backdrop {
  background: rgba(18, 18, 18, 0.45);
}

.staff-filter-drawer__panel {
  background: var(--panel);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.staff-filter-drawer__header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.staff-filter-drawer__header h2 {
  font-size: 20px;
  margin: 0;
}

.staff-filter-drawer__form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.staff-filter-drawer__body {
  display: grid;
  gap: 18px;
  align-content: start;
  overflow-y: auto;
  padding: 16px;
}

.staff-filter-drawer__footer {
  align-items: center;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}

.staff-filter-drawer__footer button.staff-secondary-link {
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.staff-filter-group {
  border: 0;
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.staff-filter-group legend,
.staff-filter-group__legend {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  padding: 0;
  text-transform: uppercase;
}

.staff-filter-option {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 8px;
  min-height: 32px;
}

.staff-filter-option__count {
  color: var(--steel);
  font-size: 12px;
  margin-left: auto;
}

.staff-filter-group select,
.staff-filter-search input {
  border: 1px solid var(--line);
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.staff-filter-search {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.staff-filter-search button {
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.staff-filter-group__note {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
}

/* Contextual bulk bar: leads with the count, shows only what applies. */
.staff-bulk-bar--contextual {
  background: var(--panel);
  border: 1px solid var(--red);
}

.staff-bulk-bar--contextual[hidden],
.staff-bulk-bar__target[hidden] {
  display: none;
}

.staff-bulk-bar__count {
  font-size: 13px;
}

@media (max-width: 719px) {
  .staff-catalogue-search {
    flex-basis: 100%;
  }

  .staff-filter-button {
    justify-content: center;
    width: 100%;
  }
}

/* The bulk form around a record table is a grid item; without this it grows
   to the table's full width and drags the whole panel, toolbar included,
   past the edge of a phone. The table scrolls inside its own wrapper. */
[data-record-bulk],
.staff-panel > .staff-table-wrap {
  min-width: 0;
}

/* Screen-reader-only labels inside a table are absolutely positioned; with
   the scroll wrapper as their containing block they scroll with the table
   instead of widening the page. */
.staff-table-wrap {
  position: relative;
}

.staff-bulk-bar button.staff-secondary-link {
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

/* Public product enquiry. The page is the product page (identity, media,
   grid) with the enquiry form in the buybox, so only the buybox contents
   and the confirmation need rules of their own. */
/* The enquiry form, or a long list of options, makes the buybox taller than
   the image; keep the media panel at its natural product-page height instead
   of stretching to match, so the image sits where it does on the product page. */
.product-detail-grid--enquiry .product-media,
.product-detail-grid--options .product-media {
  align-self: start;
}

.enquiry-intro .eyebrow {
  margin-bottom: 6px;
}

.enquiry-intro h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-style: italic;
  line-height: 1;
  margin: 0;
}

.enquiry-intro > p:last-child {
  color: var(--steel);
  font-size: 14px;
  margin: 8px 0 0;
}

.enquiry-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding-top: 16px;
}

.form-field {
  align-content: start;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-field label {
  font-size: 13px;
  font-weight: 700;
}

.form-field__optional {
  color: var(--muted);
  font-weight: 500;
}

.form-field input,
.form-field textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 9px 12px;
  width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--ink);
}

.form-field textarea {
  height: 140px;
  resize: vertical;
}

.form-field--quantity input {
  max-width: 140px;
}

.form-field--error input,
.form-field--error textarea {
  border-color: var(--red);
  border-width: 2px;
  padding: 8px 11px;
}

.enquiry-form .errorlist {
  color: var(--red-deep);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  margin: 0;
  padding: 0;
}

.enquiry-form__alert {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  padding: 12px 14px;
}

.enquiry-form__alert p {
  font-weight: 700;
  margin: 0;
}

.enquiry-form__alert .errorlist {
  margin-top: 6px;
}

.enquiry-form__actions {
  display: grid;
  gap: 12px;
}

.enquiry-form__actions .btn-primary,
.enquiry-done__actions .btn-primary {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  width: 100%;
}

.enquiry-call {
  color: var(--steel);
  font-size: 14px;
  margin: 0;
}

.enquiry-call a {
  color: var(--red);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.enquiry-unavailable {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.enquiry-unavailable .product-empty-note {
  margin: 0;
}

/* Confirmation */
.enquiry-page {
  padding-bottom: 56px;
}

.enquiry-done {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  margin-top: 32px;
  max-width: 720px;
  padding: 24px 20px;
}

.enquiry-done h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
  line-height: 1.05;
  margin: 0;
}

.enquiry-done > p:not(.eyebrow):not(.enquiry-call) {
  color: var(--steel);
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.enquiry-done > p strong {
  color: var(--ink);
}

.enquiry-done__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 20px 0 16px;
}

.enquiry-done__secondary {
  border-bottom: 1px solid var(--red);
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 2px;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  .enquiry-done__actions .btn-primary {
    width: auto;
  }

  .enquiry-done {
    padding: 32px;
  }

  .enquiry-done h1 {
    font-size: 40px;
  }
}

/* The staff link moves into the phone menu. */
.site-nav__staff {
  display: none;
}

@media (min-width: 720px) and (max-width: 919px) {
  .utility-bar {
    font-size: 12px;
  }

  .utility-inner {
    gap: 7px;
  }

  .utility-services .utility-promo + .utility-promo::before {
    margin: 0 8px;
  }
}

/* Phones: the page reads top to bottom in its natural order — title, image,
   price and availability, then the action or enquiry form, then the details
   below — with the chrome, title, image and buybox tightened so the action
   still arrives early. The desktop composition from 720 px up is untouched. */
@media (max-width: 719px) {
  /* Contact and VAT on one row, the promises on one quiet line below. */
  .utility-inner {
    column-gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
  }

  .utility-staff {
    display: none;
  }

  .utility-contact,
  .utility-controls {
    min-height: 36px;
  }

  .utility-contact {
    grid-column: 1;
    grid-row: 1;
  }

  .utility-controls {
    grid-column: 2;
    grid-row: 1;
  }

  .utility-services {
    border-top: 1px solid rgba(255, 255, 255, .08);
    grid-column: 1 / -1;
    grid-row: 2;
    overflow: hidden;
    padding: 6px 0 7px;
  }

  .utility-services .utility-promo + .utility-promo::before {
    margin: 0 8px;
  }

  .utility-phone {
    gap: 6px;
  }

  .vat-toggle button {
    min-height: 26px;
    padding: 0 10px;
  }

  /* Compact header: logo and menu, then the search field on its own row. */
  .header-inner {
    column-gap: 8px;
    grid-template-columns: 1fr 42px;
    padding-bottom: 10px;
    padding-top: 8px;
    row-gap: 8px;
  }

  .site-logo img {
    height: 30px;
  }

  /* The whole placeholder fits beside WebKit's clear button at 320 px. Typed
     text stays 16 px, so iOS never zooms into the field. */
  .site-search input {
    padding: 0 8px 0 10px;
  }

  .site-search input::placeholder {
    font-size: 15px;
  }

  .header-icon {
    height: 42px;
    width: 42px;
  }

  /* Product and enquiry pages */
  .product-page .crumbs {
    font-size: 12px;
    margin-top: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-identity {
    padding-bottom: 14px;
    padding-top: 12px;
  }

  .product-identity .eyebrow {
    margin-bottom: 4px;
  }

  .product-identity h1 {
    font-size: 30px;
    line-height: 1.02;
    overflow-wrap: anywhere;
    padding-bottom: 6px;
  }

  .product-meta {
    font-size: 12px;
    gap: 4px 10px;
    margin-top: 8px;
  }

  /* The eyebrow already names the brand. */
  .product-meta__brand {
    display: none;
  }

  .product-detail-grid {
    gap: 12px;
  }

  .product-media-panel {
    height: 180px;
    min-height: 0;
    padding: 12px;
  }

  .product-media-panel > img {
    height: 100%;
    max-height: none;
    object-fit: contain;
    width: 100%;
  }

  .product-media-panel .product-image-placeholder {
    gap: 8px;
    padding: 12px;
  }

  .product-media-panel img.product-image-placeholder__logo {
    max-height: 90px;
    max-width: 120px;
  }

  .product-media-panel .product-image-placeholder__message {
    font-size: 12px;
  }

  /* Buybox: price and availability share a summary row where they fit;
     everything else takes a full row, in the same order as before. */
  .product-buybox {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 12px;
  }

  .product-buybox > * {
    flex: 1 1 100%;
    min-width: 0;
  }

  .product-buybox > .product-price,
  .product-buybox > .product-stock {
    flex: 0 1 auto;
  }

  .product-buybox > .product-pack,
  .product-buybox > .product-action,
  .product-buybox > .product-help-link,
  .product-buybox > .enquiry-form,
  .product-buybox > .enquiry-unavailable {
    order: 1;
  }

  .product-price .vat-price {
    font-size: 26px;
  }

  .product-price .vat-price small {
    font-size: 13px;
  }

  /* Quantity and the primary action on one row. */
  .product-action {
    align-items: end;
    column-gap: 8px;
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .product-action > :not(label):not(.btn-primary) {
    grid-column: 1 / -1;
  }

  .product-action input,
  .product-action .btn-primary {
    min-height: 44px;
    width: 100%;
  }

  .product-action .btn-primary {
    line-height: 1.2;
    padding: 6px 10px;
  }

  /* The help link opens the same enquiry as the primary button; on a phone
     one way in is enough. Where the primary action is Add to basket, it stays. */
  .product-action--enquiry ~ .product-help-link {
    display: none;
  }

  /* Enquiry buybox */
  .enquiry-intro .eyebrow {
    margin-bottom: 4px;
  }

  .enquiry-intro h2 {
    font-size: 22px;
  }

  .enquiry-intro > p:last-child {
    font-size: 13px;
    margin-top: 6px;
  }

  .enquiry-form {
    gap: 12px;
    padding-top: 12px;
  }

  .form-field textarea {
    height: 110px;
  }
}

/* The narrowest phones: the promise line drops a size so it stays on one line. */
@media (max-width: 359px) {
  .utility-bar {
    font-size: 12px;
  }

  .utility-services {
    font-size: 11px;
  }

  .utility-services .utility-promo + .utility-promo::before {
    margin: 0 6px;
  }

  .vat-toggle button {
    padding: 0 8px;
  }
}

/* Catalogue results on phones: one compact trade-catalogue row per product —
   a small contained image on the left, and name, identifiers, price,
   availability and the enquiry action on the right — instead of two squeezed
   mini desktop cards. Grid and list read the same here, so the view toggle
   steps aside; from 720 px up the cards and the toggle are untouched. Scoped to
   .product-results, so the homepage hero and other card users never change. */
@media (max-width: 719px) {
  .catalogue-page .crumbs {
    font-size: 12px;
    margin-top: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .category-heading {
    padding-bottom: 14px;
    padding-top: 12px;
  }

  .category-heading h1 {
    font-size: 30px;
    padding-bottom: 6px;
  }

  .category-heading p:last-child {
    font-size: 13px;
    margin-top: 8px;
  }

  .category-grid--children {
    margin-bottom: 16px;
  }

  .search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 12px;
  }

  .search-panel .btn-primary {
    min-height: 44px;
  }

  /* The header's search field is always on a phone's screen and already holds
     the query, so the page's own copy of it would only repeat it. */
  .search-page .search-panel {
    display: none;
  }

  .filter-drawer summary {
    min-height: 44px;
  }

  /* Cards, Grid and List differ on a phone too (Grid is two to a row), so the toggle stays: full width on
     a brand or Clearance page, beside Filter in a listing head (below). */
  .catalogue-page .view-toggle {
    display: flex;
    width: 100%;
  }

  .catalogue-page .view-toggle a {
    flex: 1 1 0;
    min-height: 44px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
  }


  .active-filters {
    gap: 6px;
    margin-bottom: 10px;
  }

  .filter-chip {
    font-size: 13px;
    padding: 6px 8px;
  }

  .product-results .product-grid {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
  }

  .product-results .product-card {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .product-results .product-card__image {
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    min-height: 124px;
    padding: 8px;
  }

  .product-results .product-card__image > img {
    height: 100%;
    max-height: 140px;
    object-fit: contain;
    width: 100%;
  }

  .product-results .product-image-placeholder {
    gap: 6px;
    padding: 6px;
  }

  .product-results .product-card__image img.product-image-placeholder__logo {
    max-height: 58px;
    max-width: 66px;
    width: 76%;
  }

  .product-results .product-image-placeholder__message {
    font-size: 10px;
    line-height: 1.15;
  }

  /* The body flows as wrapping rows: each piece takes a full line, except the
     price and the availability badge, which share one where they fit. The
     actions wrapper steps out of the way so its badge and form join that
     flow; it carries no semantics of its own. */
  .product-results .product-card__body {
    align-content: start;
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px 10px;
    min-width: 0;
    padding: 9px 10px 10px;
  }

  .product-results .product-card__body > *,
  .product-results .product-card__actions > form {
    flex: 1 1 100%;
    min-width: 0;
  }

  .product-results .product-card__actions {
    display: contents;
  }

  .product-results .product-card__body > .price,
  .product-results .product-card__actions > .badge {
    flex: 0 1 auto;
    margin-top: 2px;
  }

  .product-results .product-card__brand {
    font-size: 10px;
    overflow-wrap: anywhere;
  }

  .product-results .product-card h3 {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    font-size: 14px;
    line-height: 1.25;
    overflow: hidden;
    overflow-wrap: anywhere;
  }

  .product-results .product-card .meta {
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .product-results .product-card .pack-size {
    font-size: 12px;
  }

  .product-results .price .vat-price {
    font-size: 17px;
    white-space: nowrap;
  }

  .product-results .product-card__actions > .badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .product-results .product-card__actions > form {
    margin-top: 5px;
  }

  .product-results .product-card__actions input {
    flex: 0 0 52px;
    height: 44px;
    width: 52px;
  }

  .product-results .product-card__actions .btn-primary {
    min-height: 44px;
  }
}

@media (max-width: 359px) {
  .product-results .product-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }
}

/* More menu: an optional heading over a run of related actions. */
.staff-more-menu__heading {
  border-top: 1px solid var(--line);
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  padding: 9px 12px 3px;
  text-transform: uppercase;
}

/* Import organiser preview: source → destination groups, one column on a phone. */
.organise-error-summary h2 {
  font-size: 16px;
  margin: 0 0 6px;
}

.organise-error-summary a {
  color: inherit;
}

.organise-counts {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.organise-groups {
  display: grid;
  gap: 8px;
}

.organise-group {
  border: 1px solid var(--line);
  min-width: 0;
}

.organise-group > summary {
  cursor: pointer;
  display: grid;
  gap: 4px 12px;
  grid-template-columns: auto 1fr;
  list-style: none;
  padding: 10px 12px 10px 30px;
  position: relative;
}

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

/* Grid drops the native marker, so draw one: closed ▸, open ▾. */
.organise-group > summary::before {
  color: var(--steel);
  content: "▸";
  left: 12px;
  position: absolute;
  top: 10px;
}

.organise-group[open] > summary::before {
  content: "▾";
}

.organise-group > summary:focus-visible,
.organise-section-toggle > summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.organise-group__count {
  font-weight: 700;
}

.organise-group__route,
.organise-group__meta {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.organise-group__route {
  display: grid;
  gap: 2px;
}

.organise-group__meta,
.organise-muted {
  color: var(--muted);
  font-size: 13px;
}

.organise-group__body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.organise-group__body p {
  margin: 0;
}

.organise-label {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.organise-status {
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  text-transform: uppercase;
  width: fit-content;
}

.organise-status--review,
.organise-status--gap {
  color: var(--red-deep);
}

.organise-status--no_rule {
  color: var(--steel);
}

.organise-status--ready {
  color: var(--ink);
}

.organise-examples,
.organise-plain-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.organise-sku {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}

.organise-section-toggle > summary {
  cursor: pointer;
}

.organise-section-toggle > summary h2 {
  display: inline;
  font-size: 18px;
}

@media (min-width: 720px) {
  .organise-group > summary {
    align-items: baseline;
    grid-template-columns: 120px 140px minmax(0, 1fr);
  }

  .organise-group__route {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .organise-group__meta {
    grid-column: 3;
  }
}

/* Import organiser: column mapper. One line per column on a desktop, stacked on a phone. */
.organise-flow {
  display: grid;
  gap: 16px;
}

.organise-concepts {
  border-left: 3px solid var(--line);
  color: var(--muted);
  display: grid;
  gap: 6px;
  padding-left: 12px;
}

.organise-concepts p,
.organise-reselect {
  margin: 0;
}

.organise-map-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.organise-map-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px 0;
}

.organise-map-row--invalid {
  border-left: 3px solid var(--red);
  padding-left: 9px;
}

.organise-map-row__header {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.organise-map-row__samples {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.organise-map-row__choice {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.organise-map-row__choice select {
  max-width: 100%;
  min-height: 40px;
}

.organise-map-row__choice select:focus-visible,
.organise-advanced > summary:focus-visible,
[data-organise-mapper-heading]:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.organise-map-row__state {
  color: var(--steel);
  font-size: 13px;
}

.organise-advanced > summary {
  cursor: pointer;
  font-weight: 700;
}

@media (min-width: 720px) {
  .organise-map-row {
    align-items: center;
    gap: 16px;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 1.4fr) minmax(220px, 1.2fr);
  }

  .organise-map-row__choice .organise-label {
    display: none;
  }
}

/* Import organiser: group decisions and the plan. The decision sits under the
   group summary; on a phone its controls stack. */
.organise-card {
  border: 1px solid var(--line);
  min-width: 0;
}

.organise-card > .organise-group {
  border: 0;
}

.organise-decision {
  align-items: center;
  border: 0;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 8px 12px 10px 30px;
}

.organise-decision__state {
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  text-transform: uppercase;
}

.organise-decision__label {
  font-size: 13px;
  font-weight: 700;
}

.organise-decision select {
  max-width: 100%;
  min-height: 40px;
}

.organise-choice {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  min-height: 32px;
}

.organise-choice input:focus-visible,
.organise-decision select:focus-visible,
.organise-bulk > summary:focus-visible,
[data-organise-plan-heading]:focus-visible,
[data-organise-results-heading]:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.organise-bulk > summary {
  cursor: pointer;
  list-style: none;
}

.organise-bulk > summary::-webkit-details-marker {
  display: none;
}

.organise-bulk__confirm {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
}

.organise-bulk__confirm h3,
.organise-plan h3 {
  font-size: 16px;
  margin: 0;
}

.organise-bulk__confirm ul {
  margin: 0;
  padding-left: 18px;
}

.organise-plan-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.organise-plan-list li {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  overflow-wrap: anywhere;
  padding: 6px 0;
}

/* Clearance: a small text badge, never colour alone and never a price claim. */
.clearance-badge {
  border: 1px solid currentColor;
  color: var(--red-deep);
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin: 2px 0 4px;
  padding: 1px 6px;
  text-transform: uppercase;
  width: fit-content;
}

/* Catalogue health: compact label → count links, two across where there is room. */
.health-rows {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.health-rows > li {
  display: grid;
  gap: 4px;
}

.health-row__help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  padding: 0 2px;
}

.health-row__help a {
  color: var(--red-deep);
  font-weight: 700;
  white-space: nowrap;
}

.health-row {
  align-items: baseline;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 12px;
  text-decoration: none;
}

.health-row:hover,
.health-row:focus-visible {
  border-color: var(--red);
  outline: none;
}

.health-row:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.health-row__count {
  font-size: 18px;
  font-weight: 700;
}

.health-row--zero {
  color: var(--muted);
}

.health-row--zero .health-row__count {
  font-size: 15px;
  font-weight: 400;
}

.health-ok,
.health-note {
  color: var(--muted);
  margin: 0 0 8px;
}

/* Availability desk: search at the top, thumb-sized choices, one card per option. */
.desk-search label,
.desk-lead-time label,
.desk-set-all label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.desk-search__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-search__row input {
  flex: 1 1 220px;
  font-size: 18px;
  min-height: 44px;
  min-width: 0;
  padding: 6px 10px;
}

/* Check availability says what it is for, and sends the rest to Scan. */
.desk-page__other {
  display: block;
  font-size: 14px;
  margin-top: 2px;
}

.desk-page__other a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.desk-notice {
  border-left: 3px solid var(--red);
  font-weight: 700;
  margin: 0;
  padding: 8px 12px;
}

.desk-identity {
  align-items: center;
  display: flex;
  gap: 12px;
}

.desk-identity img {
  object-fit: contain;
}

.desk-identity h2 {
  font-size: 18px;
  margin: 0;
  overflow-wrap: anywhere;
}

.desk-muted {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.desk-current {
  margin: 0;
}

.desk-choices {
  border: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}

.desk-choices legend {
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  padding: 0;
}

.desk-choice {
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 48px;
  padding: 8px;
}

.desk-choice--current {
  border: 2px solid var(--ink);
}

.desk-choice:hover,
.desk-choice:focus-visible {
  border-color: var(--red);
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.desk-options {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desk-option {
  border: 1px solid var(--line);
  padding: 10px;
}

.desk-option--match {
  border: 2px solid var(--red);
}

.desk-set-all {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-set-all label {
  flex-basis: 100%;
}

.desk-confirm {
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px;
}

.desk-confirm p {
  margin: 0;
}

.desk-list {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desk-list__item {
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
  padding: 8px 12px;
  text-decoration: none;
}

.desk-list__item:hover,
.desk-list__item:focus-visible {
  border-color: var(--red);
}

.scan-manual-results {
  gap: 10px;
}

.scan-manual-family {
  gap: 8px;
  padding: 12px;
}

.scan-manual-family h2,
.scan-manual-family p {
  margin: 0;
}

.scan-manual-family h2 {
  font-size: 17px;
}

.scan-manual-options {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.scan-manual-options li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

/* Find or add it manually, nothing matched: Create "…" is the clear next step, a full primary button like every other
   scanner step (scan-next__button--primary), and says it only opens Rapid Add. */
.scan-create {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.scan-create p {
  margin: 0;
}

.scan-create__help {
  color: var(--steel);
}

a.scan-create__button {
  margin: 4px 0 0;
  max-width: none;
  overflow-wrap: anywhere;
  padding: 10px 16px;
  text-align: center;
  width: 100%;
}

.scan-create__note {
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 720px) {
  a.scan-create__button {
    justify-self: start;
    min-width: 280px;
    width: auto;
  }
}

.desk-overview__groups {
  display: grid;
  gap: 12px;
}

.desk-overview h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

@media (min-width: 720px) {
  .desk-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .desk-overview__groups {
    grid-template-columns: 1fr 1fr;
  }
}

.desk-warning {
  display: block;
  font-weight: 400;
  margin-top: 4px;
}

/* Identifiers: how a desk lookup matched, an unrecognised scan, a product's codes. */
.desk-matched {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.desk-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.desk-unrecognised p {
  margin: 4px 0 12px;
}

/* Scanner actions (Link identifier, Add new product, Search again): used one-handed on a phone. */
.desk-unrecognised .staff-action-row a {
  min-height: 44px;
}

.identifier-group {
  font-size: 14px;
  margin: 16px 0 4px;
}

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

.identifier-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 0;
}

.identifier-row p {
  margin: 0;
}

.identifier-row__code {
  overflow-wrap: anywhere;
}

.identifier-row--inactive .identifier-row__code {
  color: var(--muted);
}

.identifier-row--inactive .identifier-row__code strong {
  text-decoration: line-through;
}

.identifier-row__state {
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 4px;
  padding: 1px 5px;
  text-transform: uppercase;
}

/* Availability desk: phone camera scanner (static/js/barcode-scanner.js). */
.desk-scan {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.desk-scan__button {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  width: 100%;
}

.desk-scan__button[hidden] {
  display: none;
}

.desk-scan__button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .desk-scan__button {
    width: auto;
  }
}

/* Why the camera did not open, and what to do: never a browser's own error text. */
.desk-scan__message {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
}

.desk-scan__message[hidden],
.desk-scan__message-title[hidden] {
  display: none;
}

.desk-scan__message p {
  margin: 0;
  overflow-wrap: anywhere;
}

.desk-scan__message-title {
  font-weight: 700;
}

.desk-scan__message-help {
  color: var(--steel);
  font-size: 14px;
  line-height: 1.4;
}

.desk-scan-context {
  background: #fff;
  border: 1px solid var(--line);
  margin: 12px 0 0;
  padding: 10px 12px;
}

.desk-scan-context p {
  margin: 0;
  overflow-wrap: anywhere;
}

.desk-scan-context p + p {
  margin-top: 4px;
}

html.scanner-open,
html.scanner-open body {
  overflow: hidden;
}

.scanner {
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.scanner[hidden] {
  display: none;
}

.scanner__bar {
  align-items: center;
  display: flex;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
}

.scanner__status {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
}

.scanner__button {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
}

.scanner__button[hidden] {
  display: none;
}

.scanner__button[aria-pressed="true"] {
  background: #fff;
  color: #000;
}

.scanner__button--cancel {
  background: #fff;
  color: #000;
}

.scanner__view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.scanner__video {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.scanner__target {
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35);
  height: 38%;
  left: 8%;
  pointer-events: none;
  position: absolute;
  top: 31%;
  width: 84%;
}

.scanner__target span {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  left: 50%;
  padding: 5px 9px;
  position: absolute;
  top: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.scanner__hint {
  font-size: 14px;
  margin: 0;
  padding: 10px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

/* While the camera starts: the browser's own permission question is expected, not a second scanner. */
.scanner__ask {
  background: rgba(0, 0, 0, 0.72);
  bottom: 16px;
  font-size: 14px;
  left: 50%;
  margin: 0;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  width: max-content;
}

.scanner__ask[hidden] {
  display: none;
}

/* Portrait-first on a phone. The query is PHONE_LANDSCAPE in static/js/barcode-scanner.js, which stops reading
   while this shows; tablets and desktops (taller than 500px, or wider than 1000px) are never asked to rotate. */
.scanner__rotate,
.scan-rotate {
  display: none;
}

.rotate-phone {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.rotate-phone__device {
  transform-box: fill-box;
  transform-origin: center;
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 1000px) {
  .scanner__rotate,
  .scan-rotate {
    align-content: center;
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
  }

  .scanner__rotate {
    background: #000;
    color: #fff;
    inset: 0;
    position: absolute;
  }

  .scanner__rotate p,
  .scan-rotate p {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
  }

  .scanner__status,
  .scanner__hint,
  .scanner__ask {
    visibility: hidden;
  }

  /* Scan itself, ops/scan_views.py: one calm screen instead of a squashed scanner. */
  .scan-rotate {
    background: var(--surface);
    color: var(--ink);
    inset: 0;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    position: fixed;
    z-index: 900; /* over the staff header, under the camera view (1000) and the working state (1200) */
  }

  .scan-rotate .desk-muted {
    font-size: 15px;
    margin: 0;
    max-width: 34ch;
  }

  html:has(.scan-rotate) {
    overflow: hidden;
  }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .rotate-phone__device {
    animation: rotate-phone 2.4s ease-in-out infinite;
  }
}

@keyframes rotate-phone {
  0%, 25% { transform: rotate(-90deg); }
  60%, 100% { transform: rotate(0deg); }
}

/* Scan (Find), ops/scan_views.py: a warehouse page for one hand. Scan barcode first and largest, Type code under it,
   one compact result, and Scan next fixed to the bottom of a phone's screen. Narrow on a desktop too: one card. */
.scan-page {
  display: grid;
  gap: 14px;
  /* One column the width of the screen: a strip's one-row text gives way inside it, never widens the page. */
  grid-template-columns: minmax(0, 1fr);
  max-width: 640px;
  padding-bottom: 32px;
  padding-top: 14px;
}

.scan-page--result {
  /* Room under the last action for the fixed Scan next bar. */
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.scan-page__header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.scan-page__header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  margin: 0;
}

.scan-page__header--back {
  justify-content: flex-start;
}

.scan-page__back {
  align-items: center;
  color: var(--steel);
  display: inline-flex;
  font-size: 24px;
  justify-content: center;
  min-height: 44px;
  min-width: 32px;
}

.scan-page__back:hover,
.scan-page__back:focus-visible {
  color: var(--red);
}

/* A small label beside the heading, such as the new-product wizard's Step 1 of 3. */
.scan-page__mode {
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.scan-page__mode strong {
  color: var(--ink);
}

.scan-page .desk-scan {
  margin: 0;
}

.scan-page .desk-scan__button {
  font-size: 20px;
  min-height: 64px;
  width: 100%;
}

.scan-type {
  display: grid;
  gap: 6px;
}

.scan-type label {
  margin: 0;
}

.scan-type .desk-search__row input {
  min-height: 48px;
}

.scan-type .btn-primary {
  font-size: 14px;
  min-height: 48px;
  min-width: 88px;
}

/* What Scan is for, and the way to the quick look-up instead (Check availability). */
.scan-page__lead {
  color: var(--steel);
  margin: -6px 0 0;
}

.scan-page__other {
  display: block;
  font-size: 14px;
  margin-top: 2px;
}

.scan-page__other a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.scan-ready {
  display: grid;
  gap: 14px;
}

.scan-ready__controls {
  display: grid;
  gap: 14px;
}

.scan-ready__intro {
  display: none;
}

/* Ready to scan on a phone: the page is the height of the screen with the browser's bars showing (100svh; 100vh
   where small-viewport units are unknown), and the controls sit at its foot, in the flow rather than fixed over it.
   They therefore start above Safari's and Chrome's bottom bars, never under them or the home indicator (plus the
   safe-area inset wherever the browser reports one), and the keyboard scrolls the field into view as for any field. */
@media (max-width: 719px) {
  body.staff-app:has(.scan-page--ready) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
  }

  body.staff-app:has(.scan-page--ready) > .staff-main {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    min-height: 0;
  }

  .scan-page--ready {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    gap: 14px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .scan-ready {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
  }

  .scan-ready__intro {
    align-content: center;
    color: var(--muted);
    display: grid;
    flex: 1 0 auto;
    gap: 10px;
    justify-items: center;
    padding: 8px 0;
    text-align: center;
  }

  .scan-ready__intro p {
    font-size: 15px;
    margin: 0;
    max-width: 26ch;
  }

  .scan-ready__mark {
    fill: none;
    stroke: var(--silver);
    stroke-linecap: square;
    stroke-width: 3;
  }

  .scan-ready__bars {
    stroke: var(--steel);
  }

  /* Scan barcode last, at the very bottom where the thumb rests; Type code directly above it. */
  .scan-ready__controls {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: auto;
  }

  /* Why the camera did not open sits between the two: under the field to use instead, over the button that failed. */
  .scan-ready__controls .desk-scan {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
  }
}

/* A short phone (320 × 568) keeps everything on one screen. */
@media (max-width: 719px) and (max-height: 640px) {
  .scan-ready__intro {
    display: none;
  }
}

.scan-looked-up p {
  color: var(--steel);
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-card {
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.scan-card h2 {
  font-size: 19px;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-card__head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 88px minmax(0, 1fr);
}

.scan-card__image {
  background: var(--fallback-image-bg);
  border: 1px solid var(--line);
  height: 88px;
  object-fit: contain;
  width: 88px;
}

.scan-card__option {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.scan-card__parent,
.scan-card__code {
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-card--identify {
  gap: 8px;
}

.scan-card--identify .scan-card__code {
  font-size: 16px;
}

.scan-card__state {
  color: var(--steel);
  font-size: 13px;
  margin: -4px 0 0;
}

.scan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.scan-badge {
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.scan-badge--published,
.scan-badge--sold {
  color: var(--ok);
}

.scan-badge--draft,
.scan-badge--review,
.scan-badge--needs-price {
  color: var(--warn);
}

.scan-badge--archived {
  color: var(--muted);
}

.scan-badge--not-sold {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.scan-facts {
  display: grid;
  margin: 0;
}

.scan-facts > div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 108px minmax(0, 1fr);
  padding: 7px 0;
}

.scan-facts dt {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
}

.scan-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-facts__stock dd strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-style: italic;
  line-height: 1;
}

.scan-card__note {
  border-left: 3px solid var(--ink);
  margin: 0;
  padding: 6px 10px;
}

.scan-draft {
  border: 1px solid var(--warn);
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.scan-draft h3 {
  color: var(--warn);
  font-size: 15px;
  margin: 0;
}

.scan-draft__blockers {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.scan-draft__blockers li {
  overflow-wrap: anywhere;
}

.scan-draft__price {
  background: #fff8f3;
  border-left: 3px solid var(--warn);
  padding: 8px 10px;
}

.scan-draft__price strong,
.scan-draft__price span {
  display: block;
}

/* One small fix beside a blocker: a quiet link, still a thumb-sized target. */
.scan-draft__fix {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  min-height: 44px;
  padding: 0 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.scan-card__actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scan-card__actions > :only-child,
.scan-card__actions > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* The photo and the product page: still thumb-sized, but quiet beside the stock actions and Scan next. */
.scan-card__actions--quiet {
  gap: 4px 8px;
}

.scan-action.scan-action--quiet {
  border-color: transparent;
  font-size: 14px;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.scan-action.scan-action--quiet:hover,
.scan-action.scan-action--quiet:focus-visible {
  border-color: transparent;
}

.scan-action {
  align-items: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  display: flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 8px 12px;
  text-align: center;
}

.scan-action:hover,
.scan-action:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.scan-action--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.scan-action--primary:hover,
.scan-action--primary:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #fff;
}

.scan-options {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.scan-option {
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 2px;
  min-height: 56px;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.scan-option:hover,
.scan-option:focus-visible {
  border-color: var(--red);
}

.scan-option__state {
  color: var(--steel);
  font-size: 13px;
}

.scan-next {
  background: rgba(247, 247, 245, 0.97);
  border-top: 1px solid var(--line);
  bottom: 0;
  left: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  z-index: 50;
}

.scan-next__button {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: flex;
  font-size: 18px;
  font-weight: 700;
  justify-content: center;
  margin: 0 auto;
  max-width: 608px;
  min-height: 56px;
}

.scan-next__button:hover,
.scan-next__button:focus-visible {
  background: var(--red);
  color: #fff;
}

.scan-next--quiet .scan-next__button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--steel);
  font-size: 14px;
  min-height: 44px;
}

.scan-next--quiet .scan-next__button:hover,
.scan-next--quiet .scan-next__button:focus-visible {
  background: #fff;
  border-color: var(--steel);
  color: var(--ink);
}

/* The receipt Receive stock goes into (Receiving · GRN-… · lines · units), always in view while it is open. */
.scan-receipt {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  display: grid;
  gap: 0 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px 6px 6px 12px;
}

.scan-receipt p {
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-receipt__totals {
  color: var(--steel);
  font-size: 13px;
  grid-column: 1;
}

.scan-receipt__totals a {
  color: var(--ink);
  font-weight: 700;
}

.scan-receipt__finish {
  align-items: center;
  border: 1px solid var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 44px;
  padding: 0 14px;
}

.scan-receipt__finish:hover,
.scan-receipt__finish:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

/* Outside Receive the open receipt is a reminder, not the headline: one compact, quieter row (Receiving · GRN-… ·
   lines · units), shorter than the loud strip, and Finish beside it, never wrapped below. */
.scan-receipt--quiet {
  align-items: center;
  background: transparent;
  border-left-width: 1px;
  border-color: var(--line);
  display: flex;
  flex-wrap: nowrap;
  gap: 0 4px;
  padding: 2px 2px 2px 8px;
}

.scan-receipt--quiet .scan-receipt__ref,
.scan-receipt--quiet .scan-receipt__totals {
  color: var(--steel);
  font-size: 13px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.scan-receipt--quiet .scan-receipt__ref {
  flex: none;
}

.scan-receipt--quiet .scan-receipt__ref strong {
  font-weight: 700;
}

.scan-receipt--quiet .scan-receipt__totals {
  flex: 0 1 auto;
  min-width: 0;
}

/* On one row the reference and the totals need the separator the loud strip's line break gives them. */
.scan-receipt--quiet .scan-receipt__totals::before {
  content: "· ";
  content: "· " / "";
}

.scan-receipt--quiet .scan-receipt__finish {
  border-color: var(--line);
  flex: none;
  font-size: 13px;
  margin-left: auto;
  padding: 0 8px;
  white-space: nowrap;
}

/* A phone has room for the reference, the totals and Finish, not View receipt too: it is in the loud strip as soon
   as Receive stock is open. Huge totals give way last, with an ellipsis, never pushing Finish onto a second line. */
@media (max-width: 719px) {
  .scan-receipt--quiet .scan-receipt__ref,
  .scan-receipt--quiet .scan-receipt__totals {
    font-size: 12px;
  }

  .scan-receipt--quiet .scan-receipt__totals {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* A wide system font (DejaVu Sans) needs these few pixels to keep ordinary totals whole at 390px. */
  .scan-receipt--quiet .scan-receipt__finish {
    padding: 0 6px;
  }

  .scan-receipt--quiet .scan-receipt__view {
    display: none;
  }
}

/* A stocktake's strip sits close under the receipt's when both are open: each its own context, neither crowding Scan. */
.scan-receipt + .scan-stocktake {
  margin-top: -8px;
}

/* Start stocktake: a quiet tap under Type code, or under an item's count. Never the headline, never automatic. */
.scan-stocktake-start {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.scan-stocktake-start p {
  margin: 0;
}

.scan-stocktake-start__name summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 8px;
  list-style: none;
  min-height: 44px;
}

.scan-stocktake-start__name summary::-webkit-details-marker {
  display: none;
}

/* A visible disclosure mark: the line reads as something to open, not as a label with no field. */
.scan-stocktake-start__name summary::before {
  color: var(--muted);
  content: "▸";
  font-size: 12px;
}

.scan-stocktake-start__name[open] summary::before {
  content: "▾";
}

.scan-stocktake-start__name label {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.scan-stocktake-start__name input {
  border: 1px solid var(--line);
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  padding: 0 10px;
  width: 100%;
}

.scan-stocktake-start--inline {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.scan-stocktake-start .staff-action-link {
  align-items: center;
  display: inline-flex;
  min-height: 44px;
}

/* A card straight from the new-product wizard says what was made, above everything else. */
.scan-card__made {
  border-left: 4px solid var(--ok);
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 4px 10px;
}

/* An option's product SKU: context, after what is in the hand. */
.scan-facts__parent dt,
.scan-facts__parent dd {
  color: var(--steel);
  font-size: 13px;
}

.scan-start {
  display: grid;
  gap: 12px;
}

.scan-start__details summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 0;
}

.scan-start__field {
  display: grid;
  font-weight: 700;
  gap: 4px;
  margin-top: 8px;
}

.scan-start__field input {
  font-size: 16px;
  min-height: 44px;
  padding: 6px 10px;
}

.scan-lines {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.scan-lines li {
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
  padding: 6px 0;
}

.scan-lines__units {
  font-weight: 700;
}

.scan-card__actions form {
  display: grid;
}

.scan-card__more {
  min-height: 44px;
}

/* Receiving and counting: what is on hand is context, not the headline. */
.scan-page[data-scan-action] .scan-facts__stock dd strong {
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
}

button.scan-action {
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.scan-recent {
  border: 1px solid var(--warn);
  border-left-width: 4px;
  margin: 0;
  padding: 8px 10px;
}

.scan-recent strong {
  color: var(--warn);
}

.scan-receive {
  display: grid;
  gap: 10px;
}

/* Receive stock and Count stock, opened on the card: what is happening, said first. */
.scan-panel {
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.scan-panel h3,
.scan-panel__context {
  font-size: 16px;
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-receive__pack,
.scan-sum {
  margin: 0;
}

.scan-sum {
  font-size: 20px;
}

.scan-receive__field {
  display: grid;
  font-weight: 700;
  gap: 4px;
}

.scan-receive__field input {
  font-size: 24px;
  font-weight: 700;
  max-width: 200px;
  min-height: 52px;
  padding: 4px 12px;
}

.scan-count-presets {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scan-count-presets span {
  color: var(--steel);
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 700;
}

.scan-count-presets button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 8px;
}

.scan-count-presets button:hover,
.scan-count-presets button:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

/* Count: Recorded / Counted / Variance, side by side and large enough to read at arm's length. */
.scan-variance {
  border: 1px solid var(--line);
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0;
}

.scan-variance > div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.scan-variance > div + div {
  border-left: 1px solid var(--line);
}

.scan-variance dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.scan-variance dd {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-reserved-note {
  margin: 8px 0 0;
  font-weight: 600;
}

.scan-variance dd[data-sign="down"] {
  color: var(--red-deep);
}

.scan-variance dd[data-sign="up"] {
  color: var(--ok);
}

/* Unknown Product V1 (ops/scan_new.py): one decision per screen, every control thumb-sized. */
.scan-new__context {
  color: var(--steel);
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}

.scan-new__path {
  background: var(--panel);
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 2px;
  min-height: 64px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.scan-new__path strong {
  font-size: 17px;
}

.scan-new__path span {
  color: var(--steel);
  font-size: 14px;
}

.scan-new__path-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.scan-new__path-grid form {
  display: contents;
}

.scan-new__path-grid .scan-new__path {
  align-content: start;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 128px;
  padding: 14px;
}

.scan-new__path-icon {
  align-items: center;
  align-self: start;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit !important;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.scan-new__path-icon svg,
.scan-new__department-icon svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 24px;
}

.scan-new__path-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scan-new__path-copy strong {
  line-height: 1.15;
}

.scan-new__path:hover,
.scan-new__path:focus-visible {
  border-color: var(--red);
}

.scan-new__choose,
.scan-new__choose form {
  display: grid;
  gap: 10px;
}

.scan-new__choose .scan-new__path-grid form {
  display: contents;
}

.scan-new__path--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.scan-new__path--primary span {
  color: #fff;
}

.scan-new__path--primary:hover,
.scan-new__path--primary:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #fff;
}

.scan-new__path--quiet {
  border-color: var(--line);
}

.scan-new__department-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
}

.scan-new__department-grid button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  justify-items: center;
  min-height: 112px;
  overflow-wrap: anywhere;
  padding: 12px 8px;
  text-align: center;
}

.scan-new__department-grid button:hover,
.scan-new__department-grid button:focus-visible,
.scan-new__subcategory-grid button:hover,
.scan-new__subcategory-grid button:focus-visible {
  border-color: var(--red);
  color: var(--red-deep);
}

.scan-new__department-icon {
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--red-deep);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.scan-new__department-heading {
  align-items: center;
  display: flex;
  gap: 10px;
}

.scan-new__department-heading h3 {
  margin: 0;
}

.scan-new__department-back {
  align-self: start;
  background: none;
  border: 0;
  color: var(--steel);
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  padding: 4px 0;
  text-align: left;
}

.scan-new__subcategory-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}

.scan-new__subcategory-grid button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 52px;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  text-align: left;
}

.scan-new__step h2,
.scan-new__step legend h2 {
  font-size: 19px;
  margin: 0;
}

.scan-new__group {
  border: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.scan-new__group > legend {
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.scan-new__group > summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 0;
}

.scan-new__field {
  display: grid;
  font-weight: 700;
  gap: 4px;
}

.scan-new__field input,
.scan-new__field textarea,
.scan-new__search input {
  font-size: 17px;
  min-height: 48px;
  min-width: 0;
  padding: 6px 10px;
}

.scan-new__field textarea {
  font-family: inherit;
  line-height: 1.4;
  resize: vertical;
}

.scan-new__reference-image {
  display: grid;
  gap: 8px;
}

.scan-new__reference-image p {
  margin: 0;
}

.scan-new__price {
  font-weight: 400;
  margin-left: 32px;
  max-width: 220px;
}

.scan-new__search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

.scan-new__search input {
  flex: 1 1 200px;
}

.scan-new__search .staff-action-link,
.scan-new__chosen .staff-secondary-link,
.scan-new__unbranded {
  min-height: 48px;
}

.scan-new__results {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.scan-new__results button,
.scan-new__refused {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  font: inherit;
  gap: 2px;
  margin: 0;
  min-height: 48px;
  overflow-wrap: anywhere;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
}

.scan-new__results button {
  cursor: pointer;
}

.scan-new__results button:hover,
.scan-new__results button:focus-visible {
  border-color: var(--red);
}

.scan-new__similar {
  display: grid;
  gap: 8px;
}

.scan-new__similar p {
  margin: 0;
}

.scan-new__similar .scan-new__results li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.scan-new__refused span:last-child {
  color: var(--warn);
  font-size: 13px;
}

.scan-new__chosen {
  align-items: center;
  border-left: 4px solid var(--ok);
  display: flex;
  flex-wrap: wrap;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 4px 0 4px 10px;
}

.scan-new__error {
  color: var(--red-deep);
  font-weight: 700;
  margin: 0;
}

.scan-choice {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 44px;
}

.scan-choice input {
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.scan-new__brand-decisions {
  display: grid;
  gap: 4px;
}

.scan-new__brand-decisions .staff-secondary-link,
.scan-new__unsure {
  justify-self: start;
  min-height: 44px;
}

.scan-new__mpn-review,
.scan-new__mpn-manual,
.scan-new__mpn-suggestion {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.scan-new__mpn-optional {
  font-weight: 700;
  margin: -4px 0 0;
}

.scan-new__mpn-suggestion {
  align-items: start;
}

.scan-new__mpn-suggestion strong {
  font-size: 17px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.scan-new__mpn-actions {
  display: grid;
  gap: 8px;
}

.scan-new__mpn-actions button {
  justify-content: center;
  min-height: 48px;
  overflow-wrap: anywhere;
  white-space: normal;
  width: 100%;
}

.scan-new__mpn-manual[hidden],
.scan-new [data-mpn-continue][hidden],
.scan-new [data-mpn-cancel][hidden],
.scan-new [data-mpn-state][hidden] {
  display: none !important;
}

.scan-new__units {
  border-left: 4px solid var(--ink);
  display: grid;
  gap: 4px;
  padding-left: 12px;
}

.scan-new__quantity {
  gap: 14px;
}

.scan-new__quantity-kicker {
  margin: 0 0 -8px;
}

.scan-new__stock-unit {
  background: var(--panel);
  border: 1px solid var(--ink);
  border-left: 5px solid var(--red);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.scan-new__stock-unit h2,
.scan-new__stock-unit h3,
.scan-new__stock-unit p,
.scan-new__pack-hint p,
.scan-new__quantity-panel p,
.scan-new__quantity-warning h3,
.scan-new__count-equation {
  margin: 0;
}

.scan-new__stock-unit h2,
.scan-new__stock-unit h3 {
  font-size: 13px;
  letter-spacing: 0.05em;
  margin: 0;
  text-transform: uppercase;
}

.scan-new__stock-equation {
  display: grid;
  font-size: 17px;
  gap: 3px;
  line-height: 1.25;
  min-width: 0;
}

.scan-new__stock-equation strong,
.scan-new__stock-equation span,
.scan-new__scan-equation strong,
.scan-new__count-equation strong {
  overflow-wrap: anywhere;
}

.scan-new__stock-equation > span {
  font-size: 20px;
  font-weight: 800;
}

.scan-new__pack-hint {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.scan-new__pack-hint strong {
  overflow-wrap: anywhere;
}

.scan-new__quantity-choices {
  gap: 10px;
}

.scan-new__quantity-choice {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 68px;
  min-width: 0;
  padding: 11px 12px;
}

.scan-new__quantity-choice:hover,
.scan-new__quantity-choice:focus-within {
  border-color: var(--red);
}

.scan-new__quantity-choice:has(input:checked) {
  background: var(--panel);
  border-color: var(--ink);
  box-shadow: inset 4px 0 0 var(--red);
}

.scan-new__quantity-choice input {
  height: 22px;
  margin: 1px 0 0;
  width: 22px;
}

.scan-new__quantity-choice > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scan-new__quantity-choice strong,
.scan-new__quantity-choice small {
  overflow-wrap: anywhere;
}

.scan-new__quantity-choice strong {
  font-size: 16px;
  line-height: 1.25;
}

.scan-new__quantity-choice small {
  color: var(--steel);
  font-size: 13px;
  line-height: 1.35;
}

.scan-new__quantity-choice--quiet {
  border-style: dashed;
}

.scan-new__quantity-panels {
  display: grid;
  gap: 10px;
}

.scan-new__quantity-panel {
  border-left: 4px solid var(--ink);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 4px 0 4px 12px;
}

.scan-new__quantity.is-enhanced .scan-new__quantity-panel[hidden] {
  display: none;
}

.scan-new__quantity-panel .scan-next__button {
  margin: 0;
  max-width: none;
  min-height: 52px;
  overflow-wrap: anywhere;
  padding: 8px 12px;
  text-align: center;
  white-space: normal;
  width: 100%;
}

.scan-new__scan-equation,
.scan-new__count-equation {
  background: var(--panel);
  display: grid;
  gap: 3px;
  line-height: 1.3;
  min-width: 0;
  padding: 10px 12px;
}

.scan-new__scan-equation span:first-child,
.scan-new__count-equation span {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.scan-new__scan-equation strong,
.scan-new__count-equation strong {
  font-size: 18px;
}

.scan-new__quantity-warning {
  border-color: var(--red-deep);
}

.scan-new__quantity-warning h3 {
  color: var(--red-deep);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.scan-next.scan-next--quantity {
  background: transparent;
  border: 0;
  padding: 0;
  position: static;
}

.scan-next--quantity .scan-next__cancel {
  min-height: 48px;
  width: 100%;
}

.scan-new__skip-photo {
  margin: 0 auto;
  max-width: 608px;
  width: 100%;
}

.scan-pack-count {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scan-pack-count .scan-receive__field input {
  max-width: 100%;
  width: 100%;
}

/* An open panel's bottom bar: Receive, Save count or Start receiving, with Cancel beside it. */
.scan-next--split {
  display: flex;
  gap: 8px;
}

.scan-next--split .scan-next__button {
  flex: 1 1 auto;
  margin: 0;
}

button.scan-next__button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  width: 100%;
}

.scan-next__button--primary {
  background: var(--red);
}

.scan-next__button--primary:hover,
.scan-next__button--primary:focus-visible {
  background: var(--red-deep);
}

.scan-next__cancel {
  align-items: center;
  border: 1px solid var(--ink);
  display: flex;
  flex: 0 0 auto;
  font-weight: 700;
  justify-content: center;
  min-height: 56px;
  padding: 0 16px;
}

.scan-next__cancel:hover,
.scan-next__cancel:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

@media (min-width: 720px) {
  .scan-page {
    padding-top: 28px;
  }

  .scan-page--result {
    padding-bottom: 40px;
  }

  /* A desktop page is short enough to keep Scan next in the flow, still pinned when a long card scrolls. */
  .scan-next {
    background: var(--surface);
    border: 0;
    padding: 8px 0;
    position: sticky;
  }

  .scan-next__button {
    max-width: none;
  }

  .scan-card__head {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .scan-card__image {
    height: 120px;
    width: 120px;
  }
}

/* ------------------------------------------------------------------
   Category navigation (storefront/navigation.py): the Products menu,
   department and subcategory links, and the browse page.
   ------------------------------------------------------------------ */
.site-header {
  position: relative;
}

.nav-products > summary {
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  padding: 8px 0;
  text-transform: uppercase;
}

.nav-products > summary::-webkit-details-marker {
  display: none;
}

.nav-products > summary::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  display: inline-block;
  height: 6px;
  margin-left: 8px;
  transform: translateY(-3px) rotate(45deg);
  width: 6px;
}

.nav-products[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.nav-products__panel {
  padding: 4px 0 12px;
}

.nav-departments,
.nav-subcategories {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-department__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.site-nav .nav-products__panel a {
  text-transform: none;
}

.site-nav .nav-department__head a {
  flex: 1 1 auto;
  font-size: 15px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-department__toggle {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  flex: 0 0 44px;
  height: 44px;
  position: relative;
}

.nav-department__toggle::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  height: 8px;
  left: 17px;
  position: absolute;
  top: 15px;
  transform: rotate(45deg);
  width: 8px;
}

.nav-department__toggle[aria-expanded="true"]::after {
  top: 19px;
  transform: rotate(-135deg);
}

.nav-subcategories.is-folded {
  display: none;
}

.nav-subcategories {
  border-left: 2px solid var(--red);
  margin: 0 0 8px 2px;
  padding-left: 12px;
}

.site-nav .nav-subcategories a {
  color: #e7e7e7;
  display: block;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
}

.site-nav .nav-products__all {
  color: var(--silver);
  display: inline-block;
  font-size: 13px;
  margin-top: 6px;
}

/* All products and All departments side by side at the foot of the Products menu. */
.site-nav .nav-products__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

@media (min-width: 720px) {
  /* A panel under the header: departments in columns, each with its
     subcategories. Every one is visible; nothing folds. */
  .nav-products__panel {
    background: var(--panel);
    border-top: 3px solid var(--red);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
    color: var(--ink);
    left: 50%;
    max-width: 1248px;
    padding: 20px 24px 18px;
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    z-index: 50;
  }

  .nav-departments {
    display: grid;
    gap: 18px 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-department__toggle {
    display: none;
  }

  .nav-subcategories,
  .nav-subcategories.is-folded {
    border-left: 0;
    display: block;
    margin: 0;
    padding: 0;
  }

  .site-nav .nav-department__head a {
    color: var(--ink);
    font-size: 15px;
    min-height: 0;
    padding: 0 0 6px;
  }

  .site-nav .nav-department__head a:hover,
  .site-nav .nav-subcategories a:hover {
    color: var(--red);
  }

  .site-nav .nav-subcategories a {
    color: var(--steel);
    padding: 3px 0;
  }

  .site-nav .nav-products__footer {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 12px;
  }

  .site-nav .nav-products__all {
    color: var(--ink);
    display: inline-block;
  }
}

@media (min-width: 1040px) {
  .nav-departments {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Department and subcategory pages: compact links, name and count, no filler. */
.category-heading .eyebrow a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.subcategory-nav {
  min-width: 0;
}

/* One row of links at every width, scrolling sideways when they do not fit: a slice of the next one shows
   there is more, and a focused link scrolls into view. Never a block of wrapped tiles above the products. */
.subcategory-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 0 4px;
  scroll-padding: 0 16px;
  scroll-snap-type: x proximity;
}

.subcategory-links li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.subcategory-links {
  scrollbar-width: thin; /* one row that scrolls sideways (tested); the thin bar is the affordance */
}

.subcategory-links a {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  white-space: nowrap;
}

.subcategory-links a:hover,
.subcategory-links a:focus-visible {
  border-color: var(--ink);
}

.subcategory-links small {
  color: var(--muted);
  font-weight: 500;
}

.subcategory-links a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.subcategory-links a[aria-current="page"] small {
  color: var(--silver);
}

.subcategory-other {
  color: var(--muted);
  font-size: 14px;
  margin: -8px 0 18px;
}

.subcategory-other a {
  color: var(--ink);
  text-decoration: underline;
}

/* Listing head (templates/storefront/_product_listing.html, search.html): everything between the
   breadcrumb and the products in as few rows as fit. Phones: the title and its count; the department's
   links; Filter beside the view toggle (an open Filter takes the full width, the toggle below it). From
   720 px: title, count and view toggle on one row, then the links; Filter is the rail beside the results. */
.listing-head {
  align-items: center;
  column-gap: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
  padding-top: 8px;
  row-gap: 10px;
}

.listing-head > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.listing-head .listing-head__title {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  padding: 0;
}

.listing-head .listing-head__title .results-meta {
  margin: 0;
}

.listing-head .filter-drawer {
  grid-column: 1;
}

.listing-head .filter-drawer[open] {
  grid-column: 1 / -1;
}

.listing-head .view-toggle,
.listing-head .listing-head__action {
  grid-column: 2;
  justify-self: end;
  width: auto;
}

.listing-head .listing-head__action {
  display: none;
  min-height: 44px;
}

.results-meta__link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.listing-head .subcategory-other {
  margin: 0;
}

.brand-category-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
}

.brand-category-nav a {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .listing-head {
    margin-bottom: 18px;
    padding-top: 12px;
  }

  .listing-head .listing-head__title {
    grid-row: 1;
    grid-column: 1;
  }

  .listing-head .view-toggle,
  .listing-head .listing-head__action {
    grid-row: 1;
  }

  .listing-head .listing-head__action {
    display: inline-flex;
  }
}

/* Touch screens: a brand's department links a full 44 px tall, like the department links above. */
@media (max-width: 719px) {
  .brand-category-nav a {
    min-height: 44px;
  }
}

/* The browse page: every department and its subcategories, in columns. */
.department-directory {
  display: grid;
  gap: 24px 32px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  list-style: none;
  margin: 8px 0 40px;
  padding: 0;
}

.department-directory h2 {
  border-bottom: 2px solid var(--red);
  font-size: 18px;
  margin: 0 0 8px;
  padding-bottom: 6px;
}

.department-directory h2 a,
.department-directory li li a {
  color: var(--ink);
}

.department-directory small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.department-directory ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.department-directory li li {
  padding: 5px 0;
}

/* A single-button form in an action row (Publish on a draft product). */
.staff-inline-form {
  display: inline-flex;
  margin: 0;
}

button.staff-action-link {
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

/* Dashboard: the tools used every day, above the overview. */
.staff-daily-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

/* ------------------------------------------------------------------
   Basket (Tier 2): storefront/basket.py, templates/storefront/basket.html.
   ------------------------------------------------------------------ */
.basket-notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  margin: 0 0 14px;
  padding: 10px 12px;
}

.basket-notice p {
  margin: 0;
}

.basket-notice--error {
  border-left-color: var(--red);
}

.basket-notice__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px !important;
}

.basket-notice__actions .btn-primary {
  align-items: center;
  display: inline-flex;
  min-height: 44px;
}

.basket-notice__continue,
.basket-summary__continue {
  color: var(--ink);
  text-decoration: underline;
}

.basket-page .basket-lines {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.basket-line {
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px 14px;
  grid-template-areas:
    "image details"
    "price price"
    "controls controls";
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 12px;
}

.basket-line--unavailable {
  border-left: 4px solid var(--red);
}

.basket-line__image {
  grid-area: image;
}

.basket-line__image img {
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  width: 72px;
}

.basket-line__details {
  grid-area: details;
  min-width: 0;
}

.basket-line__details p,
.basket-line__price p {
  margin: 0 0 4px;
}

.basket-line__name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.basket-line__name a {
  color: var(--ink);
}

.basket-line__option,
.basket-line__sku {
  color: var(--muted);
  font-size: 14px;
}

.basket-line__problem {
  color: var(--red-deep);
  font-size: 14px;
}

.basket-line__price {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  grid-area: price;
}

.basket-line__label {
  color: var(--muted);
  font-size: 13px;
  margin-right: 4px;
}

.basket-line__total {
  font-weight: 700;
}

.basket-line__controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-area: controls;
}

.basket-line__update {
  display: flex;
  gap: 8px;
}

.basket-line__update input {
  border: 1px solid var(--line);
  font: inherit;
  min-height: 44px;
  padding: 0 8px;
  width: 76px;
}

.basket-button {
  background: var(--panel);
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 14px;
}

.basket-button--remove {
  border-color: var(--line);
  color: var(--red-deep);
}

.basket-summary {
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 32px;
  padding: 16px;
}

.basket-summary h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

.basket-summary dl {
  margin: 0 0 12px;
}

.basket-summary dl div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.basket-summary dd {
  margin: 0;
}

.basket-summary__total {
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
  padding-top: 8px !important;
}

.basket-summary__note {
  color: var(--muted);
  font-size: 14px;
}

/* Fulfilment choice: whole-row tap targets, one column at every width. */
.basket-fulfilment {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.basket-fulfilment fieldset {
  border: 0;
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  min-width: 0;
  padding: 0;
}

.basket-fulfilment legend {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 0;
}

.basket-fulfilment__option {
  align-items: flex-start;
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.basket-fulfilment__option:has(input:checked) {
  border-color: var(--red);
  box-shadow: inset 3px 0 0 var(--red);
}

.basket-fulfilment__option input {
  accent-color: var(--red);
  flex: none;
  height: 20px;
  margin: 2px 0 0;
  width: 20px;
}

.basket-fulfilment__option span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.basket-fulfilment__option small {
  color: var(--muted);
  font-size: 13px;
}

.basket-fulfilment .basket-button {
  width: 100%;
}

/* Confirm availability: said beside Add to basket, on the line and in the summary. */
.product-confirm-note,
.basket-line__confirm,
.basket-summary__confirm {
  border-left: 3px solid var(--warn);
  color: var(--ink);
  font-size: 14px;
  margin: 10px 0 0;
  padding: 2px 0 2px 10px;
}

.basket-empty {
  margin-bottom: 40px;
}

@media (min-width: 720px) {
  .basket-page .site-shell {
    display: grid;
    gap: 0 24px;
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .basket-page .crumbs,
  .basket-page .category-heading,
  .basket-page .basket-notice,
  .basket-page .basket-empty {
    grid-column: 1 / -1;
  }

  .basket-line {
    align-items: center;
    grid-template-areas: "image details price controls";
    grid-template-columns: 72px minmax(0, 1fr) auto auto;
  }

  .basket-line__price {
    display: block;
    text-align: right;
  }

  .basket-summary {
    align-self: start;
    position: sticky;
    top: 16px;
  }
}

/* ------------------------------------------------------------------
   The basket page itself (basket.html, .basket-view), 19 November 2026: compact rows on hairlines, not cards, and
   a lean summary. Checkout shares the rules above and is not affected.
   The list and the summary share one grid row on wide screens; the list is held to its own content
   (align-self/align-content: start) so a tall summary never stretches the rows.
   ------------------------------------------------------------------ */
.basket-view .basket-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.basket-view .basket-heading .results-meta {
  margin: 0;
}

.basket-view .basket-lines {
  align-content: start;
  align-self: start;
  border-top: 1px solid var(--line);
  container-type: inline-size;
  gap: 0;
  grid-auto-rows: max-content;
  margin: 0 0 24px;
}

/* Phones and narrow lists: photo, name and status, then the controls with the price at the end of their row. */
.basket-view .basket-line {
  align-items: center;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  gap: 8px 12px;
  grid-template-areas:
    "image details details"
    "controls controls price";
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding: 14px 0;
}

.basket-view .basket-line--unavailable {
  box-shadow: inset 3px 0 0 var(--red);
  padding-left: 12px;
}

.basket-view .basket-line__image {
  align-self: start;
  aspect-ratio: 1;
  background: var(--surface);
  display: flex;
  overflow: hidden;
  width: 56px;
}

.basket-view .basket-line__image img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.basket-view .basket-line--unavailable .basket-line__image {
  opacity: .55;
}

/* The branded placeholder, small: the mark only, as in the compact product list. */
.basket-view .basket-line__image .product-image-placeholder {
  gap: 0;
  padding: 6px;
}

.basket-view .basket-line__image img.product-image-placeholder__logo {
  max-width: 100%;
  width: 100%;
}

.basket-view .basket-line__image .product-image-placeholder__message {
  display: none;
}

.basket-view .basket-line__details p {
  margin: 0;
}

.basket-view .basket-line__name {
  font-size: 15px;
  line-height: 1.3;
}

.basket-view .basket-line__name a {
  text-decoration: none;
}

.basket-view .basket-line__name a:hover,
.basket-view .basket-line__name a:focus-visible {
  text-decoration: underline;
}

.basket-view .basket-line__meta,
.basket-view .basket-line__stock {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 2px;
}

.basket-view .basket-line__option {
  color: var(--steel);
  font-size: inherit;
}

.basket-view .basket-line__sku {
  font-size: inherit;
}

/* Availability in words, with a dot of its colour (the words carry it; the colour only echoes them). */
.basket-view .basket-line__status {
  font-weight: 650;
}

.basket-view .basket-line__status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 7px;
  margin: 0 6px 1px 0;
  vertical-align: middle;
  width: 7px;
}

.basket-view .basket-line__check {
  color: var(--warn);
  font-weight: 650;
}

.basket-view .basket-line__problem {
  font-size: 13px;
  margin-top: 4px;
}

.basket-view .basket-line__price {
  display: block;
  text-align: right;
  white-space: nowrap;
}

.basket-view .basket-line__price p {
  margin: 0;
}

.basket-view .basket-line__total {
  font-size: 16px;
  font-weight: 700;
}

.basket-view .basket-line__total small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.basket-view .basket-line__unit {
  color: var(--muted);
  font-size: 12px;
}

.basket-view .basket-line__controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.basket-view .basket-line__update {
  align-items: center;
  gap: 6px;
}

.basket-view .basket-line__update input {
  text-align: center;
  width: 58px;
}

.basket-view .basket-line__qty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* Remove: a quiet text action, still a 44 px target. */
.basket-view .basket-button--remove {
  background: none;
  border-color: transparent;
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.basket-view .basket-button--remove:hover,
.basket-view .basket-button--remove:focus-visible {
  color: var(--red);
}

/* A wide list (tablet, desktop): one row per line. */
@container (min-width: 600px) {
  .basket-view .basket-line {
    gap: 8px 16px;
    grid-template-areas: "image details controls price";
    grid-template-columns: 64px minmax(0, 1fr) auto 104px;
  }

  .basket-view .basket-line__image {
    align-self: center;
    width: 64px;
  }
}

/* Summary: not a card. A rule above it, the method as compact radio rows with the chosen one's conditions beneath. */
.basket-view .basket-summary {
  background: none;
  border: 0;
  border-top: 2px solid var(--ink);
  margin-bottom: 32px;
  padding: 14px 0 0;
}

/* Quantity: − number + as one control (the buttons appear with scripting; Update steps aside). */
.basket-view .basket-qty {
  align-items: center;
  display: inline-flex;
}

.basket-view .basket-qty__step {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  height: 44px;
  line-height: 1;
  width: 40px;
}

.basket-view .basket-qty__step[hidden] {
  display: none;
}

.basket-view .basket-qty__step:first-child {
  border-right: 0;
}

.basket-view .basket-qty__step:last-child {
  border-left: 0;
}

.basket-view .basket-qty__step:hover,
.basket-view .basket-qty__step:focus-visible {
  border-color: var(--ink);
  position: relative;
  z-index: 1;
}

.basket-view .basket-qty input {
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.basket-view .basket-button--update[hidden] {
  display: none;
}

.basket-view .basket-summary h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

.basket-view .basket-fulfilment {
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.basket-view .crumbs {
  margin-top: 14px;
}

.basket-view .basket-fulfilment fieldset {
  gap: 0;
  margin: 0;
}

.basket-view .basket-fulfilment legend {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.basket-view .basket-fulfilment__choice + .basket-fulfilment__choice {
  border-top: 1px solid var(--line);
}

.basket-view .basket-fulfilment__option {
  align-items: center;
  border: 0;
  padding: 8px 0;
}

.basket-view .basket-fulfilment__option:has(input:checked) {
  box-shadow: none;
}

.basket-view .basket-fulfilment__option input {
  margin: 0;
}

.basket-view .basket-fulfilment__option span {
  display: inline;
}

.basket-view .basket-fulfilment__name {
  flex: 1;
  font-size: 15px;
}

.basket-view .basket-fulfilment__option:has(input:checked) .basket-fulfilment__name {
  font-weight: 700;
}

.basket-view .basket-fulfilment__price {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.basket-view .basket-fulfilment__price small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.basket-view .basket-fulfilment__hint,
.basket-view .basket-fulfilment__detail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: -4px 0 6px 30px;
}

.basket-view .basket-fulfilment__detail p {
  margin: 0;
}

.basket-view .basket-fulfilment__detail {
  display: none;
}

.basket-view .basket-fulfilment__choice:has(input:checked) .basket-fulfilment__detail {
  display: block;
}

@supports not selector(:has(*)) {
  .basket-view .basket-fulfilment__choice.is-chosen .basket-fulfilment__detail {
    display: block;
  }
}

.basket-view .basket-summary dl {
  font-size: 15px;
  margin: 0 0 4px;
}

.basket-view .basket-summary dl div {
  gap: 12px;
  padding: 3px 0;
}

.basket-view .basket-summary dd {
  text-align: right;
}

.basket-view .basket-summary__confirm {
  font-size: 13px;
  line-height: 1.4;
}

.basket-view .basket-summary__note {
  font-size: 13px;
  margin: 10px 0 0;
}

.basket-view .basket-summary__continue {
  display: inline-block;
  font-size: 14px;
  margin-top: 10px;
}

.basket-view .basket-qa-link {
  margin: 0 0 12px;
}

@media (min-width: 720px) {
  /* Below 1024 px the summary sits under the list, its two halves side by side: the choice, then totals and
     Checkout, so Checkout is reached without a long scroll. */
  .basket-view .site-shell {
    display: block;
  }

  .basket-view .basket-summary {
    column-gap: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    position: static;
  }

  .basket-view .basket-summary > * {
    grid-column: 2;
  }

  .basket-view .basket-summary > h2 {
    grid-column: 1 / -1;
  }

  .basket-view .basket-summary > .basket-fulfilment {
    border-bottom: 0;
    grid-column: 1;
    grid-row: 2 / span 6;
    margin: 0;
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .basket-view .site-shell {
    column-gap: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .basket-view .crumbs,
  .basket-view .category-heading,
  .basket-view .basket-qa-link,
  .basket-view .basket-notice,
  .basket-view .basket-empty {
    grid-column: 1 / -1;
  }

  .basket-view .basket-summary {
    align-self: start;
    display: block;
    position: sticky;
    top: 16px;
  }
}

/* The basket link: in the utility bar on wider screens, in the header row
   beside the menu on phones, so the phone utility bar stays one row. */
.header-basket {
  display: none;
}

@media (max-width: 719px) {
  .utility-basket {
    display: none;
  }

  .header-inner--basket {
    grid-template-columns: 1fr auto 42px;
  }

  .header-basket {
    align-items: center;
    border: 1px solid var(--steel);
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    height: 42px;
    padding: 0 10px;
    text-transform: uppercase;
  }

  .header-basket__count {
    background: var(--red);
    color: #fff;
    font-size: 12px;
    min-width: 20px;
    padding: 1px 5px;
    text-align: center;
  }
}

/* Customer account entry (templates/_account_links.html, customers/navigation.py): the same links at
   every width. From 720 px a tab at the right of the utility bar: Sign in, then Register in the brand
   red. On phones a person button in the header row beside the basket, and two full-width buttons at
   the top of the menu. */
.header-basket__icon,
.account-tab,
.site-nav__account {
  display: none;
}

.account-icon {
  flex: none;
}

@media (min-width: 720px) {
  .utility-controls {
    align-self: stretch;
  }

  .account-tab {
    align-self: stretch;
    display: flex;
  }

  .utility-inner .account-tab__link {
    align-items: center;
    background: #fff;
    color: var(--ink);
    display: inline-flex;
    font-weight: 700;
    gap: 6px;
    padding: 0 12px;
  }

  .utility-inner .account-tab__register {
    background: var(--red);
    color: #fff;
  }

  .utility-inner .account-tab__link:hover {
    background: var(--surface);
  }

  .utility-inner .account-tab__register:hover {
    background: var(--red-deep);
  }

  .account-tab__link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
  }

  .account-tab__register:focus-visible {
    outline-color: var(--ink);
  }
}

/* Tablets: with the account tab, the delivery promises take their own row below, as on phones,
   instead of wrapping into narrow stacks. */
@media (min-width: 720px) and (max-width: 1039px) {
  .utility-inner--account {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
  }

  .utility-inner--account .utility-contact {
    grid-column: 1;
    grid-row: 1;
  }

  .utility-inner--account .utility-controls {
    grid-column: 2;
    grid-row: 1;
    min-height: 36px;
  }

  .utility-inner--account .utility-services {
    border-top: 1px solid var(--steel);
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 6px 0;
  }
}

@media (max-width: 719px) {
  .header-inner--account {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
  }

  .header-inner--account.header-inner--basket {
    grid-template-columns: minmax(0, 1fr) 42px auto 42px;
  }

  .site-logo {
    min-width: 0;
  }

  .site-logo img {
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }

  .header-account {
    color: #fff;
  }

  /* Beside the account button the basket shows its icon and count; the link's label still says
     "Basket, n items". */
  .header-inner--account .header-basket {
    padding: 0 8px;
  }

  .header-inner--account .header-basket__icon {
    display: block;
  }

  .header-inner--account .header-basket__label {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .site-nav__account {
    border-bottom: 1px solid var(--steel);
    display: grid;
    gap: 8px;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    margin-bottom: 4px;
    padding-bottom: 12px;
  }

  .site-nav .site-nav__account-link {
    align-items: center;
    border: 1px solid var(--silver);
    display: flex;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
  }

  .site-nav .site-nav__account-link--register {
    background: var(--red);
    border-color: var(--red);
  }
}

/* Guest checkout (orders/): the basket's two-column layout, a form or a review beside the summary. */
.basket-summary__checkout {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
  min-height: 48px;
  width: 100%;
}

.checkout-form,
.checkout-review {
  align-content: start;
  margin-bottom: 32px;
  min-width: 0;
}

.checkout-form__group {
  border: 0;
  display: grid;
  gap: 14px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.checkout-form__group legend,
.checkout-collect h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  padding: 0;
}

.checkout-form__note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.checkout-collect p {
  margin: 0;
  overflow-wrap: anywhere;
}

.checkout-form .btn-primary {
  min-height: 48px;
  width: 100%;
}

/* ------------------------------------------------------------------
   Checkout details as a short wizard (orders/checkout.html, static/js/checkout-wizard.js), 19 November 2026:
   one calm column, one question at a time, the basket total always in sight. Without JavaScript (no .is-wizard)
   the same form shows whole, in the same order.
   ------------------------------------------------------------------ */
/* Review as the wizard's last step: the same column, sections on hairlines instead of boxed panels, the order and its
   total just before the acknowledgement and the button, at every width. */
.checkout-review-page .checkout-review {
  gap: 0;
  margin-top: 14px;
}

.checkout-review-page .checkout-review__panel,
.checkout-review-page .checkout-summary {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 16px 0 10px;
  position: static;
}

.checkout-review-page .checkout-summary {
  padding-bottom: 16px;
}

.checkout-review-page .checkout-review__panel h2,
.checkout-review-page .checkout-summary h2 {
  font-size: 17px;
  margin: 0 0 8px;
}

.checkout-review-page .checkout-review__list {
  gap: 4px 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 4px;
}

.checkout-review-page .checkout-review__edit {
  font-size: 14px;
  min-height: 40px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkout-review-page .checkout-review__next {
  margin-top: 18px;
}

.checkout-review-page .checkout-review__pay {
  margin-top: 6px;
}

.checkout-review-page .checkout-lines {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

/* Review's Terms acknowledgement (orders/_terms_note.html): a full-width, 44 px tall tap target, never pre-ticked. */
.checkout-terms {
  display: grid;
  gap: 6px;
}

.checkout-terms__agree {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  font-weight: 700;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
}

.checkout-terms__agree input {
  accent-color: var(--red);
  flex: none;
  height: 22px;
  margin: 0;
  width: 22px;
}

.checkout-terms__agree a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkout-review__amount {
  font-size: 15px;
  margin: 4px 0 0;
}

.checkout-review__amount strong {
  font-size: 18px;
}

.checkout-wizard-page .site-shell {
  display: block;
}

.checkout-wizard {
  margin: 0 auto 48px;
  max-width: 640px;
}

.checkout-wizard__head {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  padding: 14px 0;
}

.checkout-wizard__head h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  margin: 0;
}

.checkout-total {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 4px 12px;
  margin: 0;
}

.checkout-total strong {
  color: var(--ink);
  font-size: 16px;
}

.checkout-total__edit {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The step indicator: thin segments, the current one red. */
.checkout-steps {
  display: grid;
  gap: 6px;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.checkout-steps[hidden] {
  display: none;
}

.checkout-steps li {
  border-top: 3px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  overflow: hidden;
  padding-top: 6px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.checkout-steps li.is-done {
  border-top-color: var(--ink);
  color: var(--steel);
}

.checkout-steps li[aria-current="step"] {
  border-top-color: var(--red);
  color: var(--ink);
}

.checkout-steps--review {
  grid-column: 1 / -1;
  margin: 0 0 16px;
  max-width: 640px;
}

.checkout-wizard .checkout-form {
  display: grid;
  gap: 28px;
  margin: 22px 0 0;
}

.checkout-step {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.checkout-step[hidden] {
  display: none;
}

.checkout-step__title {
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.checkout-step__title:focus:not(:focus-visible) {
  outline: none;
}

.checkout-step__lede,
.checkout-step__note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.checkout-step__payment {
  border-left: 3px solid var(--warn);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 2px 0 2px 10px;
}

/* Who for: two large, quiet choices. */
.checkout-buyer {
  border: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  min-width: 0;
  padding: 0;
}

.checkout-buyer__choice {
  align-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 10px 20px;
  position: relative;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* The radio itself covers its whole choice, invisibly: the target is the full tile. */
.checkout-buyer__choice input {
  cursor: pointer;
  height: 100%;
  inset: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.checkout-buyer__icon {
  fill: none;
  height: 44px;
  margin-bottom: 8px;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: stroke .15s ease;
  width: 44px;
}

.checkout-buyer__label {
  font-size: 17px;
  font-weight: 700;
}

.checkout-buyer__hint {
  color: var(--muted);
  font-size: 13px;
}

.checkout-buyer__choice:hover {
  border-color: var(--steel);
}

.checkout-buyer__choice:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--red);
}

/* How to check out: three choices, one per row on a phone, side by side from 560px. The chosen one's panel
   (sign in, create an account, guest) sits under them. */
.checkout-account {
  grid-template-columns: minmax(0, 1fr);
}

.checkout-account .checkout-buyer__choice {
  align-items: flex-start;
  padding: 16px 18px 14px;
  text-align: left;
}

.checkout-account__panel {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 16px;
  max-width: 560px;
}

.checkout-account__panel[hidden] {
  display: none;
}

/* Without the script, the panel's link is the way on; with it, Continue carries its words instead. */
.checkout-account__panel a.btn-primary {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  width: auto;
}

.checkout-form.is-wizard [data-account-go] {
  display: none;
}

@media (min-width: 560px) {
  .checkout-account {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.checkout-buyer__choice:has(input:checked) .checkout-buyer__icon {
  stroke: var(--red);
}

.checkout-buyer__choice:has(input:focus-visible) {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* Fields: compact pairs from 560 px; the postcode first, then the lines it belongs to. */
.checkout-fields {
  display: grid;
  gap: 14px;
}

.checkout-saved {
  display: grid;
  gap: 8px;
}

.checkout-saved__title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.checkout-saved__address {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  min-height: 44px;
  padding: 8px 12px;
  text-decoration: none;
}

.checkout-saved__address:hover,
.checkout-saved__address:focus-visible {
  border-color: var(--ink);
}

.checkout-business summary {
  align-items: center;
  color: var(--steel);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  list-style: none;
  min-height: 44px;
}

.checkout-business summary::-webkit-details-marker {
  display: none;
}

.checkout-business summary::before {
  border: 1px solid currentColor;
  content: "+";
  display: inline-grid;
  font-size: 14px;
  height: 18px;
  line-height: 1;
  place-items: center;
  width: 18px;
}

.checkout-business[open] summary::before {
  content: "\2013";
}

.checkout-business[open] summary {
  margin-bottom: 6px;
}

.checkout-wizard .checkout-collect {
  display: grid;
  gap: 2px;
}

.checkout-wizard .checkout-collect h3 {
  font-size: 13px;
  margin: 10px 0 0;
}

/* Back on the left, the one primary action on the right. */
.checkout-wizard .checkout-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding-top: 18px;
}

.checkout-wizard .checkout-actions > [hidden] {
  display: none;
}

.checkout-wizard .checkout-actions .btn-primary {
  flex: 1;
  margin-left: auto;
}

.checkout-actions__back {
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  padding: 0 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes checkout-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.checkout-step.is-entering {
  animation: checkout-step-in 240ms cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .checkout-step.is-entering {
    animation: none;
  }

  .checkout-buyer__choice,
  .checkout-buyer__icon {
    transition: none;
  }
}

@media (min-width: 560px) {
  .checkout-fields--contact,
  .checkout-fields--address,
  .checkout-fields--business {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-fields--contact > :first-child,
  .checkout-fields--address > :nth-child(2),
  .checkout-fields--address > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .checkout-wizard .checkout-actions .btn-primary {
    flex: 0 0 auto;
    min-width: 240px;
    width: auto;
  }
}

.checkout-review {
  display: grid;
  gap: 16px;
}

.checkout-review__panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.checkout-review__panel h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

.checkout-review__list {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.checkout-review__list div {
  display: grid;
  gap: 2px;
}

.checkout-review__list dt {
  color: var(--muted);
  font-size: 13px;
}

.checkout-review__list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.checkout-review__address {
  font-style: normal;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.checkout-review__edit {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  min-height: 44px;
}

.checkout-review__next {
  border-left: 3px solid var(--warn);
  margin: 0;
  padding: 4px 0 4px 10px;
}

.checkout-lines {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.checkout-lines p {
  margin: 0;
  overflow-wrap: anywhere;
}

.checkout-lines__name {
  font-weight: 700;
}

.checkout-lines__name span,
.checkout-lines__meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.checkout-lines__total {
  font-weight: 700;
  text-align: right;
}

.checkout-review__pay {
  display: grid;
  gap: 10px;
}

.checkout-review__pay .btn-primary,
.checkout-result .btn-primary {
  min-height: 48px;
  width: 100%;
}

.checkout-result .checkout-review__panel {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.checkout-result h2,
.checkout-result p {
  margin: 0;
}

/* Add product opened from a scan: the code it will be saved with, read-only. */
.scan-context {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  min-width: 0;
  padding: 12px 14px;
}

@media (min-width: 720px) {
  /* Inside a form on a wide screen the scan button is one action among many, not the page's main one. */
  .scan-context .desk-scan__button,
  .staff-edit-form > .desk-scan .desk-scan__button {
    max-width: 320px;
  }
}

/* EXPERIMENT: suggested details for a scanned barcode (ops/includes/product_lookup_panel.html). */
.product-lookup {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.product-lookup__card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.product-lookup__card h4 {
  font-size: 15px;
  margin: 0;
}

.product-lookup__provider {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 8px;
}

.product-lookup__card dl {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.product-lookup__card dt {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-lookup__card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.product-lookup__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.product-lookup__actions button,
.product-lookup__button {
  min-height: 44px;
}

.product-lookup--scan {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 10px;
}

.product-lookup--scan .product-lookup__card {
  border: 0;
  display: grid;
  gap: 7px;
  padding: 0;
}

.product-lookup--scan .product-lookup__card > .eyebrow,
.product-lookup--scan .product-lookup__card > h3,
.product-lookup__brand,
.product-lookup__identity-meta,
.product-lookup__human-note,
.product-lookup__local > p {
  margin: 0;
}

.product-lookup__brand {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  min-height: 1em;
  text-transform: uppercase;
}

.product-lookup__identity-meta {
  color: var(--steel);
  font-size: 14px;
}

.product-lookup__identity-meta span + span::before {
  content: " · ";
}

.product-lookup__external-details {
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding-top: 3px;
}

.product-lookup__external-details summary,
.product-lookup__other-matches summary,
.scan-manual--collapsed > summary {
  color: var(--steel);
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 12px 0 8px;
}

.product-lookup__external-details > p,
.product-lookup__source > p {
  margin: 5px 0;
}

.product-lookup__local {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 3px;
  padding-top: 10px;
}

.product-lookup__local > .scan-action--primary {
  margin-top: 2px;
  width: 100%;
}

.product-lookup__candidate {
  background: var(--panel);
  border-left: 3px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.product-lookup__candidate[data-strong-candidate] {
  border-left-color: var(--red);
}

.product-lookup__candidate-meta {
  color: var(--steel);
  font-size: 13px;
}

.product-lookup__candidate-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-lookup__candidate-list > li {
  display: grid;
  gap: 5px;
}

.product-lookup__other-matches,
.product-lookup__none {
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 2px;
}

.product-lookup__none {
  display: grid;
  gap: 5px;
  padding-top: 10px;
}

.product-lookup__none p,
.product-lookup__version-label {
  margin: 0;
}

.product-lookup__source + .product-lookup__source,
.product-lookup__candidates {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.product-lookup__candidate p {
  margin: 0;
}

.product-lookup__working p,
.product-lookup__decision > p,
.product-lookup__references p {
  margin: 0;
}

.product-lookup__working {
  display: grid;
  gap: 3px;
}

.product-lookup__decision {
  display: grid;
  gap: 8px;
}

.product-lookup__identify-icon {
  color: var(--steel);
  height: 44px;
  margin: 0 auto 2px;
  opacity: 0.72;
  width: 44px;
}

.product-lookup__identify-icon svg {
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.6;
  width: 100%;
}

.product-lookup__identify-icon svg path:last-child {
  stroke: var(--red);
  stroke-width: 2;
}

.product-lookup__decision .eyebrow {
  color: var(--red-deep);
}

.product-lookup__evidence,
.product-lookup__references,
.product-lookup__reference-form {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.product-lookup__evidence summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding-top: 10px;
}

.product-lookup__references ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.product-lookup--scan .product-lookup__actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
}

.product-lookup--scan .product-lookup__actions form,
.product-lookup--scan .product-lookup__actions button,
.product-lookup--scan .product-lookup__actions a {
  width: 100%;
}

@media (min-width: 720px) {
  .product-lookup--scan .product-lookup__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.scan-choice-separator {
  align-items: center;
  color: var(--steel);
  display: grid;
  font-size: 12px;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  margin: 2px 0;
  text-transform: uppercase;
}

.scan-choice-separator::before,
.scan-choice-separator::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.scan-manual {
  display: grid;
  gap: 7px;
}

.scan-manual__content {
  display: grid;
  gap: 7px;
}

.scan-manual--collapsed {
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.scan-manual--collapsed[open] {
  padding-bottom: 4px;
}

.scan-manual .eyebrow,
.scan-manual__resume,
.scan-manual__help {
  margin: 0;
}

.scan-manual__help {
  font-size: 13px;
  line-height: 1.4;
}

.scan-manual__form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.scan-manual__form input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 48px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.scan-manual__form button {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  padding: 0 14px;
}

.scan-context--problem {
  border-left-color: var(--red);
}

.scan-context h3,
.scan-context p {
  margin: 0;
}

.scan-context__code {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.scan-context__scheme {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Stock (Tier 3): on hand, Receive on the Availability desk, adjustments on the product page. */
.desk-stock {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding-top: 12px;
}

.desk-stock h3,
.desk-stock p {
  margin: 0;
}

.desk-stock__on-hand strong {
  font-size: 20px;
}

/* A never-counted item asked to receive (templates/ops/includes/stock_not_counted.html): one question, no form. */
.stock-not-counted {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.stock-not-counted h3,
.stock-not-counted p {
  margin: 0;
}

.stock-not-counted__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 4px;
}

.stock-not-counted__primary {
  align-items: center;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
}

.stock-not-counted__primary:hover,
.stock-not-counted__primary:focus-visible {
  background: var(--red-deep);
  color: #fff;
}

@media (max-width: 719px) {
  .stock-not-counted__primary {
    width: 100%;
  }
}

.desk-receive {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.desk-receive .desk-pack {
  grid-column: 1 / -1;
}

.desk-receive__field {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  min-width: 0;
}

.desk-receive__field input,
.stock-panel input,
.staff-edit-form .stock-actions input {
  min-height: 44px;
}

.desk-receive__field input {
  border: 1px solid var(--line);
  font: inherit;
  font-size: 16px; /* the label is 13px; the box is never below 16px, or Safari on iPhone zooms in */
  font-weight: 400;
  padding: 8px 10px;
  width: 100%;
}

.desk-receive__button {
  background: var(--red);
  border: 0;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
  text-transform: uppercase;
}

.desk-option__receive {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
}

.stock-rows {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.stock-rows div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 6px 0;
}

.stock-rows dt,
.stock-rows dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The label keeps its words whole ("Stock", "Box of 10"): it takes what it needs, up to 45%, and wraps between words;
   only a word longer than that (a long SKU) breaks. */
.stock-rows dt {
  flex: 0 0 auto;
  max-width: 45%;
  overflow-wrap: break-word;
}

.stock-movements {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stock-movements li {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.stock-confirm {
  display: grid;
  gap: 10px;
}

.stock-confirm h2,
.stock-confirm p {
  margin: 0;
}

.stock-confirm__sum {
  font-size: 18px;
}

.stock-confirm__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stock-confirm__actions .staff-secondary-link {
  min-height: 44px;
}

.stock-actions {
  border: 0;
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
}

.stock-actions__choice {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 44px;
}

/* Stock counting and alerts (Tier 3). */
.count-item {
  display: grid;
  gap: 8px;
}

.count-item h2,
.count-item p {
  margin: 0;
}

.count-item__option {
  color: var(--muted);
  font-weight: 600;
}

.count-item__recorded strong {
  font-size: 20px;
}

.stock-count-link {
  min-height: 44px;
}

.stock-review-list,
.stock-alert-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stock-review,
.stock-alert {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
  padding-bottom: 10px;
}

.stock-review p {
  margin: 0;
}

.stock-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Reject a count: destructive, so its own deep red outline and text, never mistaken for the solid red Apply. */
.stock-reject {
  background: #fff;
  border: 2px solid var(--red-deep);
  color: var(--red-deep);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
  text-transform: uppercase;
}

.stock-reject:hover,
.stock-reject:focus-visible {
  background: var(--red-deep);
  color: #fff;
}

.stock-state {
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
}

.stock-state--out {
  color: var(--red-deep);
}

.stock-state--low {
  color: var(--warn);
}

.stock-threshold {
  display: block;
  font-size: 12px;
}

/* Reservation shortfalls: more promised than is physically there. */
.stock-shortfalls {
  border-left: 4px solid var(--red);
}

.desk-stock__levels {
  font-size: 14px;
}

/* Goods In sessions (Tier 3). */
.goods-in-totals {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 12px;
}

.goods-in-totals div {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.goods-in-totals dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.goods-in-totals dd {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.goods-in-link,
.goods-in-primary {
  min-height: 44px;
}

.goods-in-start .goods-in-primary {
  width: 100%;
}

.goods-in .staff-action-row a,
.stock-overview__actions a {
  min-height: 44px;
}

/* Owner previews of emails and documents. */
.billing-totals {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 12px;
}

.billing-totals div {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.billing-totals dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.billing-totals dd {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

/* Checkout billing address: "Same as delivery address" as a full-width, easy tap target. */
.checkout-billing__same {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 10px;
  min-height: 44px;
}

.checkout-billing__same input {
  accent-color: var(--red);
  flex: none;
  height: 22px;
  margin: 0;
  width: 22px;
}

.checkout-billing__fields {
  display: grid;
  gap: 14px;
}

.checkout-billing__fields[hidden] {
  display: none;
}

/* The enquiry form's bot trap: in the form for bots, off-screen for people. Not display:none,
   which some bots skip. */
.enquiry-form__trap {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

/* Cloudflare Turnstile (templates/includes/turnstile.html): invisible unless Cloudflare asks for a tick. */
.turnstile-widget {
  margin: 4px 0 0;
  max-width: 100%;
}

/* The wait line (static/js/turnstile-wait.js): empty, and so hidden, until a submission is held. */
.turnstile-status {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.turnstile-status:empty {
  display: none;
}

/* ------------------------------------------------------------------
   Staff header: product search (desktop) and the account controls,
   behind the badge (desktop) or in the menu (phones).
   templates/ops/base.html
   ------------------------------------------------------------------ */
.staff-product-search {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.staff-product-search input {
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 15px;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.staff-header__search {
  display: none;
}

.staff-header__search input {
  background: #fff;
  border-color: var(--steel);
  color: var(--ink);
  font-size: 16px; /* never below 16px: Safari on iPad zooms in on a smaller box */
  min-height: 36px;
}

.staff-header__search button {
  background: transparent;
  border: 1px solid var(--steel);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 12px;
  text-transform: uppercase;
}

.staff-header__search button:hover,
.staff-header__search button:focus {
  border-color: var(--red);
}

.staff-nav__account {
  border-top: 1px solid var(--steel);
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-top: 10px;
}

.staff-user-menu {
  position: relative;
}

.staff-user-menu__badge {
  align-items: center;
  border: 1px solid var(--steel);
  color: #fff;
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0 10px 0 5px;
}

.staff-user-menu__badge::-webkit-details-marker {
  display: none;
}

/* The chevron: down when closed, up when open. */
.staff-user-menu__badge::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  height: 7px;
  margin-top: -4px;
  transform: rotate(45deg);
  width: 7px;
}

.staff-user-menu[open] > .staff-user-menu__badge::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.staff-user-menu__badge:hover,
.staff-user-menu[open] > .staff-user-menu__badge {
  border-color: var(--red);
}

/* The current page is behind this badge (a Manage destination or My account). */
.staff-user-menu__badge.is-current {
  border-color: var(--red);
}

.staff-user-menu__badge.is-current .staff-user-menu__initials {
  background: var(--red);
}

.staff-user-menu__heading,
.staff-nav__account-heading {
  color: #b9bcc2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  padding: 10px 15px 2px;
  text-transform: uppercase;
}

.staff-nav__account-heading {
  padding: 10px 12px 2px;
}

.staff-user-menu__panel [data-manage-link] + a:not([data-manage-link]),
.staff-nav__account [data-manage-link] + a:not([data-manage-link]) {
  border-top: 1px solid var(--steel);
  margin-top: 6px;
  padding-top: 12px;
}

.staff-user-menu__initials {
  align-items: center;
  background: var(--steel);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 32px;
}

.staff-user-menu__panel {
  background: var(--charcoal);
  border: 1px solid var(--steel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 90px);
  max-width: calc(100vw - 32px);
  overflow: auto;
  padding: 12px 0 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 280px;
  z-index: 50;
}

.staff-nav__account .staff-user,
.staff-user-menu__panel .staff-user {
  min-height: 0;
  padding: 0 12px 4px;
}

.staff-user-menu__panel .staff-user {
  border-bottom: 1px solid var(--steel);
  padding: 0 15px 10px;
}

.staff-nav__account form,
.staff-user-menu__panel form {
  margin: 0;
}

.staff-nav__account a,
.staff-nav__account button,
.staff-user-menu__panel a,
.staff-user-menu__panel button {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
  width: 100%;
}

.staff-nav__account a:hover,
.staff-nav__account a:focus,
.staff-nav__account button:hover,
.staff-nav__account button:focus,
.staff-user-menu__panel a:hover,
.staff-user-menu__panel a:focus,
.staff-user-menu__panel button:hover,
.staff-user-menu__panel button:focus,
.staff-user-menu__panel a[aria-current="page"] {
  background: #fff;
  border-left-color: var(--red);
  color: var(--ink);
}

@media (max-width: 719px) {
  /* Phones: the top bar is the logo and the menu button; the account controls are in the menu. */
  .staff-header--signed-in .staff-header__actions {
    display: none;
  }

  .staff-nav a {
    min-height: 44px;
  }
}

@media (min-width: 720px) {
  .staff-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .staff-header__search {
    display: grid;
    justify-self: center;
    max-width: 460px;
    width: 100%;
  }

  .staff-nav__account {
    display: none;
  }
}

/* ------------------------------------------------------------------
   Dashboard: what needs attention, then the catalogue at a glance.
   templates/ops/dashboard.html
   ------------------------------------------------------------------ */
.dashboard {
  gap: 16px;
  padding-top: 18px;
}

/* .staff-main's full-height minimum ignores the nav bar, which would scroll an otherwise
   one-screen dashboard by the nav's height; the dashboard is only as tall as its content. */
.staff-main:has(> .dashboard),
.staff-main:has(> .record-list) {
  min-height: 0;
}

/* Scan on a phone: the first thing under the title, thumb-sized (ops/scan_views.py). */
.dashboard__scan {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: flex;
  font-size: 17px;
  font-weight: 700;
  justify-content: center;
  min-height: 52px;
}

.dashboard__scan:hover,
.dashboard__scan:focus-visible {
  background: var(--red);
  color: #fff;
}

.dashboard__header,
.record-head {
  align-items: end;
  border-bottom: 2px solid var(--red);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.dashboard__eyebrow,
.record-head__eyebrow {
  display: none;
  margin: 0 0 4px;
}

.dashboard__title,
.record-head__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-style: italic;
  line-height: 1;
  margin: 0;
}

.dashboard__tools {
  display: none;
  gap: 8px;
}

.dashboard__section {
  min-width: 0;
}

.dashboard__label {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

/* The primary live action stream: one row per business work unit, not one row per underlying event. */
.dashboard__actions {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  padding: 12px;
}

.dash-actions__heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-actions__heading .dashboard__label {
  color: var(--ink);
  font-size: 14px;
  margin: 0;
}

.dash-actions__heading p {
  color: var(--steel);
  font-size: 13px;
  margin: 2px 0 0;
}

.dash-actions__count {
  align-items: center;
  background: var(--red);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  justify-content: center;
  min-height: 28px;
  min-width: 28px;
  padding: 3px 8px;
}

.dash-actions__count--clear {
  background: var(--ok);
}

.dash-actions {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-action {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  color: var(--ink);
  display: grid;
  gap: 4px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 56px;
  padding: 8px 12px;
  text-decoration: none;
}

.dash-action--order-payment,
.dash-action--order-availability,
.dash-action--order-delivery,
.dash-action--queue-enquiries,
.dash-action--queue-health,
.dash-action--stocktake-review,
.dash-action--stock-count-review,
.dash-action--stock-alert {
  border-left-color: var(--red);
}

.dash-action--queue-review,
.dash-action--queue-drafts {
  border-left-color: var(--warn);
}

.dash-action__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dash-action__text span {
  color: var(--steel);
  font-size: 13px;
}

.dash-action__go {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.dash-action:hover,
.dash-action:focus-visible {
  border-color: var(--red);
}

.dash-actions__more {
  margin: 6px 0 0;
}

.dash-actions__clear {
  background: var(--surface);
  border-left: 4px solid var(--ok);
  color: var(--steel);
  margin: 0;
  padding: 12px;
}

.dash-actions__clear strong {
  color: var(--ok);
}

/* A phone: the action under the words, still one tap for the whole row. */
@media (max-width: 479px) {
  .dash-action {
    grid-template-columns: minmax(0, 1fr);
  }
}

.attention-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.attention-tile {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 2px;
  height: 100%;
  min-height: 44px;
  padding: 11px 12px;
  text-decoration: none;
}

.attention-tile--action {
  border: 2px solid var(--red);
  padding: 10px 11px;
}

.attention-tile__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.attention-tile__count {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.05;
}

.attention-tile--action .attention-tile__count {
  color: var(--red);
}

.attention-tile__status {
  color: var(--steel);
  font-size: 13px;
  line-height: 1.3;
}

.attention-tile--action .attention-tile__status {
  color: var(--ink);
  font-weight: 700;
}

.attention-tile:hover,
.attention-tile:focus-visible,
.dash-strip__item:hover,
.dash-strip__item:focus-visible,
.go-to-grid a:hover,
.go-to-grid a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.dash-strip {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-strip li + li {
  border-top: 1px solid var(--line);
}

.dash-strip__item {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 14px;
  text-decoration: none;
}

.dash-strip__item span {
  font-size: 14px;
  font-weight: 700;
}

.dash-strip__item strong {
  font-size: 18px;
}

.dash-strip--health .dash-strip__item strong {
  color: var(--muted);
}

.dash-strip--health .dash-strip__item--action strong {
  color: var(--red);
}

.go-to-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.go-to-grid a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  min-height: 46px;
  padding: 8px 12px;
  text-decoration: none;
}

@media (max-width: 719px) {
  /* All clear: the Health issues tile already says so. */
  .dashboard__health--clear {
    display: none;
  }
}

@media (min-width: 720px) {
  .dashboard {
    gap: 18px;
    padding-top: 24px;
  }

  .dashboard__eyebrow,
  .record-head__eyebrow {
    display: block;
  }

  .dashboard__title,
  .record-head__title {
    font-size: 40px;
  }

  .dashboard__tools {
    display: flex;
  }

  .dashboard__actions {
    padding: 14px 16px;
  }

  /* The header has the search on wider screens; the nav has every destination; Daily tools has Scan. */
  .dashboard__search,
  .dashboard__go-to,
  .dashboard__scan {
    display: none;
  }

  .attention-grid {
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .attention-tile {
    min-height: 105px;
    padding: 14px 16px;
  }

  .attention-tile--action {
    padding: 13px 15px;
  }

  .attention-tile__count {
    font-size: 34px;
  }

  .dash-strip {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
  }

  .dash-strip li + li {
    border-left: 1px solid var(--line);
    border-top: 0;
  }

  .dash-strip__item {
    min-height: 52px;
    padding: 10px 16px;
  }

  .dash-strip--health .dash-strip__item {
    min-height: 48px;
  }
}

/* ------------------------------------------------------------------
   Staff record lists (templates/ops/records/list.html): the Dashboard's
   header scale, one result line, a table on wider screens and compact
   rows on phones, laid out by each module's MobileLines (ops/records.py).
   ------------------------------------------------------------------ */
.record-list {
  gap: 12px;
  padding-top: 18px;
}

.record-head {
  flex-wrap: wrap;
}

.record-head__identity {
  min-width: 0;
}

.record-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-head__description {
  color: var(--steel);
  display: none;
  font-size: 14px;
  margin: -4px 0 0;
}

.record-count {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.record-rows {
  background: #fff;
  border: 1px solid var(--line);
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.record-row {
  align-items: start;
  column-gap: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px 12px;
  row-gap: 2px;
}

.record-row__line {
  grid-column: 1;
}

.record-row + .record-row {
  border-top: 1px solid var(--line);
}

.record-row__line {
  align-items: center;
  color: var(--steel);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 2px 14px; /* space, not "·": a wrapped line never starts with a separator */
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-row__item {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
}

.record-row__line--title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.record-row__line--title .record-row__item + .record-row__item::before {
  content: none;
  margin: 0;
}

.record-row__line--title a {
  color: var(--ink);
}

.record-row__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.record-row .staff-logo-thumb {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
  flex: none;
  height: 40px;
  justify-content: center;
  margin-right: 4px;
  overflow: hidden;
  width: 52px;
}

.record-row .staff-logo-thumb img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* View / Edit in a narrow column beside the details: comfortably tappable without adding a row. */
.record-row__actions {
  display: grid;
  gap: 6px;
  grid-column: 2;
  grid-row: 1 / span 4;
}

.record-row__actions a {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  min-width: 72px;
  padding: 0 12px;
  text-transform: uppercase;
}

.record-row .staff-logo-fallback {
  display: none;
}

.record-empty {
  padding: 16px;
}

@media (max-width: 719px) {
  .record-head__actions a,
  .record-head__actions summary,
  .staff-catalogue-search input[type="search"],
  .staff-catalogue-search button,
  .staff-filter-button,
  .pagination a,
  .pagination span {
    min-height: 44px;
  }

  .pagination a,
  .pagination span {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 44px;
  }

  .record-table,
  .record-head__wide-only {
    display: none;
  }

  .record-rows {
    display: block;
  }

  .record-list {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

@media (min-width: 720px) {
  .record-list {
    padding-top: 24px;
  }

  .record-head__description {
    display: block;
  }

  .record-head__narrow-only {
    display: none;
  }
}

/* ------------------------------------------------------------------
   Needs review (templates/ops/product_review_queue.html): the shared
   record header and phone rows, one summary line, and the breakdown
   behind a disclosure.
   ------------------------------------------------------------------ */
.review-summary {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.review-strip {
  color: var(--steel);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 4px 14px;
  margin: 0;
}

.review-strip strong {
  color: var(--ink);
}

.review-strip a {
  color: var(--steel);
}

.review-breakdown summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
  text-transform: uppercase;
}

.review-breakdown__body {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 10px 12px;
}

.review-breakdown__body h2 {
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.review-breakdown[open] {
  flex-basis: 100%;
}

.review-clear {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px 16px;
}

.review-clear h2 {
  font-size: 18px;
  margin: 0;
}

.review-clear h2 span {
  color: var(--ink);
  margin-right: 4px;
}

.review-clear p {
  color: var(--steel);
  margin: 4px 0 0;
}

.record-row__line--state {
  column-gap: 12px;
}

@media (max-width: 719px) {
  .review-breakdown summary {
    min-height: 44px;
  }
}

/* ------------------------------------------------------------------
   Categories (templates/ops/records/category_tree.html): the tree table
   on wider screens, an indented list with per-row Manage on phones.
   ------------------------------------------------------------------ */
/* The generic ".staff-table td span { display: block }" would put the branch marker and the
   name on separate lines; in the tree they share one. */
.staff-table--tree .staff-tree-name {
  align-items: baseline;
  display: flex;
  gap: 6px;
}

.staff-table--tree .staff-tree-branch {
  display: inline;
}

.category-meta {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.category-tree {
  background: #fff;
  border: 1px solid var(--line);
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-tree__item + .category-tree__item {
  border-top: 1px solid var(--line);
}

/* A new department starts a visibly new branch. */
.category-tree__item[aria-level="1"] + .category-tree__item[aria-level="1"],
.category-tree__item[aria-level="2"] + .category-tree__item[aria-level="1"] {
  border-top-color: var(--steel);
}

.category-tree__row {
  align-items: center;
  column-gap: 10px;
  display: flex;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 4px 8px 4px calc(12px + var(--depth, 0) * 18px);
}

.category-tree__name {
  align-items: baseline;
  display: inline-flex;
  flex: 1 1 0;
  font-size: 15px;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.category-tree__item[aria-level="2"] .category-tree__name {
  font-weight: 400;
}

.category-tree__name a {
  color: var(--ink);
}

.category-tree__item--context .category-tree__name a {
  color: var(--muted);
}

.category-tree__count {
  display: inline-grid;
  justify-items: end;
  line-height: 1.1;
  text-align: right;
}

.category-tree__count strong {
  font-size: 16px;
}

.category-tree__count small {
  color: var(--muted);
  font-size: 11px;
}

.category-tree__manage summary {
  align-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  list-style: none;
  min-height: 44px;
  min-width: 76px;
  padding: 0 10px;
  text-transform: uppercase;
}

.category-tree__manage summary::-webkit-details-marker {
  display: none;
}

.category-tree__manage[open] {
  flex-basis: 100%;
  order: 3;
}

.category-tree__manage[open] summary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.category-tree__actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 6px 0 4px;
}

.category-tree__actions > a,
.category-tree__actions .staff-tree-move button {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  text-decoration: none;
  text-transform: uppercase;
  width: 100%;
}

.category-tree__actions .staff-tree-move {
  display: block;
}

/* Move to: the select and Go on one full-width line. */
.category-tree__actions .staff-tree-move:last-child {
  display: flex;
  gap: 6px;
  grid-column: 1 / -1;
}

.category-tree__actions .staff-tree-move:last-child select {
  flex: 1 1 auto;
  min-height: 44px;
  min-width: 0;
}

.category-tree__actions .staff-tree-move:last-child button {
  width: auto;
}

@media (max-width: 719px) {
  .category-tree {
    display: block;
  }
}

/* Enquiries as a queue (ops/enquiry_record.py). The status line under the header: each state a
   44px link, the waiting work (New) marked like the nav badge while there is any, zeros quiet,
   the chosen state underlined. It wraps as a line, never as cards. */
.staff-catalogue-summary--queue {
  font-size: 14px;
  gap: 0 10px;
}

.staff-catalogue-summary--queue a {
  display: inline-block;
  line-height: 44px;
  min-height: 44px;
}

.staff-catalogue-summary--queue a strong {
  margin-right: 3px;
}

.staff-catalogue-summary--queue a.is-attention {
  color: var(--ink);
  font-weight: 700;
}

.staff-catalogue-summary--queue a.is-attention strong {
  background: var(--red);
  color: #fff;
  line-height: 1;
  padding: 3px 6px;
}

.staff-catalogue-summary--queue a.is-zero,
.staff-catalogue-summary--queue a.is-zero strong {
  color: var(--muted);
  font-weight: 400;
}

.staff-catalogue-summary--queue a[aria-current="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* An enquiry's cells: the useful part first, the email and SKUs second and quiet. */
.enquiry-customer {
  font-weight: 700;
}

.staff-table .enquiry-secondary,
.enquiry-secondary {
  color: var(--muted);
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* A long address is cut short with its whole self in the tooltip, never broken mid-word. */
.staff-table .enquiry-email {
  max-width: 24ch;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enquiry-age {
  color: var(--steel);
  white-space: nowrap;
}

.record-row__line--title .enquiry-age {
  font-size: 14px;
  font-weight: 400;
}

.record-row__line--title .enquiry-age::before {
  color: var(--muted);
  content: "·";
  margin: 0 8px 0 2px;
}

/* Inline in the table too, where a shared rule makes every cell span a block. */
.staff-table td .enquiry-status {
  display: inline-block;
}

.enquiry-status {
  border: 1px solid var(--line);
  color: var(--steel);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding: 2px 7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.enquiry-status--new {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.enquiry-status--in_progress {
  border-color: var(--ink);
  color: var(--ink);
}

/* Handled (Answered, or Done when no answer was needed): a green tick, never a word that reads as cancelled. */
.enquiry-status--answered,
.enquiry-status--closed {
  align-items: center;
  border-color: var(--ok);
  color: var(--ok);
  display: inline-flex;
  gap: 4px;
}

.enquiry-status .wf-icon,
.wf-status .wf-icon {
  height: 14px;
  width: 14px;
}

/* ------------------------------------------------------------------
   Workflow screens (docs/DESIGN.md, Workflow screens), first used by an enquiry's page: context head, the thing
   itself, facts as an icon row, one main action, then a quiet activity timeline. No cards: spacing, one red rule,
   icons and colour do the grouping. Forms open as sheets (dialog[data-sheet], static/js/staff-sheets.js).
------------------------------------------------------------------ */
.wf {
  display: grid;
  gap: 16px;
  max-width: 1180px;
}

.wf-icon {
  flex: none;
}

.wf-back {
  align-items: center;
  align-self: start;
  color: var(--steel);
  display: inline-flex;
  font-weight: 600;
  gap: 6px;
  justify-self: start;
  min-height: 40px;
  text-decoration: none;
}

.wf-back:hover,
.wf-back:focus-visible {
  color: var(--red);
}

.wf-notice {
  align-items: center;
  color: var(--ok);
  display: flex;
  font-weight: 600;
  gap: 8px;
  margin: 0;
}

.wf-head {
  align-items: flex-start;
  border-bottom: 2px solid var(--red);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.wf-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.wf-head h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-style: italic;
  line-height: 1.1;
  margin: 0;
}

.wf-head__option {
  color: var(--steel);
}

/* State as a coloured word with a dot: red waits for someone, green is done, grey is closed. */
.wf-status {
  align-items: center;
  border: 1px solid currentColor;
  display: inline-flex;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.wf-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 8px;
  width: 8px;
}

.wf-status--new {
  color: var(--red);
}

.wf-status--answered,
.wf-status--closed {
  color: var(--ok);
}

/* Done states carry a tick instead of the dot. */
.wf-status--answered::before,
.wf-status--closed::before {
  display: none;
}

.wf-meta,
.wf-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wf-meta li,
.wf-facts li {
  align-items: center;
  color: var(--steel);
  display: inline-flex;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wf-facts strong {
  color: var(--ink);
}

.wf-body {
  display: grid;
  gap: 28px;
}

.wf-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

/* The thing itself (their words) is the largest text on the screen. */
.wf-quote {
  border-left: 4px solid var(--red);
  color: var(--ink);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
  margin: 0;
  max-width: 60ch;
  overflow-wrap: anywhere;
  padding: 2px 0 2px 16px;
}

.wf-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
}

.wf-actions form {
  margin: 0;
}

.wf-btn {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
}

.wf-btn:hover,
.wf-btn:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

/* The one main action. */
.wf-btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.wf-btn--primary:hover,
.wf-btn--primary:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #fff;
}

.wf-btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--steel);
  padding: 0 10px;
}

.wf-done {
  align-items: center;
  color: var(--ok);
  display: flex;
  flex-basis: 100%;
  font-weight: 600;
  gap: 8px;
  margin: 0;
}

.wf-activity h2 {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.wf-timeline {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wf-timeline__item {
  display: grid;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr);
}

.wf-timeline__icon {
  color: var(--steel);
  padding-top: 1px;
}

.wf-timeline__item--warn .wf-timeline__icon {
  color: var(--warn);
}

.wf-timeline__title {
  margin: 0;
}

.wf-timeline__meta {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.wf-timeline__body {
  color: var(--steel);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.wf-timeline__action {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.wf-more > summary {
  color: var(--steel);
  cursor: pointer;
  font-weight: 600;
  margin-top: 14px;
}

.wf-more--inline > summary {
  font-size: 14px;
  margin-top: 2px;
}

.wf-more > .wf-timeline {
  margin-top: 14px;
}

.wf-empty {
  color: var(--muted);
  margin: 0;
}

/* Sheets: a focused form over the page, full height on a phone; the main button stays in reach at its foot. */
.wf-sheet .staff-review-dialog-form {
  align-content: start;
}

.wf-sheet textarea[name="body"] {
  min-height: 15em;
}

.wf-sheet__hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.wf-sheet__actions {
  background: var(--panel);
  border-top: 1px solid var(--line);
  bottom: -16px;
  margin: 0 -16px -16px;
  padding: 12px 16px 16px;
  position: sticky;
}

.wf-sheet__actions .btn-primary {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  width: 100%;
}

.wf-choices {
  display: grid;
  gap: 8px;
}

.wf-choice {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
  text-align: left;
}

.wf-choice:hover,
.wf-choice:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.wf-choice strong,
.wf-choice small {
  display: block;
}

.wf-choice small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.wf-choice--quiet {
  color: var(--steel);
}

@media (min-width: 520px) {
  .wf-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  /* A phone: the two main actions full width, one under the other; the quiet ones share a line beneath. */
  .wf-actions > .wf-btn:not(.wf-btn--quiet),
  .wf-actions > form {
    flex: 1 1 100%;
  }

  .wf-actions > form .wf-btn {
    width: 100%;
  }

  .wf-sheet textarea[name="body"] {
    min-height: 40vh;
  }

  /* A sheet on a phone is the whole screen: a focused task, not a box over the page. */
  .staff-review-dialog.wf-sheet {
    max-width: 100vw;
    width: 100vw;
  }

  .staff-review-dialog.wf-sheet .staff-review-dialog__panel {
    border-left: 0;
    border-right: 0;
    min-height: calc(var(--sheet-height, 100dvh) - 12px);
  }
}

@media (min-width: 1100px) {
  /* Wide: activity sits beside the enquiry, so the whole job is on one screen. */
  .wf-body {
    align-items: start;
    gap: 40px;
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .wf-activity {
    border-left: 1px solid var(--line);
    padding-left: 24px;
  }
}

.record-empty__clear {
  display: inline-flex;
  min-height: 44px;
}

/* Brands: the slug under the name, small and grey (desktop only; phones leave it out). */
.staff-table .brand-slug {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

/* A summary of a chosen few counts (Brands: in use · missing logo): on a phone each is a 44px link. */
@media (max-width: 719px) {
  .staff-catalogue-summary--focused a {
    display: inline-block;
    line-height: 44px;
    min-height: 44px;
  }
}

/* The product page's media figure takes the panel's old place in the grid and
   passes its height on, so exact photos and the placeholder lay out alike. */
.product-media {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
}

.product-media > .product-media-panel {
  flex: 1 1 auto;
}

.product-media__caption {
  color: var(--steel);
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0 0;
}

/* Organise product import → Canonical FYNEPAX file: each product's prices and SKUs, warnings and errors. */
.canonical-prices {
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 10px;
  table-layout: fixed;
  width: 100%;
}

.canonical-prices th,
.canonical-prices td {
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  padding: 6px 8px 6px 0;
  text-align: left;
  vertical-align: top;
}

.canonical-prices th {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
}

.canonical-errors,
.canonical-warnings,
.canonical-changes {
  font-size: 14px;
  margin: 0;
  padding-left: 18px;
}

.canonical-warnings {
  color: var(--steel);
}

.canonical-brand {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.canonical-brand input[type="text"] {
  max-width: 420px;
  min-height: 44px;
  width: 100%;
}

[data-canonical-results] select {
  min-height: 44px;
}

/* Products: the Import review block on an imported product (ops/includes/import_review_panel.html). */
.record-list-summary {
  margin: 0 0 10px;
}

.import-review__state--ready {
  color: var(--ok);
}

.import-review__state--blocked {
  color: var(--red);
}

.import-review__blockers {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  margin: 0 0 12px;
  padding: 10px 14px;
}

.import-review__blockers h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.import-review__blockers ul,
.import-review__warnings,
.import-review__notes {
  margin: 0 0 12px;
  padding-left: 18px;
}

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

.import-review__facts {
  display: grid;
  gap: 0;
  margin: 0 0 12px;
}

@media (min-width: 720px) {
  .import-review__facts {
    column-gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.import-review__facts > div {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  padding: 8px 0;
}

.import-review__facts dt {
  color: var(--steel);
  font-size: 13px;
}

.import-review__facts dd {
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-review__notes {
  list-style: none;
  padding: 0;
}

.import-review__note {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.import-review__note p {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.import-review__note--resolved {
  color: var(--steel);
}

.import-review__resolve {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-review__resolve label {
  flex-basis: 100%;
  font-size: 13px;
}

.import-review__resolve input {
  flex: 1 1 220px;
  min-height: 44px;
  min-width: 0;
}

.import-review__resolve button,
.import-publish__confirm {
  min-height: 44px;
}

.import-publish {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Product and category image workflow (ops/image_capture_views.py). Phone first: options stack as full-width
   44px buttons; the file input covers its button, so a tap (or a dropped file) lands on it. */
.image-capture-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 12px 0 8px;
}

.image-capture-options--identify {
  gap: 4px;
  grid-template-columns: 1fr;
  margin: 2px 0 0;
}

.image-capture-options--identify .image-capture-option__button--text {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  min-height: 44px;
  text-decoration: underline;
  text-transform: none;
  text-underline-offset: 3px;
}

.image-capture-options--identify .image-capture-option__button--text:hover,
.image-capture-options--identify .image-capture-option__button--text:focus-within {
  border-color: transparent;
}

.image-capture-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.image-capture-option__button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
  position: relative;
  text-align: center;
  text-transform: uppercase;
}

.image-capture-option__button--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.image-capture-option__button:hover,
.image-capture-option__button:focus-within {
  border-color: var(--red-deep);
  outline: 2px solid var(--red-deep);
  outline-offset: 2px;
}

.image-capture-option__file {
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.image-capture-option__submit,
.image-capture__actions .staff-action-link,
.image-capture__actions .staff-secondary-link,
.product-image-panel .staff-action-link,
.product-image-panel .staff-secondary-link {
  justify-content: center;
  min-height: 44px;
}

.image-capture-option__submit[hidden],
.image-capture-option__status:empty {
  display: none;
}

.image-capture-option__status {
  color: var(--steel);
  font-size: 13px;
  margin: 0;
}

.image-capture-option.is-busy .image-capture-option__button {
  opacity: 0.6;
}

.image-capture__error {
  border: 1px solid var(--red);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.image-capture__record,
.product-image-panel__current,
.image-capture__after {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.image-capture__facts {
  flex: 1;
  min-width: 0;
}

.image-capture__thumb {
  background: var(--panel);
  border: 1px solid var(--line);
  flex: 0 0 auto;
  height: 96px;
  object-fit: contain;
  width: 96px;
}

.image-capture__thumb--mark {
  background: var(--fallback-image-bg);
  padding: 14px;
}

.image-capture__figure {
  margin: 12px 0;
}

.image-capture__figure img {
  background: var(--panel);
  border: 1px solid var(--line);
  display: block;
  height: auto;
  max-height: 60vh;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.image-capture__figure figcaption {
  margin-top: 6px;
}

/* The preview's square: the shape product cards show a photo in, and exactly what is saved. Filled by default
   (cover, centred); static/js/image-frame.js positions the photo inside it instead once a person can move it. */
.image-capture__frame {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  width: min(100%, 60vh, 480px);
}

.image-capture__figure .image-capture__frame img {
  border: 0;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: cover;
  width: 100%;
}

.image-capture__frame.is-framing {
  cursor: grab;
  touch-action: none;
}

.image-capture__frame.is-framing:active {
  cursor: grabbing;
}

.image-capture__frame:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.image-capture__figure .image-capture__frame.is-framing img {
  object-fit: fill;
  pointer-events: none;
  position: absolute;
  user-select: none;
}

.image-capture__framing {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  max-width: 480px;
}

.image-capture__framing button {
  min-height: 44px;
}

.image-capture__zoom {
  align-items: center;
  display: flex;
  flex: 1 1 100%;
  font-weight: 700;
  gap: 8px;
  min-height: 44px;
}

.image-capture__zoom input {
  flex: 1;
  min-width: 0;
}

.image-capture__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.image-capture__actions form {
  margin: 0;
}

.image-capture__primary {
  min-height: 48px;
}

.image-capture__suggestions {
  margin-top: 16px;
}

.image-capture__suggestions h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

.image-capture__suggestion-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.image-capture__suggestion-list form {
  height: 100%;
  margin: 0;
}

.image-capture__suggestion {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 4px;
  height: 100%;
  justify-items: start;
  min-height: 44px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.image-capture__suggestion:hover,
.image-capture__suggestion:focus-visible {
  border-color: var(--red-deep);
  outline: 2px solid var(--red-deep);
  outline-offset: 1px;
}

.image-capture__suggestion.is-current {
  border-color: var(--ok);
  box-shadow: inset 0 0 0 1px var(--ok);
}

.image-capture__suggestion img {
  aspect-ratio: 1 / 1;
  background: #fff;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.image-capture__suggestion-name {
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.image-capture__suggestion-brand {
  color: var(--steel);
  font-size: 12px;
}

.image-capture__fallback {
  margin-top: 12px;
}

.image-capture__notice {
  border-left: 3px solid var(--warn);
  margin-top: 12px;
  padding: 8px 12px;
}

.image-capture__notice p {
  margin: 0 0 8px;
}

.product-image-panel__state {
  font-weight: 700;
  margin: 0 0 4px;
}

.product-image-panel__category {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.product-image-panel__category p {
  margin: 0;
}

@media (max-width: 520px) {
  .image-capture__actions > *,
  .image-capture__actions form,
  .image-capture__actions .btn-primary {
    width: 100%;
  }

  .image-capture__record {
    flex-direction: column;
  }
}


/* Finish Drafts (ops/finish_drafts.py): one column at every width, 44px controls, the main action in a bar that
   stays in view at the bottom of a phone screen. */
.finish-drafts {
  max-width: 980px;
}

.finish-drafts__queue {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.finish-drafts__position {
  display: grid;
  gap: 2px;
  margin: 0;
}

.finish-drafts__nav,
.finish-drafts__done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finish-drafts__nav a,
.finish-drafts__bar button,
.finish-drafts__bar .btn-primary,
.finish-drafts__done-actions a,
.finish-drafts__panel .staff-action-link,
.finish-drafts__panel .staff-secondary-link,
.finish-drafts__panel .staff-picker__option {
  justify-content: center;
  min-height: 44px;
}

.finish-drafts__done-actions a {
  align-items: center;
  display: inline-flex;
}

.finish-drafts__outcome {
  font-size: 18px;
  margin: 8px 0 0;
}

.finish-drafts__notice,
.finish-drafts__error {
  margin-bottom: 12px;
}

.finish-drafts__product {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.finish-drafts__product .image-capture__thumb {
  height: 72px;
  width: 72px;
}

.finish-drafts__product h1 {
  font-size: 22px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.finish-drafts__product p {
  margin: 0;
  overflow-wrap: anywhere;
}

/* The picture is the focal point: large on the left of the name and summary from tablet width; on a phone a square
   beside the name, so the whole summary still fits the first screen. */
.finish-drafts__main {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-areas: "photo head" "glance glance";
  grid-template-columns: 112px minmax(0, 1fr);
  margin-bottom: 12px;
}

.finish-drafts__main .finish-drafts__product {
  align-self: center;
  display: grid;
  gap: 2px;
  grid-area: head;
  margin: 0;
}

.finish-drafts__main .finish-drafts__photo {
  grid-area: photo;
}

.finish-drafts__main .finish-drafts__glance {
  grid-area: glance;
  margin-bottom: 0;
}

.finish-drafts__photo {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  position: relative;
}

.finish-drafts__photo.is-empty {
  background: var(--fallback-image-bg);
}

.finish-drafts__photo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.finish-drafts__photo.is-empty img {
  height: 50%;
  opacity: 0.6;
}

.finish-drafts__photo:hover,
.finish-drafts__photo:focus-visible {
  border-color: var(--red-deep);
  outline: 2px solid var(--red-deep);
  outline-offset: 1px;
}

.finish-drafts__photo-note {
  background: rgb(17 17 17 / 0.8);
  border-radius: 3px;
  bottom: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  left: 8px;
  padding: 3px 7px;
  position: absolute;
}

@media (min-width: 720px) {
  .finish-drafts__main {
    gap: 12px 20px;
    grid-template-areas: "photo head" "photo glance";
    grid-template-columns: minmax(240px, 2fr) 3fr;
    grid-template-rows: auto 1fr;
  }
}

@media (max-width: 719px) {
  /* Small square: the label shortens to fit, the logo stays readable. */
  .finish-drafts__photo {
    padding: 6px;
  }

  .finish-drafts__photo-note {
    bottom: 4px;
    font-size: 10px;
    left: 4px;
    max-width: calc(100% - 8px);
    padding: 2px 5px;
    white-space: normal;
  }

  .finish-drafts__main .finish-drafts__product h1 {
    font-size: 18px;
  }
}

.finish-drafts__glance {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.finish-drafts__verdict {
  border-left: 3px solid var(--warn);
  font-size: 16px;
  margin: 0;
  padding-left: 10px;
}

.finish-drafts__verdict.is-ready {
  border-left-color: var(--ok);
}

.finish-drafts__facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.finish-drafts__fact {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  padding: 6px 0;
}

.finish-drafts__fact dd {
  align-items: center;
  display: flex;
  gap: 10px;
}

.finish-drafts__fact-thumb {
  background: var(--fallback-image-bg);
  border: 1px solid var(--line);
  flex: 0 0 auto;
  height: 56px;
  object-fit: contain;
  width: 56px;
}

.finish-drafts__fact-thumb.is-mark {
  padding: 8px;
}

.finish-drafts__facts .finish-drafts__fact dd {
  overflow-wrap: break-word;
}

@media (max-width: 520px) {
  .finish-drafts__fact {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  /* Two buttons on one line (Keep unbranded + Choose brand): they take the line's full width below the value. */
  .finish-drafts__fact:has(.finish-drafts__actions form) .finish-drafts__actions {
    grid-column: 1 / -1;
  }

  .finish-drafts__fact:has(.finish-drafts__actions form) .finish-drafts__actions > * {
    flex: 1 1 auto;
  }

  .finish-drafts__fact:has(.finish-drafts__actions form) .finish-drafts__edit {
    width: 100%;
  }

  .finish-drafts__fact-thumb {
    height: 40px;
    width: 40px;
  }

  .finish-drafts__fact-thumb.is-mark {
    padding: 5px;
  }
}

.finish-drafts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.finish-drafts__actions form {
  margin: 0;
}

/* A line with one-tap answers (the Brand line): its buttons get their own row under the value. */
.finish-drafts__fact:has(.finish-drafts__actions form) .finish-drafts__actions {
  grid-column: 2 / -1;
  justify-content: flex-start;
}

.finish-drafts__hint {
  color: var(--steel);
  display: block;
  font-size: 12px;
}

button.finish-drafts__edit {
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.finish-drafts__edit {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  min-width: 72px;
  padding: 0 12px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.finish-drafts__edit:hover,
.finish-drafts__edit:focus-visible {
  border-color: var(--red-deep);
  color: var(--red-deep);
}

.finish-drafts__edit.is-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.finish-drafts__dialog .staff-review-dialog-form > section {
  display: grid;
  gap: 6px;
}

.finish-drafts__dialog .staff-dialog-close {
  height: 44px;
  width: 44px;
}

.finish-drafts__dialog .staff-action-link:not([hidden]),
.finish-drafts__dialog .staff-secondary-link:not([hidden]),
.finish-drafts__dialog .staff-picker__option:not([hidden]),
.finish-drafts__dialog .btn-primary:not([hidden]) {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
}

.finish-drafts__fieldset {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.finish-drafts__fieldset:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.finish-drafts__fieldset h3 {
  font-size: 15px;
  margin: 0;
}

.finish-drafts__bulk {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finish-drafts__select-all {
  align-items: center;
  display: flex;
  font-size: 13px;
  gap: 6px;
  min-height: 44px;
}

.finish-drafts__bulk .finish-drafts__price-input {
  width: 120px;
}

.finish-drafts__option-list {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.finish-drafts__option {
  align-items: center;
  border-top: 1px solid var(--line);
  column-gap: 8px;
  display: grid;
  grid-template-areas: "select name price copy notsold" ". error error error error";
  grid-template-columns: auto minmax(0, 1fr) 120px auto auto;
  padding: 6px 0;
}

.finish-drafts__option.has-error {
  background: color-mix(in srgb, var(--red) 6%, transparent);
}

.finish-drafts__option-select {
  align-items: center;
  display: flex;
  grid-area: select;
  min-height: 44px;
  min-width: 32px;
}

.finish-drafts__option-select input,
.finish-drafts__select-all input {
  height: 22px;
  width: 22px;
}

.finish-drafts__option-name {
  display: grid;
  grid-area: name;
  min-width: 0;
  overflow-wrap: anywhere;
}

.finish-drafts__option-name .muted {
  font-size: 12px;
}

.finish-drafts__price-input {
  align-items: center;
  display: flex;
  gap: 4px;
  grid-area: price;
}

.finish-drafts__price-input input {
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  min-height: 44px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.finish-drafts__option.has-error .finish-drafts__price-input input {
  border-color: var(--red);
}

.finish-drafts__copy {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  grid-area: copy;
  min-height: 44px;
  padding: 0 8px;
}

.finish-drafts__not-sold {
  align-items: center;
  color: var(--steel);
  display: flex;
  font-size: 12px;
  gap: 6px;
  grid-area: notsold;
  min-height: 44px;
}

.finish-drafts__option.is-not-sold .finish-drafts__option-name strong {
  color: var(--steel);
  text-decoration: line-through;
}

.finish-drafts__option.is-not-sold .finish-drafts__price-input {
  opacity: 0.4;
}

.finish-drafts__confirm-not-sold {
  align-items: flex-start;
  border-left: 3px solid var(--warn);
  display: flex;
  font-size: 13px;
  gap: 8px;
  padding: 8px 10px;
}

.finish-drafts__confirm-not-sold[hidden] {
  display: none;
}

.finish-drafts__confirm-not-sold.has-error {
  border-left-color: var(--red);
  color: var(--red);
}

.finish-drafts__confirm-not-sold input {
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.finish-drafts__option-error {
  color: var(--red);
  font-size: 13px;
  grid-area: error;
  margin: 4px 0 0;
}

.finish-drafts__all-options > summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 20px;
  padding: 12px 0;
}

/* Save & re-check stays in reach at the foot of a long dialog. */
.finish-drafts__dialog-actions {
  background: var(--panel);
  border-top: 1px solid var(--line);
  bottom: -16px;
  margin: 0 -16px -16px;
  padding: 10px 16px 16px;
  position: sticky;
}

.finish-drafts__dialog-actions .btn-primary {
  width: 100%;
}

@media (max-width: 520px) {
  /* A phone: each option a compact card, the price box beside the name, helpers under it. */
  .finish-drafts__option {
    grid-template-areas: "select name name" "select price copy" "select notsold notsold" ". error error";
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 4px;
  }
}

.finish-drafts__new-brand {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.finish-drafts__new-brand > summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 20px;
  padding: 12px 0;
}

.finish-drafts__suggestions {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.finish-drafts__suggestions li {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.finish-drafts__suggestions form {
  margin: 0;
}

.finish-drafts__dialog h3 {
  font-size: 15px;
  margin: 0;
}

.finish-drafts__more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.finish-drafts__product h1 {
  margin-bottom: 2px;
}

.finish-drafts__fact dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  padding-top: 2px;
  text-transform: uppercase;
}

.finish-drafts__fact dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.finish-drafts__flag {
  border: 1px solid var(--warn);
  color: var(--warn);
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  padding: 0 6px;
  text-transform: uppercase;
}

.finish-drafts__image-check {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.finish-drafts__image-check img {
  background: var(--fallback-image-bg);
  border: 1px solid var(--line);
  flex: 0 0 auto;
  height: 120px;
  object-fit: contain;
  width: 120px;
}

.finish-drafts__image-check > div {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 0;
}

.finish-drafts__inline-primary {
  justify-self: start;
}

.finish-drafts__bar-note {
  color: var(--steel);
  flex-basis: 100%;
  font-size: 13px;
  margin: 0;
}

.finish-drafts__panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.finish-drafts__panel h2,
.finish-drafts__panel h3,
.finish-drafts__panel p {
  margin: 0;
}

.finish-drafts__form {
  display: grid;
  gap: 12px;
}

.finish-drafts__hold,
.finish-drafts__shared,
.finish-drafts__reason {
  border-left: 3px solid var(--warn);
  display: grid;
  gap: 8px;
  padding: 8px 12px;
}

.finish-drafts__resolve {
  display: grid;
  gap: 8px;
}

.finish-drafts__shared .staff-action-link {
  justify-self: start;
}

.finish-drafts__warnings {
  margin: 0;
  padding-left: 20px;
}

.finish-drafts__confirm {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  min-height: 44px;
}

.finish-drafts__bar {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 0;
  position: sticky;
  z-index: 5;
}

/* Delete draft (Owner only): set apart at the end of the bar, in the destructive colour. */
.finish-drafts__bar .staff-secondary-link--danger {
  color: var(--red-deep);
  justify-content: center;
  margin-left: auto;
  min-height: 44px;
}

.finish-drafts__bar form {
  margin: 0;
}

@media (max-width: 520px) {
  /* Two rows at most: the main action across the screen, the others side by side under it. */
  .finish-drafts__bar > * {
    flex: 1 1 0;
  }

  .finish-drafts__bar a,
  .finish-drafts__bar button {
    padding-inline: 8px;
    white-space: nowrap;
  }

  .finish-drafts__bar-note {
    font-size: 12px;
  }

  .finish-drafts__bar > .btn-primary,
  .finish-drafts__bar > .finish-drafts__bar-note {
    flex-basis: 100%;
  }

  .finish-drafts__bar > *,
  .finish-drafts__bar form button,
  .finish-drafts__shared .staff-action-link,
  .finish-drafts__done-actions a {
    width: 100%;
  }

  .finish-drafts__shared .staff-action-link {
    justify-self: stretch;
  }
}

/* Images needed (ops/image_coverage.py): one row per category or product, thumbnail, what it shows, one action. */
.images-needed__summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0 0 16px;
}

.images-needed__summary div {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.images-needed__summary div.is-attention {
  border-left: 3px solid var(--warn);
}

.images-needed__summary dt {
  color: var(--steel);
  font-size: 12px;
}

.images-needed__summary dd {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 2px 0 0;
}

.images-needed__list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.images-needed__row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px 0;
}

.images-needed__row--child {
  padding-left: 20px;
}

.images-needed__row.is-needed {
  border-left: 3px solid var(--warn);
  padding-left: 9px;
}

.images-needed__row--child.is-needed {
  padding-left: 17px;
}

.images-needed__thumb {
  background: var(--fallback-image-bg);
  border: 1px solid var(--line);
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.images-needed__thumb--logo {
  object-fit: contain;
  padding: 8px;
}

.images-needed__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.images-needed__text p {
  margin: 0;
}

.images-needed__name {
  font-weight: 700;
}

.images-needed__meta {
  color: var(--steel);
  font-size: 13px;
}

.images-needed__state {
  color: var(--ink);
  font-weight: 600;
}

.images-needed__row--logo .images-needed__state {
  color: var(--warn);
}

.images-needed__row .staff-action-link {
  justify-content: center;
  min-height: 44px;
  white-space: nowrap;
}

.images-needed__subheading {
  font-size: 15px;
  margin: 16px 0 0;
}

.images-needed__all {
  margin-top: 16px;
}

.images-needed__all > summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 20px;
  padding: 12px 0;
}

.images-needed__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.images-needed__filters .filter-chip {
  align-items: center;
  min-height: 44px;
}

@media (max-width: 520px) {
  .images-needed__row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .images-needed__row .staff-action-link {
    grid-column: 1 / -1;
  }
}

/* Image credits page (storefront/image_credits.py): a plain list, linked from the footer's small print. */
.image-credits {
  list-style: none;
  margin: 18px 0 40px;
  padding: 0;
}

.image-credits__item {
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
  padding: 14px 0;
}

.image-credits__use {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

/* ------------------------------------------------------------------
   Category browser (templates/ops/includes/category_browser.html): browse first, filter to narrow. A scrolling
   list of every catalogue category by department, the filter pinned above it, each choice thumb-sized.
------------------------------------------------------------------ */
.category-browser {
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  max-height: min(60dvh, 520px);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.category-browser:focus {
  outline: none;
}

.category-browser__filter {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: block;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.category-browser__filter input {
  font-size: 16px;
  min-height: 44px;
  padding: 6px 10px;
  width: 100%;
}

.category-browser__list {
  display: grid;
  gap: 4px;
  padding: 4px 8px 8px;
}

.category-browser__group ul {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-browser__department {
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 8px 0 2px;
  text-transform: uppercase;
}

.category-browser__choice {
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  overflow-wrap: anywhere;
  padding: 8px 4px;
  text-align: left;
  width: 100%;
}

.category-browser__choice:hover,
.category-browser__choice:focus-visible {
  color: var(--red);
}

.category-browser__choice.is-current {
  font-weight: 700;
}

.scan-new__browse > summary {
  align-items: center;
  border: 1px solid var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  list-style: none;
  min-height: 48px;
  padding: 0 14px;
}

.scan-new__browse > summary::-webkit-details-marker {
  display: none;
}

.scan-new__browse > summary::after {
  content: "▾";
}

.scan-new__browse[open] > summary {
  border-bottom: 0;
}

.scan-new__browse[open] > summary::after {
  content: "▴";
}

/* ------------------------------------------------------------------
   Editing dialogs as sheets on a phone (static/js/sheet-viewport.js): fitted to the visual viewport, so with the
   keyboard open the header stays, the form scrolls inside, and the main button sits just above the keyboard; the
   page behind never scrolls while one is open.
------------------------------------------------------------------ */
html.has-open-sheet,
html.has-open-sheet body {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 719px) {
  .staff-review-dialog.is-sheet {
    bottom: auto;
    margin: 0 auto;
    max-height: calc(var(--sheet-height, 100dvh) - 12px);
    position: fixed;
    top: calc(var(--sheet-top, 0px) + 6px);
  }

  .staff-review-dialog.is-sheet .staff-review-dialog__panel {
    max-height: calc(var(--sheet-height, 100dvh) - 12px);
  }

  .staff-review-dialog.is-sheet .staff-review-dialog-form {
    overscroll-behavior: contain;
  }
}

/* A stocktake's review (ops/stocktake_views.py), read at a glance on a phone: three states first, then each item's
   latest count under its state, Recorded · Counted · Variance side by side, one sentence, then its actions. */
.stocktake-states {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stocktake-states__tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--muted);
  color: var(--ink);
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 8px 10px;
  text-decoration: none;
}

.stocktake-states__tile strong {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
}

.stocktake-states__tile span {
  font-size: 13px;
  font-weight: 700;
}

.stocktake-states__tile--safe,
.stocktake-group--safe .stocktake-item {
  border-top-color: var(--ok);
}

.stocktake-states__tile--attention,
.stocktake-group--attention .stocktake-item {
  border-top-color: var(--warn);
}

.stocktake-summary {
  color: var(--steel);
  font-size: 14px;
  margin: 0;
}

.stocktake-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stocktake-groups {
  display: grid;
  gap: 18px;
}

.stocktake-group__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
}

.stocktake-group__head h2 {
  font-size: 20px;
  margin: 0;
}

.stocktake-group--attention .stocktake-group__head h2 {
  color: var(--warn);
}

.stocktake-group__help {
  color: var(--steel);
  font-size: 13px;
  margin: 4px 0 8px;
}

.stocktake-items {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stocktake-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.stocktake-item p {
  margin: 0;
}

.stocktake-item__figures {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.stocktake-item__figures dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stocktake-item__figures dd {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
}

/* "Not counted" and "Opening" (a first count) are words, not figures: the body face, so they stay on one line. */
.stocktake-item__figures .stocktake-item__word {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.stocktake-item__said {
  font-size: 14px;
  font-weight: 700;
}

.stocktake-group--attention .stocktake-item__said {
  color: var(--warn);
}

.stocktake-group--resolved .stocktake-item__said {
  color: var(--steel);
  font-weight: 400;
}

.stocktake-item__meta {
  color: var(--muted);
  font-size: 12px;
}

.stocktake-tag {
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  text-transform: uppercase;
}

.stocktake-page__ref {
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Grid view (?view=compact; storefront.views.VIEW_MODES): more products
   to a row, each its photo, brand, name and price. The product page has
   the SKU, availability and Enquire. After every other listing rule, so
   it wins over the cards' columns and the phone's row cards.
   ------------------------------------------------------------------ */
.product-grid--compact .product-card .meta,
.product-grid--compact .product-card .pack-size,
.product-grid--compact .product-card__actions {
  display: none;
}

.product-grid--compact .product-card h3 {
  font-size: 14px;
  line-height: 1.25;
}

.products.product-grid--compact,
.product-results .product-grid--compact {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 719px) {
  .product-results .product-grid--compact .product-card {
    display: block;
  }

  /* Square again, as the cards are on a wider screen, so a photo and the placeholder line up. */
  .product-results .product-grid--compact .product-card__image {
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: 0;
  }

  .product-results .product-grid--compact .product-card__image > img {
    max-height: none;
  }

  .product-results .product-grid--compact .product-card__body {
    display: block;
    padding: 8px 10px 10px;
  }
}

@media (min-width: 720px) {
  .products.product-grid--compact,
  .browse-layout .product-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .products.product-grid--compact {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .browse-layout .product-grid--compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------
   List view (?view=list): slim rows stacked down the page, not cards.
   A small square thumbnail, the brand, name and SKU, the price, and a
   compact Enquire. A phone keeps Enquire a 44 px target but leaves the
   availability and quantity to the product and enquiry pages. After
   every other card rule, so these win over the cards and phone cards.
   ------------------------------------------------------------------ */
.products.product-grid--list {
  gap: 0;
}

.products.product-grid--list .product-card {
  align-items: center;
  display: grid;
  gap: 0 10px;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 8px 10px 8px 8px;
}

.products.product-grid--list .product-card + .product-card {
  border-top: 0;
}

.products.product-grid--list .product-card__image {
  aspect-ratio: 1 / 1;
  border: 0;
  height: 56px;
  min-height: 0;
  padding: 0;
  width: 56px;
}

.products.product-grid--list .product-card__image > img {
  height: 100%;
  max-height: none;
  object-fit: contain;
  width: 100%;
}

.products.product-grid--list .product-image-placeholder {
  gap: 0;
  padding: 4px;
}

.products.product-grid--list .product-image-placeholder__message {
  display: none;
}

.products.product-grid--list .product-card__body {
  align-items: center;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
}

.products.product-grid--list .product-card__body > * {
  grid-column: 1;
  margin: 0;
}

.products.product-grid--list .product-card h3 {
  font-size: 14px;
  line-height: 1.25;
}

.products.product-grid--list .product-card__actions {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-column: 2;
  grid-row: 1 / span 6;
}

.products.product-grid--list .product-card__actions > .badge,
.products.product-grid--list .product-card__actions label {
  display: none;
}

.products.product-grid--list .product-card__actions > form {
  display: flex;
  gap: 8px;
}

.products.product-grid--list .product-card__actions .btn-primary {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
}

@media (min-width: 720px) {
  .products.product-grid--list .product-card {
    gap: 0 14px;
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 8px 16px 8px 8px;
  }

  .products.product-grid--list .product-card__image {
    height: 64px;
    width: 64px;
  }

  .products.product-grid--list .product-card__body {
    gap: 2px 16px;
  }

  .products.product-grid--list .product-card__actions label {
    display: block;
  }

  .products.product-grid--list .product-card__actions input {
    height: 36px;
  }

  .products.product-grid--list .product-card__actions .btn-primary {
    min-height: 36px;
  }
}

/* Beside the filter rail from 720 px the results are only 440-700 px wide, so until 1040 px the price stays under the
   name and the row ends in quantity and Enquire. From 1040 px there is room for the price as its own column and the
   availability beside Enquire. */
@media (min-width: 1040px) {
  .products.product-grid--list .product-card__body {
    gap: 2px 24px;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .products.product-grid--list .product-card__body > .price {
    align-items: flex-end;
    grid-column: 2;
    grid-row: 1 / span 6;
  }

  .products.product-grid--list .product-card__actions {
    grid-column: 3;
  }

  .products.product-grid--list .product-card__actions > .badge {
    display: inline-flex;
  }
}

@media (max-width: 719px) {
  /* A light outlined Enquire in a phone's rows: still a 44 px target, without a block of red on every line. */
  .products.product-grid--list .product-card__actions .btn-primary {
    background: #fff;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 12px;
    padding: 0 10px;
  }
}

/* The barcode quantity audit (ops/readiness_views.py). Statuses are words; colour only adds. */
.barcode-audit__rows {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.barcode-audit__row {
  border: 1px solid var(--line);
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.barcode-audit__row p {
  margin: 4px 0;
}

.readiness-status {
  border: 1px solid currentColor;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.readiness-status--ready {
  color: var(--ok);
}

.readiness-status--needs_action {
  color: var(--red-deep);
}

.readiness-status--not_enabled,
.readiness-status--not_applicable {
  color: var(--steel);
}

/* ------------------------------------------------------------------
   Get FYNEPAX ready (Business settings, ops/launch_readiness.py): three goals as quiet tabs; each shows whether it is
   on, a real progress bar, the one next step, then its checklist as hairline rows that open a focused task. No cards:
   spacing, one red rule and colour as state do the grouping (docs/DESIGN.md, Workflow screens).
------------------------------------------------------------------ */
.ready {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.ready-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 32px);
  font-style: italic;
  line-height: 1.1;
  margin: 0;
}

.ready-head__lede {
  color: var(--steel);
  margin: 6px 0 0;
}

.ready-tabs {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ready-tabs a {
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--steel);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  gap: 4px 8px;
  justify-content: center;
  line-height: 1.2;
  margin-bottom: -1px;
  min-height: 52px;
  padding: 8px 6px;
  text-align: center;
  text-decoration: none;
}

.ready-tabs a:hover,
.ready-tabs a:focus-visible {
  color: var(--ink);
}

.ready-tabs a[aria-current="page"] {
  border-bottom-color: var(--red);
  color: var(--ink);
}

.ready-tabs__count {
  background: var(--steel);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  min-width: 20px;
  padding: 0 6px;
}

.ready-tabs a[aria-current="page"] .ready-tabs__count {
  background: var(--ink);
}

.ready-tabs__done {
  color: var(--ok);
  display: inline-flex;
}

.ready-tabs__done .wf-icon {
  height: 16px;
  width: 16px;
}

.ready-goal {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.ready-goal__head {
  display: grid;
  gap: 6px;
}

.ready-goal__head .wf-eyebrow {
  margin: 0;
}

.ready-goal__explain {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  max-width: 46ch;
}

.ready-state {
  align-items: center;
  display: inline-flex;
  font-weight: 600;
  gap: 8px;
  margin: 0;
}

.ready-state::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  flex: none;
  height: 10px;
  width: 10px;
}

.ready-state--on {
  color: var(--ok);
}

.ready-state--off {
  color: var(--steel);
}

.ready-state--attention {
  color: var(--red);
}

.ready-progress {
  display: grid;
  gap: 8px;
  max-width: 560px;
}

.ready-progress progress {
  -webkit-appearance: none;
  appearance: none;
  background: var(--line);
  border: 0;
  display: block;
  height: 8px;
  width: 100%;
}

.ready-progress progress::-webkit-progress-bar {
  background: var(--line);
}

.ready-progress progress::-webkit-progress-value {
  background: var(--ok);
}

.ready-progress progress::-moz-progress-bar {
  background: var(--ok);
}

.ready-progress p {
  color: var(--steel);
  margin: 0;
}

.ready-progress strong {
  color: var(--ink);
}

.ready-depends {
  align-items: flex-start;
  color: var(--steel);
  display: flex;
  gap: 8px;
  margin: 0;
}

.ready-depends a {
  color: var(--ink);
  font-weight: 700;
}

/* The one next step: a red rule at the left, no box. */
.ready-next {
  border-left: 4px solid var(--red);
  display: grid;
  gap: 6px;
  padding: 2px 0 2px 16px;
}

.ready-next__eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

.ready-next h4 {
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

.ready-next p {
  margin: 0;
  max-width: 66ch;
  overflow-wrap: anywhere;
}

.ready-next__how {
  color: var(--steel);
}

.ready-next__who,
.ready-step__who {
  align-items: center;
  color: var(--steel);
  display: flex;
  font-size: 14px;
  gap: 6px;
}

.ready-next .wf-actions {
  margin-top: 8px;
}

.ready-verdict {
  align-items: center;
  color: var(--ok);
  display: flex;
  font-weight: 700;
  gap: 8px;
  margin: 0;
}

/* The checklist: hairline rows, the whole row one link to its task. */
.ready-list {
  border-top: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ready-row {
  border-bottom: 1px solid var(--line);
}

.ready-row__link {
  align-items: center;
  border-left: 3px solid transparent;
  color: var(--ink);
  display: grid;
  gap: 4px 14px;
  grid-template-columns: 24px minmax(0, 1fr) auto 20px;
  min-height: 72px;
  padding: 14px 6px 14px 9px;
  text-decoration: none;
}

.ready-row--next .ready-row__link {
  border-left-color: var(--red);
}

.ready-row__link:hover {
  background: var(--surface);
}

.ready-row__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.ready-row__icon,
.ready-row__chevron {
  color: var(--steel);
  display: flex;
}

.ready-row__chevron {
  color: var(--muted);
}

.ready-row--done .ready-row__icon {
  color: var(--ok);
}

.ready-row--todo .ready-row__icon {
  color: var(--red);
}

.ready-row--waiting .ready-row__icon {
  color: var(--warn);
}

.ready-row__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ready-row__title {
  font-size: 16px;
  font-weight: 700;
}

.ready-row__number {
  color: var(--muted);
  font-weight: 600;
}

.ready-row__next {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-left: 4px;
  text-transform: uppercase;
}

.ready-row__summary {
  color: var(--steel);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ready-row__meta {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.ready-row__count {
  color: var(--muted);
  font-size: 13px;
}

/* State as a coloured word with a dot (red needs us, amber waits, green is ready, grey is off). */
.ready-status {
  align-items: center;
  border: 1px solid currentColor;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ready-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.ready-status--done {
  color: var(--ok);
}

.ready-status--todo {
  color: var(--red);
}

.ready-status--waiting {
  color: var(--warn);
}

.ready-status--off,
.ready-status--na {
  color: var(--muted);
}

/* Outside what Fynepax can check: uncertain, so amber and never a tick. */
.ready-status--unchecked {
  color: var(--warn);
  margin-left: 6px;
  vertical-align: 2px;
}

.ready-subhead {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 10px 0 -10px;
  text-transform: uppercase;
}

.ready-note {
  color: var(--steel);
  font-size: 14px;
  margin: 0;
  max-width: 70ch;
}

.ready-warnings {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: -6px 0 0;
  padding: 0 6px 14px 50px;
}

.ready-warnings li {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  overflow-wrap: anywhere;
}

.ready-warnings .wf-icon {
  color: var(--warn);
  height: 18px;
  margin-top: 2px;
  width: 18px;
}

.ready-warnings code {
  font-weight: 700;
}

.ready-warnings__hint {
  color: var(--steel);
  display: block;
  font-size: 14px;
}

.ready-warnings--full {
  margin: 2px 0;
  padding: 0;
}

.ready-diagnostics {
  display: grid;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ready-diagnostics > li {
  color: var(--steel);
  display: grid;
  gap: 12px;
  grid-template-columns: 20px minmax(0, 1fr);
}

.ready-diagnostics p {
  margin: 0 0 2px;
  max-width: 70ch;
}

.ready-diagnostics__title {
  color: var(--ink);
  font-weight: 700;
}

.ready-diagnostics__facts {
  display: grid;
  gap: 4px;
  margin: 6px 0 2px;
  max-width: 70ch;
  padding-left: 18px;
}

.ready-settings {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.ready-settings .ready-subhead {
  margin: 0;
}

.ready-settings dl {
  display: grid;
  gap: 0 32px;
  margin: 0;
  max-width: 900px;
}

.ready-settings dl div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.ready-settings dt {
  color: var(--steel);
}

.ready-settings dd {
  font-weight: 600;
  margin: 0;
  text-align: right;
}

.ready-link {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  gap: 6px;
  min-height: 44px;
}

.ready-link .wf-icon {
  height: 16px;
  width: 16px;
}

.ready-facts {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 18px;
}

.ready-facts .ready-subhead {
  margin: 0;
}

.ready-facts ul {
  color: var(--steel);
  display: grid;
  gap: 6px;
  margin: 0;
  max-width: 72ch;
  padding-left: 18px;
}

/* A task: why it matters, then its steps in order, each with state, what to do, who, and details folded away. */
.ready-task {
  display: grid;
  gap: 18px;
  max-width: 860px;
}

.ready-task__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-style: italic;
  line-height: 1.1;
  margin: 0;
}

.ready-task__head .wf-eyebrow {
  margin: 0 0 4px;
}

.ready-task__intro {
  color: var(--steel);
  font-size: 17px;
  margin: 0;
  max-width: 64ch;
}

.ready-steps {
  border-top: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ready-step {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 18px 0;
}

.ready-step__mark {
  align-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.ready-step--done .ready-step__mark {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.ready-step--todo .ready-step__mark {
  color: var(--red);
}

.ready-step--waiting .ready-step__mark {
  color: var(--warn);
}

.ready-step__mark .wf-icon {
  height: 18px;
  width: 18px;
}

.ready-step__body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ready-step__body p {
  margin: 0;
  max-width: 66ch;
  overflow-wrap: anywhere;
}

.ready-step__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.ready-step__head strong {
  font-size: 17px;
}

.ready-step__wait {
  color: var(--warn);
  font-weight: 600;
}

.ready-step__how {
  color: var(--steel);
}

.ready-step__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.ready-confirm {
  display: grid;
  gap: 12px;
  max-width: 66ch;
}

.ready-confirm label {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.ready-confirm input[type="checkbox"] {
  flex: none;
  height: 20px;
  margin: 2px 0 0;
  width: 20px;
}

.ready-confirm .wf-btn {
  justify-self: start;
}

.ready-tech {
  color: var(--steel);
  font-size: 14px;
}

.ready-tech summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

.ready-tech dl {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
}

.ready-tech dl div {
  display: grid;
  gap: 2px;
}

.ready-tech dt {
  color: var(--ink);
  font-weight: 700;
}

.ready-tech dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ready-tech__tasks {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  padding-left: 18px;
}

@media (min-width: 720px) {
  .ready-tabs {
    display: flex;
    gap: 8px;
  }

  .ready-settings dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ready-tabs a {
    font-size: 15px;
    justify-content: flex-start;
    padding: 8px 14px;
  }
}

@media (max-width: 719px) {
  /* A phone: each tab's count sits under its name, the same on all three. */
  .ready-tabs a {
    flex-direction: column;
  }

  /* The status and count drop under the title, so the words keep the width. */
  .ready-row__link {
    grid-template-columns: 22px minmax(0, 1fr) 16px;
    padding: 14px 4px 14px 7px;
  }

  .ready-row__icon {
    align-self: start;
    padding-top: 1px;
  }

  .ready-row__meta {
    align-items: center;
    display: flex;
    gap: 10px;
    grid-column: 2;
    grid-row: 2;
    justify-items: start;
  }

  .ready-row__chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .ready-warnings {
    padding-left: 36px;
  }

  .ready-step {
    gap: 12px;
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .ready-step__mark {
    height: 28px;
    width: 28px;
  }

  .ready-next .wf-actions > .wf-btn--quiet {
    flex: 1 1 100%;
  }
}

.readiness-confirm {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.readiness-confirm label {
  align-items: flex-start;
  display: flex;
  gap: 8px;
}

.readiness-confirm button {
  justify-self: start;
  min-height: 44px;
}

.barcode-audit__kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.barcode-audit__kinds a {
  border: 1px solid var(--line);
  min-height: 44px;
  padding: 10px 12px;
}

.barcode-audit__kinds a[aria-current="page"] {
  border-color: currentColor;
  font-weight: 700;
}

.barcode-audit__facts {
  display: grid;
  gap: 4px 12px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 6px 0;
}

.barcode-audit__facts dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.barcode-audit__facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.barcode-audit__why {
  color: var(--red-deep);
}

/* An Order placed before stock went live (ops/unmanaged_orders.py). */
.order-unmanaged,
.deliveries-card__unmanaged {
  border-left: 4px solid var(--warn);
  margin-top: 8px;
  padding: 6px 10px;
  overflow-wrap: anywhere;
}

.order-unmanaged__lines {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding-left: 18px;
}

/* New Order wizard (ops/order_wizard.py): one decision a step, the primary action always in reach. */
.order-wizard {
  max-width: 760px;
}

.order-wizard__crumb {
  margin: 0 0 6px;
}

.order-wizard__progress {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  color: var(--steel);
  font-size: 14px;
}

.order-wizard__progress li[aria-current="step"] {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.order-wizard__progress li.is-done::after {
  content: " ✓";
}

.order-wizard__panel,
.order-wizard__basket,
.order-wizard__stock,
.order-wizard__next {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.order-wizard__choices,
.order-wizard__options {
  display: grid;
  gap: 10px;
}

.order-wizard__choice {
  border: 2px solid var(--line);
  background: transparent;
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px 14px;
  text-align: left;
}

.order-wizard__option {
  align-items: flex-start;
  border: 1px solid var(--line);
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
}

.order-wizard__option > span {
  display: grid;
  gap: 2px;
}

.order-wizard__field {
  display: grid;
  gap: 4px;
}

.order-wizard__field input,
.order-wizard__field select,
.order-wizard__field textarea,
.order-wizard__search input,
.order-wizard textarea {
  font-size: 16px; /* no zoom on iPhone */
  min-height: 44px;
  width: 100%;
}

.order-wizard__search-row {
  display: flex;
  gap: 8px;
}

.order-wizard__results,
.order-wizard__lines,
.order-wizard__happened,
.order-wizard__review-lines {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-wizard__result,
.order-wizard__line {
  border: 1px solid var(--line);
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.order-wizard__result p,
.order-wizard__line p {
  margin: 2px 0;
}

.order-wizard__add,
.order-wizard__line-actions,
.order-wizard__line-actions form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-wizard__add input,
.order-wizard__line-actions input {
  font-size: 16px;
  min-height: 44px;
  width: 4.5em;
}

.order-wizard__add button,
.order-wizard__line-actions button {
  min-height: 44px;
}

.order-wizard__total {
  font-size: 18px;
  margin: 4px 0 0;
}

.order-wizard__summary {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.order-wizard__summary > div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.order-wizard__summary dt {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-wizard__summary dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.order-wizard__grand {
  font-size: 22px;
}

.order-wizard__confirm {
  align-items: flex-start;
  border: 2px solid var(--line);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}

.order-wizard__confirm input {
  min-height: 24px;
  min-width: 24px;
}

/* The primary action stays at the bottom of a phone's screen, above the keyboard's reach. */
.order-wizard__actions {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 0;
  position: sticky;
  z-index: 2;
}

.order-wizard__actions .btn-primary {
  flex: 1 1 220px;
  min-height: 48px;
}

.order-wizard__aside,
.order-wizard__discard {
  margin-top: 8px;
}

@media (min-width: 720px) {
  .order-wizard__choices {
    grid-template-columns: 1fr 1fr;
  }

  .order-wizard__actions .btn-primary {
    flex: 0 0 auto;
  }
}

/* Order recovery screens (ops/order_cancel.py): consequences first, the destructive button distinct. */
.order-recovery {
  max-width: 760px;
}

/* Destructive (cancel, refund, release): deep red outline and text, never mistaken for the solid red primary. */
.order-danger-button {
  background: #fff;
  border: 2px solid var(--red-deep);
  color: var(--red-deep);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
}

.order-danger-button:hover,
.order-danger-button:focus-visible {
  background: var(--red-deep);
  color: #fff;
}

.order-recovery__review {
  border-left: 4px solid var(--red-deep);
  margin-bottom: 16px;
  padding: 4px 12px;
}

.order-recovery__review p {
  margin: 4px 0;
}

/* Stock steps (Adjust stock, ops/stock_views.adjust): the figures the question rests on, then one question. */
.stock-step__figures {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin: 0 0 16px;
}

.stock-step__figures dt {
  color: var(--muted, #5c6670);
  font-size: 0.8125rem;
}

.stock-step__figures dd {
  font-size: 1.25rem;
  margin: 2px 0 0;
}

.stock-step__form input[type="number"],
.stock-step__form input:not([type]),
.stock-step__form input[type="text"] {
  font-size: 16px; /* never smaller: Safari on iPhone zooms in on anything below 16px */
  max-width: 100%;
}

/* Review steps (ops/order_steps.py, release.html): one choice per row, a finger's height; the items leaving. */
.order-choice {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
}

.order-choice input {
  flex: 0 0 auto;
  margin-top: 3px;
  width: auto; /* a radio or tick box, never a full-width field */
}

.order-choice > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-step__lines {
  margin: 0;
  padding-left: 18px;
}

.order-step__lines li {
  margin: 2px 0;
  overflow-wrap: anywhere;
}

.order-step__progress {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  color: var(--muted, #5c6670);
  font-size: 0.875rem;
}

.order-step__progress [aria-current="step"] {
  color: inherit;
  font-weight: 700;
}

.delivery-proof-photo-status {
  font-weight: 600;
  margin: 8px 0 0;
  min-height: 1.4em;
}

.delivery-proof-progress {
  display: block;
  height: 6px;
  margin: 0 0 12px;
  width: 100%;
}

.delivery-proof-progress[hidden] {
  display: none;
}

.order-pages {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0;
}

.order-technical summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}

.order-recovery__result {
  border-left: 4px solid var(--line);
  padding: 8px 12px;
}

.order-recovery__result--done {
  border-color: var(--ok);
}

.order-recovery__result--refused {
  border-color: var(--red-deep);
}

/* One staff-curated shelf. The shared catalogue card owns prices, options and images. */
.featured-products {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.products.featured-products__grid {
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 719px) {
  .featured-products__grid .product-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .featured-products__grid .product-card__image {
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 8px;
  }

  .featured-products__grid .product-card__body {
    gap: 5px;
    padding: 10px;
  }

  .featured-products__grid .product-card__actions {
    margin-top: 2px;
  }

  .featured-products__grid .product-card__actions input,
  .featured-products__grid .product-card__actions .btn-primary {
    min-height: 44px;
  }
}

@media (min-width: 720px) {
  .products.featured-products__grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Public catalogue refinement: pack and price stay together in the scan path. */
.product-card .pack-size {
  color: var(--ink);
  font-weight: 700;
}

.price-on-enquiry {
  color: var(--red);
  font-weight: 700;
}

.product-card__buy-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  text-align: center;
}

/* At tablet widths the cautious availability label can wrap. Keep card rows
   level even when the last grid row has fewer products than the first. */
@media (min-width: 720px) {
  .product-results .products.product-grid:not(.product-grid--compact):not(.product-grid--list) {
    grid-auto-rows: 1fr;
  }
}

.product-results-return {
  margin: 0 0 12px;
}

.product-results-return a {
  color: var(--ink);
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 720px) and (max-width: 1039px) {
  .products.product-grid--list .product-card__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 135px;
  }

  .products.product-grid--list .product-card__actions > .badge {
    display: inline-flex;
  }
}

@media (max-width: 719px) {
  /* The phone already has one useful row layout; a three-way selector adds no choice. */
  .catalogue-page .view-toggle {
    display: none;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    padding: 0;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__image {
    aspect-ratio: auto;
    border: 0;
    border-right: 1px solid var(--line);
    height: auto;
    min-height: 124px;
    padding: 8px;
    width: auto;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__image > img {
    max-height: 140px;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-image-placeholder__message {
    display: block;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__body {
    align-content: start;
    align-items: center;
    display: flex;
    flex-flow: row wrap;
    gap: 3px 10px;
    padding: 9px 10px 10px;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__body > * {
    flex: 1 1 100%;
    margin: 0;
    min-width: 0;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card .meta,
  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card .pack-size {
    display: block;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions {
    display: contents;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__body > .price,
  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions > .badge {
    flex: 0 1 auto;
    margin-top: 2px;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions > .badge,
  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions label {
    display: inline-flex;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions > form {
    display: flex;
    flex: 1 1 100%;
    margin-top: 5px;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions input {
    height: 44px;
    width: 52px;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__actions .btn-primary {
    min-height: 44px;
  }

  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card__buy-link {
    flex: 1 1 100%;
    margin-top: 5px;
  }
}

@media (max-width: 359px) {
  .catalogue-page .product-results .products:is(.product-grid--compact, .product-grid--list) .product-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }
}

/* Customer accounts use the public catalogue's compact form and heading style. */
.customer-account {
  padding-bottom: 48px;
}

.customer-account__form {
  max-width: 540px;
  margin-bottom: 20px;
}

.customer-account__form .btn-primary {
  justify-self: start;
}

.customer-account__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 16px 0 28px;
}

.customer-account__orders {
  list-style: none;
  margin: 14px 0 26px;
  padding: 0;
}

.customer-account__orders li {
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  padding: 13px 0;
}

.customer-account__hint {
  color: var(--muted);
  font-size: 14px;
}

/* Create your account (I1): the lead line, then what an account gives, as three ticked points. */
.customer-register__lead {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.customer-register__benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.customer-register__benefits li {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
}

.customer-register__benefits li::before {
  border-bottom: 3px solid var(--red);
  border-right: 3px solid var(--red);
  content: "";
  height: 12px;
  margin-top: -4px;
  transform: rotate(45deg);
  width: 6px;
}

/* My Account sections: a scrollable tab row on phones, never wider than the page. */
.customer-account__nav {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.customer-account__nav a {
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--steel);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.customer-account__nav a[aria-current="page"],
.customer-account__nav a:hover,
.customer-account__nav a:focus {
  border-bottom-color: var(--red);
  color: var(--ink);
}

/* Links in account copy and legal text must look like links: the site default removes the underline. */
.customer-account__panel a:not([class]),
.customer-account > .site-shell > p a:not([class]),
.customer-account__form a:not([class]),
.customer-account__check a,
.customer-account__hint a,
.customer-addresses__actions a,
.legal-page__body a:not([class]) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.customer-account__panel a:not([class]):hover,
.customer-account > .site-shell > p a:not([class]):hover,
.customer-account__form a:not([class]):hover,
.legal-page__body a:not([class]):hover {
  color: var(--red-deep);
}

.customer-account__panel .info-list {
  margin: 0 0 12px;
}

.customer-account__panel .enquiry-form + p {
  margin-top: 14px;
}

.customer-account__grid {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.customer-account__panel {
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 0;
  padding: 16px;
}

.customer-account__panel h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

.customer-account__panel p {
  margin: 0 0 10px;
}

.customer-account__panel .customer-account__orders {
  margin: 0 0 12px;
}

.customer-account__actions {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.customer-account__actions a {
  align-items: center;
  display: inline-flex;
  min-height: 40px;
}

.customer-account__signout {
  margin: 4px 0 0;
}

.customer-account__inline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.customer-account__link-button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  min-height: 40px;
  padding: 0;
  text-decoration: underline;
}

.customer-account__danger,
.customer-account__danger:hover,
.customer-account__danger:focus {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

/* The required terms checkbox at sign-up and on the updated-terms page. */
.customer-account__check {
  align-items: flex-start;
  display: flex;
  font-size: 15px;
  font-weight: 500;
  gap: 10px;
  min-height: 44px;
}

.customer-account__optional {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

.form-field .customer-account__check {
  font-size: 15px;
  font-weight: 500;
}

.customer-account__check input {
  accent-color: var(--red);
  flex: none;
  height: 22px;
  margin: 1px 0 0;
  min-height: 0;
  width: 22px;
}

.form-field__help {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* One Order in the account lists. */
.customer-order {
  display: grid;
  gap: 8px;
}

.customer-order__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
}

.customer-order__ref {
  font-weight: 700;
}

.customer-order__meta {
  color: var(--steel);
  margin: 0;
}

.customer-order__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-order__actions form {
  margin: 0;
}

.customer-order__status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 16px;
}

.customer-order__buy {
  width: 100%;
}

.customer-status {
  border: 1px solid currentColor;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding: 3px 8px;
  text-transform: uppercase;
}

.customer-status--progress { color: var(--steel); }
.customer-status--done { color: var(--ok); }
.customer-status--attention { color: var(--warn); }
.customer-status--closed { color: var(--muted); }

.customer-addresses {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.customer-addresses__item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.customer-addresses__item p {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.customer-addresses__actions {
  align-items: center;
  display: flex;
  gap: 16px;
}

.customer-addresses__actions form {
  margin: 0;
}

.customer-account__pages {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 20px;
}

@media (min-width: 720px) {
  .customer-account__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-account__panel--wide {
    grid-column: 1 / -1;
  }

  .customer-order-detail {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

/* Terms, Privacy and Cookies: readable prose width. */
.legal-page {
  padding-bottom: 48px;
}

.legal-page__header {
  margin: 18px 0 14px;
  max-width: 760px;
}

.legal-page__header h1 {
  margin: 4px 0 6px;
}

.legal-page__updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.legal-page__nav {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.legal-page__nav a {
  align-items: center;
  border-bottom: 3px solid transparent;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.legal-page__nav a[aria-current="page"],
.legal-page__nav a:hover,
.legal-page__nav a:focus {
  border-bottom-color: var(--red);
}

.legal-page__body {
  max-width: 760px;
}

.legal-page__body h2 {
  font-size: 20px;
  margin: 28px 0 8px;
  scroll-margin-top: 16px;
}

.legal-page__body p {
  color: var(--steel);
  margin: 0 0 12px;
}

.legal-page__body .info-list {
  margin-bottom: 12px;
}

.legal-page__lede {
  font-size: 17px;
}

/* The model cancellation form, laid out like the paper form it is: who it goes to, the statutory notice,
   and a writing line under each field. templates/storefront/legal/terms.html */
.cancel-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  margin: 4px 0 24px;
  max-width: 760px;
  padding: 20px 16px 16px;
}

.cancel-form__to {
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.legal-page__body .cancel-form__label {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.cancel-form__to address {
  font-style: normal;
  line-height: 1.5;
}

.legal-page__body .cancel-form__notice {
  color: var(--ink);
  font-weight: 600;
  margin: 0;
}

.cancel-form__fields {
  display: grid;
  gap: 18px 32px;
  margin-top: 20px;
}

.cancel-form__field {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  gap: 4px;
  justify-content: space-between; /* side-by-side fields keep their writing lines level */
}

.cancel-form__blank {
  border-bottom: 1px solid var(--steel);
  display: block;
  height: 30px;
}

.cancel-form__blank--tall {
  background: repeating-linear-gradient(to bottom, transparent 0 29px, var(--steel) 29px 30px);
  border-bottom: 0;
  height: 60px;
}

.legal-page__body .cancel-form__footnote {
  color: var(--muted);
  font-size: 13px;
  margin: 20px 0 0;
}

@media (min-width: 720px) {
  .cancel-form {
    padding: 28px 32px 24px;
  }

  .cancel-form__fields {
    grid-template-columns: 1fr 1fr;
  }

  .cancel-form__field--wide {
    grid-column: 1 / -1;
  }
}

.legal-page__table-wrap {
  margin-bottom: 16px;
  overflow-x: auto;
}

.legal-page__table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

/* Phones: each row becomes a short stacked entry instead of a sideways-scrolling table. */
@media (max-width: 719px) {
  .legal-page__table thead {
    display: none;
  }

  .legal-page__table tr {
    border-bottom: 1px solid var(--line);
    display: block;
    padding: 10px 0;
  }

  .legal-page__table tbody td {
    border: 0;
    display: block;
    padding: 2px 0;
  }

  .legal-page__table tbody td:first-child {
    font-weight: 700;
  }

  .legal-page__table tbody td:last-child {
    color: var(--muted);
  }
}

.legal-page__table th,
.legal-page__table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px 9px 0;
  text-align: left;
  vertical-align: top;
}

.legal-page__table code,
.legal-page__body li code {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.checkout-review__terms,
.enquiry-form__privacy {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.checkout-review__terms a,
.enquiry-form__privacy a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Business settings → Delivery & fulfilment (templates/ops/includes/delivery_settings.html): the prices customers
   meet, four method rows that each open their own form, the exceptions, and a price check. No cards: spacing,
   hairlines and colour as state, as on Get ready (docs/DESIGN.md). */
.dlv {
  display: grid;
  gap: 32px;
  min-width: 0;
}

.dlv-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 32px);
  font-style: italic;
  line-height: 1.1;
  margin: 0;
}

.dlv-head__lede {
  color: var(--steel);
  margin: 6px 0 0;
  max-width: 72ch;
}

.dlv-overview {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
}

.dlv-figures {
  display: grid;
  gap: 22px 56px;
  margin: 0;
}

.dlv-figure {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dlv-figure dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dlv-figure dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.dlv-figure strong {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 44px);
  font-style: italic;
  line-height: 1.05;
}

.dlv-figure dd span,
.dlv-figure__ex {
  color: var(--steel);
  font-weight: 600;
}

.dlv-figure__ex {
  font-size: 14px;
  font-weight: 400;
}

.dlv-figure__text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 22ch;
  padding-top: 8px;
}

.dlv-off {
  font-weight: 600;
  margin: 0;
}

.dlv-source {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.dlv-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dlv-section__head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.dlv-subhead {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

.dlv-section__lede {
  color: var(--steel);
  margin: 4px 0 0;
  max-width: 72ch;
}

.dlv-list {
  border-top: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.dlv-row {
  border-bottom: 1px solid var(--line);
}

.dlv-row__link {
  align-items: center;
  color: var(--ink);
  display: grid;
  gap: 4px 16px;
  grid-template-columns: 24px minmax(0, 1fr) auto 20px;
  min-height: 72px;
  padding: 14px 6px;
  text-decoration: none;
}

a.dlv-row__link:hover {
  background: var(--panel);
}

a.dlv-row__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.dlv-row__icon,
.dlv-row__chevron {
  display: flex;
}

.dlv-row__chevron,
.dlv-row--off .dlv-row__icon,
.dlv-row--off .dlv-row__title {
  color: var(--muted);
}

.dlv-row__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dlv-row__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.dlv-row__summary {
  color: var(--steel);
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}

.dlv-row__meta {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.dlv-row__source {
  color: var(--muted);
  font-size: 12px;
}

.dlv-exception {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 6px;
}

.dlv-exception__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dlv-exception__scope {
  color: var(--ink);
  font-weight: 600;
}

.delivery-exception__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  grid-column: 1 / -1;
}

.delivery-exception__actions form {
  margin: 0;
}

.dlv-warning {
  border-left: 3px solid var(--warn);
  margin: 0;
  padding-left: 10px;
}

.dlv-details summary {
  color: var(--steel);
  cursor: pointer;
  font-weight: 600;
  padding: 11px 0;
}

.dlv-details ol {
  color: var(--steel);
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  max-width: 82ch;
  padding-left: 20px;
}

.dlv-check__form {
  align-items: end;
  display: grid;
  gap: 12px;
}

.dlv-check__form .staff-field {
  margin: 0;
}

.dlv-result {
  border-left: 4px solid var(--ink);
  display: grid;
  gap: 4px;
  padding: 2px 0 2px 16px;
}

.dlv-result--free {
  border-left-color: var(--ok);
}

.dlv-result--quote,
.dlv-result--refused {
  border-left-color: var(--warn);
}

.dlv-result p {
  margin: 0;
}

.dlv-result__context {
  color: var(--muted);
  font-size: 14px;
}

.dlv-result__label {
  color: var(--steel);
  font-weight: 600;
}

.dlv-result__figure strong {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 36px);
  font-style: italic;
  line-height: 1.1;
}

.dlv-result__figure span {
  color: var(--steel);
  font-weight: 600;
}

.dlv-result__detail {
  color: var(--steel);
  margin: 4px 0 0;
  padding-left: 18px;
}

/* One method or one exception at a time: what it is, its fields, then Save and Cancel. */
.dlv-editor {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.dlv-editor__head {
  border-bottom: 2px solid var(--red);
  padding-bottom: 12px;
}

.dlv-editor__head .wf-eyebrow {
  margin: 0 0 4px;
}

.dlv-editor__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-style: italic;
  line-height: 1.1;
  margin: 0;
}

.dlv-form {
  display: grid;
  gap: 16px;
}

.dlv-form__actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

@media (min-width: 720px) {
  .dlv-figures {
    grid-template-columns: repeat(3, max-content);
  }

  .dlv-exception {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .delivery-exception__actions {
    grid-column: auto;
  }

  .dlv-check__form {
    grid-template-columns: minmax(0, 220px) minmax(0, 220px) auto auto;
    justify-content: start;
  }
}

@media (max-width: 719px) {
  /* A phone: the state drops under the title, so the words keep the width. */
  .dlv-row__link {
    grid-template-columns: 22px minmax(0, 1fr) 16px;
    padding: 14px 4px;
  }

  .dlv-row__icon {
    align-self: start;
    padding-top: 1px;
  }

  .dlv-row__meta {
    align-items: center;
    display: flex;
    gap: 10px;
    grid-column: 2;
    grid-row: 2;
  }

  .dlv-row__chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  /* Save and Cancel side by side, so the bar that stays in reach is one button tall. */
  .wf-actions.dlv-form__actions--pair {
    flex-wrap: nowrap;
  }

  .wf-actions.dlv-form__actions--pair > .wf-btn {
    flex: 1 1 0;
  }
}

/* A saved delivery method's Reset to defaults: apart from Save and Cancel, below the form. */
.dlv-reset {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.dlv-reset .staff-help {
  margin: 0;
}

/* The exception form's own controls (templates/ops/includes/delivery_exception_form.html), and Reset to defaults. */
.delivery-exception-delete .delivery-link-button,
.dlv-reset .delivery-link-button {
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.delivery-link-button--danger { color: var(--red-deep); }

.delivery-choices {
  border: 0;
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.delivery-choices legend { margin-bottom: 4px; }

.delivery-choice {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 44px;
}

.delivery-choice input {
  accent-color: var(--ink);
  flex: none;
  height: 20px;
  margin: 0;
  width: 20px;
}

/* Fields that do not apply step out of the way; the server ignores them either way. */
.delivery-exception-form:has(input[name="applies_to"][value="oversized"]:checked) .delivery-exception-form__postcodes,
.delivery-exception-form:has(input[name="outcome"][value="quote"]:checked) :is(.delivery-exception-form__amount, .delivery-exception-form__waive) {
  display: none;
}

.delivery-exception-form {
  display: grid;
  gap: 14px;
}

.delivery-exception-form__waive .staff-help { margin: 0 0 0 30px; }

.delivery-exception-delete { margin-top: 4px; }

/* An unsaved exception's preview. */
.delivery-check__result {
  border-left: 4px solid var(--ink);
  padding: 2px 0 2px 16px;
}

.delivery-check__headline {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.delivery-check__result ul {
  color: var(--steel);
  margin: 6px 0 0;
  padding-left: 18px;
}

/* One Order's delivery price: review the change before it is saved. */
.delivery-decision { display: grid; gap: 18px; }
.delivery-decision small { color: var(--muted); display: block; font-size: 13px; }
.delivery-decision__review {
  border-left: 3px solid var(--ink);
  display: grid;
  gap: 12px;
  padding-left: 14px;
}
.delivery-decision__review h2 { font-size: 18px; margin: 0; }
.delivery-decision__form:has(input[name="price"][value="free"]:checked) .delivery-decision__amount { display: none; }

/* Owner decisions (ops/decisions.py). The dashboard's Needs you block, then the full-screen deck: one item, one
   question, one primary answer. The answer bar stays at the bottom of the screen on a phone. */
.dashboard-decisions {
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
}
.dashboard-decisions__title { font-size: 18px; margin: 0; }
.dashboard-decisions__list { display: grid; list-style: none; margin: 0; padding: 0; }
.dashboard-decisions__list a {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 3ch minmax(0, 1fr) auto;
  min-height: 48px;
  text-decoration: none;
}
.dashboard-decisions__list li:first-child a { border-top: 0; }
.dashboard-decisions__list strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.dashboard-decisions__list a:hover span:first-of-type { text-decoration: underline; }
.dashboard-decisions__start { align-items: center; display: inline-flex; justify-content: center; justify-self: start; min-height: 48px; }
@media (max-width: 479px) { .dashboard-decisions__start { justify-self: stretch; text-align: center; } }

body.decide {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.decide__bar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
}
.decide__close {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 30px;
  height: 48px;
  justify-content: center;
  margin-left: -10px;
  text-decoration: none;
  width: 44px;
}
.decide__deck { font-size: 13px; font-weight: 800; letter-spacing: .06em; margin: 0; text-transform: uppercase; }
.decide__progress { color: var(--steel); font-variant-numeric: tabular-nums; font-weight: 700; margin: 0; }
.decide__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0 auto;
  max-width: 600px;
  padding: 16px;
  width: 100%;
}
.decide__main--done { justify-content: center; gap: 16px; }
.decide__form { display: flex; flex: 1; flex-direction: column; gap: 16px; }
.decide__notice { background: var(--panel); border-left: 3px solid var(--ok); margin: 0 0 12px; padding: 10px 12px; }
.decide__notice--problem { border-left-color: var(--warn); }
.decide__card {
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 18px 16px;
}
.decide__item, .decide__product { align-items: center; display: grid; gap: 14px; grid-template-columns: auto minmax(0, 1fr); }
.decide__photo { aspect-ratio: 1; background: var(--fallback-image-bg); display: block; object-fit: contain; width: 64px; }
.decide__hero {
  align-items: center;
  aspect-ratio: 1;
  background: var(--fallback-image-bg);
  color: var(--steel);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  object-fit: contain;
  text-align: center;
  width: 112px;
}
.decide__item p, .decide__product p, .decide__card > p { margin: 0; }
.decide__name { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.decide__meta { color: var(--steel); font-size: 14px; overflow-wrap: anywhere; }
.decide__address { white-space: pre-line; }
.decide__price { margin-top: 6px !important; }
.decide__price strong { font-size: 24px; font-weight: 800; }
.decide__price span { color: var(--muted); display: block; font-size: 14px; }
.decide__fact { align-items: end; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin: 4px 0; }
.decide__figure { display: grid; justify-items: center; margin: 0; }
.decide__figure span { color: var(--steel); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.decide__figure strong { font-size: 48px; font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1; }
.decide__arrow { color: var(--muted); font-size: 28px; margin: 0 0 6px; }
.decide__detail { color: var(--steel); text-align: center; }
.decide__warning, .decide__warnings { border-left: 3px solid var(--warn); margin: 0; padding: 4px 0 4px 10px; }
.decide__warnings { display: grid; gap: 4px; list-style: none; }
.decide__lines { display: grid; gap: 2px; margin: 0; padding-left: 18px; }
.decide__question { font-size: 24px; line-height: 1.2; margin: 4px 0 0; text-align: center; }
.decide__question:focus { outline: none; }
.decide__choices { justify-content: center; }
.decide__form:has(input[name="price"][value="free"]:checked) .decide__amount { display: none; }
.decide__actions {
  align-items: center;
  background: var(--surface);
  bottom: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr);
  margin-top: auto;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  position: sticky;
}
.decide__actions > * { min-height: 52px; }
.decide__actions--done { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); position: static; }
.decide__actions--done:has(> :only-child) { grid-template-columns: 1fr; }
.decide__actions .btn-secondary, .decide__actions .btn-primary { align-items: center; display: inline-flex; justify-content: center; text-align: center; }
.decide__primary { font-size: 16px; }
.decide__skip {
  background: none;
  border: 0;
  color: var(--steel);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.decide__keys { color: var(--muted); font-size: 12px; margin: 0; text-align: center; }
@media (max-width: 719px) { .decide__keys { display: none; } }
@media (max-width: 359px) {
  .decide__figure strong { font-size: 40px; }
  .decide__actions { grid-template-columns: auto minmax(0, 1fr); }
  .decide__actions .btn-secondary { grid-column: 1 / -1; grid-row: 2; }
}
/* ------------------------------------------------------------------
   Header navigation, November 2026 (templates/base.html).
   Phones: the menu opens as a full-screen panel with its own bar, big
   display-type links and the trade counter's details. From 720 px the
   links sit in the header as before, with tracked caps and a red bar on
   hover; the panel's bar and contact block are not shown.
   ------------------------------------------------------------------ */
.site-nav__bar,
.site-nav__contact {
  display: none;
}

@media (max-width: 719px) {
  html.menu-open,
  html.menu-open body {
    overflow: hidden;
  }

  .site-nav.is-open {
    background: var(--ink-glow), var(--ink);
    display: flex;
    flex-direction: column;
    gap: 0;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 16px max(20px, env(safe-area-inset-bottom));
    position: fixed;
    z-index: 1000;
  }

  .site-nav.is-open .site-nav__bar {
    align-items: center;
    background: var(--ink-glow), var(--ink);
    display: flex;
    justify-content: space-between;
    margin: 0 -16px 18px;
    min-height: 64px;
    padding: 0 8px 0 16px;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .site-nav__bar::after {
    background: linear-gradient(90deg, var(--red) 0 72%, var(--silver) 72% 100%);
    bottom: 0;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
  }

  .site-nav__bar img {
    display: block;
    height: 30px;
    width: auto;
  }

  .site-nav__close {
    background: transparent;
    border: 0;
    cursor: pointer;
    height: 48px;
    position: relative;
    width: 48px;
  }

  .site-nav__close span[aria-hidden]::before,
  .site-nav__close span[aria-hidden]::after {
    background: #fff;
    content: "";
    height: 2px;
    left: 12px;
    position: absolute;
    top: 23px;
    width: 24px;
  }

  .site-nav__close span[aria-hidden]::before {
    transform: rotate(45deg);
  }

  .site-nav__close span[aria-hidden]::after {
    transform: rotate(-45deg);
  }

  /* Big display-type links, a red chevron on each. */
  .site-nav > a,
  .site-nav .nav-products > summary {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    display: flex;
    font-family: var(--font-display);
    font-size: clamp(26px, 7.8vw, 32px);
    font-style: italic;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: -.01em;
    line-height: 1;
    min-height: 64px;
    padding: 0;
    text-transform: none;
  }

  .site-nav > a::after {
    border-right: 2.5px solid var(--red);
    border-top: 2.5px solid var(--red);
    content: "";
    flex: none;
    height: 10px;
    margin-right: 6px;
    transform: rotate(45deg);
    width: 10px;
  }

  .site-nav .nav-products > summary::after {
    border-color: var(--red);
    border-width: 0 2.5px 2.5px 0;
    height: 10px;
    margin-right: 6px;
    width: 10px;
  }

  .site-nav > a:active,
  .site-nav .nav-products > summary:active {
    color: var(--red);
  }

  .site-nav .nav-products__panel {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding: 6px 0 14px;
  }

  .site-nav .nav-department__head a {
    font-size: 18px;
    font-weight: 600;
    min-height: 48px;
  }

  .site-nav .nav-products__footer {
    gap: 0 20px;
    padding-top: 4px;
  }

  .site-nav > .site-nav__staff {
    color: var(--silver);
    display: flex;
    font-size: 22px;
  }

  /* The trade counter: call, write or find us, and the VAT choice. */
  .site-nav.is-open .site-nav__contact {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding-top: 24px;
  }

  .site-nav__label {
    color: var(--silver);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    margin: 0 0 4px;
    text-transform: uppercase;
  }

  .site-nav .site-nav__contact a {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 0;
    text-transform: none;
  }

  .site-nav .site-nav__contact a::before {
    background: var(--silver);
    content: "";
    flex: none;
    height: 18px;
    -webkit-mask: var(--icon-pin) center / contain no-repeat;
    mask: var(--icon-pin) center / contain no-repeat;
    width: 18px;
  }

  .site-nav .site-nav__call {
    font-size: 24px;
    font-weight: 700;
    min-height: 48px;
  }

  .site-nav .site-nav__contact .site-nav__call::before {
    background: var(--red);
    height: 22px;
    -webkit-mask-image: var(--icon-phone);
    mask-image: var(--icon-phone);
    width: 22px;
  }

  .site-nav .site-nav__line {
    color: #d6d7d8;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    min-height: 44px;
  }

  .site-nav .site-nav__contact .site-nav__line--mail::before {
    -webkit-mask-image: var(--icon-mail);
    mask-image: var(--icon-mail);
  }

  .site-nav__vat {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: var(--silver);
    display: flex;
    font-size: 14px;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 14px;
  }

  .site-nav__vat .vat-switch button {
    font-size: 13px;
    min-height: 36px;
    padding: 0 14px;
  }

}

@media (max-width: 719px) and (prefers-reduced-motion: no-preference) {
  .site-nav.is-open {
    animation: site-nav-in .22s ease-out both;
  }

  .site-nav.is-open > :not(.site-nav__bar) {
    animation: site-nav-item-in .38s cubic-bezier(.2, .7, .2, 1) both;
  }

  .site-nav.is-open > :nth-child(2) { animation-delay: 80ms; }
  .site-nav.is-open > :nth-child(3) { animation-delay: 125ms; }
  .site-nav.is-open > :nth-child(4) { animation-delay: 170ms; }
  .site-nav.is-open > :nth-child(5) { animation-delay: 215ms; }
  .site-nav.is-open > :nth-child(6) { animation-delay: 260ms; }
  .site-nav.is-open > :nth-child(n + 7) { animation-delay: 305ms; }

  @keyframes site-nav-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes site-nav-item-in {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: none; }
  }
}

/* Tablet and desktop: more air in the header, tracked caps in the nav. */
@media (min-width: 720px) {
  .utility-inner {
    min-height: 40px;
  }

  .header-inner {
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .site-logo img {
    height: 40px;
  }

  .site-search input {
    min-height: 46px;
    padding: 0 14px;
  }

  .site-search .site-search__submit {
    min-height: 46px;
    width: 54px;
  }

  .site-nav > a,
  .site-nav .nav-products > summary {
    font-size: 13px;
    letter-spacing: .04em;
    padding: 10px 0;
    position: relative;
    white-space: nowrap;
  }

  .site-nav .nav-products > summary {
    align-items: center;
    display: inline-flex;
  }

  .site-nav .nav-products > summary::after {
    border-color: var(--red);
  }

  .site-nav > a::after {
    background: var(--red);
    bottom: 2px;
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    right: 0;
    transform: scaleX(0);
    transform-origin: left;
  }

  .site-nav > a:hover::after,
  .site-nav > a:focus-visible::after,
  .site-nav > a[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .nav-products__panel {
    border-top-width: 2px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .28);
    padding: 28px 32px 22px;
  }
}

@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  .site-nav > a::after {
    transition: transform .18s ease;
  }
}

/* 720–1219 px: the nav has its own row, under a hairline. */
@media (min-width: 720px) and (max-width: 1219px) {
  .site-nav {
    border-top: 1px solid rgba(255, 255, 255, .08);
    column-gap: 28px;
    margin-bottom: -6px;
    padding-top: 6px;
  }
}

/* Owner's Delete product panel on a product page: the end of the page, one action, red only for a real delete. */
.product-delete { border-top: 3px solid var(--red-deep); display: grid; gap: 10px; }
.product-delete p { margin: 0; }
.product-delete__reasons { color: var(--steel); margin: 0; padding-left: 20px; }
.product-delete__button { align-items: center; display: inline-flex; justify-self: start; min-height: 44px; }
.product-delete__button--danger { border-color: var(--red-deep); color: var(--red-deep); }
.product-delete__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Completion (templates/ops/includes/completion.html): the one way the staff app says "done". A drawn check, the
   headline, the figures that matter, one primary action. Still under reduced motion. */
.completion {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0 auto;
  max-width: 520px;
  padding: 28px 16px 16px;
  text-align: center;
}
.completion__mark { color: var(--ok); display: block; }
.completion__ring, .completion__tick { stroke-dasharray: 200; stroke-dashoffset: 0; }
.completion__headline { font-size: 28px; line-height: 1.1; margin: 4px 0 0; text-wrap: balance; }
.completion__figures { color: var(--ink); font-size: 17px; font-weight: 700; margin: 0; }
.completion__note { color: var(--steel); margin: 0; max-width: 44ch; }
.completion__actions { display: grid; gap: 10px; margin-top: 10px; width: 100%; }
.completion__actions > * { align-items: center; display: inline-flex; justify-content: center; min-height: 52px; text-align: center; }
@media (min-width: 480px) {
  .completion__actions { grid-auto-flow: column; justify-content: center; width: auto; }
  .completion__actions > * { min-width: 200px; }
}
@media (prefers-reduced-motion: no-preference) {
  .completion__ring { animation: completion-draw 420ms ease-out both; }
  .completion__tick { stroke-dasharray: 60; animation: completion-draw-tick 260ms ease-out 300ms both; }
  .completion__headline, .completion__figures, .completion__note, .completion__actions {
    animation: completion-rise 320ms ease-out 240ms both;
  }
}
@keyframes completion-draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@keyframes completion-draw-tick { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes completion-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* What to gather (templates/ops/orders/_pick_lines.html): quantity first, the item as the picker reads it, SKU last. */
.pick-lines { display: grid; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.pick-line { align-items: baseline; display: grid; gap: 4px 10px; grid-template-columns: auto minmax(0, 1fr); }
.pick-line__qty { font-size: 18px; font-variant-numeric: tabular-nums; }
.pick-line__what { font-weight: 700; overflow-wrap: anywhere; }
.pick-line__sku { color: var(--muted); font-size: 12px; grid-column: 2; }
.pick-line--empty { color: var(--muted); grid-template-columns: 1fr; }
.order-facts__subheading { font-size: 14px; margin: 0 0 6px; }
.deliveries-card__contact, .deliveries-card__instructions { color: var(--steel); font-size: 14px; margin: 0 0 8px; }
.deliveries-card .pick-lines { margin-bottom: 8px; }
.stock-alert__actions { display: inline-flex; gap: 14px; }
.stock-alert__actions a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.return-lines { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.return-line { border-top: 1px solid var(--line); display: grid; gap: 8px 16px; padding-top: 12px; }
.return-line:first-child { border-top: 0; padding-top: 0; }
.return-line__what { margin: 0; }
.return-line__qty input { max-width: 120px; }
@media (min-width: 720px) { .return-line { grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; } .return-line__what { grid-column: 1 / -1; } }
.return-review__lines { list-style: disc; padding-left: 20px; }
.stock-open-packs { display: inline-flex; align-items: center; font-weight: 700; margin-left: 10px; min-height: 44px; }
.stock-count-link { display: inline-flex; align-items: center; font-weight: 700; margin-left: 10px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ------------------------------------------------------------------
   Homepage pass, 14 November 2026.
   - The glow on the header and the hero carries the grain (--ink-grain), so the gradient has no visible steps.
     The hero's own glow ends at its bottom edge.
   - The stripe under the navigation is one solid red (and the phone menu's bar matches it): a bar that turns grey
     part-way along reads as a progress or loading bar. The other stripes keep the red and silver motif.
   - Product photos fill about 78% of their box in the hero cards, job tiles and department tiles, centred and
     uncropped. scale-down never enlarges a photo past its own size, and the boxes are fixed, so nothing shifts.
   - Below 768 px the utility bar is one row (phone, VAT); the delivery promises are one line at the foot of the
     header instead (templates/_delivery_promises.html).
   ------------------------------------------------------------------ */
.site-header {
  background: var(--ink-grain), var(--ink-glow), var(--ink);
}

.hero-stage {
  background:
    var(--ink-grain),
    radial-gradient(120% 520px at 100% calc(-1 * var(--site-header-h, 0px)), var(--ink-glow-colour), transparent 60%),
    var(--ink);
}

.stripe--solid,
.site-nav__bar::after {
  background: var(--red);
}

.hero-card__mount {
  height: 160px;
}

.hero-card__mount > img,
.job-paths__media img,
.category-media img {
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: scale-down;
  width: 100%;
}

/* The brand mark standing in for a missing picture stays its own modest size. */
.job-paths__media img.media-mark,
.category-media img.media-mark {
  height: 80px;
  width: 80px;
}

.header-promos__row {
  display: none;
}

@media (max-width: 767px) {
  .utility-inner .utility-services {
    display: none;
  }

  .utility-inner,
  .utility-inner--account {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .utility-inner .utility-contact {
    grid-column: 1;
    grid-row: 1;
  }

  .utility-inner .utility-controls {
    grid-column: 2;
    grid-row: 1;
  }

  .header-promos__row {
    display: block;
  }

  .header-promos {
    align-items: center;
    color: #d6d7d8;
    display: flex;
    font-size: 12px;
    justify-content: center;
    min-height: 24px;
    padding-bottom: 8px;
    text-decoration: none;
    white-space: nowrap;
  }

  .header-promos:hover,
  .header-promos:focus-visible {
    color: #fff;
  }

  .header-promos .utility-promo + .utility-promo::before {
    color: var(--red);
    content: "•";
    margin: 0 8px;
  }
}

@media (max-width: 359px) {
  .header-promos {
    font-size: 11px;
  }

  .header-promos .utility-promo + .utility-promo::before {
    margin: 0 6px;
  }
}

/* Job tiles on desktop: up to a quarter of the row each, so four tiles fill it and fewer do not huddle at the left
   with a gap beside them. Five or six share the row as before. */
@media (min-width: 1040px) {
  .job-paths__grid li {
    max-width: calc((100% - 3px) / 4);
  }
}


/* ---------------------------------------------------------------- two-step sign-in (twofactor/, docs/TWO_FACTOR.md)
   One column, one main action, mobile first: the staff-auth panel, with the few pieces it lacks. */
.twofactor-panel h1 { font-size: 34px; }
.twofactor-panel p { margin: 0; }
.twofactor-back { color: var(--steel); font-size: 14px; font-weight: 700; text-decoration: none; }
.twofactor-back::before { content: "‹ "; }
.twofactor-hint { color: var(--muted); font-size: 14px; }
.twofactor-warn { color: var(--warn); font-weight: 700; }
.staff-field input.twofactor-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  letter-spacing: .12em;
  min-height: 52px;
}
.twofactor-check { align-items: center; display: flex; gap: 10px; min-height: 44px; }
.twofactor-check input { height: 22px; width: 22px; accent-color: var(--red); }
.twofactor-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.twofactor-actions .btn-primary { align-items: center; display: inline-flex; justify-content: center; text-align: center; text-decoration: none; }
.twofactor-steps { margin: 0; padding-left: 20px; }
.twofactor-steps li { line-height: 1.45; }
.twofactor-qr { justify-self: center; line-height: 0; }
.twofactor-qr svg { height: auto; max-width: 220px; width: 60vw; }
.twofactor-key summary { color: var(--steel); cursor: pointer; font-size: 14px; min-height: 32px; }
.twofactor-key code { display: block; font-size: 16px; letter-spacing: .06em; margin-top: 8px; overflow-wrap: anywhere; }
.twofactor-codes {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  list-style: none;
  margin: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.twofactor-codes code { font-size: 17px; letter-spacing: .04em; }
.twofactor-print { background: none; border: 0; cursor: pointer; padding: 0; }
.twofactor-list { color: var(--steel); margin: 0; padding-left: 20px; }
.twofactor-status { align-items: flex-start; display: flex; gap: 12px; }
.twofactor-status p { color: var(--steel); margin-top: 4px; }
.twofactor-status__mark { border-radius: 50%; flex: 0 0 auto; height: 14px; margin-top: 5px; width: 14px; background: var(--silver); }
.twofactor-status--on .twofactor-status__mark { background: var(--ok); }
.twofactor-links { display: grid; border-top: 1px solid var(--line); }
.twofactor-links a {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  min-height: 48px;
  padding: 13px 0;
  text-decoration: none;
}
.twofactor-links a::after { color: var(--silver); content: "›"; float: right; }
.twofactor-links .twofactor-links__danger { color: var(--red-deep); }
.twofactor-subhead { font-size: 16px; margin: 8px 0 0; text-transform: uppercase; color: var(--steel); }
.twofactor-devices ul { display: grid; list-style: none; margin: 0 0 8px; padding: 0; }
.twofactor-devices li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}
.twofactor-devices li span { color: var(--muted); display: block; font-size: 13px; }
.twofactor-devices button { background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 4px; }
.btn-primary.twofactor-danger { background: var(--red-deep); border-color: var(--red-deep); }
@media print {
  .twofactor-panel > :not(h1):not(.twofactor-codes) { display: none !important; }
}

/* The Owner's review of the legal documents for launch (templates/legal_approval/review.html). */
.legal-approval-page { max-width: 820px; }
.legal-approval-page .staff-panel { display: grid; gap: 10px; min-width: 0; }
.legal-approval-page .staff-panel > p { margin: 0; }
.legal-approval-page .staff-panel > h2 { margin: 0; }
.legal-approval-meta { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.legal-approval-text summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.legal-approval-text .legal-page__body { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; overflow-wrap: anywhere; }
.legal-approval-note { background: var(--surface); border-left: 3px solid var(--warn); padding: 8px 12px; }
.legal-approval-confirm label { align-items: center; display: flex; font-size: 16px; font-weight: 700; gap: 12px;
  letter-spacing: 0; text-transform: none; }
.legal-approval-change summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.legal-approval-confirm input { flex: none; height: 22px; margin: 0; width: 22px; }
.legal-approval-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.legal-approval-actions button { justify-content: center; min-height: 44px; }
.legal-approval-history { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
@media (max-width: 560px) {
  .legal-approval-actions button { flex: 1 1 100%; }
}

/* Finding a product to add to a collection (templates/ops/merchandising/collection_detail.html). */
.collection-pin-add { border-top: 1px solid var(--line); display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; }
.collection-pin-results { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.collection-pin-results li { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 12px;
  justify-content: space-between; min-height: 52px; padding: 8px 0; }
.collection-pin-results__name { min-width: 0; overflow-wrap: anywhere; }
.collection-pin-results form { flex: none; margin: 0; }
.collection-pin-results button { min-height: 44px; min-width: 64px; }

/* ------------------------------------------------------------------
   Counter Sale (templates/ops/counter/sale.html), 17 November 2026: one screen at the till. Barcode first, large
   touch targets, one primary action. Few borders: rows are separated by a hairline, the total stands alone.
   ------------------------------------------------------------------ */
/* minmax(0, 1fr): the column may be narrower than the scan box's default width (20 characters at 20px, 271px in
   WebKit), which otherwise made the till 375px wide and scroll sideways on a 320-390px phone. */
.counter-sale { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); max-width: 880px; }
.counter-sale__head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.counter-sale__head h1 { margin: 0; }
.counter-sale__scan label { display: block; font-weight: 700; margin-bottom: 6px; }
.counter-sale__scan-row { display: flex; gap: 8px; }
.counter-sale__scan-row input { flex: 1 1 auto; font-size: 20px; min-height: 52px; min-width: 0; padding: 0 12px; }
.counter-sale__scan-row button { min-height: 52px; min-width: 96px; }
.counter-sale__results h2, .counter-sale__basket h2 { font-size: 18px; margin: 0 0 8px; }
.counter-sale__results ul, .counter-sale__lines { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.counter-sale__pick { background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; display: grid;
  font: inherit; gap: 2px; min-height: 56px; padding: 10px 4px; text-align: left; width: 100%; }
.counter-sale__pick:hover, .counter-sale__pick:focus-visible { background: var(--surface, #F5F5F5); }
.counter-sale__line { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 6px 12px;
  grid-template-columns: minmax(0, 1fr) auto auto auto; padding: 10px 0; }
.counter-sale__line-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.counter-sale__qty { align-items: center; display: flex; gap: 6px; }
.counter-sale__qty input { font-size: 18px; min-height: 44px; text-align: center; width: 4.5em; }
.counter-sale__qty button { min-height: 44px; }
.counter-sale__line-total { font-weight: 700; margin: 0; white-space: nowrap; }
.counter-sale__totals { display: grid; gap: 4px; margin: 12px 0 0 auto; max-width: 320px; }
.counter-sale__totals div { display: flex; justify-content: space-between; }
.counter-sale__totals dt, .counter-sale__totals dd { margin: 0; }
.counter-sale__grand { border-top: 2px solid var(--ink, #111); font-size: 28px; font-weight: 800; padding-top: 6px; }
.counter-sale__pay { border-top: 3px solid var(--red); display: grid; gap: 14px; padding-top: 14px; }
.counter-sale__methods { border: 0; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.counter-sale__methods legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.counter-sale__method { align-items: center; border: 2px solid var(--line); cursor: pointer; display: inline-flex; flex: 1 1 200px;
  font-size: 18px; font-weight: 700; gap: 10px; min-height: 56px; padding: 0 16px; }
.counter-sale__method:has(input:checked) { border-color: var(--red); }
.counter-sale__method input { height: 22px; width: 22px; }
.counter-sale__cash, .counter-sale__card { display: grid; gap: 6px; max-width: 360px; }
.counter-sale__cash[hidden], .counter-sale__card[hidden] { display: none; }
.counter-sale__cash input, .counter-sale__card input { font-size: 20px; min-height: 52px; padding: 0 12px; }
.counter-sale__change { font-size: 20px; font-weight: 800; margin: 0; min-height: 1.4em; }
.counter-sale__received { align-items: center; display: flex; font-size: 18px; gap: 10px; min-height: 44px; }
.counter-sale__received input { height: 22px; width: 22px; }
.counter-sale__received[hidden] { display: none; }
.counter-sale__complete { font-size: 20px; min-height: 60px; width: 100%; }

@media (max-width: 599px) {
  .counter-sale__line { grid-template-columns: minmax(0, 1fr) auto; }
  .counter-sale__line-text { grid-column: 1 / -1; }
  .counter-sale__grand { font-size: 24px; }
}
.counter-card__status { font-size: 24px; font-weight: 800; margin: 0; }
.counter-card__message { min-height: 1.4em; }
.counter-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.counter-card__actions[hidden], .counter-card form[hidden] { display: none; }
.counter-card__actions button { min-height: 48px; }
/* Payments to check (templates/ops/orders/payment_checks.html) */
.payment-checks__list { display: grid; list-style: none; margin: 0; padding: 0; }
.payment-checks__row { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding: 12px 0; }
.payment-checks__row > div { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.payment-checks__row p { margin: 4px 0 0; }
.payment-checks__row .btn-secondary { min-height: 44px; }
.takings__reader td:nth-child(-n+4) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.takings__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.takings__elavon td:nth-child(-n+4) { font-variant-numeric: tabular-nums; white-space: nowrap; }
