/* Smarterbuys Store: components. Everything src/web/components.js draws, plus a few shared patterns for the
   storefront and checkout (chips, accordion, stepper, panel, skeleton). Colours, radii, shadows and fonts come
   from tokens.css only.

   PHONE FIRST. Four regions, in this order (docs/build-notes/devices/PHONE_SPEC.md 0.2):
     1 SHARED AND PHONE   the default: what is the same at every width, and the phone's layout (up to 699.98px)
     2 TABLET AND UP      @media (min-width: 700px)
     3 DESKTOP            @media (min-width: 1200px)
     4 CAPABILITY AND MODES   hover (only where a pointer hovers), fine pointers, reduced motion
   No phone rule is written under a max-width query, but for the small-phone refinement (max-width: 374.98px).
   Sizes of type are in rem, so the system's text size and browser zoom carry through. */

/* ===== 1 SHARED AND PHONE (default: every width up to 699.98px) ===== */

/* ---------------------------------------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--navy); --btn-fg: #fff; --btn-bd: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h); padding: 0 24px; border: 2px solid var(--btn-bd); border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 1rem/1.2 var(--font-body); text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-med), transform 120ms;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn svg { margin-inline: -2px; }
.btn--secondary { --btn-bg: transparent; --btn-fg: var(--navy); --btn-bd: var(--navy); }
.btn--accent { --btn-bg: var(--mint); --btn-fg: var(--ink); }
.btn--accent:active { transform: scale(.98); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); }
.btn--dark { --btn-bg: var(--ink); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--link { min-height: var(--tap); padding: 0 2px; border-radius: 8px; --btn-bg: transparent; --btn-fg: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.btn--sm { min-height: var(--btn-h-sm); padding: 0 20px; font-size: .9375rem; gap: 8px; }
.btn--lg { min-height: 56px; padding: 0 24px; font-size: 1.125rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { --btn-bg: #E7E3EC; --btn-fg: #65627D; --btn-bd: transparent; box-shadow: none; transform: none; cursor: not-allowed; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border: 2.5px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--primary.is-busy::after, .btn--dark.is-busy::after { border-color: #fff; border-right-color: transparent; }
.btn[disabled].is-busy::after, .btn[aria-disabled="true"].is-busy::after { border-color: var(--ink); border-right-color: transparent; }
.btn.is-done { --btn-bg: var(--ink); --btn-fg: #fff; box-shadow: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------------------------------------------------------------------------------------------- form fields */
.field { display: grid; gap: 6px; margin: 0 0 20px; }
.field__label { font-weight: 700; font-size: .9375rem; color: var(--navy); }
.field__optional { font-weight: 400; color: var(--muted); }
.field__hint { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.field__input { display: block; width: 100%; min-height: var(--btn-h); padding: 0 16px; border: 1.5px solid var(--control); border-radius: var(--r-well); background: #fff; color: var(--navy); font-size: 1rem; transition: border-color var(--t-fast), box-shadow var(--t-fast); appearance: none; -webkit-appearance: none; }
.field__input::placeholder { color: #6F6B86; opacity: 1; }
.field__input:focus-visible { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(59, 247, 202, .45); outline-offset: 0; outline-width: 2px; }
.field__input--area { min-height: 128px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field__select { position: relative; display: block; }
.field__select select { padding-right: 46px; cursor: pointer; }
.field__select svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--navy); pointer-events: none; }
.field--error .field__input { border-color: var(--stock-low); border-width: 2px; background: #FFFAF9; }
.field__error { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--stock-low); }
.field__error svg { margin-top: 1px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 10px 0; cursor: pointer; }
.check__input { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--control); border-radius: 7px; background: #fff; cursor: pointer; appearance: none; -webkit-appearance: none; transition: background var(--t-fast), border-color var(--t-fast); }
.check__input[type="radio"] { border-radius: 50%; }
.check__input:checked { background: var(--navy); border-color: var(--navy); }
.check__input[type="checkbox"]:checked::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check__input[type="radio"]:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.check__label { font-size: .9375rem; line-height: 1.55; }
.field--check { gap: 0; margin-bottom: 8px; }
.field--check .field__hint, .field--check .field__error { padding-left: 36px; }

/* ---------------------------------------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 11px; border-radius: var(--r-pill); font: 800 .8125rem/1 var(--font-display); letter-spacing: .01em; white-space: nowrap; background: var(--well); color: var(--ink); }
.badge--save { background: var(--lime); box-shadow: 0 2px 0 rgba(16, 11, 52, .12); }
/* a reduction is loud on the white pages too: a bigger flag, a lime highlighter under the new price */
.pcard__flags .badge { padding: 0 10px; }
.pcard__flags .badge--save { min-height: 26px; font-size: .8125rem; transform: rotate(-3deg); transform-origin: left center; }
.pcard--deal .price__now { margin-left: -6px; padding: 0 6px; background: linear-gradient(transparent 58%, var(--lime) 58%); }
.price--page .badge--save { display: none; min-height: 36px; padding: 0 16px; font-size: 1.0625rem; transform: rotate(-3deg); }   /* on a phone the saving is flagged on the picture */
.badge--note { background: var(--ink); color: #fff; }
.badge--bundle { background: var(--mint); color: var(--ink); }   /* several of the shop's products sold as one (src/lib/bundles.js) */
.badge--mint { background: var(--mint); }
.badge--coral { background: var(--coral); }
.badge--lg { min-height: 32px; padding: 0 14px; font-size: .9375rem; }

.stock { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; }
.stock::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--in { color: var(--stock-in); }
.stock--low { color: var(--stock-off); }                           /* neutral ink: a fact, not an alarm */
.stock--off { color: var(--stock-off); }
.stock--in::before { box-shadow: 0 0 0 3px rgba(10, 107, 82, .15); }
.stock--pre { color: var(--navy); }                              /* a pre-order: when it is expected, in plain ink */
.stock--pre::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.stock-when { display: block; margin-top: 2px; color: var(--slate); font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; }

/* ---------------------------------------------------------------------------------------------- prices */
.price { display: grid; gap: 1px; }
.price p { margin: 0; }
.price__cash { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.price__now { font: 800 1.625rem/1.05 var(--font-display); letter-spacing: var(--track-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.price__was { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.price__was s { text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
/* the monthly line and the APR line are one unit: the APR words are never the lesser in weight or colour, and
   never under 70% of the size of the figure they stand with */
.price__monthly, .price__terms, .price__finance-note { font-size: var(--fs-xs); line-height: 1.45; color: var(--slate); }
.price__terms strong { font-weight: 800; }
.price__monthly, .price__finance-note { margin-top: 7px !important; }
.price strong { font-weight: 700; color: var(--ink); }
.price__none { font-weight: 600; color: var(--muted); }
/* the product page's price on a phone: centred, one thing a line (cash price, the payment, its APR) */
.price--page { justify-items: center; gap: 0; text-align: center; }
.price--page .price__cash { justify-content: center; gap: 4px 10px; }
.price--page .price__now { font-size: 2.125rem; line-height: 1; }
.price--page .price__was { font-size: 1rem; }
.price--page .price__monthly { margin-top: 6px !important; font: 700 1.375rem/1.25 var(--font-display); color: var(--navy); }
.price--page .price__terms { font: 700 1.0625rem/1.3 var(--font-display); color: var(--navy); }      /* 77% of the figure above it */
.price--page .price__finance-note { margin-top: 6px !important; font-size: .9375rem; line-height: 1.45; }
@media (max-width: 374.98px) {
  .price--page .price__now { font-size: 2rem; }
  .price--page .price__monthly { font-size: 1.25rem; }
  .price--page .price__terms { font-size: 1rem; }                 /* 80% */
}

/* ---------------------------------------------------------------------------------------------- product card */
/* The default card is the phone's compact upright card (rails, a plain grid of two across). Inside a grid with
   .product-grid--rows it is a row: the picture at the left, flush to the card's edge (listings). From 700px every
   card is the upright card of region 2. The row rules are written with :where(), so they weigh no more than the
   plain rules and region 2 undoes them without naming .product-grid--rows. */
.pcard { position: relative; display: flex; flex-direction: column; height: 100%; min-width: 0; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med), border-color var(--t-med), opacity var(--t-fast); }
.pcard:active:not(:has(.pcard__buy:active, .pcard__compare:active)) { opacity: .72; transform: scale(.985); border-color: var(--control); }      /* pressed: a finger gets an answer */
.pcard__media { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; margin: 0; border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0; background: radial-gradient(circle at 50% 38%, #FBF9F4 0%, var(--well) 72%); overflow: hidden; }
/* the picture is laid over its well (never sizing it): a tall product is fitted whole, a white photo background
   dissolves into the well; a cut-out stands in it with its own shadow */
.pcard__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 8px; object-fit: contain; mix-blend-mode: multiply; transition: transform var(--t-slow) var(--ease), opacity var(--t-fast); }
.pcard__img--cutout { mix-blend-mode: normal; filter: drop-shadow(0 6px 8px rgba(16, 11, 52, .14)); }
.pcard__img--alt, .pcard__dots { display: none; }                  /* the second photograph: only where a mouse points (region 4) */
.pcard__noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--navy); opacity: .32; }
.pcard__noimg svg { width: 38%; height: auto; }
.pcard__flags { position: absolute; z-index: 1; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pcard__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 0; }
.pcard__name { margin: 0; font: 600 .875rem/1.3 var(--font-body); letter-spacing: 0; color: var(--navy); text-wrap: wrap; }
.pcard__link { display: block; color: inherit; text-decoration: none; }
.pcard__link::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: var(--r-card); }
.pcard__brand { display: block; margin-bottom: 2px; font-size: var(--fs-eyebrow); font-weight: 700; line-height: 1.3; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--muted); }
.pcard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard__title { overflow-wrap: anywhere; }                          /* a long model code breaks instead of losing its last letter */
/* key specifications: chips on one line; one that does not fit wraps under the line and is not drawn */
.pcard__facts { display: flex; flex-wrap: wrap; gap: 4px; height: 20px; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.pcard__facts li { flex: none; max-width: 100%; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--well); color: var(--navy); font-size: .75rem; font-weight: 600; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .price { margin-top: auto; }
.pcard .price__now { font-size: 1.125rem; }
/* the old price takes its own line (and a card without one keeps that line empty), so prices line up along a rail */
.pcard .price__was { flex-basis: 100%; font-size: .75rem; }
.pcard .price__cash:not(:has(.price__was))::after { content: "\00a0"; flex-basis: 100%; font-size: .75rem; font-weight: 500; }
.rail__track:not(:has(.price__was)) .price__cash::after { content: none; }                          /* no card in this rail has one: no empty line */
.pcard .price__monthly { margin-top: 4px !important; font-size: .8125rem; font-weight: 700; color: var(--navy); }
.pcard .price__monthly strong { font-weight: 800; }
.pcard .price__terms, .pcard .price__finance-note { font-size: .75rem; color: var(--navy); }      /* 92% of the figure above it */
.pcard .price__finance-note { margin-top: 4px !important; min-height: 4.45em; }                    /* the height of the monthly pair */
.pcard__stock { margin: 0; }
.pcard__buy { position: relative; z-index: 2; margin: 0; padding: 10px; }
.pcard__buy .btn { padding: 0 10px; font-size: var(--fs-sm); gap: 6px; }
.pcard__buy--none { display: block; min-height: var(--btn-h-sm); margin: 10px; padding: 0 8px; line-height: var(--btn-h-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: var(--r-pill); background: var(--well); color: var(--stock-off); font-size: var(--fs-xs); font-weight: 600; text-align: center; }
.pcard__more { display: none; }
.pcard__compare { display: none; }                                  /* compare is a tablet and desktop tool */
.pcard--unavailable .pcard__img { opacity: .45; filter: grayscale(.5); }
.pcard--unavailable .pcard__noimg { opacity: .18; }
.pcard--unavailable .price__now { color: var(--slate); }
.pcard--compact .pcard__body { padding-bottom: 12px; }
@supports selector(:has(a)) {
  .pcard:has(.pcard__link:focus-visible) { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-gap); }
  .pcard__link:focus-visible { outline: none; }
}
@media (max-width: 374.98px) { .pcard__buy .btn svg { display: none; } }
/* in a rail on a phone the whole card is the link: no stock line, no facts, no button */
.rail .pcard__body { padding-bottom: 12px; }
.rail .pcard__buy, .rail .pcard__stock, .rail .pcard__facts { display: none; }

/* the row card (phone listings): picture panel 44% of the card, the words beside it, the add button a disc on the picture */
:where(.product-grid--rows) .pcard { display: grid; grid-template-columns: 44% minmax(0, 1fr); min-height: 176px; }
:where(.product-grid--rows) .pcard__media { aspect-ratio: auto; height: 100%; border-radius: calc(var(--r-card) - 1px) 0 0 calc(var(--r-card) - 1px); }
:where(.product-grid--rows) .pcard__flags .badge--save { min-height: 28px; font-size: .875rem; }
:where(.product-grid--rows) .pcard__body { gap: 0; padding: 10px 12px; }
:where(.product-grid--rows) .pcard__name { font-size: .9375rem; line-height: 1.27; }
:where(.product-grid--rows) .pcard__title { min-height: 0; }
:where(.product-grid--rows) .pcard__facts { margin-top: 6px; }
:where(.product-grid--rows) .pcard .price { gap: 0; padding-top: 6px; }
/* the price and the old price share one line: on a narrower card both give a little (20px and 13px at 390 wide) */
:where(.product-grid--rows) .pcard .price__cash { gap: 2px 6px; }
:where(.product-grid--rows) .pcard .price__now { font-size: clamp(1.0625rem, 5.6cqi, 1.25rem); }
:where(.product-grid--rows) .pcard--deal .price__now { margin-left: -4px; padding: 0 4px; }
:where(.product-grid--rows) .pcard .price__was { flex-basis: auto; font-size: clamp(.75rem, 3.6cqi, .8125rem); line-height: 1; }
:where(.product-grid--rows) .pcard .price__cash:not(:has(.price__was))::after { content: none; }
:where(.product-grid--rows) .pcard .price__monthly { font-size: .9375rem; line-height: 1.3; }
:where(.product-grid--rows) .pcard .price__terms, :where(.product-grid--rows) .pcard .price__finance-note { font-size: .8125rem; line-height: 1.35; }      /* 87% */
:where(.product-grid--rows) .pcard .price__finance-note { min-height: 0; }
:where(.product-grid--rows) .pcard__stock { display: none; margin-top: 4px; }
:where(.product-grid--rows) .pcard:has(.stock--low, .stock--off, .stock--pre) .pcard__stock { display: block; }      /* only a fact worth the line */
:where(.product-grid--rows) .pcard__buy { position: absolute; left: calc(44% - 56px); bottom: 8px; padding: 0; }
:where(.product-grid--rows) .pcard__buy .btn { width: 48px; min-width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; box-shadow: 0 2px 8px rgba(16, 11, 52, .18); }
:where(.product-grid--rows) .pcard__buy .btn svg { display: block; width: 22px; height: 22px; margin: 0; }
:where(.product-grid--rows) .pcard__buy .btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:where(.product-grid--rows) .pcard__buy--none { display: none; }
/* a pre-order says so in words on a phone row too, not with the round basket alone */
:where(.product-grid--rows) .pcard__buy--pre { left: 8px; }
:where(.product-grid--rows) .pcard__buy--pre .btn { width: auto; padding: 0 14px; border-radius: var(--r-pill); gap: 6px; }
:where(.product-grid--rows) .pcard__buy--pre .btn svg { width: 18px; height: 18px; }
:where(.product-grid--rows) .pcard__buy--pre .btn__label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.product-grid--rows { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.product-grid__item { min-width: 0; }
.product-grid__item, .rail__item { container: card / inline-size; }   /* a card takes its sizes from its own box */
.product-grid__item--wide { grid-column: 1 / -1; }                   /* something full width inside the list (the listing's example) */

/* ---------------------------------------------------------------------------------------------- section heads and rails */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.section-head__text { min-width: 0; }
.section-head__title { font-size: var(--fs-h2); line-height: 1.15; }
.section-head__lead { margin: 8px 0 0; color: var(--slate); max-width: 60ch; }

/* a rail on a phone: 2.2 cards in view, bleeding to both screen edges, swiped (no arrows) */
.rail { position: relative; }
.rail__viewport { position: relative; }
.rail__track { display: grid; grid-auto-flow: column; grid-auto-columns: 43%; gap: 10px; margin: -6px calc(var(--gutter) * -1); padding: 6px var(--gutter); list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
html.js .rail__track { scrollbar-width: none; }
html.js .rail__track::-webkit-scrollbar { display: none; }
.rail__item { min-width: 0; scroll-snap-align: start; }
.rail__btn { position: absolute; z-index: 3; top: 30%; display: none; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--navy); box-shadow: 0 0 0 1px var(--hair), var(--shadow-lift); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.rail__btn--prev { left: -22px; }
.rail__btn--next { right: -22px; }

/* ---------------------------------------------------------------------------------------------- category tiles */
/* on a phone: two across; with .tiles--row one swipeable row of round pictures (the home page) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile { display: grid; gap: 8px; color: var(--navy); text-decoration: none; transition: opacity var(--t-fast); }
.tile:active { opacity: .72; }
.tile:active .tile__art { transform: scale(.98); }
.tile__art { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: var(--r-card); background: var(--tile); overflow: hidden; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.tile__disc { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--mint); color: var(--mint); transition: transform var(--t-slow) var(--ease); }
.tile__disc::after { content: ""; position: absolute; inset: -9%; border: 2px solid currentColor; border-radius: 50%; opacity: 0; transform: scale(.9); transition: opacity var(--t-med), transform var(--t-slow) var(--ease); }
.tile:focus-visible .tile__disc::after { opacity: .55; transform: none; }
.tile--2 .tile__disc { background: var(--lime); color: var(--lime); }
.tile--3 .tile__disc { background: var(--coral); color: var(--coral); }
.tile--4 .tile__disc { background: var(--navy); color: var(--navy); }
.tile__icon { position: relative; width: 38%; height: auto; color: var(--ink); transition: transform var(--t-slow) var(--ease); }
.tile--4 .tile__icon { color: var(--mint); }
/* a category's picture is a product standing on the tile (whole, never cropped; a white photo background
   dissolves into the tile as it does on a product card) */
.tile__img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; transition: transform var(--t-slow) var(--ease); }   /* absolute: a tall picture is fitted whole inside the square, never cropped */
.tile__text { display: grid; gap: 2px; }
.tile__name { font: 700 .9375rem/1.2 var(--font-display); letter-spacing: -.01em; }
.tile__count { font-size: .75rem; color: var(--muted); }
.tiles--row { display: flex; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.tiles--row::-webkit-scrollbar { display: none; }
:where(.tiles--row) .tiles__item { flex: none; width: 76px; scroll-snap-align: start; }
:where(.tiles--row) .tile { justify-items: center; gap: 6px; text-align: center; }
:where(.tiles--row) .tile__art { width: 72px; border-radius: 50%; }
:where(.tiles--row) .tile__img { inset: 11%; width: 78%; height: 78%; }
:where(.tiles--row) .tile__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 .8125rem/1.2 var(--font-body); letter-spacing: 0; overflow-wrap: anywhere; }
:where(.tiles--row) .tile__count { display: none; }

/* ---------------------------------------------------------------------------------------------- breadcrumbs, pagination */
.crumbs { padding-top: 14px; font-size: var(--fs-sm); }
.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.crumbs__item { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--muted); }
.crumbs__item + .crumbs__item::before { content: ""; width: 6px; height: 6px; margin: 0 14px 0 10px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); opacity: .7; }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--slate); text-decoration: none; }
.crumbs [aria-current] { color: var(--navy); font-weight: 600; }
/* the last crumb (a long product name) gives way on one line instead of wrapping under a lone arrow */
.crumbs__item:last-child { flex: 1 1 8ch; min-width: 0; }
.crumbs__item:last-child > [aria-current] { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* on a phone the trail is not drawn on listing, product and text pages: the header's Back link and the category
   chips do its job (the trail stays in the page's data for search engines) */
.page-listing .crumbs, .page-product .crumbs, .page-content .crumbs { display: none; }

/* the foot of a list on a phone: one full-width "Next page" button ("Previous page" above it); numbers from 700px */
.pager { display: grid; gap: 8px; margin-top: 16px; }
.pager__phone { display: grid; gap: 4px; }
.pager__prev { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: var(--tap); border-radius: 8px; color: var(--navy); font-size: .9375rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.pager__prev:active { opacity: .72; }
.pager__list { display: none; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager__num, .pager__step { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 46px; padding: 0 12px; border: 1.5px solid transparent; border-radius: var(--r-pill); color: var(--navy); font-weight: 700; text-decoration: none; transition: background var(--t-fast), border-color var(--t-fast); }
.pager__num--current { background: var(--navy); color: #fff; }
.pager__step { gap: 4px; padding: 0 18px 0 12px; background: #fff; border-color: var(--line); }
.pager__list > li:last-child .pager__step { padding: 0 12px 0 18px; }
.pager__step--off { background: transparent; border-color: var(--hair); color: #8E8AA3; }
.pager__gap { padding: 0 2px; color: var(--muted); }
.pager__status { margin: 0; font-size: var(--fs-xs); color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------------------------------------- pills and chips */
/* 40px high on a phone, with a 48px hit area (the ::after reaches 4px above and below) */
.pill { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 20px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--navy); font-size: .9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), opacity var(--t-fast); }
.pill::after, .chip::after { content: ""; position: absolute; inset: -4px 0; }
.pill:active, .chip:active { opacity: .72; }
.pill--on, .pill[aria-current="true"], .pill[aria-pressed="true"] { background: var(--navy); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: #fff; color: var(--navy); font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), opacity var(--t-fast); }
.chip--on, .chip[aria-current], .chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip__count { color: var(--muted); font-weight: 500; }
.chip--on .chip__count, .chip[aria-current] .chip__count { color: var(--on-dark-soft); }

/* ---------------------------------------------------------------------------------------------- finance */
/* "Your payments" on a phone is flat on the page (no box inside a box); from 700px it is a card */
.finance { display: grid; gap: 14px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.finance p { margin: 0; }
/* every row may shrink and wrap: at 277px with 130% text (or an iPad mini with Larger Text) the title and the
   mark, and the two frequency pills, used to hold the box (and the page) 29px wider than the screen */
.finance > *, .finance__panel > * { min-width: 0; }
.finance__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.finance__title { font-size: 1.25rem; }
.finance__logo { display: block; width: auto; height: 28px; }
.finance__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: 100%; max-width: 100%; padding: 4px; border-radius: 28px; background: var(--well); }
.finance__options .pill { min-width: 0; min-height: var(--tap); padding: 0 12px; white-space: normal; text-align: center; line-height: 1.2; }
.finance__options .pill::after { content: none; }
.finance__panel { display: grid; gap: 0; }
.finance__figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.finance__amount { font: 800 2rem/1 var(--font-display); letter-spacing: var(--track-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.finance__per { font-size: 1rem; font-weight: 600; color: var(--navy); }
/* the APR stands directly under the payment, in the same face, weight and colour, at 70% of its size or more */
.finance__sub { display: flex; flex-direction: column-reverse; gap: 4px; margin-top: 6px !important; font-size: .9375rem; font-weight: 600; color: var(--navy); }
.finance__apr { font: 800 1.4375rem/1.1 var(--font-display); letter-spacing: var(--track-display); color: var(--ink); text-wrap: balance; }      /* 23px: 72% of the 32px payment */
.figures { margin: 14px 0 0; padding: 0 14px; border-radius: var(--r-well); background: var(--panel); }
.figures__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid rgba(24, 18, 76, .08); font-size: .9375rem; }
.figures__row:last-child { border-bottom: 0; }
.figures dt { color: var(--slate); }
.figures dd { margin: 0 0 0 auto; color: var(--navy); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures__row--total dt, .figures__row--total dd { color: var(--ink); font-weight: 800; }
.finance__first { display: flex; align-items: center; gap: 10px; margin-top: 14px !important; font-size: .9375rem; font-weight: 600; color: var(--navy); }
.finance__first svg { color: var(--mint-deep); }
.finance__small { font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); }
.finance__range { font-size: 1rem; color: var(--navy); }
/* a price under the loan minimum (financeBox minimum: true): a bright notice at the top of the box (the lime of the
   "Save" badge, a fill under navy text: not the coral of an error), then the figures for a basket of the minimum */
.finance__reach { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-well); background: var(--lime); color: var(--navy); box-shadow: 0 2px 0 rgba(16, 11, 52, .12); }
.finance__reach > svg { flex: none; margin-top: 1px; color: var(--ink); }
.finance__reach-body { display: grid; gap: 8px; min-width: 0; }
.finance__reach-text { font-size: .9375rem; font-weight: 600; line-height: 1.45; }
.finance__reach-link { justify-self: start; color: var(--ink); font-size: .9375rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.finance__reach-link[hidden] { display: none; }
.finance__basis { margin-bottom: 6px !important; font-size: .9375rem; font-weight: 600; color: var(--slate); }
.figures__row--basket { padding-bottom: 6px; }
.figures .figures__part { flex-basis: 100%; margin: 2px 0 0; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

/* the representative example: every word, in its own panel, at body size on a phone; never closed, never cut */
.rep-example { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-well); font-size: 1rem; line-height: 1.45; }
.rep-example p { margin: 0; }
.rep-example--light { background: var(--panel); color: var(--navy); }
.rep-example--dark { background: var(--ink); color: #fff; }
.rep-example--plain { padding: 0; color: var(--navy); }
.rep-example__note { font-size: var(--fs-sm); color: var(--muted); }
.rep-example--dark .rep-example__note { color: var(--on-dark-muted); }
.rep-example__more { justify-self: start; font-weight: 700; color: inherit; }

/* ---------------------------------------------------------------------------------------------- reassurance */
/* on a phone: one card, two by two, the titles only (the second lines are kept for screen readers) */
.trust { padding: 6px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); }
.trust__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.trust__item { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 10px; }
.trust__item:nth-child(even) { border-left: 1px solid var(--hair); }
.trust__item:nth-child(n + 3) { border-top: 1px solid var(--hair); }
.trust__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--mint); color: var(--ink); }
.trust__icon svg { width: 20px; height: 20px; }
.trust__item:nth-child(2) .trust__icon { background: var(--lime); }
.trust__item:nth-child(3) .trust__icon { background: var(--navy); color: var(--mint); }
.trust__item:nth-child(4) .trust__icon { background: var(--coral); }
.trust__text { display: grid; gap: 2px; min-width: 0; }
.trust__title { font: 700 .875rem/1.2 var(--font-display); color: var(--navy); }
.trust__line { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; font-size: var(--fs-xs); line-height: 1.4; color: var(--slate); }

.empty { display: grid; justify-items: center; gap: 10px; padding: 32px 16px; border: 1.5px dashed var(--line); border-radius: var(--r-card); background: var(--card); text-align: center; }
.empty__art { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 8px; border-radius: 50%; background: var(--mint); color: var(--ink); box-shadow: 0 0 0 8px var(--mint-soft); }
.empty__art svg { width: 34px; height: 34px; }
.empty__title { max-width: 100%; font-size: 1.375rem; overflow-wrap: anywhere; }
.empty__text { margin: 0; max-width: 46ch; color: var(--slate); }
.empty__action { width: 100%; margin-top: 10px; }
.empty__action > .btn { width: 100%; }

.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-well); background: var(--panel); color: var(--navy); font-size: .9375rem; }
.notice > svg { margin-top: 1px; }
.notice p { margin: 0; }
.notice__title { font-weight: 700; }
.notice--success { background: var(--mint-soft); }
.notice--success > svg { color: var(--mint-deep); }
.notice--warning { background: var(--amber-soft); }
.notice--error { background: var(--coral-soft); }
.notice--error > svg { color: var(--coral-deep); }

/* numbered steps on a phone: three rows with hairlines between, not three cards */
.steps { counter-reset: none; display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps__item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; background: none; border: 0; border-radius: 0; }
.steps__item + .steps__item { border-top: 1px solid var(--hair); }
.steps__num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--ink); font: 800 1rem/1 var(--font-display); }
.steps__item:nth-child(3n + 2) .steps__num { background: var(--lime); }
.steps__item:nth-child(3n + 3) .steps__num { background: var(--navy); color: var(--mint); }
.steps__title { font-size: 1rem; line-height: 1.3; }
.steps__text { margin: 4px 0 0; font-size: .875rem; line-height: 1.45; color: var(--slate); }

/* ---------------------------------------------------------------------------------------------- error page */
/* on a phone everything is inside the first screen: the numeral, the title, the sentence, two stacked buttons */
.error-page { padding: 32px 0 24px; text-align: center; }
.error-page__inner { display: grid; justify-items: center; gap: 12px; }
.error-page__code { position: relative; z-index: 0; margin: 4px 0 16px; font: 800 6rem/.9 var(--font-display); letter-spacing: -.05em; color: var(--ink); }
.error-page__code::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 58%; aspect-ratio: 1; border-radius: 50%; background: var(--mint); transform: translate(-50%, -50%); }
.error-page__code::after { content: ""; position: absolute; z-index: -1; right: 2%; top: 4%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--lime); }
.error-page__art { display: grid; place-items: center; width: 120px; height: 120px; margin: 12px 0 20px; border-radius: 50%; background: var(--mint); color: var(--ink); box-shadow: 0 0 0 12px var(--mint-soft); }
.error-page__art svg { width: 52px; height: 52px; }
.error-page__title { font-size: 1.5rem; }
.error-page__text { margin: 0; max-width: 52ch; font-size: var(--fs-lead); color: var(--slate); }
.error-page__actions { display: grid; gap: 12px; width: 100%; margin-top: 10px; }
.error-page__actions > .btn { width: 100%; }
.error-page__ref { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--muted); }

/* ---------------------------------------------------------------------------------------------- shared patterns */
.panel { padding: 24px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); }
.panel--well { background: var(--well); border-color: transparent; }
.panel--tint { background: var(--panel); border-color: transparent; }

.accordion { border-top: 1px solid var(--line); }
.accordion > details { border-bottom: 1px solid var(--line); }
.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 4px; font: 700 1.0625rem/1.25 var(--font-display); color: var(--navy); cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px; border: solid var(--navy); border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); transition: transform var(--t-med) var(--ease); }
.accordion details[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
.accordion__body { padding: 0 4px 24px; }

/* 48px high with 48px buttons on a phone (the outline is drawn inside, so the buttons are the full height) */
.stepper { display: inline-flex; align-items: center; height: 48px; border: 0; border-radius: var(--r-pill); background: #fff; box-shadow: inset 0 0 0 1.5px var(--control); }
.stepper__btn { display: grid; place-items: center; width: 48px; height: 100%; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--navy); cursor: pointer; }
.stepper__btn[disabled] { color: #A9A6BA; cursor: not-allowed; background: transparent; }
.stepper__value { min-width: 34px; padding: 0 2px; border: 0; background: transparent; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

.table { width: 100%; font-size: .9375rem; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.table th { width: 40%; color: var(--slate); font-weight: 600; }

.skeleton { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--well) 0%, #FBF9F4 50%, var(--well) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }


/* ===== 2 TABLET AND UP ===== */
/* TABLET_DESKTOP_SPEC 5.B (WB1 to WB6). What a W task does not name keeps the value it had before the redesign
   (commit a9c2222), restated here because region 1 changed it for the phone. No max-width query is left in
   regions 2 and 3: the grid, the rails, the card and the reassurances take their sizes from their own boxes. */
@media (min-width: 700px) {
/* buttons and badges: today's sizes */
.btn { padding: 0 28px; }
.btn--link { padding: 0 2px; }
.btn--sm { padding: 0 20px; }
.btn--lg { min-height: 60px; padding: 0 36px; }
.pcard__flags .badge { padding: 0 11px; }
.pcard__flags .badge--save { min-height: 30px; padding: 0 13px; font-size: .9375rem; }

/* the product page's price: left-aligned beside the gallery; the two credit lines one size, one colour (WB6) */
.price--page { justify-items: start; gap: 2px; text-align: left; }
.price--page .price__cash { justify-content: flex-start; align-items: center; gap: 6px 14px; }
.price--page .price__now { font-size: 2.375rem; }
.price--page .price__was { font-size: 1.25rem; }
.price--page .badge--save { display: inline-flex; }
.price--page .price__monthly, .price--page .price__terms, .price--page .price__finance-note { font: 400 1.0625rem/1.45 var(--font-body); color: var(--slate); }   /* the APR words bold */
.price--page .price__monthly, .price--page .price__finance-note { margin-top: 12px !important; }

/* ---- the card (WB2): upright for rails and grids alike; the phone's row card and compact rail card end here */
.pcard { --pcard-ratio: 1 / 1; display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-card); }
.pcard__media { aspect-ratio: var(--pcard-ratio); height: auto; margin: 8px 8px 0; border-radius: var(--r-well); }
.pcard__img { padding: 6%; }
.pcard__flags { top: 10px; left: 10px; right: 64px; }
.pcard__body { gap: 8px; padding: 12px 14px 0; }
.pcard__brand { margin-bottom: 4px; font-size: var(--fs-eyebrow); }
.pcard__name { font-size: .9375rem; line-height: 1.35; }
.pcard__title { -webkit-line-clamp: 2; min-height: 2.7em; }
/* the key specifications: one quiet line ("10 kg, 1400 rpm, Energy A" with a dot between), not the phone's chips */
.pcard__facts, .rail .pcard__facts { display: block; height: auto; margin: 0; padding: 0; list-style: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-xs); line-height: 1.45; color: var(--muted); }
.pcard__facts li { display: inline; height: auto; max-width: none; padding: 0; border-radius: 0; background: none; font: inherit; color: inherit; }
.pcard__facts li + li::before { content: " \00b7  "; }
.pcard .price { gap: 1px; padding-top: 0; }
.pcard .price__cash { gap: 2px 10px; }
.pcard .price__now { font-size: 1.5rem; }
.pcard--deal .price__now { margin-left: -6px; padding: 0 6px; }
.pcard .price__was { flex-basis: auto; font-size: var(--fs-sm); line-height: inherit; }
.pcard--deal .price__was { font-size: .9375rem; }
.pcard .price__cash:not(:has(.price__was))::after, .rail__track:not(:has(.price__was)) .price__cash::after { content: none; }
/* the two credit lines: one size, one colour; the APR words stay bold */
.pcard .price__monthly, .pcard .price__terms, .pcard .price__finance-note { font-size: var(--fs-xs); font-weight: 400; line-height: 1.45; color: var(--slate); }
.pcard .price__monthly strong { font-weight: 700; }
.pcard .price__monthly, .pcard .price__finance-note { margin-top: 7px !important; }
.pcard .price__finance-note { min-height: 2.9em; }                 /* two lines, like the monthly pair: prices line up along a row */
.pcard__stock, .rail .pcard__stock { display: block; margin-top: 0; }
.pcard__buy, .rail .pcard__buy { display: block; position: relative; inset: auto; padding: 12px 14px 14px; }
.pcard__buy .btn { width: 100%; min-width: 0; height: auto; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); box-shadow: none; font-size: .9375rem; gap: 8px; }   /* the words "Add to basket" show */
.pcard__buy .btn svg { display: inline-block; width: 20px; height: 20px; margin: 0 -2px; }
.pcard__buy .btn__label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
.pcard__buy--none { display: block; margin: 12px 14px 14px; padding: 0 12px; font-size: var(--fs-sm); }
.pcard__more { display: inline; }
.rail .pcard__body { padding-bottom: 0; }
.pcard--compact .pcard__body { padding-bottom: 14px; }
@container card (max-width: 299px) {            /* the earlier price on its own line, and that line kept when there is none */
  .pcard .price__was { flex-basis: 100%; }
  .pcard .price__cash:not(:has(.price__was))::after { content: "\00a0"; flex-basis: 100%; font-size: var(--fs-sm); font-weight: 500; }
  .rail__track:not(:has(.price__was)) .pcard .price__cash::after { content: none; }
  .pcard .price__finance-note { min-height: 4.35em; }            /* three lines, like a monthly pair that wraps */
}
@container card (max-width: 219px) {
  .pcard__body { padding: 10px 12px 0; } .pcard__buy { padding: 10px 12px 12px; }
  .pcard__name { font-size: .875rem; } .pcard .price__now { font-size: 1.375rem; }
}

/* the Compare control (WB5): a round button on the picture's corner; with a mouse it shows its word (region 4) */
.pcard__compare { display: block; position: absolute; z-index: 2; top: 14px; right: 14px; margin: 0; }
.pcard__comparebtn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--navy); box-shadow: 0 0 0 1px var(--hair), var(--shadow-card); cursor: pointer; }
.pcard__comparelabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pcard__comparebtn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.pcard__comparebtn[disabled], .pcard__comparebtn[aria-disabled="true"] { color: #A9A6BA; cursor: not-allowed; }

/* ---- the grid (WB1): columns from the width of the results' own box, 2 to 6 */
:where(:has(> .product-grid)) { container: results / inline-size; }
.product-grid, .product-grid--3, .product-grid--rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@container results (min-width: 600px)  { .product-grid, .product-grid--3, .product-grid--rows { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container results (min-width: 880px)  { .product-grid, .product-grid--3, .product-grid--rows { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container results (min-width: 1200px) { .product-grid, .product-grid--3, .product-grid--rows { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; } }
@container results (min-width: 1440px) { .product-grid, .product-grid--3, .product-grid--rows { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.product-grid__item--wide { display: none; }           /* the phone's example inside the list; the copy above the list shows instead */

.section-head { align-items: flex-end; gap: 12px 24px; margin-bottom: 22px; }
.section-head__title { line-height: var(--lh-tight); }
h3.section-head__title, h4.section-head__title { line-height: var(--lh-snug); }   /* the heading's own, as before */

/* ---- rails (WB1): a touch screen sees a peek of the next card (3.3, 4.3, 5.3, 6.3 across); a mouse sees whole cards and arrows (region 4) */
.rail__viewport { container: rail / inline-size; }
.rail__track { grid-auto-columns: calc((100% - 3 * 16px) / 3.3); gap: 16px; margin: -8px -8px -40px; padding: 8px 8px 56px; scroll-padding-inline: 8px; scroll-snap-type: x mandatory; }
@container rail (min-width: 1000px) { .rail__track { grid-auto-columns: calc((100% - 4 * 20px) / 4.3); gap: 20px; } }
@container rail (min-width: 1200px) { .rail__track { grid-auto-columns: calc((100% - 5 * 20px) / 5.3); } }
@container rail (min-width: 1500px) { .rail__track { grid-auto-columns: calc((100% - 6 * 20px) / 6.3); } }
.rail__btn { display: none !important; }
.rail__btn--prev { left: -12px; }
.rail__btn--next { right: -12px; }

/* ---- category tiles (WB6): square tiles, six to a row; more than six scroll as one row */
.tiles, .tiles--row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-inline: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
.tiles:has(> :nth-child(7)) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 12px) / 6.4); padding-bottom: 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tiles:has(> :nth-child(7))::-webkit-scrollbar { display: none; }
.tiles:has(> :nth-child(7)) > * { scroll-snap-align: start; }
.tiles__item { width: auto; }
.tile { justify-items: stretch; gap: 12px; text-align: inherit; }
.tile__art { width: auto; border-radius: var(--r-card); }
.tile__img { inset: 9%; width: 82%; height: 82%; }
.tile__name { display: block; -webkit-line-clamp: none; overflow: visible; font: 700 .9375rem/1.2 var(--font-display); letter-spacing: -.01em; overflow-wrap: normal; }
.tile__count { display: block; font-size: var(--fs-xs); }

/* ---- breadcrumbs and pages (WB6) */
.crumbs, .page-listing .crumbs, .page-product .crumbs, .page-content .crumbs { display: block; padding-top: 2px; }   /* a 46px trail */
.page-product .crumbs__item:last-child { display: none; }                              /* the name is the h1 beside it */
.pager { justify-items: center; gap: 10px; margin-top: 44px; }
.pager__list { display: flex; }
.pager__phone { display: none; }

/* pills, chips, the stepper and accordions take today's sizes back */
.pill, .chip { position: static; min-height: var(--tap); }
.pill::after, .chip::after { content: none; }

/* ---- "Your payments": a card again (WB6) */
.finance { gap: 16px; padding: 24px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.finance__logo { height: 40px; }
.finance__options { display: inline-flex; flex-wrap: wrap; width: fit-content; border-radius: 26px; }
.finance__options .pill { padding: 0 14px; }        /* "Monthly" and "Every 4 weeks" on one row in a 290px panel (700 to 820px) */
.finance__amount { font-size: 2.5rem; }
.finance__per { font-size: 1.0625rem; }
.finance__sub { font-size: 1rem; }
.finance__apr { font-size: 1.75rem; }                  /* the APR at 70% of the payment */
.figures { margin-top: 16px; padding: 4px 16px; }
.figures__row { align-items: baseline; min-height: 0; padding: 11px 0; }

/* ---- the representative example: one paragraph, every word (WB6) */
.rep-example { display: block; padding: 12px 16px; font-size: .9375rem; line-height: 1.45; }
.rep-example p { display: inline; }
.rep-example__note { margin-left: 6px; }
.rep-example__more { margin-left: 8px; font-weight: 700; white-space: nowrap; }
.rep-example--plain { padding: 0; }

/* ---- reassurance (WB6): two by two in a narrow box, four across from 1000px of its own width; the second lines drawn again */
.trust { container: trust / inline-size; }
.trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trust__item { gap: 14px; min-height: 0; padding: 18px 20px; }
.trust__icon { width: 52px; height: 52px; border-radius: 16px; }
.trust__icon svg { width: 26px; height: 26px; }
.trust__title { font-size: 1rem; line-height: 1.25; }
.trust__line { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
@container trust (min-width: 1000px) {
  .trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust__item:nth-child(n + 3) { border-top: 0; }
  .trust__item + .trust__item { border-left: 1px solid var(--hair); }
}

.empty { gap: 12px; padding: 56px 24px; border-radius: var(--r-hero); }
.empty__art { width: 96px; height: 96px; margin-bottom: 14px; box-shadow: 0 0 0 12px var(--mint-soft); }
.empty__art svg { width: 44px; height: 44px; }
.empty__title { font-size: 1.625rem; }
.empty__action, .empty__action > .btn { width: auto; }

/* ---- steps (WB6): three cards, the number above the words */
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps__item { flex-direction: column; gap: 16px; padding: 24px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); }
.steps__num { width: 48px; height: 48px; font-size: 1.375rem; }
.steps__title { font-size: 1.125rem; line-height: var(--lh-snug); }
.steps__text { margin-top: 6px; font-size: .9375rem; line-height: inherit; }

.error-page { padding-top: 72px; }
.error-page__inner { gap: 14px; }
.error-page__code { margin: 12px 0 40px; font-size: clamp(6.5rem, 4rem + 12vw, 12.5rem); }
.error-page__art { width: 168px; height: 168px; margin: 8px 0 28px; box-shadow: 0 0 0 18px var(--mint-soft); }
.error-page__art svg { width: 72px; height: 72px; }
.error-page__title { font-size: var(--fs-h1); }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; width: auto; margin-top: 14px; }
.error-page__actions > .btn { width: auto; }
.accordion summary { min-height: 64px; padding: 14px 4px; font-size: 1.1875rem; }
.stepper { height: calc(var(--btn-h-sm) + 3px); border: 1.5px solid var(--control); box-shadow: none; }
.stepper__btn { width: var(--tap); }
.stepper__value { min-width: 36px; }
}
/* the card's picture: a little shallower on a wide landscape screen, and shallower again in a short window (WB2).
   A short window is where the first row's credit pair meets the fold: the well gives up height (never the APR
   line, which stays at the monthly figure's size), so that "or X a month" and "24 payments, 89.9% APR
   representative" are on the first screen together (desktop verifier M2, tablet verifier M3: /deals at 1366 x 768,
   1280 x 720, 1199 x 800 and 1133 x 744; listings at 1366 x 633). */
/* 5:4 from 1000px whatever the orientation (1024 x 1366 put row 2's pair on the fold), and from 700px in a window
   not much taller than wide (a split screen at 981 x 1024, 700 x 900); an upright iPad (820 x 1180) keeps 1:1 */
@media (min-width: 1000px), (min-width: 700px) and (min-aspect-ratio: 3 / 4) { .pcard { --pcard-ratio: 5 / 4; } }
@media (min-width: 1000px) and (orientation: landscape) and (max-height: 840px) {
  .pcard { --pcard-ratio: 3 / 2; }
  .pcard__body { gap: 6px; }
  .pcard .price__monthly, .pcard .price__finance-note { margin-top: 4px !important; }
  /* the earlier price beside the price (it wraps under it only when the two do not fit), no line kept for it */
  .pcard .price__was { flex-basis: auto; }
  .pcard .price__cash:not(:has(.price__was))::after { content: none; }
  .pcard .price__finance-note { min-height: 2.9em; }
}
@media (min-width: 1000px) and (max-height: 760px) { .pcard { --pcard-ratio: 2 / 1; } }
/* a laptop's browser window (1366 x 633): the key-facts line gives way too; the name, the price and the credit
   pair stay (on a listing with a row of chips or a search note above the grid the pair still met the fold) */
@media (min-width: 1000px) and (max-height: 700px) {
  .product-grid .pcard__facts { display: none; }
  .product-grid .pcard__body { padding-top: 4px; }
}

/* ===== 3 DESKTOP ===== */
@media (min-width: 1200px) {
.tiles, .tiles--row { gap: 20px; }
.tiles:has(> :nth-child(7)) { grid-auto-columns: calc((100% - 5 * 20px) / 6.4); }
.tile__name { font-size: 1.0625rem; }
}

/* ===== 4 CAPABILITY AND MODES ===== */
/* Hover only where a pointer hovers (a finger never leaves a card "lifted"). The :where() parts add no weight:
   they keep a hover from repainting a state that used to win by coming later in the file (disabled, done, error). */
@media (hover: hover) and (pointer: fine) {
.btn:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: var(--slate); }
.btn--secondary:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: var(--navy); --btn-fg: #fff; }
.btn--accent:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: var(--mint); box-shadow: var(--glow-mint); transform: translateY(-1px); }
.btn--accent:active { transform: scale(.98); }
.btn--ghost:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: var(--well); }
.btn--dark:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: var(--navy); }
.btn--light:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: var(--mint); }
.btn--link:hover:where(:not([disabled], [aria-disabled="true"], .is-done)) { --btn-bg: transparent; text-decoration-thickness: 2.5px; }
.field__input:hover:where(:not(.field--error *)) { border-color: var(--navy); }
.check__input:hover { border-color: var(--navy); }
.pcard:hover { transform: translateY(-3px); border-color: transparent; box-shadow: var(--shadow-lift); }
.pcard:hover .pcard__img { transform: scale(1.05); }
.pcard:hover .pcard__title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.rail__btn:hover { background: var(--navy); color: #fff; transform: scale(1.06); }
.tile:hover .tile__disc::after { opacity: .55; transform: none; }
.tile:hover .tile__art { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile:hover .tile__disc { transform: scale(1.08); }
.tile:hover .tile__icon { transform: scale(1.06) rotate(-3deg); }
.tile:hover .tile__img { transform: scale(1.05); }
.tile:hover .tile__name { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2.5px; text-underline-offset: 4px; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }
a.pager__num:hover, a.pager__step:hover { background: #fff; border-color: var(--navy); }
.pager__prev:hover { text-decoration-thickness: 2.5px; }
.pill:hover { background: rgba(255, 255, 255, .8); }
.pill--on:hover, .pill[aria-current="true"]:hover, .pill[aria-pressed="true"]:hover { background: var(--navy); }
.chip:hover { border-color: var(--navy); }
.stepper__btn:hover:where(:not([disabled])) { background: var(--well); }
.rep-example__more:hover { text-decoration-thickness: 2.5px; }
}
@media (hover: none) { .rail__btn { display: none !important; } }

/* from 700px (WB1, WB2, WB4, WB5, WB6) */
@media (min-width: 700px) and (any-pointer: fine) {          /* a mouse or trackpad is attached: the arrows as well as the peek */
  .rail__btn { display: grid !important; }
  .rail__btn[hidden] { display: none !important; }
}
@media (min-width: 700px) and (hover: hover) and (pointer: fine) {   /* a mouse is the main pointer: whole cards */
  .rail__track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
  @container rail (min-width: 1000px) { .rail__track { grid-auto-columns: calc((100% - 3 * 20px) / 4); } }
  @container rail (min-width: 1200px) { .rail__track { grid-auto-columns: calc((100% - 4 * 20px) / 5); } }
  @container rail (min-width: 1500px) { .rail__track { grid-auto-columns: calc((100% - 5 * 20px) / 6); } }

  .pcard__body { padding-bottom: 14px; }
  .rail .pcard__body { padding-bottom: 14px; }
  /* "Add to basket" rides over the foot of the picture; nothing else moves */
  .pcard__buy:not(.pcard__buy--none, .pcard__buy--pre), .rail .pcard__buy:not(.pcard__buy--none, .pcard__buy--pre) { position: absolute; z-index: 2; left: 8px; right: 8px; top: 8px; aspect-ratio: var(--pcard-ratio); display: flex; align-items: flex-end; padding: 10px; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity var(--t-fast), transform var(--t-med) var(--ease); }
  .pcard__buy:not(.pcard__buy--none, .pcard__buy--pre) .btn { pointer-events: auto; box-shadow: var(--shadow-lift); }
  .pcard__buy--pre { margin: 0; padding: 0 14px 14px; }       /* "Pre-order" is always drawn: a hover-only button would hide what the card offers */
  .pcard:hover .pcard__buy, .pcard:focus-within .pcard__buy, .pcard__buy:has(.is-busy, .is-done) { opacity: 1; transform: none; }
  .pcard__buy--none { margin: 0 14px 14px; }

  /* the second photograph (WB4; public/js/ui/cards.js adds it on the first pointing) */
  .pcard__img--alt { display: block; position: absolute; inset: 0; opacity: 0; transition: opacity var(--t-fast); }
  .pcard.is-alt .pcard__img--alt { opacity: 1; }
  .pcard.is-alt .pcard__img:not(.pcard__img--alt) { opacity: 0; }
  .pcard__dots { position: absolute; z-index: 1; left: 50%; bottom: 8px; display: flex; gap: 4px; transform: translateX(-50%); transition: opacity var(--t-fast); }
  .pcard__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--control); }
  .pcard__dots i:first-child { background: var(--navy); }
  .pcard:hover .pcard__dots, .pcard:focus-within .pcard__dots { opacity: 0; }
  html.no-js .pcard__dots { display: none; }                          /* no script, no second photo: no promise of one */

  /* Compare shows its word, and only on the card being pointed at (or once it is chosen) */
  .pcard__comparebtn { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 32px; padding: 0 12px 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; opacity: 0; transition: opacity var(--t-fast); }
  .pcard__comparelabel { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .pcard:hover .pcard__comparebtn, .pcard:focus-within .pcard__comparebtn, .pcard__comparebtn[aria-pressed="true"] { opacity: 1; }

  .crumbs, .page-listing .crumbs, .page-product .crumbs, .page-content .crumbs { padding-top: 6px; }
  .crumbs__item, .crumbs a { min-height: 36px; }   /* a 42px trail */
}

@media (prefers-reduced-motion: reduce) {
  .pcard:hover, .tile:hover .tile__art, .tile:active .tile__art, .btn--accent:hover, .rail__btn:hover, .primary-nav__deals:hover { transform: none; }
  .pcard:active:not(:has(.pcard__buy:active, .pcard__compare:active)) { transform: none; }
  .pcard:hover .pcard__img, .tile:hover .tile__disc, .tile:hover .tile__icon, .tile:hover .tile__img { transform: none; }
  .skeleton { animation: none; }
}
